NI myRIO App Development

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

Get current time

Hi,

is it possible to get current time from myRIO RT side?

I have studied Get Timestamp vi but I think that I can't get there current time.

-Jussi

0 Kudos
Message 1 of 5
(2,621 Views)
4 REPLIES

Re: Get current time

If I recall correctly, you can read the time on the RT target of the myRIO just fine.  The problem is that there is no backup battery, so every time myRIO reboots, the time resets.  One option is to have a time-sync mechanism in your program that sets the time every time your program starts up (assuming that it is connected to a PC when it starts).  After that, you can get the time from the RT.


DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 2 of 5
(1,821 Views)

Re: Get current time

Ok. So the device is totally cold without power cord. Thanks to let me know.

0 Kudos
Message 3 of 5
(1,821 Views)

Re: Get current time

You can use a battery powered real time clock (e.g. RTC DS1307) to update the myRIO system time after reboot.

This and some more options you can find on community: How do I change time on myRIO?

Wolfgang

Message 4 of 5
(1,821 Views)

Re: Get current time

Thank you fot the link!

0 Kudos
Message 5 of 5
(1,821 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.