Welcome! Log In Create A New Profile


Define position at power-up for Z axis

Posted by PDBeal 
Define position at power-up for Z axis
July 22, 2016 02:34PM
Is there any way (I presume by editing the code) to make Marlin firmware power-up and assume a certain position of a motor?

I have been using the 1.1 RC6 version on my CoreXY machine and I've noticed when I first turn the machine on and do a home x and home y, it starts trying to move my Z axis down despite the z axis is already at the end of it's travel at the bottom. I've played around with the new options for the Z_RAISE_PROBE_DEPLOY_STOW and Z_RAISE_BETWEEN_PROBINGS, and they don't accept 0, and even changing the IF statements elsewhere, 0 doesn't work right with probing then. The machine is using the FIX_MOUNTED_PROBE definition as I'm using DC42's Differential IR sensor and don't need to deploy it.

What I have noticed, after I do an initial print (or maybe even an initial homing followed by a G1 Z160 and then M84), and then start another print, the LCD is flashing X Y and Z, but still shows Z as 160 and when it homes X and Y it does not even attempt to move Z. So this results in me wanting to have Marlin assume after an initial power-up make Z 160 (The maximum limit of my Z axis in Z_MAX_POS) so it won't attempt to move my Z any further lower causing it to jump teeth on the belt since my Z axis is a Gt2 pulley and belt.

Or would I just have to have G92 Z160 in my start code before I did a G28?
Re: Define position at power-up for Z axis
July 22, 2016 07:13PM
My knowledge is that when you power on the printer it assumes it's at 0,0,0
If your carriages are elsewhere, that's what it thinks are 0,0,0 until you home it

I think technically the workflow is to home it before you power it off, I don't do that.
I had the same type of problem until I changed this option

#define min_software_endstops true

I changed it to false and I could home without a problem.

Also make sure if you have EEPROM enabled to do M502 followed by M500
Re: Define position at power-up for Z axis
July 22, 2016 09:03PM
That's the part I want to change. When I power it on, I want to make it assume (0,0,160) instead of (0,0,0). When it assumes (0,0,0), it also assumes when I home X it needs to move Z away because of the probe, yet in reality my Z axis is 160mm away from the head and does not need to move to home X and Y.

It homes fine, but when I home X and Y it starts to try and move Z away, which is already at the end of it's travel. I supposed I could add Z-max limit switches, but there should be a way to define the assumed start. For now, I have a workaround in my start G-code, but that doesn't help when someone homes the machine from the LCD panel.

G92 Z160 ; define Z position
M84; make sure all the motors are off to force the Z axis to drop if its not at the bottom already
G28; Home the machine

Doing the above in my start code stops the Z axis from trying to move due to the Z probe settings, but that doesn't cover the case when someone homes the machine from the LCD menu which is why I asked if its possible to change the power-up position.
Sorry, only registered users may post in this forum.

Click here to login