RT
C
®
4 P
C
In
te
rf
a
ce
B
o
ar
d
R
e
v.
1.
3
e
9S
o
ft
w
a
re
68
printf("press any key to start ");
while(!kbhit());
(void)getch();
printf("\n\n");
// mark "SCANLAB", record the measured position bend and transfer it to the PC
set_laser_mode(1);// set YAG mode 1
set_start_list(1);// timing, delay and speed preset
set_laser_timing(50,// half of the laser signal period
5,5,// pulse width of signal LASER1 and dummy value
0); // time base; 0 corresponds to 1 microsecond.
// Otherwise, the time base is 1/8 microseconds.
set_firstpulse_killer_list(8*150);// pulse width of signal LASER2
// timebase is 1/8 microseconds
set_scanner_delays(25, // jump delay in 10 microseconds
10, // mark delay in 10 microseconds
5); // polygon delay in 10 microseconds
set_laser_delays(100, // laser on delay in microseconds
100); // laser off delay in microseconds
set_jump_speed(2500.0); // jump speed in bits per milliseconds
set_mark_speed(1000.0); // marking speed in bits per milliseconds
jump_abs(0,0);
save_and_restart_timer();// start marking time measurement
set_trigger(SamplePeriod, StatusAX, StatusAY);// start sampling, set sampling
period and channels
// mark "SCANLAB"
jump_abs(-3040, 380);// S
mark_abs(-3230, 570);
mark_abs(-3610, 570);
mark_abs(-3800, 380);
mark_abs(-3800, 190);
mark_abs(-3610, 0);
mark_abs(-3230, 0);
mark_abs(-3040, -190);
mark_abs(-3040, -380);
mark_abs(-3230, -570);
mark_abs(-3610, -570);
mark_abs(-3800, -380);
jump_abs(-1900, 380);// C
mark_abs(-2090, 570);
mark_abs(-2470, 570);
mark_abs(-2660, 380);
mark_abs(-2660, -380);
mark_abs(-2470, -570);
mark_abs(-2090, -570);
mark_abs(-1900, -380);
jump_abs(-1520, -570);// A
mark_abs(-1520, 190);
mark_abs(-1140, 570);
mark_abs(-760, 190);
mark_abs(-760, -570);
jump_abs(-760, 0);
mark_abs(-1520, 0);
jump_abs(-380, -570);// N
mark_abs(-380, 570);
mark_abs(380, -570);
mark_abs(380, 570);
jump_abs(760, 570);// L
mark_abs(760, -570);
mark_abs(1520, -570);
jump_abs(1900, -570);// A
mark_abs(1900, 190);
mark_abs(2280, 570);
mark_abs(2660, 190);
mark_abs(2660, -570);
jump_abs(2660, 0);
mark_abs(1900, 0);
jump_abs(3040, 0);// B
mark_abs(3610, 0);
mark_abs(3800, 190);
mark_abs(3800, 380);
mark_abs(3610, 570);
mark_abs(3040, 570);
mark_abs(3040, -570);
mark_abs(3610, -570);
mark_abs(3800, -380);
mark_abs(3800, -190);
mark_abs(3610, 0);
jump_abs(0,0);
save_and_restart_timer();// stop marking time measurement
set_end_of_list();
execute_list(1);// start marking
// wait as long the execution is finished
do {} while(read_status() & 0x010);
if (get_time() > (double)MaxWavePoints*SamplePeriod*1e-5)// marking time > buffer
time ?
WavePoints = MaxWavePoints;
else
WavePoints = (unsigned short)(get_time()/((double)SamplePeriod*1e-5));
get_waveform(1, WavePoints, &Ch1[0]); // get the waveforms from channel 1&2
get_waveform(2, WavePoints, &Ch2[0]);
// print galvo measured positions
printf("Time [10us] PhiX [Bit] PhiY [Bit]\n");
printf("-----------------------------------\n");
for (i=0; i<WavePoints; i++)
printf("%11d %11d %11d\n", i*SamplePeriod, Ch1[i], Ch2[i]);
printf("press any key to terminate program ");
while(!kbhit());
return;
}