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.
This is the schedule generated on my CNC:
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!
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?
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".
Really appreciate your help! Thank you!
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?
This is what I got when I ran the command:
Let me know if you need any other information.
Thanks for your help!
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:
There are configuration steps here:
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.
Hello Ty & Hokie,
I have configured the network switch again and the PTP now shows a Master & Slave status.
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!