Delta AH500 — 6.19.2 Explanation of Communication Instructions

Chapter 6 Applied Instruction 16-bit mode: The command which is edited is stored in the initial transmission device, and the command which will be sent include the head code and the tail code. The 16-bit data is divided into the high 8-bit data and the low 8-bit data. Sending the data: (PLC→External equipment) Receiving the data: (External equipment→PLC) The data which the PLC receives from the external equipment includes the head and the tail code. Therefore, users have to be aware of the setting of a length. Additional remark: 1. There is no limit on the number of times the communication instruction COMRS can be executed.

However, every communication port can only be enabled by one communication instruction, and the communication instructions which follow will not be executed. 2. The instructions which use communication ports are communication instructions, e.g. RS, MODRW, FWD, and REV. 3. When COMRS is executed, no checksum is used. If users need a checksum, they can use COMRS and another instruction available. 4. If the value in D 2 is 2, 3, 5, or 6, it is suggested that users should set a timeout period. After a timeout period is set, the sending of data will be retried if a stop character is not received. 5.

The instruction does not automatically clear the value in D 1 ~ D 1 +n whenever the instruction is just executed or the PLC begins to receive new communication data. Only after a completion flag is switched from OFF to ON can users know whether data is received, and how much data the PLC receives. If the users want to clear the values in D 1 ~ D 1 +n, they can use the instruction ZRST. 6. If the value in S 1 is neither 1 nor 2, the instruction will not be executed, SM0 will be ON, and the error code in SR0 will be 16#2003. 6-427