ET-7000/PET-7000 AIO Series User Manual, version 1.0.1 beta3 Page: 92
Copyright © 2009 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
4.2.2. Function Codes
The second byte in the frame structure is the function code. The function code describes
what the slave is required to do. Valid function codes are between 1 and 255. The slave
uses the same function code as the request to answer it. Only when error occurs in the
system, the highest bit of the function code will be made ‘1’. Hence the master will know if
the message has been transmitted correctly or not.
Code
Function
Reference
01 (01H)
Read Coils (Output) Status
0xxxx
02 (02H)
Read Input Status
1xxxx
03 (03H)
Read Holding Registers
4xxxx
04 (04H)
Read Input Registers
3xxxx
05 (05H)
Force Single Coil (Output)
0xxxx
06 (06H)
Preset Single Register
4xxxx
15 (0FH)
Force Multiple Coils (Outputs)
0xxxx
16 (10H)
Preset multiple Registers
4xxxx
4.2.3. Data Field
The data field consists of messages sent between master and slave. The messages
contain additional information about the action to be taken by the slave or any information
requested by the slave. When the slave does not require this information the data field
can be nonexistent.
4.2.4. Error Check
The error check performed in Modbus/RTU is Cyclic Redundancy Check (CRC). Both the
transmitting device and the receiver compute CRC. Two bytes are used for this purpose
and generally one bit errors are detected by this method.