Discussion:
synchronization of multiple CAN Board and a DAQ Board in PXI Chasis
(too old to reply)
DirkW
2008-02-26 16:10:09 UTC
Permalink
Hi,
Your example works fine. keep in mind that your CAN frame transmits every 20 ms. That means if the start trigger occurs and we missed the CAN frame the maximum time elapses until we receive the next frame and create the timestamp is 20 ms. So as long as you are below 20 ms everything should be fine.
If you want the time when the start trigger occured you could log the trigger as frame to your queue. This frame should allways have the earliest timestamp compared to DAQ. See the attached modified VI.
DirkW


T12_Multiple CAN Cards Frame API Single DAQmx Card_modified.llb:
http://forums.ni.com/attachments/ni/30/3234/1/T12_Multiple CAN Cards Frame API Single DAQmx Card_modified.llb
DirkW
2008-02-27 15:10:06 UTC
Permalink
Yes, thats the funny part. I didn't mention it explecitly, but DAQmx doesnt create a timestamp onboard. DAQmx just delivers the data  and a increment and then creates a t0 based on the windows timer. CAN allways attaches onboard timestamps to the messages based on a clock which starts on start/ncopen or on start trigger.\
Thus when the starttrigger occures the starttrigger frames tells you when DAQ and CAN have started and because the read VI executes a little later there is a 4-5 ms difference between DAQmx t0 and the start trigger frame.
But this difference is the offset between CAN and DAQmx clock and you can just remove this offset. The time difference should not change because both boards are synced.
DirkW
Share_Good
2008-08-15 14:10:09 UTC
Permalink
Hi Dirk, I have a new problem... i need to sychronize 2 CAN (series-2) ports (each 1 in different slot of PXI chasis) with a M-series DAQ Card for data comparison.they are triggered by aitrigger of PXI-6255 Board (M-series).  I expected the start trigger to be the same for both the ports. but they are not...they differ by few msec...on an average about 6-9 msec...(see attachment) can you help me solving this....?
 


2 CAN Cards 1 DAQ (MSeries) Card Input Synchronization.llb:
http://forums.ni.com/ni/attachments/ni/30/3691/1/2 CAN Cards 1 DAQ (MSeries) Card Input Synchronization.llb
Loading...