-

Syntax

Comments

Parameters

Variables

  • #yyyy= xx.x
    • #1003 = 100
    • #1005 = [#1003 + #1004]
    • #1006 = PLC.LREALS[45]
    • PLC.LREALS[46] = #1005

Loops

  • IF statement
    • IF [condition]
    • .....
    • END
      • IF [#10000 == 0]
      • G53 X#5010 Y#5011 F30000 // Move above the transfer station
      • M202 // Open the shroud
      • G53 Z[#5012 + #5015] F10000 // Move Z down to the approach position
      • END
    • IF [condition]
    • .....
    • ELSE
    • .....
    • END


  • WHILE statement
    • WHILE [condition] DO
    • .....
    • END
      • #1001 = 0
      • WHILE[#1001 <= 100] DO
      • N11 G1 X#1001 F3000
      • N11 G1 Y#1001 F3000
      • G4 P500
      • #1001 = #1001 + 10
      • END


Whitespace

Line endings

Case Sensitivity

Values

G-Code Grammar



Examples






 


This is the latest version of Compass Online help and the content may refer to features not available in previously released versions of Compass.

Copyright © 2026 YASKAWA America, Inc.