RTC
®
5 PC Interface Board
Rev. 1.9 e
8 Advanced Functions for Scan Head and Laser Control
179
8.7.2 Compensation of Linear Move-
ments
Processing-on-the-fly correction for linear workpiece
movements can be activated via the list commands
set_fly_x and/or set_fly_y or alternatively via the list
commands set_fly_x_pos and/or set_fly_y_pos or
via set_mcbsp_in or set_mcbsp_in_list
(
Mode
= 1…3)
(1)
. A scaling factor must thereby be
specified.
With set_multi_mcbsp_in or
set_multi_mcbsp_in_list, you can activate addi-
tional Processing-on-the-fly correction with posi-
tional values for linear motion in all three coordinate
directions without bit-resolution restrictions. No
scaling factor is required.
Processing-on-the-fly correction can be stopped
(simultaneously for both directions) via the command
fly_return (see the corresponding notes on
page 186).
Correction via Encoder Counter(s)
If position values for Processing-on-the-fly correction
are forwarded via the internal encoder counters, then
Processing-on-the-fly correction must be activated
via set_fly_x and/or set_fly_y. Here, the scaling
factor [in bits per count] defines the relation between
the shift [in bits] of the current output position in the
image field and one counter pulse (count) of the
corresponding encoder counter (see below).
The set_fly_x or set_fly_y command will reset the
respective encoder counter (Encoder0 or Encoder1)
to zero
(2)
.
Thereafter, the output value is calculated from the
current output position by adding (for each direction)
the product of the scaling factor and the current
counter value. This correction is performed every
10 µs
(3)
.
Notes
• set_fly_x and set_fly_y can be used in combi-
nation for 1D Processing-on-the-fly applications
(e.g. an obliquely angled conveyor belt) as well as
for encoder-based 2D Processing-on-the-fly appli-
cations (e.g. an XY translation stage), particularly
for separate or separable marking tasks in the real
image field. For continuous marking in the virtual
image field, SCANLAB instead recommends using
set_fly_2d (see chapter 8.7.4, page 184).
Determining Scaling Factors
If the workpiece position is to be registered via one
(or two) incremental encoder(s), then a calibration
procedure will be required to determine the scaling
factor:
First, the command get_encoder must be used to
determine the encoder increments i
x
and i
y
[in counts
per mm] for each direction:
Read the counter start value (via get_encoder)
and begin the movement
Stop the movement and read the counter end
value (via get_encoder)
(4)
Measure the distance travelled in mm
The encoder increment i can then be calculated as
follows:
i = (counter end value – counter start value) /
distance travelled
In a second step, the scaling factors
Scale
x
and
Scale
y
[in bits per count] can be calculated from the
determined encoder increments as follows:
Scale
x
= K / i
x
Scale
y
= K / i
y
whereby K is the calibration factor [in bits per mm]
(see page 119).
If the workpiece moves at a constant speed v
x
or v
y
[in mm per second] and an encoder simulation was
activated via simulate_encoder, then the scaling
factors are calculated as follows:
Scale
x
= K · v
x
/ (1000000 counts/s)
Scale
y
= K · v
y
/ (1000000 counts/s)
It might be necessary to adjust the signs of the scaling
factors to the direction of movement.
(1) There are restrictions on combining Processing-on-the-fly
corrections with each other (see the section "Overview" on
page 178).
(2) With set_control_mode, bit#9 can be set in advance to deter-
mine whether the counter should reset immediately or only
after a subsequent start trigger (i.e. with a subsequent external
start signal, simulate_ext_start or simulate_ext_start_ctrl
command, possibly postponed by a track delay defined via
simulate_ext_start, set_ext_start_delay or
set_ext_start_delay_list; also see set_control_mode, bit#2).
If the counter only gets reset after the subsequent trigger, then
this effectively eliminates the 10 µs jitter (random time offset
between the start signal and the list start).
(3) The encoder counters are 32-bit counters (for signed 32-bit
values). If the maximum (minimum) count is reached, then
counting will continue with the minimum (maximum) count.
(4) Alternatively, the counter start and end values can be stored in
a buffer on the RTC
®
5 via the list command store_encoder
and then retrieved from there via the control command
read_encoder.