Preventing Z-axis from lowering while moving home

I have a sequence like many others do that waters my garden. The sequence is built out of reusable sequences - 1 that mounts the watering tool, then I have my commands that water the garden, then I have a sequence that puts the tool away. One thing I haven’t figured out and I’m sure it’s simple is how to prevent the x-axis from lowering to the height of the tool bay while it’s moving on it’s x-axis. The problem I’m going to eventually have is the z-axis will hit my plants which I don’t want. I want it to move to in front of the toolbay, then lower. Am I missing something simple?

1 Like

Although I don’t do this yet, I have always meant to make the upwards movement of the Z axis the first item in the sequence, then add a wait for the maximum time that the Farmbot takes to traverse the entire bed, before proceeding with X and Y moves. I then have a “safe zone” where X and Y movement stop and the Z is lowered to the correct height before completing the tool removal / insertion. This way your Z axis will always be up at it’s max and wont foul plants on the way to the tool bay and be at the right height to put the tool away etc.

1 Like

I also found this post: Move Absolute only on Z axis by @RickCarlino I just don’t quite understand what’s going on there. @RickCarlino - can you clarify this by chance?

I was actually going to reply with that link. This is a recursive sequence. It calls itself until the Z height is above a threshold in steps. If you are having trouble visualizing, it may be best to try the sequence for yourself. I think it will make more sense when you see it in action.

Another option is to enable the “STOP AT HOME” feature (assuming the home position is with the z-axis at the highest position) in conjunction with a “MOVE RELATIVE” command. You can then retract the Z upwards to the maximum height and the bot will stop at max.

With regards to needing to move the tool head off to the side: have you used the “offset” feature of the “MOVE TO” command?

Do either of those help?

2 Likes