NCT Group 2000M, 99M Custom Macro, Simple Macro Call G65, C I1 J1 K1 I2 J2 K2 ... I10 J10 K10

Models: 2000M 99M

1 206
Download 206 pages 27.56 Kb
Page 164
Image 164

20 Custom Macro

20 Custom Macro

20.1 The Simple Macro Call (G65)

As a result of instruction

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

the custom macro body (program) specified at address P (program number) will be called as many times as is the number specified at address L.

Arguments can be assigned to the macro body. They are specific numerical values assigned to definite addresses, that are stored in respective local variables during a macro call. Those local variables can be used by the macro body, i.e., the macro call is a special subprogram call in which the main program can transfer values (parameters) to the subprogram.

The following two argument assignments can be selected:

Address string of argument assignment No.1 is

A B C D E F H I J K M Q R S T U V W X Y Z

No value can be transferred to the macro body at any one of addresses G, L, N, O, P. The addresses can be filled in any arbitrary sequence, not necessarily in alphabetical order.

Address string of selecting argument assignment No.2 is

A B C I1 J1 K1 I2 J2 K2 ... I10 J10 K10

In addition to addresses A, B, C, maximum 10 different arguments can be assigned for addresses I, J, K. The addresses can be filled in any arbitrary sequence. If several arguments are selected for a particular address, the variables will assume the respective values in the order of selection.

 

 

 

l v

1. a a

2. a a

 

 

 

#1

A

A

#2

B

B

#3

C

C

#4

I

I1

#5

J

J1

#6

K

K1

#7

D

I2

#8

E

J2

#9

F

K2

#10

(G)

I3

#11

H

J3

 

 

 

 

l v

1. a a

2. a a

 

 

 

 

#12

(L)

K3

 

#13

M

I4

 

#14

(N)

J4

 

#15

(O)

K4

 

#16

(P)

I5

 

#17

Q

J5

 

#18

R

K5

 

#19

S

I6

 

#20

T

J6

 

#21

U

K6

 

#22

V

I7

 

 

 

 

 

l v

1. a a

2. a a

 

 

 

 

#23

W

J7

 

#24

X

K7

 

#25

Y

I8

 

#26

Z

J8

 

#27

K8

 

#28

I9

 

#29

J9

 

#30

K9

 

#31

I10

 

#32

J10

 

#33

K10

 

 

 

 

SAbbreviations : lv=local variable, 1.a a=argument assignment No.1, 2.a a= argument

assignment No.2.

The subscripts following addresses I, J, K indicate the argument assignment sequence.

The control will accept simultaneous selections of arguments 1 and 2 in a given block. An error message will be returned when an attempt is made to make reference twice to a variable of a

164

Page 164
Image 164
NCT Group 2000M, 99M manual Custom Macro, Simple Macro Call G65, C I1 J1 K1 I2 J2 K2 ... I10 J10 K10