Author Topic: PMDX-126 with LinuxCNC and charge pump  (Read 558 times)

jcdammeyer

  • Posts: 5
    • View Profile
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



 

12strings

  • Posts: 78
    • View Profile
Re: PMDX-126 with LinuxCNC and charge pump
« Reply #1 on: June 22, 2018, 10:44:34 PM »
I've been away for a while, so in case you are still listening...

You have discovered a "feature" in the PMDX-126's charge pump operation that apparently isn't mentioned in the PMDX-126 manual.  When the PMDX-126 DIP switches are configured for "normal mode WITH charge pump", if the E-Stop input goes active, then PMDX-126 requires the charge pump to stop before the PMDX-126 will de-assert its EStop on parallel port pin 10 (as you discovered), even if the EStop input to the PMDX-126 is grounded again.  The charge pump stopping acts as an acknowledgement from the PC to the PMDX-126 that the PC "saw" the EStop signal on pin 10.


jcdammeyer

  • Posts: 5
    • View Profile
Re: PMDX-126 with LinuxCNC and charge pump
« Reply #2 on: June 22, 2018, 11:03:53 PM »
My solution, at least temporarily was to switch over to MACH3 which can deal with that problem (feature).   It's been a month since I dealt with that.  In that month I've been rebuilding the power supply and control cabinet and all sorts of other things so at the moment nothing is wired up.  I had to abandon the BeagleBone Black using the BBB-DB25/26 from Xylotex running MachineKit because their hardware couldn't deal with NC limit switches.  Not without modifying the board.   And I'm not prepared to manually turn pulleys to back off the limit switches as was suggested.  So for now I'm back to a dual core PC that runs either MACH3 or LinuxCNC.   Once I have the machine put back together and wired and making chips with MACH3 I'll take another look at LinuxCNC.

Thanks for your reply.
John