Centering a print
-
@Derek-F said in Centering a print:
................... I then sent M500 to save the setting.
Ahhh - that could be what's screwing things up for you. When you save settings this way, it writes the values to another file called "config-override.g" which does exactly what the name suggests. That is to say, it overwrites any G or M codes that may be in config.g. When power is applied, the contents of config.g are read and applied, then if your config.g contains an M501 command (which it does) it will read and act upon any commands which are contained in config-override.g. So if you have anything in config-override.g which relates to axis dimensions, offsets, or position, these commands will supersede (overwrite) the previous values which were read from config.g. Which effectively means that editing values in config.g will have no effect (because they are being overridden by commands in config.override.g).
This is why personally, I never use M500, M501 and have no config-override.g file and instead only use config.g. In my opinion, having configuration values stored in two different locations simply leads to confusion and mayhem. You can either do as I do and stop using config-override.g and only use config.g, or make sure that if you make any changes, make then in config-override.g instead of config.g (but sooner or later, you'll forget and it will come back and bite you in the arse).
-
@deckingman Hmm, sounds a bit like CREO Parametric that has three possible locations for config.pro, each overwriting the previous commands.
I'd love to consolidate so allow me to define what I believe my steps would be:
- Copy the entire contents of config-override.g to the location of M501 in config.g
- Comment/delete M501 in config.g
- Comment out all of config-override.g (so recovery is possible) and add a first comment explaining what I have done and when.
Questions/comments:
- Do I keep the M500 as the penultimate command in config.g?
- Does the SD card contain any code that is automatically read at bootup?
- I don't currently see anything in config-override.g that might conflict with the settings I am working on. Have I missed something?
(config-override.g and config.g are included earlier in this thread)
I realise that, in this thread, I have asked a number of specific and implied questions, making it hard to respond to everything. I propose to tackle the issues raised one step at a time (overrides, macros, print centering, upgrade). Is that a reasonable approach? If topics are too diverse for "Centering a print", rap my knuckles and send me off to search for or start a new thread.
Cheers,
Derek
-
- M500 stores parameters and should never appear in config.g. M501 reads parameters. If you use config-override.g then it needs to be present at the end of config.g. If you don't use config-override.g then don't use M501.
- Only config.g and config-override.g if it's present.
- Something isn't right. The config.g you posted shows M208 for X to be zero and plus circa 400. If you had followed my instructions, these should be circa minus 200, and circa plus 200.
-
@deckingman Working backwards, I mentioned earlier that I was hoping to keep the current scheme (and just update the numbers slightly) but I will go back and follow your instructions on centering with + and - figures. I didn't need to touch the Y values but I presume I'll have to home those as well (or at least halve the current full Y figure and use that).
I also presume I change the origin in the slicer in the bed shape settings origin from X=0, Y=0 to half the bed sizes respectively.I do have a concern about using the center of the bed... what about all the code that currently refers to X400ish or Y400ish (like all the homex.g code)? There are probably dozens of instances all over the place.
I have no config.g or config-override.g on my SD card so it looks like that can be eliminated as a contributor to the issue.
It seems that my procedure was correct since you did not comment on it.
OK, off to work!
Thanks so much for your help.
Cheers,
Derek
-
@Derek-F I just made the edit to M208 and stored it in the printer.
They now read:
M208 X-202 Y-204 Z0 S1 ; set axis minima to end of safe travel.
M208 X202 Y204 Z510 S0 ; set axis maxima to match endstop location.However, when I homed the printer (from the screen on the printer) the extruder went to the back right as usual, but instead of going to the center to establish the Z value, it descended in the back left corner and the nozzle CRASHED into the heat plate (because the BLtouch sensor was well behind the heat plate). I switched the printer off in this condition.
What should I do when I next switch on?
What have I missed? (why did it try to find Z at the back right corner - it is due to one of the figures I was concerned about in my previous post?)
Cheers,
Derek
-
@Derek-F said in Centering a print:
why did it try to find Z at the back right corner - it is due to one of the figures I was concerned about in my previous post?
Your homez.g file probably contains a G1 command to move the head to bed centre before doing a G30 probe. Bed centre used to be about X200 Y200, but it is now X0 Y0. So you will need to change those coordinates in homez.g, and also in homeall.g if that code is in that file too.
-
@Derek-F You'll need to redo all your homing files. The origin is now set as the centre of the bed so if you want to probe the bed in the centre, you'll need move the print head to X=0 Y =0. i.e this line "G1 X200 Y200 F6000 ; go to first probe point" needs to be changed to "G1 X0 Y0 F6000 ; go to first probe point
Note that the position of the end stops can stay the same. Note also that any files you previously sliced with the origin set to one corner of the bed will need to be re-sliced because they will contain moves in the range zero to circa 400 whereas with the origin in the slicer set to the centre, the moves need to be in te range minus circa 200 to plus circa 200.
Edit posted while DC was typing. also, it appears my PC has the wrong time set.
-
@deckingman Thank you for your replies.
Before I switch on the printer, I'd like to have some idea of the procedure I'm going to follow to recover from the crash. Some time after power off, I tried unsuccessfully to raise the gantry slightly and take the pressure off the nozzle. When powered up, I can't use the move buttons until a homing operation is performed first (which I obviously cannot do).
If I opened the printer console and sent one of these commands, would it lift the gantry?
G1 Z10 F300
G1 Z+10 F300
G1 Z10
Or something else?
Do I need a G90 or G91 first?I am seriously concerned that the gantry is no longer level (ie: parallel with the bed) since it crashed in one corner and I tried to lift it slightly.
How should the gantry be leveled again?
Will my Z offset be incorrect?Cheers,
Derek
-
@Derek-F use
M564 H0
to allow jogging of the axis without homing -
@jay_s_uk Thank you. That allowed me to move the nozzle away form the bed.
I have changed my two M208 lines back to the 'as supplied' figures where the zero is at the front left corner. I think it prudent not to change to zero at the bed center until I understand every implication of doing so.
How do I get the gantry parallel to the bed now?
I see this code in config.g but when is config.g run? (is there a command in the print file?)
; --- z-axis stepper leveling configuration ---
M584 X0 Y1 E3 Z6:5:8:7 ; four motors, at 5, 6, 7, and 8
;M671 X420:420:-100:-100 Y380:-115:-115:380 S20 ; Z belts at 4 corners
M671 X-100:-100:420:420 Y380:-115:-115:380 S20 ; Z belts at 4 cornersDoes the above actually level the gantry?
Finally, will the crash have affected my Z offset?
Cheers,
Derek
-
@Derek-F config.g is ran at boot and loads all of your printers parameters into the firmware so it can be setup correctly.
G32
would go through the levelling process. This runs the bed.g file, which contains the locations to probe the bed for levelling -
@jay_s_uk It's idle and powered on. Should I just send G32?
Or do I need to home it first?
Cheers,Derek
-
@Derek-F you need to home first
-
@jay_s_uk That was all successful. Thank you.
Do you think I need to reset my Z offset after the crash?
Cheers,
Derek
-
@Derek-F you may do depending how hard the nozzle crashed into the bed.
You should also be running G32 before a print as the gantry/bed may have dropped whenever power has been turned off -
@jay_s_uk OK, I'll try a print and see how it goes.
Just checked and G32 is in my Start G-code routine.
BTW, is the following line bad to constantly write to memory (like the WiFi credentials)?
M550 P"VIVEDINO" ; Set machine name
-
@Derek-F no, thats fine. that just sets the machine name in the firmware
-
@jay_s_uk Everything is working again! Thank you!
Z offset looks ok. I'll monitor on further prints.
And I have centered the print, simply by changing the X5 to X0 in the 'M208 S1' line (M208 X0 Y0 Z0 S1) and adjusting the X size of the bed in the slicer. (I clearly don't know enough to safely set zero at the center of the bed at the moment).
The printer already had a macro for WiFi ON and I just had to change the credentials to my set. I have commented out M587 in config.g .
I do have a couple of other unrelated questions but I should probably start new threads for those (unless you want to continue here).
Thanks to both of you for your gracious replies and patience with my lack of knowledge.
Cheers,
Derek
-
@Derek-F probably best to start a new thread. Then we can tackle the subject of getting you upgraded to 3.5.2