Macros

M2020 (...) Macro Commands for the TMC3in1 in Mach4

You DON'T need to use any of these macro commands listed here! However, they provide the ability to automate your projects in the CAM post processor (like SheetCam does) and to have much more control than with any other Height Controller that we know of.

These macro commands allow you to adjust TMC3in1 and ESS Height Control settings directly from your GCode! This allows you to set up your post processor to configure your entire job. It is recommended to include a G04 P0.1 command after the last M2020(...) macro in a group of macros (or after a single one by itself) so that the macro will be processed before the next line of GCode is acted upon.

The bold portion is what you put in your GCode, including the opening and closing parens (). The non-bold text afterwords is my description of the command, and SHOULD NOT BE IN YOUR GCODE.

The values shown below after the equal sign are example values; use the actual value that you need.

 

This first group of commands is used by the ESS for all types of THCs:

  • m2020 (HC_Z_MAX_VALUE=1.001) Set the Z Max Value if using Machine coordinate or Work coordinate Z axis limits.
  • m2020 (HC_Z_MIN_VALUE=-0.12) Set the Z Min Value if using Machine coordinate or Work coordinate Z axis limits.
  • m2020 (HC_WORK_Z_ZEROED=1) This tells the SmoothStepper that the work coordinates just changed and that the Z Max and Z Min should be recalculated.
  • m2020 (ESS_TORCH_TOGGLE) This should only be used by a screen set button or a recovery script.
  • m2020 (ESS_TORCH_RESUME_WAIT_FOR_ARC_OKAY=1) This should only be used by a screen set button or a recovery script.
  • m2020 (ESS_TORCH_RESUME_USE_PIERCE_DELAY_WAIT_FOR_ARC_OKAY=1) This should only be used by a screen set button or a recovery script.
  • m2020 (ESS_TORCH_STATE=1) 1 will turn the torch on, 0 will turn the torch off. While you could use it in your GCode instead of M62P#/M63P#, you shouldn't because it will not be timed with motion. This should only be used by a screen set button or a recovery script. This won't wait for Arc Okay or give you a pierce delay.
  • m2020 (ESS_DELAY_AFTER_ARC_OKAY=0.512) This sets the precision delay time in seconds from when the Arc Okay input signal activates until X, Y or Z axis motion will occur.

 

This next group of commands is used specifically for the WarpRunner and TMC3in1, to set specific operational values:

  • m2020 (W9_HC_LOAD_DEFAULT_CONFIG_VALUES=1) This should be at the beginning of each GCode program to load all of the default config values. This will overwrite any and all WarpRunner register values that you may have modified with WarpRunner config values. If you are intentionally modifying WarpRunner register values, you should omit or comment out this command.
  • m2020 (TARGET_TIP_VOLTS = 115.7)
  • m2020 (TARGET_BAND_VOLTS=3.1)
  • m2020 (LINEAR_RESPONSE_BAND_VOLTS_ABOVE = 15.1)
  • m2020 (LINEAR_RESPONSE_BAND_VOLTS_BELOW=25.2)
  • m2020 (OFFSET_VOLTS=0.01)
  • m2020 (AD1_DELAY_ENABLED=1) Enable Anti Dive Mode 1: Time Delay. 1 turns ON, 0 turns OFF.
  • m2020 (AD1_DELAY_VALUE=1.6) Set the Time Delay for 1.6 seconds.
  • m2020 (AD2_M62_M63_ENABLED=1) Enable GCode Based Anti Dive Mode 2 {AD2} M62/M63 Mode. 1 turns ON, 0 turns OFF.
  • m2020 (AD3_VELOCITY_ENABLED=1) Enable Velocity Based Anti Dive Mode 3 {AD3}. 1 turns ON, 0 turns OFF.
  • m2020 (AD3_VELOCITY_PERCENT=95) If Anti Dive Mode 3 is enabled, THC is Inhibited if X-Y Velocity Drops Below 95% of the commanded feed rate.
  • m2020 (VOLTAGE_AD_ENABLED=1) 1 turns ON, 0 turns OFF.
  • m2020 (VOLTAGE_AD_ATV_BUFFER_SIZE=800) Buffer size in milliseconds. 800 ms max.
  • m2020 (VOLTAGE_AD_PRECONDITION_WINDOW_PERCENT=4.01)
  • m2020 (VOLTAGE_AD_AD4_THC_THROTTLING_PERCENT=0.00)
  • m2020(VOLTAGE_AD_AD5_ATV_PERCENT_ABOVE_CURRENT_TIP_VOLTS =15.1)
  • m2020 (VOLTAGE_AD_AD6_ATV_PERCENT_BELOW_CURRENT_TIP_VOLTS=14.4)

 

These are DEPRECATED commands that will still work, but have become obsolete as of ESS build 277. You should witch to similar commands from above:

  • m2020 (TMC3IN1_LOAD_DEFAULT_CONFIG_VALUES=1) This should be at the beginning of each GCode program to load all of the default config values. This will overwrite any and all TMC3in1 register values that you may have modified with TMC3in1 config values. If you are intentionally modifying TMC3in1 register values, you should omit or comment out this command.
  • m2020 (TMC3IN1_TARGET_TIP_VOLTS = 115.7)
  • m2020 (TMC3IN1_TARGET_BAND_VOLTS=3.1)
  • m2020 (TMC3IN1_LINEAR_RESPONSE_BAND_VOLTS_ABOVE = 15.1)
  • m2020 (TMC3IN1_LINEAR_RESPONSE_BAND_VOLTS_BELOW=25.2)
  • m2020 (TMC3IN1_OFFSET_VOLTS=0.01)
  • m2020 (TMC3IN1_AD1_DELAY_ENABLED=1) Enable Anti Dive Mode 1: Time Delay. 1 turns ON, 0 turns OFF.
  • m2020 (TMC3IN1_AD1_DELAY_VALUE=1.6) Set the Time Delay for 1.6 seconds.
  • m2020 (TMC3IN1_AD2_M62_M63_ENABLED=1) Enable GCode Based Anti Dive Mode 2 {AD2} M62/M63 Mode. 1 turns ON, 0 turns OFF.
  • m2020 (TMC3IN1_AD3_VELOCITY_ENABLED=1) Enable Velocity Based Anti Dive Mode 3 {AD3}. 1 turns ON, 0 turns OFF.
  • m2020 (TMC3IN1_AD3_VELOCITY_PERCENT=95) If Anti Dive Mode 3 is enabled, THC is Inhibited if X-Y Velocity Drops Below 95% of the commanded feed rate.
  • m2020 (TMC3IN1_VOLTAGE_AD_ENABLED=1) 1 turns ON, 0 turns OFF.
  • m2020 (TMC3IN1_AD4_VOLTAGE_ENABLED=1) 1 turns ON, 0 turns OFF.
  • m2020 (TMC3IN1_VOLTAGE_AD_ATV_BUFFER_SIZE=800) Buffer size in milliseconds. 800 ms max.
  • m2020 (TMC3IN1_AD4_VOLTAGE_BUFFER=800)
  • m2020 (TMC3IN1_VOLTAGE_AD_PRECONDITION_WINDOW_PERCENT=4.01)
  • m2020 (TMC3IN1_AD4_VOLTAGE_CHANGE_PERCENT=4.01)
  • m2020 (TMC3IN1_VOLTAGE_AD_AD4_THC_THROTTLING_PERCENT=0.00)
  • m2020 (TMC3IN1_AD4_VOLTAGE_RESPONSE_PERCENT=0.00)
  • m2020(TMC3IN1_VOLTAGE_AD_AD5_ATV_PERCENT_ABOVE_CURRENT_TIP_VOLTS =15.1)
  • m2020 (TMC3IN1_AD5_VOLTAGE_ABOVE=15.1)
  • m2020 (TMC3IN1_VOLTAGE_AD_AD6_ATV_PERCENT_BELOW_CURRENT_TIP_VOLTS=14.4)
  • m2020 (TMC3IN1_AD6_VOLTAGE_BELOW=14.4)

Top of Page