Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize AO channels in dotnet

Hi,
This is probably an easy one. I am simpy trying to synchronize 4 analogue output channels from my DAQmx card and if I write them as seperate tasks (i.e. a task for each channel) then write the output ramp waveform it will simply write the ramp from one channel after the other channel in the order for which the lines  appear in the code - the lines of code look as follows:  aowriter.WriteSingleSample(true, ramparray);
 
I realize that I could combine multiple channels in one task and then call the WriteMultiSample() method and then trigger this externally via a digital trigger but this is turning out to be problematic.
 
I guess I am wondering if there is a simple solution where there is a setting which can be changed such that each analog write task can be executed without waiting for the previous ramp applied to a different channel to finish
 
thanks
Jonathan
0 Kudos
Message 1 of 2
(2,884 Views)

Hi Jonathan,

Sounds like you are trying to simply to a triggered AO operation on one board that outputs several different signals on your different AO channels. 

Doing simultaneous updates for multiple AO channels is most definitely not a problem.  All you have to do is know which data you are sending into which channels.  In the case that you are using you will need to write an array of data to your AO task. 

One thing to keep in mind is that you need to make sure that you only use one task of one type for one board.  In this case, since you are using one board, then you should just have one AO task and then write the data appropriately.

It sounds like all you really need to do is merge your arrays of data so that the proper points are output at the right time.  Once you get the data going into the board right it won't have a problem outputting everything in the manner that you desire.

Regards,

0 Kudos
Message 2 of 2
(2,869 Views)