Hello, friends.
Today we discuss how to read an analog signal using an DAC card.
And right now we just program using Python.
So first I just open idly over here.
This is my ideal.
I already write a code.
I just open it.
So over here, this is my analog write code.
Just maximize it.
So now.
Just minimize this.
Maximize this also.
So over here, I just first import an DMX API with an DMX dot task.
As task, you have to just use analog input port that is available on your USB 6001 DAC card.
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
it as a voltage.
So the value is equal to task dot read the value available on the I zero will show on my.
Python ideal shell over here.
So right now I just show you.
So initially, if you want to check what is the device name of your deck card.
So you just.
Go to an IMAX.
So first you have to install LabVIEW also in inside your system.
After that, you just go to.
Python shell.
So I just open an emacs because it will show me which device is connected to my system.
So it will take some time.
If you want to configure your deck card, you just need this deck, Max.
Okay.
So over here in the devices.
You can search any USB 6001.
Just select it as you see the status is present and this is the serial number of my DAC device.
Okay.
So using this and I max or you can say measurement and automation explorer you can find out your device
that is provided by national instruments.
And over here you can check your device right now.
I just closed it.
So just I'm just moving to my hardware part in the hardware part.
I have my deck card.
Over here.
This is my deck card and this is my breadboard.
I'm just using and I'm for analog signal.
I just use a potentiometer over here.
As you know, the in case of potentiometer, we have three pins.
Or three legs.
The middle one will show me the signal and the outer ones.
One is ground and one is my signal.
In this case, I'm just using five volt signal.
As you see over here, I'm just connecting one edge with the five volt signal and another one, as you
see over here.
This is.
My in this case.
My analog input port is present over here.
And.
As you see, analog input port is over here.
This is the ground.
Middle one is my signal.
And the for that one zero is my signal.
I zero port and four is my negative.
I have to just ground it also.
Okay, so the connection is like this.
So over here I have five volt and this is my signal.
Orange one is my signal and red one and brown one is my ground.
Red one is my fourth pin.
I four.
I have to ground it.
And this one is my ground pin.
Okay, so now I just check what is the output?
So moving on the.
Program.
As you see, you have to just.
Save it and run it.
When you run it, as you see over here, I got 1.956650 when I just change the potentiometer value.
I'm just moving this rotary potentiometer.
And again, I have to check I have to run this module.
As you see the value changed from 1.9 to 3.477.
And again, when I move it to maximum, in this case, I just require the maximum voltage that is nearly
five volt.
I just run it.
So over here I got 4.9587, and if you move in another direction.
To the maximum.
Then you got minimum value.
That is your zero, nearly zero.
You have to run it again because right now in the program, I'm not using any loop.
So over here, I just got the value 0.02.
So this is how you can read analog signal through Python using an DAC card.
Thank you.