1
00:00:05,000 --> 00:00:06,000
Friends today.

2
00:00:06,000 --> 00:00:10,000
I will explain you how to program.

3
00:00:11,000 --> 00:00:12,000
Mario.

4
00:00:13,000 --> 00:00:14,000
National Instruments.

5
00:00:14,000 --> 00:00:22,000
Mario using low level programming without the using of Express VI.

6
00:00:23,000 --> 00:00:28,000
So for that purpose, as you see, I already create a project.

7
00:00:28,000 --> 00:00:31,000
I just delete this.

8
00:00:31,000 --> 00:00:45,000
In this I just create a new VI over here and I just delete this VI, the main VI that is already inside

9
00:00:45,000 --> 00:00:46,000
this.

10
00:00:47,000 --> 00:00:52,000
Just go to the VI over here.

11
00:00:52,000 --> 00:01:02,000
As you see, I just connected port a of my Rio with these eight LEDs.

12
00:01:02,000 --> 00:01:04,000
This black one is my ground.

13
00:01:04,000 --> 00:01:11,000
This is common for all LEDs, and I just use eight LEDs over here.

14
00:01:11,000 --> 00:01:13,000
As you see right now.

15
00:01:13,000 --> 00:01:24,000
I just go to my Rio over here in this, I just select low level programming, select it.

16
00:01:26,000 --> 00:01:29,000
I just need digital input output over here.

17
00:01:29,000 --> 00:01:38,000
I just drag open, then I want to close it in between.

18
00:01:38,000 --> 00:01:44,000
I just need to write the code for particular Led.

19
00:01:45,000 --> 00:01:45,000
Okay.

20
00:01:45,000 --> 00:01:50,000
So right now I just show you for single Led.

21
00:01:50,000 --> 00:01:54,000
After that I just go for multiple LEDs.

22
00:01:54,000 --> 00:01:59,000
Or you can say for the eight LEDs that are available on board.

23
00:02:00,000 --> 00:02:00,000
Okay.

24
00:02:00,000 --> 00:02:01,000
So.

25
00:02:04,000 --> 00:02:11,000
I just made this circuit over zero PCB board over here.

26
00:02:11,000 --> 00:02:17,000
You need to select the channels, create constraint over here.

27
00:02:17,000 --> 00:02:19,000
You need to select the channel.

28
00:02:19,000 --> 00:02:25,000
Right now I'm just using port a zero pin.

29
00:02:26,000 --> 00:02:27,000
It is selected over here.

30
00:02:27,000 --> 00:02:31,000
I just increase the size control Z.

31
00:02:34,000 --> 00:02:38,000
So it is visible to you or you can make it control.

32
00:02:38,000 --> 00:02:41,000
Also, it is up to you change to control.

33
00:02:41,000 --> 00:02:46,000
Let's say over here, as you see it is visible to you also.

34
00:02:47,000 --> 00:02:59,000
So now I just create a while loop for continuous writing the code, create a control over here in this,

35
00:02:59,000 --> 00:03:02,000
you need to just send the value.

36
00:03:03,000 --> 00:03:09,000
Right now I am just sending the value using this boolean button.

37
00:03:10,000 --> 00:03:12,000
Just connect it right now.

38
00:03:12,000 --> 00:03:21,000
As you see it is not connected over here, so you need to check what type of value it requires.

39
00:03:21,000 --> 00:03:26,000
So control H it require a array.

40
00:03:26,000 --> 00:03:27,000
Okay.

41
00:03:27,000 --> 00:03:38,000
So for that purpose I just build, use, build, array, function, connect this.

42
00:03:38,000 --> 00:03:39,000
Let's check.

43
00:03:39,000 --> 00:03:41,000
It is working right now.

44
00:03:44,000 --> 00:03:48,000
So this is up to you how to use this particular case.

45
00:03:48,000 --> 00:03:51,000
Right now, I just save it.

46
00:03:54,000 --> 00:03:56,000
I want to deploy this code.

47
00:03:57,000 --> 00:04:02,000
So over here, I just save it as United Untitled one.

48
00:04:07,000 --> 00:04:07,000
Run it.

49
00:04:08,000 --> 00:04:15,000
When you just run it, it will deploy the code to your Mario in the first time.

50
00:04:15,000 --> 00:04:17,000
It will take some time.

51
00:04:19,000 --> 00:04:23,000
If you are working on continuously after the first time.

52
00:04:26,000 --> 00:04:30,000
It is not taking so much time as you see right now.

53
00:04:30,000 --> 00:04:32,000
Deployment is in progress.

54
00:04:46,000 --> 00:04:46,000
Done.

55
00:04:47,000 --> 00:04:54,000
Okay, so now you just go to your VI over here.

56
00:04:54,000 --> 00:05:05,000
I just turn on my first led that is connected to digital input output 303 It is turned on as you see

57
00:05:05,000 --> 00:05:06,000
right now.

58
00:05:07,000 --> 00:05:11,000
So this is how you can work for single Led.

59
00:05:11,000 --> 00:05:21,000
Now I just show you how to build a program for Mario for multiple LEDs.

60
00:05:21,000 --> 00:05:29,000
Okay, so for that purpose, I just select over here multiple LEDs.

61
00:05:30,000 --> 00:05:34,000
Okay, so in that case, I just select.

62
00:05:39,000 --> 00:05:43,000
Or here, as you see, no option is there.

63
00:05:44,000 --> 00:05:46,000
Allow multiple options.

64
00:05:46,000 --> 00:05:49,000
I just create constant over here.

65
00:05:52,000 --> 00:05:53,000
Let's check what happened.

66
00:05:57,000 --> 00:06:00,000
Still, I just need to delete this one Ctrl b.

67
00:06:01,000 --> 00:06:04,000
Again, I need to create a constant over here.

68
00:06:05,000 --> 00:06:06,000
Select.

69
00:06:07,000 --> 00:06:08,000
Control.

70
00:06:08,000 --> 00:06:12,000
It is selecting only one led over here, as you see.

71
00:06:13,000 --> 00:06:27,000
So to select multiple LEDs, I just go inside the material code, channel names, open a reference to

72
00:06:27,000 --> 00:06:29,000
one or more digital input channel.

73
00:06:29,000 --> 00:06:32,000
You must open the reference before you read or write.

74
00:06:32,000 --> 00:06:36,000
Okay, so let's delete this one.

75
00:06:36,000 --> 00:06:38,000
Control B over here.

76
00:06:46,000 --> 00:06:53,000
So right now I just select multiple.

77
00:06:54,000 --> 00:06:58,000
Let's say I want to go for two cases over here.

78
00:06:58,000 --> 00:07:03,000
In this case, I just select digital four and over here it is Digital three.

79
00:07:03,000 --> 00:07:04,000
Let's say.

80
00:07:09,000 --> 00:07:13,000
And now I just also copy this button.

81
00:07:15,000 --> 00:07:18,000
Drag and connect it to over here.

82
00:07:18,000 --> 00:07:21,000
Control u it will minimize your window.

83
00:07:22,000 --> 00:07:25,000
Now this is my PIN number two.

84
00:07:26,000 --> 00:07:28,000
Let's again save it.

85
00:07:29,000 --> 00:07:32,000
Deploy this code inside the my Rio.

86
00:07:32,000 --> 00:07:37,000
As you see right now, it is writing very fast.

87
00:07:39,000 --> 00:07:51,000
So when the program deployed, as you see both the LEDs turned on and I can control the LEDs.

88
00:07:52,000 --> 00:08:02,000
Okay, So this is how you can generate code for your particular case or your particular application.

89
00:08:02,000 --> 00:08:11,000
Right now, I just stop this in place of this, let's say I want to run this continuously, so I just

90
00:08:11,000 --> 00:08:12,000
delete this one.

91
00:08:13,000 --> 00:08:17,000
In place of this, I just add a shift register over here.

92
00:08:18,000 --> 00:08:24,000
I just want to create a running light case in this also.

93
00:08:26,000 --> 00:08:28,000
So over here, let's say it gave me true.

94
00:08:29,000 --> 00:08:33,000
And over here I just use a nugget function.

95
00:08:33,000 --> 00:08:35,000
So one is off, another is on.

96
00:08:36,000 --> 00:08:39,000
I'm just wanting this type of code.

97
00:08:39,000 --> 00:08:42,000
So from here it is goes to over here.

98
00:08:42,000 --> 00:08:44,000
Control u.

99
00:08:45,000 --> 00:08:46,000
It will minimize the code.

100
00:08:47,000 --> 00:08:56,000
Now I just also put some delay inside it so that it is clear to me I just create control over here.

101
00:08:56,000 --> 00:09:02,000
So according to my delay, led is turned on and off.

102
00:09:02,000 --> 00:09:07,000
So let's say it is 500 delay millisecond delay.

103
00:09:07,000 --> 00:09:10,000
I just save this code and run it.

104
00:09:25,000 --> 00:09:26,000
As you see.

105
00:09:26,000 --> 00:09:28,000
On, off, on, off.

106
00:09:28,000 --> 00:09:32,000
And right now I just want to increase the speed.

107
00:09:35,000 --> 00:09:36,000
It is visible to you.

108
00:09:37,000 --> 00:09:37,000
Okay.

109
00:09:38,000 --> 00:09:40,000
As you see, green and red.

110
00:09:41,000 --> 00:09:49,000
If you want to increase more, as you see now, I just put 200.

111
00:09:51,000 --> 00:09:54,000
Now, I just put two seconds delay.

112
00:09:56,000 --> 00:10:04,000
Okay, so this is how you can create your own code using low level programming without the help of Express

113
00:10:04,000 --> 00:10:05,000
vice.

114
00:10:06,000 --> 00:10:08,000
So this is all about today's lecture.

115
00:10:09,000 --> 00:10:10,000
Thank you.

