568
QDRSET, QDRSETP
F
unct
i
on
(1) Changes the file register file name used in the program to the file name being stored at the device designated by .
After the file names have been changed, all the file registers being used by the sequence program process the file
register of the renamed file.
The block No. of the file register of the renamed file is 0.
Block number switches are performed by the RSET instruction.
When switching from Drive No. 1/File name B to Drive No. 3/File name A
(2) Drive number can be designated from 1 to 4.
(The drive number cannot be designated as drive 0 (program memory).)
Note that available drives vary depending on the CPU module used.
Refer to the manual of the CPU module and check the drives that can be specified.
(3) It is not necessary to designate the extension (.QDR) with the file name.
(4) A file name setting can be deleted by designating the NULL character (00
H
) for the file name.
(5) File names designated with this instruction will be given priority even if a drive number and file name have been
designated in the parameters.
1. If the file name is changed with the QDRSET instruction, the file name returns to the name specified by the parameter
when the CPU module is switched from STOP to RUN. To maintain the file name even after the CPU mode is changed
from STOP to RUN, execute the QDRSET instruction with the SM402 special relay, which turns ON during one scan when
the CPU enters from STOP to RUN mode.
2. For refreshing a file register, do not change the file name of the file register with the QDRSET instruction. For restrictions
on file registers, refer to Page 119, Section 3.10.
Operat
i
on
E
rror
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
2410
The file name does not exist at the drive number specified in .
––
––
S
Example
S
Dri
v
e 1
File name
A
Dri
v
e 1
File name
B
Dri
v
e 1
File name
C
Dri
v
e 2
File name
A
Dri
v
e 3
File name
A
Dri
v
e 4
File name
A
Processing executed to file registers
Setting of a dri
v
e number
and file name
File name of
the presently
used file register
(
)
File name of file
register used after
the execution of
Q
DRSET instruction
(
)
S