1 00:00:00,720 --> 00:00:07,550 Now let's start with our practical example for lead blank with arduino and lab view. 2 00:00:08,040 --> 00:00:15,540 In order to start with our example we need to love you to design our graphical user interface and set 3 00:00:15,630 --> 00:00:19,680 our control and serial communication frivolities. 4 00:00:19,950 --> 00:00:25,630 So follow my steps as we go in this lesson. 5 00:00:25,630 --> 00:00:31,100 And if you have any question regarding any of these steps you can ask in that you aren't able. 6 00:00:31,230 --> 00:00:34,050 I'll be happy to clarify everything for you. 7 00:00:36,690 --> 00:00:42,570 Now the first step is going to the start menu and search for love you 8 00:00:45,450 --> 00:00:55,360 as you can see and I love you 2019. 9 00:00:55,750 --> 00:01:01,280 As you can see I said I have 30 days remaining in my evaluation copy. 10 00:01:01,300 --> 00:01:02,800 So click evaluate 11 00:01:08,110 --> 00:01:10,180 now create a project 12 00:01:16,110 --> 00:01:25,010 as you can see it will show you some templates could create a blank project then click finish. 13 00:01:25,070 --> 00:01:25,860 Here we are. 14 00:01:26,800 --> 00:01:35,810 Now as you can see since this is a blank project you need to add a new V I find new VII. 15 00:01:35,890 --> 00:01:37,690 Now here is the front panel. 16 00:01:37,780 --> 00:01:40,510 And here is the block diagram panel. 17 00:01:40,540 --> 00:01:50,310 Now what you need to do is go to the block diagram which is the right window here and right click then 18 00:01:50,370 --> 00:02:01,950 select make out a hub from here go to the Linux or Linux library then choose option drag and drop open. 19 00:02:01,970 --> 00:02:15,120 Here now create a control by writing the first two wire steps as you can see here we have this is these 20 00:02:15,120 --> 00:02:15,990 two wild steps. 21 00:02:15,990 --> 00:02:23,510 The first five second one right click here with your mouse and create control. 22 00:02:23,510 --> 00:02:26,200 This is our first control element. 23 00:02:26,300 --> 00:02:36,980 Now you have to create a control for the second layer tip but we will leave this to the last step for 24 00:02:36,980 --> 00:02:37,540 now. 25 00:02:37,580 --> 00:02:43,280 Just create a control for the first way of tape which is serial port to choose the serial ball that 26 00:02:43,280 --> 00:02:46,560 you are connecting your Arduino to now. 27 00:02:46,610 --> 00:02:53,510 The next step will be after creating that control for the serial ball is going again to make our hub 28 00:02:54,410 --> 00:03:01,560 choose Linux and then drag the close as you can see this is our clothes. 29 00:03:01,580 --> 00:03:03,680 This will float the connection. 30 00:03:03,680 --> 00:03:09,790 Leave it here now right click again go to the make out hub Linux. 31 00:03:10,100 --> 00:03:19,210 And now when you go to work the professor allows you can select digital and write. 32 00:03:19,460 --> 00:03:21,800 This is that digital right. 33 00:03:22,010 --> 00:03:30,590 BLOCK And what you need to do now is create a control on second and third type of fire as you can see 34 00:03:30,590 --> 00:03:42,940 here we have this the all channel right click then create control and the third one is the output value 35 00:03:43,060 --> 00:03:53,400 right click Create control as you can see we have two controls for the second and third tab of the digital 36 00:03:53,440 --> 00:03:56,020 write function or block. 37 00:03:56,440 --> 00:04:05,580 Make sure that they are named the out channel or digital output channel and output value if their title 38 00:04:05,580 --> 00:04:07,170 is anything other than that. 39 00:04:07,200 --> 00:04:12,240 It means that you created control for wrong elements. 40 00:04:12,510 --> 00:04:19,800 Now that you have created control what you need to do is the following in the book the glamour world 41 00:04:19,800 --> 00:04:34,310 which is here right click then go to that structure menu after that go to the wire loop now drag and 42 00:04:34,310 --> 00:04:48,570 drop the wire loop in a way that you create that y loop and why loop is something that repeats what's 43 00:04:48,570 --> 00:04:56,410 inside it until this loop condition is correct. 44 00:04:56,420 --> 00:05:06,080 Now one thing that you need to do is take the serial configuration outside the loop and take the clause 45 00:05:06,170 --> 00:05:07,030 outside the loop. 46 00:05:09,090 --> 00:05:15,070 Now just keep that digitalized function inside the loop and let's make it smaller. 47 00:05:15,780 --> 00:05:18,620 We will talk about that in a minute. 48 00:05:18,760 --> 00:05:27,590 Now what you need to do next is right click on the why loop and click on Add shift just touch once you 49 00:05:27,590 --> 00:05:28,960 click adjust or just start. 50 00:05:29,060 --> 00:05:35,670 You will see two arrows here and you will use them and clarify why in a minute. 51 00:05:35,670 --> 00:05:42,300 Jeff there's just as you can see here we have two arrows for the shifter just now after creating the 52 00:05:42,300 --> 00:05:43,730 shift register. 53 00:05:44,150 --> 00:05:52,010 You need to go to the maker hub again right click here go to the make out hub and then go to the Linux 54 00:05:52,700 --> 00:05:54,560 utilities. 55 00:05:54,560 --> 00:06:06,920 And from here you can choose loop frequency or lubricate now drag this item and drop it inside the loop 56 00:06:09,230 --> 00:06:09,940 again. 57 00:06:10,130 --> 00:06:22,790 What you need to do is right clicking and select boolean and from boolean you need to choose this sine 58 00:06:25,960 --> 00:06:35,460 you need to choose this sign which is the off sign dragged on a little bit here inside the loop now 59 00:06:35,640 --> 00:06:43,800 again go right click here go to the timing and add weight in milliseconds inside the loop because we 60 00:06:43,800 --> 00:06:48,360 need this loop to let's say repeat itself. 61 00:06:48,360 --> 00:06:54,120 But with a delay so that we can monitor that changes that happens inside the loop. 62 00:06:54,120 --> 00:07:01,680 Now once you create that as you can see this is done inside the room and this is the way it function 63 00:07:01,830 --> 00:07:09,270 in milliseconds you need to create a stand for the weight right click here create kind of stand and 64 00:07:09,270 --> 00:07:17,560 here you can add anything I would add 1000 milliseconds which is basically one seconds. 65 00:07:17,610 --> 00:07:19,950 Now this is it. 66 00:07:19,950 --> 00:07:26,190 This is that these are the main components that we all need to add to the block diagram. 67 00:07:26,250 --> 00:07:29,700 Now what you need to do next is go to the front panel. 68 00:07:29,820 --> 00:07:30,900 Let me say this 69 00:07:36,030 --> 00:07:36,380 clay 70 00:07:39,530 --> 00:07:41,940 design. 71 00:07:42,080 --> 00:07:51,710 Let's go to the front panel here and in the front panel right click here choose boolean and then look 72 00:07:51,710 --> 00:07:54,830 for this top button. 73 00:07:54,830 --> 00:07:57,240 This is it. 74 00:07:57,370 --> 00:08:02,770 Now this to button if you double click on that button you will find it in this window as you can see. 75 00:08:03,130 --> 00:08:06,130 This is the button I double clicked here 76 00:08:09,450 --> 00:08:13,630 as you can see it is shown here. 77 00:08:13,660 --> 00:08:20,620 Now the stop button appears and the block diagram won't do what you need to do is drag and drop that's 78 00:08:20,620 --> 00:08:23,700 the button inside the loop 79 00:08:27,840 --> 00:08:29,650 now. 80 00:08:29,670 --> 00:08:34,180 Now follow my steps to connect all of these elements together. 81 00:08:34,410 --> 00:08:44,490 First what you need to do is assign a low blade for this element by going here right click here and 82 00:08:44,490 --> 00:08:48,290 create control OK. 83 00:08:48,330 --> 00:08:51,750 Let me show you this create an indicator here. 84 00:08:52,230 --> 00:08:56,550 This indicator will show us the frequency inherits. 85 00:08:56,550 --> 00:08:59,880 Now take this or item. 86 00:09:00,330 --> 00:09:09,320 Let's move these up here take this all item and that with the item will control our loop. 87 00:09:09,330 --> 00:09:11,920 So it will be responsible for stopping the loop. 88 00:09:12,840 --> 00:09:16,010 Let me maximize this. 89 00:09:16,030 --> 00:09:20,830 OK now delay element should be life here. 90 00:09:20,890 --> 00:09:22,670 We won't do anything with it. 91 00:09:22,690 --> 00:09:28,090 Now we have these elements we need to connect the Linux items together. 92 00:09:28,090 --> 00:09:38,550 What we need to do first is connect the next source from this open function to this Linux source. 93 00:09:38,920 --> 00:09:43,360 And the out of this must be connected to the close. 94 00:09:43,400 --> 00:09:48,650 This is the first step the second step is connecting that error out. 95 00:09:48,830 --> 00:09:53,640 Now the error must be connected through the shift register 96 00:09:56,440 --> 00:09:57,520 as you can see it again. 97 00:09:57,580 --> 00:10:04,780 And we will take that out from here and connect it to the end and the closed function in case of an 98 00:10:04,840 --> 00:10:05,310 error. 99 00:10:05,680 --> 00:10:08,150 Well I think wrong happened. 100 00:10:08,500 --> 00:10:14,850 Now we have our good value is that output channel and loop rate. 101 00:10:15,040 --> 00:10:23,130 We will take the arrow from here and give it to the order function and we will take the stop button 102 00:10:23,280 --> 00:10:24,570 and give it to the order function. 103 00:10:24,570 --> 00:10:32,910 Now if there were or if an error occurred or if we clicked on the stop function both of these or any 104 00:10:32,910 --> 00:10:39,080 of these two will stop the loop and will stop our program which is basically what we want. 105 00:10:39,120 --> 00:10:44,280 This is the main purpose of the error signal from the Linux library. 106 00:10:44,490 --> 00:10:51,900 If there is an error or if we stop thus or free click the stop button it must stop the loop using this 107 00:10:51,900 --> 00:10:55,260 top condition function. 108 00:10:55,260 --> 00:10:58,410 Now we have everything up and ready. 109 00:10:58,410 --> 00:11:03,780 And if you connected everything like that you should have your software ready. 110 00:11:03,900 --> 00:11:14,680 Now what you need to do next is go and let's say out of Angel visual interface. 111 00:11:14,800 --> 00:11:17,590 This is an indicator for the output value 112 00:11:21,610 --> 00:11:26,280 between the dog rocketeers and lets that all period 113 00:11:29,650 --> 00:11:36,090 let's maximize this stop button like that. 114 00:11:36,500 --> 00:11:38,920 That there's that output channel. 115 00:11:39,110 --> 00:11:45,090 Here we can select are doing the channel that we want to use. 116 00:11:45,210 --> 00:11:49,320 And here is our output value for it. 117 00:11:49,350 --> 00:11:54,590 Now we have our program a bunch of data to save everything save on 118 00:11:57,260 --> 00:11:57,790 design. 119 00:11:58,980 --> 00:11:59,940 OK. 120 00:12:00,050 --> 00:12:04,190 Now that we saved everything let's check that 121 00:12:07,540 --> 00:12:11,930 as you can see that shift I just thought is on wild. 122 00:12:11,960 --> 00:12:12,310 OK. 123 00:12:12,320 --> 00:12:16,850 We did forgot to connect this through the channel. 124 00:12:17,300 --> 00:12:27,300 That's if they're just so disconnected. 125 00:12:27,570 --> 00:12:28,360 That's it. 126 00:12:28,380 --> 00:12:38,130 Now there is no errors as you can see but since we don't have an albino connected we will get an error 127 00:12:38,130 --> 00:12:40,000 when we are running the software. 128 00:12:40,080 --> 00:12:42,080 Now our software is up and ready. 129 00:12:42,210 --> 00:12:44,540 What you need to do is save all. 130 00:12:44,580 --> 00:12:50,190 And then next us on we'll explain how you can fund the Linux firmware was it. 131 00:12:50,250 --> 00:12:51,390 Thanks for watching this on. 132 00:12:51,390 --> 00:12:53,670 This is Asha from educational engineering team.