New controller with grbl (MKS DLC32) and I am new to grbl.
I have read all the posts in the forum regarding this error, but have not been able to solve it.
I tried to do a test by trying to carve a first test script.
I disabled the Z axis (even though it is actually there on my machine) but it still doesn’t work.
Starting stream
Layer INCISIONE
error:20
Unsupported or invalid g-code command found in block.
On or near line 4:
Job halted
Stream completed in 0:00
ok
I am connected via wifi, this is the offending command: M4
G00 G17 G40 G21 G54
ok
ok
G90
ok
G0 X2 Y2
ok
G91
ok
M4
error:20
Unsupported or invalid g-code command found in block.
EDIT:I have just seen this post:Another M4 error with DLC32 V2.1.003
It seems to be a firmware problem.
Very bad for me,as I had to compile the source code to invert the Y-axis pins with the Z-axis ones (on the board there are 2 connectors for the Y-axis,on my machine I have 2 motors in the Z-axis) so I will have to look for the bug,but I don’t know where
In the controller source code, look for M3, M4 and M5. in the area of “spindle”.
M3 = spindle clockwise
M4 = spindle CCW (LB uses as a laser on command)
M5 = spindle stop (or off)
Ok,I think I got around the problem by enabling inLaserMode by default in the Spindle.cpp file of the firmware
bool Spindle::inLaserMode() {
return true; // default for basic spindle is false //change in true
}
in this way the error does not occur again but, the machine doesn’t know where it is, it bumps into the limit switches while working, maybe it’s set in inches? I noticed that even if I change the position of the test writing on the plan in lightburn, the frame always does so in the same point (approximately)
yes,homing works perfectly,the settings are as above,they have not changed
I can move the test writing to any part of the lightburn workspace,framing always takes place in the same place,in the bottom left corner of the machine
yeah,i have same error from sd card, x axis crashes into the limit switch.
I think it might be a firmware problem, I would like to try compiling the FluidNC project, it is not difficult, but I think the display is not supported, I will try anyway
I am thinking the same thing. I tried the framing test on my machine and found Frame follows the object location in the workspace. In other words, it behaved normally.
OK, I installed FluidNC, now the axes don’t hit the limit switches but both framing and engraving always take place at the bottom left of the working plane, I updated lightburn to the latest version.
I do not know anything about framing in FluidNC, but if two software packages give you the same results, that would eliminate
the PC and software running on it. I doubt the USB cable would do it, so that leaves the controller.
Idea: Look at the Gcode (Save Gcode) for the project and see if it is generating the initial X & Y positions in the right place.
If you Run the project, does it go to the correct place (back left in your current image)?
This Framing thing really just does not make sense. Another Idea: In the Console window, click on Show All. Then click the Frame button and see what the Gcode looks like in the Console window. The window will show the Gcode sent to the controller and whatever the controller responds with.
To be honest, I am not 100% positive it is not a Lightburn, and possibly FluidNC settings issue.