Despatch Modbus Specifications

E-102
p.n. 143896
Modbus User's Programming Manual
For
Despatch ProtocolTM Plus
A-51643 Rev. 6 10/06/03
Chromalox Instruments and Controls
Revision History
Rev. Date Description
0 10/6/1998 Original Release 1 01/25/1999 Major revisions to match tested software. 2 02/12/1999
3 03/22/1999 Corrected figure references in communication card setup sections. Added text
4 01/24/2002 Added holding register address references for new menus for software version 3.0
5 06/10/2002 Added section 7, Programming Example and General Hints 6 10/6/2003 Section 3.6, change data address information in register 449.
Corrected temperature readout descriptions to 1 °F from 0.1 °F. Corrected misc. typos. Removed front panel security code holding register. Moved communication security code holding register to address 0.
concerning level 1 & 2 password holding registers.
and 3.1(Heat/Cool).
Approvals
Project Manager Bhupesh Gandhi Design Engineer Bhupesh Gandhi Engineering Manager Al Roman Sales Manager Gus Guthrie Customer Rich Johnson Customer Brian Hajder
A-51643 Rev. 6 10/06/03 i
Chromalox Instruments and Controls
Table of Contents
1 OVERVIEW................................................................................................................................................ 2
1.1 PURPOSE................................................................................................................................................2
1.2 CONVENTIONS AND DEFINITIONS ............................................................................................................2
2 COMMUNICATIONS SPECIFICATIONS................................................................................................2
2.1 SUPPORT SPECIFICATIONS ......................................................................................................................2
2.2 TIMING SPECIFICATIONS ......................................................................................................................... 2
2.3 WIRING .................................................................................................................................................2
2.4 COMMUNICATION CARD INSTALLATION AND JUMPER SETTINGS ..............................................................2
2.4.1 Communication Card (0113-10175) Installation ................................................................................2
2.4.2 Communication Card Jumper Settings............................................................................................... 2
3 REGISTER AND I/O MAPPING................................................................................................................2
3.1 UNMAPPED AND RESERVED REGISTERS...................................................................................................2
3.2 REGISTER QUANTITY LIMITATIONS......................................................................................................... 2
3.3 DISCRETE INPUT ASSIGNMENTS..............................................................................................................2
3.4 DISCRETE OUTPUT ASSIGNMENTS........................................................................................................... 2
3.5 INPUT REGISTER ASSIGNMENTS..............................................................................................................2
3.6 HOLDING REGISTER ASSIGNMENTS ......................................................................................................... 2
4 APPLICATION OPERATIONS.................................................................................................................2
4.1 SECURITY LEVEL AND DISCRETE INPUTS, DISCRETE OUTPUTS, AND REGISTER ACCESS ............................ 2
4.2 MULTIPLE REGISTER WRITE LIMITATIONS .............................................................................................. 2
4.3 CONTROL OPERATION AND RUN/HOLD/STOP FUNCTIONS........................................................................2
4.4 CONTROLLER MODE AND DATA ACCESS................................................................................................. 2
4.5 MONITORING AND ACKNOWLEDGEMENT OF ALARMS, EVENTS, AND CYCLE COMPLETE, DISCRETE INPUTS,
AND DISCRETE OUTPUTS..................................................................................................................................... 2
4.6 EVENT SETUP VALUES ...........................................................................................................................2
4.7 KEYPAD LOCKOUT.................................................................................................................................2
4.8 TEMPERATURE VALUES..........................................................................................................................2
4.9 TIME VALUES ........................................................................................................................................ 2
4.10 HIGH LIMIT SETPOINT AND BAND REGISTERS.......................................................................................... 2
4.11 BROADCASTING WITH GUARANTEED DELIVERY ......................................................................................2
4.12 COMMUNICATION PARAMETER ADJUSTMENTS........................................................................................2
5 FUNCTION SET DETAILS ........................................................................................................................ 2
A-51643 Rev. 6 10/06/03 ii
Chromalox Instruments and Controls
5.1 FUNCTION SET OVERVIEW......................................................................................................................2
5.2 REGISTER AND I/O FUNCTION SET DESCRIPTION FOR PROTOCOL
5.2.1 [01] Read Outputs.............................................................................................................................2
5.2.2 [02] Read Input Discretes.................................................................................................................. 2
5.2.3 [03] Read Holding Registers (Read Multiple Registers) .....................................................................2
5.2.4 [04] Read Input Registers..................................................................................................................2
5.2.5 [06] Write Single Register................................................................................................................. 2
5.2.6 [16] Write Multiple Registers ............................................................................................................2
5.3 DIAGNOSTICS AND SUPPORT DESCRIPTION FOR PROTOCOL
5.3.1 [08] Diagnostics ............................................................................................................................... 2
5.3.1.1 [08 00] Return Query Data........................................................................................................................ 2
5.3.1.2 [08 01] Restart Communications Option....................................................................................................2
5.3.1.3 [08 02] Return Diagnostic Register...........................................................................................................2
5.3.1.4 [08 04] Force Listen Mode Only............................................................................................................... 2
5.3.1.5 [08 10] Clear Communication Counters ....................................................................................................2
5.3.1.6 [08 12] Return Bus Communication Error Count....................................................................................... 2
5.3.1.7 [08 13] Return Bus Exception Error Count................................................................................................ 2
5.3.1.8 [08 14] Return Slave Message Count ........................................................................................................2
5.3.1.9 [08 15] Return Slave No Response Count..................................................................................................2
5.3.1.10 [08 18] Return Bus Character Overrun Count ............................................................................................2
5.3.2 [17] Report Slave ID .........................................................................................................................2
TM
PLUS .................................................2
TM
PLUS.......................................................... 2
5.4 EXCEPTION RESPONSE DESCRIPTION.......................................................................................................2
5.4.1 [01] Illegal Function......................................................................................................................... 2
5.4.2 [02] Illegal Data Address.................................................................................................................. 2
5.4.3 [03] Illegal Data Value .....................................................................................................................2
6 MODBUS PROTOCOL QUICK REFERENCE........................................................................................ 2
6.1 PROTOCOL FORMAT ...............................................................................................................................2
6.2 RTU TRANSMISSION MODE....................................................................................................................2
6.2.1 Coding System................................................................................................................................... 2
6.2.2 Serial Byte Setup ...............................................................................................................................2
6.2.3 Error Checking Field ........................................................................................................................ 2
6.2.4 Message Framing..............................................................................................................................2
6.3 ADDRESS FIELD .....................................................................................................................................2
6.4 FUNCTION FIELD....................................................................................................................................2
6.5 DATA FIELD...........................................................................................................................................2
6.6 ERROR CHECKING FIELD ........................................................................................................................ 2
6.7 FIELD CONTENTS IN MODBUS MESSAGES................................................................................................ 2
A-51643 Rev. 6 10/06/03 iii
Chromalox Instruments and Controls
6.7.1 The Byte Count Field......................................................................................................................... 2
7 PROGRAMMING EXAMPLE AND GENERAL HINTS..........................................................................2
7.1 CODE EXAMPLE .....................................................................................................................................2
7.2 ADDITIONAL COMMUNICATIONS TROUBLESHOOTING HINTS.................................................................... 2
List of Figures and Tables
TABLE 1: MODBUS REFERENCES .............................................................................................................................2
TABLE 2: PROTOCOL
FIGURE 1: RS232 WIRING ...................................................................................................................................... 2
FIGURE 2: RS422A WIRING (4 WIRE)...................................................................................................................... 2
FIGURE 3: RS485 WIRING (2 WIRE).........................................................................................................................2
FIGURE 4: CONTROLLER REAR VIEW WITH COMMUNICATION CARD (LEFT).............................................................. 2
FIGURE 5: COMMUNICATION CARD (0113-10175) JUMPER SETTINGS ........................................................................ 2
TABLE 3: PROTOCOL TABLE 4: PROTOCOL TABLE 5: PROTOCOL TABLE 6: PROTOCOL
TM
PLUS REFERENCES...............................................................................................................2
TM
PLUS DISCRETE INPUT ADDRESS MAP..................................................................................2
TM
PLUS DISCRETE OUTPUT ADDRESS MAP............................................................................... 2
TM
PLUS INPUT REGISTER ADDRESS MAP.................................................................................. 2
TM
PLUS HOLDING REGISTER ADDRESS MAP.............................................................................2
TABLE 7: COMMUNICATION SECURITY LEVELS........................................................................................................ 2
TABLE 8 PROTOCOL TABLE 9 PROTOCOL TABLE 10 PROTOCOL TABLE 11: PROTOCOL
TM
PLUS FUNCTION AND EXCEPTION CODE SET ........................................................................2
TM
PLUS DIAGNOSTIC (FUNCTION CODE 08) SUB-FUNCTION SET ...............................................2
TM
PLUS EXCEPTION CODE SET .............................................................................................. 2
TM
PLUS DIAGNOSTIC REGISTER BIT ASSIGNMENT ..................................................................2
FIGURE 6 CRC FLOWCHART ..................................................................................................................................2
A-51643 Rev. 6 10/06/03 iv
Chromalox Instruments and Controls
A-51643 Rev. 6 10/06/03 v
Chromalox Instruments and Controls
1 Overview
1.1 Purpose
This document provides all application specific information necessary for developing a Modbus Master application program for interfacing with the ProtocolTM Plus slave controller. The assumption is made that the programmer has at least an intermediate understanding of the Modbus Protocol. Only limited information is presented here regarding the Modbus Protocol specifications. Below is a list of relevant Modbus Protocol documents. A quick reference section is provided in this document (see section 6 Modbus Protocol Quick Reference). A programming guideline section provides a programming example and general communications hints (see section 7 Programming Example and General Hints for programming help).
Table 1: Modbus References
Modicon Modbus Protocol http://www.modicon.com/techpubs/intr7.html Schneider Automation Open Modbus/TCP Specification
http://www.modicon.com/openmbus.html/
Table 2: ProtocolTM Plus References
Engineering Specification for Despatch ProtocolTM Plus A-50778
1.2 Conventions and definitions
RTU: Remote Terminal Unit CRC: Cyclical Redundancy Check $: Represents a hexadecimal number XOR: Exclusive OR logic operation LSB: Least Significant Bit MSB: Most Significant Bit XX: Don’t Care when used in a hex number
--: Field contents are data dependent NA: Not Applicable TBD: To Be Determined or To Be Defined
A-51643 Rev. 6 10/06/03 1
Chromalox Instruments and Controls
Master Device
2 1
Protocol™ Plus DB
-
9 Connector
3 5 2 3 7
Protocol™ Plus Connector
5 5
2 Communications Specifications
2.1 Support Specifications
Device Support: Slave only. Slave ID Code (Identifies Product Line): 1. Transmission Mode: RTU mode only. Communication Medium: RS232, RS422, or RS485. Address Support: 1 – 247. Baud Rate: 2400, 4800, 9600, 19.2K, 38.4K Parity: None, Even, or Odd.
2.2 Timing Specifications
Message Framing: Silent period of at least 3.5 character times before the first character and after the last
character of the message. Character Framing: No more than 1.5 character times of silence between received and transmitted characters.
Message Timeout (Query Response Time): Response to queries will be made within 1 sec.
2.3 Wiring
Figure 1: RS232 Wiring
DB-9
2
Rcv
Xmit
Gnd
Rcv Xmit Gnd
3
Rcv
Xmit
Gnd
3
Rcv
Xmit
Gnd
DB-25
A-51643 Rev. 6 10/06/03 2
Chromalox Instruments and Controls
2 5
Protocol™ Plus DB
-
9 Connector
Master Device
3 7
1 5
Protocol™ Plus Connector
5
Protocol™ Plus DB
-
9 Connector
5
Protocol™ Plus Connector
Master Device
3 7
Figure 2: RS422A Wiring (4 wire)
Rcv + Rcv ­Xmit + Xmit - 4 Gnd
T/R + T/R ­Gnd
Rcv + 2 3
Rcv -
Xmit +
Xmit - 4
Gnd
7 3
14 2 16
Xmit + (b) Xmit – (a) Rcv + (b) Rcv – (a) Gnd
DB-25
(Pin #’s based on RS-530 standard; may vary by device)
Figure 3: RS485 Wiring (2 wire)
14
Xmit + (b)
2 3 4
T/R + T/R ­Gnd
3 4
16
Xmit – (a) Rcv + (b) Rcv – (a) Gnd
DB-25
(Pin #’s based on RS-530 standard; may vary by device)
2.4 Communication Card Installation and Jumper Settings
WARNING Electronic Components are extremely sensitive to static electricity. Before opening the controller case, read and follow the precautions below to prevent damage from static electricity.
1. Turn off power to the controller.
2. Touch a bare metal surface on the exterior of the controller.
3. Disconnect the power connection from the controller or unplug from the power source.
Also follow these static electricity precautions:
v Avoid static-causing surfaces while working with electronic components. v Remove parts from their anti-static bags only when ready for use. Do not lay parts on the outside of
the anti-static bag because only the inside provides protection.
v Hold circuit boards by their edges or any metal mounting hardware. Avoid touching components or
connectors on the circuit boards.
2.4.1 Communication Card (0113-10175) Installation
1. Turn off power to the controller.
2. Remove the back cover of the controller by removing the two screws at the top of the unit.
A-51643 Rev. 6 10/06/03 3
Chromalox Instruments and Controls
3. Looking into the back of the controller with the connector terminal strips at the bottom, install the
communication card onto the two 5 pin headers on the rear circuit board. Be sure the jumper blocks on the communication card are positioned toward the bottom of the controller. See Figure 4: Controller Rear View with Communication Card (Left). Be sure the card is seated firmly onto the headers.
4. Set the jumpers on the communication card for the desired serial communication interface based on
Figure 5: Communication Card (0113-10175) Jumper Settings.
5. Reinstall the back cover.
6. Wire the communication connections on the rear of the unit for the desired serial communication
interface based on Figure 1: RS232 Wiring, Figure 2: RS422A Wiring (4 wire), or Figure 3: RS485 Wiring (2 wire).
7. Reapply all power connections to the controller.
Figure 4: Controller Rear View with Communication Card (Left)
A-51643 Rev. 6 10/06/03 4
Chromalox Instruments and Controls
RS232 Jumper Settings
RS422 Jumper Settings
RS485 Jumper Settings
2.4.2 Communication Card Jumper Settings
1. Turn off power to the controller.
2. Remove the back cover of the controller (if it is not already removed) by removing the two screws at
the top of the unit.
3. Set the jumpers on the communication card for the desired serial communication interface based on
Figure 5: Communication Card (0113-10175) Jumper Settings.
4. Reinstall the back cover.
5. Reapply power to the controller.
Figure 5: Communication Card (0113-10175) Jumper Settings
A-51643 Rev. 6 10/06/03 5
Chromalox Instruments and Controls
3 Register and I/O Mapping
3.1 Unmapped and Reserved Registers
Reserved and NA registers will be read as zero with no exception error being generated. Thus, the host can request data from multiple addresses with gaps between and still receive a valid response. Illegal and undefined register address blocks will always generate an illegal data address exception.
Reserved and NA registers may be written without generating an exception, however the data is ignored for these registers and no write takes place. Illegal and undefined register address blocks will always generate an illegal data address exception.
3.2 Register Quantity Limitations
The number of registers that can be accessed in one query is limited to 50.
3.3 Discrete Input Assignments
The status of the four event inputs can be read as discrete inputs in Modbus format.
Table 3: ProtocolTM Plus Discrete Input Address Map
Data Address Hex Address Description Security
8 -- 65535
0 1 2 3
4 -- 7
$0000 Event Input 1 $0001 Event Input 2 $0002 Event Input 3 $0003 Event Input 4
$0004 -- $0007 Illegal, Reserved for future inputs
$0008 - $FFFF Undefined, available for application assignment
0 0 0 0
0 0
3.4 Discrete Output Assignments
The status of the four relay outputs can be read as discrete outputs in Modbus format. Writes to the outputs are not supported, that is, the functions “Write Single Output” (06) and “Write Multiple Outputs” (15) are not implemented.
A-51643 Rev. 6 10/06/03 6
Chromalox Instruments and Controls
Table 4: ProtocolTM Plus Discrete Output Address Map
Data Address Hex Address Description Security
8 -- 65535
0 1
2 3
4 -- 7
$0000 Relay Output 1 $0001 Relay Output 2
$0002 Relay Output 3 $0003 Relay Output 4
$0004 -- $0007 Illegal, Reserved for future inputs
$0008 - $FFFF Undefined, available for application assignment
0 0
0 0 0 0
A-51643 Rev. 6 10/06/03 7
Chromalox Instruments and Controls
Timer/Ramp/Soak Interval Time
0 = ramp interval of segment, 1 = soak interval of
3.5 Input Register Assignments
Input registers are intended for read only information and functions that cannot or should not be controlled remotely. Much status information is mapped as holding registers so that operations can be controlled remotely. Examples are control output commands, ramp/soak status (run, hold, stop), and ramp/soak program number.
Table 5: ProtocolTM Plus Input Register Address Map
Page[menu]
Data
Address
Hex
Address
Description
Association or
Range
Security
Level Comments
Control Loop Input Registers
0 0 PV Sensor range 0 read as xxxx deg. F 1 1 Active SP Sensor range 0 read as xxxx deg. F 2 2 Active Hi Limit SP Sensor range 0 read as xxxx deg. F 3 3 PV Status -1, 0, 1 0 -1 = underrange, 0 = in range, 1 = overrange 4 4 NA 0 0 5 5 Hi Limit PV Sensor Range 0 read as xxxx deg. F 6 6 Hi Limit PV Status -1, 0, 1 0 -1 = underrange, 0 = in range, 1 = overrange 7 7 Control Output Command 0 - 100.0 0 value has an implied decimal pt. of 1 8 8 Hi Limit Output 0, 1 0 0 = Off, 1 = On
9 9 Max Hi Limit SP Control[Hi-Lim SP] 0 read as xxxx deg. F 10 A NA 0 0 11 B PV Max Sensor Range 0 read as xxxx deg. F 12 C PV Min Sensor Range 0 read as xxxx deg. F 13 D Reserved for factory use 14 E Reserved for factory use 15 F Reserved for factory use
16 -- 127 10 -- 7F Illegal, Reserved standard reg.
Timer/Profile Input Registers
128 80 Segment Number 1-99 0 Current segment number
129 81
130 82 Segment Loops Remaining 0 - 99 0 Number of loops remaining in the ramp/soak program.
131 83 Ramp/Soak Interval Indicator 0, 1 0
132 -- 143 84 -- 8F Illegal, Available to application
Remaining
Global Input Registers
144 90 Terminal Temp (CJC) Ambient Range 0 read as xxx.x deg. F 145 91 N/A 0 0 146 92 Reset Counter 0 - $FFFF 0 Number of processor resets. 147 93 Power Down Counter 0 - $FFFF 0 Number of power down interrupts. 148 94 Alarms Status 0 - $F 0 Bits 0-3 = Alarms 1-4. Bit value: 0 = Off, 1 = On
00:00 - 99:59 0 Time remaining in ramp/soak interval
segment
A-51643 Rev. 6 10/06/03 8
Chromalox Instruments and Controls
149 95 Events Status 0 - $F 0 Bits 0-3 = Events 1-4. Bit value: 0 = Off, 1 = On 150 96 Cycle Complete Status 0, 1 0 0 = Off, 1 = On 151 97 Audible Annunciator Status 0, 1 0 0 = Off, 1 = On
152 -- 155 98 -- 9B Reserved, available to application 0 0
156 – 157 9C – 9D Reserved for factory use
158 -- 159 9E – 9F N/A 0 0
A/D Input Registers
160 -- 165 A0 -- A5 Reserved for factory use 166 -- 167 A6 -- A7 Illegal, Reserved standard reg. 168 -- 175 A8 -- AF Illegal, Available to application
Allocated Blocks
176 -- 255 B0 -- FF Illegal, Reserved standard reg.
256 -- 65535 100 -- FFFF Undefined
A-51643 Rev. 6 10/06/03 9
Chromalox Instruments and Controls
3.6 Holding Register Assignments
Holding registers are intended for information and functions that can be read or written. Each holding register has a corresponding internal memory variable in the slave device. This association is shown in the address map table.
Table 6: ProtocolTM Plus Holding Register Address Map
Page[menu]
Association or
Data
Address
Hex
Address
Description
Global Holding Registers
0 0 Communications Security Code 0-999 (0) 0 Security code setting for remote interface.
1 1 Temperature Display Units PID[Temp Unit] 1 or 2 (Note 1) 0 = deg. F, 1 = deg. C.
2 2 Reserved for factory use
3 3 Reserved for factory use
4 4 Reserved for factory use
5 5 Keypad Lockout 0 = normal, 1 = locked (0) 2 Disables front panel keypad
6 6 Controller Mode
7 7 Alarm Acknowledge 0 - $FFF F 0 0 = No Action, >0 = Alarm Acknowledge
8 8 Level 1 Password Enable[Password 1] 2 0 – 999 (Write not allowed while in setup mode)
9 9 Level 2 Password Enable[Password 2] 2 0 – 999 (Write not allowed while in setup mode) 10 A Key Press Beep Control[Key Beep] 1 or 2 (Note 1) 0 = off, 1 = on 11 B End of Cycle Beep Control[EOC Beep] 1 or 2 (Note 1) 0 = off, 1 = on 12 C Alarm Beep Control[Alarm Beep] 1 or 2 (Note 1) 0 = off, 1 = on 13 D Setpoint Change Enable Enable[SPChange] 2 0 = no, 1 = yes 14 E Analog output type Enable[Aout] 2 0 = Control (Default), 1 = Process 15 F Reserved, Available to application 0 0
Control Loop Holding Registers
16 10 Manual SP Manual[setpt] 0 read/written as xxxx deg. F. 17 11 Manual High Limit SP Manual[Hi-Lim SP] 0 read/written as xxxx deg. F. 18 12 Manual Event 1-4 Setup $0 - $F ($0) 0 Bits 0-3 = Events 1-4. Bit value: 0 = Off, 1 = On 19 13 NA 0 0 20 14 Proportional Band (Heat) PID[P (H)] 1 or 2 (Note 1) read/written as xxxx deg. F. 21 15 Integral Reset (Heat) PID[I (H) Rep/Min] 1 or 2 (Note 1) value is in repeats/min 22 16 Derivative Rate (Heat) PID[I (H) in sec] 1 or 2 (Note 1) value is in seconds 23 17 Hysteresis Control[Hysteresis] 1 or 2 (Note 1) read/written as xxxx deg. F. 24 18 High Limit Band Control[Hi-Lim Band] 1 or 2 (Note 1) read/written as xxxx deg. F. 4 = Off. 25 19 Cycle Time Control[Cycle Time Sec] 1 or 2 (Note 1) value is in seconds 26 1A Proportional Band (Cool) PID[P(C)] 1 or 2 (Note 1) read/written as xxxx deg. F. (H/C Version 3.1 Only) 27 1B Integral Reset (Cool) PID[I (C) Rep/Min] 1 or 2 (Note 1) value is in repeats/min. (H/C Version 3.1 Only) 28 1C Derivative Rate (Cool) PID[D(C) in Sec] 1 or 2 (Note 1) Value is in Seconds. (H/C Version 3.1 Only) 29 1D Heat Offset PID[Heat Offset] 1 or 2 (Note 1) read/written as xxxx deg. F. (+/- P Band H) H/C Only 30 1E Cool Offset PID[Cool Offset] 1 or 2 (Note 1) read/written as xxxx deg. F. (+/- P Band H) H/C Only
Range (default
value)
Read: 1 – 5 Write: 1 - 4
Security
Level Comments
0 1=Manual, 2=Timer, 3=Profile, 4=Autostart, 5=Setup
A-51643 Rev. 6 10/06/03 10
Loading...
+ 37 hidden pages