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.
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.
I'm sure it can be made more compact. See this conversation:
https://groups.google.com/g/openpnp/c/xAWzXVgXSUQ/m/j56SLbBvBQAJ
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/8c944017-c18d-4f7e-af75-d4e208c1ddb1%40makr.zone.
> 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
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/a941622e-6cad-4552-967a-bf60063b5e37n%40googlegroups.com.