3. Instruction Set 6. When RS instruction is applied for communication between a PLC and peripheral devices, usually the STX (Start of the text) and the ETX (End of the text) have to be defined. User can use D1124~D1126 to set the STX and the ETX by means of COM2, or use the STX and the ETX defined by the PLC. If the users use M1126, M1130, D1124~D1126 to set the STX and the ETX, b8~b10 in D1120 using the RS-485 communication protocol need to be set to 1. Please refer to the table below. 7. Example of setting communication format in D1120: Communication format: Baud rate: 9600, 7, N, 2 STX : “: “ ETX1 : “CR” ETX2 :
“LF” Check to the table in point 4 and the set value H788 can be referenced corresponding to the baud rate. Set the value into D1120. D1120 b15 b0 0 N/A 7 8 8 M1002 When STX, ETX1 and ETX2 are applied, care should be taken on setting the ON/OFF status of M1126 and M1130. 8. D1250(COM1) 、 D1253(COM3) communication error code: 3-237 M1130 0 1 M1126 D1124: user defined D1125: user defined D1126: user defined D1124: H 0002 D1125: H 0003 D1126: H 0000 (no setting) 0 D1124: user defined D1125: user defined D1126: user defined D1124: H 003A (’:’) D1125: H 000D (CR) D1126:
H 000A (LF) 1 0 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0 MOV H788 D1120 Value Error Description H0001 Communication time-out H0002 Checksum error H0003 Exception Code exists H0004 Command code error / data error