User Manual
High−level Instructions
3 − 784
Outline Changes index register bank number back to the bank before F411
(CHGB)/P411 (PCHGB) instructions.
Program example
Ladder
Diagram
Boolean
Ladder Diagram
Address Instruction
Trigger
F412 POPB10
R0
10
11
ST R 0
F412 (POPB)
Description
The current index register bank number is changed to the number stored in the push area.
The contents of the push area are not changed at this time.
The bank numbers of index registers used in interrupt programs, subroutines, and other sub programs
should be specified in such a way that the F411 (CHGB) instruction is executed at the beginning of the sub
program, and the F412 (POPB) instruction is executed at the end of the sub program.
Precautions during programming
The bank number is automatically set to bank 0 before execution of the starting address of the program.
If the program memory is 120K steps, when the program is switched to the No. 1 program or the No. 2
program, the index register bank number is automatically set to 0.
The push area has only one effective level.
Program example
This is a program in which the index register bank is switched to “2” at the beginning of the interrupt program,
and is then switched back again to the original index register bank just before the end of the interrupt program
(before the IRET instruction).
END
R9010
F411 CHGB, H2
INT 0
R9010
F412 POPB
IRET
Main program
Sub program
F412
P412
(PPOPB)
(POPB)
Restoring the index register bank number