Author Topic: Laser on/off PMDX-422 Mach4  (Read 3586 times)

WallClimber

  • Posts: 16
    • View Profile
Laser on/off PMDX-422 Mach4
« on: January 22, 2016, 08:00:14 AM »
Thought I'd start a new topic on this.  I want to turn my laser on and off with a fast output.  I understand that the PMDX-422 doesn't support the M62P1/M63P1 command in Mach4?

I have read that the best way is to use the Spindle commands M3 and M5.  This works but I would rather not do this as funnily enough I am using this output (and the relay) for the spindle and I don't want to change the way the Spindle behaves (e.g. turning on the spindle in my gcode header before starting a job).  It also means I have to remember to power off the spindle controller before doing any lasering.

I also don't wish to use an M8 or M7 (Flood/Mist) command due to the fact that I am using M8 for my extraction and coolant, and M9 turns them both off.

I can't use the A-Axis DIR pin trick, as I am already using four axes (two on my X axis) and the controller only supports 4.

Is there not a straightforward way to turn an output of my choice on and off from the gcode?

Hopefully a solution would help others as I can't seem to find a simple answer.

Thanks!

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Laser on/off PMDX-422 Mach4
« Reply #1 on: January 22, 2016, 09:57:15 AM »
You can write custom macros to do this.  I am attaching macros for M10 and M11 that turn Output4 on (M10) and off (M11).  Place these in the "Macros" directory of your profile and remove the ".txt" extension so they are "m10.mcs" and "m11.mcs".  Then go into the "Configure" menu and select "Mach...".  Click on the "Output Signals" tab, scroll down to "Output #4", enable it and map it to your desired PMDX-422 output signal.

You can edit the macros to use a different output.  Or edit them to remove the call to mc.mcCntlSetLastError() if you don't want messages piling up in the Mach4 status line (and history).

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

WallClimber

  • Posts: 16
    • View Profile
Re: Laser on/off PMDX-422 Mach4
« Reply #2 on: January 25, 2016, 12:20:32 PM »
Thanks Bob, this is just what I need.  Guess I need to put some time into learning macros etc for Mach4.