09-28-2005 05:03 PM
09-28-2005 05:26 PM
Have you tried putting another DAQmx write outside the loop and before the Clear task with a 0 constant wired to it? Just a guess, i have no practical DAQmx experience. I do not think the method with the 0 and Property not will work with regards to data flow programming. Also, have you updated to latest version of DAQ?
09-29-2005 08:08 AM
Very clever idea! It worked. In answer to your first question, no i had not tried the DaqMx write vi. to set output to zero. We updated to the most recent software recently.
I deleted the property node for the slide control on the output side of the loop. Then I placed the DAQmx write on the outside of the loop. After running the VI, the voltage dropped to zero, and the slide stayed at its last setting. Im still learning so i assume its redundant to have the slide set to zero after the execution of the vi; the slide is set to zero on the startup.
i added the file for you to see.
Thanks much,
Wayne
09-29-2005 08:09 AM
Sorry, here is the VI.
Wayne
09-30-2005 09:51 AM
09-30-2005 03:52 PM
When I realized the logic of taking the DAQmx write loop value to zero by adding the additional DAQmx write on the outside of the function, several loose ends tied themselves together.
I have completed the analog section, and am now reached a greater challange of doing the encoder input and data manipulation section. (i did find some good examples for this challenge).
I do have another question...
Where can I find information regarding the different DAQmx vi's? The help section provides help in a conceptual way, but programmatically I cant resolve the exact role some of the vi's perform. Example would be the stop task vi and the clear task vi. I dont know the background information of what the function of those vi's are.
Thanks,
Wayne
10-03-2005 10:08 AM
05-11-2017 11:10 AM
I have a similar issue, I'd like to write 0 to my voltage output module vi DAQmx Write.vi but i'd like to do it as an 'emergency stop' function. So if someone clicks my stop boolean at any point during the operation of the VI it will overwrite the current running WriteVI (in a loop) and change voltage output to 0. Is this possible? I am getting resource issues at the moment. Presumably because it can't run two at the same time. I have tried using a Stop Task before trying to write to it but still errors (2000022)
Thanks
05-11-2017 02:36 PM
Are you trying to implement the emergency stop using a different task? If so, that explains the error 200002. You can indeed have only one analog output task running at a time. You need to implement the functionality in the same task.
The same principle from the thread should apply. Say you have a while loop that can be stopped with a "normal" stop button and your emergency stop button. Either button would stop the generation, but then, you can have a case structure right after the while loop receiving the value from the emergency stop button; if it is true, it writes an output of 0 and if it is false, it just passes the reference.
In cases like this it is useful to post the code so other users can get a better idea of what you are trying. Can you do that?
Regards,
05-12-2017 02:53 AM
Thank you I have made it work by routing the task in to the emergency stop from the start task of my loop.