09-14-2009 08:21 PM
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
09-15-2009 06:23 PM
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.
09-16-2009 09:11 AM
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.