657
PSWAPP
1
2
3
4
4
6
7
8
7.18
Ot
her inst
ructions
7.18.1
8
PSW
APP
(2) The program to be transferred to the program memory by the PSWAPP instruction will have the program No. of the
program to be deleted from the program memory.
(If there is an open program No. before the program to be deleted from the program memory, the program to be
transferred to the program memory will not have the open program No.)
When program No. 2 is "Empty", the program transferred to the program memory is registered as program No. 3 by the
program swapping of program No. 3 with this instruction.
(3) Drive Nos. 1, 2, and 4 can be specified. (Drive 3 cannot be specified.)
• Drive 1: Memory card (RAM)
• Drive 2: Memory card (ROM)
• Drive 4: Standard ROM
(4) An extension (.QPG) need not be specified for the file name.
(5) The bit device specified by is turned ON during the END processing of the scan where this instruction is completed.
The bit device is turned OFF at the next END processing.
(6) The PLOADP, PUNLOADP and PSWAPP instructions cannot be executed simultaneously.
If two or more of the above instructions are executed simultaneously, the instruction executed later will not be executed.
When using the above instructions, provide interlocks manually to avoid simultaneous execution.
(7) When the programmable controller is powered OFF, then ON or the CPU module is reset after execution of the PSWAPP
instruction, the following operation is performed.
(a) When boot setting has been made in the PLC parameter dialog box, the program where the boot setting has been
made is transferred to the program memory.
When the program replaced by the PSWAPP instruction is to be executed, change the boot setting and program
setting of the PLC parameter dialog box for the corresponding program name.
(b) When boot setting has not been made in the PLC parameter dialog box, "FILE SET ERROR (error code: 2400)"
occurs.
1) When the program replaced by the PSWAPP instruction is to be executed, change the program setting of the
PLC parameter dialog box for the corresponding program name.
2) To execute the program set in the program setting of the PLC parameter dialog box, write the corresponding
program to the CPU module again.
(8) Do not execute this instruction in an interrupt program.
(Execution of this instruction in an interrupt program can cause a malfunction.)
(9) The PLC file settings of the program on which the PSWAPP instruction has been conducted are set as follows:
(a) File usage for each program
All the usage of file register, device initial value, comment, and local device of the program after the execution of the
PSWAPP instruction are set as "Use PLC file setting".
(b) I/O refresh setting
Nothing is set for both input and output for the I/O refresh setting of the program after the PSWAPP instruction has
been executed.
(10) The "PSWAPP instruction" and "write during RUN" processing cannot be executed simultaneously.
(a) When a write during RUN request is given during processing of the PSWAPP instruction, write during RUN is
delayed.
Write during RUN is started after the processing of the PSWAPP instruction is completed.
(b) When the PSWAPP instruction is executed during write during RUN, the processing of the PSWAPP instruction is
delayed.
The processing of the PSWAPP instruction is started after completion of write during RUN.
MAIN6 enters
1
2
MAIN1
Empty
MAIN3
MAIN4
MAIN5
3
4
5
1
2
MAIN1
Empty
MAIN6
MAIN4
MAIN5
3
4
5
S
w
aps "MAIN3"
w
ith "MAIN6"
by the PSWAPP instruction.
Program No.
Program name
Program No.
Program name
D