1
00:00:05,000 --> 00:00:06,000
Hello friends.

2
00:00:06,000 --> 00:00:12,000
Today I show you potentiometer interfacing using Milo.

3
00:00:13,000 --> 00:00:18,000
In this particular case, I just show you two methods.

4
00:00:18,000 --> 00:00:24,000
One is using express, another one is using low level programming.

5
00:00:24,000 --> 00:00:28,000
For that purpose, as you see over here, this is my my reel.

6
00:00:29,000 --> 00:00:30,000
I just connect.

7
00:00:30,000 --> 00:00:32,000
This is my potentiometer.

8
00:00:32,000 --> 00:00:37,000
That is, I connected this one over the zero PCB.

9
00:00:38,000 --> 00:00:40,000
This is my positive wire.

10
00:00:41,000 --> 00:00:51,000
This is my plus five volt that is available on one pin of analog port A This is my ground and yellow

11
00:00:51,000 --> 00:00:53,000
one is my signal.

12
00:00:53,000 --> 00:00:54,000
That is I zero.

13
00:00:54,000 --> 00:00:55,000
I am just using.

14
00:00:56,000 --> 00:01:02,000
So first I just go to my two analog input.

15
00:01:02,000 --> 00:01:04,000
I just selected.

16
00:01:04,000 --> 00:01:09,000
Right now I am just selecting the express case.

17
00:01:11,000 --> 00:01:18,000
I just show you both the cases using express and using low level coding.

18
00:01:18,000 --> 00:01:23,000
Okay, so over here you just need to configure your port.

19
00:01:23,000 --> 00:01:25,000
As you see, I zero.

20
00:01:25,000 --> 00:01:27,000
It is connected to PIN number three.

21
00:01:27,000 --> 00:01:29,000
I already connect this one.

22
00:01:29,000 --> 00:01:31,000
Just select.

23
00:01:31,000 --> 00:01:32,000
Okay.

24
00:01:34,000 --> 00:01:41,000
So it will give you the data that is available over the particular PIN.

25
00:01:41,000 --> 00:01:42,000
Number three.

26
00:01:42,000 --> 00:01:46,000
Now I just go to my front panel.

27
00:01:46,000 --> 00:01:54,000
In this front panel, I just use this classic numeric classic meter.

28
00:01:56,000 --> 00:01:56,000
Okay?

29
00:01:56,000 --> 00:02:06,000
So the range right now, I just connected maximum voltage is five, so I just change it to five, as

30
00:02:06,000 --> 00:02:08,000
you see over here.

31
00:02:11,000 --> 00:02:18,000
Okay, so now you just need to connect this pin to this meter.

32
00:02:22,000 --> 00:02:26,000
Create a while loop for continuous reading this analog signal.

33
00:02:29,000 --> 00:02:29,000
Save it.

34
00:02:32,000 --> 00:02:33,000
Run it.

35
00:02:33,000 --> 00:02:38,000
Or you can say deploy the code to the milieu.

36
00:02:38,000 --> 00:02:43,000
As you see when I just move the Viper.

37
00:02:43,000 --> 00:02:45,000
Right now, voltage is zero.

38
00:02:47,000 --> 00:02:48,000
As you see, one volt.

39
00:02:54,000 --> 00:02:55,000
Two volt.

40
00:02:55,000 --> 00:03:00,000
If the connections are loose in that case, it will fluctuate.

41
00:03:00,000 --> 00:03:05,000
Okay, so right now it is four volt and it is maximum.

42
00:03:05,000 --> 00:03:16,000
So this is how you can acquire analog signal or you can acquire potentiometer output using myrio.

43
00:03:16,000 --> 00:03:18,000
This is the first case.

44
00:03:18,000 --> 00:03:21,000
Now I just show you the second case.

45
00:03:21,000 --> 00:03:31,000
So I just stop this, delete this express VI In place of this express VI, we just go for low level

46
00:03:31,000 --> 00:03:32,000
coding.

47
00:03:32,000 --> 00:03:40,000
So select Mario, low level, locate analog input.

48
00:03:40,000 --> 00:03:44,000
You need to first open the task.

49
00:03:47,000 --> 00:03:52,000
I just put over here, minimize it a little bit.

50
00:03:52,000 --> 00:03:55,000
In this case, I want to read the signal.

51
00:03:57,000 --> 00:03:59,000
It is my analog read.

52
00:03:59,000 --> 00:04:03,000
As you see, sine wave is over here.

53
00:04:03,000 --> 00:04:07,000
Now you just need to close the task.

54
00:04:09,000 --> 00:04:13,000
I also add one error handler, simple error handler.

55
00:04:15,000 --> 00:04:18,000
It will automatically handle the errors.

56
00:04:19,000 --> 00:04:20,000
Create constant over here.

57
00:04:22,000 --> 00:04:23,000
Select the pin.

58
00:04:23,000 --> 00:04:27,000
A analog input stands for analog input.

59
00:04:28,000 --> 00:04:30,000
Connect this meter over here.

60
00:04:30,000 --> 00:04:39,000
As you see, it is not connected because the output is an array and I am just connecting it with a scalar

61
00:04:39,000 --> 00:04:40,000
value.

62
00:04:40,000 --> 00:04:48,000
So you need to go to index array function in this index array function.

63
00:04:48,000 --> 00:04:51,000
I just connect this over here.

64
00:04:51,000 --> 00:04:54,000
Select the pin in indexing.

65
00:04:54,000 --> 00:04:56,000
It is available at zero indexing.

66
00:04:57,000 --> 00:05:00,000
I just save this code.

67
00:05:01,000 --> 00:05:04,000
Now I just again run this code.

68
00:05:09,000 --> 00:05:15,000
As you see it, is reading the signal using low level coding.

69
00:05:15,000 --> 00:05:17,000
It is increasing now.

70
00:05:17,000 --> 00:05:18,000
It is decreasing.

71
00:05:18,000 --> 00:05:21,000
So this is up to you how to code.

72
00:05:21,000 --> 00:05:27,000
In the case of low level coding, there is chances of error is very less.

73
00:05:27,000 --> 00:05:35,000
But when you just use the express because this express is created by someone, some person, in that

74
00:05:35,000 --> 00:05:38,000
case you may get some error.

75
00:05:38,000 --> 00:05:47,000
So right now I just connect this five volt signal to 15 volt signal.

76
00:05:47,000 --> 00:05:58,000
In the case of an I.D. card, the maximum voltage you can read up to ten volt, that is in the case

77
00:05:58,000 --> 00:05:59,000
of educational boards.

78
00:05:59,000 --> 00:06:00,000
Okay.

79
00:06:00,000 --> 00:06:02,000
It is configured by the.

80
00:06:03,000 --> 00:06:06,000
So right now, I just stop it in place of this.

81
00:06:06,000 --> 00:06:11,000
I just connect over here as you see.

82
00:06:11,000 --> 00:06:13,000
Plus five volt is available.

83
00:06:13,000 --> 00:06:19,000
I just remove this Jack and connect this.

84
00:06:21,000 --> 00:06:22,000
Spin two over here.

85
00:06:23,000 --> 00:06:26,000
This is my plus 15 volt signal.

86
00:06:26,000 --> 00:06:26,000
Is there?

87
00:06:26,000 --> 00:06:31,000
Okay, so now let's check what is the value?

88
00:06:31,000 --> 00:06:36,000
So again, I just I need to set it to 15.

89
00:06:36,000 --> 00:06:39,000
Let's say it is reading 15 volt or not.

90
00:06:39,000 --> 00:06:40,000
So run it.

91
00:06:41,000 --> 00:06:42,000
Save it.

92
00:06:45,000 --> 00:06:46,000
Earlier.

93
00:06:48,000 --> 00:06:50,000
As you see right now, it is five volt.

94
00:06:50,000 --> 00:06:53,000
I just move it to maximum.

95
00:06:58,000 --> 00:07:00,000
It is zero.

96
00:07:04,000 --> 00:07:07,000
In this case, it is maximum five volt.

97
00:07:12,000 --> 00:07:16,000
Okay, so let's check what happened to it.

98
00:07:17,000 --> 00:07:20,000
Stop it again.

99
00:07:20,000 --> 00:07:24,000
I'm just checking the internal configuration.

100
00:07:34,000 --> 00:07:41,000
So over here, this is the code of an analog voltage.

101
00:07:41,000 --> 00:07:45,000
In this case, you just read maximum five voltage.

102
00:07:46,000 --> 00:07:46,000
Okay.

103
00:07:46,000 --> 00:07:54,000
So we conclude over here that the maximum voltage we can read using this card is five voltage.

104
00:07:54,000 --> 00:08:05,000
Right now I just connect it to 15 volt plus 15 volt, but it is reading only five volt maximum.

105
00:08:05,000 --> 00:08:05,000
Okay.

106
00:08:05,000 --> 00:08:10,000
So this is how you can read analog signal using any Mario.

107
00:08:11,000 --> 00:08:13,000
So this is all about today's lecture.

108
00:08:13,000 --> 00:08:14,000
Thank you.

