Touch Sensor and Plasma Torch Height Control Configuration for Mach4 


There are two ways of commanding the plasma cutting sequence.  You could command all the actions using gcode commands (M62/M63 as torch on/off, G31 for probing, and G4 for piercing delays) or you could set all the operating parameters and just command the plasma using the M2003/M2005 macros.  These instructions will configure the system to use it both ways.  

M2003 Macro performs the following actions:

  • Probes or moves down the Z axis to the "Z Min. height" position that is set in the DRO for this value and the feed that is set in "Probing FR".
  • Set the current position to be the new Z = Zero considering the Z Offset if a Floating Head is used.
  • Moves the Z up at max velocity to the piercing position or DRO = Pierce Height.
  • Turn on the Torch. 
  • Wait for Pierce time or DRO = Pierce Delay.
  • Moves the Z up at max velocity to the cut position or DRO = Cut Height.
  • Activate THC.

M2005 Macro performs the following actions:

  • Turns the torch off.
  • Deactivates the THC.
  • Moves the Z axis at max speed to the position where it would be safe to move at max velocity to the next cutting position.  This is DRO =Z Top.
  • The screen holds the new DRO values and also has the code that will enable the probe while the system is probing.

Used software: Mach4

ESS Plugin Mach4: ESS v298.

Hardware Used:
THC-1 or THC-2, PTS-1


Start by making a backup of the existing installation:

Make a backup of the configuration and file installation, we recommend creating a backup of the current installation by right-clicking in the current installation folder and zipping it.



Download and install the new screen and macro files: Download the compressed file containing the macros and screen that work with the macros: will need to install the screen found in the download folder and place the macro in the macros directory for the profile folder.

Make a backup of the original M2003 and M2005 macros by zipping them into the same folder, just so you may have access to the original macros if you need to revert the installation later: 





View/Load Screen:


Apply Changes, Save Settings, and Restart MACH4 for all the changes to take effect. 


On the Main Screen, you need to set the piercing parameters: 

  1. Set Z_Top which is the safe position from which you can do a rapid motion to the new cutting position.
  2. Set how low you want the Z-axis to go while probing or touching the plate.
  3. Set the THC delay or Piercing Time.
  4. Set the height at which you want to start cutting or do the initial pierce. 
  5. Set the OFF SET_Z.
  6. Set the Probing FR.
  7. Set the Probe enable.
  8. Cut height




Probe pin configuration.  This is the pin used to sense the probing action.  This pin will go high when the probe touches the plate. If using a floating head where the z-axis will need to travel to the switch position, you need to set the Z offset.