
PROGRAMMING
15. CUSTOM MACRO
B–63534EN/02
402
The number (target number) of parts required and the number (completion
number) of machined parts can be read and written.
Table 15.2(i) System variables for the number of parts required and the
number of machined parts
Variable number
Function
#3901 Number of machined parts (completion number)
#3902 Number of required parts (target number)
NOTE
Do not substitute a negative value.
Modal information specified in blocks up to the immediately preceding
block can be read.
Table 15.2 (j) System variables for modal information
Variable number Function
#4001
#4002
#4003
#4004
#4005
#4006
#4007
#4008
#4009
#4010
#4011
#4012
#4013
#4014
#4015
#4016
:
#4022
#4102
#4107
#4109
#4111
#4113
#4114
#4115
#4119
#4120
#4130
G00, G01, G02, G03, G33 (Group 01)
G17, G18, G19 (Group 02)
G90, G91 (Group 03)
(Group 04)
G94, G95 (Group 05)
G20, G21 (Group 06)
G40, G41, G42 (Group 07)
G43, G44, G49 (Group 08)
G73, G74, G76, G80–G89 (Group 09)
G98, G99 (Group 10)
G50, G51 (Group 11)
G65, G66, G67 (Group 12)
G96,G97 (Group 13)
G54–G59 (Group 14)
G61–G64 (Group 15)
G68, G69 (Group 16)
: :
(Group 22)
B code
D code
F code
H code
M code
Sequence number
Program number
S code
T code
P code (number of the currently selected addition-
al workpiece coordinate system)
Example:
When #1=#4001; is executed, the resulting value in #1 is 0, 1, 2, 3, or
33.
If the specified system variable for reading modal information
corresponds to a G code group which cannot be used, a P/S alarm is
issued.
D Number of machined
parts
D Modal information