Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Analogout using a digital input as a start and a STOP signal

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?

0 Kudos
Message 1 of 7
(3,245 Views)
could you explain more clearly what is your problem now?!
0 Kudos
Message 2 of 7
(3,217 Views)

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?

0 Kudos
Message 3 of 7
(3,212 Views)
ass I know technically you could not do it and when you run your vi this comment send to Daq micro to produce this signal
but may be you can do it with some trick for example try to use continuous signal generation with small period of time in this case you can prevent to generate last of signal the time you want
but this method any work in millisecond precision not more faster
0 Kudos
Message 4 of 7
(3,202 Views)

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?

0 Kudos
Message 5 of 7
(3,191 Views)

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 7
(3,184 Views)