The following is a description of the planned power-up/power-down sequencing.
The main 240V breaker applies power to a transformer that generates 120VAC single phase, with three separate secondaries. One of the secondaries is dedicated to the PC. When main power is turned on, the PC power supply gets power, along with a small power supply for the encoders, and a couple of fans in the control cabinet on the right side of the machine. The remainder of the 120V circuits are powered by another secondary on the transformer. That secondary runs thru a pole of the main ESTOP relay, which is off.
The green "Power On" button on the front panel is connected to the PC motherboard and boots the PC. Once the PC is booted, a startup script will start EMC automaticaly. (Note - during testing the PC will boot to Gnome and the user will manually start EMC.) Once EMC is up and running, the charge pump on the PMDX-122 board enables the estop relay.
When the user clicks on the GUI "Estop" button (or hits F1), the PMDX-122 relay closes, completing the ESTOP chain. (See MazakEstopChain for details.) This applies power to the hydraulic pump and the servo and spindle drives. It also supplies power to the solid state relays which control the solenoid valves. Once the estop chain is complete, the green "Power On" button is disconnected from the motherboard, to prevent it from being used to power down the PC while the machine is running.
When the user clicks the GUI "Machine On" button (or hits F2), the logic should check other conditions such as hydraulic pressure, lube level, spindle drive ready, servo drive ready, etc, then enable amps and begin running.
When the user clicks the GUI "Machine OFF" button (or hits F2), the logic should disable the servo amps.
When the user clicks the GUI "Estop" button (or hits F1), EMC turns off the estop output to the PMDX board. The PMDX relay will open, breaking the chain and dropping out all the contactors, etc. Once the estop chain drops out, the green "Power On" button is connected to the motherboard, and the user can power down the PC by holding it for four seconds. However, the normal shutdown will be done by exiting EMC and either having a script automatically do "shutdown -h now", or dropping the user into Gnome and letting them do a logout/shutdown thru the normal Gnome dialogs.
The wiring which implements the above logic is as follows: (this needs to be drawn in schematic form, along with the estop chain)
This means that PCPR is energized only when the green POWER button is pressed and the ESTOP relay is de-energized. A NO contact of PCPR is connected to the PC motherboard power button inputs, and starts the PC.