
B-63983EN/02 5.WINDOW FUNCTIONS
- 453 -
5.4.15 Reading the Current Program Number (High-speed
Response)
[Description]
The program number of a machining program being executed or
selected on the CNC can be read.
When a subprogram is executed on the CNC, the program number of
the main program can also be read. Note that the program number that
can be read is the first program number (first loop main program).
This function accepts only 4-digit program numbers. When the
specification supports 8-digit program numbers, specify function code
90 to read 8-digit program numbers.
[Input data structure]
Top address + 0
2
4
6
8
10
(Function code)
24
(Completion code)
−
(Need not be set)
(Data length)
−
(Need not be set)
(Data number)
0
(Data attribute)
0
(Data area)
−
(Need not be set)
42
[Completion codes]
0: The program number of the currently executing program was read
successfully.
5: The program number exceeds 4-digit. (Use function code 90.)