Adoption of block number at sub program call (P-CHAN-00150)
In default case at sub program call the internal value of the last evaluated block number is set to zero.
The read access via the variable V.G.SATZ_NR at the beginning of a sub program delivers the value 0.
If the parameter "remain_block_number_sub_prog_call" is enabled, at sub program call the internal value of the last evaluated block number from the superior (main) program is unchanged.
The read access via the variable V.G.SATZ_NR at the beginning of a sub program delivers a value > 0 (in condition that block numbers are programmed).
Variable name | Type | Permitted range | Dimension |
remain_block_number_sub_prog_call | BOOLEAN | 0/1 | ---- |
0 | The internal value of the last programmed block number is set to zero at sub program call (Default). |
1 | The internal value of the last programmed block number is unchanged at sub program call. |
Programming example
With disabled "remain_block_number_sub_prog_call" 0
:
N1000 X100 Y200 Z300
N1010 LL SUB1.NC
-> V.G.SATZ_NR access on the beginning of SUB1.NC delivers 0
With enabled "remain_block_number_sub_prog_call" 1
:
N1000 X100 Y200 Z300
N1010 LL SUB1.NC
-> V.G.SATZ_NR access on the beginning of SUB1.NC delivers 1010