Homing Z after nozzle tip change

34 views
Skip to first unread message

JW

unread,
Jun 28, 2024, 10:55:20 AM (5 days ago) Jun 28
to OpenPnP
On my machine, whilst X & Y use closed loop steppers, Z and C motors are open loop. Frankly I undersized the Z motors using very thin NEMA 23 steppers, and every now and then I lose steps during a nozzle change, so after the nozzle change is complete, Z is not where it should be.

If I perform the nozzle step manually as a demo using a macro in the Duet firmware, I can easily solve this issue just by issuing the necessary G code to home Z.

Is there some way I can do this from OpenPnP however, issue a line of G code to Duet to perform the Z home, and to reset Z to 0 in OpenPnP?

mark maker

unread,
Jun 28, 2024, 11:21:45 AM (5 days ago) Jun 28
to ope...@googlegroups.com

Two options I see.

Option 1 

Easy but limited.

You can assign a Post 3 Actuator. Unfortunately, you can't assign it after the last location, only between third and last. It was not conceived for that purpose. 😉

Then add the {True:} G-code to do the homing (true = loading, false = unloading).

e.g. 

{True:G28 Z0}

If unloading also spoils the position, use a Post 1 Actuator with {False:} G-Code.

Note, this will only work in the test version.


Option 2

Can do anything, but complex: Scripting. There is a

NozzleTip.Loaded

and

NozzleTip.Unloaded

Script trigger, with head, nozzle and nozzleTip globals.

https://github.com/openpnp/openpnp/wiki/Scripting

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/59a6ba1d-b17c-4d23-84ba-35bdabdc8dd4n%40googlegroups.com.

mark maker

unread,
Jun 28, 2024, 11:31:50 AM (5 days ago) Jun 28
to ope...@googlegroups.com

What I should have led with: You should actually solve the underlying problem.

Even if your Z is weak, a clever (3D-printed) changer can help you, by using wedges to transform strong X/Y movements into strong Z (separation) movements.

https://youtu.be/KRR3bC9j_3s

I'm sure it can be made more compact. See this conversation:

https://groups.google.com/g/openpnp/c/xAWzXVgXSUQ/m/j56SLbBvBQAJ

_Mark

JW

unread,
Jun 28, 2024, 12:51:54 PM (5 days ago) Jun 28
to OpenPnP
>> What I should have led with: You should actually solve the underlying problem.

I agree completely, the issue will be resolved in the next version of the build, where the Z motors will be closed loop too, I just don't have the space in the head for the added length of a closed loop stepper right now.

My nozzle tips are sunk into the machine bed now, and are of the solenoid actuated cover open/close type, with just a vertical change, no lateral ramp (which is what I had originally), which I much prefer for several reasons, so going closed loop on Z will resolve this.

I'll read through the scripting docs tonight, should be fairly trivial to pull together a script to do this. Presumably any G-code sent by a script, will be blocking in the sense it'll wait for a response from M400, prior to moving to the next move it was going to perform before NozzleTip.Loaded is called?

mark maker

unread,
Jun 28, 2024, 1:49:54 PM (5 days ago) Jun 28
to ope...@googlegroups.com

> Presumably any G-code sent by a script, will be blocking in the sense it'll wait for a response from M400, prior to moving to the next move it was going to perform before NozzleTip.Loaded is called?

No. But the G-code is queued and executed in order, so no problem there. Any "synchronization" between multiple controllers and other system components, e.g. the camera wanting to take a picture but having to wait for any motion to complete, is handled by OpenPnP, i.e., it will issue the proper M400 etc..

For a better abstraction, actuate an actuator from the script instead of sending G-code directly. It can be configured for machine coordination.

https://github.com/openpnp/openpnp/wiki/Motion-Planner#actuator-machine-coordination

So you could create a "Home Z Axis" actuator that does just that. It can then also be used by the user from the UI.

_Mark

Reply all
Reply to author
Forward
0 new messages