General Command Overview
Preprocessor
Command | Description |
---|---|
The #include directive inserts the contents of another file. The included file is referenced by its path. Typically, it is used to “import” commonly used code like e.g. libraries. Its behavior is similar to the C-Preprocessor. |
Interpolations
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Interpolation mode: Linear. | Modal. | Default. | |
Interpolation mode: Linear. | Modal. | No. | |
Clockwise interpolation mode: Circular or helical. | Modal. | No. | |
Counterclockwise interpolation mode: Circular or helical. | Modal. | No. | |
With G303 an circular arc (CIP circle) can be programmed, that can be freely located in space. |
| No | |
Defines a dwell time, i.e. suspends machining for a given duration. | Nonmodal. | No. |
Workingplane Selection
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Selects | Modal. | Default. | |
Selects | Modal. | No. | |
Selects | Modal. | No. |
Delete Distance to go
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Delete distance to go. | Nonmodal. | No. |
Deactivation and Activation of Tool Radius Compensation
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Deactivates Tool Radius Compensation (TRC). With/After a G40 command it is mandatory to program at least one geometry element. | Modal. | Default. | |
Activates Tool Radius Compensation (TRC). | Modal. | No. | |
Activates Tool Radius Compensation (TRC). | Modal. | No. |
Set, Deactivate and Activate Zero-Offset-Shift Translations
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Deactivates any zero-offset-shift translation. | Modal. | Default. | |
Activates the zero-offset-shift associated with the given | Modal. | No. | |
Sets the translation associated with the given | Modal. | No. |
Command | Description |
---|---|
zeroOffsetShiftSet(g:= USInt, | Sets the translation for |
Accurate Stop
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Accurate stop. | Nonmodal. | No. | |
Accurate stop. | Modal. | No. |
Set Unit for Length and Speed
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Sets the unit for lengths to inch. | Modal. | No. | |
Sets the unit for lengths to millimeter. | Modal. | Default. | |
Sets the unit for lengths to inch. | Modal. | No. | |
Sets the unit for lengths to millimeter. | Modal. | Default. |
Switch to Absolute or Relative Coordinates
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Switches to absolute programming. | Modal. | Default. | |
Switches to incremental programming. | Modal. | No. |
IJK
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Center point is | Modal. | Default: Center point is |
M-Functions
Command | Description |
---|---|
Triggers the | |
M2 | Predefined |
M30 | Predefined |
Tool Orientation
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Switches tool orientation. | Modal. | No. |
Set Block Number
Command | Description |
---|---|
Block number. |
Set Radius
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Sets the radius within the context of | Modal. | No. |
Set Cartesian Coordinate
Command | Description |
---|---|
Sets the | |
Sets the | |
Sets the |
Auxiliary Axes
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Sets label for auxiliary axis. | Modal. | No. |
Set Orientation Angle
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Sets the | Nonmodal, but may influence succeeding blocks. | No. | |
Sets the | Nonmodal, but may influence succeeding blocks. | No. | |
Sets the | Nonmodal, but may influence succeeding blocks. | No. |
Control Structures
Command | Description |
---|---|
Conditional statement. | |
Conditional statement. | |
Counter-controlled loop. | |
Head-controlled loop. | |
Foot-controlled loop. | |
Leaving a loop. |
Jump statement
Command | Description |
---|---|
Jump statement. |
Trigonometric
Command | Description |
---|---|
Returns the sine of | |
Returns the cosine of | |
Returns the tangent of | |
Returns the arc sine of | |
Returns the arc cosine of | |
Returns the arc tangent of | |
Returns the arc tangent of |
Arithmetic
Command | Description |
---|---|
Returns the absolute value of | |
Returns the square root of | |
Returns the natural logarithm of | |
Returns the decimal logarithm of | |
Returns | |
Returns the sum of all parameters. | |
Returns the product of all parameters. | |
Returns the difference | |
Returns the quotient | |
Returns the remainder of the integer division | |
Returns |
Arithmetic Parameters
Command | Description |
---|---|
Assigns an | |
Extracts an |
Bit Shift and Bit Rotation
Command | Description |
---|---|
Returns the bitstring | |
Returns the bitstring | |
Returns the bitstring | |
Returns the bitstring |
Logical Operations
Command | Description |
---|---|
Returns the bitwise Logical And of all parameters. | |
Returns the bitwise Logical Or of all parameters. | |
Returns the bitwise Logical Exclusive Or of all parameters. | |
Returns the bitwise complement of |
Selection (Conditional Expressions)
Command | Description |
---|---|
Returns | |
Returns |
Min, Max and Limit
Command | Description |
---|---|
Returns the maximum of all parameters. | |
Returns the minimum of all parameters. | |
Returns |
Comparison
Command | Description |
---|---|
Returns | |
Returns | |
Returns | |
Returns | |
Returns | |
Returns |
Strings and Messages
Command | Description |
---|---|
Converts and concatenates the given arguments to one string. | |
Sends the given message to the message list of TwinCAT. |
Transformations
Command | Description |
---|---|
transRotX(angle:= LReal) | Rotation around the respective axis by the given angle in the user-defined angle unit. |
Rotate around vector | |
Mirror with respect to the | |
Scales the coordinate system by the | |
Scales the selected path axis (axisNo) by the factor. | |
Translate by vector | |
Pops a transformation from the stack of transformations. | |
Yields the depth of the stack of transformations, i.e. the number of active transformations. | |
Reduces the stack of transformations to the given depth. |
Movement
Command | Description |
---|---|
moveCircle3d(cx:= LReal, | Move circular by rotating around the center |
Centerpoint Correction
Command | Description |
---|---|
Activates the centerpoint correction for circles. Used for circles that are defined by centerpoint programming. | |
Sets the precision limit for the centerpoint of circles. |
Tools
Command | Description |
---|---|
Set a parameter of the tool | |
Yields the given tool parameter. | |
toolSet(index:= USInt, | Set all parameters of a tool. |
Enumeration of tool types. |
Tool Radius Compensation
Command | Description |
---|---|
trcApproachDepartSet(approachRadius:= LReal, | Configures the approach and depart behavior to use an arc of given radius and angle. |
Configures the amount of segment extension that is used to close gaps. | |
Configures the lookahead that is used for collision elimination. | |
Returns the current configuration as a structure value. | |
Configures the tool radius compensation. Summarizes | |
Structure containing all configuration parameters of the tool radius compensation. | |
collisionElimination(nx:= LReal, | Activates collision elimination with respect to the plane of the normal vector |
To ignore conflicts between the path preceding the call and the path succeeding the call. |
Command | Description | Modal or Nonmodal | Default |
---|---|---|---|
Deactivates Tool Radius Compensation (TRC). | Modal. | Default. | |
Activates Tool Radius Compensation (TRC). Left. | Modal. | No. | |
Activates Tool Radius Compensation (TRC). Right. | Modal. | No. |
Synchronization
Command | Description |
---|---|
Synchronizes the interpreter with the associated NC-channel. | |
Waits for a |
Query of Axes
Command | Description |
---|---|
Set the MCS coordinates of the interpreter to the actual coordinates of the physical axes. |
Current Point
Command | Description |
---|---|
frameGet(x:= LReal, | Store the current frame of the PCS in |
qAxisGet(q1:= LReal, | Store the current values of |
Suppression of G-Code Blocks
Command | Description |
---|---|
Yields the current value of the disable mask. | |
Sets the internal disable mask to the given value. |
Units
Command | Description |
---|---|
Set the unit for angles to | |
Enumeration of unit angles. | |
Set the unit for lengths to | |
Enumeration of unit lengths. | |
Set the unit for time to | |
Enumeration of unit times. | |
unitVelocitySet(unitLength:= UnitLength, | Set the unit for velocity to |
Trigonometric (Unit Aware)
Command | Description |
---|---|
Returns the sine of the given | |
Returns the cosine of the given | |
Returns the tangent of the given | |
Returns the arc sine of | |
Returns the arc cosine of | |
Returns the arc tangent of | |
Returns the arc tangent of |
Feed Mode
Command | Description |
---|---|
Set the feed mode. | |
Enumeration of feed mode types. |
Feed Mode
Command | Description |
---|---|
feedInterpolationSet(feedInterpolation:= FeedInterpolationType) | Set feed interpolation. |
Enumeration of feed interpolation types. |
Streaming of Large G-Code Files
Command | Description |
---|---|
Executes the plain |
Vertex Smoothing
Command | Description |
---|---|
smoothingSet | Set the vertex smoothing behavior. |
Enumeration of smoothing main types. | |
Enumeration of smoothing sub types. | |
Automatic accurate stop. |
Dynamic Override
Command | Description |
---|---|
Set the dynamic override of axes to the given |
Programming reference
Command | Description |
---|---|
As an alternative to | |
The currently active dimension for the movement commands can be read out with | |
Enumeration of reference types. |
Center Point Reference of Circles
Command | Description |
---|---|
Sets the center reference type for circles that are programmed by | |
Enumeration of reference types. |
Dynamics Set
Command | Description |
---|---|
Change in axis dynamics. | |
Change in path dynamics. |
Spline Interpolation
Command | Description |
---|---|
Spline interpolation. |