NCT Group 99M, 2000M manual Particular number. For example, G67

Models: 2000M 99M

1 206
Download 206 pages 27.56 Kb
Page 165
Image 165

20 Custom Macro

particular number. For example,

G65 A2.12 B3.213 J36.9 J–12 E129.73 P2200

variable #1=2.12 #2=3.213 #5=36.9 #8=–12 #8= ERROR

In the above example, variable #8 has already been assigned a value by the second address J (value, -12), since the value of address E is also assigned to variable #8, the control returns error message 3064 BAD MACRO STATEMENT.

A decimal point and a sign can also be transferred at the addresses.

20.2 The Modal Macro Call

20.2.1 Macro Modal Call in Every Motion Command (G66)

As a result of instruction

G66 P(program number) L(number of repetitions) <argument assignment>

the macro body specified at address P (program number) will be called after the execution of each motion command, as many times as is the number specified at address L. The interpretations of addresses P and L and the rules of argument assignment are identical with those described for instruction G65.

The selected macro will be called until with command

G67

it is canceled.

For example, a hole has to be drilled in a given segment of the part program after each movement:

Main program

...

G66 P1250 Z–100 R–1 X2 F130 (Z=Z point of hole, R=R point of hole, X=dwell F=feed)

G91 G0 X100

Y30

X150

...

G67

Macro body

%O1250 G0 Z#18

G1 Z#26 F#9

G4 P#24

drilling is performed after each posi- tioning

(rapid-traverse positioning in direction Z to the point specified at address R–1)

(drilling as far as the point Z specified at address Z–100, with the feed specified at address F130)

(dwell at the bottom of the hole for the time specified at address X2)

165

Page 165
Image 165
NCT Group 99M, 2000M manual Particular number. For example, G67