From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real problem with DAQmx synchronsiation using attached code



 
(This time I have attached the correct file!!!!!!)
 
Hi
 
I was hoping somebody out there may be able to check the DAQmx code I have written for synchronized Analogue input/output in my application.
 
The code is supposed to run in the following manner:
 
The for loop on the top left generates an array of data points to write to the AO write sub vi (the start voltage and stop voltage and number of steps in AO voltage being the parameters that determine the output of this loop.
 
In the main for loop the AO output is swept according to the settings generated above.   On each step of the analogue output voltage there is a short delay set by the DAQmx trigger before data is sampled to the AI channel. The loop executes N times and the mean of the N sweeps is plotted to the graph (outside the loop).
 
However I don't think I have got the synchronization I right.  It certainly looks like when I try to run my instrumental hardware that data is out of synchronization.  Can anybody see any obvious errors in the code that would account for this and does anybody have any suggestions for improvement.
 
Hope someone can help.
 
Many thanks
 
Ashley
0 Kudos
Message 1 of 2
(2,148 Views)
go here instead:

http://forums.ni.com/ni/board/message?board.id=170&message.id=151681

cheers
0 Kudos
Message 2 of 2
(2,131 Views)