AH500 Module Manual 
8-20 
API 
Instruction code  Operand  Function 
1401  D  TO  P 
m
1
,
 
m
2
,
 
m
3
,
 
S,
 
D,
 
n 
Writing the data into the control 
register in the special module 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#  “$”  DF 
1
m
2
 
   
   
         
     
     
   
m
3
 
   
   
         
     
     
   
S 
   
     
   
D 
   
   
         
     
 
       
 
Pulse instruction
16-bit instruction (13 steps)  32-bit instruction (13 steps) 
 
AH500  AH500  AH500 
Symbol: 
 
 
m
1
 
:
Rack code  Word/Double word 
m
2
 
:
Slot code  Word/Double word 
m
3
 
:
Control register number  Word/Double word 
S 
:
Data which is written into the 
control register 
Word/Double word 
D 
:
Device in which the error 
code is stored 
Word/Double word 
n 
:
Data length  Word/Double word 
Explanation: 
1.  Users can use this instruction to write the data in the AH500 series PLC into the control 
register in the special module. 
2.  The operand m
1
 should be in the range of 1 to 8. 1 represents a main rack, and 2~8 represent 
extension racks. 
3.  The operand m
2
 should be in the range of 0 to 11. If the rack code is 1, the slot code should be 
in the range of 0 to 11. If the rack code is in the range of 2 to 8, the slot code should be in the 
range of 0 to 7. 
4.  The operand m
3
 specifies the control register number. 
5.  When the instruction TO is executed, D is set to 0. When an error occurs, D is not set to 0. 
Please refer to the additional remark below for more information about the error codes.
 
6.  The operand n used in the 16-bit instruction should be in the range of 1 to 256, and the 
operand n used in the 32-bit instruction should be in the range of 1 to 128. 
7.  Only the 32-bit instructions can use the 32-bit counter. 
8.  When S is a decimal value or a hexadecimal value, n decimal values or n hexadecimal values 
are transmitted to the I/O module. Suppose S is 16#0001 and n is 3. Three 16#0001s are 
transmitted to the I/O module. 
Example: 
Suppose the first special module at the right side of the CPU module is AH10/15SCM-5A. When 
X1.1 is switched from OFF to ON, the instruction TO is executed. The mode of the data exchange 
through COM1 on AH10/15SCM-5A stored in CR#7 changes from being disabled to being enabled. 
Owing to the fact that no error occurs, the code stored in D110 is 16#0000.