NI-TSN (1588 and 802.1AS Synchronization)

cancel
Showing results for 
Search instead for 
Did you mean: 

TSN on sbRIO 9603

Solved!
Go to solution

Hello,

 

How can I troubleshoot TSN on the 9603? We've been using NTP and saw this article https://www.ni.com/en/support/documentation/supplemental/21/use-ntp-for-timestamping-measurements.ht... on how to enable it, but it requires upgrading the software to NI Sync 20.1. I have several hundred 9603's fielded and was hoping to get a hardware fix by installing https://timemachinescorp.com/product/gps-ntpptp-network-time-server-tm2000/ and having it sync to our NTP server, then put out time signals on the Ethernet.

 

On my test network the tm2000 is syncing to NTP but it doesn't show any PTP clients. Is there a way to monitor the sbRIO? Are there additional configuration options? My test network uses ubiquiti switches, so not 802.1AS, but I hoped that the IEEE 1588 timing would get through.

 

Richard

 

0 Kudos
Message 1 of 9
(1,405 Views)

Hi Richard,

 

I have a few follow up questions:

  1. I don't think I fully understand your setup. Is it something like this?
    NTP server ---(NTP)---> TM2000 ---(PTP)---> 9603 network
  2. What version of NI-Sync are you currently using?

On the 9603, TSN (or IEEE 802.1as-2011)  is enabled by default on the onboard NICs. You can switch it to PTP (or IEEE 1588-2008) using the NI-Sync LabVIEW API. You can also configure and monitor the sbRIO's synchronization using the same LabVIEW API. See here for the NI-Sync documentation.

0 Kudos
Message 2 of 9
(1,375 Views)

Hi Vacharya,

 

Yes, the network is as you described. It's just a quick hack to get the clocks on the 9603's (100s) to sync. Normally we use NTP, but it is not working in the current version LabVIEW 2020, Timesync 20. We have a software image with Timesync 20.1 that we can install, but it involves downtime and cost.

 

I got the TM200B yesterday and it will sync to the NTP peer, but per the manufacturer, it won't generate PTP until it gets a 3D GPS sync. So we're working that now.

 

What I need to know is, if we can get a PTP server working on site, will the 9603 and 9609 controllers sync to the clock without any programming, or is it more involved?

 

Richard

0 Kudos
Message 3 of 9
(1,368 Views)

Ok, the clock is synced to GPS and I verified with Wireshark that I'm seeing PTP traffic on ethernet. My test controllers, laptop, and clock are on the same network, so I assume the controllers should be participating and syncing their clocks, but I don't see any evidence of it. 

 

What else do I have to do to get the sbRIOs to sync?

 

Fractal_RTJ_0-1697824197844.png

 

0 Kudos
Message 4 of 9
(1,362 Views)
Solution
Accepted by topic author Fractal_RTJ

Ok, finally figured it out. I had to write a VI to set the time reference to 1588 on the sbRIO. Then it would sync its clock to the TM2000B using 1588.

 

What a pain!

0 Kudos
Message 5 of 9
(1,356 Views)

Hi Richard,

 

Glad to see that you got it working.

 

The sbRIOs support 2 different protocols for synchronizing time over the network. One is IEEE 1588-2008 (or PTP) and the other is IEEE 802.1AS-2011 (or TSN). By default the protocol is set to 802.1AS on both Compact RIO devices and Ethernet-based cDAQs.

You are indeed correct that In order to use 1588, that the time reference needs to be set using the LabVIEW API. By default, this setting will not persist if/when the system is restarted. If you want to persist the above configuration after restart, you will need to call the niSync Persist Configuration VI.

 

There are also a few examples that can help with monitoring and configuring the Time References.

0 Kudos
Message 6 of 9
(1,343 Views)

Thank you Vacharya. Yes, I included the VI to persist the configuration. Can you tell me where this is stored? Can I make the change by editing a config and rebooting?

 

It seems really odd that NI would make 802.1 AS the default method since most network hardware doesn't support this yet.

 

Richard

0 Kudos
Message 7 of 9
(1,321 Views)

I don't think my issue is solved. The tool reports that time is 1588, but the date on my machine hasn't changed in 3 days.

Fractal_RTJ_0-1698104639668.png

When I look at traffic with Wireshark, I see multicast traffic between the two devices.

Fractal_RTJ_1-1698104838089.png

 

Do I need any code running on the sbRIO to make the system clock lock to 1588?

 

Richard

 

0 Kudos
Message 8 of 9
(1,313 Views)

Looking at that screenshot, the time observed by the first NIC (named IEEE 1588-2008_1) is "selected" to drive the time on the system.

You can query a TR property called Grandmaster Clock ID on the selected TR using the NI-Sync Property Node to figure out if the TM2000 is the 1588 master.

 

Do you have both NICs connected to the same network? Each NIC on the sbRIO runs a separate instance of 1588. Therefore, it is possible that the 1588 instance running on the NIC2 is acting as the 1588 master, and the "selected" 1588 instance (running on NIC1) is synchronizing to it.

If you do need both NICs to be connected to the switch, there is a way to disable the 1588 instance running on NIC2.

 

Once you enable 1588 on a single NIC, if you are still having trouble with getting it to synchronize, you can try setting the priority1 value using the NI-Sync Property Node to something lower than that of the TM2000. Also see additional documentation.

0 Kudos
Message 9 of 9
(1,305 Views)