
13. Program Support Functions
13.12 Macro Interrupt; ION, IOF
389
Modal information variables (#4401 to #4520)
Modal information when control passes to the user macro interrupt program can be known by
reading system variables #4401 to #4520.
The unit specified with a command applies.
System variable
Modal information
#4401 to #4421
G code (group 01 to group 21)
} Some groups are not used.
#4507 D
code
#4509 F
code
#4511 H
code
#4513 M
code
#4514 Sequence
number
#4515
Program number
(Note 1)
#4519 S
code
#4520 T
code
The above system variables are available only in the user macro interrupt program. If they are used
in other programs, program error (P241) results.
(Note 1)
The programs are registered as files. When the program No. (file name) is read with
#4515, the character string will be converted to a value.
(Example 1)
The file name "123" is the character string 0×31, 0×32, 0×33, so the value
will be (0×31-0×30)*100 + (0×32-0×30)*10 + (0×33-0×30) = 123.0.
Note that if the file name contains characters other than numbers, it will be
"blank".
(Example 2)
If the file name is "123ABC", characters other than numbers are included
in the file name; so, the result will be "blank".