LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resume task after pausing and altering parameters

What I'd like to do is write a vi to ramp an AO voltage up until a trigger flips, pause at that value to take some measurements, then ramp down until the trigger flips back, pause at the new value to take some more measurements, and ramp to zero. 
 
What I have sucessfully done so far is to create a task with a triangle waveform and a pause trigger.  The problem is then to resume the task at the same voltage level, without resetting the AO to zero volts, and resetting to a new triangle waveform, negated and with an offset.  LV wants both to reset the AO to zero volts when restarting, and doesn't want to change waveform parameters while paused.  It is very important that the AO voltage not be reset to zero during the pause, even for a short time.
 
Can anyone help?
 
Thanks,
Sara
 
LV 8.20, NI PXI-6259
0 Kudos
Message 1 of 6
(3,969 Views)
A good structure for this application would be a state machine, with a state for stepping the output up (or down) and a state for making the measurements.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 6
(3,958 Views)
I agree with Mike..  A state machine would be the way to go.  You can set it up to accept a voltage profile, which makes more universal for future use.
0 Kudos
Message 3 of 6
(3,954 Views)

Great, but does that solve the problem of how to alter the DAQ voltage ramp without resetting it to zero first?  Even with a state machine, creating a hardware voltage ramp on the DAQ requires creating a task, and as I understand it, altering the task requires it to be stopped and restarted, which would set the voltage to zero momentarily.  (I would like a hardware voltage ramp, as I expect it to be smoother and have more accurate timing than a software ramp.) 

So, I can ramp the voltage and pause it on the trigger, but then to have it (again hardware) ramp back down until the trigger flips back, I must stop and restart the task, which would set the voltage to zero for a short time, which I need to avoid. 

Any other suggestions?

Thanks,
Sara

0 Kudos
Message 4 of 6
(3,942 Views)
This may be better answered in the DAQ forum, but as far as I know, there's no way to stop a task and keep it from going to 0V. 
 
If the timing from ramping to pausing to ramping again is going to be known, you could build up a waveform for that period of time and just output the whole thing instead of using pause triggers, but from your description, this does not seem to be the case.
 
The advanced triggering options that you want can be easily implemented using our FPGA boards which can define this in hardware explicitly.  This may seem like overkill for your application, but it is the easiest way to do it.  Check out the R Series page, CompactRIO product page, and FPGA module page for more information.
 
Craig D
Applications Engineer
National Instruments
Message 5 of 6
(3,918 Views)
 

Hello,

Please look at this thread:

https://forums.ni.com/t5/Multifunction-DAQ/Pause-and-resume-analog-waveform-output/m-p/239906?requir...

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 6 of 6
(3,870 Views)