1
00:00:05,000 --> 00:00:06,000
Hello, friends.

2
00:00:06,000 --> 00:00:12,000
Today I will tell you how to convert a given temperature.

3
00:00:13,000 --> 00:00:13,000
So.

4
00:00:14,000 --> 00:00:15,000
Degree Fahrenheit.

5
00:00:16,000 --> 00:00:17,000
Degree Kelvin.

6
00:00:17,000 --> 00:00:20,000
Degree Ranking and degree Celsius.

7
00:00:20,000 --> 00:00:27,000
Basically, this video is for conversion of temperature from one form to another form.

8
00:00:27,000 --> 00:00:35,000
For that purpose, I just first convert a degree Celsius temperature to.

9
00:00:36,000 --> 00:00:37,000
Degree Fahrenheit.

10
00:00:38,000 --> 00:00:39,000
So.

11
00:00:40,000 --> 00:00:40,000
Let's.

12
00:00:42,000 --> 00:00:44,000
Go to numeric palette.

13
00:00:44,000 --> 00:00:46,000
In this numeric palette.

14
00:00:47,000 --> 00:00:50,000
I just want to create a formula.

15
00:00:50,000 --> 00:00:55,000
F is equal to nine by five into C plus 32.

16
00:00:56,000 --> 00:00:58,000
So first I just block it.

17
00:01:03,000 --> 00:01:03,000
Create.

18
00:01:05,000 --> 00:01:08,000
Constant initial value is nine.

19
00:01:09,000 --> 00:01:10,000
Divide by five.

20
00:01:12,000 --> 00:01:23,000
Then over here I got nine by five and I just want to multiply this value with degrees Celsius.

21
00:01:23,000 --> 00:01:27,000
So for that purpose I just create a.

22
00:01:28,000 --> 00:01:30,000
Control over here.

23
00:01:31,000 --> 00:01:33,000
And the label is.

24
00:01:34,000 --> 00:01:35,000
Celsius.

25
00:01:37,000 --> 00:01:39,000
So just connect this one.

26
00:01:41,000 --> 00:01:43,000
So nine by five into C.

27
00:01:44,000 --> 00:01:50,000
Plus 32 will give me degree Fahrenheit.

28
00:01:53,000 --> 00:01:56,000
So over here plus 32 and it will give me.

29
00:01:58,000 --> 00:01:59,000
Degree Fahrenheit.

30
00:02:01,000 --> 00:02:03,000
Create indicator.

31
00:02:05,000 --> 00:02:06,000
So.

32
00:02:07,000 --> 00:02:08,000
Control.

33
00:02:12,000 --> 00:02:15,000
In this case, I just change the view.

34
00:02:16,000 --> 00:02:18,000
Of my control and indicator.

35
00:02:19,000 --> 00:02:24,000
I just change the view on front panel side.

36
00:02:24,000 --> 00:02:24,000
Okay.

37
00:02:25,000 --> 00:02:27,000
So that's why it is.

38
00:02:28,000 --> 00:02:31,000
Viewing like this, you can also change your.

39
00:02:32,000 --> 00:02:33,000
Options.

40
00:02:34,000 --> 00:02:44,000
Just go to tools, options or here there is a front panel mode and this one you can choose any style.

41
00:02:44,000 --> 00:02:45,000
Control.

42
00:02:45,000 --> 00:02:47,000
Style for New VI.

43
00:02:47,000 --> 00:02:50,000
Let's make it modern style.

44
00:02:50,000 --> 00:02:51,000
Just press.

45
00:02:51,000 --> 00:02:52,000
Okay.

46
00:02:53,000 --> 00:02:53,000
Control.

47
00:02:55,000 --> 00:03:01,000
And when I just again, make it the indicator over here.

48
00:03:03,000 --> 00:03:04,000
You can just like this.

49
00:03:07,000 --> 00:03:08,000
Maybe it is not saved.

50
00:03:09,000 --> 00:03:10,000
Let's check.

51
00:03:13,000 --> 00:03:14,000
It is saved.

52
00:03:16,000 --> 00:03:19,000
So now this is my.

53
00:03:20,000 --> 00:03:23,000
Celsius to Fahrenheit conversion formula.

54
00:03:24,000 --> 00:03:30,000
And today also explain you how to go with a modular programming.

55
00:03:30,000 --> 00:03:31,000
Or you can say.

56
00:03:32,000 --> 00:03:33,000
That is our.

57
00:03:34,000 --> 00:03:36,000
Sub concept.

58
00:03:36,000 --> 00:03:38,000
So over here we have patrons.

59
00:03:38,000 --> 00:03:42,000
Just right click over here, go to patrons.

60
00:03:42,000 --> 00:03:52,000
In the case of sub, we can go for maximum number of 28 input plus output ports as you see.

61
00:03:52,000 --> 00:03:57,000
Over here, this is the maximum number of ports you can create in a sub.

62
00:03:57,000 --> 00:04:00,000
But in this case I need only two.

63
00:04:00,000 --> 00:04:02,000
One for input, one for output.

64
00:04:02,000 --> 00:04:03,000
I just select it.

65
00:04:03,000 --> 00:04:11,000
Just click over here, make it input, click over here.

66
00:04:11,000 --> 00:04:12,000
Make it output.

67
00:04:13,000 --> 00:04:16,000
So both are my floating type.

68
00:04:17,000 --> 00:04:19,000
Or you can say numeric.

69
00:04:20,000 --> 00:04:28,000
So just if you want to just change the picture, also just go to the editor icon.

70
00:04:30,000 --> 00:04:32,000
Or here, you just need to.

71
00:04:33,000 --> 00:04:33,000
Book.

72
00:04:34,000 --> 00:04:37,000
Celsius to Fahrenheit.

73
00:04:38,000 --> 00:04:42,000
And in this case, I just delete this picture.

74
00:04:44,000 --> 00:04:47,000
It is just like a paint function.

75
00:04:48,000 --> 00:04:53,000
And from here, you can just drag a temperature.

76
00:04:57,000 --> 00:04:57,000
Picture.

77
00:04:58,000 --> 00:04:59,000
Just press.

78
00:04:59,000 --> 00:04:59,000
Okay?

79
00:05:01,000 --> 00:05:04,000
So as you see over here, Celsius to Fahrenheit.

80
00:05:04,000 --> 00:05:05,000
So.

81
00:05:06,000 --> 00:05:07,000
It's created.

82
00:05:07,000 --> 00:05:08,000
Just save it.

83
00:05:10,000 --> 00:05:11,000
Press control.

84
00:05:11,000 --> 00:05:15,000
Right now I'm just saving it on my desktop.

85
00:05:15,000 --> 00:05:16,000
That is C2.

86
00:05:19,000 --> 00:05:21,000
In this.

87
00:05:22,000 --> 00:05:24,000
Or in this project.

88
00:05:24,000 --> 00:05:34,000
In every case, I'm just using input value is Celsius and output value is it may be degree Fahrenheit,

89
00:05:34,000 --> 00:05:38,000
it may be degree Kelvin or it may be degree ranking.

90
00:05:38,000 --> 00:05:41,000
So this is the first case I just save it.

91
00:05:41,000 --> 00:05:43,000
I just go for New VI.

92
00:05:45,000 --> 00:05:54,000
Because in that case, I'm just creating another formula for temperature conversion.

93
00:05:54,000 --> 00:05:58,000
So let's right now convert degree Kelvin.

94
00:05:59,000 --> 00:06:02,000
So for that purpose you just need.

95
00:06:03,000 --> 00:06:06,000
A addition block because degrees Celsius.

96
00:06:06,000 --> 00:06:10,000
So create a numeric control over here.

97
00:06:11,000 --> 00:06:14,000
It is my degrees Celsius.

98
00:06:15,000 --> 00:06:19,000
Connect it and just add

99
00:06:21,000 --> 00:06:27,000
273.15 two degrees Celsius.

100
00:06:27,000 --> 00:06:29,000
It will give me degree Kelvin.

101
00:06:30,000 --> 00:06:34,000
So over here as you see right now, my.

102
00:06:35,000 --> 00:06:40,000
Function is modified, it is X plus Y, and you just check.

103
00:06:41,000 --> 00:06:48,000
And this x plus five over here, the view is different from the previous one.

104
00:06:48,000 --> 00:06:51,000
So over here, this is my degree Fahrenheit.

105
00:06:51,000 --> 00:06:53,000
Again, just select the pattern.

106
00:06:56,000 --> 00:06:58,000
Select degree Celsius.

107
00:07:00,000 --> 00:07:01,000
Fahrenheit.

108
00:07:03,000 --> 00:07:05,000
Just edit icon.

109
00:07:07,000 --> 00:07:08,000
And over here.

110
00:07:08,000 --> 00:07:10,000
Not in this case.

111
00:07:10,000 --> 00:07:11,000
It is not a Fahrenheit.

112
00:07:11,000 --> 00:07:12,000
It is a Kelvin.

113
00:07:12,000 --> 00:07:14,000
So I just change it.

114
00:07:16,000 --> 00:07:20,000
So first delete this put.

115
00:07:21,000 --> 00:07:25,000
In this case, right now I'm just choosing different function.

116
00:07:25,000 --> 00:07:26,000
Let's check.

117
00:07:29,000 --> 00:07:30,000
Delete this.

118
00:07:30,000 --> 00:07:32,000
I'm using this function.

119
00:07:35,000 --> 00:07:37,000
And over here, I just put.

120
00:07:39,000 --> 00:07:40,000
Kelvin to Fahrenheit.

121
00:07:40,000 --> 00:07:41,000
Celsius to Kelvin.

122
00:07:48,000 --> 00:07:50,000
Uh, the picture is not.

123
00:07:53,000 --> 00:07:53,000
Okay.

124
00:07:53,000 --> 00:07:55,000
In this case, just.

125
00:07:56,000 --> 00:07:59,000
Use another temperature symbol.

126
00:07:59,000 --> 00:07:59,000
Let's check.

127
00:08:01,000 --> 00:08:04,000
Is there any symbol related to temperature?

128
00:08:06,000 --> 00:08:08,000
Available inside this.

129
00:08:10,000 --> 00:08:11,000
So.

130
00:08:13,000 --> 00:08:16,000
Just move to the previous one.

131
00:08:22,000 --> 00:08:25,000
So I'm just using again the same thing over here.

132
00:08:25,000 --> 00:08:26,000
Celsius to Kelvin.

133
00:08:27,000 --> 00:08:27,000
Okay.

134
00:08:28,000 --> 00:08:31,000
So this is my Calvin.

135
00:08:35,000 --> 00:08:35,000
Save it.

136
00:08:35,000 --> 00:08:37,000
Control s again.

137
00:08:37,000 --> 00:08:39,000
I'm saving it, as you see over here.

138
00:08:39,000 --> 00:08:40,000
Celsius to Fahrenheit.

139
00:08:40,000 --> 00:08:42,000
Is there now?

140
00:08:42,000 --> 00:08:45,000
Celsius to Kelvin is just save it.

141
00:08:45,000 --> 00:08:49,000
Now I just go to the.

142
00:08:50,000 --> 00:08:50,000
Another.

143
00:08:54,000 --> 00:08:56,000
In this, I just convert.

144
00:08:58,000 --> 00:09:02,000
Temperature that is available in degrees Celsius to rank in.

145
00:09:03,000 --> 00:09:06,000
So I just go to again, numeric palette.

146
00:09:06,000 --> 00:09:12,000
So ranking is equal to degree Fahrenheit plus four, five, nine.

147
00:09:13,000 --> 00:09:14,000
.67.

148
00:09:14,000 --> 00:09:20,000
So for that purpose, I just again use a addition function.

149
00:09:21,000 --> 00:09:31,000
I already have a formula for Fahrenheit, so I just drag that from the desktop.

150
00:09:32,000 --> 00:09:33,000
I just close these.

151
00:09:34,000 --> 00:09:36,000
I just drag the degree Fahrenheit.

152
00:09:37,000 --> 00:09:47,000
So over here in this case, input temperature is degrees Celsius and it is converted to degree Fahrenheit.

153
00:09:47,000 --> 00:09:56,000
And I just add to my function addition function, just add value for 59..

154
00:09:57,000 --> 00:10:01,000
67, so it will give me the temperature in ranking.

155
00:10:01,000 --> 00:10:04,000
So create an indicator for this.

156
00:10:05,000 --> 00:10:08,000
Rankin And the input is over here.

157
00:10:09,000 --> 00:10:10,000
Degrees Celsius.

158
00:10:10,000 --> 00:10:13,000
So right now this is my degree Celsius.

159
00:10:13,000 --> 00:10:15,000
This is my ranking.

160
00:10:15,000 --> 00:10:19,000
So again, I just change patron over here.

161
00:10:21,000 --> 00:10:24,000
Input is my degree Celsius.

162
00:10:24,000 --> 00:10:25,000
Output is my ranking.

163
00:10:27,000 --> 00:10:28,000
Edit I can also.

164
00:10:30,000 --> 00:10:37,000
As you see over here, you just need to same way, change this picture.

165
00:10:40,000 --> 00:10:45,000
Drag temperature symbol put.

166
00:10:46,000 --> 00:10:48,000
Celsius to Rankine.

167
00:10:49,000 --> 00:10:51,000
It is up to you where you want to put.

168
00:10:51,000 --> 00:10:56,000
Let's say I'm just placing it over here.

169
00:10:59,000 --> 00:11:00,000
It is up to you.

170
00:11:02,000 --> 00:11:04,000
So let's.

171
00:11:04,000 --> 00:11:06,000
Okay, so Celsius to ranking.

172
00:11:07,000 --> 00:11:08,000
Save it.

173
00:11:12,000 --> 00:11:15,000
So input temperature is my degree Celsius.

174
00:11:15,000 --> 00:11:21,000
Now just close this VI, create a new VI.

175
00:11:22,000 --> 00:11:25,000
And over here, just put.

176
00:11:26,000 --> 00:11:26,000
Control.

177
00:11:26,000 --> 00:11:31,000
T Right now I just go to the structure.

178
00:11:33,000 --> 00:11:44,000
This is my structure and I just use a combo box over here, as you see in this combo box, just edit

179
00:11:44,000 --> 00:11:44,000
it.

180
00:11:47,000 --> 00:11:48,000
Edit item.

181
00:11:50,000 --> 00:11:51,000
So initially.

182
00:11:52,000 --> 00:11:55,000
Temperature is in degrees Celsius.

183
00:11:55,000 --> 00:11:55,000
Celsius.

184
00:11:56,000 --> 00:12:02,000
So I just put only Celsius next in this case.

185
00:12:02,000 --> 00:12:04,000
Celsius to Fahrenheit.

186
00:12:06,000 --> 00:12:06,000
Next.

187
00:12:07,000 --> 00:12:09,000
Celsius to ranking.

188
00:12:10,000 --> 00:12:10,000
Next.

189
00:12:11,000 --> 00:12:12,000
Celsius to.

190
00:12:13,000 --> 00:12:14,000
Kelvin.

191
00:12:14,000 --> 00:12:18,000
Okay, so over here, these are my four functions.

192
00:12:18,000 --> 00:12:19,000
Let's.

193
00:12:19,000 --> 00:12:22,000
I'm just moving it above.

194
00:12:22,000 --> 00:12:25,000
And this one at the last.

195
00:12:26,000 --> 00:12:26,000
Press.

196
00:12:26,000 --> 00:12:27,000
Okay.

197
00:12:27,000 --> 00:12:30,000
So right now, Combobox is ready.

198
00:12:30,000 --> 00:12:36,000
And in this case, one function I'm just putting inside it.

199
00:12:37,000 --> 00:12:39,000
Let's say select all.

200
00:12:39,000 --> 00:12:40,000
So is there.

201
00:12:42,000 --> 00:12:42,000
Select.

202
00:12:44,000 --> 00:12:47,000
So these are my different functions.

203
00:12:49,000 --> 00:12:49,000
Best.

204
00:12:49,000 --> 00:12:50,000
Okay.

205
00:12:52,000 --> 00:12:53,000
Make it.

206
00:12:53,000 --> 00:12:56,000
Make the select one default.

207
00:12:56,000 --> 00:12:58,000
Just go to the operations.

208
00:13:00,000 --> 00:13:02,000
Make current value default.

209
00:13:02,000 --> 00:13:04,000
Right now it is default value.

210
00:13:05,000 --> 00:13:08,000
And over here put temperature.

211
00:13:10,000 --> 00:13:14,000
So just connect this function to the edge.

212
00:13:15,000 --> 00:13:18,000
Over here we have different functions.

213
00:13:18,000 --> 00:13:19,000
So initially.

214
00:13:22,000 --> 00:13:26,000
In the false case, let us say it is select.

215
00:13:30,000 --> 00:13:34,000
You just need the inputs.

216
00:13:34,000 --> 00:13:37,000
The syntax should be same over here.

217
00:13:37,000 --> 00:13:38,000
Select.

218
00:13:39,000 --> 00:13:40,000
Is my first function.

219
00:13:41,000 --> 00:13:45,000
Second function is my Celsius.

220
00:13:46,000 --> 00:13:48,000
Add another case.

221
00:13:50,000 --> 00:13:54,000
Or here the function should be C to R.

222
00:13:58,000 --> 00:13:59,000
Next function is.

223
00:14:02,000 --> 00:14:04,000
C to F.

224
00:14:04,000 --> 00:14:09,000
Next function is C to K.

225
00:14:11,000 --> 00:14:17,000
So there are my four cases with select.

226
00:14:17,000 --> 00:14:23,000
So in the case of Select, let's say I'm just using default value.

227
00:14:24,000 --> 00:14:28,000
So over here you need input temperature.

228
00:14:30,000 --> 00:14:33,000
That is in degree Celsius, let's say.

229
00:14:34,000 --> 00:14:34,000
This one.

230
00:14:35,000 --> 00:14:36,000
And over here.

231
00:14:37,000 --> 00:14:39,000
This is my output temperature.

232
00:14:40,000 --> 00:14:42,000
That is indicator.

233
00:14:43,000 --> 00:14:45,000
Numeric indicator I'm using in this case.

234
00:14:45,000 --> 00:14:46,000
So.

235
00:14:48,000 --> 00:14:53,000
Temperature in which form you just require.

236
00:14:53,000 --> 00:14:58,000
So initially, when select is there, let's say there is a default value.

237
00:15:01,000 --> 00:15:04,000
Means degree Celsius goes directly.

238
00:15:05,000 --> 00:15:15,000
But in the next case, again in the case of it is goes to the temperature directly next Celsius to ranking,

239
00:15:16,000 --> 00:15:24,000
you need to just drag the VI of Celsius to ranking inside this just connect Celsius to ranking.

240
00:15:26,000 --> 00:15:31,000
It will convert your temperature from degree Celsius to degree ranking.

241
00:15:31,000 --> 00:15:33,000
Next degree Celsius to Fahrenheit.

242
00:15:33,000 --> 00:15:34,000
Just drag.

243
00:15:35,000 --> 00:15:39,000
Input and connect your system.

244
00:15:39,000 --> 00:15:43,000
And last case is my degree Celsius to.

245
00:15:44,000 --> 00:15:51,000
Kelvin, just connect this as you see over here.

246
00:15:51,000 --> 00:15:53,000
Degree Celsius to Kelvin.

247
00:15:53,000 --> 00:15:55,000
So now my VI is.

248
00:15:58,000 --> 00:15:59,000
Nearly ready.

249
00:15:59,000 --> 00:16:02,000
But in this case, you just need to put some.

250
00:16:03,000 --> 00:16:05,000
Temperature inside this.

251
00:16:08,000 --> 00:16:09,000
Let's check.

252
00:16:10,000 --> 00:16:11,000
Control.

253
00:16:13,000 --> 00:16:16,000
I'm just changing the font size.

254
00:16:17,000 --> 00:16:20,000
It is 32 again on the input side.

255
00:16:21,000 --> 00:16:23,000
It is again, 36 size.

256
00:16:23,000 --> 00:16:27,000
So let's go with the temperature initially.

257
00:16:27,000 --> 00:16:31,000
Let's say I want to check for 20 degree Celsius.

258
00:16:31,000 --> 00:16:40,000
What happened to it when select is there again 20 degree Celsius when Celsius to ranking it is 5 to

259
00:16:40,000 --> 00:16:43,000
7.67 when Celsius to Kelvin.

260
00:16:44,000 --> 00:16:48,000
27293.15.

261
00:16:48,000 --> 00:16:54,000
When it is Celsius to Fahrenheit, it is 68 degree Fahrenheit.

262
00:16:54,000 --> 00:17:00,000
So this is how you can convert one form of temperature to another form.

263
00:17:00,000 --> 00:17:07,000
Right now I am just using a random number over here to create.

264
00:17:08,000 --> 00:17:15,000
Temperature for a specific value, let's say upper bound value of the temperature in degree Celsius

265
00:17:15,000 --> 00:17:20,000
is 100, and the initial or lower bound is zero degrees Celsius.

266
00:17:20,000 --> 00:17:26,000
Okay, so this random number will generate values between zero to.

267
00:17:28,000 --> 00:17:32,000
Under and right now just connect this function.

268
00:17:34,000 --> 00:17:36,000
Text input function to this value.

269
00:17:39,000 --> 00:17:47,000
Control B and right now I'm just creating a while loop over this function to create temperature.

270
00:17:49,000 --> 00:17:50,000
Create stop button.

271
00:17:50,000 --> 00:17:55,000
And I'm just putting a delay here of two seconds.

272
00:17:55,000 --> 00:17:59,000
Let's say in every two seconds, temperature is different.

273
00:17:59,000 --> 00:18:01,000
So my VI is ready.

274
00:18:02,000 --> 00:18:03,000
Put control u.

275
00:18:03,000 --> 00:18:05,000
It will minimize your space.

276
00:18:05,000 --> 00:18:14,000
Right now control u and over here when you hit on run button it will generate it will not require any

277
00:18:14,000 --> 00:18:19,000
input temperature because the input temperature will be given by this random function.

278
00:18:19,000 --> 00:18:25,000
So I just put a temperature indicator also over here.

279
00:18:26,000 --> 00:18:27,000
And the range.

280
00:18:29,000 --> 00:18:40,000
In this case, let's say it is 1000 because in the case of ranking temperature is very high.

281
00:18:41,000 --> 00:18:42,000
Or you can say.

282
00:18:44,000 --> 00:18:46,000
Was out of your limit.

283
00:18:46,000 --> 00:18:47,000
So let's run it.

284
00:18:48,000 --> 00:18:49,000
You can check.

285
00:18:52,000 --> 00:18:55,000
Temperature in degree Fahrenheit.

286
00:18:59,000 --> 00:19:05,000
When we just put degree Celsius, it is 1681.

287
00:19:05,000 --> 00:19:09,000
When it is ranking, as you see.

288
00:19:10,000 --> 00:19:12,000
578.

289
00:19:13,000 --> 00:19:18,000
When it is in Kelvin or here.

290
00:19:18,000 --> 00:19:27,000
This is how you can create your own temperature conversion formula using LabVIEW.

291
00:19:28,000 --> 00:19:30,000
This is all about today's lecture.

292
00:19:30,000 --> 00:19:31,000
Thank you.

