LabVIEW Time Sensitive Networking (TSN)

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

TSN Communication Timing Issues

Hello all,

 

I have recently managed to set up my CNC program and ran the TSN Simple Talker - Listener Community Example with the offset values in the generated schedule. However, I noticed that although my TX offset is reflected properly on the Time Chart, my RX offset doesn't seem to be. After starting at around 240us, the RX offset value keeps decreasing slowly until 200us in the picture, and continues to do so. Although the data seems to be transferred properly.

TSN Simple Talk - Listen.PNG

 

This is the schedule generated on my CNC:

Schedule Timing.PNG

 

The PTP status seems to be wrong as well as the cRIO running the Listener VI is indicated as "Master" as well. I have configured my network switch and cRIOs according to the guides on this open group. 

 

Would really appreciate any assistance given. Thank you very much!

 

Regards,

Devin Toh

0 Kudos
Message 1 of 8
(589 Views)
7 REPLIES 7

Re: TSN Communication Timing Issues

Hi DevinToh,

 

PTP seems to be the root of the issue here. Both targets are reporting that they are master, which can not be the case if they are synchronized. This tells us the targets are not actually synchronized to each other which is also why you see the RX time drift. 

 

Can you try directly connecting the two targets and running the test?

Ty Prather
Technical Marketing Specialist
National Instruments
0 Kudos
Message 2 of 8
(582 Views)

Re: TSN Communication Timing Issues

Hello Ty,

 

Thank you for your reply.

 

I have done a direct connection between the 2 cRIO, with the 2 eth0 ports connected together and the 2 eth1 ports connected to the network switch so that the PC can still communicate with them. The IP address configured on the project explorer for the cRIO is according to the IP address of the eth0 port. This is the result upon running the TSN VI again, the RX offset is no longer drifting, but the PTP status of my master cRIO is labelled as "Slave".

TSN Simple Talk - Listen Direct Connection.PNG

 

Really appreciate your help! Thank you!

 

Regards,

Devin Toh

0 Kudos
Message 3 of 8
(573 Views)

Re: TSN Communication Timing Issues

Just to be clear, it does not matter if the TX/RX targets are PTP master or slave. Either way they will be synchronized. The issue is that when they are both Master, they are not synchronizing to each other.

 

Since it works when they are directly connected, it seems like something may be wrong with the ptp settings on the switch. Can you Telnet into the switch and run the show ptp port G 1/X, where X is the port number of the connected cRIOs?

 

 

Ty Prather
Technical Marketing Specialist
National Instruments
0 Kudos
Message 4 of 8
(558 Views)

Re: TSN Communication Timing Issues

Hello Ty,

 

This is what I got when I ran the command:

PTP Status.PNG

 

Let me know if you need any other information.

 

Thanks for your help!

 

Regards,

Devin Toh

0 Kudos
Message 5 of 8
(548 Views)

Re: TSN Communication Timing Issues

This is showing that the PTP profile that is run is an end-to-end profile and that a Cisco device (probably the switch) is the GM.  I suspect the switch is running 1588 default profile.  The switch should be set to run 802.1AS profile.  You can adjust the PTP profile (link below) but the fact that this is set incorrectly also causes me to question if the other settings are correct to connect to the CNC and manage the flows properly. 

 

You may want to look at some of the Cisco documentation to double check everything.  There are some useful commands here:

https://www.cisco.com/c/en/us/td/docs/switches/lan/cisco_ie4000/tsn/b_tsn_ios_support/b_tsn_ios_supp...

 

There are configuration steps here:

https://www.cisco.com/c/en/us/td/docs/switches/lan/cisco_ie4000/tsn/b_tsn_ios_support/b_tsn_ios_supp...

 

0 Kudos
Message 6 of 8
(538 Views)

Re: TSN Communication Timing Issues

Hello Hokie,

 

Thank you for replying.

 

I did follow all the steps that were listed in the configuration process. Perhaps some of the settings may have reverted when I was troubleshooting the network. I will re-configure the switch once I get to my lab the next morning and update you again.

 

Thank you!

 

Regards,

Devin Toh

0 Kudos
Message 7 of 8
(530 Views)

Re: TSN Communication Timing Issues

Hello Ty & Hokie,

 

I have configured the network switch again and the PTP now shows a Master & Slave status.

Talker - Listener (Configured).PNG

 

Is this working as intended? The drifting of RX Offset seems to have stopped (or too small to be noticeable +/-1us). However, changing the Offset(ns) input on the Listener doesn't seem to be having any effect on the RX Offset(us) on the Timing Statistics and Time Chart. 

 

I have attached the setup command text and the PTP status text just in case you would like to take a look at it.

 

Thanks once again for your help!

 

Regards,

Devin Toh

0 Kudos
Message 8 of 8
(521 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.