1
00:00:05,000 --> 00:00:06,000
Hello, friends.

2
00:00:06,000 --> 00:00:14,000
Today we discuss how to read an analog signal using an DAC card.

3
00:00:15,000 --> 00:00:19,000
And right now we just program using Python.

4
00:00:19,000 --> 00:00:25,000
So first I just open idly over here.

5
00:00:25,000 --> 00:00:26,000
This is my ideal.

6
00:00:28,000 --> 00:00:30,000
I already write a code.

7
00:00:30,000 --> 00:00:31,000
I just open it.

8
00:00:33,000 --> 00:00:36,000
So over here, this is my analog write code.

9
00:00:37,000 --> 00:00:38,000
Just maximize it.

10
00:00:40,000 --> 00:00:41,000
So now.

11
00:00:42,000 --> 00:00:43,000
Just minimize this.

12
00:00:43,000 --> 00:00:45,000
Maximize this also.

13
00:00:46,000 --> 00:00:55,000
So over here, I just first import an DMX API with an DMX dot task.

14
00:00:55,000 --> 00:01:07,000
As task, you have to just use analog input port that is available on your USB 6001 DAC card.

15
00:01:07,000 --> 00:01:20,000
Now my the name of my device is one and the analog port I'm using is I zero over here and I'm just using

16
00:01:20,000 --> 00:01:22,000
it as a voltage.

17
00:01:22,000 --> 00:01:31,000
So the value is equal to task dot read the value available on the I zero will show on my.

18
00:01:33,000 --> 00:01:35,000
Python ideal shell over here.

19
00:01:36,000 --> 00:01:40,000
So right now I just show you.

20
00:01:40,000 --> 00:01:48,000
So initially, if you want to check what is the device name of your deck card.

21
00:01:48,000 --> 00:01:49,000
So you just.

22
00:01:50,000 --> 00:01:52,000
Go to an IMAX.

23
00:01:54,000 --> 00:02:00,000
So first you have to install LabVIEW also in inside your system.

24
00:02:01,000 --> 00:02:03,000
After that, you just go to.

25
00:02:04,000 --> 00:02:05,000
Python shell.

26
00:02:05,000 --> 00:02:14,000
So I just open an emacs because it will show me which device is connected to my system.

27
00:02:15,000 --> 00:02:17,000
So it will take some time.

28
00:02:29,000 --> 00:02:36,000
If you want to configure your deck card, you just need this deck, Max.

29
00:02:36,000 --> 00:02:37,000
Okay.

30
00:02:37,000 --> 00:02:39,000
So over here in the devices.

31
00:02:43,000 --> 00:02:47,000
You can search any USB 6001.

32
00:02:48,000 --> 00:02:55,000
Just select it as you see the status is present and this is the serial number of my DAC device.

33
00:02:55,000 --> 00:02:56,000
Okay.

34
00:03:01,000 --> 00:03:11,000
So using this and I max or you can say measurement and automation explorer you can find out your device

35
00:03:11,000 --> 00:03:15,000
that is provided by national instruments.

36
00:03:15,000 --> 00:03:19,000
And over here you can check your device right now.

37
00:03:19,000 --> 00:03:20,000
I just closed it.

38
00:03:21,000 --> 00:03:28,000
So just I'm just moving to my hardware part in the hardware part.

39
00:03:31,000 --> 00:03:33,000
I have my deck card.

40
00:03:36,000 --> 00:03:37,000
Over here.

41
00:03:37,000 --> 00:03:42,000
This is my deck card and this is my breadboard.

42
00:03:42,000 --> 00:03:46,000
I'm just using and I'm for analog signal.

43
00:03:46,000 --> 00:03:49,000
I just use a potentiometer over here.

44
00:03:49,000 --> 00:03:55,000
As you know, the in case of potentiometer, we have three pins.

45
00:03:56,000 --> 00:03:57,000
Or three legs.

46
00:03:58,000 --> 00:04:03,000
The middle one will show me the signal and the outer ones.

47
00:04:03,000 --> 00:04:07,000
One is ground and one is my signal.

48
00:04:07,000 --> 00:04:10,000
In this case, I'm just using five volt signal.

49
00:04:10,000 --> 00:04:19,000
As you see over here, I'm just connecting one edge with the five volt signal and another one, as you

50
00:04:19,000 --> 00:04:20,000
see over here.

51
00:04:20,000 --> 00:04:21,000
This is.

52
00:04:22,000 --> 00:04:24,000
My in this case.

53
00:04:30,000 --> 00:04:34,000
My analog input port is present over here.

54
00:04:36,000 --> 00:04:36,000
And.

55
00:04:39,000 --> 00:04:43,000
As you see, analog input port is over here.

56
00:04:43,000 --> 00:04:44,000
This is the ground.

57
00:04:44,000 --> 00:04:47,000
Middle one is my signal.

58
00:04:47,000 --> 00:04:52,000
And the for that one zero is my signal.

59
00:04:52,000 --> 00:04:55,000
I zero port and four is my negative.

60
00:04:56,000 --> 00:04:58,000
I have to just ground it also.

61
00:04:58,000 --> 00:05:01,000
Okay, so the connection is like this.

62
00:05:03,000 --> 00:05:09,000
So over here I have five volt and this is my signal.

63
00:05:09,000 --> 00:05:14,000
Orange one is my signal and red one and brown one is my ground.

64
00:05:15,000 --> 00:05:18,000
Red one is my fourth pin.

65
00:05:18,000 --> 00:05:19,000
I four.

66
00:05:19,000 --> 00:05:20,000
I have to ground it.

67
00:05:20,000 --> 00:05:23,000
And this one is my ground pin.

68
00:05:23,000 --> 00:05:27,000
Okay, so now I just check what is the output?

69
00:05:28,000 --> 00:05:31,000
So moving on the.

70
00:05:33,000 --> 00:05:33,000
Program.

71
00:05:35,000 --> 00:05:37,000
As you see, you have to just.

72
00:05:38,000 --> 00:05:41,000
Save it and run it.

73
00:05:41,000 --> 00:05:52,000
When you run it, as you see over here, I got 1.956650 when I just change the potentiometer value.

74
00:05:52,000 --> 00:05:55,000
I'm just moving this rotary potentiometer.

75
00:05:55,000 --> 00:06:01,000
And again, I have to check I have to run this module.

76
00:06:01,000 --> 00:06:08,000
As you see the value changed from 1.9 to 3.477.

77
00:06:08,000 --> 00:06:19,000
And again, when I move it to maximum, in this case, I just require the maximum voltage that is nearly

78
00:06:19,000 --> 00:06:20,000
five volt.

79
00:06:20,000 --> 00:06:21,000
I just run it.

80
00:06:21,000 --> 00:06:30,000
So over here I got 4.9587, and if you move in another direction.

81
00:06:31,000 --> 00:06:32,000
To the maximum.

82
00:06:32,000 --> 00:06:35,000
Then you got minimum value.

83
00:06:36,000 --> 00:06:39,000
That is your zero, nearly zero.

84
00:06:39,000 --> 00:06:44,000
You have to run it again because right now in the program, I'm not using any loop.

85
00:06:45,000 --> 00:06:51,000
So over here, I just got the value 0.02.

86
00:06:51,000 --> 00:06:59,000
So this is how you can read analog signal through Python using an DAC card.

87
00:07:00,000 --> 00:07:01,000
Thank you.

