Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize RS232 and CAN bus?

My UUT outpus signal by CAN bus, and my sensor outputs signal by RS232. How can I synchronize those 2 signals?

I think it's not precise to consider the timestamp of receving those 2 signals in Windows system.

Does anyone has good idea?

 

Is it feasible to reading RSR232 and CAN by NI CompactRIO? There is a RS232 port in NI cRIO chassis. Is it possible to synchronize RS232 and CAN signal if I buy a cRIO CAN device?

 

Thanks.

0 Kudos
Message 1 of 4
(3,988 Views)

Yes, there are 4 port rs232 modules and CAN modules for the cRIO. You can program in FPGA and be very certain of when you read the the last data bit on either bus to the microsecond. 

0 Kudos
Message 2 of 4
(3,985 Views)

Can I only buy a cRIO chassis (with a RS232 port) and a cRIO CAN card to realize it?

I mean syschronizing CAN with the RS232 port on the cRIO chassis. Is it possible? 

Thanks.

0 Kudos
Message 3 of 4
(3,982 Views)

the cRIO built in rs232 port isn't accessible via FPGA.  Your other option might to get a CAN module that works in scan engine mode like the NI 9862. This uses the NI-XNET driver. Now instead of working directly in the FPGA , you can do the RS232 and CANBUS reads in your real-time code using a timed loop and get pretty decent synchronization. 

 

I have never done this so do your own research and check out all the CAN examples before buying anything. I don't believe that CAN module is compatible with every chassis.

 

http://www.ni.com/white-paper/12580/en/

http://www.ni.com/product-documentation/8136/en/

 

 

 

 

 

 

 

 

0 Kudos
Message 4 of 4
(3,961 Views)