12-12-2016 01:34 PM
I would like to generate a analog output that is conditional on a rising flank of a Digital Input to start the signal generation and that terminates in a flexible manner using a falling edge of the Digital input. Unfortunately I cannot find an implementation that uses a falling edge to flexibly terminate an analog output. I calculate a long waveform that exceed that max duration of the ao and would simple like to turn is down to 0V, when the falling edge of the DIO is arriving. Any suggestions of how to do this with AO?
12-13-2016 12:24 AM
12-13-2016 09:04 AM
My issue is, that I can trigger the writing of the full waveform as an analog out, but I do not understand how I can dynamically stop the writing of the predefined waveform before the full signal has been written in the ao channel. Does one need to continuously generate the output or can one use a predefined wavform like I try to use and turn the signal of sometimes before the full length of the waveform has been reached?
12-13-2016 03:59 PM
12-14-2016 06:47 PM
I found an example vi that uses the pause trigger function and generates sample by sample the ao if the trigger source fullfils the predefine condition. The vi somewhat works but has 2 drawbacks: 1. The waveform of the ao just continues and is no reset to the original starting value and 2) the last sample written determines the value of the ao during the pause. Does anyone have a suggestion on how to write an additional value in the attached vi so the ao is reset to ground or 0V during the pause and how to potentially reset the ao waveform?
12-14-2016 06:48 PM
here's the example vi
12-15-2016 05:52 AM
WIth a regular DAQ board, you've got 2 imperfect options:
1. Detect the falling edge (or low state) of the digital signal in software. Stop your AO task, write a buffer full of 0.0 volts and re-start it. Depending on what the AO signal is driving, you may want to ramp your way to 0.0 more gently rather than issuing a step function. To do this, you'll need to know your AO generation history and query a DAQmx property node "TotalSamplesGenerated" so you can know where you left off.
2. Use the digital signal for the control side of a solid-state relay and pass the AO signal through the output side. You may still want to configure the task for pause triggering so you aren't D/A converting a bunch of samples that go nowhere during the time the digital signal is low.
-Kevin P