Hello, friends.
Today I just tell you how to generate multiple signals using visa.
So in this case we just generate two serial signals.
One is A and one is B using LabVIEW.
And based on that signal, my Arduino will generate signals for two different LEDs.
So first I just go to the hardware.
As you see over here.
This is my PIN number.
So in the code, as you see over here, I just use PIN number nine and pin number ten.
So I just connect the PIN number nine.
So over here, this is my pin number nine, Positive pin.
And over here, this is my pin number ten.
I just connect this pin over here.
And the ground for the particular Led is over here, let's say.
So I just connect the Led.
So over here, this is my second Led.
This is my first Led.
So in this case, I just go to the software part.
So over here, this is my Arduino code.
I just set the pin numbers.
PIN number nine and pin number ten.
I just use variable.
Var one is used for serial data input.
So over here we set up pin mode.
Led one is my output pin led two is my also output pin on the arduino board.
Then I just go void loop if serial data is available.
In that case, if variable one is equal to a, in that case it will generate high signal through Led
one else it generates low signal through Led one.
If variable one is equal to B, then it will generate signal for Led two high and low signal otherwise.
Okay, so this is the code.
So I just set the port on port eight, run the code.
So in the case of Visa you just use Arduino also.
So there is some error failed uploading error exist.
So I just need to disconnect this connect again.
Let's check what is the error.
Yes, Claude, this variable one a, b, I just again, run it, upload it.
So now as you see uploading done.
So now you just close this window.
Just go to the LabVIEW part over here.
As you see in the my previous video, I just used these components.
That is my visa serial visa, right?
Visa close.
And this is my error handler.
I just again make label of all these I just on the labels as you see
control U so I just minimize this somewhat over here.
So this is my visa simple error handler In this case, as you see from here, it will just read the
serial data.
I just set the port over here.
The port number in this case is my com port eight.
I just connect this one over here.
Now I just select over here as you see the same function in this A when true is there, it will send
a and over here I just need to put B over here.
It will send B signal to the Arduino board.
So now I just run it.
So in this case, the comport is busy.
That's why it will creating some error for me.
So I just stop it.
I just again
open my Arduino code.
In this case, I just check for the error.
Over here.
There is my Arduino ID code.
So as you see, PIN 910 is set.
Code is ready.
So I just again use the com port over here.
Run it.
Uploading is done.
In this case, I just minimize this.
I just run it.
I need to stop this again.
Hit on run button.
Let's check.
What is the error?
It is sending data, but let's check the signal also.
This is my high signal.
This is my low signal.
Let's check what is present over this wire.
Create indicator for this.
And again, create indicator for this
control you.
Again, run it right now.
It is in all condition a, B, it is sending.
So as you see over here, I just changed the code.
So when you hit on run button, right now, code is running when I press this button.
So first I just need to, again run it.
When I hit on run button.
Something is wrong over here.
I need to just reconnect it.
So now I just again hit on run button.
So as you see, both the ladies are right now.
On, on, off, on, off.
This is how you can work with multiple ladies using Visa.
So this is all about today's lecture.
Thank you.