Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in timestamp when writing waveforms to text file

Hello,

 

I am trying to read continuously 16 channels using two PXI-6143 cards and writing the data plus timestamp to a tab delimited file. I have tried several different options but have run with the same problem: There are jumps on the time being written out to the file, but the data appears to be written out completely. There is a jump in time forward or backward of varying sizes.

Case in point: I am trying to read at 10 kS/s in chunks of 10,000 samples, and there seems to be a glitch in the x-axis almost every second.

This data was generated with simulated devices... However, the same problem shows up when taking actual measurements. The tasks defined are simply all eight channels for two separate PXI-6143 cards.

Any suggestions on how can I avoid this problem? I attach the VI and sample output and plots showing the problems.

 

Thanks,

 

RV

Download All
0 Kudos
Message 1 of 2
(2,826 Views)

Hello,

 

I did some testing and was unable to see is the time gaps that are in your image.  How are you reopening the file?  I am also concerned if the two devices are suppose to be synchronized, because they do not seem to be.  For the two cards to sample AIs at the same time it will be best to synchronize the two task.  This can be done by sharing the same clock and start trigger.  Please look to some of the examples that download with the DAQmx driver for synchronization.  The example titled Multi-Device Synch-Analog Input-Cont Acquisition.vi is located in the Example finder in the Browse tab under the following folders ...  Hardware Input and Output, DAQmx, then Sychronization folder.  This might also help with the jumps.  So there is not a discrepancy between when the two devices start.  Please give me some feedback if I have overlooked or misunderstood the issue.

 

Samantha
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(2,787 Views)