1
00:00:10,000 --> 00:00:19,000
I will tell you how to acquire an analog signal using any USB 6000 DAC card with the help of Python

2
00:00:19,000 --> 00:00:20,000
programming.

3
00:00:20,000 --> 00:00:30,000
For that purpose, I just use a potentiometer because it will generate analog values based on your input.

4
00:00:30,000 --> 00:00:34,000
Right now I am just using ground pin.

5
00:00:34,000 --> 00:00:38,000
This is my ground pin that is connected to one end of potentiometer.

6
00:00:38,000 --> 00:00:47,000
This is my rotary potentiometer and I just connect plus five volt to the other end of the potentiometer.

7
00:00:47,000 --> 00:00:48,000
The middle one.

8
00:00:48,000 --> 00:00:49,000
That is my wiper.

9
00:00:49,000 --> 00:00:56,000
This is yellow pin that is connected to a zero pin of my debt card.

10
00:00:56,000 --> 00:01:05,000
And the ground pin of the DAC card is connected to the ground of potentiometer.

11
00:01:06,000 --> 00:01:14,000
And I'm using differential potentiometer for connections and differential connections so that that's

12
00:01:14,000 --> 00:01:17,000
why I just use a four pin.

13
00:01:17,000 --> 00:01:18,000
Also grounded.

14
00:01:18,000 --> 00:01:20,000
This blue one is my four.

15
00:01:21,000 --> 00:01:27,000
This green one is my ground pin and yellow one is my signal pin.

16
00:01:27,000 --> 00:01:28,000
Input.

17
00:01:28,000 --> 00:01:28,000
Signal pin.

18
00:01:28,000 --> 00:01:32,000
So in this case, this is my hardware connection.

19
00:01:32,000 --> 00:01:35,000
Now I just go to the software part.

20
00:01:35,000 --> 00:01:40,000
So first you have to import the library.

21
00:01:43,000 --> 00:01:50,000
So after this, you have to just read analog input value.

22
00:01:52,000 --> 00:02:05,000
Okay, so now it is and I get Max because right now you have to just assign the task.

23
00:02:06,000 --> 00:02:06,000
So.

24
00:02:09,000 --> 00:02:09,000
Dallas.

25
00:02:13,000 --> 00:02:17,000
After this this task as task.

26
00:02:21,000 --> 00:02:24,000
Indentation over here.

27
00:02:24,000 --> 00:02:34,000
You just write Task dot I stands for analog input underscore channels.

28
00:02:39,000 --> 00:02:52,000
Then you have to just add after this analog input underscore, you have to set the voltage which type

29
00:02:52,000 --> 00:02:55,000
of signal you want to acquire.

30
00:02:57,000 --> 00:03:06,000
This is voltage underscore channel, and now you have to put the device name.

31
00:03:06,000 --> 00:03:13,000
So it is my day one and the pin is a zero.

32
00:03:14,000 --> 00:03:14,000
Okay.

33
00:03:15,000 --> 00:03:17,000
So now you just.

34
00:03:19,000 --> 00:03:24,000
Enter over here, you just assign a value.

35
00:03:24,000 --> 00:03:26,000
Or you can say it is a variable

36
00:03:29,000 --> 00:03:33,000
and this variable will take the value from task.

37
00:03:39,000 --> 00:03:39,000
No.

38
00:03:40,000 --> 00:03:42,000
Just print these values.

39
00:03:47,000 --> 00:03:49,000
The variable name is value.

40
00:03:51,000 --> 00:03:54,000
After this, you have to just stop the task.

41
00:03:55,000 --> 00:03:55,000
Task Dot.

42
00:03:56,000 --> 00:03:57,000
Stop.

43
00:03:58,000 --> 00:04:07,000
Okay, so this is the code to read analog signal using an USB 6009.

44
00:04:07,000 --> 00:04:11,000
Let's check it, save it, run it.

45
00:04:13,000 --> 00:04:18,000
Make make the potentiometer to highest value extreme value.

46
00:04:18,000 --> 00:04:19,000
Run it.

47
00:04:21,000 --> 00:04:23,000
Now the value is.

48
00:04:25,000 --> 00:04:31,000
It is showing some error with an ECS task task as task.

49
00:04:33,000 --> 00:04:34,000
Here are some error.

50
00:04:36,000 --> 00:04:39,000
I just dream of these Big Macs.

51
00:04:42,000 --> 00:04:43,000
Don't ask.

52
00:04:44,000 --> 00:04:45,000
This 20.

53
00:04:51,000 --> 00:04:53,000
With any task as task.

54
00:04:54,000 --> 00:04:55,000
Okay.

55
00:04:55,000 --> 00:04:56,000
It is.

56
00:05:00,000 --> 00:05:01,000
This.

57
00:05:02,000 --> 00:05:05,000
Right now.

58
00:05:05,000 --> 00:05:06,000
It is okay.

59
00:05:08,000 --> 00:05:08,000
Again.

60
00:05:10,000 --> 00:05:14,000
I know that Max is not defined Tech Max.

61
00:05:14,000 --> 00:05:15,000
Okay.

62
00:05:15,000 --> 00:05:15,000
Okay.

63
00:05:15,000 --> 00:05:16,000
I just.

64
00:05:19,000 --> 00:05:24,000
Make an error because it is an attack, Max, not Max.

65
00:05:24,000 --> 00:05:25,000
Save it.

66
00:05:26,000 --> 00:05:27,000
Run it.

67
00:05:30,000 --> 00:05:33,000
Okay, now the problem is solved over here.

68
00:05:34,000 --> 00:05:38,000
As you see, the value is 5.041.

69
00:05:38,000 --> 00:05:46,000
When you change the node and when you move the potentiometer in clockwise direction, now the value

70
00:05:46,000 --> 00:05:47,000
is below five.

71
00:05:47,000 --> 00:05:50,000
So again, I'm just run it.

72
00:05:52,000 --> 00:05:55,000
So as you see over here, the value is 4.3.

73
00:05:56,000 --> 00:05:58,000
Then again I move.

74
00:06:00,000 --> 00:06:02,000
It is in clockwise direction.

75
00:06:02,000 --> 00:06:04,000
Now the value is below 4.3.

76
00:06:04,000 --> 00:06:05,000
That is 3.2.

77
00:06:06,000 --> 00:06:11,000
Again, I'm just changing the value a little bit in the clockwise direction.

78
00:06:11,000 --> 00:06:16,000
Run it right now I'm just using single sample code.

79
00:06:16,000 --> 00:06:24,000
Just single value is acquired when you use for loop and you assign the value, it will generate values

80
00:06:24,000 --> 00:06:27,000
for you according to your given time span.

81
00:06:27,000 --> 00:06:29,000
So right now it is 2.6.

82
00:06:29,000 --> 00:06:31,000
Again, I'm just changing the value.

83
00:06:33,000 --> 00:06:34,000
So run it

84
00:06:37,000 --> 00:06:49,000
1.91 and when I just again move in the clockwise direction, now the value is 0.13 and I just move it

85
00:06:49,000 --> 00:06:50,000
to extreme.

86
00:06:50,000 --> 00:06:52,000
It is nearly to zero.

87
00:06:52,000 --> 00:06:54,000
Again, I'm just running it.

88
00:06:55,000 --> 00:06:58,000
So now the value is 0.003.

89
00:06:59,000 --> 00:07:08,000
So this is how you can generate acquire analog signal using any USB 6009 DAC card with the help of Python

90
00:07:08,000 --> 00:07:09,000
programming.

91
00:07:09,000 --> 00:07:13,000
This is all about how you can acquire analog signal right now.

92
00:07:13,000 --> 00:07:17,000
In this case I'm just using differential case.

93
00:07:18,000 --> 00:07:25,000
Okay, so this is how you can acquire analog signal with the help of Python code.

94
00:07:25,000 --> 00:07:25,000
Thank you.

