Welcome! Log In Create A New Profile

Advanced

M208 confusion

Posted by samuel235 
M208 confusion
September 27, 2016 02:20AM
Could someone please explain how the M208 gCode works please?

I have my config.g file (running with a DUET WIFI) with a M208 command of "M208 X0 Y0 Z-0.2 S1" in. According to the wiki of RepRap it shows that its the minimum for the axis. Well, i'm a little confused to why all the config files are running with a negative value in this.

"With RepRapFirmware on a Cartesian printer, you can also use this command to specify software limits for axis travel in the negative direction, by adding parameter S1. The axis limits you set are also the positions assumed when an endstop is triggered."

According to the above statement on the wiki, am i correct in saying that the firmware probes with a G30, then adds any offset you set for the probe in the G31 command and then adds whatever you put in the M208 command? Would this be here to not let the nozzle ever touch the bed, is that what the "Z-0.2" is doing, so the bottom layer can't be any thinner than 0.2mm or have i completely got confused?
Re: M208 confusion
September 27, 2016 03:57AM
The config.g file for a Cartesian or CoreXY printer normally has two M208 commands. One has S0 or no S parameter at all, and defines the upper limits of axis travel and the default positions of any high-end homing switches. The other has S1 and it defines the lower limit of axis travel, and the default positions of any low end homing switches.

M208 is not related to G30 or G31 at all. When you probe with G30, it uses the G31 Z value along with any H correctoin specified in the G30 command. It does not add any value from the M208 command.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: M208 confusion
September 27, 2016 04:30AM
Thanks for the reply DC! Sorry, i don't think i made my understand that clear. I get the fact its not connected to the probing action at all, but what i don't get it why the defaults are set with a z-0.2 (or something along those lines). Does this tell the printer that the bed is 0.2mm away from the nozzle after you have probed the bed and got z=0?

Edited 1 time(s). Last edit at 09/27/2016 04:44AM by samuel235.
Re: M208 confusion
September 27, 2016 07:26AM
Setting the M208 S1 Z parameter to -0.2 will prevent the firmware trying to move the nozzle more than 0.2mm below the level of the bed, after Z homing has been done. The reason for -0.2 instead of 0.0 is so that people can make small adjustments to the Z=0 height using the paper test.

Edited 2 time(s). Last edit at 09/27/2016 07:26AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: M208 confusion
September 27, 2016 08:52AM
Okay, awesome. Well thank you! I was about to ask where the paper test comes into this config, beat me to it! I will put the M208 back to -0.2 and get to work with the calibration. Is there anything else i'm missing to adit? I've changed the offset for the probe, changed the overall dimensions, written a new homez.g file to allow for my probing methods, changed the steps per mm, not sure if this is correct but that is where the test cubes come in, right?

Do you have recomendations for the extrusion steps per mm? I'm using a MK7 drive gear, i have it set to 100.47095761381482:100.47095761381482.

I see that the homex and homey files contain their G1 moves with a S parameter to stop at the endstop switch, with the G30 command to probe, will this be fine, i don't need to worry about the probing smashing the bed, right?

My new homez file is as follows, please let me know if you see any issues with it:

G91
G1 Z25 F200
G90
G1 x0 F200
G1 X100 Y150 F2000
G30
G91
G1 Z10
G90
G1 X196
G1 X100

Edited 2 time(s). Last edit at 09/27/2016 09:04AM by samuel235.
Re: M208 confusion
September 27, 2016 09:37AM
- I don't see why you are raising Z as much as 25mm before probing. 4 or 5mm is more usual.

- I don't understand the point of your "G1 x0 F200" line, and it won't do anything anyway unless you change the x to upper case X

- your G91/G1 Z10/G90 will raise the head to 10mm + the probe trigger height. Why not just use G1 Z10 to raise it to 10mm above the bed?

- what's the purpose of moving the head to X=196 and then to X=100 at the end?

A minimal homez.g would be something like:

G91
G1 Z5 F200
G90
G1 X100 Y150 F2000
G30

followed if you wish by another G1 command to put the head wherever you want it to be after Z homing.

HTH David

Edited 1 time(s). Last edit at 09/27/2016 09:38AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: M208 confusion
September 27, 2016 10:46AM
My file includes these weird co-ordinates that you don't see why i'm using because i'm using a "rack and pinion" for the bed probe. You can see in this link, this is the probe method i'm using on a Wilson 2 printer.

[www.youtube.com]

I'm raising it by 25mm to allow for the space of the rack and pinion when it folds down.
I'm taking X to 0 to activate the rack and pinion and make it drop the switch/probe.
I'm raising it then by 10mm to allow space for the probe to swing back up/retract back.
I'm taking X to 196 to retract the probe and then to 100 just to bring it back to the center, not important just something i felt was worth placing there.
Re: M208 confusion
September 27, 2016 12:52PM
I see, you are using special movements to deploy and retract the probe. In RepRapFirmware we normally put those move sequences in macro files sys/deployprobe.g and sys/retractprobe.g. Then you can call them from homez.g, homeall.g and bed.g using the M98 command. There is an example at [github.com] although because the Mini Kossel is a delta printer, the probe is used for calibration only and not for homing in that example.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: M208 confusion
September 27, 2016 02:25PM
Do you follow that method purely for preference or does it pose any advantages, would my method be okay or do you see issues down the line?

I'm yet to do any printing, i'm constantly worried i've messed something up or will mess something up with the gcode generation in terms of the homing and probing that goes into the gcode from the slicer. I know all my homing works, just scared the slicer might not like what i've done.
Sorry, only registered users may post in this forum.

Click here to login