RTC
®
4 PC Interface Board
Rev. 1.3 e
9 Software
63
innovators for industry
C
In C, you can choose either
implicit linking
– also
known as static load or load-time dynamic linking –
or
explicit linking
– also known as dynamic load or
run-time dynamic linking.
Implicit Linking
To accomplishing implicit linking, include the header
file
RTC4impl.h
and link with the (Visual C++) import
library
RTC4DLL.LIB
for building the executable.
Call the RTC
®
4 commands you need like
goto_xy(1000, 2500);
for causing a jump to location 1000, 2500.
Explicit Linking
To accomplishing explicit linking, include the header
file
RTC4expl.h
. Before calling any RTC
®
4 function,
initialize the DLL by calling the function
RTC4open
(which is defined in the file
RTC4expl.cpp
).
When you are finished using the RTC
®
4, close the DLL
by calling the function
RTC4close
(also defined in the
file
RTC4expl.cpp
).
For building the executable, link with the file
RTC4EXPL.OBJ
, which you can generate from the
source code
RTC4expl.cpp
.
Call the RTC
®
4 commands you need, like
goto_xy(1000, 2500);
for causing a jump to location 1000, 2500.
Pros and Cons of Implicit and Explicit Linking
9.3 Initializing the RTC
®
4
At the beginning of each RTC
®
4 application program,
you need to perform the following steps:
(1)
Download the correction file(s) to the RTC
®
4
(command
See
using two different correction files.
(2)
Download the DSP program file
(command
).
The RTC
®
4 signal processor starts automatically
after this command.
Note
When the RTC
®
4 processor starts, the scanner output
position is set to the point (0|0). This point might be
shifted by the image field correction table.
Therefore it is recommended to load the correction
file(s)
before
loading the program file to make sure that
the initial output position is correct.
(3)
Set the laser mode
(command
).
(4)
Assign the correction file(s) to the
scan head control port(s) if necessary.
The default assignment (after each reset of the
RTC
®
4) is:
– The first scan head control port uses
correction table #1.
– The second scan head control port is off.
Use the command
to change to a different assignment.
(5)
Define the scanner delay mode
(variable polygon delay or constant polygon
delay; command
(6)
Load a table for the variable polygon delay
if necessary (command
).
(7)
Set the FirstPulseKiller length (YAG only)
(command
(8)
Set the stand-by pulses (usually CO
2
only)
(command
(9)
Load the list(s).
(10)
Enable the external start input if necessary
(command
The remaining settings (laser timing, laser delays,
scanner delays, jump speed and marking speed)
are set by means of list commands.
Implicit Linking
Explicit Linking
Necessary
Files
RTC4impl.h
,
RTC4DLL.LIB
RTC4expl.h
,
RTC4expl.cpp
Advan-
tage
Easiest linking
method
Eliminates the
need to link the
application with
an import library
Negative
Aspect
Need to link the
application with a
compiler-specific
import library
Need to initialize
(
RTC4open
) and
close (
RTC4close
)
the DLL