Home Documentation
Documentation
Article Index
Documentation
G-codes samples: Surface Measure
G-codes samples: Tool Length Measure
G-codes samples: Homing
G-codes samples: Helical interpolation
Polar coordinates G16 G15
Plane selection G17 G18 G19
G68 G69 Coordinate system rotation
G65 Simple macro call
All Pages
G65 Simple Macro Call

When G65 is specified, the custom macro defined at address P is called.
G65 command format :

G65 P L <argument–specification>

  • P - address (number) of macro;
  • L - Repetition count (1 by default);
  • values, given in argument, assigned to local variables.

the arguments specification:

Address
Variable
number
Address
 Variable
number
Address
Variable
number
AddressVariable
number 
 A #1 D #7 R #18 X #24
 B #2 E #8 S #19 Y #25
 C #3 F #9 T #20 Z #26
 I #4
 H #11 U #21  
 J #5 M #13 V #22  
 K #6 Q #17 W #23  

 

A NC code sample, whith G65 simple macro call  is shown below. In the sample G65 code calls O9914 procedure to perform
deep peck drilling cycle (G83) 16 times along a circle with radius, gived as macro parameter.

 

g-code simple macro call G65 example

(Simple macro call example)
%.
(XY - position)
(I - radius)
(H - number of points)
(A - angle)

G90 G0X0Y0G0
G83 Z-3 Q2. R0.5 L0
G65 P9914 X20 Y15 I10 H16 A0.
M30
%