RTC
®
4 PC Interface Board
Rev. 1.3 e
10 Commands And Functions
95
innovators for industry
Ctrl Command load_correction_file
Function
loads the specified field correction file into RTC
®
4 memory (as table #1 or #2) and
performs additional scaling, rotation and translation of the correction file
Parameters
FileName
name of the correction file as a pointer to a null-terminated ANSI string
cor_table
determines whether the file shall be stored as correction table #1 or #2
(see command
kx, ky
Gain values for scaling the correction table.
Allowed range: [ – 1.2 … – 0.8, +0.8 … +1.2].
(See comments below.)
phi
Rotational angle in degrees
Allowed values: [ – 10° … +10°] + i · 90° ;
i integer
Positive angles: rotation is counterclockwise
x_offset,
y_offset
additional offset in
bits
allowed range: [ – 30000 … +30000]
Result
error code as a signed 16-bit value:
Value
Description
0
Success.
3
File error.
4
Verify error.
8
System driver not found, or the system driver is locked by another application.
10
Parameter error.
11
RTC
®
4 not found.
12
A 3D correction file could not be loaded, because the 3D option is not installed.
See
Integration
Pascal:
function load_correction_file(FileName: pchar; cor_table: smallint;
kx, ky, phi, x_offset, y_offset: double): smallint;
C:
short load_correction_file(const char* FileName, short cor_table,
double kx, double ky, double phi, double x_offset, double y_offset);
Basic:
function load_correction_file(ByVal FileName$, ByVal cor_table%,
ByVal kx#, ByVal ky#, ByVal phi#, ByVal x_offset#, ByVal y_offset#)%
Comments
• This command should be called at the beginning of an application program, before
loading the program file. See note in
chapter 9.3 "Initializing the RTC
• The RTC
®
4 (only the RTC
®
4 2D version) can store two different correction files at the
same time, e.g. for use in a double scan head configuration. The files must be assigned
to the two scan heads with the command
chapter 5.3 "Using Two Different Correction Files", page 42
.
• To compensate possible misalignment or to align the image fields of the two scan heads
precisely, each correction file can be scaled, rotated and translated (shifted) when it is
loaded into the RTC
®
4.
• The parameters
kx
,
ky
,
phi
,
x_offset
and
y_offset
have to be
specified. If no additional
transformation is required, the parameters must be set to
(.., .., 1, 1, 0, 0, 0)
.
• By setting the gain factor
kx
or
ky
to a
negative
value, the corresponding axis is flipped.
• Modification of 3D correction files is only reliable for Z = 0. For other Z values and
parameters other than
(.., .., 1, 1, 0, 0, 0)
, the RTC
®
4 calculates output values
which may deviate from the expected values.
References