1
Boards for use with LinuxCNC or MachineKit / PMDX-126 with LinuxCNC and charge pump
« on: May 23, 2018, 12:20:00 AM »
I've been struggling to get the PMDX-126 to work with a LinuxCNC controlled parallel port. The StepConf Wizard for LinuxCNC does not create the correct .hal file to re-enable the board after an ESTOP. With dip switch 1 set to enable the Charge Pump the PMDX-126 correctly leaves the outputs off until the PC generates the 5Khz charge pump signal.
Where I ran into problems is when the ESTOP switch is opened. The red LED comes on and outputs are disabled. But at that point closing the ESTOP again doesn't enable the outputs. A scope shows the charge pump square wave is still there on PIN 17 but PIN 10 remains high.
The PMDX-126_19 manual states in a 'note' on page 28 that the charge pump signal will not affect the ESTOP status. I've found that not to be true. Until the PIN 17 charge pump signal goes away, the PIN 10 ESTOP stays high no matter what is done with the actual switch.
The .hal file needs to be modified to make this work.
# first remove the charge-pump enable which was controlled with the screen base ESTOP button.
#net estop-out charge-pump.enable iocontrol.0.user-enable-out
net estop-out iocontrol.0.user-enable-out
net estop-ext <= parport.0.pin-10-in-not
Near the end of the .hal file connect the external estop input (PIN 10) to the charge-pump.enable.
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
net estop-ext => charge-pump.enable
Now what happens is that when the external ESTOP button is pressed the open circuit results in a high level on PIN 10 which is inverted by the 10-in-not part of the net estop-ext statement. This now logic low is connected to the charge-pump.enable disabling the 5kHz charge pump signal. The MACHINE ON button is also disabled clearing any spindle and coolant ON settings
At this point although the ESTOP switch is still open circuit, once it's closed again the PMDX-126 will re-enable. Now it correctly sets PIN-10 low which then (inverted to 1) allows the MACHINE ON button in the LinuxCNC to be enabled along with the Charge Pump signal.
John
Where I ran into problems is when the ESTOP switch is opened. The red LED comes on and outputs are disabled. But at that point closing the ESTOP again doesn't enable the outputs. A scope shows the charge pump square wave is still there on PIN 17 but PIN 10 remains high.
The PMDX-126_19 manual states in a 'note' on page 28 that the charge pump signal will not affect the ESTOP status. I've found that not to be true. Until the PIN 17 charge pump signal goes away, the PIN 10 ESTOP stays high no matter what is done with the actual switch.
The .hal file needs to be modified to make this work.
# first remove the charge-pump enable which was controlled with the screen base ESTOP button.
#net estop-out charge-pump.enable iocontrol.0.user-enable-out
net estop-out iocontrol.0.user-enable-out
net estop-ext <= parport.0.pin-10-in-not
Near the end of the .hal file connect the external estop input (PIN 10) to the charge-pump.enable.
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
net estop-ext => charge-pump.enable
Now what happens is that when the external ESTOP button is pressed the open circuit results in a high level on PIN 10 which is inverted by the 10-in-not part of the net estop-ext statement. This now logic low is connected to the charge-pump.enable disabling the 5kHz charge pump signal. The MACHINE ON button is also disabled clearing any spindle and coolant ON settings
At this point although the ESTOP switch is still open circuit, once it's closed again the PMDX-126 will re-enable. Now it correctly sets PIN-10 low which then (inverted to 1) allows the MACHINE ON button in the LinuxCNC to be enabled along with the Charge Pump signal.
John