RTC
®
5 PC Interface Board
Rev. 1.9 e
7 Basic Functions for Scan Head and Laser Control
150
innovators for industry
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
®
5
(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
. Afterward, the RTC
®
5
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
or
.
Subsequently, the time (hours, minutes, seconds) can
be marked via
and the
date (year, month, day, day-of-the-week) via
. These mark
commands use the time and date supplied via
,
output of the previously-defined indexed text strings
for time and date.
For marking date and time with the RTC
®
5, one can
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
based on the current date and current time.
7.5.2 Marking Serial Numbers
Serial numbers containing up to 12 digits can be
marked via the commands
. 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
, serial-
number-set 0 is selected. When using multiple serial-
number-sets, you’ll need to first select the desired set
via
(see
notes below).
The control commands
and
let you specify a starting serial
number (max. 10 digits) and an increment size for
each serial-number-set. After initialization with
, all starting serial numbers are
set to 0 and all increment sizes to 1.
With each call of
),
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
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
or
only select that set via the list command
,
always applied to the serial-number-set most
recently selected via
serial-number-set 0 after
• 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
This also lets you determine (among other things)
whether the current number was or wasn’t incre-