LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET with DAQmx Sync Issue

Solved!
Go to solution
Highlighted

My goal is to sync CAN signals with analog input channels.  I based my program off the LabVIEW example Synchronize C Series CAN with DAQmx Analog Input, however, I was experiencing a timing discrepancy.  It is my understanding that by wiring the DAQmx Start Trigger to the XNET session, the session starts acquisition when the DAQ starts acquisition.  The problem is that during several runs, my CAN t0 was before my AI t0, which according to the code, should not be possible.  Has anyone experienced this issue? Or see something is missing?

 

I have attached a modified Synchronize C Series CAN with DAQmx Analog Input.vi that demonstrates my issue along with an image of my results.  In my custom program (multiple analog inputs and CAN signals) I have seen up to a 50 ms difference.

Download All
0 Kudos
Message 1 of 2
(439 Views)
Highlighted
Solution
Accepted by topic author Eric_Nav

Posting solution to issue, which was found with a little back and forth with NI tech support.  The reason why the t0 values do not line up as expected is that XNET and DAQmx assign t0 differently.  XNET assigns a timestamp at the start of the session, while DAQmx timestamp is "calculated value taking into account the time interval (dt) and the number of samples being acquired from the buffer (#s) in order to approximate the time that the acquisition started." See link below for more info.

 

To properly sync, NI support recommends assigning DAQmx t0 to XNET waveform data.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9Q9SAK&l=en-US

Message 2 of 2
(328 Views)