07-13-2021 06:02 AM
Dear everyone,
I need your help. I want to output one pulse immediatly (with counter) when the continuous analog output function completes every N sampling output, the device I use is PXI-6230. As shown in the attachment, I use the node of "Reg Event " to generate an event every time the output of N sampling points is completed in the continuous analog output function. In the meanwhile, I set up a counter finitude output task with retrigger function. My idea is to retrigger the counter output task when the mentioned "Reg event" occurs, but I don't know how to realize it, please help me.
Solved! Go to Solution.
07-13-2021 09:27 AM
A better way is to handle it all in hardware. I was just in a fairly related thread, see more details over here.
Define your pulse in units of "Ticks" of the AO Sample Clock terminal. You'll need to use all 3 pulse timing inputs -- low ticks, high ticks, and initial delay.
Let's say you want to generate the rising edge of a pulse after every 25 samples. You'd set initial delay to 25 ticks, and then set low ticks and high ticks such that they sum to 25. (The high ticks value will control the width of the pulse.) After this, you'll need to be sure to start the counter output task *before* starting the AO task.
Here's a partial snippet to illustrate. The "reserve" call to DAQmx Control Task is there to make the AO task identify an internal terminal for exporting its sample clock, a behavior it wouldn't do by default.
-Kevin P
07-13-2021 08:02 PM
Dear Kevin P,
Thank you very much. The method you replied perfectly solves my demand and achieves higher synchronicity than I expected. Thank you again and learn from you.
Lushuai Qian