G-Code Commands
This page is a reference guide for Aerotech's G-code and M-code commands. It shows you how to use the supported G-code letters and how they work in the standard Aerotech dialect.
Supported G-Code Letters
The Aerotech G-code dialect supports the G-code letters in the Supported G-Code Letters table. The list that follows includes information about the G-code letters:
- Each of these letters is supported by the G-code (RS-274) standard.
- These letters are not case sensitive. Thus, both
G1andg1mean the same thing. - Most of the remaining letters can be used as axis names (e.g., X, Y, and Z). See Axis Naming Conventions for more information.
- Some additional letters (
HandL) are part of the G-code (RS-274) standard but are not used in AeroScript. These are reserved for future use.
Table: Supported G-Code Letters
|
Letter |
Meaning |
|---|---|
|
E |
Feedrate of Dependent Axes |
|
F |
Feedrate of Dominant Axes |
|
G |
General Function (G-code) |
|
I |
I Offset for G2/G3/G12/G13 |
|
J |
J Offset for G2/G3/G12/G13 |
|
K |
K Offset for G2/G3/G12/G13 |
|
M |
Miscellaneous Function (M-code) |
|
N |
Line number/label (N-code) |
|
P |
Absolute Starting Angle for G2/G3/G12/G13 |
|
Q |
Absolute Ending Angle for G2/G3/G12/G13 |
|
R |
Radius for G2/G3/G12/G13 |
|
S |
Spindle Speed |
|
T |
Tool Selection Function (T-code) for custom tool selection routines |
The table that follows shows a list of supported G-code commands.
|
G-Code |
Description |
AeroScript Equivalent* |
|---|---|---|
|
G0 |
Executes a rapid point-to-point positioning move on the specified axes. |
MoveRapid() (Rapid Motion) |
|
G1 |
Executes a coordinated linear move on the specified axes. |
MoveLinear() (Linear Motion) |
|
G2 |
Executes a circular arc move in the clockwise direction on the specified axes in the first coordinate plane. |
MoveCw() (Circular Arc Motion) |
|
G3 |
Executes a circular arc move in the counterclockwise direction on the specified axes in the first coordinate plane. |
MoveCcw() (Circular Arc Motion) |
|
G4 |
Suspends the execution of the task for the duration that you specify, in seconds. |
Dwell() (Dwell) |
|
G8 |
Causes the G-code motion that you specify on the same program line to immediately accelerate to the programmed feedrate. |
None |
|
G9 |
Causes the G-code motion command that you specify on the same program line to decelerate to zero velocity when the axes get to their target position. |
None |
|
G12 |
Executes a circular arc move in the clockwise direction on the specified axes in the second coordinate plane. |
None |
|
G13 |
Executes a circular arc move in the counterclockwise direction on the specified axes in the second coordinate plane. |
None |
|
G16 |
Configures the set of axes that are used for the first coordinate plane for G2 and G3 commands. |
None |
|
G17 |
Configures the task to use the first set of axes of the first coordinate system for G2 and G3 commands. |
None |
|
G18 |
Configures the task to use the second set of axes of the first coordinate system for G2 and G3 commands. |
None |
|
G19 |
Configures the task to use the third set of axes of the first coordinate system for G2 and G3 commands. |
None |
|
G26 |
Configures the set of axes that are used for the second coordinate plane for G12 and G13 commands. |
None |
|
G27 |
Configures the task to use the first set of axes of the first coordinate system for G12 and G13 commands. |
None |
|
G28 |
Configures the task to use the second set of axes of the second coordinate system for G12 and G13 commands. |
None |
|
G29 |
Configures the task to use the third set of axes of the second coordinate system for G12 and G13 commands. |
None |
|
G40 |
Deactivates Cutter Radius Compensation mode on the task. |
None |
|
G41 |
Activates Cutter Radius Compensation left mode on the task. |
None |
|
G42 |
Activates Cutter Radius Compensation right mode on the task. |
None |
|
G43 |
Specifies the radius that the task uses in Cutter Radius Compensation mode. |
None |
|
G44 |
Specifies the axes that comprise the X-Y or X-Y-Z plane when a cutter compensation mode is active on the task. |
None |
|
G60 |
Configures the task to use the acceleration duration that you specify for coordinated motion while operating in time-based ramping mode. |
SetupCoordinatedRampType() (Ramp Type) |
|
G61 |
Configures the task to use the deceleration duration that you specify for coordinated motion while operating in time-base ramping mode. |
SetupCoordinatedRampType() (Ramp Type) |
|
G63 |
Configures the task to operate with the sinusoidal acceleration and deceleration ramping type for coordinated motion. |
SetupCoordinatedRampType() (Ramp Type) |
|
G64 |
Configures the task to operate with the linear acceleration and deceleration ramping type for coordinated motion. |
SetupCoordinatedRampType() (Ramp Type) |
|
G65 |
Configures the task to use the acceleration rate that you specify for coordinated motion while operating in rate-based ramping mode. |
SetupCoordinatedRampType() (Ramp Type) |
|
G66 |
Configures the rate that the task uses to perform coordinated motion to decelerate dominant axes. |
SetupCoordinatedRampType() (Ramp Type) |
|
G67 |
Configures the task to use time-based ramping when accelerating and decelerating axes during coordinated motion. |
SetupCoordinatedRampType() (Ramp Type) |
|
G68 |
Configures the task to use rate-based ramping when accelerating and decelerating axes during coordinated motion. |
SetupCoordinatedRampType() (Ramp Type) |
|
G69 |
Configures the task to operate with the S-curve acceleration and deceleration ramping type for coordinated motion. |
SetupCoordinatedRampType() (Ramp Type) |
|
G70 |
Configures the task to treat distances and feedrates that you specify in G-code commands as being English units. |
SetupTaskDistanceUnits() (Distance Units) |
|
G71 |
Configures the task to treat distances and feedrates that you specify in G-code commands as being metric units. |
SetupTaskDistanceUnits() (Distance Units) |
|
G75 |
Configures the task to treat feedrates that you specify in G-code commands as being distance units per minute. |
SetupTaskTimeUnits() (Time Units) |
|
G76 |
Configures the task to treat feedrates that you specify in G-code commands as being distance units per second. |
SetupTaskTimeUnits() (Time Units) |
|
G82 |
Clears the program position offset on the specified axis. The program position will be restored to the current axis position. |
PositionOffsetClear() (Position Offsets) |
|
G90 |
Configures the task to operate in the absolute target mode. |
SetupTaskTargetMode() (Task Targeting Modes) |
|
G91 |
Configures the task to operate in the incremental target mode. |
SetupTaskTargetMode() (Task Targeting Modes) |
|
G92 |
Sets the program position of the specified axes. All moves that specify an absolute target-position will be relative to the new program position. |
PositionOffsetSet() (Position Offsets) |
|
G93 |
Configures the task for inverse time feedrate mode. Values specified to the F command are interpreted as the inverse amount of time that the controller should take to complete the distance specified in the move. |
None |
|
G94 |
Configures the task for normal feedrate mode. Values specified to the F command are interpreted as distance units per unit of time. |
None |
|
G95 |
Configures the task to interpret feedrates that you specify with the F command or the E command as units per spindle revolution. |
None |
|
G96 |
Configures the task to interpret the S command as the tangential speed, or the speed on the surface, of the spindle axis. You must specify surface speed and a radial axis to this command. |
None |
|
G97 |
Configures the task to interpret the S command in velocity units. |
None |
|
G98 |
Enables inverse dominance mode on the task. |
None |
|
G99 |
Disables inverse dominance mode on the task. |
None |
|
G100 |
Disables spindle shutdown mode on the task. |
None |
|
G101 |
Enables spindle shutdown mode on the task. |
None |
|
G108 |
Enables velocity blending mode on the task. |
VelocityBlendingOn() (Velocity Blending Functions) |
|
G109 |
Disables velocity blending mode on the task. |
VelocityBlendingOff() (Velocity Blending Functions) |
|
G114 |
Enables optional pause mode on the task. |
None |
|
G115 |
Disables optional pause mode on the task. |
None |
|
G118 |
Configures the center point coordinates that you specify to a coordinated arc motion command to be in absolute user units. |
None |
|
G120 |
Configures the task to disable the effects of manual feedrate override (MFO) and the feedhold state during asynchronous motion. |
None |
|
G121 |
Configures the task to enable the effects of manual feedrate override (MFO) and the feedhold state during asynchronous motion. |
None |
|
G143 |
Activates cutter offset compensation positive mode on the task. |
None |
|
G144 |
Activates cutter offset compensation negative mode on the task. |
None |
|
G149 |
Deactivates cutter offset compensation mode on the task. |
None |
|
G150 |
Disables part scaling mode on the task. |
None |
|
G151 |
Enables part scaling mode on the task. |
None |
|
G165 |
Configures the rate that the task uses to perform coordinated motion to accelerate dependent axes. |
SetupCoordinatedRampValue() (Set the Ramp Mode for Coordinated Axis Moves) |
|
G166 |
Configures the rate that the task uses to perform coordinated motion to decelerate dependent axes. |
SetupCoordinatedRampValue() (Set the Ramp Mode for Coordinated Axis Moves) |
|
G359 |
Sets the wait mode to wait the minimum amount of time between motion blocks. |
SetupTaskWaitMode() (Task Waiting Modes) |
|
G360 |
Sets the wait mode to wait for all motion to be done between motion blocks. |
SetupTaskWaitMode() (Task Waiting Modes) |
|
G361 |
Sets the wait mode to wait for all motion to be done and for all axes to be in position between motion blocks. |
SetupTaskWaitMode() (Task Waiting Modes) |
|
* Note that many of the G-codes do not have a 1:1 AeroScript equivalent. |
||
The table that follows shows a list of supported M-code commands.
|
M-Code |
Description |
AeroScript Equivalent* |
|---|---|---|
|
M0 |
Pauses the current task. |
ProgramPause() (Program Control) |
|
M1 |
Pauses the current task if the optional pause mode is active on the task, or does nothing if optional pause mode is not active. |
None |
|
M2 |
Stops the execution of the program on the current task. |
ProgramExit() (Program Control) |
|
M3 |
Starts motion in the clockwise direction on the spindle axis that is configured for the task. The command is complete after the spindle accelerates to the commanded speed. |
None |
|
M4 |
Starts motion in the counterclockwise direction on the spindle axis that is configured for the task. The command is complete after the spindle accelerates to the commanded speed. |
None |
|
M5 |
Causes the spindle axis that is configured for the task to decelerate to zero speed. |
None |
|
M30 |
Resets the execution of the program to the first executable line. |
ProgramReset() (Program Control) |
|
M47 |
Resets the execution of the program to the first executable line. Then it causes the controller to start execution of the program. |
ProgramRestart() (Program Control) |
|
M48 |
Prevents changes to the manual feedrate override (MFO) value on the task. |
None |
|
M49 |
Allows changes to the manual feedrate override (MFO) value on the task. |
None |
|
M50 |
Prevents changes to the manual spindle override (MSO) value on the task. |
None |
|
M51 |
Allows changes to the manual spindle override (MSO) value on the task. |
None |
|
M103 |
Starts clockwise motion on the spindle axis that is configured for the task. The command does not wait for the spindle to accelerate to the commanded speed. |
None |
|
M104 |
Starts counterclockwise motion on the spindle axis that is configured for the task. The command does not wait for the spindle to accelerate to the commanded speed. |
None |
|
* Note that many of the M-codes do not have a 1:1 AeroScript equivalent. |
||
Doing Motion
The G0, G1, G2, G3, G12, and G13 G-code commands execute rapid point-to-point moves, coordinated linear moves, coordinated arc moves, or coordinated linear and arc moves put together.
G0 Command: Rapid, Point-to-Point Motion
Use the G0 command to execute a rapid, point-to-point move on one or more axes when it is not necessary to coordinate more than one axis. This type of motion lets the axes move at different speeds and get to their endpoints at different times.
| Syntax | G0 <axis point> [<axis feedrates>] |
| Example | G0 X10 Y20 XF100 YF50 |
Use the DefaultAxisSpeed Parameter to configure the default speed that an axis will move during point-to-point motion. You can also specify an axis name followed by the ‘F’ character, then a numerical expression to configure the speed of an axis during point-to-point motion. For example, if your system has an axis named X, then you can specify XF100 on a program line that contains the G0 command or on its own program line to set the speed of the X axis to 100 user units per second.
The G0 command has the same functionality as the MoveRapid() AeroScript function. For more information, refer to the MoveRapid() function in Rapid Motion.
G1 Command: Coordinated Linear Motion
Use the G1 command to execute a coordinated linear move on the specified axes. A linear move creates a line in vector space. In this mode, axes move from their starting positions to their commanded positions in a coordinated fashion. This means that the axes that you command all start motion at the same time and stop motion at the same time because the axes follow a path that consists of a straight line.
| Syntax | G1 <axis point> [F Command] [E Command] |
| Examples | G1 X10 Y20 F100
G1 Z100 E50 |
Use the F command to configure the feedrate of a coordinated linear move that contains dominant axes. Use the E command to configure the feedrate of a coordinated linear move that contains only dependent axes. For more information, see F Command, E Command, and AxisType Parameter.
The G1 command has the same functionality as the MoveLinear() AeroScript function. For more information, refer to Linear Motion.
Coordinated Arc Motion G-Code Programming
This section shows you how to command coordinated arc motion on the first and second coordinate system.
G2 Command: Coordinated Clockwise Arc Motion (First Coordinate System)
Use the G2 command to configure a task to operate in vectorized circular positioning mode in the clockwise direction, using the axes that are specified in the first coordinate system of the task. Use the G16 command to specify the axes in the first coordinate system of the task. Use the G17, G18, and G19 commands to select which axes to use from the first coordinate system of the task.
| Syntax | G2 <endpoint> <center point> [F Command] |
| Examples | G2 X10 Y0 R5 F100 // R command method
G2 X0 Y0 I0 J10 // IJK method G2 P108.1 Q-18.3 R1.5 // PQR method G2 Q-18.3 I.5 J-1.5 // IJK method and Q method |
The G2 command has the same functionality as the MoveCw() AeroScript function. For more information, refer to Circular Arc Motion.
G3 Command: Coordinated Counterclockwise Arc Motion (First Coordinate System)
Use the G3 command to configure a task to operate in vectorized circular positioning mode in the counterclockwise direction, using the axes that are specified in the first coordinate system of the task. Use the G16 command to specify the axes in the first coordinate system of the task. Use the G17, G18, and G19 commands to select which axes to use from the first coordinate system of the task.
| Syntax | G3 <endpoint> <center point> [F Command] |
| Examples | G3 X10 Y0 R5 F100 // R command method
G3 X0 Y0 I0 J10 // IJK method G3 P108.1 Q-18.3 R1.5 // PQR method G3 Q-18.3 I.5 J-1.5 // IJK method and Q method |
The G3 command has the same functionality as the MoveCcw() AeroScript function. For more information, refer to Circular Arc Motion.
G12 Command: Coordinated Clockwise Arc Motion (Second Coordinate System)
Use the G12 command to configure a task to operate in vectorized circular positioning mode in the clockwise direction, using the axes that are specified in the second coordinate system of the task. Use the G26 command to specify the axes in the second coordinate system of the task. Use the G27, G28, and G29 commands to select which axes to use from the second coordinate system of the task.
| Syntax | G12 <endpoint> <center point> [F Command] |
| Examples | G12 X10 Y0 R5 F100 // R command method
G12 X0 Y0 I0 J10 // IJK method G12 P108.1 Q-18.3 R1.5 // PQR method G12 Q-18.3 I.5 J-1.5 // IJK method and Q method |
The G12 command lets you do two arc motions as part of the same coordinated move. For more information, refer to the Helixes and Dual Circular Motion section of this topic.
G13 Command: Coordinated Counterclockwise Arc Motion (Second Coordinate System)
Use the G13 command to configure a task to operate in vectorized circular positioning mode in the counterclockwise direction, using the axes that are specified in the second coordinate system of the task. Use the G26 command to specify the axes in the second coordinate system of the task. Use the G27, G28, and G29 commands to select which axes to use from the second coordinate system of the task.
| Syntax | G13 <endpoint> <center point> [F Command] |
| Examples | G13 X10 Y0 R5 F100 // R command method
G13 X0 Y0 I0 J10 // IJK method G13 P108.1 Q-18.3 R1.5 // PQR method G13 Q-18.3 I.5 J-1.5 // IJK method and Q method |
The G13 command lets you do two arc motions as part of the same coordinated move. For more information, refer to the Helixes and Dual Circular Motion section of this topic.
G118 Command: Specify Circular Center Points in Absolute Coordinates
When it executes G2, G3, G12, or G13 circular arc motion commands, the controller treats I, J, or K offsets that you specified as relative offsets from the locations of the axes when the move starts. Use the G118 command to cause the controller to interpret any I, J, or K offsets in absolute user units. This command is not modal and must be specified on each G2, G3, G12, or G13 motion line.
| Syntax | G118 <G-code command arc motion> |
| Examples | G118 G3 X2 Y-2 I.5 J-1.5
G118 G2 X2 Y2 I0.5 J1.5 |
Helixes and Dual Circular Motion
To create a helix move, specify G2 or G3 command motion on the same line as G1 command motion. You can also create a helix move by specifying G12 or G13 command motion on the same line as G1 command motion.
G2 X10 Y0 R5 G1 A10
If you want to do dual circular motion with four axes at the same time, specify G2 or G3 command motion on the same line as G12 or G13 command motion. You can also do dual circular motion with a helix by specifying G2 or G3 command motion, G12 or G13 command motion, and G1 command motion on the same program line.
G2 X10 Y10 P135 Q45 R5 G13 U10 A0 R5 G1 C10
Specifying the Center Point of Circular Arc Motion
You can specify the center point of a circular arc move (G2, G3, G12, or G13 commands) with the R command method or with the IJK method.
Use the R command method to specify the center point of a circular arc move by specifying a radius. If the radius that you specify to the R command is positive, then the controller generates a shorter arc that is always 180° or less. If the radius that you specify to the R command is negative, then the controller generates a longer arc that is always between 180° and 360°. You cannot create a full 360° circle with the R command method. To create a full 360° circle, you must use the IJK method.
Use the IJK method to specify the center of an arc as an incremental offset from the starting position of the axes. Or, use the G118 command on the same line as a G2 move to specify the center of an arc as absolute user units. The example that follows shows how to create a full 360° circle with the IJK method.
// Configure the first coordinate system to have X, Y, and Z axes // Then select axes X and Y from the first coordinate system G16 X Y Z G17 // Create a full circle that starts and ends at X=0, Y=0 // The center point of the circle is at X=1, Y=0 G2 X0 Y0 I1 J0
Methods for Specifying the Circular End Point
To specify the endpoint of a circular arc move (G2, G3, G12, or G13 commands) by declaring the endpoint positions and using the R command method, you can use the PQR method or the Q command method.
You can declare the end point of a circular arc move when you use the R command method to specify the center point of the circular arc motion.
G2 X10 Y0 P135 Q45 R5
You can use the PQR method to specify the absolute starting angle and absolute ending angle of the circular arc move. Use the P command to specify, in degrees, the absolute starting angle. Use the Q command to specify, in degrees, the absolute ending angle. The two absolute angles are measured counterclockwise from a line that is drawn through the center point of the circular arc, and is parallel to the X axis. If the starting and ending angles are the same, then the controller generates a full 360° circle. Use the R command to specify the radius of the circular arc move.
G2 X10 Y0 R5
You can use the Q command method to specify the absolute ending angle of the circular arc move. Use the Q command to specify, in degrees, the absolute ending angle. The absolute ending angle is measured counterclockwise from a line that is drawn through the center point of the circular arc, and is parallel to the X axis. When you use the Q command method, you cannot use the R command to specify the radius of the circular arc move. You must use the IJK method to specify the center point of the circular arc move.
G2 X10 Y0 I5 J0 Q45
Cutter Radius Compensation G-Codes
Cutter radius compensation compensates for the size of a cutting tool by causing the controller to maintain a constant offset that is perpendicular to the programmed path in a two-dimensional plane. You can use this feature to compensate for the radius of a cutting tool or the width of a laser. Use the G40, G41, G42, G43, and G44 modal and non-modal G-code commands to configure cutter radius compensation. For more information, refer to Cutter Radius Compensation.
Cutter Offset Compensation G-Codes
Cutter offset compensation compensates for the offset of a cutting tool by causing the controller to maintain a constant offset that is perpendicular to the programmed path in a three-dimensional plane. You can use this feature to compensate for the x-offsets, y-offsets, and cutter length of a cutting tool. Use the G44, G143, G144, and G149 modal and non-modal G-codes to configure cutter offset compensation. For more information, refer to Cutter Offset Compensation.
Configuring Motion
You can use the G-codes and G-code commands that follow to configure different configuration modes for motion on the task.
F Command
Use the F command to specify the feedrate of dominant axes for coordinated motion.
| Syntax | F <coordinated speed> |
| Examples | F100
F$rglobal[3] |
The specified feedrate is modal and stays active until you specify a new feedrate with the F command.
The F command has the same functionality as the SetupCoordinatedSpeed() AeroScript function. For more information, refer to the SetupCoordinatedSpeed() function in Coordinated Motion. For information about dominant and dependent axes, see AxisType Parameter and E Command in the section that follows.
E Command
Use the E command to specify the feedrate of dependent axes for coordinated motion.
| Syntax | E <coordinated speed> |
| Examples | E100
E$rglobal[3] |
The specified feedrate is modal and stays active until you specify a new feedrate with the E command. If a coordinated move contains dominant and dependent axes, the feedrate for dominant axes (the F command) is used for the move instead of the feedrate for dependent axes (the E command). For information about dominant and dependent axes, see AxisType Parameter and the F Command section of this topic.
The E command has the same functionality as the SetupDependentCoordinatedSpeed() AeroScript function. For more information, refer to Coordinated Motion.
S Command
Use the S command to specify the speed of the spindle, in user units, that is configured for the task.
| Syntax | S <spindle speed> |
| Examples | S50
S$rglobal[1] |
The value that you specify to the S command has an effect on the operation of the G95, G96, and G97 G-codes. The S command has the same functionality as the TaskMso() AeroScript function. For more information, refer to Manual Spindle Rotation Speed Override (MSO). Refer to the Spindle Axis Overview and SpindleAxis Parameter for instructions to configure and use your spindle axis.
G16 G-code: Configure Circular Axes in the First Coordinate System
Use the G16 G-code to configure I, J, and K axes of the first coordinate system for the G2 and G3 circular arc motion G-codes.
| Syntax | G16 <I axis> <J axis> <K axis> |
| Examples | G16 X Y Z |
The first axis that you specify to the G16 G-code is assigned to I, which is the X axis when specified with a G2 or G3 G-code. The second axis that you specify to the G16 G-code is assigned to J, which is the Y axis when specified with a G2 or G3 G-code. The third axis that you specify to the G16 G-code is assigned to K, which is the Z axis when specified with a G2 or G3 G-code.
G26 G-code: Configure Circular Axes in the Second Coordinate System
Use the G26 G-code to configure I, J, and K axes of the second coordinate system for the G12 and G13 circular arc motion G-codes.
| Syntax | G26 <I axis> <J axis> <K axis> |
| Examples | G26 X Y Z |
The first axis that you specify to the G26 G-code is assigned to I, which is the X axis when specified with a G12 or G13 G-code. The second axis that you specify to the G26 G-code is assigned to J, which is the Y axis when specified with a G12 or G13 G-code. The third axis that you specify to the G26 G-code is assigned to K, which is the Z axis when specified with a G12 or G13 G-code.
Coordinated Motion Acceleration and Deceleration Configuration
Use the G60, G61, G63, G64, G65, G66, G66, G67, G68, G69, G165, and G166 G-codes to configure different settings for acceleration and deceleration for coordinated motion.
G60 G-code: Configure Coordinated Acceleration Time
Use the G60 G-code to configure coordinated motion to use the specified amount of time to accelerate. This G-code has an effect only if the task is operating in time-based mode. For more information, refer to the G67 G-code or the SetupCoordinatedRampValue() function in Set the Ramp Mode for Coordinated Axis Moves.
| Syntax | G60 P<duration> |
| Examples | G60 P0.5 |
G63, G64, and G69 G-codes: Configure Coordinated Acceleration and Deceleration Type
Use the G63, G64, and G69 G-codes to configure the type of acceleration that the controller uses to perform coordinated motion.
| Syntax | G63
G64 G69 |
| Examples | G63
G64 G69 |
Use the G63 G-code to configure coordinated motion to use sinusoidal acceleration and deceleration. Use the G64 G-code to configure coordinated motion to use linear acceleration and deceleration. Use the G69 G-code to configure coordinated motion to use S-curve acceleration and deceleration. Sinusoidal (G63) acceleration and deceleration is typically better than linear acceleration and deceleration (G64) because it results in less disturbance to the servo system. However, it requires π/2 times more current than linear acceleration and deceleration. Refer to Acceleration and Deceleration Ramping.
G65 and G66 G-codes: Configure Dominant Coordinated Acceleration and Deceleration Rate
Use the G65 G-code to configure the coordinated motion to use the specified rate to accelerate dominant axes. Use the G66 G-code to configure the coordinated motion to use the specified value to decelerate dominant axes.
| Syntax | G65 P<acceleration rate>
G66 P<deceleration rate> |
| Examples | G65 P100
G66 P250 |
The G65 and G66 G-codes have an effect only if the task is operating in rate-based mode. For more information, refer to the G68 G-code or the SetupCoordinatedRampValue() function in Set the Ramp Mode for Coordinated Axis Moves. For more information about dominant and dependent axes, refer to AxisType Parameter.
G165 and G166 G-codes: Configure Dependent Coordinated Acceleration and Deceleration Rate
Use the G165 G-code to configure the coordinated motion to use the specified value to accelerate dependent axes. Use the G166 G-code to configure the coordinated motion to use the specified value to decelerate dependent axes.
| Syntax | G165 P<acceleration rate>
G166 P<deceleration rate> |
| Examples | G165 P100
G166 P250 |
The G165 and G166 G-codes have an effect only if the task is operating in rate-based mode. For more information, refer to the G68 G-code or the SetupCoordinatedRampValue() function in Set the Ramp Mode for Coordinated Axis Moves. For more information about dominant and dependent axes, refer to AxisType Parameter.
Distance Units Configuration
G70 and G71 G-codes: Configure Units Mode
You can configure tasks to operate in metric or English user units mode. In metric units mode, the controller interprets the positions and distances that you specify as metric units. In English units mode, the controller interprets the positions and distances that you specify as English units. Use the G70 and G71 G-codes with the PrimaryUnitsMapping Parameter to configure the task to operate in metric or English user units mode.
| Syntax | G70
G71 |
| Examples | G70
G71 |
If you set the PrimaryUnitsMapping Parameter to metric, which is the default setting, the G71 G-code configures the task to operate in metric units mode, and the G70 G-code configures the task to operate in English units mode. If you set the PrimaryUnitsMapping Parameter to English, then the G71 G-code configures the task to operate in English units mode, and the G70 G-code configures the task to operate in metric units mode.
AeroScript does not have functions to set English (G70) and Metric (G71) units. As an alternative in an AeroScript program, set the units mode to primary units or secondary units by using the SetupTaskDistanceUnits() function. For more information, refer to the SecondaryUnitsScaleFactor Parameter.
Time Units Configuration
Use the G75 and G76 G-codes to configure the time units of the task.
| Syntax | G75
G76 |
| Examples | G75 // Set time units to minutes
G76 // Set time units to seconds |
G75 G-code: Specify Feedrates in Distance Units per Minute
Use the G75 G-code to specify that feedrates are specified as distance units per minute. In this mode, the controller sets the Minutes bit of the TaskMode task status item to 1.
G76 G-code: Specify Feedrates in Distance Units per Second
Use the G76 G-code to specify that feedrates are specified in distance units per second. In this mode, the controller sets the Minutes bit of the TaskMode task status item to 0.
To configure the default time units of the task, set the DefaultTaskTimeUnits Parameter. The G75 and G76 G-codes have the same functionality as the SetupTaskTimeUnits() AeroScript function. For more information, refer to Time Units on the Motion Setup Functions page.
Target Mode Configuration
Use the G90 and G91 G-codes to configure the target mode of the task.
| Syntax | G90
G91 |
| Examples | G90 // Set the target mode to absolute positioning mode
G91 // Set the target mode to incremental positioning mode |
G90 G-code: Configure Absolute Positioning Target Mode
Use the G90 G-code to configure the task to operate in absolute positioning target mode. In this mode, the controller interprets move target positions as being absolute compared to a zero location established by homing or the program position offsets that you specified to the G92 G-code. In this mode, the controller sets the Absolute bit of the TaskMode task status item to 1.
G91 G-code: Configure Incremental Positioning Target Mode
Use the G91 G-code to configure the task to operate in incremental positioning target mode. In this mode, the controller interprets move target positions as being relative to the positions of the axes when the move is started. In this mode, the controller sets the Absolute bit of the TaskMode task status item to 0.
To configure the default target mode of the task, set the DefaultTaskTargetMode Parameter. The G90 and G91 G-codes have the same functionality as the SetupTaskTargetMode() AeroScript function. For more information, refer to Task Targeting Modes.
Wait Mode Configuration
Use the G359, G360, and G361 G-codes to configure the wait mode of the task. The wait mode determines how the controller waits for G0, G1, G2, G3, G12, and G13 motion to complete.
| Syntax | G359
G360 G361 |
| Examples | G359 // Set the wait mode to wait mode aut
G360 // Set the wait mode to wait for motion done G361 // Set the wait mode to wait for axes to be in-position |
The G359, G360, and G361 G-codes have the same functionality as the SetupTaskWaitMode() AeroScript function. For more information, refer to Task Waiting Modes.
G359 G-code: Configure Automatic Wait Mode
Use the G359 G-code to configure the task to operate in the automatic wait mode. In this mode, the controller does not wait for the axes that are a part of commanded moves to be in position before program execution continues to the next program line. Use this mode to reduce the cycle time of your program. In this mode, the controller sets the Wait Auto bit of the TaskMode task status item to 1 and sets the Wait For InPos bit of the TaskMode task status item to 0. The G359 G-code operates the same as specifying the WaitMode.Auto enumerator value to the SetupTaskWaitMode() function.
G360 G-code: Configure Move Done Wait Mode
Use the G360 G-code to configure the task to operate in the move done wait mode. In this mode, the controller does not wait for axes that are a part of command moves to be in position before program execution continues to the next program line. However, the controller will wait for the final velocities for all axes that you command to be zero before continuing execution of your program. In this mode, the controller sets the Wait Auto bit of the TaskMode task status item to 0 and sets the Wait For InPos bit of the TaskMode task status item to 0. The G360 G-code operates the same as specifying the WaitMode.MotionDoneAuto enumerator value to the SetupTaskWaitMode() function.
G359 G-code: Configure In-Position Wait Mode
Use the G361 G-code to configure the task to operate in the in-position wait mode. In this mode, the controller will wait for the final velocities for all axes that you command to be zero. This mode will also wait for axes that are a part of command moves to be in position before program execution continues to the next program line. In this mode, the controller sets the Wait Auto bit of the TaskMode task status item to 0 and sets the Wait For InPos bit of the TaskMode task status item to 1. The G361 G-code operates the same as specifying the WaitMode.InPosition enumerator value to the SetupTaskWaitMode() function.
Feedrate Settings
G93 G-code: Configure F Command For Coordinated Moves
Use the G93 G-code to configure the task to operate in a mode where the controller interprets the F command value as the inverse of the duration that is necessary to perform a coordinated move.
| Syntax | G93 |
| Examples |
G93 |
In this mode, the E command is ignored, and the F command value is used for both dominant and dependent axes. If you enable the G93 mode, then the G96 and G95 modes become disabled. In this mode, the controller sets the Program Feedrate Inverse Time bit of the TaskMode task status item to 1 and sets the Program Feedrate Units Per Spindle Rev bit of the TaskMode task status item to 0.
The AeroScript example program that follows uses the G93 G-code.
// Configure the task to interpret the F command in inverse time units. G93 // Configure the task to use seconds as the time units. G76 // Perform a coordinated linear move in two seconds. G1 X100 F(1.0/2.0)
G94 G-code: Configure F Command in Distance Units per Time Unit
Use the G94 G-code to configure the task to operate in a mode where the controller interprets the F command value as distance units per time unit. This is the default mode.
| Syntax | G94 |
| Examples | G94 |
If you enable the G94 mode, then the G93 and G95 modes become disabled. In this mode, the controller sets the Program Feedrate Inverse Time bit of the TaskMode task status item to 0 and sets the Program Feedrate Units Per Spindle Rev bit of the TaskMode task status item to 0.
G95 G-code: Configure F Command and E Command in Units per Spindle Revolution
Use the G95 G-code to configure the task to operate in a mode where the controller interprets both the F command value and the E command value in units per spindle revolution. This causes the axes to move at a speed proportional to the absolute value of the programmed spindle speed that you specified with the S command.
| Syntax | G95 |
| Examples |
G95 |
Variations in the actual speed of the spindle are not tracked and do not have an effect on the speed of the coordinated motion. If you enable the G95 mode, then the G93 and G94 modes become disabled. In this mode, the controller sets the Program Feedrate Inverse Time bit of the TaskMode task status item to 0 and sets the Program Feedrate Units Per Spindle Rev bit of the TaskMode task status item to 1.
Use the G70 and G71 G-codes to configure distance units for the task. The G70 and G71 G-codes have the same functionality as the SetupTaskDistanceUnits() AeroScript function. For more information, refer to Distance Units.
Use the G75 and G76 G-codes to configure time units for the task. The G75 and G76 G-codes have the same functionality as the SetupTaskTimeUnits() AeroScript function. For more information, refer to Time Units.
Spindle Feedrate Configuration
Use the G96 and G97 G-codes to configure the method that the controller uses to determine the speed of a spindle axis.
| Syntax | G96 <axis>
G97 |
| Examples | G96 Y
G97 |
Refer to the Spindle Axis Overview page for instructions to configure and use your spindle axis.
G96 G-code: Configure Tangential Speed as a Constant Value
Use the G96 G-code to configure the tangential speed (the speed on the surface) of the spindle axis to be a constant value. If you enable G96 mode, then G97 mode becomes disabled. The value of the S command and the position command of the radial axis that you specify to the G96 G-code are used to calculate the spindle speed based on the equation that follows.
Where:
is the speed of the spindle in revolutions per minute (RPM).
s is the wanted tangential speed of the spindle, specified by the S command.
R is the programmed position command of the specified radial axis in distance units.
Use the MaxSpeedClamp Parameter to limit the speed of the spindle axis in G96 mode because as the specified radial axis approaches the center of rotation of the spindle, the spindle axis can be commanded to excessive speeds, which can cause axis faults.
G97 G-code: Configure Spindle Speed in Velocity Units
Use the G97 G-code to configure the speed of the spindle to operate in velocity units. If you enable G97 mode, then the G96 mode becomes disabled. The velocity units that you specify to the S command are determined by the values of the CountsPerUnit Parameter and DependentSpeedScaleFactor Parameter of the spindle axis. This mode is the default.
Inverse Dominance Mode
G98 G-code: Enable Inverse Dominance Mode
Use the G98 G-code to enable inverse dominance mode.
| Syntax | G98 |
| Examples |
G98 |
In this mode, the controller reverses the behavior of axis dominance. Thus, the dominant axes act as dependent axes, and dependent axes act as dominant axes. In this mode, the controller sets the Inverse Dominance bit of the TaskMode task status item to 1. For more information about axis dominance, refer to the AxisType Parameter.
G98 G-code: Disable Inverse Dominance Mode
Use the G99 G-code to disable the inverse dominance mode that was enabled with the G98 G-code. This mode is the default.
| Syntax | G99 |
| Examples |
G99 |
In this mode, the controller sets the Inverse Dominance bit of the TaskMode task status item to 0.
Spindle Shutdown Mode
G101 G-code: Enable Spindle Shutdown Mode
Use the G101 G-code to enable spindle shutdown mode. In the spindle shutdown mode, the spindle axis reacts to the feedhold state of the task, aborts, and task errors, in the same manner that any other axis reacts to these actions. However, in this mode, if the feedhold state of the task is enabled and subsequently disabled, the spindle axis will not accelerate to its commanded speed. In this mode, the controller sets the Spindle Stop On Program Halt bit of the TaskMode task status item to 1.
G100 G-code: Disable Spindle Shutdown Mode
Use the G100 G-code to disable the spindle shutdown mode that you enabled with the G101 G-code on the task. When you disable the spindle shutdown mode, the spindle axis acts independently of other motion, and is not affected by the feedhold state of the task, aborts, or task errors. This is the default mode. In this mode, the controller sets the Spindle Stop On Program Halt bit of the TaskMode task status item to 0.
| Syntax | G101
G100 |
| Examples | G101
G100 |
Velocity Profiling G-Codes
Use the G108 and G109 G-codes to activate or deactivate the velocity profiling mode of the task.
| Syntax | G108
G109 |
| Examples | G108
G109 |
The G108 and G109 G-codes have the same functionality as the VelocityBlendingOn() and VelocityBlendingOff() AeroScript functions. For more information, refer to Velocity Blending Functions.
G108 G-code: Enable Velocity Blending Mode
Use the G108 G-code to enable velocity blending mode. In this mode, the controller will blend multiple coordinated motion commands into one continuous motion path. The controller does not decelerate to zero velocity between coordinated moves, but instead uses the coordinated speed to maintain a consistent speed between moves. In this mode, the controller sets the Motion Continuous bit of the TaskMode task status item to 1. Refer to the F Command and the E Command for more information.
G109 G-code: Disable Velocity Blending Mode
Use the G109 G-code to disable the velocity blending mode that you enabled with the G108 G-code. This mode is the default. In this mode, the controller sets the Motion Continuous bit of the TaskMode task status item to 0.
Optional Pause Mode
Use the G114 and G115 G-codes to activate or deactivate the optional pause mode of the task. Refer to the M1 M-code for more information.
| Syntax | G114
G115 |
| Examples | G114
G115 |
G114 G-code: Enable Optional Pause Mode
Use the G114 G-code to enable optional pause mode for the task. In this mode, the controller will pause the task if an M1 M-code is executed. In this mode, the controller sets the Optional Pause bit of the TaskMode task status item to 1.
G115 G-code: Disable Optional Pause Mode
Use the G115 G-code to disable the optional pause mode for the task that you enabled with the G114 G-code. In this mode, the controller will not perform any operation when executing M1 M-codes, and will continue to execute the program. This is the default mode. In this mode, the controller sets the Optional Pause bit of the TaskMode task status item to 0.
Configuring the Response of Asynchronous Motion to MFO and Feedhold
Use the G120 and G121 G-codes to configure whether the controller applies the manual feedrate override and feedhold state to asynchronous motion. Refer to the Motion Functions page for more information about asynchronous motion.
| Syntax | G120
G121 |
| Examples | G120
G121 |
G120 G-code: Disable the Effects of MFO and Feedhold on Asynchronous Motion
Use the G120 G-code to disable the effect of manual feedrate override (MFO) and the feedhold state on asynchronous motion that you enabled with the G121 G-code. This is the default mode. In this mode, the controller sets the Mfo Active On Jog bit of the TaskMode task status item to 0.
G121 G-code: Enable the Effects of MFO and Feedhold on Asynchronous Motion
Use the G121 G-code to enable the effects of manual feedrate override (MFO) and the feedhold state on asynchronous motion. In this mode, the controller sets the Mfo Active On Jog bit of the TaskMode task status item to 1.
Part Scaling
G151 G-code: Enable Part Scaling
Use the G151 G-code to enable part scaling mode on the task for the specified axes. When you use the G151 G-code, you must specify one or more pairs that each consist of an axis and a scale factor.
| Syntax | G151 <axis point> |
| Examples | // Scale the part by 2 in the direction of the X axis. // Scale the part by 4 in the direction of the Y axis. G151 X2 Y4 |
When part scaling mode is active for any axes on the task, the controller sets the Scaling Active bit of the TaskStatus2 task status item to 1. The part scaling mode scales the programmed position targets of MoveRapid() (G0), MoveLinear() (G1), MoveCw (G2), MoveCcw() (G3), MoveIncremental() and MoveAbsolute() motion. When you issue the G151 G-code, the controller makes a scale center at the current position. Then it scales, by the specified scale factor, all absolute motion positions that you supply. The controller scales these positions around the scale center. Refer to the equation that follows to see how the controller determines the value of each position after part scaling is applied.
G150 G-code: Disable Part Scaling
Use the G150 G-code to disable part scaling mode on the task for the specified axes that you enabled with the G151 G-code. If you do not specify any axes to the G150 G-code, then part scaling mode is disabled on the task for all axes.
| Syntax | G150
G150 <axes> |
| Examples | G150 // Disable part scaling for all axes G150 Y Z // Disable part scaling for axes Y and Z |
When part scaling mode is no longer active for any axes on the task, the controller sets the Scaling Active bit of the TaskStatus2 task status item to 0.
Program Position Offsets
Use the G92 and G82 G-codes to configure program position offsets for a task. The G92 and G82 G-codes have the same functionality as the PositionOffsetSet() and PositionOffsetClear() AeroScript functions. For more information, refer to Position Offsets.
G92 G-code: Configure Program Position Offsets
Use the G92 G-code to set the program position offsets of the specified axes to the specified values. Setting the program position offsets of axes defines a new coordinate system and does not cause the axes to move.
| Syntax | G92 <axis point> |
| Examples | G92 X10.5 Y$rglobal[3] |
G82 G-code: Clear Program Position Offsets
Use the G82 G-code to clear the program position offsets of the specified axes, restoring the offsets to the values that were active before you specified the G92 G-code with the specified axes.
| Syntax | G82
G82 <axes> |
| Examples | G82 // Clear offsets on all axes
G82 X Z // Clear offsets on axes X and Z |
The AeroScript example program that follows uses the G92 and G82 G-codes.
// Move axes X and Y to (3, 3). G90 G1 X3 Y3 // Axes X and Y remain at absolute position (3, 3). // The axes report as being at a programmed position of (0, 0). G92 X0 Y0 // Move axes to a programmed position of (5, 5). // The axes will move to an absolute position of (8, 8) because of the
// offset positions specified to the G92 command. G1 X5 Y5 // Restore the program position offsets to (0, 0). // This causes the axes to report a programmed position of (8, 8). G82
Work Offsets
Use work offsets to program move targets that are relative to a fixed point in space when you do not know the absolute coordinates of those move targets. Use the G53, G54, G55, G56, G57, G58, and G59 G-codes to use work offsets. Refer to the Position and Work Offset Functions on the page for more information.
G54, G55, G56, G57, G58, and G59 G-codes: Enable work offsets
Use the G54, G55, G56, G57, G58, and G59 G-codes to enable work offsets 1 through 6. Work offsets must first be configured by issuing the WorkOffsetConfigureOffset() AeroScript function. If you do not specify axes, the work offset is enabled for all configured axes.
| Syntax |
G54
G55 G56 G57 G58 G59 |
| Examples | G54 // Enable work offset 1 on all configured axes
G58 X Y // Enable work offset 5 on axes X and Y |
G53 G-code: Disable work offsets
Use the G53 G-code to disable work offsets on the specified axes. If you do not specify axes, work offsets are disabled for all axes.
| Syntax |
G53 |
| Examples | G53 // Disable work offsets on all axes
G53 X Y // Disable work offsets 5 on axes X and Y |
G153 G-code: Suppress work offsets
Use the G153 G-code to disable work offsets only for the G-code motion that you specify on the same program line. When you use G153, program position offsets stay active.
| Syntax |
G153 <G-code move> |
| Examples |
G153 G1 X10 // Work offsets are not applied for any axes used in this motion |
Miscellaneous G-Codes
G4 G-code: Motion Dwell
Use the G4 G-code to pause program and motion execution by the specified amount of time, in seconds.
| Syntax | G4 P<duration> |
| Examples |
G4 P0.002 // Dwell for 2 milliseconds |
The duration that you specify has a resolution of 1 millisecond.
The G4 G-code has the same functionality as the Dwell() AeroScript function. For more information, refer to Dwell.
G8 G-code: Instant Acceleration
Use the G8 G-code to force the G-code motion specified on the same line to immediately accelerate to the maximum feedrate, if possible.
| Syntax | G8 <G-code move> |
| Examples | G8 G1 X10 F50 |
G9 G-code: Forced Deceleration
Use the G9 G-code to force the G-code motion specified on the same line to decelerate to zero velocity, even when the task is configured to use velocity profiling mode.
| Syntax | G9 <G-code move> |
| Examples | G9 G2 X10 Y0 R5 F100 |
When velocity profiling mode is active (G108), you can also force a coordinated G-code move to decelerate to zero velocity if you specify a G4 G-code (motion dwell) on the next program line. When velocity profiling mode is not active (G109), then the controller decelerates all coordinated G-code moves to zero velocity before executing the next move.
G108
G1 X10 F30
G1 X40 F25
G4 P0 // This causes the previous move to decelerate to zero velocity
G1 X50 F27
For more information about velocity profiling mode, refer to the G108 and G109 G-codes in this topic. The G4 G-code has the same functionality as the Dwell() AeroScript function. For more information, refer to Dwell.
M-Codes
M-codes consist of the letter M followed by an integer literal, such as M0 or M2. M-codes can be specified on their own line in an AeroScript program or library source file, or they can be specified with some G-codes on the same line. Only one M-code can be specified on a line. Refer to the Supported M-Codes table.
M0 M-code: Pause the AeroScript Program
Use the M0 M-code to pause the execution of the AeroScript program.
| Syntax | M0 |
| Examples | M0 |
The M0 M-code has the same functionality as the ProgramPause() AeroScript function. For more information, refer to Program Control.
M1 M-code: Optionally Pause the AeroScript Program
Use the M1 M-code to optionally pause the execution of the AeroScript program.
| Syntax | M1 |
| Examples | M1 |
If the controller executes the M1 M-code when optional pause mode (G114 mode) is active, then the program will pause. Otherwise, if optional pause mode is not active (G115 mode), then the controller will ignore the M1 M-code. Refer to the M0 M-code for more information.
M2 M-code: Stop the AeroScript Program
Use the M2 M-code to end the execution of the AeroScript program.
| Syntax | M2 |
| Examples | M2 |
The M2 M-code has the same functionality as the ProgramExit() AeroScript function. For more information, refer to Program Control.
M30 M-code: Reset the AeroScript Program
Use the M30 M-code to reset the AeroScript program to its first executable line and pause the program.
| Syntax | M30 |
| Examples | M30 |
The M30 M-code has the same functionality as the ProgramReset() AeroScript function. For more information, refer to Program Control.
M47 M-code: Restart the AeroScript Program
Use the M47 M-code to reset the AeroScript program to its first executable line and then immediately start running the program.
| Syntax | M47 |
| Examples | M47 |
This M-code has the same behavior as if you executed the M30 M-code followed by the ProgramStart() function or by pressing the Run button in Automation1 Studio. The M47 M-code has the same functionality as the ProgramRestart() AeroScript function. For more information, refer to Program Control.
Spindle Configuration and Spindle Motion M-Codes
You can use the M3, M4, M5, M50, M51, M103, and M104 M-codes to configure the motion of the spindle that is configured for the task. Refer to the Spindle Axis Overview and SpindleAxis Parameter for instructions to configure and use your spindle axis.
For more information about configuring the speed of the spindle axis, refer to the S Command section of this topic.
Enabling Spindle Motion
You can use the M3, M4, M103, or M104 M-codes to enable spindle motion.
M3 M-code: Start Spindle Motion in the Clockwise Direction Synchronously
Use the M3 M-code to cause the spindle axis that is configured for the task to start rotating in the clockwise direction.
| Syntax | M3 |
| Examples | M3 |
The acceleration behavior of the spindle axis depends on the DefaultAxisRampMode Parameter and the DefaultAxisRampType Parameter. This M-code operates synchronously, so the program line that the M3 M-code is specified on will execute until the spindle axis accelerates to the commanded spindle speed.
M4 M-code: Start Spindle Motion in the Counterclockwise Direction Synchronously
Use the M4 M-code to cause the spindle axis that is configured for the task to start rotating in the counterclockwise direction.
| Syntax | M4 |
| Examples | M4 |
The acceleration behavior of the spindle axis depends on the DefaultAxisRampMode Parameter and the DefaultAxisRampType Parameter. This M-code operates synchronously, so the program line that the M4 M-code is specified on will execute until the spindle axis has accelerated to the commanded spindle speed.
M103 M-code: Start Spindle Motion in the Clockwise Direction Asynchronously
Use the M103 M-code to cause the spindle axis that is configured for the task to start rotating in the clockwise direction.
| Syntax | M103 |
| Examples | M103 |
The acceleration behavior of the spindle axis depends on the DefaultAxisRampMode Parameter and the DefaultAxisRampType Parameter. This M-code operates asynchronously, so the program will continue executing more lines after a line containing the M103 M-code without waiting for the spindle axis to reach its full speed.
M104 M-code: Start Spindle Motion in the Counterclockwise Direction Asynchronously
Use the M104 M-code to cause the spindle axis that is configured for the task to start rotating in the counterclockwise direction.
| Syntax | M104 |
| Examples | M104 |
The acceleration behavior of the spindle axis depends on the DefaultAxisRampMode Parameter and the DefaultAxisRampType Parameter. This M-code operates asynchronously, so the program will continue executing more lines after a line containing the M104 M-code without waiting for the spindle axis to reach its full speed.
M5 M-code: Disable Spindle Motion
Use the M5 M-code to disable spindle motion.
| Syntax | M5 |
| Examples | M5 |
The M5 M-code will cause the spindle axis to decelerate to zero velocity, using the DefaultAxisRampMode Parameter and the DefaultAxisRampType Parameter to configure the operation of the deceleration. After the spindle axis reaches a speed of zero, the controller will disable the axis.
Manual Spindle Override (MSO) Configuration
Use the M50 and M51 M-codes to configure if you can change the manual spindle override (MSO) value on the task or not.
| Syntax | M50
M51 |
| Examples | M50
M51 |
The M50 and M51 M-codes determine if you can set MSO on a task. For more information about setting MSO, refer to the TaskMso() function in Manual Spindle Rotation Speed Override (MSO).
M50 M-code: Prevent changes to the Manual Spindle Override value
Use the M50 M-code to prevent changes to the manual spindle override (MSO) value for the spindle axis that is configured for the task. This mode causes the controller to disable the M51 mode and set the Mso Lock bit of the TaskMode task status item.
M51 M-code: Allow changes to the Manual Spindle Override value
Use the M51 M-code to allow changes to the manual spindle override (MSO) value for the spindle axis that is configured for this task. This is the default mode. This mode causes the controller to disable the M50 mode and clear the Mso Lock bit of the TaskMode task status item.
IMPORTANT: The M50 and M51 M-codes do not disable or enable MSO. If MSO has already been set with the TaskMso() function, the configured MSO value will continue to have an effect on motion. The M50 and M51 M-codes only affect if you can change MSO with the TaskMso() function. To disable MSO, set the MSO percentage to 100% with the TaskMso() function.
Manual Feedrate Override (MFO) Configuration
Use the M48 and M49 M-codes to configure if you can change manual feedrate override (MFO) value on the task or not.
| Syntax | M48
M49 |
| Examples | M48
M49 |
The M48 and M49 M-codes determine if you can set MFO on a task. For more information about setting MFO, refer to the TaskMfo() function in Manual Feedrate Override (MFO).
M48 M-code: Prevent changes to the Manual Feedrate Override value
Use the M48 M-code to prevent changes to the manual feedrate override (MFO) value on the task. This mode causes the controller to disable the M49 mode and set the Mfo Lock bit of the TaskMode task status item.
M49 M-code: Allow changes to the Manual Feedrate Override value
Use the M49 M-code to allow changes to the manual feedrate override (MFO) value on the task. This is the default mode. This mode causes the controller to clear the Mfo Lock bit of the TaskMode task status item.
IMPORTANT: The M48 and M49 M-codes do not disable or enable MFO. If MFO has already been set with the TaskMfo() function, the configured MFO value will continue to have an effect on motion. The M48 and M49 M-codes only affect if you can change MFO with the TaskMfo() function. To disable MFO, set the MFO percentage to 100% with the TaskMfo() function.



