Now let's start with our practical example for lead blank with arduino and lab view.
In order to start with our example we need to love you to design our graphical user interface and set
our control and serial communication frivolities.
So follow my steps as we go in this lesson.
And if you have any question regarding any of these steps you can ask in that you aren't able.
I'll be happy to clarify everything for you.
Now the first step is going to the start menu and search for love you
as you can see and I love you 2019.
As you can see I said I have 30 days remaining in my evaluation copy.
So click evaluate
now create a project
as you can see it will show you some templates could create a blank project then click finish.
Here we are.
Now as you can see since this is a blank project you need to add a new V I find new VII.
Now here is the front panel.
And here is the block diagram panel.
Now what you need to do is go to the block diagram which is the right window here and right click then
select make out a hub from here go to the Linux or Linux library then choose option drag and drop open.
Here now create a control by writing the first two wire steps as you can see here we have this is these
two wild steps.
The first five second one right click here with your mouse and create control.
This is our first control element.
Now you have to create a control for the second layer tip but we will leave this to the last step for
now.
Just create a control for the first way of tape which is serial port to choose the serial ball that
you are connecting your Arduino to now.
The next step will be after creating that control for the serial ball is going again to make our hub
choose Linux and then drag the close as you can see this is our clothes.
This will float the connection.
Leave it here now right click again go to the make out hub Linux.
And now when you go to work the professor allows you can select digital and write.
This is that digital right.
BLOCK And what you need to do now is create a control on second and third type of fire as you can see
here we have this the all channel right click then create control and the third one is the output value
right click Create control as you can see we have two controls for the second and third tab of the digital
write function or block.
Make sure that they are named the out channel or digital output channel and output value if their title
is anything other than that.
It means that you created control for wrong elements.
Now that you have created control what you need to do is the following in the book the glamour world
which is here right click then go to that structure menu after that go to the wire loop now drag and
drop the wire loop in a way that you create that y loop and why loop is something that repeats what's
inside it until this loop condition is correct.
Now one thing that you need to do is take the serial configuration outside the loop and take the clause
outside the loop.
Now just keep that digitalized function inside the loop and let's make it smaller.
We will talk about that in a minute.
Now what you need to do next is right click on the why loop and click on Add shift just touch once you
click adjust or just start.
You will see two arrows here and you will use them and clarify why in a minute.
Jeff there's just as you can see here we have two arrows for the shifter just now after creating the
shift register.
You need to go to the maker hub again right click here go to the make out hub and then go to the Linux
utilities.
And from here you can choose loop frequency or lubricate now drag this item and drop it inside the loop
again.
What you need to do is right clicking and select boolean and from boolean you need to choose this sine
you need to choose this sign which is the off sign dragged on a little bit here inside the loop now
again go right click here go to the timing and add weight in milliseconds inside the loop because we
need this loop to let's say repeat itself.
But with a delay so that we can monitor that changes that happens inside the loop.
Now once you create that as you can see this is done inside the room and this is the way it function
in milliseconds you need to create a stand for the weight right click here create kind of stand and
here you can add anything I would add 1000 milliseconds which is basically one seconds.
Now this is it.
This is that these are the main components that we all need to add to the block diagram.
Now what you need to do next is go to the front panel.
Let me say this
clay
design.
Let's go to the front panel here and in the front panel right click here choose boolean and then look
for this top button.
This is it.
Now this to button if you double click on that button you will find it in this window as you can see.
This is the button I double clicked here
as you can see it is shown here.
Now the stop button appears and the block diagram won't do what you need to do is drag and drop that's
the button inside the loop
now.
Now follow my steps to connect all of these elements together.
First what you need to do is assign a low blade for this element by going here right click here and
create control OK.
Let me show you this create an indicator here.
This indicator will show us the frequency inherits.
Now take this or item.
Let's move these up here take this all item and that with the item will control our loop.
So it will be responsible for stopping the loop.
Let me maximize this.
OK now delay element should be life here.
We won't do anything with it.
Now we have these elements we need to connect the Linux items together.
What we need to do first is connect the next source from this open function to this Linux source.
And the out of this must be connected to the close.
This is the first step the second step is connecting that error out.
Now the error must be connected through the shift register
as you can see it again.
And we will take that out from here and connect it to the end and the closed function in case of an
error.
Well I think wrong happened.
Now we have our good value is that output channel and loop rate.
We will take the arrow from here and give it to the order function and we will take the stop button
and give it to the order function.
Now if there were or if an error occurred or if we clicked on the stop function both of these or any
of these two will stop the loop and will stop our program which is basically what we want.
This is the main purpose of the error signal from the Linux library.
If there is an error or if we stop thus or free click the stop button it must stop the loop using this
top condition function.
Now we have everything up and ready.
And if you connected everything like that you should have your software ready.
Now what you need to do next is go and let's say out of Angel visual interface.
This is an indicator for the output value
between the dog rocketeers and lets that all period
let's maximize this stop button like that.
That there's that output channel.
Here we can select are doing the channel that we want to use.
And here is our output value for it.
Now we have our program a bunch of data to save everything save on
design.
OK.
Now that we saved everything let's check that
as you can see that shift I just thought is on wild.
OK.
We did forgot to connect this through the channel.
That's if they're just so disconnected.
That's it.
Now there is no errors as you can see but since we don't have an albino connected we will get an error
when we are running the software.
Now our software is up and ready.
What you need to do is save all.
And then next us on we'll explain how you can fund the Linux firmware was it.
Thanks for watching this on.
This is Asha from educational engineering team.