
17.CUSTOM MACRO PROGRAMMING B-63784EN/01
- 652 -
- Main program number #4000 (Attribute : R)
System variable #4000, even when placed in a subprogram of any level,
can be used to read the main program number.
Value number Value name Description
#4000 [#_MAINO] Main processing number
NOTE
1 The main processing number is the number of a
program that was started first.
2 If an O number is specified by MDI during main
program execution, or a second O number is
specified in DNC mode, the value of #4000 is
changed to the specified O number. If no program is
registered or no O number is specified in DNC mode,
the value of #4000 is 0.
3 Even if #4000 is used when drawing is performed in
the background, the main program number is read in
the background.