LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO Synchronization

Hello,

 

How can we enable "Software 1588 time protocol (PTP)" on a cRIO?

0 Kudos
Message 1 of 13
(3,929 Views)

Hello,

 

How can we enable "Software 1588 time protocol (PTP)" on a cRIO?

0 Kudos
Message 2 of 13
(3,889 Views)

Hello,

 

This does depend on what cRIO you in fact have. If it begins in the model number with 903 or 906, it is a Linux system. First you will need to install NI-TimeSync to the CompactRIO which can be done from step 9 onwards of the below article:

 

http://digital.ni.com/public.nsf/allkb/6B1343F61905203386257051006573CA

 

Once you have installed NI-TimeSync, go to Time Settings in NI MAX for the CompactRIO and ensure that 1588 is enabled in the checkbox. Then save and restart, at this stage the CompactRIO's are running 1588 and synchronising to the best master available on the network. If it is however a Linux system you might find that the Time Settings panel does not have the information you would normally expect like, current master and grandmaster. These values and also additional settings are described in the below article:

 

http://digital.ni.com/public.nsf/allkb/3FBB102D0D65AE3486257D88007CCB20

 

Best regards,

 

Ed

Message 3 of 13
(3,883 Views)

Thank you Ed,

I did that and one of the controllers port is in PTP_MASTER and the other is in PTP_SLAVE. How can I see their clock to ensure they are synched? It is needed I enable ptp on the RT Linux? I mean when I use Timekeeper to see the time in both, there is a big difference between them, a scale of hundred seconds.

0 Kudos
Message 4 of 13
(3,865 Views)

Hi,

 

What controllers are you actually using? It differs on whether it is Linux or not. You should achieve less than 1 ms precision, are they on the same subnet?

 

Best regards,

 

Ed

0 Kudos
Message 5 of 13
(3,860 Views)

The controllers are 9067 and 9035. Yes, they are in the same subnet since they got their IPs via the same DHCP. Is it needed I modify tsm.json or ptp.conf files? Once I install Time_sinc they become sync? I attached the screenshots from ptp.status and Timekeeper.

 

Download All
0 Kudos
Message 6 of 13
(3,854 Views)

They appear to have synchronised to one another, how else are you verifying the time synchronisation?

 

The screenshot you've given is in nano seconds, it looks quite close but maybe outside of the ms range slightly. Could you measure the system time as this is actually what will be synchronised, you can get system time by reading the timestamp from the timing VI palette.

 

There should be no need to modify any further files.

0 Kudos
Message 7 of 13
(3,846 Views)

I used GetDate/Time as in the image. Did you mean this object (GetDate/Time)? Its accuracy is ms. I need an object with higher resolution. So I used FPGA Timekeeper to see ns resolution. If I synchronize each FPGA with its corresponding RT and look at its Timekeeper, they should be the same in ns resolution (look at the last attached files) but as you see there is a big difference.  

However, I use GetDate/Time object and obviously the time difference between RTs are 5ms (look at the last attached file). Does it mean they are not synchronized?

 

0 Kudos
Message 8 of 13
(3,842 Views)

TimeSync will only synchronise to a millisecond level. The communication between RT and FPGA also has latency involved and also RT level determinism will have an impact. It is therefore not possible to expect a nanosecond synchronisation level with 1588.

 

What is it that your application is trying to achieve and why do you need such tight synchronisation?

0 Kudos
Message 9 of 13
(3,838 Views)

As I knew, ptp synchronizes in ns level and I expected so. I should synchronized two controllers to find the exact delay in  the network and do some actuation in motors with 20 ms as their rotation period. So, I think ms scale delay is a matter in 20ms.

Now, I have two basic questions:

1- How can I find that two RT controllers are synchronized? (Just by GetDate/Time object?)

2- Do I need to put this lines in tsm,json on both controllers to make them synchronize or they are synchronized already when I installed TimeSync? Since it is in this page:   http://digital.ni.com/public.nsf/allkb/3FBB102D0D65AE3486257D88007CCB20

 

 

"protocolConfig": {
 "priority1": 128, 
 "priority2": 128, 
 "hwTimestamping": 1, 
 "interface": "eth1", 
 "statusFile": "/var/run/ptp_eth1.status" }
 
0 Kudos
Message 10 of 13
(3,836 Views)