Welcome! Log In Create A New Profile

Advanced

echo: "Unknown Command G21"

Posted by kd6hq 
echo: "Unknown Command G21"
November 27, 2018 01:20PM
RAMPS 1.4
Marline 2.0
Laser setup as a printer
Board definition: #define MOTHERBOARD BOARD_RAMPS_14_EFB

So I'm using a program called LightBurn to control the laser. LightBurn's function is to generate and send the gcode to the laser. The begging of each gcode file starts out the same. The first command issued it to put the machine into mm mode as seen below.

; LightBurn 0.8.06
; Marlin device profile, absolute coords
G21
G90
; Scan @ 1300 mm/min, 100% power
M106 S0
G0 X4.56 Y3.51 F0
G91
M106 S0
G1 X0.32 F1300
M106 S25.5
G1 X20.01

When the G21 command is issued to make sure the machine is in mm mode Marlin echo's an error: Command Unknown.

I have been unable to figure out why this is happening. I had downloaded V 2.0 a couple of months ago and had recently decided to implement it. As soon as I did I started getting the error. So last night I decided that perhaps somehow I did not get all the files needed in the download. Well apparently the was incorrect because after configuration I got the same error.

The interesting part is that when I look at the communications stream when LightBurn first connects to the laser machine Marlin accepts G21 as can be seen in the attached file.
But when issued from the gcode gets rejected.

So for now I have reverted to Marlin V 1.8 as it dose not have this problem.

Any thought's on the subject?



Re: echo: "Unknown Command G21"
November 27, 2018 09:25PM
I suspect its being silently ignored in the first eg and complained about in the second eg

Did you enable INCH_MODE_SUPPORT ?
As that needs to be enabled to use either G20 or G21

Otherwise the firmware presumes everything is in mm
Re: echo: "Unknown Command G21"
November 27, 2018 09:48PM
Thank you once again Dust.

No I did not enable it, but I will.
Guess I missed that one when I was browsing the firmware.
thanks
Sorry, only registered users may post in this forum.

Click here to login