Delta AH500 — 6.19.2 Explanation of Communication Instructions

Chapter 6 Applied Instruction 3. The special data registers related to the instruction RS/MODRW: 4. SR215, SR216 are used for recording the PLC communication interface. The codes are shown in the following table. 5. SR209 and SR212: The setting values of the communication protocols RS485/232 are shown in the following table. 6-397 Flag Description Action COM1 COM2 SM209 SM211 The communication protocol changes in accordance with the setting values in SR201, SR202, SR209, SR210, SR211, SR212, SR213, SR214, SR215, SR216, SM210, and SM212.

If SM209/SM211 is set to ON, the communication protocol of COM1/COM2 changes in accordance with the setting values in SR201, SR202, SR209, SR210, SR211, SR212, SR213, SR214, SR215, SR216, SM210, and SM212. Besides, the system automatically resets SM209/SM211 to OFF. Users set the flag to ON, and the system automatically resets it to OFF. Special data register Description COM1 COM2 SR201 SR202 The communication address of COM1/COM2 on the PLC as a slave SR210 SR213 Communication timeout Suppose the setting value is larger than 0.

When the instruction RS/MODRW is executed, SM104/SM105 is set to ON if no data is received after the timeout period or the intervening time of the two characters exceeds the setting value. After the problem is solved, users have to reset SM104/SM105 to OFF. The register can be set to 0 in the RS instruction and the communication timeout monitoring will be disabled. The MODRW instruction should be set between 100~65535 (ms). SR621 X The interrupt character used in the instruction RS If the character received is the low 8-bit data in SR621, I32 will be triggered. If n is 0, the interrupt task will not be triggered.

X SR622 The interrupt character used in the instruction RS If the character received is the low 8-bit data in SR622, I33 will be triggered. If n is 0, the interrupt task will not be triggered. Code 0 1 2 Communication RS232 RS485 RS422 Interface b0 Data length 7 (value=0) 8 (value=1) Parity bits 00 : 00 b1 01 : 01 b2 10 : 10 b3 stop bits 1 bit (value=0) 2 bits (value=1) b4 0001 (16#1) : 4800 b5 b6 0010 (16#2) : 9600 b7 0011 (16#3) : 19200 0100 (16#4) : 38400 0101 (16#5) : 57600