sandify icon indicating copy to clipboard operation
sandify copied to clipboard

Starting GCode getting reformatted

Open V1EngineeringInc opened this issue 2 years ago • 5 comments

When I enter this starting GCode it always gets reformatted, in a way that the machine will not run properly. I have to manually edit all my files before running them.

; BEGIN PRE

$HY

G0 Y-4 F50

G92 Y0

$HX

G0 X-13 F50

G92 X0

G1 X1 F1000

; END PRE

That is what I need,

; BEGIN PRE

$HY G0 Y-4 F50

G92 Y0

$HX

G0 X-13 F50

G92 X0

G1 X1 F1000

; END PRE

That is what I get. I have to edit that first line. Any ideas? I made sure I did not have any extra spaces or anything. The second $HX command seems to work fine so not a "$" thing?

V1EngineeringInc avatar Nov 26 '22 17:11 V1EngineeringInc

Had to add line breaks to get it to look okay. It comes out with no spaces, as expected from Sandify.

V1EngineeringInc avatar Nov 26 '22 17:11 V1EngineeringInc

I was worried it was the $HY, because I didn't think those were allowed in gcode. But it isn't that, it is the first line always getting joined with the second:

One
Two
Three

Becomes:

; BEGIN PRE
One Two
Three
; END PRE

Thanks for reporting it. It should be an easy fix.

jeffeb3 avatar Nov 26 '22 18:11 jeffeb3

Well, bummer it is a bug, but glad I wasn't just doing something wrong.

I have a fun gcode running right now, can't wait to show you....and it lead to an idea.

V1EngineeringInc avatar Nov 26 '22 18:11 V1EngineeringInc

If you just add an empty line as the first line, it will be fine.

Bob and I are working on a bunch of changes at once in a restructuring to enable some new features. IDK when that will be finished. I'm interested to see what you've come up with, and make sure it fits in the new system.

jeffeb3 avatar Nov 26 '22 19:11 jeffeb3

Nice tip I will do that.

V1EngineeringInc avatar Nov 26 '22 19:11 V1EngineeringInc