1
00:00:06,000 --> 00:00:19,000
So friends, today I will show you how to generate multiple digital signals using Matlab and National

2
00:00:19,000 --> 00:00:21,000
Instruments date card.

3
00:00:21,000 --> 00:00:34,000
For that purpose, I just have with me there is a already created total eight LEDs with resistance,

4
00:00:34,000 --> 00:00:43,000
and the connections are like every LED, a positive pin or this connector.

5
00:00:43,000 --> 00:00:45,000
And the ground.

6
00:00:45,000 --> 00:00:48,000
One ground is a here and another ground is here.

7
00:00:48,000 --> 00:00:52,000
So this one, this pin is my ground.

8
00:00:52,000 --> 00:00:54,000
So I just connect.

9
00:00:55,000 --> 00:00:56,000
over here.

10
00:00:56,000 --> 00:00:58,000
So this is my ground.

11
00:00:58,000 --> 00:01:03,000
As you see now, I just use pins.

12
00:01:03,000 --> 00:01:10,000
So for that purpose, I just drag multiple pins.

13
00:01:11,000 --> 00:01:15,000
I will show you one by one.

14
00:01:15,000 --> 00:01:24,000
As you see in this case I'm just using pin zero of port one.

15
00:01:25,000 --> 00:01:29,000
Pin zero of port zero.

16
00:01:29,000 --> 00:01:38,000
And also I just connect pin number seven of port zero.

17
00:01:39,000 --> 00:01:49,000
Another pin total I have eight LEDs so I can connect as many as I need.

18
00:01:49,000 --> 00:01:54,000
So over here this is four, 0 or 2.

19
00:01:54,000 --> 00:01:55,000
Pin number zero.

20
00:01:56,000 --> 00:02:01,000
Now I need to connect these pins to the.

21
00:02:04,000 --> 00:02:05,000
Board over here.

22
00:02:05,000 --> 00:02:10,000
So let's say I want to run this one.

23
00:02:10,000 --> 00:02:14,000
So I just check where this pin is connected.

24
00:02:14,000 --> 00:02:15,000
This one.

25
00:02:15,000 --> 00:02:21,000
So over here I got over two.

26
00:02:21,000 --> 00:02:25,000
This one is for two pin zero.

27
00:02:25,000 --> 00:02:34,000
Now this red one is port one as you see 4 to 1 pin zero.

28
00:02:34,000 --> 00:02:40,000
I connect it to next pin over here.

29
00:02:40,000 --> 00:02:41,000
Another one.

30
00:02:41,000 --> 00:02:44,000
Pin number seven over zero.

31
00:02:45,000 --> 00:02:47,000
I just connect over here.

32
00:02:47,000 --> 00:02:52,000
So in this case I'm totally using four pins.

33
00:02:54,000 --> 00:03:01,000
So as you see it is running maybe already signal present over here.

34
00:03:01,000 --> 00:03:06,000
So now this is the hardware connections.

35
00:03:06,000 --> 00:03:08,000
As you see one already goes high.

36
00:03:08,000 --> 00:03:11,000
That is for zero line zero.

37
00:03:11,000 --> 00:03:16,000
Now we just go to Simulink over here.

38
00:03:16,000 --> 00:03:23,000
We just need to use digital output Drag it.

39
00:03:25,000 --> 00:03:28,000
Then I need some constant.

40
00:03:32,000 --> 00:03:35,000
So I'm using this constant.

41
00:03:35,000 --> 00:03:37,000
As you see it is giving one.

42
00:03:37,000 --> 00:03:41,000
So for that purpose I need total four.

43
00:03:45,000 --> 00:03:51,000
Now in this new device, I need to select the pins.

44
00:03:51,000 --> 00:03:56,000
So pin zero is their pin number seven is their.

45
00:03:58,000 --> 00:03:59,000
040.

46
00:04:02,000 --> 00:04:03,000
Volt one.

47
00:04:03,000 --> 00:04:06,000
Pin number zero is their and port two.

48
00:04:06,000 --> 00:04:08,000
Pin number zero is their.

49
00:04:08,000 --> 00:04:10,000
So I selected.

50
00:04:10,000 --> 00:04:13,000
Right right now I selected total four pins.

51
00:04:13,000 --> 00:04:15,000
Just apply okay.

52
00:04:16,000 --> 00:04:25,000
So as we know the data required from the Matlab it is boolean.

53
00:04:25,000 --> 00:04:30,000
So I need data type conversion.

54
00:04:30,000 --> 00:04:35,000
And in this I just select boolean over here.

55
00:04:37,000 --> 00:04:39,000
I just connect this.

56
00:04:40,000 --> 00:04:46,000
So whatever is the data or mainly it is a floating type double precision.

57
00:04:46,000 --> 00:04:49,000
It will convert it into boolean.

58
00:04:49,000 --> 00:04:51,000
So over here we have total four.

59
00:04:51,000 --> 00:04:58,000
So I need mux multiplexer inside the Matlab.

60
00:04:59,000 --> 00:05:01,000
So I just drag it.

61
00:05:01,000 --> 00:05:05,000
So total number of inputs are four.

62
00:05:05,000 --> 00:05:07,000
Over here I just select it.

63
00:05:09,000 --> 00:05:11,000
Connect the pins.

64
00:05:19,000 --> 00:05:20,000
As you see.

65
00:05:26,000 --> 00:05:29,000
So just connect this one.

66
00:05:32,000 --> 00:05:36,000
So now the program is ready in this case.

67
00:05:36,000 --> 00:05:41,000
In this particular case all the four LEDs glow.

68
00:05:41,000 --> 00:05:43,000
So let's run it.

69
00:05:45,000 --> 00:05:51,000
As you see total four LEDs these runs continuously.

70
00:05:51,000 --> 00:05:56,000
Now let's say I want to change one off.

71
00:05:56,000 --> 00:05:58,000
Another is on.

72
00:05:58,000 --> 00:06:02,000
So let's say I want to make it zero.

73
00:06:03,000 --> 00:06:05,000
Apply again.

74
00:06:06,000 --> 00:06:08,000
Zero apply.

75
00:06:11,000 --> 00:06:12,000
Again.

76
00:06:12,000 --> 00:06:12,000
Run it.

77
00:06:14,000 --> 00:06:20,000
you can check only red LEDs are on in this particular case.

78
00:06:20,000 --> 00:06:23,000
Let's do it for another one.

79
00:06:23,000 --> 00:06:26,000
It should be high.

80
00:06:30,000 --> 00:06:32,000
It should be high.

81
00:06:33,000 --> 00:06:36,000
And this one should be low.

82
00:06:38,000 --> 00:06:39,000
Again.

83
00:06:39,000 --> 00:06:41,000
This one should be you.

84
00:06:44,000 --> 00:06:44,000
Run it.

85
00:06:47,000 --> 00:06:52,000
And you can check only green LEDs runs in this case.

86
00:06:53,000 --> 00:07:03,000
So this is how you can generate multiple digital signals using National Instruments and AI I 6001 dash

87
00:07:03,000 --> 00:07:05,000
card with Matlab.

88
00:07:06,000 --> 00:07:19,000
So in the next case we just go with how to acquire multiple digital signals using an I dagger in between

89
00:07:19,000 --> 00:07:27,000
I just show you this is already created Decca board.

90
00:07:27,000 --> 00:07:34,000
Now I just show you these particular case on breadboard.

91
00:07:34,000 --> 00:07:40,000
So right now, as you see over here, this is my breadboard.

92
00:07:42,000 --> 00:07:46,000
And now I have multiple color LEDs.

93
00:07:46,000 --> 00:07:51,000
So I just connect negative over here.

94
00:07:53,000 --> 00:07:56,000
So this line will provide me negative.

95
00:07:56,000 --> 00:08:00,000
And over here I just put the signal.

96
00:08:00,000 --> 00:08:05,000
So this is my ground signal another LED.

97
00:08:05,000 --> 00:08:07,000
I just take.

98
00:08:09,000 --> 00:08:10,000
Ground.

99
00:08:11,000 --> 00:08:13,000
And over here it is positive.

100
00:08:13,000 --> 00:08:20,000
So I just put this is my O2 signal.

101
00:08:21,000 --> 00:08:22,000
Zero.

102
00:08:22,000 --> 00:08:28,000
Now this one red one I just use.

103
00:08:29,000 --> 00:08:32,000
As you see my program is running.

104
00:08:32,000 --> 00:08:36,000
It will generate 0101 signal.

105
00:08:36,000 --> 00:08:41,000
Now I just put another LED over here.

106
00:08:42,000 --> 00:08:43,000
in the live streaming.

107
00:08:43,000 --> 00:08:45,000
I will show you the program.

108
00:08:45,000 --> 00:08:47,000
It will off.

109
00:08:47,000 --> 00:08:49,000
It will continuously off condition.

110
00:08:49,000 --> 00:08:52,000
As you see right now I just connected.

111
00:08:52,000 --> 00:08:58,000
But this lady goes high as I connect.

112
00:09:00,000 --> 00:09:04,000
Over here, as you see.

113
00:09:04,000 --> 00:09:09,000
So as you see in this particular case, I have total four ladies.

114
00:09:09,000 --> 00:09:14,000
This one, this one is my four zero line zero.

115
00:09:15,000 --> 00:09:17,000
This one is my four zero.

116
00:09:17,000 --> 00:09:25,000
Line seven red one is my four one, line zero and white one is my four two line zero.

117
00:09:26,000 --> 00:09:35,000
So let's run it for all I just stopped the program, and over here, I just put hi signal.

118
00:09:38,000 --> 00:09:38,000
Again.

119
00:09:38,000 --> 00:09:39,000
Over here.

120
00:09:39,000 --> 00:09:41,000
I just put hi signal.

121
00:09:44,000 --> 00:09:52,000
And it will generate continuous own signal for all the four LEDs.

122
00:09:52,000 --> 00:09:56,000
As you see in the given circuit.

123
00:09:56,000 --> 00:10:02,000
So this is how you can let's you want to run only one.

124
00:10:04,000 --> 00:10:10,000
So over here let's say I put zero.

125
00:10:12,000 --> 00:10:14,000
Again zero.

126
00:10:16,000 --> 00:10:20,000
You can apply using single constant value.

127
00:10:20,000 --> 00:10:23,000
Also it is not necessary.

128
00:10:24,000 --> 00:10:33,000
So as you see this one is my port two pin 0100 signal is there.

129
00:10:34,000 --> 00:10:36,000
So this is all about today's lecture.

130
00:10:36,000 --> 00:10:37,000
Thank you.

