FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

set date and time

Hi everybody,
   I have a cFP-2020 module, and I need time infos for custom datalogging (I'm not using NI datalog).

   I know I must set Timezone in ni-rt.ini configuration file, and I know I have  RT Set Date and Time VI.

   My actual problem is that I haven't found documentation of cFP-2020 onboard clock; does it have one? I cannot use a time server, because my application will be embedded, and I'll have to comunicate to a (very) remote pc by RS-232 (I'll have poor baudrate).

   Of course, I can create a custom time-server via RS-232, that is, in my communication protocol I can provide for periodic time and date set (say each hour).

   Thanks everybody!!!

graziano

0 Kudos
Message 1 of 9
(4,443 Views)

Ciao Graziano,

sure, the (c)FP-2xxx series controllers do have an onboard clock. This onboard clock is used for timing purposes e.g. for timestamping and so on. Additionally these modules have a battery that buffer the time, when no power is supplied. So if you supplied the time once, the internal clock should take care of the time (timeserver no longer needed). But be sure, you synchonize this clock from time to time with a real time clock, because I think, that they diverge because of uneven ticks....
Hope this helps!

Good luck,

Stefan Smiley Happy
*********************************************************
Impossible is nothing - nothing is impossible
*********************************************************
Message 2 of 9
(4,439 Views)
Also be careful where you get a 'time' from within the Fieldpoint controller.
We found the timestamps associated with FP Read events to be more accurate
(less drift) than the timestamps returned by the LV date and time functions.  Don't
know why and this is strictly empirical but our results were very consistent.  We
eventually had our data gathering loop write a data reading timestamp to a LV2
global and used that as a universal 'time' source.

Matt
Message 3 of 9
(4,435 Views)
Matthew,

thanks for this further info, you're right. This applies, when you have a constant connection to the timeserver.
Thought, if not, the timestamp returned be the FP Read.vi would be the same as all other "times" returned be the system.

Regards,

Stefan





*********************************************************
Impossible is nothing - nothing is impossible
*********************************************************
0 Kudos
Message 4 of 9
(4,429 Views)
Is the divergence similar to what used to happen in the PC world
where the OS clock was set at boot but would gradually diverge
from the hardware clock?  It feels that way.

In our system we were not using the FP timeserver synchronization
but instead passed in correct times periodically via the application.
We noticed that the LV time functions did not follow our updates
while the data reading timestamps did.  Was quite a puzzler until
we figured out what was going on.

Matt
0 Kudos
Message 5 of 9
(4,423 Views)

Yes Matt,

it seems that every tick lasts a bit longer as a "real time tick"... I don't don't know what clock and dividers are used....
We had some applications that we had synchronized every 10s and this was quite enough for our purposes.
Btw, how did you send the real time to controller (with the Set Date/Time.vi remotly from LabVIEW dev. sys?)

Stefan



*********************************************************
Impossible is nothing - nothing is impossible
*********************************************************
0 Kudos
Message 6 of 9
(4,420 Views)
Thanks people,
   I'm glad to see that this discussion is interesting....

   Only one thing more..... Where can I find official NI docs about these features (and about, for example, change internal battery)? I have to provide my customer with exact maintenance instructions!

   Thanks again, and Merry Christmas!

graziano

0 Kudos
Message 7 of 9
(4,413 Views)
We actually use a library function call, the code is in this thread:
http://forums.ni.com/ni/board/message?board.id=110&message.id=2607#M2607

I think this code writes directly to the hardware clock and the FP Read timestamp
returns the hardware clock, whereas the LV time functions use the OS clock.  Is
there a way to force the OS clock to reset itself from the hardware clock (other
than by a reset 😉 )?  This was all 7.1 so may be moot by now.

Thanks.

Matt
Message 8 of 9
(4,406 Views)
Hi!
   and thanks again!

graziano
0 Kudos
Message 9 of 9
(4,393 Views)