Kaiyi — 6.19.2 Explanation of Communication Instructions

Chapter 6 Applied Instruction Additional remark: 1. If the value in m exceeds the range, the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 2. If the value in n exceeds the range, the operation error occurs, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 3. The flags related to the instruction RS/MODRW:

6-384 Register Data Description D115 Low 8 bits ‘9’ 16#39 Data in the device at address 16#1002 D116 Low 8 bits ‘5’ 16#35 D117 Low 8 bits ‘A’ 16#41 D118 Low 8 bits ‘5’ 16#35 D119 Low 8 bits ‘A’ 16#41 LRC CHK 1 D120 Low 8 bits ‘9’ 16#39 LRC CHK 0 D121 Low 8 bits CR 16#0D END D122 Low 8 bits LF 16#0A 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. SM96 SM97 The data is sent through COM1/COM2. If users want to use the instruction RS/MODRW to send and receive the data, they have to use the pulse instruction to set SM96/SM97 to ON. When the instruction is executed, the PLC sends and receives the data. After the sending of the data is complete, the system automatically resets SM96/SM97 to OFF.

SM100 SM101 Reception through COM1/COM2 is complete. After the receiving of the data is complete, the system automatically sets SM100/SM101 to ON. When SM100 is ON, the data received can be processed. After the processing of the data received is complete, users have to reset SM100/SM101 to OFF. The system automatically sets the flag to ON, and users reset it to OFF. SM98 SM99 When SM98/SM99 is ON, the PLC is waiting to receive the data. The system automatically sets the flag to ON and resets it to OFF.