1
00:00:05,000 --> 00:00:05,000
Friends.

2
00:00:06,000 --> 00:00:10,000
Today we discuss different types of variables.

3
00:00:11,000 --> 00:00:22,000
Like or you can say different types of data types available in Python and how we can call in live you.

4
00:00:23,000 --> 00:00:27,000
All of these are we can call all of these data types.

5
00:00:28,000 --> 00:00:36,000
And for that purpose, I just create a Python code, as you see, or here, this is my result is going

6
00:00:36,000 --> 00:00:37,000
to zero.

7
00:00:37,000 --> 00:00:41,000
I just define a variable.

8
00:00:41,000 --> 00:00:44,000
X, which has a value.

9
00:00:45,000 --> 00:00:49,000
Indentation result is equal to X and return result.

10
00:00:49,000 --> 00:00:57,000
So this is my code and now I just create a V.

11
00:00:57,000 --> 00:00:58,000
I already create a V.

12
00:01:01,000 --> 00:01:03,000
To clear the path for this.

13
00:01:03,000 --> 00:01:06,000
So I just open it.

14
00:01:08,000 --> 00:01:09,000
As you see over here.

15
00:01:10,000 --> 00:01:13,000
And this I just use.

16
00:01:14,000 --> 00:01:16,000
The strip path.

17
00:01:17,000 --> 00:01:20,000
You can drag and drop from.

18
00:01:21,000 --> 00:01:22,000
Or here.

19
00:01:23,000 --> 00:01:25,000
This is my strip path.

20
00:01:25,000 --> 00:01:26,000
This is my build path.

21
00:01:27,000 --> 00:01:29,000
So build path, strip path.

22
00:01:29,000 --> 00:01:32,000
And over here, this is my current VI path.

23
00:01:33,000 --> 00:01:35,000
You can find out.

24
00:01:36,000 --> 00:01:36,000
This.

25
00:01:39,000 --> 00:01:41,000
Our hair current.

26
00:01:41,000 --> 00:01:43,000
We are so.

27
00:01:44,000 --> 00:01:45,000
Just connected.

28
00:01:45,000 --> 00:01:51,000
And the name over here is the same name that the file.

29
00:01:53,000 --> 00:01:54,000
Here, the python file.

30
00:01:55,000 --> 00:01:58,000
So I just show you over here.

31
00:01:58,000 --> 00:02:04,000
This is my python code and this is my variable we are taught by.

32
00:02:05,000 --> 00:02:08,000
So I just go over here.

33
00:02:08,000 --> 00:02:12,000
So right now, just run it as you see.

34
00:02:12,000 --> 00:02:13,000
It will create a path for me.

35
00:02:13,000 --> 00:02:20,000
See user So documents python integration by code variable.

36
00:02:20,000 --> 00:02:21,000
So it is.

37
00:02:22,000 --> 00:02:23,000
Created.

38
00:02:23,000 --> 00:02:25,000
Then I just added it.

39
00:02:36,000 --> 00:02:39,000
So as you see or hear, this is.

40
00:02:40,000 --> 00:02:42,000
In the name of variable.

41
00:02:42,000 --> 00:02:43,000
I just use data.

42
00:02:45,000 --> 00:02:46,000
Data types.

43
00:02:49,000 --> 00:02:49,000
Let's.

44
00:02:51,000 --> 00:02:51,000
Just.

45
00:02:54,000 --> 00:02:54,000
Save it.

46
00:02:56,000 --> 00:02:57,000
Then close it.

47
00:02:57,000 --> 00:03:00,000
Now I just open.

48
00:03:01,000 --> 00:03:01,000
Another.

49
00:03:01,000 --> 00:03:05,000
By that I already create.

50
00:03:06,000 --> 00:03:11,000
As you see in the name of variable.

51
00:03:13,000 --> 00:03:14,000
Right here.

52
00:03:15,000 --> 00:03:16,000
This is my pie.

53
00:03:17,000 --> 00:03:21,000
So in this VIP, as you see, I just use.

54
00:03:22,000 --> 00:03:25,000
The Python library I just show you.

55
00:03:36,000 --> 00:03:36,000
This is my.

56
00:03:39,000 --> 00:03:40,000
Over here.

57
00:03:40,000 --> 00:03:45,000
This is my python palette, and I just drag and drop one Python session.

58
00:03:45,000 --> 00:03:48,000
Python code and close Python session.

59
00:03:48,000 --> 00:03:50,000
You can also check.

60
00:03:51,000 --> 00:03:52,000
Or here.

61
00:03:54,000 --> 00:03:55,000
I just name it.

62
00:03:57,000 --> 00:04:01,000
And you see, this is my open Python session.

63
00:04:02,000 --> 00:04:04,000
Which will open the code.

64
00:04:04,000 --> 00:04:08,000
And right now I'm using Python 3.9.

65
00:04:08,000 --> 00:04:12,000
And over here, this is my sub vi that I created.

66
00:04:12,000 --> 00:04:14,000
It will build a path.

67
00:04:15,000 --> 00:04:16,000
For my node.

68
00:04:16,000 --> 00:04:19,000
And over here, this is my close.

69
00:04:20,000 --> 00:04:23,000
So as you see or hear.

70
00:04:24,000 --> 00:04:27,000
Let's say I'll just delete this.

71
00:04:31,000 --> 00:04:35,000
And I want to create one data type.

72
00:04:36,000 --> 00:04:41,000
For floating variable that is available in lab view.

73
00:04:42,000 --> 00:04:46,000
So how we can create a floating variable over here.

74
00:04:46,000 --> 00:04:50,000
The name is the variable that is given in the python.

75
00:04:51,000 --> 00:04:52,000
Phi Phi Phi Phi.

76
00:04:53,000 --> 00:04:57,000
So let's say I want to create a.

77
00:05:04,000 --> 00:05:05,000
So just.

78
00:05:06,000 --> 00:05:10,000
Create a constant floating constant as you see or hear.

79
00:05:10,000 --> 00:05:18,000
This is my constant just connected over here and over here.

80
00:05:18,000 --> 00:05:19,000
Just.

81
00:05:20,000 --> 00:05:23,000
I create a numeric control.

82
00:05:26,000 --> 00:05:30,000
Just connect it or here and it will give me the output.

83
00:05:30,000 --> 00:05:32,000
Just create an indicator.

84
00:05:34,000 --> 00:05:36,000
American dictator over here.

85
00:05:39,000 --> 00:05:41,000
And I will get the value.

86
00:05:41,000 --> 00:05:43,000
So this is the output.

87
00:05:49,000 --> 00:05:51,000
And this is the input.

88
00:05:54,000 --> 00:06:01,000
And in the lab view in case of lab view, if you want to create the same function, you just.

89
00:06:02,000 --> 00:06:04,000
Drag and drop this one.

90
00:06:08,000 --> 00:06:13,000
And connect these directly and create a loop over here.

91
00:06:18,000 --> 00:06:18,000
Aid control.

92
00:06:18,000 --> 00:06:20,000
So this is the code.

93
00:06:20,000 --> 00:06:24,000
This code will call this Python function.

94
00:06:24,000 --> 00:06:26,000
And this is like code.

95
00:06:26,000 --> 00:06:28,000
So let's say.

96
00:06:30,000 --> 00:06:31,000
We want to run it.

97
00:06:33,000 --> 00:06:36,000
Or you can also put this function inside this loop.

98
00:06:36,000 --> 00:06:45,000
Also, you not create another loop, but for the demonstration purpose, I just.

99
00:06:46,000 --> 00:06:47,000
Use this.

100
00:06:48,000 --> 00:06:53,000
So let's say over here I put two, one, two and in the input.

101
00:06:55,000 --> 00:07:02,000
Also 2.2 I will get when I hit on run button, I will get 2.2 in both the cases, as you see.

102
00:07:03,000 --> 00:07:10,000
And if I want to run it as you see in real time, I will get the value again or here.

103
00:07:12,000 --> 00:07:14,000
So this is how you can.

104
00:07:16,000 --> 00:07:19,000
Use different types of variable.

105
00:07:20,000 --> 00:07:23,000
Or you can call floating variable.

106
00:07:24,000 --> 00:07:26,000
From Python to left you.

107
00:07:26,000 --> 00:07:31,000
Now I just go to the integer part, so just stop it.

108
00:07:34,000 --> 00:07:35,000
I just delete this.

109
00:07:38,000 --> 00:07:41,000
Now I want to make it integer type.

110
00:07:41,000 --> 00:07:44,000
So for that purpose I just played this function.

111
00:07:45,000 --> 00:07:46,000
Look this function.

112
00:07:47,000 --> 00:07:47,000
Control.

113
00:07:48,000 --> 00:07:52,000
I just drag and drop integer over here.

114
00:07:53,000 --> 00:07:54,000
This is my integer.

115
00:07:54,000 --> 00:07:57,000
Now, the data type is integer type, as you see.

116
00:07:57,000 --> 00:07:58,000
Or here it is.

117
00:07:58,000 --> 00:07:59,000
I 32.

118
00:07:59,000 --> 00:08:08,000
So let's say I just drag and drop one input function and I want to just change it to 32.

119
00:08:09,000 --> 00:08:12,000
So as you see or here, this is a 32.

120
00:08:13,000 --> 00:08:20,000
So I can just connected or here and now I also.

121
00:08:20,000 --> 00:08:26,000
Require an indicator and I also change it to integer type.

122
00:08:27,000 --> 00:08:33,000
So over here, this is my indicator.

123
00:08:33,000 --> 00:08:34,000
Disconnected.

124
00:08:35,000 --> 00:08:36,000
So this is my output.

125
00:08:40,000 --> 00:08:42,000
And this is my input.

126
00:08:43,000 --> 00:08:49,000
If you want to call an integer variable from Python to live view, you can.

127
00:08:50,000 --> 00:08:54,000
Use this program as you see or hear.

128
00:08:55,000 --> 00:09:00,000
If I want to point to or here, it will take only eight.

129
00:09:00,000 --> 00:09:10,000
So this is how you can call integer function or integer variable or integer data type from python to

130
00:09:10,000 --> 00:09:10,000
let you.

131
00:09:11,000 --> 00:09:13,000
Now we move further.

132
00:09:14,000 --> 00:09:19,000
Right now we discuss about numeric data that is floating and integer.

133
00:09:19,000 --> 00:09:24,000
Now I just go to another function that is string control.

134
00:09:25,000 --> 00:09:30,000
If you want to go for string control, I just.

135
00:09:30,000 --> 00:09:33,000
Put a string constant over here.

136
00:09:33,000 --> 00:09:35,000
So over here, this is my string constant.

137
00:09:36,000 --> 00:09:38,000
Just connect connected over here.

138
00:09:38,000 --> 00:09:42,000
And I want to just drag and drop string control.

139
00:09:43,000 --> 00:09:44,000
This is my input.

140
00:09:46,000 --> 00:09:48,000
String and just connect this.

141
00:09:50,000 --> 00:09:53,000
And over here I got the return value.

142
00:09:54,000 --> 00:09:55,000
That is my output.

143
00:09:56,000 --> 00:10:00,000
So over here, this is my output string.

144
00:10:02,000 --> 00:10:06,000
As you see, just connect it.

145
00:10:06,000 --> 00:10:09,000
Now, I hit on one button, as you see.

146
00:10:09,000 --> 00:10:10,000
Say hello.

147
00:10:11,000 --> 00:10:16,000
When I put hello inside this I got.

148
00:10:16,000 --> 00:10:16,000
Hello.

149
00:10:16,000 --> 00:10:17,000
Or here.

150
00:10:17,000 --> 00:10:18,000
Hello, Sally.

151
00:10:19,000 --> 00:10:26,000
So now I got this function using the string variable.

152
00:10:26,000 --> 00:10:31,000
So this is how you can call string function or.

153
00:10:32,000 --> 00:10:35,000
String variable from python to lab view.

154
00:10:35,000 --> 00:10:39,000
Now we move further to another type.

155
00:10:40,000 --> 00:10:41,000
Just stop it.

156
00:10:43,000 --> 00:10:44,000
Delete this.

157
00:10:45,000 --> 00:10:46,000
Now we discuss.

158
00:10:49,000 --> 00:10:59,000
So for that purpose, I just go to function or here I just use a constant, as you see.

159
00:10:59,000 --> 00:11:04,000
And now I just create a boolean control over here.

160
00:11:04,000 --> 00:11:06,000
You can use any one of these.

161
00:11:07,000 --> 00:11:09,000
Let's say I just use this push button.

162
00:11:11,000 --> 00:11:20,000
Bolan and I just connect this over here and I just use an indicator ground led for that purpose.

163
00:11:21,000 --> 00:11:22,000
Just connect this.

164
00:11:25,000 --> 00:11:34,000
And now when I hit on run button, as you see, or here it is in the low state or in the false state.

165
00:11:34,000 --> 00:11:37,000
So will it is also in all state.

166
00:11:37,000 --> 00:11:38,000
This is my output.

167
00:11:38,000 --> 00:11:42,000
This is my input output input output.

168
00:11:42,000 --> 00:11:43,000
Input, output input.

169
00:11:43,000 --> 00:11:48,000
Okay, so this is how you can use this.

170
00:11:49,000 --> 00:11:50,000
Another type of variable.

171
00:11:52,000 --> 00:11:52,000
Now.

172
00:11:58,000 --> 00:12:01,000
So now if you want to.

173
00:12:02,000 --> 00:12:04,000
Work out with another data type.

174
00:12:04,000 --> 00:12:06,000
So I just gave this.

175
00:12:07,000 --> 00:12:09,000
Now I work with.

176
00:12:11,000 --> 00:12:12,000
Flawed variable.

177
00:12:17,000 --> 00:12:18,000
After that integer.

178
00:12:22,000 --> 00:12:23,000
Then, Bolan.

179
00:12:25,000 --> 00:12:26,000
Then string.

180
00:12:28,000 --> 00:12:31,000
Now I want to work with Eric.

181
00:12:31,000 --> 00:12:32,000
Let's see.

182
00:12:33,000 --> 00:12:39,000
Edit edit can be off floating type, integer type, boolean type and string type.

183
00:12:39,000 --> 00:12:41,000
So let's go with.

184
00:12:43,000 --> 00:12:43,000
Eddie.

185
00:12:44,000 --> 00:12:47,000
So over here, I just drag and drop one blank.

186
00:12:47,000 --> 00:12:54,000
Eddie, inside this, I just put or I want to make it.

187
00:12:55,000 --> 00:12:56,000
Thought any.

188
00:12:57,000 --> 00:12:58,000
Just.

189
00:12:59,000 --> 00:13:00,000
Abbate.

190
00:13:01,000 --> 00:13:03,000
Make it constant.

191
00:13:04,000 --> 00:13:05,000
So as you see.

192
00:13:05,000 --> 00:13:11,000
Just connect this to the upper branch as you see over here.

193
00:13:13,000 --> 00:13:14,000
How.

194
00:13:20,000 --> 00:13:23,000
So I want to just move this function.

195
00:13:30,000 --> 00:13:30,000
Our hair.

196
00:13:32,000 --> 00:13:33,000
Clean up this fire.

197
00:13:38,000 --> 00:13:38,000
Now.

198
00:13:38,000 --> 00:13:41,000
This is my input, Eddie.

199
00:13:44,000 --> 00:13:46,000
And I just.

200
00:13:47,000 --> 00:13:48,000
Copy it.

201
00:13:48,000 --> 00:13:52,000
And I want to just make it output any.

202
00:13:58,000 --> 00:14:04,000
And just change to indicator as you see over here.

203
00:14:04,000 --> 00:14:05,000
Connect this.

204
00:14:06,000 --> 00:14:11,000
So over here, let's say this is one dimensional, Larry.

205
00:14:12,000 --> 00:14:15,000
It don't unbutton when I put some value inside it.

206
00:14:16,000 --> 00:14:19,000
I will get the value in real time.

207
00:14:20,000 --> 00:14:21,000
So this is my.

208
00:14:23,000 --> 00:14:28,000
One dimensional Eddie that is floating type, as you see.

209
00:14:30,000 --> 00:14:33,000
So now I want to work with two dimensional.

210
00:14:33,000 --> 00:14:40,000
So for that purpose you need not do make changes.

211
00:14:40,000 --> 00:14:44,000
So just drag and drop over here.

212
00:14:44,000 --> 00:14:48,000
Just increase the indexing when you increase the indexing.

213
00:14:48,000 --> 00:14:52,000
As you see, I got two dimensional area over here.

214
00:14:52,000 --> 00:14:54,000
If you want to work with.

215
00:14:54,000 --> 00:14:59,000
So this is my two dimensional area over here.

216
00:14:59,000 --> 00:15:05,000
So let's say I put something inside this and when I hit on one button, I got the value.

217
00:15:05,000 --> 00:15:08,000
So over here, this is.

218
00:15:09,000 --> 00:15:10,000
Just stop it.

219
00:15:10,000 --> 00:15:11,000
I want to just.

220
00:15:12,000 --> 00:15:13,000
Increase the size.

221
00:15:14,000 --> 00:15:17,000
Because right now in this.

222
00:15:17,000 --> 00:15:19,000
Five elements are there.

223
00:15:19,000 --> 00:15:24,000
So as you see, when I hit on the button over here, I say it is 5.5.

224
00:15:25,000 --> 00:15:26,000
I got the value.

225
00:15:26,000 --> 00:15:28,000
So this is how you can work with.

226
00:15:29,000 --> 00:15:32,000
It is an LED view.

227
00:15:32,000 --> 00:15:35,000
Or you can say we are calling.

228
00:15:36,000 --> 00:15:37,000
By Concord.

229
00:15:38,000 --> 00:15:41,000
I variable code in live view.

230
00:15:42,000 --> 00:15:48,000
Right now I work with a flawed integer boolean string array.

231
00:15:48,000 --> 00:15:56,000
If you want to work with cluster also the same way we can work out, just delete this.

232
00:15:58,000 --> 00:15:59,000
This.

233
00:16:02,000 --> 00:16:07,000
So mainly in basics of live view and basics of Python.

234
00:16:07,000 --> 00:16:10,000
We generally use these variables.

235
00:16:10,000 --> 00:16:19,000
So right now I just go with another variable that is my cluster, which is which contain different types

236
00:16:19,000 --> 00:16:24,000
of data array contains same type of data cluster will contain different types of data.

237
00:16:24,000 --> 00:16:26,000
Let's say over here, this is my.

238
00:16:28,000 --> 00:16:29,000
Plus one is nomadic.

239
00:16:29,000 --> 00:16:35,000
Second one is bullion, and third one is my string control.

240
00:16:35,000 --> 00:16:41,000
Or here I just put inside this range or downsizing size to fit.

241
00:16:49,000 --> 00:16:51,000
The control panel.

242
00:16:52,000 --> 00:16:54,000
You can change your hair.

243
00:16:58,000 --> 00:17:01,000
As you see right now, this is my input cluster.

244
00:17:01,000 --> 00:17:03,000
I just make it input.

245
00:17:07,000 --> 00:17:09,000
This is my input cluster.

246
00:17:09,000 --> 00:17:10,000
I just copy this.

247
00:17:13,000 --> 00:17:14,000
This is my output cluster.

248
00:17:18,000 --> 00:17:20,000
And just make it.

249
00:17:21,000 --> 00:17:22,000
Get the type.

250
00:17:24,000 --> 00:17:26,000
Change the indicator, as you see.

251
00:17:26,000 --> 00:17:29,000
And I also copied this.

252
00:17:31,000 --> 00:17:35,000
And I just want to change to constant.

253
00:17:38,000 --> 00:17:39,000
You see.

254
00:17:39,000 --> 00:17:42,000
Now you just connect this or here.

255
00:17:42,000 --> 00:17:45,000
This is my input cluster connect.

256
00:17:47,000 --> 00:17:47,000
Or here.

257
00:17:47,000 --> 00:17:52,000
This is my cluster like this.

258
00:17:52,000 --> 00:18:01,000
And I hit on red button, as you see now, I put some value inside it to point to on string name is

259
00:18:01,000 --> 00:18:04,000
Let's see Celine I got.

260
00:18:05,000 --> 00:18:13,000
So these are the major types or major different types of variables using Python and live view and how

261
00:18:13,000 --> 00:18:18,000
we can call these functions from Python to net view.

262
00:18:18,000 --> 00:18:22,000
So now I just want to change some.

263
00:18:24,000 --> 00:18:26,000
Inside this VA.

264
00:18:27,000 --> 00:18:30,000
Let's say I want to connect this or here.

265
00:18:30,000 --> 00:18:32,000
What is the effect of this?

266
00:18:32,000 --> 00:18:33,000
So I don't run button.

267
00:18:34,000 --> 00:18:39,000
As you see, you can you can connect over here or you can connect over here.

268
00:18:39,000 --> 00:18:42,000
It is the same way it will give the output.

269
00:18:42,000 --> 00:18:50,000
So this is how you can work with Python integration with LED view for different types of different data

270
00:18:50,000 --> 00:18:51,000
types.

271
00:18:51,000 --> 00:18:53,000
Or you can say different variables.

272
00:18:53,000 --> 00:18:54,000
Thank you.

