Hi,
I don't use either Laser or Plasma so I'm having to guess to a certain extent.
m62/m63 are for lasers. It turns the laser on, but ONLY when the machine has started to move, otherwise the laser would burn a spot right at the start. m63/m63 are not right for you.
First thing you may note is that I use lowercase m or lowercase g in all Gcode....because Mach's Gcode interpreter parses all Gcode to lowercase, strips out leading zeros and whitespace. Thus
M03 becomes m3, etc. When the interpreter encounters an M3 for instance its going to search for code starting m3. To make sure it finds it then use its preferred format, ie lowercase and without
leading zeros. Note that I often still use whitespace to separate items for readabilities sake, but should in truth remove whitespace as well so g1x16.67y45.67f556 not g1 x16.67 y 45.67 f556.
When Mach encounters an m3 it will search in the macros folder of the current profile, if it does not find it it will search 'up the file tree' until it does. Normally this means that Mach will
use the built in m3 that turns the spindle one. Presumably the built-in m3 will turn on the SpinOn signal and generate the required PWM to meet the prevailing S word etc. In your case you want
m3 to turn on the torch so you will have to write your own m3() function and put it in the macros folder of your profile. Thus Mach will find and execute your macro BEFORE it searches to find the built-in one.
I would guess you need to code something like:
Function m3()
1) g31 probe the surface of the material
2) Back off the surface of the material by 20mm or so
3) Activate the torch turn on relay.
4) Wait until the ARC_OK signal is received from the plasma. If an ARC_OK signal is not received within 5 seconds....bail ARC_FAIL_YOU_BLOODY_PLONKER.
5) descend to pierce height
6) Wait for the pierce delay
7) Return....this signals that the torch has fired, arc stabilised, pierced and is now ready to cut.
And your m5 would be something like:
Function m5()
1) De-activate the torch relay
2) Lift off the material by 20mm
3) Return
Craig
PS: the ARC_FAIL_YOU_BLOODY_PLONKER is optional!