EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - time_fix_f_off; time_update

Scanlab RTC 5 PC Interface Board
622 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC
®
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
530
innovators for industry
Normal
List Command
time_fix_f_off
Function stores in a buffer the current time and date of the RTC
®
clock/calender or a forward-dated
date and time for use with mark_date and mark_time.
Call
time_fix_f_off( FirstDay, Offset )
Parameters
FirstDay
This parameter (an unsigned 32-bit value) defines the starting number for
determining the Julian calendar day from the current date of the RTC
®
calendar:
Counting proceeds from
FirstDay
to
FirstDay
+ 364 (+1 for leap years).
Offset
forward dating in seconds (as an unsigned 32-bit value);
allowed range: [0 (2
32
1)]
Comments Before calling time_fix_f_off, time_fix_f or time_fix, synchronization of the RTC
®
5
and PC time should be performed (at least once after each load_program_file) via
time_update.
The complete time can be marked through multiple calls of mark_time and the
complete date through multiple calls of mark_date. The commands time_fix_f_off,
time_fix_f or time_fix must therefore be called before these marking commands so
that the to-be-marked time or date won’t change during marking.
•If time_fix_f_off, time_fix_f or time_fix are not called again before a time or date
marking, then the last marked time will be marked again. If time_fix_f_off, time_fix_f
or time_fix aren’t called at all after a load_program_file, then a time of 00:00 or a date
of January 1, 2000 will be marked.
•If
Offset
= 0, then the current date and current time are fixed. One practical use of
forward dating (
Offset
> 0) is for setting a date of expiry based on the current date.
Backdating (
Offset
< 0 ) isn’t possible.
RTC
®
4
RTC
®
5new command
Version info Last change with version DLL 524, OUT 526
References time_fix, time_fix_f, time_update, mark_time, mark_date
Ctrl Command time_update
Function sets the RTC
®
5’s 24-hour clock and calendar to the current PC time.
Call
time_update()
Comments The RTC
®
5 board’s clock doesn’t contain a battery backup. Therefore, the time_update
command must be called after each load_program_file if the RTC
®
5’s 24-hour clock
and calendar are to be calibrated.
The base value for internal time counting is set to January 1, 2000, 00:00 by
load_program_file whereas to the PC time by time_update. An internal seconds
counter is set to 0 via load_program_file or via time_update, but is always driven by
the quartz-controlled 10 µs clock.
Before marking with mark_date or mark_time, you must call time_fix, time_fix_f or
time_fix_f_off so that the current time can be captured (as sum of the base value and
the current value of the internal seconds counter) and formatted.
RTC
®
4
RTC
®
5 unchanged
(the command was previously only available for the RTC
®
SCANalone Board, i.e. the
standalone version of the RTC
®
4 board)
References time_fix, time_fix_f, time_fix_f_off, mark_date, mark_time

Table of Contents

Related product manuals