Despatch Protocol Plus Modbus Communications User Manual

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
Rev.
Date
Description
0
10/6/1998
Original Release
1
01/25/1999
Major revisions to match tested software.
2
02/12/1999
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.
3
03/22/1999
Corrected figure references in communication card setup sections. Added text concerning level 1 & 2 password holding registers.
4
01/24/2002
Added holding register address references for new menus for software version 3.0 and 3.1(Heat/Cool).
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.
Revision History
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 ........................................................................................................................................................ 1
1.1 PURPOSE ....................................................................................................................................................... 1
1.2 CONVENTIONS AND DEFINITIONS .................................................................................................................. 1
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 .................................................................. 3
2.4.1 Communication Card (0113-10175) Installation..................................................................................... 3
2.4.2 Communication Card Jumper Settings .................................................................................................... 5
3 REGISTER AND I/O MAPPING ..................................................................................................................... 6
3.1 UNMAPPED AND RESERVED REGISTERS ........................................................................................................ 6
3.2 REGISTER QUANTITY LIMITATIONS ................................................................................................ .............. 6
3.3 DISCRETE INPUT ASSIGNMENTS .................................................................................................................... 6
3.4 DISCRETE OUTPUT ASSIGNMENTS ................................................................................................................ 6
3.5 INPUT REGISTER ASSIGNMENTS .................................................................................................................... 8
3.6 HOLDING REGISTER ASSIGNMENTS ............................................................................................................ 10
4 APPLICATION OPERATIONS ..................................................................................................................... 15
4.1 SECURITY LEVEL AND DISCRETE INPUTS, DISCRETE OUTPUTS, AND REGISTER ACCESS ............................ 15
4.2 MULTIPLE REGISTER WRITE LIMITATIONS ................................................................................................. 15
4.3 CONTROL OPERATION AND RUN/HOLD/STOP FUNCTIONS .......................................................................... 16
4.4 CONTROLLER MODE AND DATA ACCESS .................................................................................................... 16
4.5 MONITORING AND ACKNOWLEDGEMENT OF ALARMS, EVENTS, AND CYCLE COMPLETE, DISCRETE INPUTS,
AND DISCRETE OUTPUTS.......................................................................................................................................... 17
4.6 EVENT SETUP VALUES ................................................................................................................................ 18
4.7 KEYPAD LOCKOUT ...................................................................................................................................... 18
4.8 TEMPERATURE VALUES .............................................................................................................................. 18
4.9 TIME VALUES ............................................................................................................................................. 18
4.10 HIGH LIMIT SETPOINT AND BAND REGISTERS ............................................................................................ 18
4.11 BROADCASTING WITH GUARANTEED DELIVERY ......................................................................................... 18
4.12 COMMUNICATION PARAMETER ADJUSTMENTS ........................................................................................... 19
5 FUNCTION SET DETAILS ............................................................................................................................ 20
A-51643 Rev. 6 10/06/03 ii
Chromalox Instruments and Controls
5.1 FUNCTION SET OVERVIEW .......................................................................................................................... 20
5.2 REGISTER AND I/O FUNCTION SET DESCRIPTION FOR PROTOCOL
5.2.1 [01] Read Outputs ................................................................................................................................. 21
5.2.2 [02] Read Input Discretes ...................................................................................................................... 22
5.2.3 [03] Read Holding Registers (Read Multiple Registers) ....................................................................... 23
5.2.4 [04] Read Input Registers ...................................................................................................................... 24
5.2.5 [06] Write Single Register ..................................................................................................................... 25
5.2.6 [16] Write Multiple Registers ................................................................................................................ 26
5.3 DIAGNOSTICS AND SUPPORT DESCRIPTION FOR PROTOCOL
5.3.1 [08] Diagnostics .................................................................................................................................... 28
5.3.1.1 [08 00] Return Query Data ............................................................................................................................ 28
5.3.1.2 [08 01] Restart Communications Option ....................................................................................................... 29
5.3.1.3 [08 02] Return Diagnostic Register ............................................................................................................... 29
5.3.1.4 [08 04] Force Listen Mode Only ................................................................................................................... 30
5.3.1.5 [08 10] Clear Communication Counters ....................................................................................................... 31
5.3.1.6 [08 12] Return Bus Communication Error Count ......................................................................................... 31
5.3.1.7 [08 13] Return Bus Exception Error Count ................................................................................................... 32
5.3.1.8 [08 14] Return Slave Message Count ............................................................................................................ 32
5.3.1.9 [08 15] Return Slave No Response Count ..................................................................................................... 33
5.3.1.10 [08 18] Return Bus Character Overrun Count ............................................................................................... 33
5.3.2 [17] Report Slave ID.............................................................................................................................. 34
TM
PLUS .................................................. 21
TM
PLUS ........................................................... 28
5.4 EXCEPTION RESPONSE DESCRIPTION .......................................................................................................... 35
5.4.1 [01] Illegal Function ............................................................................................................................. 36
5.4.2 [02] Illegal Data Address ...................................................................................................................... 36
5.4.3 [03] Illegal Data Value .......................................................................................................................... 36
6 MODBUS PROTOCOL QUICK REFERENCE ........................................................................................... 37
6.1 PROTOCOL FORMAT .................................................................................................................................... 37
6.2 RTU TRANSMISSION MODE ........................................................................................................................ 37
6.2.1 Coding System ....................................................................................................................................... 37
6.2.2 Serial Byte Setup .................................................................................................................................... 37
6.2.3 Error Checking Field ............................................................................................................................. 38
6.2.4 Message Framing .................................................................................................................................. 38
6.3 ADDRESS FIELD .......................................................................................................................................... 38
6.4 FUNCTION FIELD ......................................................................................................................................... 38
6.5 DATA FIELD ................................................................................................................................................ 39
6.6 ERROR CHECKING FIELD ............................................................................................................................ 39
6.7 FIELD CONTENTS IN MODBUS MESSAGES ................................................................................................... 40
A-51643 Rev. 6 10/06/03 iii
Chromalox Instruments and Controls
6.7.1 The Byte Count Field ............................................................................................................................. 41
7 PROGRAMMING EXAMPLE AND GENERAL HINTS ................................................................ ............ 42
7.1 CODE EXAMPLE .......................................................................................................................................... 42
7.2 ADDITIONAL COMMUNICATIONS TROUBLESHOOTING HINTS...................................................................... 47
List of Figures and Tables
TABLE 1: MODBUS REFERENCES .................................................................................................................................... 1
TABLE 2: PROTOCOL
FIGURE 1: RS232 WIRING ............................................................................................................................................. 2
FIGURE 2: RS422A WIRING (4 WIRE) ............................................................................................................................ 3
FIGURE 3: RS485 WIRING (2 WIRE) ............................................................................................................................... 3
FIGURE 4: CONTROLLER REAR VIEW WITH COMMUNICATION CARD (LEFT) .................................................................. 4
FIGURE 5: COMMUNICATION CARD (0113-10175) JUMPER SETTINGS ............................................................................ 5
TABLE 3: PROTOCOL TABLE 4: PROTOCOL TABLE 5: PROTOCOL TABLE 6: PROTOCOL
TM
PLUS REFERENCES .................................................................................................................... 1
TM
PLUS DISCRETE INPUT ADDRESS MAP ...................................................................................... 6
TM
PLUS DISCRETE OUTPUT ADDRESS MAP ................................................................................... 7
TM
PLUS INPUT REGISTER ADDRESS MAP....................................................................................... 8
TM
PLUS HOLDING REGISTER ADDRESS MAP ................................................................ ............... 10
TABLE 7: COMMUNICATION SECURITY LEVELS ........................................................................................................... 15
TABLE 8 PROTOCOL TABLE 9 PROTOCOL TABLE 10 PROTOCOL TABLE 11: PROTOCOL
TM
PLUS FUNCTION AND EXCEPTION CODE SET .......................................................................... 20
TM
PLUS DIAGNOSTIC (FUNCTION CODE 08) SUB-FUNCTION SET ................................................ 20
TM
PLUS EXCEPTION CODE SET ................................................................................................. 21
TM
PLUS DIAGNOSTIC REGISTER BIT ASSIGNMENT .................................................................... 30
FIGURE 6 CRC FLOWCHART ....................................................................................................................................... 40
A-51643 Rev. 6 10/06/03 iv
Chromalox Instruments and Controls
A-51643 Rev. 6 10/06/03 v
Chromalox Instruments and Controls
Modicon Modbus Protocol
http://www.modicon.com/techpubs/intr7.html
Schneider Automation Open Modbus/TCP Specification
http://www.modicon.com/openmbus.html/ Engineering Specification for Despatch ProtocolTM Plus
A-50778
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
Table 2: ProtocolTM Plus References
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
Rcv
Xmit
Gnd
Master Device
Xmit
Rcv
Gnd
3 2 1
Protocol™ Plus DB-9 Connector
Rcv
Xmit
Gnd
2 3 5
2 3 7
DB-25
DB-9
Protocol™ Plus Connector
3 5 5
Rcv
Xmit
Gnd
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
A-51643 Rev. 6 10/06/03 2
Chromalox Instruments and Controls
Xmit +
Rcv -
Gnd
3 2 5
Protocol™ Plus DB-9 Connector
Rcv +
7
Xmit -
4
Master Device
(Pin #‘s based on RS-530 standard; may vary by device)
Xmit – (a)
Rcv + (b)
Gnd
2 3 7
DB-25
Xmit + (b)
16
Rcv – (a)
14
Xmit +
Rcv -
Gnd
3 1 5
Rcv +
2
Xmit -
4
Protocol™ Plus Connector
T/R +
Gnd
3
5
Protocol™ Plus DB-9 Connector
T/R - 4 T/R +
Gnd
3
5
T/R -
4
Protocol™ Plus Connector
Master Device
(Pin #‘s based on RS-530 standard; may vary by device)
Xmit – (a)
Rcv + (b)
Gnd
2 3 7
DB-25
Xmit + (b)
16
Rcv – (a)
14
Figure 2: RS422A Wiring (4 wire)
Figure 3: RS485 Wiring (2 wire)
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:
Avoid static-causing surfaces while working with electronic components. 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.
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
Data Address
Hex Address
Description
Security
0
$0000
Event Input 1
0
1
$0001
Event Input 2
0
2
$0002
Event Input 3
0
3
$0003
Event Input 4
0
4 -- 7
$0004 -- $0007
Illegal, Reserved for future inputs
0
8 -- 65535
$0008 - $FFFF
Undefined, available for application assignment
0
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
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
Data Address
Hex Address
Description
Security
0
$0000
Relay Output 1
0
1
$0001
Relay Output 2
0
2
$0002
Relay Output 3
0
3
$0003
Relay Output 4
0
4 -- 7
$0004 -- $0007
Illegal, Reserved for future inputs
0
8 -- 65535
$0008 - $FFFF
Undefined, available for application assignment
0
Table 4: ProtocolTM Plus Discrete Output Address Map
A-51643 Rev. 6 10/06/03 7
Chromalox Instruments and Controls
Data
Address
Hex
Address
Description
Page[menu]
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
Timer/Ramp/Soak Interval Time Remaining
00:00 - 99:59
0
Time remaining in ramp/soak interval
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
0 = ramp interval of segment, 1 = soak interval of segment
132 -- 143
84 -- 8F
Illegal, Available to application
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
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
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
Data
Address
Hex
Address
Description
Page[menu]
Association or
Range (default
value)
Security
Level
Comments
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
Read: 1 – 5 Write: 1 - 4
0
1=Manual, 2=Timer, 3=Profile, 4=Autostart, 5=Setup
7
7
Alarm Acknowledge
0 - $FFFF
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
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
A-51643 Rev. 6 10/06/03 10
Loading...
+ 37 hidden pages