AH500 Programming Manual 
6-152 
 
6.7.2  Explanation of I/O Refreshing Instructions 
API 
Instruction code  Operand 
Function 
0600    REF  P 
D, n 
Refreshing the I/O   
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#  “$”  DF 
16-bit instruction (5 steps) 
  AH500  AH500 
Symbol: 
D 
: 
I/O point whose state is refreshed  Bit 
n 
: 
Number of I/O points whose states 
are refreshed 
1~256 
Explanation: 
The I/O states are not refreshed until the instruction END is executed. When the scanning of the 
program starts, the states of the external inputs are read and stored in the memory. After the 
instruction END is executed, the states of the outputs in the memory is sent to the output terminals. 
Therefore, users can use this instruction when they need the latest I/O data in the operation 
process. 
Example 1: 
When X0.0 is ON, the PLC reads the states of the inputs X0.0~X0.15 immediately. The input signals 
are refreshed without any delay. 
 
Example 2: 
When X0.0 is ON, the output signals from Y0.0~Y0.7 are sent to the output terminals. The output 
signals are refreshed immediately without the need to wait for the execution of the instruction END.   
 
Additional remark: 
1.  If D+n-1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error 
code in SR0 is 16#2003.