LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni-Sync using PXI and Windows PC

Solved!
Go to solution

LindsW,

 

I am sure that 1588 can be read at a 1ms accuracy with software LabVIEW.

The cRIO running NI-TimeSync is doing just that. (Given Linux is more deterministic, but Windows should be able to make LabVIEW run more like deterministic software through the use of altering the priority level in "Task Manager" Guide: http://www.wikihow.com/Change-Process-Priorities-in-Windows-Task-Manager).

I just tested the UDP parsing LabVIEW program while running on Windows in "Real Time Mode", chosen in Task Manager. From my understanding, this allows LabVIEW to run in realtime.

Untitled11.png

The timestamps were synced to 1ms resolution, but Windows was locked while the LabVIEW front panel continued to run and be updated.

1) Is this an option to get software 1588 PTPv2 working?

2) How do I prevent LabVIEW from locking up the computer while running LabVIEW in Real-time mode?

 

I am using Network Published Shared Variables between the PXIe-1065, cRIO-9035, and Windows Laptop (HP Z-Book with I7 processor running Windows 7).

The shared variables are altered and read from all three devices connected to the 1588 PTPv2 network.

The Network Published Shared Variables contain a TimeStamp, which is modified by the last device who wrote to a variable.

In order to compare the shared variable data with other data (read using Analog/Digital Converters on the PXIe), the clocks on the network must be synchronized.

 

If more people could use software 1588 on a Windows OS, then LabVIEW would be an option for people that need to synchronize multiple Windows PCs.

LabVIEW would most likely be more popular as a one-stop system solution for businesses that need timestamped data at the 1ms level or need the systems to have the same clock.

 

3) Please let me know if you have any recommendations.

 

Thank you,

Keith

0 Kudos
Message 11 of 13
(1,014 Views)
Solution
Accepted by topic author KeithLV

LindsW,

 

SOFTWARE 1588 PTPv2 WORKS ON THE WINDOWS 7 LAPTOP!!!!

At the top of the front panel indicator "timeDifference1588_Windows", I compare the difference between the received 1588 PTPv2 time and the local Windows 7 system time on the Laptop.

Untitled1.png

Steps to get it to work:

1) Up LabVIEW's priority in Task Manager

a) type taskmgr into the bottom search bar

b) right click-->send to...-->create desktop shortcut

c) right click on the shortcut you just made on the Windows desktop --> select properties --> advanced

d) select "Run as administrator"

Untitled2.png

 

2) Now increase the priority of LabVIEW on your windows machine to get closer to real-time performance for the 1588 time server

a) Go to "processes" tab and right click on Labview and set priority to High

DO NOT SELECT "REALTIME"!!! IT WILL MAKE WINDOWS UNRESPONSIVE AND LabVIEW WILL LOCK UP YOUR COMPUTER!!!

Untitled3.png

 

 

I am really bumbed out that I cannot respond with the Windows PC due to time constraints...

Typically 1588 PTPv2 receives the grandmaster time, then responds with the propogation delay or offset to compensate for how long it took for the time signal to reach the 1588 client. In other words, the client sends back the offset to the grandmaster host to tell it how long it took for the timestamp to travel over the network.

 

We will use a 1588 capable switch (costs around 5k, but will significantly help because the network switches of this caliber actually offset the time across the switch to make the time from the grandmaster more accurate).

Table for possible switches to order (viewed from the 6683 user manual):

Untitled4.png

 

Please see the attached WORKING projects for use with a windows Laptop using software PTPv2 and a PXIe using hardware NI-6682 1588 PTPv2.

The Laptop project runs on any Windows 7 computer.

I also included code for a cRIO to be used with 1588 per this forum discussion: http://forums.ni.com/t5/LabVIEW/NI-Sync-with-cRIO-9035/m-p/3332756#M977815

The PXIe/cRIO project contains both LabVIEW code to start the PXIe grandmaster and also LabVIEW code to monitor 1588 PTPv2 on a cRIO-9035.

 

Challenge to the LabVIEW team:

PLEASE INCORPORATE SOMETHING LIKE THIS TO PROMOTE SYNCHRONIZATION BUILT-IN TO LabVIEW!!!!!!

This contains a great start and gets you half of the way there for full software 1588 PTPv2 supported by LabVIEW.

All you would need to do is figure out how to send updates from the LabVIEW 1588 clients to the grandmaster (In order to adjust offsets and propogation delay for the network).

 

Thank you,

Keith

Message 12 of 13
(1,003 Views)

I think you are wrong but I'm not sure.

With your method you do not override the windows system clock.

You have to use a 1588 software client or a 1588 hardware client

 

Sébastien
CLA, CTA
0 Kudos
Message 13 of 13
(368 Views)