Part 6: Modbus Protocol...................................................................................34
6.1 Introduction................................................................................34
6.2 RTU Mode ...................................................................................34
6.3 Device Address ..........................................................................35
6.4 Function Code............................................................................35
6.5 Data Field....................................................................................36
6.6 CRC Checking............................................................................36
6.7 Modbus RTU Registers .............................................................37
6.8 Command Format ......................................................................38
6.8.1 Read Multiple Register (03 or 04) .................................38
6.8.2 Write to Single Register (06) ........................................39
6.8.3 Diagnostic Command ....................................................41
6.8.4 Error Response ..............................................................41
Appendix A Reading Scale and Offset .........................................................43
Appendix B ASCII Chart.................................................................................48
ASCII Control Codes .................................................................49
Appendix C Examples of CRC Calculation ..................................................50
Example of CRC Calculation in “C” Language...............................................53
LIST OF FIGURES:
Figure 2.1 Transmission of “c” ....................................................................4
Figure 3.1 DB9 and RS-232 Wiring ..............................................................6
Figure 3.2 DB25 and RS-232 Wiring.............................................................6
Figure 3.3 Multipoint, Half-Duplex RS-485 Wiring .....................................7
Figure 4.1 Flow Chart for Communication Option......................................9
LIST OF TABLES:
Table 3.1 Communication Interface ...........................................................5
Table 3.2 Wiring RS-232 Interface ..............................................................6
Table 3.3 RS-485 Half Duplex Hook-up......................................................8
Table 4.1 Abbreviations, Range, Default Setup ......................................10
Table 5.1 Command Prefix Letters...........................................................13
Table 5.2 Command Formats....................................................................14
Table 5.3 Command Letters and Suffix ...................................................14
Table 5.4 Command Letters and Suffix ...................................................16
Table 5.5 Echo Mode .................................................................................19
Table 5.6 No Echo Mode ...........................................................................19
Table 5.7 Error Message ...........................................................................20
Table 5.8 Alarm Status Characters ..........................................................20
Table 5.9 Conversion Number ..................................................................30
Table 5.10 Commands with Numeric Data Format ...................................33
Table 6.1 Function Code ...........................................................................35
Table 6.2 Modbus Registers .....................................................................37
Table A.1 Conversion Number ..................................................................43
Table A.2 Input Resolution Multiplier .......................................................43
ii