NCT Group 99M Microscope & Magnifier User Manual


 
20 Custom Macro
164
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 l v 1. a a 2. a a l v 1. a a 2. a a
#1 A A #12 (L) K3 #23 W J7
#2 B B #13 M I4 #24 X K7
#3 C C #14 (N) J4 #25 Y I8
#4 I I1 #15 (O) K4 #26 Z J8
#5 J J1 #16 (P) I5 #27 K8
#6 K K1 #17 Q J5 #28 I9
#7 D I2 #18 R K5 #29 J9
#8 E J2 #19 S I6 #30 K9
#9 F K2 #20 T J6 #31 I10
#10 (G) I3 #21 U K6 #32 J10
#11 H J3 #22 V I7 #33 K10
S Abbreviations: 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