Chapter 3
Programming
12
RAYLASE IPG Interface Board
MN027 / v1.1.0
3.3
Programming sequence
Initialisation:
Init_Scan_Card ();
// Initialise Scan Card
Load_Cor (lpstrFileName);
// Load Correction File
Set_Mode (0x0420);
// Set YAG1-mode (Bit 5 = 1, Bit
4 = 0)
Setting Master Oscillator input of IPG Laser with Control Commands:
Set_Start_List_1();
// Filling Job Data into List 1
Set_Delays_7_8 (t1, t2);
// Set Laser Modulation Signal
Set_Delays_9_10 (t3, t4);
// t4 = 0
Write_Port_List (0x0A, value);
// Set Laser Power
...
// List Commands for Marking
Set_End_Of_List();
...
// Start Marking
Write_Port (0x0C, 0x0010);
// Switch-On Master Oscillator of
IPG Laser
...
// Wait 10msec
Execute_List_1();
// Execute Job
...
Write_Port (0x0C, 0x0000);
// Switch-Off Master Oscillator
of IPG Laser
Setting Master Oscillator input of IPG Laser with List Commands:
Set_Start_List_1();
// Filling Job Data into List 1
Write_Port_List (0x0C, 0x0010);
// Switch-On Master Oscillator of
IPG Laser
Long_Delay 1000();
// Wait 10msec
Set_Delays_7_8 (t1, t2);
// Set Laser Modulation Signal
Set_Delays_9_10 (t3, t4);
// t4 = 0
Write_Port_List (0x0A, value);
// Set Laser Power
...
// List Commands for Marking
Write_Port_List (0x0C, 0x0);
// Switch-Off Master Oscillator
of IPG Laser
Set_End_Of_List();
...
Execute_List_1();
// Execute Job
Checking Laser Alarms and Resetting of IPG Laser:
Read_Port (0x08);
// Read Bit 6 of Port A for
checking of Laser Alarm
// If Bit 6 set to FALSE then an
error occured
...
Write_Port (0x0C, 0x0020);
// Set Signal Remote_Execute_1 to
TRUE
...
// Wait 1ms
Write_Port (0x0C, 0x0);
// Set Signal Remote_Execute_1 to
FALSE