Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization with NI 985x cRIO CAN

Hello, I was wondering is someone could point me in the right direction. I have a crio system and I need to synchronize CAN and analog input. There is a KB "Synchronization with NI 985x cRIO CAN" but that does not seem to apply.

 

For starters I am considering using the Frame to channel API or write my own. This API does not appear to have any built in synchronization. From my understanding of this, is that one would need to read the timestamp of the CAN message and somehow align it to analog in data.

 

Does anyone have any examples of this sort of thing or have any first hand experience?

 

Thanks,

Dustin

 

0 Kudos
Message 1 of 3
(6,315 Views)

HI Dustin,

There are some examples on how to synchronize CAN and DAQ device in the example finder. They are not designed for cRIO but they can give you an idea of the architecture. Basically you need to share a clock and a trigger. Take a look at this Knowledgebase it has lots of information about the capabilities of the  985x devices.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(6,299 Views)

Dustin,

 

One of the nice things about CompactRIO is that the modules get their clock references from the chassis, so all modules attached to a chassis stay synchronized. In terms of timestamps and execution on the FPGA, everything stays synchronized, so when you read an analog input and a CAN frame at the same time on the FPGA, they will be as synchronized as possible.  Keep in mind that CAN frames can arrive at unpredictable times so tracking those timestamps can come in handy.  With the clock sources the same, you don't need to worry about CAN timestamps drifting from other timestamps you may take with the get tick count VIs in FPGA. 

 

--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 3 of 3
(6,294 Views)