User manual

Modbus RTU 11MN744
Discrete Inputs (Modbus 1xxxx Reference Set)
Discrete Inputs in the H2 represent read only status bit for the drive.
Read Discrete Inputs (Function Code 02)
This function code is used to read the status from 1 to 2000 contiguous discrete inputs in a remote device. The
Request PDU specifies the starting address, ie the address of the first input specified, and the number of inputs.
Inputs are addressed starting at zero. Therefore, inputs 1-16 are addressed as 0-15.
The discrete inputs in the response message are packed as one input per bit of the data field. Status is indicated
as 1= ON; 0= OFF. The LSB of the first data byte contains the input addressed in the query. The other inputs
follow toward the high order end of this byte, and from low order to high order in subsequent bytes.
If the returned input quantity is not a multiple of eight, the remaining bits in the final data byte will be padded with zeros
(toward the high order end of the byte). The Byte Count field specifies the quantity of complete bytes of data.
Request PDU
Function Code 1 Byte 0x02
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Inputs 2 Bytes 1 to 2000 (0x7D0)
Response PDU
Function Code 1 Byte 0x02
Byte Count 1 Byte N*
Input Status n Byte n=N or N+1
*N = Quantity of outputs/8, if the remainder is different of 0 N=N+1
Error
Error Code 1 Bytes 0x82
Exception Code 1 Bytes 01 or 02 or 03 or 04
Example of a request to read discrete outputs 197-218:
Request Response
Field Name (Hex) Field Name (Hex)
Function 02 Function 02
Starting Address Hi 00 Byte Count 03
Starting Address Low C4 Input Status 204-197 AC
Quantity of Inputs Hi 00 Input Status 212-205 DB
Quantity of Inputs Lo 16 Input Status 218-213 35
The status of discrete inputs 204-197 is shown as the byte value AC hex, or binary 1010 1100. Input 204 is the
MSB of this byte, and input 197 is the LSB.
The status of discrete inputs 218-213 is shown as the byte value 35 hex, or binary 0011 0101. Input 218 is in the
third bit position from the left, and input 213 is the LSB.
Discrete Input Description
In Table 7, Bit 0 indicates the Least Significant Bit (LSB) of a 32-bit word.
Table 7 Discrete Inputs Table
Modbus Ref Discrete Inputs
Location Description
10001 Drive Status1 Bit 0 Enable - active high when the drive hardware enable is high
10002 Drive Status1 Bit 1 Ready - active high when the drive is enabled and no faults exist and ready to accept a speed or torque command
10003 Drive Status1 Bit 2 Drive On - active high when drive is ready and capable of generating torque
10004 Drive Status1 Bit 3 Forward Command - active high when drive is ready and has a positive speed demand, clockwise looking at the
shaft. Not used in torque mode.
10005 Drive Status1 Bit 4 Reverse Command - active high when drive is ready and has a negative speed demand, counterclockwise
looking at the shaft. Not used in torque mode.
10006 Drive Status1 Bit 5 Stop - active high when drive is ready and has a zero speed demand. Not active in torque mode.
10007 Drive Status1 Bit 6 Jog - active high while drive is in jog mode
10008 Drive Status1 Bit 7 Motor Forward - motor turning in forward direction, clockwise looking at the shaft
10009 Drive Status1 Bit 8 Motor Reverse - motor turning in reverse direction, clockwise looking at the shaft
10010 Drive Status1 Bit 9 Torque Mode - active high when the drive is in vector torque mode