does anyone have any information on how to get pathpilot mill to tell a za6 robot to start moving /loading unloading right now the za6 tells the machine to start and then waits for a ready signal but if the mill is stopped for any reason the za6 tries to run this is not acceptable to my boss anyone else run in to this issue.
Tony,
We’ve run into a similar problem. We use a wireless probe in the mill to double-check workpiece position, and early on if we had a bad probe result the robot would of course see that the mill was in a “ready” state and start its tending cycle.
Here’s how we “fixed” this problem.
On the robot side, import the Machinetalk interface:
from robot_command.interfaces import MachinetalkInterfaceSingleton
And use this helper function:
def get_workcell_reported_state(instance=None):
status_sub = MachinetalkInterfaceSingleton().get_status(instance)
if not status_sub.synced:
return (0, 0)
# now check the status
aout_60 = status_sub.motion.aout[60]
aout_61 = status_sub.motion.aout[61]
return (aout_60, aout_61)
On the mill side, in your G-code program, use M68 to set values to analog outs 60 and 61. We set 60 to “1” at the start of the program, and only set it back to “0” if the program completed successfully. We used 61 as a flag to indicate why the machine stopped (probe error, user stop, etc”.
I’m attaching some G-code subroutines that are a little more convenient than calling M68 directly. Drop these either in your program directory or the pathpilot subroutines directory if you want to use them.
I know this is a little clunky, but it’s very reliable. I hope to come up with something a little more user-friendly in the future.
update_workcell_status.nc (103 Bytes)
stop_workcell_with_error.nc (556 Bytes)
prepare_workcell_run.nc (136 Bytes)
finish_workcell_program.nc (172 Bytes)
Thank you mr Rogge its taking me some time to dig in to your information i want to construct a nice safe pair or programs to test with my issue is i am running a lot of parts through the robot mx1500 right now . as long as i think of the robot as an operator i have to tell to stop first i do think there should be a hard link of the e stop buttons so either machine stops the other. thanks for your time.
Oh man, I feel your pain. That is a terrifying issue to have on the shop floor, and I totally get why your boss is stressed about it!
What you’re running into is a classic machine-handshaking problem. Right now, your ZA6 is basically checking for a one-time “go” signal, instead of continuously checking if the mill is still actually safe to interact with. If someone hits pause or E-stop on the Tormach, the robot has no idea and just blindly goes into its routine.
To fix this, you need a true two-way “M-code handshake” using the digital I/O on both machines so they are constantly talking to each other. Here is the logic you want to set up:
-
Step 1: In your PathPilot G-code, use a dedicated M-code (like
M64 P1) to turn an output pin ON only when the mill is fully done cutting, the spindle is stopped, and it’s 100% safe to load/unload. -
Step 2: Program the ZA6 so it doesn’t just look for that signal once, but continuously watches it. You want to use a loop or a background script on the robot controller. If that Tormach signal ever drops to LOW (because someone paused the mill or hit an E-stop), the robot needs to instantly freeze in its tracks.
-
Step 3: Once the robot finishes its job and is safely out of the machine envelope, have the ZA6 fire a signal back to the Tormach (which PathPilot reads using an
M66wait command) telling the mill, “Hey, I’m out, you’re clear to close the doors and start cutting again.”
If you don’t have the physical I/O wires or breakout boards hooked up between the Tormach controller and the ZA6 cabinet, that’s your smoking gun. Without those physical wires passing signals back and forth in real-time, the robot is flying blind. Get those hooked up, change the logic
