4.13.19 G65: Call Macro Subprogram


Format:

G65 Pp Qq [Aa][Bb][Cc][Dd]……[Yy][Zz]


p: Subprogram number

q: Macro variable starting number


In the call macro subroutine function, the values ​​from A to Z are set into the macro variables q to q+25, and the values ​​of the macro variables q+26 to q+51 are set. 0 or 1 to determine if there is a set value in the q ~ q+25 group.


When executing the G65 call macro sub program instruction, if Aa exists, the system will set the value of a into the macro number group q and set the value of the macro number group q+26 to 1, if Bb exists, the system The b value is set to the macro number group q+1 and the macro number group q+27 is set to 1... and so on for the subroutine Pp to operate.


The correspondence between codes, macro numbers, and numerical values ​​is shown in the following table:


Code

Macro variable number

Value

Macro variable number

Value

A

q

a

q +26

1/0

B

q +1

b

q +27

1/0

C

q +2

c

q +28

1/0

D

q +3

d

q +29

1/0

E

q +4

e

q +30

1/0

F

q +5

f

q +31

1/0

….

….

….

….

….

W

q +22

w

q +48

1/0

X

q +23

x

q +49

1/0

Y

q +24

y

q +50

1/0

Z

q +25

z

q +51

1/0


Note: All values ​​such as a, b, etc. are treated as floating-point decimals.


Sample program:

G65 P0120 Q10 X#1 Y10. Z#3


Explain: The system will set the macro number #1 value to the macro number # (10+23), the 10 to the macro number # (10+24), and the macro number #3 value to the # (10+25), and so on, so the values ​​of macro numbers #36~#58 are all 0, and the values ​​of macro numbers #59~#61 are all 1.