July 2013 8.1 Display and operation 1211
Module 9322 Information of the current NC program
With Module 9322, you can determine the current block number of the active
NC program. If the module is called from the cyclic PLC program, only the
block number of the current NC main program is read in real time. If the
module is called from a spawn job or submit job, the path of the current
NC program is determined in addition to the block number (from the block
scan).
Constraints:
Because of the geometry look-ahead, the call from the cyclic PLC program
only supplies the block number in real time, but no information about the NC
program.
Call from the cyclic PLC program:
For all traverse blocks that are not generated from an NC program, a cycle
or an NC macro, block number –1 is read.
Call from the cyclic PLC program:
After the NC program is canceled or after the end of the NC program, the
last block number executed is returned.
Call:
PS B/W/D/K <Mode>
When called from a cyclic PLC program, the setting of
<Mode> is without effect. The block number of the
active NC program is always returned.
When called from a spawn job or submit job:
0: String / block number and path refer only to the active NC
(sub)program. Block number from block scan.
1: String / block number and path refer to the active NC
(sub)program or cycle. Block number from block scan.
2: Only the name of the NC main program without
information about the block number (block number is set
to 0 when executed correctly).
PS B/W/D/K <String number for path of the NC program or cycle>
Call from a cyclic PLC program: Without effect.
CM 9322
PL B/W/D <Block number of current NC program or cycle>
–1: Error if error marker is set
–1: Block number in certain cases, if call was from a cyclic
PLC program
Error code:
Marker Value Meaning
M4203 0 Information of current NC program has been read
1 Error code in W1022
W1022 1 Invalid mode
2 Invalid string number