07-13-2012 02:51 AM
I'm making some test with two 6682H boards...I want to check the synchronization between two chassis.
I linked these two boards together and wrote some code in order to synchronize the chassis. So i have an init phase where i initialize the niSync, then i set the time reference to use 1588 ordinary clock and start participation in 1588 . After that i read the clock state to know if it's a master or a slave. The problem is this vi always return me Faulty state.
I dont understan why i get this state.. does anyone have an idea ???
Thanks for your answer ...
Solved! Go to Solution.
07-16-2012 02:42 AM
Thanks that was the pb...
For an RT target: You have to go in MAX, select the configuration, select network parameter, Enabled the ethernet adapter and enter the IP adress.
By the way i have another question, is itpossible to force a clock to be the master ? For example if i connect a GPS or IRIG B signal to a board, and i want to use the board to be the master ...
07-16-2012 01:40 PM
You can make a 6682H master by setting the 1588 priority to be higher than other 1588 nodes on the network. In LabVIEW, you can set the priority with an NI-Sync property node: Timing»1588»Priority1 and Timing»1588»Priority2. Or in MAX, open the configuration panel for the device and go to the 1588 tab to set the priority. (Note: A lower value increases the priority)
When you set GPS as the time reference, NI-Sync will elevate the 6682’s local clock accuracy and class. This will give you the same effect as increasing the priority.
IEEE-1588, also known as PTP (Precision Time Protocol), uses the best master clock algorithm to determine which node will be master. Below are some useful links on PTP synchronization:
07-24-2012 04:27 AM
Again thanks for your answer, i tryed your solution and it seems to work... or quite...
I will try to explain. I used the properties priority1 and 2 as you suggest. If i select master i set both properties to 0 and otherwise to 255. As i said it works the first time. But if i disconnect the network cable and reconnect it, it seems it doesn't take these two proprties into account and may invert the master and the slave.
Are these two properties not permanent ?
Any idea or suggestion ?
07-24-2012 07:13 AM
Hmm.... it seems that when you set these parameters in MAX it works, but when i set the same parameters from the program, it doesn't ... that's stange, maybe when you disconnect the cable, it restart the communication, and the parameters set in MAX overwrite the properties set in the program ?
07-25-2012 09:50 PM
I looked into the behavior you are seeing and here is what I found:
When you set the 1588 properties in LabVIEW, the values should remain until you reboot the system or reset the device. In NI-Sync 3.3, I found an issue where the properties get reset when the 1588 clock enters the initializing state. If you unplug and plug in the Ethernet cable or start 1588, the 1558 clock will transition through this state which resets the properties.
If you want to make the properties permanent, you can use the configuration panel in MAX.
If you need a programmatic way to make the properties permanent, you can install the NI-1588 Configuration feature from NI-TimeSync (see link below). In NI-Sync 3.3, NI added support to persist 1588 properties that are set by management messages. With NI-TimeSync, you can find and configure 1588 clocks on a network via the NI System Configuration API. NI-TimeSync provides a couple of examples to help you get started: "IEEE 1588-2008 Find Clocks.vi" and "IEEE 1588-2008 Set Clock Properties.vi".
The follow link is to an article on how software synchronization works on LabVIEW RT and where NI-TimeSync fits into the picture.
Timing and Synchronization in NI LabVIEW
I hope this helps.
07-26-2012 09:46 AM
Again thanks for your help....
I saw this example before, but my code run on an RT target, and i'm not sure this is a good idea to call these vi from the rt target.
I'm trying to do a custom device runing on veristand, so i think i could do this during the initialisation... but i'm not sure this is really clean ...