Hello, friends.
Today I will tell you how to write.
A signal or how to write through the analog output of any USB DAC 6001 using Python programming for
that purpose, I just open.
Python idle.
And from here, I just open a new file.
And over here, this is my new file.
And over here we have the code.
So first you have to just import deck Max, because already in the previous video I installed this API
to my system with deck max dot task.
You have to start a task and in this case, we have to just write a signal to a pin.
That is my analog output pin.
In this case I am using my device name is DEV1 oblique AO0AO stands for analog output over here and
this is my channel and the maximum and minimum value shown over here that is maximum value is five and
minimum value is zero.
So over here I'm just start the task task dot analog output underscore channels dot add underscore analog
output as a voltage through the channel.
This one okay.
Right now the value of the signal is two that I have to generate through my DAC card.
Then you have to start the task task dot write your value and in this case value is two and task dot
stop.
So right now when you do this, the two volt signal generated at the output port of analog output port
of the DAC card.
Okay.
So you have to just run it.
Module five.
So it will generate a two volt signal through analog output port zero.
So in this case.
So now I just go to my hardware part in the hardware part.
As you see over here, this is my USB DAC card.
6001.
And over here I'm just connecting analog.
One led to the analog zero port and the ground port.
This one is the positive pin.
This one is the negative pin of my LED.
Right now the value is two volt because the threshold value of the LED is above three volt.
So that's why it is not going on.
So now I just change the value.
Of.
From 2 to 3.
Let's check.
It is right now.
Three.
So now just run it.
It will ask me.
You have to save the code.
So I just put.
Okay, So now as you see, the LED goes on in this case, right now, LED goes on.
So if you want to off this led, you just change the value from below to below three let's it is 2.5.
So again hit on run button.
Save it.
As you see it, is going off right now.
My LEDs off in off condition.
So as you see, this is in off condition or you can say it is running with low value.
Okay.
So this is all about today's lecture.
Thank you.