Can I use "Get Date/ Time in Sync" function in NI Time Sync?

Updated Mar 26, 2024

Reported In

Hardware

  • CompactRIO Chassis
  • CompactRIO Controller

Software

  • LabVIEW

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

Based on this link , it mentioned this VI obtains date and time info from computer clock. If I use my cRIO or other RT target, will this vi gets date/ time info from RTC or still getting from computer clock?

If I use the ptp synchronization function of my cRIO to synchronize the clock, will the Get Date/ Time in Seconds  function reflected with the synchronization as well? or should I use timesync function to get the time?

Solution

  1. If you are calling the Get Date/Time In Seconds Function (or another similar one) in the RT application then it will return the date and time of the RT target it was called.

  2. When you have an RT target synchronized in your network via PTP then your RT target's time will be synchronized with the master node time. So, it will reflect the synchronization.
    This article is a very good getting-started material: Using NI-TimeSync to Configure IEEE 1588 and 802.1AS Time References. The LabVIEW shipping examples mentioned there will help you manage the synchronization functionality and monitor its status.