Chapter 6 Applied Instruction word, and n should be within the range between 1 and 120. 6. The instruction can be used several times in the program, but one instruction is executed at a time. 7. If the communication timeout occurs, SM104 and SM105 are ON. After the problem is solved, users have to reset SM104 and SM105 to OFF. Example 1: 1. Function code 01 (16#01): The AH500 series PLC reads the data from several bit devices which are not discrete input devices. The AH500 series PLC is connected to the ES2 series PLC. (ASCII mode: SM210 is OFF.) The AH500 series PLC is connected to the ES2 series PLC. (RTU mode: SM210 is ON.) 2. ASCII Mode:
The AH500 series PLC is connected to the ES2 series PLC. When SM96 and X0.0 are on, the AH500 series PLC sends and receives the following commands. AH ES2 The AH500 series PLC sends “ : 00 01 0500 0010 EA CR LF”. ES2 AH The AH500 series PLC receives “ : 00 01 02 D2 04 27 CR LF”. The data which the AH500 series PLC receives from the ES2 series PLC is stored in D10.0~D10.15. The communication command which the AH500 series PLC sends: The communication command which the AH500 series PLC receives: 6-410 Data Description ‘0’ 16#30 ADR 1 ADR (10) is the station address of the slave. ‘0’ 16#30 ADR 0 ‘0’ 16#30 CMD 1 CMD (10) is the command code.
‘1’ 16#31 CMD 0 ‘0’ 16#30 Initial Data Address ‘5’ 16#35 ‘0’ 16#30 ‘0’ 16#30 ‘0’ 16#30 Number of data (counted by the word) ‘0’ 16#30 ‘1’ 16#31 ‘0’ 16#30 ‘E’ 16#45 LRC CHK 1 LRC CHK (01) is the error checking code. ‘A’ 16#41 LRC CHK 0 Data Description ‘0’ 16#30 ADR 1 ADR (10) is the station address of the slave. ‘0’ 16#30 ADR 0 ‘0’ 16#30 CMD 1 CMD (10) is the command code. ‘1’ 16#33 CMD 0 ‘0’ 16#30 Number of data (counted by the byte) ‘2’ 16#32 ‘D’ 16#44 Data (byte 1) ‘2’ 16#32 Data (byte 2) ‘0’ 16#30 Data (byte 3) ‘4’ 16#34 Data (byte 4) ‘2’ 16#32 LRC CHK 1 LRC CHK (01) is the error checking code. ‘7’ 16#37 LRC CHK 0