Home Support G-codes implemented in myCNC software

G-codes implemented in myCNC software.

myCNC software developing is in progress. If you are interested in myCNC, please
check this page later to have up-to-date information. (last updated 2012-0424)

 G-codes

CodeDescription
Comments
 G00 Rapid positioning
 
 G01Linear interpolation
 
 G02Circular interpolation clockwise
 
 G03Circular interpolation counterclockwise  
 G04Dwell
 
 G10 L2
Data setting command
 
 G10 L70
Data setting command 
 G10 L80Data setting command 
 G10 L81
Data setting command 
 G15
Polar coordinates OFF
 
 G16Polar coordinates ON
 
 G17
Plane XY selection
 
 G18Plane XZ selection
 
 G19Plane YZ selection
 
 G20English utits of input
 
 G21Metric units of input
 
 G28Machine zero return (reference point 1)
 
 G28.1
Store current position as Reference point 1 
 G30Machine zero return (reference point 2)
 
 G30.1
Store current position as Reference point 2
 

 G28.2 -
G28.4

Store current position to Position Register 1..3
 

 G28.5 -
G28.7

 Return to position, stored inPosition Register 1..3 
 G38.2 -  G38.5Straight probe 
 G38.9
Tool length measure
 
 G40 Cutter radius compensation cancel
 
 G41Cutter radius compensation - left 
 
 G42 Cutter radius compensation - right  
 
 G43
 Tool length offset
 
 G44 Tool length offset
 
 G49 Cancel Tool length offset
 
 G50
 Scaling OFF
 
 G51 Scaling ON
 
 G53
 Machine coordinates
 
 G54 Work coordinate offset 1
 
 G55 Work coordinate offset 2
 
 G56 Work coordinate offset 3 
 G57 Work coordinate offset 4 
 G58 Work coordinate offset 5 
 G59 Work coordinate offset 6 
 G59.1 -
 G59.3
 Work coordinate offset 7 -
 Work coordinate offset 9
 
 G65 Simple macro call
 
 G68
 Rotation coordinates ON
 
 G69 Rotation coordinates OFF
 
 G73 Peck drilling cycle - high-speed (retract only to  clearance distance)  
 G74 Tapping cycle - Reverse (lefthand, M04 spindle direction)
 
 G80
 Cancel canned cycle 
 G81 Simple drilling cycle  
 G82 Drilling cycle with dwell 
 G83 Peck drilling cycle (full retraction from pecks) 
 G84 Tapping cycle, righthand, M03 spindle direction
 
 G85 Boring cycle
 
 G86 Boring cycle
 
 G90 Absolute dimensioning mode
 
 G91 Incremental dimensioning mode
 
 G90.1 Arc centers I,J,K are absolute 
 G91.1 Arc centers I,J,K are relative to the arc's starting point 
 G92
 set Current offset
 
 G98 Return to initial Z level in canned cycle 
 G99 Return to R level in canned cycle 

 

 

M-codes (Miscellaneous functions)

CodeDescription
Comments
 M00 Compulsory program stop 
 M02 End of program
 
 M03 Spindle rotation normal
 
 M04 Spindle rotation reverse 
 M05 Spindle stop
 
 M06 Automatic tool change (ATC)
implemented through pre-defined macro procedure. It suits for Automatic and Manual tool change.
 M07 Coolant mist ON
 
 M08 Coolant ON (coolant pump motor ON) 
 M09 Coolant OFF (coolant pump motor OFF) 
 M30 Program end 
 M62 Turn off digital output syncronized with motion (for EMC compatibility)
 
 M63 Turn on digital output syncronized with motion (for EMC compatibility)
 
 M64 Turn off digital output immediately (for EMC compatibility)
 
 M65 Turn on digital output immediately (for EMC compatibility) 
 M98 Subprogram call
 
 M99 Subprogram end
 
 M101 ...
 M199
 User defined miscellaneous functionsImplemented either via integrated PLC procedures or Macros
 M200 ... M999  User defined miscellaneous functionsImplemented either via integrated PLC procedures or Macros

 

Parameters array

myCNC maintains parameters array. Parameters available for read/write operation in G-codes program.
Parameters numbers are mostly compatible with Linux EMC2 system, but here are a lot of extra variables.

 

Num
Description
Comments
 1-5000 G-Code user parameters 
 5021 ... 5028
 Current Machine Position
 
 5041 ... 5048 Current Program Position
 
 5061 ... 5070 Result of probing G38.2 - G38.5
 
 5161 ... 5169 G28/G28.1 Home Position
 
 5181 ... 5189 G30/G30.1 Home Position 
 5211 ... 5219 G92 Offset
 
 5220 Current coordinate system number 
 5221 ... 5229
 Offset for Coordinate System 1 (for G54)
 
 5241 ... 5249
 Offset for Coordinate System 2 (for G55)  
 5261 ... 5269 Offset for Coordinate System 3 (for G56) 
 
 5281 ... 5289 Offset for Coordinate System 4 (for G57) 
 
 5301 ... 5309 Offset for Coordinate System 5 (for G58) 
 
 5321 ... 5329 Offset for Coordinate System 6 (for G59)
 
 5341 ... 5349 Offset for Coordinate System 7 (for G59.1)  
 5361 ... 5369 Offset for Coordinate System 8 (for G59.2)
 
 5381 ... 5389 Offset for Coordinate System 9 (for G59.3)   
 5400 Current Tool Number
 
 5401 ... 5409 Current Tool Offset
 
 5410 Current Tool Diameter
 
 5421 ... 5429 Working Cube/Working Area/Soft Limits - Minimum Point
 
 5431 ... 5439 Working Cube/Working Area/Soft Limits -Maximum Point  
 5441 ... 5449 Position Register 1 (for G28.2 save / G28.5 move-to)
 
 5451 ... 5459 Home After Position Register (Machine coordinates is set to this Values after homing procedure is finished)
 
 5460 Current number of G-codes line
 
 5461 ... 5469 Current G-code Work Position (used for back-to-path and continue operation)
 
 5471 ... 5479 Tool Sensor Position (used for Automatic/Manual Tool Change Procedure)
 
 5490 Surface Sensor Width value 
 5501 ... 5509 Position Register 2 (for G28.3 save / G28.6 move-to) 
 5511 ... 5519 Position Register 3 (for G28.4 save / G28.7 move-to) 
 5521 End sensor ignoring (writing "1" to this register turn off end sensors control; used while homing procedure)
 
 5522 Jog step value
 
 5524 Spindle speed
 
 5525 Soft limits ignore (writting "1" to this register turn off Soft limits control. used for homing procedure)
 
 5526 M30 scheduled (writing "1" to this register will cause reset NC program current pointer after running stopped/paused; used for M30 implementation)  
 5530 register contains current "step per unit" value
 
 5541 ... 5548
 Parking point #1 Position
 
  5551 ... 5558 Parking point #2 Position  
  5561 ... 5568 Parking point #3 Position  
  5571 ... 5578 Parking point #4 Position  
  5581 ... 5588 Parking point #5 Position  
  5591 ... 5598 Parking point #6 Position  
 5600 Current toolchanger type (0-manual, 1-linear, 2-rotary); used for M6 Txx macro procedures
 
 5601 ... 5608
Toolchanger Unload Offset value
 
 5610Toolchanger blow-off offset
 
 6101 ... 6108
Toolchanger Current Position (Register to store position, where current tool should be pull-off)
 
 6111 ... 6118
 Toolchanger Next Position (Register to store position, where next tool is situated) 
 6121 ... 6128
 Tool #1 position in toolchanger
 
 6131 ... 6138 Tool #2 position in toolchanger  
 6141 ... 6148 Tool #3 position in toolchanger  
 6151 ... 6158 Tool #4 position in toolchanger  
 6161 ... 6168 Tool #5 position in toolchanger  
 6171 ... 6178 Tool #6 position in toolchanger  
 6181 ... 6188 Tool #7 position in toolchanger  
 6191 ... 6198 Tool #8 position in toolchanger  
 6201 ... 6208 Tool #9 position in toolchanger  
 6211 ... 6218 Tool #9 position in toolchanger 
 
 6221 ... 6228 Tool #11 position in toolchanger  
 6231 ... 6238 Tool #12 position in toolchanger  
 6241 ... 6248 Tool #13 position in toolchanger  
 6251 ... 6258 Tool #14 position in toolchanger  
 6261 ... 6268 Tool #15 position in toolchanger  
 6271 ... 6278 Tool #16 position in toolchanger  
 6280 ... 7000
 Reserved for bigger toolchanger
 
   
   

 

 

 

Latest News