So friends, today I will show you how to generate multiple digital signals using Matlab and National
Instruments date card.
For that purpose, I just have with me there is a already created total eight LEDs with resistance,
and the connections are like every LED, a positive pin or this connector.
And the ground.
One ground is a here and another ground is here.
So this one, this pin is my ground.
So I just connect.
over here.
So this is my ground.
As you see now, I just use pins.
So for that purpose, I just drag multiple pins.
I will show you one by one.
As you see in this case I'm just using pin zero of port one.
Pin zero of port zero.
And also I just connect pin number seven of port zero.
Another pin total I have eight LEDs so I can connect as many as I need.
So over here this is four, 0 or 2.
Pin number zero.
Now I need to connect these pins to the.
Board over here.
So let's say I want to run this one.
So I just check where this pin is connected.
This one.
So over here I got over two.
This one is for two pin zero.
Now this red one is port one as you see 4 to 1 pin zero.
I connect it to next pin over here.
Another one.
Pin number seven over zero.
I just connect over here.
So in this case I'm totally using four pins.
So as you see it is running maybe already signal present over here.
So now this is the hardware connections.
As you see one already goes high.
That is for zero line zero.
Now we just go to Simulink over here.
We just need to use digital output Drag it.
Then I need some constant.
So I'm using this constant.
As you see it is giving one.
So for that purpose I need total four.
Now in this new device, I need to select the pins.
So pin zero is their pin number seven is their.
040.
Volt one.
Pin number zero is their and port two.
Pin number zero is their.
So I selected.
Right right now I selected total four pins.
Just apply okay.
So as we know the data required from the Matlab it is boolean.
So I need data type conversion.
And in this I just select boolean over here.
I just connect this.
So whatever is the data or mainly it is a floating type double precision.
It will convert it into boolean.
So over here we have total four.
So I need mux multiplexer inside the Matlab.
So I just drag it.
So total number of inputs are four.
Over here I just select it.
Connect the pins.
As you see.
So just connect this one.
So now the program is ready in this case.
In this particular case all the four LEDs glow.
So let's run it.
As you see total four LEDs these runs continuously.
Now let's say I want to change one off.
Another is on.
So let's say I want to make it zero.
Apply again.
Zero apply.
Again.
Run it.
you can check only red LEDs are on in this particular case.
Let's do it for another one.
It should be high.
And this one should be low.
Again.
This one should be you.
Run it.
And you can check only green LEDs runs in this case.
So this is how you can generate multiple digital signals using National Instruments and AI I 6001 dash
card with Matlab.
So in the next case we just go with how to acquire multiple digital signals using an I dagger in between
I just show you this is already created Decca board.
Now I just show you these particular case on breadboard.
So right now, as you see over here, this is my breadboard.
And now I have multiple color LEDs.
So I just connect negative over here.
So this line will provide me negative.
And over here I just put the signal.
So this is my ground signal another LED.
I just take.
Ground.
And over here it is positive.
So I just put this is my O2 signal.
Zero.
Now this one red one I just use.
As you see my program is running.
It will generate 0101 signal.
Now I just put another LED over here.
in the live streaming.
I will show you the program.
It will off.
It will continuously off condition.
As you see right now I just connected.
But this lady goes high as I connect.
Over here, as you see.
So as you see in this particular case, I have total four ladies.
This one, this one is my four zero line zero.
This one is my four zero.
Line seven red one is my four one, line zero and white one is my four two line zero.
So let's run it for all I just stopped the program, and over here, I just put hi signal.
Again.
Over here.
I just put hi signal.
And it will generate continuous own signal for all the four LEDs.
As you see in the given circuit.
So this is how you can let's you want to run only one.
So over here let's say I put zero.
Again zero.
You can apply using single constant value.
Also it is not necessary.
So as you see this one is my port two pin 0100 signal is there.
So this is all about today's lecture.
Thank you.