From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize CAN message to System Clock

Is it possible with XNET to synchronize a CAN message with the system clock?  E.g. sending a 100 ms CAN message at 1.000 s, 1.100 s, 1.200 s, etc. where in this example, the system clock would be updated by IEEE 1588 (or possibly directly from GPS).

0 Kudos
Message 1 of 3
(2,379 Views)

So a couple things.  First the XNet timestamp gets syncrhonized with the OS time.  This is on RT or Windows, and can jitter by around 100us.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kEaUSAU

https://forums.ni.com/t5/Automotive-and-Embedded-Networks/XNET-Timestamp-and-Windows-Timestamp-Synch...

 

As for periodic writing, checkout out some of the shipping examples.  The rate is defined in the database, that can be programatically set or imported from a DBC.  Then depending on your needs, a Frame or Signal Single-Point session type.  Help >> Find Examples in LabVIEW.

0 Kudos
Message 2 of 3
(2,351 Views)

I'm not referring to just synchronizing the timestamp.  I need to synchronize the actually message transmission to match up with whole seconds (the times I listed in my original post).  Plus or minus a few milliseconds would be good enough.  I was hoping to use the signal output single-point (which is what the J1939 add-on for VeriStand uses IIRC).

 

I'm hoping to not have to manually (re)write the whole message transmission algorithm.

0 Kudos
Message 3 of 3
(2,327 Views)