04-05-2011 06:01 AM
Hello All.
I had this peculiar problem.
I am using a simple VI to generate zero to five volts on AO0 of DAQ 6009.
When the VI is running, I can continuously change the voltage with slider, and thats good.
But when I press the "STOP" button on the VI ( while loop stop), the voltmeter connected to output of DAQ shows 5 volts ( if 5 volts was the last slider position).
Thus though the VI has stopped, the DAQ is still showing its last value.
How do I stop the VI so that DAQ understands that it has to go back to zero ?
I have attached 2 types of codes below giving same results.
Thank you very much.
Solved! Go to Solution.
04-05-2011 07:03 AM
It's not peculiar at all. It's expected. To set the output to 0, just do another DAQmx Write before you clear the task.
04-05-2011 07:09 AM
Thank you for your help.
As you may have guessed, I am a complete novice and its my first time at LabVIEW and hence found it peculiar.
How do I implement the solution? I have tried to guess and implement what you implied in your solution.
Please correct me if I am wrong.
Attaching the VI.
04-05-2011 07:14 AM
Yes. Don't forget to clear the task.
04-05-2011 07:20 AM
Thank you!
You are really the Knight of NI! 🙂
I cleared the task like this: ( Hope its alright). I thought "stop task=clear task", until I saw the Pallete once again. Please ignore the errors. They have come because I used MS paint for the screenshot.
04-05-2011 07:38 AM
Also, in continuation, did you suggest that I use "Clear Task" as an alternative to "Safely Remove Hardware" when we use NI USB 6009?
Till date I used to manually put slider to zero Volts, and then pull out the USB from the desktop PC. Is there any safer way to eject hardware, or does "Clear Task" serve the purpose?
Thank you.
04-06-2011 11:37 AM - edited 04-06-2011 11:38 AM
Hi,
I actually went to my University and connected the DAQ 6009, with the "Clear Task" in place. It answered both queries above, automatically.
Thank you !