buildbotics / bbctrl-firmware

Buildbotics CNC Controller Firmware
https://buildbotics.com/
Other
67 stars 24 forks source link

Laser on during first rapid move #296

Closed DougCoffland closed 3 years ago

DougCoffland commented 3 years ago

I have rapid-auto-off enabled, but the laser is on during the first rapid move. The laser is turned off correctly during subsequent rapid moves.

This results in a laser cut from the starting position to the first cut.

DougCoffland commented 3 years ago

I first noticed this when executing a tpl file. So, I exported that file to gcode from CAMotics and then tried running the gcode file. The same failure occurs with gcode files.

DougCoffland commented 3 years ago
var dxf = require('dxf');

var layers = dxf.open('back.dxf');
var zSafe = 0;
var cutDepth = 0;

units(METRIC); // This must match the units of the DXF file

rapid({z: zSafe});

feed(1600);
speed(768);
tool(1);
rapid(0,0);
//scale(2.5, 2.5);

dxf.arc_error = 0.1; // This error gets multipled by the scaling factor

dxf.cut_layer_offset(layers.DB15, 0., zSafe, cutDepth);
dxf.cut_layer_offset(layers.DRILL, 0., zSafe, cutDepth);
dxf.cut_layer_offset(layers.CUTOUT, 0., zSafe, cutDepth);
dxf.cut_layer_offset(layers.OUTLINE, 0., zSafe, cutDepth);

loadIdentity();

rapid({z: zSafe});
speed(0);
DougCoffland commented 3 years ago

Fixed in V1.0.1-rc3