G-Code confusion
-
Unfortunately, I've run out of time messing with my .g files and could really use some example code to try.
I'm very good with Marlin, but still need to learn my gcode better. I now have no time though as I have to go back to earning a living. Seeking gcode examples to meet the my requirements.
I've reached out in the FaceBook group on this with little luck and somewhat generic answers that had little application specific detail.
I initially used the online configutator (made a number of different attempts) and it does not seem to be working.
If, for example, if my hotend is at the center of the bed when I power on, it does nothing. I then home X and X move up 10mm, then moves about 8mm+ then 10mm down, Y does the same.
I did at one point have X and Y home to the EndStops, but cannot seem to get them to do it again. I originally had X and Y hitting the endstops in my testing, but just not able to find the right recipe anymore (I've got gcode fatigue).
My config.g starts with:
G90
M83
Then does my network setup
Then the drives, steps and accelerations
Next are my Axis Limits:
M208 X0 Y0 Z0 S1
M208 X220 Y220 Z300 S0
X/Y Endstops:
M574 X1 Y1 S1
Inductive Z-Probe:
M574 Z1 S0
M558 P5 I1 H10 F15000 T36000
G31 P250 X-32 Y-10 Z-1.0
M557 X20:160 Y20:160 S20
Then Heaters, Fans and Tools.My bed.g contains only:
M561
G29My homex.g contains:
G91
G1 Z10 F360000 S2
G1 S1 X-248 F1800
G1 X5 F360000
G1 S1 X-248 F360
G1 Z-10 F360000 S2
G90MY homey.g contains much the same as homex.
My homeall.g contains:
G91
G1 Z10 F360000 S2G1 S1 X-248 Y-253 F1800G1 X5 Y5 F360000G1 S1 X-248 Y-253 F360
G90
G1 X52 Y30 F360000
G30
; Uncomment the following lines to lift Z after probing
;G91
;G1 S2 Z10 F6000
;G90
I've tried changing things manually to absolute positioning to make it more obvious, but no luck - nothing changes.Here are my layout details outlining what I'm trying to accomplish"
Please, if someone can provide some bed setup gcode, that would be great!
I just need a starting point that works.My printer started life as a TronXY X3A.
-
I am not an expert but I think that your M208's should cover the entire range to the end stops, not just the end of the print area. In other words, should go negative to -54 for Xmin and 292 for Ymax.
-
Thanks, I'll give that a try now.
So my X/Y mins should be 0 and my Y/Y maxs should be 274 and 292 respectively.
Let's see how that goes. -
@dennishall said in G-Code confusion:
So my X/Y mins should be 0
No, based on your picture your mins should be X-54 and Y0, and Max should be X274 and y292
-
@phaedrux So these values should be in my config.g file, right?
M208 X-54 Y0 Z0 S1 ; minima
M208 X274 Y292 Z316 S0 ; maxima -
Yeah that looks right.
These two blog posts are really helpful for getting this setup in the firmware and the slicer.
https://drmrehorst.blogspot.com/2017/08/setting-up-3d-printers-origin.html
https://drmrehorst.blogspot.com/2018/07/ummd-better-way-to-set-up-origin-and.htmlThe second link goes through setting up the 0,0 origin to be in the center of the bed, which may be a good way to go in your case.
-
@dennishall said in G-Code confusion:
M208 X274 Y292 Z316 S0 ; maxima
I think that max X should be 220 (?)
The way I think of it, these are the allowed travel min/max, regardless of printing area. With this interpretation, you don't want X to go beyond 220 (?), of whatever the mechanical limit on your printer.
-
@zapta said in G-Code confusion:
@dennishall said in G-Code confusion:
M208 X274 Y292 Z316 S0 ; maxima
I think that max X should be 220 (?)
The way I think of it, these are the allowed travel min/max, regardless of printing area. With this interpretation, you don't want X to go beyond 220 (?), of whatever the mechanical limit on your printer.
Yes you're totally right. I didn't look closely enough at the picture.