04-07-2014 08:30 AM
Hi,
Is it possible to change the time on myRIO using LabVIEW?
Indeed, I need to update the time on myRIO via a webservice.
Best regards
Enzo L.
04-07-2014 10:03 AM
Hey enzol,
You have a couple options for doing this. You could use a time server and SNTP to have your real-time target (myRIO in this case) connect to a time server at boot and update its clock.
More along the lines of what you're asking (I think) you can use the NI System Configuration API to update the time from LabVIEW. I created an example that demonstrates how to use a battery powered RTC (real time clock) to update the myRIO system time. You can find the code attached. Just ignore the RTC bit if you want to manually enter the current time.
Let us know if that helps or if you have more questions about this.
Thanks!
-Sam K
Join / Follow the LabVIEW Hacker Group on google+
04-08-2014 07:19 AM
Thank you a lot ! It's exactly what I need.
07-17-2014 02:20 PM
Hi Sam
I am trying to implement your solution, but it does not yield the expected results.
The wire with SECONDS, for example, has values that rather than range from 0-59 goes up to 255, clearly indicating that there are problems with the conversion of the extracted from the chip. So does the other wires, with totally nonsense values.
thanks
Helcio
07-17-2014 03:00 PM
Hi Sam,
I tried again, and now everything works. I was using the I2C READ MODE, but I have to use READ and WRITE MODE (as your example did) and this way works but I do not know why using I2C READ MODE does not work. Do you know why?
thanks
Helcio
07-17-2014 03:02 PM
Hey,
If you just use the read mode then no data is written to the RTC. Before you can read you need to send the correct command to tell the RTC that you are about to read. Without it you won't get the right data back.
-Sam K
LabVIEW Hacker
07-17-2014 03:04 PM
If I use the Set Time.vi, I get the deployement error:
Deploying nisyscfg.lvlib:Set Time.vinisyscfg.lvlib:Set Time.vi loaded with errors on the target and was closed.
LabVIEW: Failed to load shared library nisyscfg.*:nisyscfg_lv_sysapiPropertySetTimestamp: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_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.
Deployment completed with errors
How could I fix this?
Thanks
05-04-2015 03:06 AM
Hi all,
I use the same chip and i can update the date and time.The problem is that myrio enable the "Automatically adjuct clock for daylight saving time" after the update.
How can i fix it?
Thanks
Andy
04-11-2021 08:13 AM - edited 04-11-2021 08:14 AM
Hi, i am having the same problem: Deploying nisyscfg.lvlib:Set Time.vinisyscfg.lvlib:Set Time.vi loaded with errors on the target and was closed.
Did you resolve your problem? Can help me to solve this?
Many thanks in advance!
Tung.