RTC
®
4 PC Interface Board
Rev. 1.3 e
10 Commands And Functions
74
innovators for industry
Ctrl Command auto_cal
Function
starts or stops automatic self-calibration or re-calibrates the scan head
(requires a scan head with
automatic self-calibration option
)
Parameters
head
= 1:
calibration of scan head A (primary scan head connector)
= 2:
calibration of scan head B (secondary scan head connector)
command
Control parameter (unsigned 16-bit value):
= 0:
get reference values for subsequent calibration routines
= 1:
perform calibration routine
= 2:
turn off compensation
Result
error code as a signed 16-bit value:
0
No error.
1
Self-calibration sensor not found.
2
Deviations during a measurement cycle are too large.
3
The command cannot be executed because a list is executing at the moment.
4
Reference data not found.
5
Calibration error. (Error during calibration or error in reference data.)
6
Parameter error.
Integration
Pascal:
function auto_cal(head, command: word): smallint;
C:
short auto_cal(unsigned short head, unsigned short command);
Basic:
function auto_cal(ByVal head%, ByVal command%)%
Comments
• This command can only be used in combination with a scan head equipped with
sensors for automatic self-calibration.
• The command is not executed if a list is executing at the moment.
• The command
auto_cal(.., 0)
detects the current sensor positions and stores them
as reference values for subsequent calibration routines. This should be performed under
controlled, constant environmental conditions. The scan head must be at operating
temperature, i.e. the warm-up time should be at least 15 minutes.
The sensor positions are determined during a cycle of several measurements. If the deviations
between the individual measurements are too large (maximum – minimum > 5 bits), the
measurement stops and an error (error code 2) is returned. After successful determination of the
reference values, the results are stored in non-volatile memory on the RTC
®
4 board. This way, the
values are not lost when the system is shut down.
• The command
auto_cal(.., 1)
performs a new calibration of the scan head.
The command compares the current sensor positions with the reference values and
calculates suitable compensation values (for gain and offset) for each scanner.
The resulting compensation is applied to all subsequent vector outputs, until the
command
auto_cal(.., 1)
is called again or the compensation is turned off by the
command
auto_cal(.., 2)
.
• To compensate possible drift of the scanners, the command
auto_cal(.., 1)
should be
called regularly during operation. The calibration routine takes about 5 seconds
(depending on the amount of drift), the initial determination of the reference values
(
auto_cal(.., 0)
) takes about 30 to 50 seconds.
• After initialization of the RTC
®
4, or after a reset, the compensation is turned off.
However, the previously determined reference values are still available.