
6. FUNCTIONS OF THE MACRO
EXECUTOR
B–62093E–1/02
PROGRAMMING
80
(Example)
If
O0004 ;
G92 X0. M08 ;
%
#100=28 Address “EOR”
If the function for reading a specified block coded in words (G325)
reads a block which is not coded in words, completion code #8529 is
set to 253 to indicate the fact.
When the completion code is set to 253, use the function for reading
a specified block coded in characters (G328) to read the same block.
#8520 = program–number ;
#8521 = block–number ;
#8522 = number–of–the–variable–into–which–the–block–
is–read ;
G325 ;
IF[#8529 EQ 253]GOTO100 ; Conventional processing
N100 G328 ;
Character–type analysis
(2) Reading a specified block coded in characters (G328)
When entering this command, specify a program number and block
number. From an NC program which is not coded in words, the
corresponding block can be read in units of characters into a specified
variable area. The block is read in the form of decimal ASCII codes.
Each control command (WHILE/IF/...) or function
(SIN/COS/FUP/...) is represented as a single data item consisting of
special code.
#8520 = program–number ;
#8521 = block–number ;
#8522 = 100 ;
(Number of the variable into which the block is read)
G328 ;
IF[#8529 NE 0]GOTO900 ; ← Error check
When the corresponding block is “#1 = SIN [#2];”
#100 : 35 (23H) “#”
#101 : 49 (31H) “1” The data is input as shown on the left.
#102 : 61 (3Dh) “=”
#103 : 276 (114H) “SIN”
#104 : 60 (3CH) “[”
#105 : 35 (23H) “#”
#106 : 50 (32H) “2”
#107 : 62 (3EH) “]”
#108 : 10 (0AH) “;” ← “EOB” code