Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Two AOs: update one AO without stopping the task

Solved!
Go to solution

Hi,

 

I believed this to be a simple task but somehow I am stuck with this. The hardware I am using is PCIe-6353 in combination with a BNC-2110 connector block.

 

So far I have generated a CO with a certain frequency (e.g. 1kHz)  and used this to define an AO. The CO start triggers the AO task so the two are synchronized. The AO is usually just modulating between two voltages but could also be a more complex waveform, provided as a 1D DBL array in continuous output mode. The AO is defined as a fraction of the CO frequency - so once started, the two tasks are always synchronized. In the picture below, for example, the AO is changed on every 7th CO. That's not really very complex, works great, no issues.

 

What I believed to be a equally simple task but am currently struggling with is when adding a 2nd AO task.

The AO2 does not need to be synchronized with AO1. It is basically a constant value that is changed one in a while, either by the user changing it manually or based on some feedback to keep a stage at the correct position.

- I started by just generating a independent AO task, which does not seem to be possible

- If I include this in the AO1 task, I cannot find a way to independently change the AO2 without stopping the CO and AO. The synchronized AO/CO needs to keep running while I change the AO2 value. It is no problem if AO2 is synchronized and can only be changed at the same rate as AO1, for example. But in contrast to AO1, the AO2 values are not pre-determined.

 

Do you have a solution, hints or tips on how to do this? Stopping and restarting the task with new output values is not an option.

 

Thanks!

 

Flumen_0-1633693767978.png

 

0 Kudos
Message 1 of 3
(136 Views)
Solution
Accepted by topic author Flumen

Don't call DAQmx Timing for the AO2 task.  Then it'll run in software-timed on-demand mode and work as you want.

 

 

-Kevin P

Message 2 of 3
(130 Views)

I knew it had to be a real simple solution. Just tested it and it works. I have done much more complex tasks but not sure I would have succeeded here without your help :

 

Thanks!

 

0 Kudos
Message 3 of 3
(125 Views)