EasyManua.ls Logo

Scanlab RTC6 PCIe Board - Example Code (C)

Scanlab RTC6 PCIe Board
1004 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC6 boards
Doc. Rev. 1.0.21 en-US
7 Basic Functions for Scan Head Control and Laser Control
142
innovators for industry
7.1.4 Example Code (C)
The following example C source code shows the
commands of a simple laser scan application.
A point, a square and a circle are marked in
CO
2
Mode. Here it is assumed that the
RTC4 Compatibility Mode is activated.
The code must be included in a user program, see
Chapter 6.2.5 ”Example Code (C)”, page 100.
// Scan system initialization
// Loading and assigning a correction file
ErrorCode = load_correction_file( 0, // initialize like
"
D2_1to1.ct5
"
,
1, // table (#1 is used by default)
2 ); // use 2D only
if ( ErrorCode )
{
printf(
"
Correction file loading error: %d\n
"
, ErrorCode );
free_rtc6_dll();
return;
}
select_cor_table( 1, 0 ); // assigning correction table #1 to scan head connector #1 (default)
// Laser control initialization, see Chapter 7.4 ”Laser Control”, page 184.
// Setting the
CO
2
Mode
set_laser_mode( 0 );
// Setting and enabling the Signals for “Laser Active” Operation
set_laser_control( 0x18 ); // All Laser Control Signals active-LOW (Bit #3 and #4)
// set_laser_control must be called at least once to activate Laser Control Signals.
// Later on enable_laser/disable_laser would be sufficient.
// Opens List 1
set_start_list( 1 );
// Setting the standby pulses
set_standby_list( 800, 8 );
// In RTC4 Compatibility Mode the standby parameters are specified in units of 1/8 µs.
// The
RTC6 board
multiplies the specified values by 8 to convert them to
// integer-multiple of 1/64 µs. Half of the standby output period = 100 µs.
// Pulse length of the standby pulses = 1 µs.
// Timing, delay and speed preset
// Setting the Scanner Delays (see Chapter 7.2.2 ”Scanner Delays”, page 147).
set_scanner_delays( 25, 10, 5 );
// Jump Delay = 250 µs (specified in [10 µs])
// Mark Delay = 100 µs (specified in [10 µs])
// Polygon Delay = 50 µs (specified in [10 µs])

Table of Contents