(Laser cutting is currently at Development Stage)
Laser cutting control is provided within myCNC software.
The following global variables are often used for laser cutting applications:
Name | Global variable | Fuction |
---|---|---|
8119 | Setting up the PWM frequency to control modulation | |
GVAR_FOCUS_SET_ZERO | 8502 | Set zero for the focus axis |
GVAR_FOCUS_SET_MAX_POS | 8503 | Set maximum position for the focus axis |
GVAR_FOCUS_SET_MIN_POS | 8504 | Set minimum position for the focus axis |
GVAR_FOCUS_HARDLIMITS | 8505 | Set hardware limit port number for focus axis |
GVAR_AXPLUS_SET_ZERO | 8522 | Set zero for AxisPlus |
GVAR_AXPLUS_SET_MAX_POS | 8523 | Set maximum position for AxisPlus |
GVAR_AXPLUS_SET_MIN_POS | 8524 | Set minimum position for AxisPlus |
GVAR_AXPLUS_HARDLIMITS | 8525 | Set hardware limit port number for AxisPlus |
For more info on Global Variables in general, please consult this manual.
Notes:
gvarset(8523, 10000);
will set the program coordinate to be 0, and the machine zero will put 10000 pulses (i.e. 2 units) above the current position. Therefore, in this example, the current machine coordinate will be “-2”Writing a value to the Global variable register from Hardware PLC procedure will change Frequency of PWM outputs. This option available for special edition of the myCNC-ET7 control board.
A table below shows PWM period depend on 8119 register value
8119 value | PWM period |
---|---|
1-255 | (N+1)*5.12us |
256-511 | (N+512)*5.12us |
512-767 | (N+2560)*5.12us |
768-1279 | (N+3072)*5.12us |
1280-1535 | (N+3584)*5.12us |
1536-1792 | (N+5632)*5.12us |
The Laser Control settings window (Settings → Config → Technology → Laser control) allows for fine laser control at different speeds. This allows to prevent overheating when approaching corners, etc:
The following settings are available:
The myCNC Team provides the experimental laser cutting profile Y1366L on request. Note that at the time of writing the manual (November 2021) the profile is currently under development and is not yet intended for final release.
The main profile screen is displayed below:
The profile allows to select the following:
The profile also allows to use up to three pierce steps, and store up to 8 presets for laser cutting.
The modes can also be switched using the G130 command, for example:
G130 P1 G130 P2
The profile utilizes the following global variables:
GVAR_LASER_PRESET_SELECT | 8470 | Load a set of parameters for the corresponding preset number |
GVAR_LASER_PRESET_SAVE | 8471 | Save the current parameters as a cutting preset for the specified number |
It is possible to enable a special laser cutting mode for DXF import, that switches the typical tools (such as knives, marker/pen, etc) into laser cutting modes for die board cutting. In order to do so, go into Settings > Config > Technology > Laser control, and enable Die Board Cutting:
As a result, the modes will be available for selection at the DXF Import screen:
To read more about general DXF import settings, please consult the following manual: Importing DXF files into myCNC
For the Height (H) axis to work, a calibration process is required. This allows the system to determine the relationship between the height sensor reading and the actual torch height.
The calibration process is implemented in the M275 PLC procedure.
The procedure consists of the following steps:
The process is also shown in the images below:
The code for the calibration procedure is shown below:
#include vars.h #include pins.h do_laser_probing() { gvarset(8341,500); //AxisPlus Jog Speed 100mm/min gvarset(8342,5); //AxisPlus Jog Accel Time 0.005sec timer=0; slow=0; gvarset(8340,0-1); //AxisPlus Jog Negative Direction do{ a=gvarget(7203); if (slow==0) { if (a<800) { gvarset(8341,50); //AxisPlus Jog Speed 100mm/min gvarset(8340,0-1); //AxisPlus Jog Negative Direction slow=1; }; }; if (a<16) { timer=200000; }; timer++; }while(timer<100000); gvarset(8342,5); //AxisPlus Jog Accel Time 0.002sec gvarset(8340,0); //AxisPlus Jog Stop timer=0; do { a=gvarget(8332); timer++; }while(a!=0); pwm02=timer; gvarset(9717,0); //Set machine coordinate for AxisPlus to 0 timer=10; do { timer--; }while(time>0); }; do_laser_calibration() { gvarset(5740,999); //clear calibration (if any exists) timer=10; do { timer--; }while(time>0); timer=200; do { timer--; }while(time>0); timer=0; gvarset(5539,1); gvarset(8330,100); //Speed gvarset(8331,500); //Accel Time g0moveA(0x0,0x80,3000);//Axis Plus do { a=gvarget(8332); //obtain the state of AxisPlus (can be idle, G0, jog, etc) timer++; if ((timer&0xf)==0) { gvarset(5731,0); //Save Position Log Every 32ms }; }while(a!=0); gvarset(5740,998); //save calibration timer=10; do { timer--; }while(time>0); }; main() { gvarset(8030,0); //THC Deactivate do_laser_probing(); do_laser_calibration(); exit(99); };
The process for the homing of the H-axis consists of the following steps:
The homing for the H axis (also known as AxisPlus) is available via the M133 Hardware PLC command:
#include pins.h main() { gvarset(5521,1); //Ignore Hard Limits gvarset(8522,999999); //Reset Soft Limits gvarset(8048,2); timer=30;do{timer--;}while(timer>0); gvarset(5539,1); speed=gvarget(8044); gvarset(8341,speed); //Set Jog Speed gvarset(8342,30); //Set Jog Acceleration time 80ms = 0.08s gvarset(8340,1); //Jog Z+ do { sens=portget(INPUT_HOME_Z); }while(sens==0); speed=speed>>2; //lower speed by a factor of 4 gvarset(8341,speed); //Set Jog Speed gvarset(8342,5); //Set Jog Acceleration time gvarset(8340,0-1); //Jog Z-, Slow speed do { sens=portget(INPUT_HOME_Z); }while(sens!=0); gvarset(8340,0); timer=20;do{timer--;}while(timer>0); gvarset(8523,0); gvarset(8522,0); //Set 0 timer=20;do{timer--;}while(timer>0); gvarset(8524,0-6000); //Set Min Coordinate to "-6" inch exit(99); };
The code for F axis homing is shown below:
// ##### Laser Focus Homing ######## main() { gvarset(8492, 2000); //250mm/min speed (Focus) gvarset(8493, 1); //0.001 Jog acceleration time (Focus) gvarset(8495, 1); //0.001 G0 acceleration time (Focus) gvarset(8502,999999); //reset soft limits gvarset(8494, 1000); //300mm/min Jog speed (Focus) gvarset(8498, 1); //Jog cmd (Focus) Positive do { a=gvarget(8499); }while(a!=0); //wait stop gvarset(8503,0); //set Max Soft LImit timer=200;do{timer--;}while(timer>0); //PAUSE to show the LED //timer=1000;do{timer--;}while(timer>0); gvarset(8498, 0-1); //Jog cmd (Focus) Negative do { a=gvarget(8499); }while(a!=0); //wait stop gvarset(8504,0); //Set Min Soft Limit timer=200;do{timer--;}while(timer>0); //PAUSE to show the LED gvarset(8502,0-11000); //Set Coordinate //gvarset(8502,0-10000); //Set Coordinate //gvarset(8498, 1); //Jog cmd (Focus) //timer=510;do{timer--;}while(timer>0); // gvarset(8498, 0); //Jog cmd (Focus) Negative //do { a=gvarget(8499); }while(a!=0); //wait stop g0moveA(0x1,0x100,0); do{ a=gvarget(8499);}while(a!=0); exit(99); };
An example of myCNC controller being used on a laser cutting setup can be seen below: