IF-RIO

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Date and Time on cRIO 9012

Hi guys:
   I seem to have trouble setting the exact time on a cRIO-9012 controller using RT Set Date and Time. I'm testing with just a simple VI running targeted that sets the time according to front panel inputs. It seems like the time on the controller is about 4 seconds ahead of what I set. I'm most concerned with getting the seconds accurate. I tried rebooting the controller and the time remains 4 seconds ahead. Any ideas?
0 Kudos
Message 1 of 4
(7,618 Views)

Hi skwcheng,

could it be that the delay comes from the time the VI needs to start up via the ethernet connection to the RT controller? When you set the time manually on the front panel and then start the VI, you will lose some time for the VI transfer to the target device and so on. In order to really synchronize the time values with your PC, you will need to use some Real Time Shared Variables or something like that, I think. This way you can transfer the right time deterministically while the VI is already running.

Regards,

Stefan

0 Kudos
Message 2 of 4
(7,230 Views)
Thanks for the input.

I've tried this many times and in previous tests the time has been random. It could be 50 seconds faster than what it was supposed to be but in recent tests it has been around 4 seconds. During my test, I actually have accounted for the time it takes to download and deploy the time-setting VI. An interesting note is that running the same code on a cFP-2120 does exactly what is expected but not on the newer cRIO-9012.

Any feedback on similar issues welcome.
0 Kudos
Message 3 of 4
(7,223 Views)
Can you post the vi you are using to both set and read the time on the 9012?
0 Kudos
Message 4 of 4
(6,993 Views)