That whole start up thing was also a challenge for me.
You are making good progress. That 3SH1 now causes a state change is correct. The start button behavior is correct, in isolation. To make the system work correctly you additional elements.
I wonder why the e-stop_latch is not working for you. It is a hal.comp, so you need to "loadrt" it and "Addf" it.
Following the advice of Nobert, who wrote Gmoccapy, his suggestion is to avoid one huge HAL file, and break up the HAL into smaller, modular hal files.
So in your main HAL Add:
Code:
halfile= e-stop.hal
Then make a new file with that name and add:
Code:
#*******************
# E-STOP
#*******************
#external E-stop
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop hm2_5i25.0.7i84.0.2.input-17-not => estop-latch.0.fault-in
Once that it done, test it. Pushing 3SH1 should release estop on the MAHO and LinuxCNC, but as soon as you release the button, both should fall back into E-Stop.
Next you need control of the latching relay 19K1.
How is LinuxCNC supposed to know that pressing the power on software button should send a machine-is-on signal through the outputs to the drives?
That is this part.
Code:
# --- MACHINE STATE ---
#Output MACHINE-IS-ON to latch the 19K1 relay.
net machine-is-on halui.machine.is-on
net machine-is-enabled <= motion.motion-enabled
net machine-is-on hm2_5i25.0.7i84.0.2.output-08
Get this working, and test your E-Stop before anything else. ,
The following should all drop the machine into E-Stop:
Pushing the mushrooms.
Each of the axis over travel switches.
The LinuxCNC E-Stop
etc.
By the way, I checked yesterday, and have no connection with 7i77 TB5-1, so that is an error in my schematic. I'll need to trace how I wired 19K2, just to make sure.