Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog output continuous task to immediate task switching

I have a waveform analog output task defined in MAX (2 channels).  I use this to move a laser about a reference location which is NOT (0,0).
 
When the task ends, I need to move the laser back to its reference location using a different task - an imediate analog output to the same channels.
 
Unfortunately, when I stop and clear the continuous task to free up the resources, the analog outputs get set to (0,0) briefly, before I can command the reference location.
 
Is there a preferred way to end a continuous task that doesn't force the analog output to 0 (just staying where it was would be fine) while still allowing me to send a one-shot command on the same channel after the continuous task is stopped?
0 Kudos
Message 1 of 2
(2,966 Views)

Hello Crossroads,

Instead of creating a new task you can try using the same task but output different parameters. Place the DAQmx Write VI after the Stop and before the Clear (or even before the Stop). If this is not working, you can try controlling the execution of your program by using DAQmx Control Task VI instead of the Start Task and Stop Task. Hope this helps!

Kalin T.
0 Kudos
Message 2 of 2
(2,951 Views)