M62 – Turn On Digital Output Synchronized With Motion

This command is used to switched ON any of the 16 auxiliary outputs synchronized with the start of the next motion command.

INFORMATION: This Gcode is not available for MASSO G2

CAUTION: If no motion is commanded, the output will not turn ON. It is best to specify motion immediately following the M62 command.

Syntax & Parameters

  • M62
  • P Value - The P value is required and defines the auxiliary output number to switch On. This value can be between 1 to 16.

  • An output must be configured as an Auxiliary output where the P value is the Auxiliary number. In this example P1
  • Auxiliary outputs 1 to 6 can have Auxiliary toggle inputs assigned to toggle them on and off with the press of a button. eg
  • Auxiliary outputs 7 to 16 can only be changed through Gcode.

Example program

N10 G0 X0
N20 M62 P1
N30 X10
N40 M63 P1
N50 X20

  • In the above example the the X axis moves to X0 position, then auxiliary output 1 is turned ON when the X axis starts to move towards X10 position. Once the axis reaches X10 position and starts moving to X20 position, the auxiliary output 1 is turned OFF.