Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

set system time to myrio programmatically synchrinized with GPS

Hello,

 

I have succesfully connected the PMOD GPS to my RIO and i extract the time and date string from the NMEA sentence in the following format:

Time: HH:MM:SS
Date: DD/MM/YY

 

I would like to synchronize myrio system time to the GPS time. I have tried to use the nisyscfglvlib: Set Time.vi. For test purposes i try to set the time using a time stamp constant like the attached picture. However, when i run this code i get the following error. Where i can find this library and how do i add it to myrio? I

 

LabVIEW:  Failed to load shared library nisyscfg.*:nisyscfg_lv_sysapiPropertySetString:C    . Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.
LabVIEW:  Failed to load shared library nisyscfg.*:nisyscfg_lv_rmcfgPropertyGetItem:C    . Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.

 

Is there another way to set the time of myrio programmatically?

 

Thank you,

 

Christos

0 Kudos
Message 1 of 5
(6,807 Views)

Anyone?

 

0 Kudos
Message 2 of 5
(6,759 Views)

Hi ckyamaha, 

Below is an example on how to set a real time system's time using the System Configuration API.  
https://decibel.ni.com/content/docs/DOC-20082


It sounds like you may need to include the library on your myRIO when you configure it in NI-MAX.  If you haven't already installed the System Configuration API, you can do so from this link: https://decibel.ni.com/content/docs/DOC-13216

 

You can add the library to your myRIO in the Add/Remove Software menu in NI-MAX.  Instructions for installing software using NI-MAX can be found here: http://zone.ni.com/reference/en-XX/help/373925A-01/myriohelp/myrio_advanced_config/

Regards,
Kelly B.

National Instruments
0 Kudos
Message 3 of 5
(6,731 Views)

Hello Kelly,

 

Thanks for your response. Indeed the problem was the system configuration API, i installed it and now i can set the time using the VIs set system time and save settings. I would like to ask though what is the difference of reading the time and date using the Get Time/Date function from the Labview Timing Library vs using the get system time example you have suggested.

 

Thank you,

 

Christos

 

 

 

0 Kudos
Message 4 of 5
(6,716 Views)

Hi Christos, 

The Get Date/Time function in the LabVIEW Timing VIs Library returns a timestamp from the LabVIEW system time.  The System Configuration API's Hardware Property Node returns the current time for the remote system or network device specified.

Get Date/Time in Seconds Function: http://zone.ni.com/reference/en-XX/help/371361L-01/glang/get_date_time_in_seconds/ 

NI System Configuration API Property Node (Hardware) Descriptions: http://zone.ni.com/reference/en-XX/help/373107H-01/nisyscfg/property_node_hardware/ 

Regards,
Kelly B.

National Instruments
0 Kudos
Message 5 of 5
(6,701 Views)