User manual

2 Modbus RTU MN744
Application Layer Specification
The host (master) communicates with the H2 drive (the slave) using a predefined list of standard Modbus
functions codes. Table 1 summarizes these function codes.
Table 1 Standard Function Code Implementation
H2 Reference Sets Modbus Standard Function Codes
Control Bits
Relay Outputs
Coils (0xxxx) 01 - Read coil Status
15 - Write multiple coils
Status Bits
Discrete Inputs
Discrete Inputs (1xxxx) 02 - Read input discrete
Analog Inputs Input Registers (3xxxx) 04 - Read input register
Control Words
Status Words
References
Parameters
Holding Registers (4xxxx) 03 - Read multiple registers
16 - Write multiple registers
Poll Controller None 14 - Poll slave after master receives an ACK (05) from a slave to
complete the transaction
Data Acquisition None 68 - Special function used obtaining debug data from H2.
S Read Internal Value (internal use only)
S Write Internal Value (internal use only)
S Configure O-Scope
S Control O-Scope
S Acquire O-Scope Data
S Read Active Fault Codes
Drive Enumeration None 69 - Workbench connect and enumeration
S To Be Determined
Table 2 Data Types
Keyword Size Bytes Description Minimum Maximum
INT32 4 Double Integer -2
31
2
31
-1
UINT32 4 Unsigned double integer 0 2
32
-1
FLOAT32 4 IEEE floating point std. 754 (single precision) ±1.175 x10
38
±3.403 x10
38
Table 3 MODBUS Exception Codes
Code Name Description
01 ILLEGAL FUNCTION The function code received in the query is not an allowable action for the server (or slave). This may be because the
function code is only applicable to newer devices, and was not implemented in the unit selected. It could also indicate
that the server (or slave) is in the wrong state to process a request of this type, for example because it is un-configured
and is being asked to return register values.
02 ILLEGAL DATA ADDRESS The data address received in the query is not an allowable address for the server (or slave). More specifically, the
combination of reference number and transfer length is invalid. For a controller with 100 registers, a request with offset
96 and length 4 would succeed, a request with offset 96 and length 5 will generate exception 02.
03 ILLEGAL DATA VALUE A value contained in the query data field is not an allowable value for server (or slave). This indicates a fault in the
structure of the remainder of a complex request, such as that the implied length is incorrect. It specifically does NOT
mean that a data item submitted for storage in a register has a value outside the expectation of the application program,
since the MODBUS protocol is unaware of the significance of any particular value of any particular register.
04 SLAVE DEVICE FAILURE An unrecoverable error occurred while the server (or slave) was attempting to perform the requested action.
05 ACKNOWLEDGE Specialized use in conjunction with programming commands. The server (or slave) has accepted the request and is
processing it, but a long duration of time will be required to do so. This response is returned to prevent a timeout error
from occurring in the client (or master). The client (or master) can next issue a Poll Program Complete message to
determine if processing is completed.
06 SLAVE DEVICE BUSY Specialized use in conjunction with programming commands. The server (or slave) is engaged in processing a long duration
program command. The client (or master) should retransmit the message later when the server (or slave) is free.