Friends today.
I will explain you how to program.
Mario.
National Instruments.
Mario using low level programming without the using of Express VI.
So for that purpose, as you see, I already create a project.
I just delete this.
In this I just create a new VI over here and I just delete this VI, the main VI that is already inside
this.
Just go to the VI over here.
As you see, I just connected port a of my Rio with these eight LEDs.
This black one is my ground.
This is common for all LEDs, and I just use eight LEDs over here.
As you see right now.
I just go to my Rio over here in this, I just select low level programming, select it.
I just need digital input output over here.
I just drag open, then I want to close it in between.
I just need to write the code for particular Led.
Okay.
So right now I just show you for single Led.
After that I just go for multiple LEDs.
Or you can say for the eight LEDs that are available on board.
Okay.
So.
I just made this circuit over zero PCB board over here.
You need to select the channels, create constraint over here.
You need to select the channel.
Right now I'm just using port a zero pin.
It is selected over here.
I just increase the size control Z.
So it is visible to you or you can make it control.
Also, it is up to you change to control.
Let's say over here, as you see it is visible to you also.
So now I just create a while loop for continuous writing the code, create a control over here in this,
you need to just send the value.
Right now I am just sending the value using this boolean button.
Just connect it right now.
As you see it is not connected over here, so you need to check what type of value it requires.
So control H it require a array.
Okay.
So for that purpose I just build, use, build, array, function, connect this.
Let's check.
It is working right now.
So this is up to you how to use this particular case.
Right now, I just save it.
I want to deploy this code.
So over here, I just save it as United Untitled one.
Run it.
When you just run it, it will deploy the code to your Mario in the first time.
It will take some time.
If you are working on continuously after the first time.
It is not taking so much time as you see right now.
Deployment is in progress.
Done.
Okay, so now you just go to your VI over here.
I just turn on my first led that is connected to digital input output 303 It is turned on as you see
right now.
So this is how you can work for single Led.
Now I just show you how to build a program for Mario for multiple LEDs.
Okay, so for that purpose, I just select over here multiple LEDs.
Okay, so in that case, I just select.
Or here, as you see, no option is there.
Allow multiple options.
I just create constant over here.
Let's check what happened.
Still, I just need to delete this one Ctrl b.
Again, I need to create a constant over here.
Select.
Control.
It is selecting only one led over here, as you see.
So to select multiple LEDs, I just go inside the material code, channel names, open a reference to
one or more digital input channel.
You must open the reference before you read or write.
Okay, so let's delete this one.
Control B over here.
So right now I just select multiple.
Let's say I want to go for two cases over here.
In this case, I just select digital four and over here it is Digital three.
Let's say.
And now I just also copy this button.
Drag and connect it to over here.
Control u it will minimize your window.
Now this is my PIN number two.
Let's again save it.
Deploy this code inside the my Rio.
As you see right now, it is writing very fast.
So when the program deployed, as you see both the LEDs turned on and I can control the LEDs.
Okay, So this is how you can generate code for your particular case or your particular application.
Right now, I just stop this in place of this, let's say I want to run this continuously, so I just
delete this one.
In place of this, I just add a shift register over here.
I just want to create a running light case in this also.
So over here, let's say it gave me true.
And over here I just use a nugget function.
So one is off, another is on.
I'm just wanting this type of code.
So from here it is goes to over here.
Control u.
It will minimize the code.
Now I just also put some delay inside it so that it is clear to me I just create control over here.
So according to my delay, led is turned on and off.
So let's say it is 500 delay millisecond delay.
I just save this code and run it.
As you see.
On, off, on, off.
And right now I just want to increase the speed.
It is visible to you.
Okay.
As you see, green and red.
If you want to increase more, as you see now, I just put 200.
Now, I just put two seconds delay.
Okay, so this is how you can create your own code using low level programming without the help of Express
vice.
So this is all about today's lecture.
Thank you.