7.5 Marking Dates, Times and
Serial Numbers
Many applications need to mark the current time and
date or product serial numbers. For this purpose, the
®
RTC
5 command set includes a set of supporting
commands.
Before times, dates and serial numbers can be
marked, the corresponding characters and text
strings must be defined as indexed characters and
indexed text strings. This is described
Indexed Text Strings for Times, Dates and Serial
Numbers" on page
80. Separate text strings can be
defined for marking times/dates and serial numbers.
7.5.1 Marking the Date and Time
Before times and dates can be marked, the RTC
(after each start-up) needs to synchronize with the
PC's time and obtain the current values for time and
date:
®
• Calibration of the RTC
5's 24-hour time and date
is achieved through comparison with the PC's
time via time_update. Afterward, the RTC
internally maintains the date and time with a
quartz-controlled 10 µs clock.
• The current time and date can be queried or
stored with the command time_fix,
time_fix_f_off.
Subsequently, the time (hours, minutes, seconds) can
be marked via
mark_time
or
date (year, month, day, day-of-the-week) via
mark_date
or mark_date_abs. These mark
commands use the time and date supplied via
time_fix,
time_fix_f
or
time_fix_f_off
output of the previously-defined indexed text strings
for time and date.
For marking date and time with the RTC
choose between Gregorian dates and Julian days as
well as between the 12-hour and 24-hour time.
For marking dates of expiry (or something similar),
you can also use
time_fix_f_off
based on the current date and current time.
®
RTC
5 PC Interface Board
Rev. 1.9 e
7 Basic Functions for Scan Head and Laser Control
"Defining
®
5
®
5
time_fix_f
or
mark_time_abs
and the
and start
®
5, one can
to fix a forward date
7.5.2 Marking Serial Numbers
Serial numbers containing up to 12 digits can be
marked via the commands
mark_serial_abs. The commands initiate output of
command lists for the numerals 0...9 that were previ-
ously defined as indexed characters or text strings.
You can also specify if and how leading zeros should
be handled.
®
The RTC
5 board manages up to 4 serial-number-sets
(each with its own serial number and increment size).
After initialization with load_program_file, serial-
number-set 0 is selected. When using multiple serial-
number-sets, you'll need to first select the desired set
via
select_serial_set
or
select_serial_set_list
notes below).
The control commands
set_serial
set_serial_step
and the list command
set_serial_step_list
let you specify a starting serial
number (max. 10 digits) and an increment size for
each serial-number-set. After initialization with
load_program_file, all starting serial numbers are
set to 0 and all increment sizes to 1.
With each call of
mark_serial
the current serial number of the currently selected set
is BCD-encoded and (even before execution of the
BCD-encoded serial number marking) the serial
number will be incremented by the specified
increment size. If a serial number is to be omitted,
then
mark_serial
can also execute a blank marking
(digits = 0), which increments the serial number by
1 (not by the specified increment size).
Notes
• If a serial-number-set is to be marked via
mark_serial
or mark_serial_abs, then you can
only select that set via the list command
select_serial_set_list. mark_serial,
mark_serial_abs
and
set_serial_step_list
always applied to the serial-number-set most
recently selected via
select_serial_set_list
serial-number-set 0 after load_program_file).
• You can use the control command
to query the number of the serial-number-set
most recently selected via
as well as the current serial number of that set
(i.e. typically the serial number most recently
marked via
mark_serial
This also lets you determine (among other things)
whether the current number was or wasn't incre-
mark_serial
or
(see
and
(or mark_serial_abs),
are
(or to
get_list_serial
select_serial_set_list
or mark_serial_abs).
150
Need help?
Do you have a question about the RTC 5 PC Interface Board and is the answer not in the manual?