05-13-2013 10:12 PM
try this template and modify accordingly....
05-14-2013 11:18 AM
eleorka,
I'm also noticing that there is no true constant wired to the stop terminal in the second while loop during the"Stop Task" case.
05-14-2013 11:28 AM
@WishKebab wrote:
eleorka,
I'm also noticing that there is no true constant wired to the stop terminal in the second while loop during the"Stop Task" case.
In that particular example, the stop is only meant as a "halt" and pause the measurements. The "exit" was meant for exiting the aplication.
However, he should have moved to "apoks" example by now. Its a much better template design.
Kas
05-14-2013 07:21 PM
By now I am dog-tired of all possible (as well as impossible :)) ways of wiring the True/False constants inside/ outside of those two while loops involved. No desired results.
“Apok’s” design ( BTW, Thank you Apok!) is somehow looks even more challenging at the moment because of the fact that it puts the AO of the DAQ into “generate” mode even after VI is terminated. So, one can terminate the VI but the analog output will be still going......Catch 22 situation. Now I am having my doubts that what I thought of it's possible.
Thank you all who replied so far.........Anyone else have other suggestions?
Have a better day.....than mine 🙂
05-14-2013 07:35 PM - edited 05-14-2013 07:50 PM
@eleorka wrote:
“Apok’s” design ( BTW, Thank you Apok!) is somehow looks even more challenging at the moment because of the fact that it puts the AO of the DAQ into “generate” mode even after VI is terminated. ....
hmmm...if you highlight execution, that does not happen. i think you might have to add in the end task case statement a zero volts write output with the stop task to zero out voltage from the generator. it works fine for me.....
05-14-2013 09:42 PM
Thanks Apok,
I endeavour to try that ..... maybe after lunch.
05-15-2013 01:55 AM
Hey Apok,
How you doing?
I have tried that option just now, by including a statement into the "Stop Task" that zeroes the output and freq. of the SG. Did not work for me. In your case it probably works
because you still using a static output (via 2D Waveform as in your VI). In my case it's an AC output. Also, to the property node in front of the DAQmx Timing is set to "Do not allow re-generation (changing it doesn't really help).
When set in the way I just described - SG starts OK, when you press the End Task - SG stops. and that is all. No re-generation. I cannot bring property node and the DAQmx timing into the while loop can I? It's already a big time elapse between the moment when the End Task button is pressed and the actual shut down of the SG on the AO .....
05-15-2013 08:42 AM
you are right in the static generating mode, but for continuous....create it as a sub.vi (configure as continuous while loop) and any type of reference controls to it , wire a wait on notification inverse to the stop in that loop that would end the task once the loop is notified, like what i did here....
05-19-2013 08:35 PM
Great Apok,
Thank you, that was a good example.