7 APPLICATION INSTRUCTION
7.21 Module access instruction
605
7
7.21 Module access instruction
I/O refresh
REF(P)/RFS(P)
These instructions refresh the (n) points of devices starting from the device specified by (s), and receive an external input or
generate an output.
The REF(P) instructions can also be used as RFS(P).
■Descriptions, ranges, and data types
■Applicable devices
*1 Only X and Y can be used.
• This function refreshes only the corresponding devices in the middle of a scan and receives an external input or generates
an output.
• Since the input receptions and external outputs are performed at one time only after the END instruction is executed in the
program, a pulse signal cannot be output externally in the middle of a scan. The execution of the I/O refresh instruction
forcibly refreshes the corresponding input (X) or output (Y) in the middle of program execution, and then a pulse signal can
be output externally in the middle of a scan.
• To refresh an input (X) or an output (Y) in 1 point units, use the direct access input (DX) or the direct access output (DY).
Ladder diagram Structured text
ENO:=REF(EN,s,n);
ENO:=REFP(EN,s,n);
Operand Description Range Data type Data type (label)
(s) Head device number to be refreshed Bit Bit
(n) Number of devices to be refreshed 0 to 65535 16-bit unsigned binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s)
*1
(n)
X0
DX0
REF X0 K1
REF
Y20
K1
Y20
DY20
[Program based on the REF instruction]
Command
Command
Refreshes X0.
Refreshes Y20.
[Program based on direct access input and direct access output]
Direct access input Direct access output