1
00:00:03,000 --> 00:00:06,000
Hello, friends, today to discuss about.

2
00:00:08,000 --> 00:00:15,000
Structures, or you can say loops and labview basically in this.

3
00:00:17,000 --> 00:00:23,000
First, I look this, so over here is my fault.

4
00:00:24,000 --> 00:00:33,000
So it is similar to see language over here, we can say for loop is a finite loop.

5
00:00:33,000 --> 00:00:35,000
This is indexing.

6
00:00:36,000 --> 00:00:40,000
I mean, mainly it will start from zero loop lubrication.

7
00:00:40,000 --> 00:00:44,000
It will start from zero and goes up to and minus one.

8
00:00:45,000 --> 00:00:47,000
This is going loop.

9
00:00:47,000 --> 00:00:48,000
Come over here.

10
00:00:49,000 --> 00:00:56,000
You have to set the value in which your loop runs.

11
00:00:56,000 --> 00:00:58,000
Basically, it is called finite.

12
00:00:59,000 --> 00:01:02,000
This is the structural fight for loop and.

13
00:01:04,000 --> 00:01:13,000
In this poor loop, there is some important points, like if you want to convert this fall into why

14
00:01:13,000 --> 00:01:20,000
loop means if we said the value of NT is the value of any is very large.

15
00:01:20,000 --> 00:01:23,000
And if we want to stop this loop in between.

16
00:01:24,000 --> 00:01:31,000
So for that purpose, I just click on the edge, right click then add condition.

17
00:01:32,000 --> 00:01:38,000
This will create a terminal so that you can stop this for loop in between.

18
00:01:39,000 --> 00:01:43,000
Also so I take the example of this also.

19
00:01:43,000 --> 00:01:45,000
So first I take.

20
00:01:47,000 --> 00:01:57,000
Default for loop, this is the default for loop, and in this case, I just take a listen and and this

21
00:01:58,000 --> 00:01:59,000
I want to add.

22
00:02:01,000 --> 00:02:13,000
No value with lubrication value, and in this case, I want total 10 value, so in this program, my

23
00:02:13,000 --> 00:02:15,000
loop runs 10 times.

24
00:02:15,000 --> 00:02:19,000
Basically, it will start from zero and goes up to N minus one.

25
00:02:19,000 --> 00:02:22,000
So my loop goes from zero.

26
00:02:22,000 --> 00:02:25,000
One, two, three, four, five, six, seven, eight, nine.

27
00:02:25,000 --> 00:02:31,000
And then it will stop and it will generate the value.

28
00:02:31,000 --> 00:02:37,000
And when I connect this over here, it will create total.

29
00:02:38,000 --> 00:02:49,000
It is photo index, and over here it will create headache means it has 10 values in this and these values

30
00:02:49,000 --> 00:02:49,000
are.

31
00:02:50,000 --> 00:02:54,000
Like when I hit them like this.

32
00:02:55,000 --> 00:03:02,000
So as you see or hear, they say this part is the problem created by a random number.

33
00:03:03,000 --> 00:03:12,000
So over here is my lookout, because in this case, the value of random number is in between zero to

34
00:03:12,000 --> 00:03:12,000
one.

35
00:03:12,000 --> 00:03:16,000
And here is the low count, which goes from zero to nine.

36
00:03:16,000 --> 00:03:19,000
So over here, zero, one, two, three, as you see.

37
00:03:19,000 --> 00:03:23,000
And over here, I go to the values of this rule.

38
00:03:23,000 --> 00:03:28,000
So in the default mode, the auto indexing is on.

39
00:03:28,000 --> 00:03:37,000
In the case of for loop, if you want to change it to last value or concatenate it to your account conditional.

40
00:03:38,000 --> 00:03:42,000
These are the other options available, but they fold.

41
00:03:42,000 --> 00:03:45,000
It is auto indexing in case of volume.

42
00:03:45,000 --> 00:03:51,000
So this is the case of for loop and using this you can create an eddy made basically one theory.

43
00:03:52,000 --> 00:03:59,000
So if you want to create a tool for that purpose, I just created another for loop over here.

44
00:04:00,000 --> 00:04:05,000
This is called nested loop means loop under loop.

45
00:04:05,000 --> 00:04:11,000
So I also create a content and put the value in.

46
00:04:12,000 --> 00:04:18,000
And when I connect this to the edge of this, it will give me up to the attic.

47
00:04:18,000 --> 00:04:20,000
As you see over here.

48
00:04:20,000 --> 00:04:22,000
This is my scalar value over here.

49
00:04:23,000 --> 00:04:27,000
This is my one day and over here is my buddy.

50
00:04:27,000 --> 00:04:29,000
So for results.

51
00:04:32,000 --> 00:04:33,000
Like.

52
00:04:35,000 --> 00:04:36,000
Select this.

53
00:04:38,000 --> 00:04:41,000
I put over here and this.

54
00:04:43,000 --> 00:04:48,000
Well, give me 10 then values.

55
00:04:49,000 --> 00:04:53,000
So when I hit on one button, it will generate values.

56
00:04:54,000 --> 00:04:57,000
OK, so if you want to check.

57
00:04:59,000 --> 00:05:00,000
Banuelos.

58
00:05:02,000 --> 00:05:04,000
Tendrils and then columns on the.

59
00:05:07,000 --> 00:05:07,000
As you see.

60
00:05:13,000 --> 00:05:22,000
First, I encourage this one time, one, two, three, four, five, six, seven, eight, nine, 10.

61
00:05:22,000 --> 00:05:25,000
OK, and when I further increase this.

62
00:05:27,000 --> 00:05:27,000
There is a blank.

63
00:05:28,000 --> 00:05:37,000
OK, so this is the case of nested loop and for loop, so basically an outer loop current one time,

64
00:05:37,000 --> 00:05:40,000
one time and inner loop current 10 times.

65
00:05:41,000 --> 00:05:42,000
Basically, this is the concept in this.

66
00:05:42,000 --> 00:05:44,000
So this is the case or for loop.

67
00:05:47,000 --> 00:05:49,000
Then we go to our next picture.

68
00:05:51,000 --> 00:05:57,000
Which is why you basically why loop is a finite, infinite loop.

69
00:05:57,000 --> 00:06:00,000
It is similar to C language over here.

70
00:06:00,000 --> 00:06:03,000
This is my loop iteration and this is my stop button.

71
00:06:04,000 --> 00:06:08,000
This loop runs in find a finite time fill.

72
00:06:09,000 --> 00:06:16,000
When I stop this, so according to this, I create again an.

73
00:06:18,000 --> 00:06:23,000
And in this case, when I connect this or here, this is a.

74
00:06:25,000 --> 00:06:28,000
Let them no, I put no.

75
00:06:30,000 --> 00:06:31,000
And then numerics.

76
00:06:34,000 --> 00:06:39,000
And when I create control and it will generate.

77
00:06:40,000 --> 00:06:41,000
Values.

78
00:06:43,000 --> 00:06:51,000
In the case of Bilal, it is the folded, lost value, as you see, you can convert it to index mode

79
00:06:51,000 --> 00:06:53,000
also like this.

80
00:06:53,000 --> 00:06:57,000
So in this case or here, we have any evidence.

81
00:06:58,000 --> 00:07:07,000
So when I hit on that button, it create so many values and when I stop it, so there are so many values

82
00:07:07,000 --> 00:07:08,000
in the loop.

83
00:07:09,000 --> 00:07:21,000
So to stop this, I just create a wait stop button, not stop button, wait for one thousand milliseconds

84
00:07:22,000 --> 00:07:31,000
so that when I hit on again one button in this case when I hit one stop, in this case it will generate

85
00:07:31,000 --> 00:07:35,000
only few values like four one, two, three, four, five.

86
00:07:35,000 --> 00:07:38,000
After five seconds, I create a stop.

87
00:07:39,000 --> 00:07:41,000
So this is the case of loop.

88
00:07:42,000 --> 00:07:51,000
You can also convert this while loop into four loop as you see out here when I delivered this right

89
00:07:51,000 --> 00:07:55,000
now I want to create this while loop into a stop for loop.

90
00:07:56,000 --> 00:08:05,000
So for that purpose, I just take a comparison when this value and this indexing value, it is equal

91
00:08:05,000 --> 00:08:09,000
to ten as in for a loop.

92
00:08:10,000 --> 00:08:16,000
So it will give me right now, it will give me total ten values.

93
00:08:16,000 --> 00:08:18,000
So when I hit on the bottom, as you see.

94
00:08:21,000 --> 00:08:30,000
It there is a basic difference between loop and loop in this case I put in so that when it is equal

95
00:08:30,000 --> 00:08:37,000
to 10 or 20 days of gold or nine in this case, it will create a little function and it is stop right

96
00:08:37,000 --> 00:08:38,000
now.

97
00:08:39,000 --> 00:08:40,000
So this is the case.

98
00:08:41,000 --> 00:08:47,000
There is a basic difference between for loop and why loop for loop is finite loop while loop is infinite

99
00:08:47,000 --> 00:08:49,000
loop and loop.

100
00:08:49,000 --> 00:08:57,000
When you run your program, it will by loop run at least one time.

101
00:08:58,000 --> 00:09:05,000
It will run at least one time, but this is not the case in full loop, so you have to remember this.

102
00:09:06,000 --> 00:09:11,000
So this is the case how you can work your way loop into for loop.

103
00:09:11,000 --> 00:09:13,000
So this is the structure of a loop.

104
00:09:13,000 --> 00:09:19,000
So next structure in this structure we have structure.

105
00:09:21,000 --> 00:09:24,000
Structure is basically in this.

106
00:09:24,000 --> 00:09:30,000
You have to select the cases default and the default is there are only two cases, true and false,

107
00:09:30,000 --> 00:09:41,000
like when I create a push button or there and when I connect this to our case structure and I want to

108
00:09:41,000 --> 00:09:45,000
generate five-fold and zero hold in this case.

109
00:09:45,000 --> 00:09:54,000
So I put glue in this case, I put 15 and in the false case I just put zero.

110
00:09:55,000 --> 00:10:01,000
So it will give me these two values according to my selection.

111
00:10:02,000 --> 00:10:04,000
So over here, this is the indicator.

112
00:10:04,000 --> 00:10:09,000
So when I don't continue to run, my problem is on false.

113
00:10:09,000 --> 00:10:12,000
It gives me zero and I don't own it.

114
00:10:12,000 --> 00:10:13,000
Give me 15.

115
00:10:14,000 --> 00:10:18,000
So using this, you can use your case, the in the case structure.

116
00:10:18,000 --> 00:10:20,000
You can select anyone.

117
00:10:21,000 --> 00:10:24,000
You can connect your bulan to the structure.

118
00:10:24,000 --> 00:10:28,000
You can connect your building by not building.

119
00:10:28,000 --> 00:10:35,000
You can connect to an integer control to your key structure, because in this case, those cases are

120
00:10:35,000 --> 00:10:39,000
like one, two, three, four, five, six, not like one window and one point two.

121
00:10:40,000 --> 00:10:48,000
OK, so again, there is a case of like how you can select the case structure.

122
00:10:50,000 --> 00:10:53,000
And over here, I selected control.

123
00:10:55,000 --> 00:10:57,000
And I want to change this.

124
00:10:58,000 --> 00:11:06,000
Integer, and when I connect this to this, the cases are zero and one, this is the default case,

125
00:11:06,000 --> 00:11:14,000
you have to make our default case in the case structure, because if the case, which is not present

126
00:11:14,000 --> 00:11:22,000
in the case structure is executed, like in this case when I put the numeric value to the case of zero

127
00:11:22,000 --> 00:11:23,000
is executed.

128
00:11:24,000 --> 00:11:36,000
So I here, like, I put a constant I just connect this to this in this case, zero is going to be going

129
00:11:36,000 --> 00:11:37,000
outside.

130
00:11:38,000 --> 00:11:41,000
In this case, one is going outside.

131
00:11:42,000 --> 00:11:43,000
So creating data.

132
00:11:43,000 --> 00:11:53,000
So when I put two or three or four in this, which is not the part of case, it will be the default

133
00:11:53,000 --> 00:11:53,000
case.

134
00:11:53,000 --> 00:11:55,000
In this case, my values zero.

135
00:11:55,000 --> 00:11:58,000
And when I put one, it will give me one.

136
00:11:58,000 --> 00:12:02,000
So this is the case of case structure with the numeric case.

137
00:12:02,000 --> 00:12:10,000
And you have when you want to add some case after this, like this case to over here, like I create

138
00:12:11,000 --> 00:12:17,000
a and put a value to and another case after this.

139
00:12:17,000 --> 00:12:20,000
And in this case, the value is three.

140
00:12:21,000 --> 00:12:23,000
So when I continue to run it.

141
00:12:23,000 --> 00:12:25,000
So one, two, three.

142
00:12:25,000 --> 00:12:34,000
According to this, I go to the value and when I again increase so the fourth case is not available,

143
00:12:34,000 --> 00:12:36,000
so it will give me the full case.

144
00:12:36,000 --> 00:12:41,000
OK, so this is the case of case structure with numeric part.

145
00:12:42,000 --> 00:12:44,000
Then we go to stringybark.

146
00:12:44,000 --> 00:12:50,000
So again, I take a case structure and in this case I take us to incontrol.

147
00:12:51,000 --> 00:12:55,000
So this is my strong control and when I connect this to my string.

148
00:12:56,000 --> 00:12:58,000
So over here, like I.

149
00:12:59,000 --> 00:13:02,000
But the name A.

150
00:13:04,000 --> 00:13:12,000
Then the characters would be the same if it is capital X, would be capital industry B, then I would

151
00:13:12,000 --> 00:13:15,000
guess after X would be.

152
00:13:17,000 --> 00:13:21,000
Like, see, so I put some values.

153
00:13:22,000 --> 00:13:27,000
No, to control like that, in the case of.

154
00:13:29,000 --> 00:13:29,000
S..

155
00:13:31,000 --> 00:13:35,000
In the case of me, like I have a bad.

156
00:13:38,000 --> 00:13:43,000
Just connect this, and in the case of a it is an apple.

157
00:13:48,000 --> 00:13:57,000
So I just connect this and over here, this is my indicator, and when I continuously run this and the

158
00:13:57,000 --> 00:13:59,000
default guess, the value is nothing.

159
00:13:59,000 --> 00:14:02,000
So default is a for Apple, it is gone.

160
00:14:02,000 --> 00:14:06,000
Then when I put in this, it will give me back.

161
00:14:06,000 --> 00:14:10,000
And when I put C in this, it will give me care.

162
00:14:10,000 --> 00:14:13,000
And when I put B in this the default cases there.

163
00:14:13,000 --> 00:14:14,000
Apple.

164
00:14:14,000 --> 00:14:20,000
OK, so this is how you can use your case picture in LabView.

165
00:14:20,000 --> 00:14:22,000
It is very easy.

166
00:14:23,000 --> 00:14:23,000
So.

167
00:14:25,000 --> 00:14:26,000
Our next Dr..

168
00:14:27,000 --> 00:14:37,000
Is flex segments basically flat segments is a little bit similar to our case structure in this case.

169
00:14:37,000 --> 00:14:44,000
Also, there are cases, but in flagstick the cases are executed in a manner like in a process.

170
00:14:44,000 --> 00:14:49,000
For example, first I put a dialog box in this.

171
00:14:50,000 --> 00:14:54,000
So over here, this is a one button dialogue.

172
00:14:55,000 --> 00:14:57,000
So messages like start.

173
00:14:58,000 --> 00:15:03,000
Start the process after this, I guess, in this.

174
00:15:05,000 --> 00:15:11,000
So when this one is executed after this, this one in.

175
00:15:13,000 --> 00:15:19,000
This one is executed, so over here process.

176
00:15:21,000 --> 00:15:25,000
And at the last leg, I have to stop the process.

177
00:15:27,000 --> 00:15:32,000
So one by one, it is executing in the case of case structure, we have to select the case.

178
00:15:32,000 --> 00:15:35,000
In this case, this is executed one by one.

179
00:15:36,000 --> 00:15:39,000
So over here, this is my stop.

180
00:15:41,000 --> 00:15:43,000
OK, so this is the case.

181
00:15:43,000 --> 00:15:53,000
And when I hit on Ron Button, as you see, start the process when I hit on this, OK, next Nilo button

182
00:15:53,000 --> 00:15:54,000
process.

183
00:15:55,000 --> 00:15:56,000
Next dialogue button stop.

184
00:15:56,000 --> 00:16:00,000
So it will execute like this first.

185
00:16:00,000 --> 00:16:05,000
This will execute the portion of program placed in this part.

186
00:16:05,000 --> 00:16:10,000
It will execute first, then it will execute, then it will execute.

187
00:16:10,000 --> 00:16:11,000
So this is a process.

188
00:16:11,000 --> 00:16:13,000
So this is the case of sequence.

189
00:16:14,000 --> 00:16:20,000
And there is another structure, steg sequence you can convert.

190
00:16:20,000 --> 00:16:26,000
This sequence is similar to plan sequence, but there is a difference in this flat sequence and there

191
00:16:26,000 --> 00:16:29,000
is a space requirement is more.

192
00:16:29,000 --> 00:16:37,000
But in sequence there is when you replace it with sequence over here, there are cases out of there

193
00:16:37,000 --> 00:16:41,000
like 012 and these are executed in a minute.

194
00:16:41,000 --> 00:16:44,000
So first zero execute, then one, then two.

195
00:16:44,000 --> 00:16:50,000
OK, so this is the case of Steg, the sequence and you can use in your process.

196
00:16:51,000 --> 00:17:02,000
So after this, we go to our structures again and we have a formula like we have a formula A. This is

197
00:17:02,000 --> 00:17:05,000
similar to your C coding.

198
00:17:05,000 --> 00:17:09,000
You can check using help.

199
00:17:09,000 --> 00:17:13,000
You can perform these formulas using this.

200
00:17:14,000 --> 00:17:19,000
So, for example, I want to I have I input a.

201
00:17:21,000 --> 00:17:22,000
Which is equal to.

202
00:17:24,000 --> 00:17:38,000
Be able to see like this in this, my input is like capitally and we're here, I want to add input.

203
00:17:38,000 --> 00:17:47,000
My input is be another input is C and another output is.

204
00:17:50,000 --> 00:17:53,000
So you have to create control over their.

205
00:17:56,000 --> 00:18:02,000
And we're in it, so right now it is Broken Arrow because the air error.

206
00:18:03,000 --> 00:18:05,000
We have to put semicolon over here right now.

207
00:18:05,000 --> 00:18:08,000
It is OK to control you because minimize space.

208
00:18:08,000 --> 00:18:15,000
So when I put on values like four seventy five to seven, you make thirty five.

209
00:18:15,000 --> 00:18:22,000
OK, so like this you can create any expression, any program in this area and according to the program,

210
00:18:23,000 --> 00:18:26,000
it will execute your problem.

211
00:18:26,000 --> 00:18:31,000
OK, so this is the case of formula not not for loop.

212
00:18:32,000 --> 00:18:41,000
Next, if you want to disable or enable any part of your program, for example, you have a program.

213
00:18:45,000 --> 00:18:46,000
Like this.

214
00:18:48,000 --> 00:18:52,000
I have multiple functions in this.

215
00:18:55,000 --> 00:18:56,000
And when I connect this.

216
00:18:58,000 --> 00:19:03,000
Over here, this is my control, this is my import, this is where put.

217
00:19:10,000 --> 00:19:11,000
This is my.

218
00:19:15,000 --> 00:19:29,000
So this is my program and I want to disable this plus part in this, so when I use a disabled structure

219
00:19:29,000 --> 00:19:35,000
like this and this, it will disabled and it will pass the same value as you see.

220
00:19:37,000 --> 00:19:45,000
So when I put value in this like one and over here two, so it will give me one and two.

221
00:19:45,000 --> 00:19:49,000
Give me one plus two, three, three over here, three.

222
00:19:50,000 --> 00:19:53,000
And over here it is one.

223
00:19:53,000 --> 00:19:55,000
And over here it is two.

224
00:19:55,000 --> 00:19:59,000
So it is two, three by two days, one by five.

225
00:19:59,000 --> 00:20:00,000
So check it.

226
00:20:01,000 --> 00:20:02,000
There is.

227
00:20:03,000 --> 00:20:06,000
Not defined because this is.

228
00:20:08,000 --> 00:20:08,000
No.

229
00:20:08,000 --> 00:20:11,000
Over here we have we have no connection.

230
00:20:11,000 --> 00:20:13,000
So when I enable this.

231
00:20:16,000 --> 00:20:25,000
And in the case of evil like this, as you see, we have zero point five and in the case of table we

232
00:20:25,000 --> 00:20:25,000
have.

233
00:20:28,000 --> 00:20:36,000
OK, so you have to disable this if you want to disable any part, you can use this.

234
00:20:37,000 --> 00:20:39,000
And in the case of.

235
00:20:41,000 --> 00:20:42,000
And we.

236
00:20:43,000 --> 00:20:44,000
Disable this.

237
00:20:45,000 --> 00:20:49,000
OK, so if you want to disable any part of your program, you can use this.

238
00:20:49,000 --> 00:20:54,000
So this is how you can use structures in your programming.

239
00:20:55,000 --> 00:20:58,000
So in the structures, we have some decoration.

240
00:20:58,000 --> 00:21:04,000
But also, like, if you want to label something, if you want to frame something or if you want to

241
00:21:04,000 --> 00:21:07,000
integrate something you can use, these are all OK.

242
00:21:07,000 --> 00:21:12,000
And in this we have feedback node, some local variable and global variable.

243
00:21:12,000 --> 00:21:20,000
If you want to put some value in a V from one place to another place, you can use local variable if

244
00:21:20,000 --> 00:21:28,000
you want to place the value from one value to another via what you want to transfer value from one way

245
00:21:28,000 --> 00:21:29,000
to another.

246
00:21:29,000 --> 00:21:31,000
You can use global variable.

247
00:21:31,000 --> 00:21:33,000
So this is all about.

248
00:21:34,000 --> 00:21:37,000
Stojcevski or Loop's Elavil, thank you.

