20 DDA LPM Modbus Implementation
The MTS DDA LPM Modbus implementation conforms to the “Modicon Modbus Protocol
Reference Guide, PI-MBUS-300 Rev. G” available from Modicon, Inc. The information provided
below assumes familiarity with the Modbus protocol as outlined in this reference guide. All infor-
mation provided applies to both Modbus RTU and Modbus ASCII protocol versions.
Modbus Function Codes
The following Modbus function codes are supported:
Function 03 - Read Holding Registers
Function 04 - Read Input Registers
Function 08 - Diagnostics (Subfunction 00, Return Query Data)
Function 08 - Diagnostics (Subfunction 01, Restart Communications Option)
Function 08 - Diagnostics (Subfunction 04, Force Listen Only Mode)
Function 17 - Report Slave ID
Function 03 - Read Holding Registers
The LPM responds to this message by returning the contents of the requested data regis-
ter(s) (see Appendix F, LPM Modbus Register Maps). The following implementation-spe-
cific considerations apply:
• If an unsupported or reserved register is requested, a maximum negative value (8000H
or 80000000H for paired-registers) is returned (see Appendix F, LPM Modbus Register
Maps for unsupported/reserved registers).
• If a register contains an LPM error (displayed on the LPM’s LCD screen as a '*' character
followed by an error message), a maximum negative value is returned.
• If a register is blank, indicating that the desired function is not enabled (e.g., volume
calculations), a value of 0000H is returned.
• If the alarm data register is requested, and either a 'GAUGE level' error or 'GAUGE
temperature' error exists, both the SCERR (Sensor Communication Error, bit D12) and the
SOERR (Sensor Operation Error, bit D13) bits will be set. Unsupported or reserved bits
will always be set to 0. See Appendix F, LPM Modbus Register Maps, for alarm bit defini-
tions.
Function 04 - Read Input Registers
This function is handled exactly the same as Function 03. Note that all registers are read-
only in this implementation.
Function 08 - Diagnostics (Subfunction 00, Return Query Data)
The LPM responds to this request with the following data:
Slave address: echoed
Function: 08H
Subfunction high: 00H
Subfunction low: 00H
Query data (16-bit): echoed
Error check: 16-bit CRC/8-bit LRC
87