653
PLOADP
1
2
3
4
4
6
7
8
7.18
Ot
her inst
ructions
7.18.1
6
PLOAD
P
(a) When the program Nos. have been set consecutively, the new program is added at the end of the preset program
Nos.
When programs No. 1 to 5 have been set, the new program is added as program No. 6.
(b) When there are multiple open program Nos., the program designated by the PLOADP instruction is added to the
lowest number among them to be added.
(The open program Nos. are made when programs are deleted by the PUNLOADP instruction.)
When programs No. 2 and 4 are open, the new program is added as program No. 2.
(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) Do not execute this instruction in an interrupt program.
(Otherwise, a malfunction may result.)
(8) To execute the program that was transferred to the program memory with the PLOADP instruction, execute the scan
execution type with the PSCAN instruction (See Page 600, Section 7.17.3).
(9) The PLC file settings of the loaded program 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 transferred by this
instruction are set as "Use PLC file setting".
However, an error will be returned if both of the conditions below are met when the program is transferred using this
instruction.
• Setting is made so that local devices are used in the PLC file setting.
• The number of programs in the program memory exceeds the number of programs set at the parameters.
To use local devices in the program transferred by this instruction, register a dummy program file in the parameter,
delete the dummy file with the PUNLOADP instruction, and then load the program with the PLOADP instruction.
(b) I/O refresh setting
Nothing is set for both input and output for the I/O refresh setting of the program transferred by this instruction.
(10) The "PLOADP instruction" and "Write during RUN" processing cannot be executed simultaneously.
(a) When a write during RUN request is given during processing of the PLOADP instruction, write during RUN is
delayed.
Write during RUN is started after the processing of the PLOADP instruction is completed.
(b) When the PLOADP instruction is executed during write during RUN, the processing of the PLOADP instruction is
delayed.
The processing of the PLOADP instruction is started after completion of write during RUN.
Added
at
the
end
.
Program
N
o
.
Program
name
1
2
MA
IN
1
MA
IN
2
MA
IN
3
MA
IN4
MA
IN
5
3
4
5
3
4
5
6
MA
IN
6
1
2
MA
IN
2
MA
IN
3
MA
IN4
MA
IN
5
Program
N
o
.
Program
name
MA
IN
1
Adds
"
MA
IN
6
"
by
the
P
L
OADP
i
nstruct
i
on
.
Added to the smallest program
number
w
hich is empty.
Program No.
Program name
1
2
MAIN1
Empty
MAIN3
Empty
MAIN5
3
4
5
Adds "MAIN6" by the
PLOADP instruction.
Program No.
Program name
1
2
MAIN1
MAIN6
MAIN3
Empty
MAIN5
3
4
5
D