Beruflich Dokumente
Kultur Dokumente
This guide contains the basic information necessary to interface the Vantage, Maestro or
ProTech control system with plant automation systems, Man-Machine-Interface (MMI)
software, and other data logging systems using the Modbus communications interface.
However, since installations may vary, these instructions may not cover all details or
variations in the equipment supplied or every question that may arise during use.
More detailed information on the Modbus protocol is available in the Modicon Modbus
Protocol Reference Guide, part number PI-MBUS-300 Rev. J.
If a question or situation develops which is not answered directly in this guide, contact an
authorized service representative for more information, or contact the factory directly for
specific answers and advice.
Installation
The communications interface is installed by connecting the Modbus Network Port,
connector J9 on the Main Logic Module (MLM), to the plant, MMI, or other equipment.
The controller operates as the slave device, the plant system or MMI operates as the
Master device.
The physical link uses an RS-485 two-wire, half duplex, serial communications interface.
The RS-485 standard defines the signal levels and other characteristics of the physical
link. The equipment that is to be connected to the controller must implement this same
RS-485 standard. Refer to the documentation of master device to be connected to confirm
the standards used and how the connections are made.
The connection must be made using 22 Gauge, twisted 3-wire shielded cable, such as
Belden # 3106A, or equivalent.
The positive terminal on the controller is connected to the positive terminal on the master
device, and the negative terminal to the master negative terminal. The COM terminal on
the controller is connected to the common terminal on the master device. The common
connection is used to insure that both pieces of equipment have the same signal reference
level.
Up to thirty one (31) controllers can be connected together with the master device. The
controllers should be connected together in a daisy chain and then connected to the
master device at one end.
The RS-485 standard specifies the maximum length of the physical connection at 5000
feet (1524 meters) between the farthest connections.
It is recommended that a RS-485 isolator be installed between the network of controllers
and the Master device if the Master is located in a different building, if the Master may
have a different ground reference, or if problems are experienced reliably communicating
between the Master and controller(s).
There are a number of RS-485 isolators that will work well for this application. The
Westermo RD-48 repeater has been tested and known to work well in this application.
Refer to www.westermo.com, also available through Industrial Networking Solutions
800-889-1461, and Gross Automation 262-446-0000.
Configuration
The Modbus interface on the controller must be configured to match the speed and data
format used by the master device. If multiple controllers are connected together, they
must all be configured to use the same speed and data format.
The Desktop software is used to configure the controller. The Communications Tab on
the desktop contains the Modbus settings. The communication speed is in bits per second,
referred to as Baud rate. The data format is expressed as the number of data bits followed
by the parity type, and then the number of stop bits. The parity can be Even, Odd, or
None. Set the controller Modbus speed and data format to match that used by the master
device. Refer to the online help in the Desktop for more information.
The Modbus access is selected based on what type of functionality you wish to
implement from the master device. The default is Read-Only which prevents the master
from changing any setting or executing any control function in the controller. Refer to the
online help in the Desktop for more information.
Modbus Protocol
The Modbus protocol describes an industrial communications and distributed control
system developed by Gould-Modicon to integrate PLCs, computers, terminals, and other
monitoring, sensing, and control devices. Modbus is a Master/Slave communications
protocol, whereby one device, (the Master), controls all serial activity by selectively
polling one or more slave devices. The protocol provides for one master device and up to
247 slave devices on a common line. Each device is assigned an address to distinguish it
from all other connected devices. The RS-485 physical link used by the controller limits
the maximum number of slave devices to 31.
Only the master initiates a transaction. Transactions are either a query/response type,
(only a single slave is address), or a broadcast/no response type, (all slaves are
addressed). A transaction comprises a single query and single response frame or a single
broadcast frame.
Certain characteristics of the Modbus protocol are fixed, such as the frame format, frame
sequences, handling of communications errors and exception conditions, and the
functions performed.
Other characteristics are user selectable. These include a choice of transmission media
(physical link), baud rate, character parity, number of stop bits, and the transmission
modes, (ASCII or RTU). The controller only supports the RTU transmission mode of the
Modbus protocol.
Synchronization
Frame synchronization can be maintained in RTU transmission mode only by simulating
a synchronous message. The receiving device monitors the elapsed time between receipt
of characters. If three and one-half character times elapse without a new character or
completion of the frame, then the device flushes the frame and assumes that the next byte
received will be an address.
Message Format
A transaction consists of a single request from the master to a specific slave device, and a
single response from that device back to the master. Both of these messages, request and
response, are formatted as Modbus message frames. Each message frame consists of a
series of bytes grouped into four fields as described below:
ADDRESS
1 byte
FUNCTION
1 byte
DATA
variable
ERROR CHECK
2 bytes
Address Field
The address field immediately follows the beginning of frame and consists of one byte.
This byte indicates the user assigned address of the slave device that is to receive the
message sent by the master.
Each slave must be assigned a unique address and only the addressed slave will respond
to a query that contains its address. When the slave sends a response, the slave address
informs the master which slave is communicating. In a broadcast message, an address of
0 is used. All slaves interpret this as an instruction to read and take action on the
message, but not to issue a response message.
The slave address is configured for the controller using the Desktop software, in the
General Tab. The Unit Number specifies the Modbus slave address.
Function Field
The Function field tells the addressed slave controller what function to perform. Modbus
function codes are specifically designed for interacting with a PLC on the Modbus
industrial communications system. The high order bit in this field is set by the slave
device to indicate an exception condition in the response message. If no exceptions exist,
the high-order bit is maintained as zero in the response message.
The following functions are supported by the controller:
FUNCTION CODE MEANING
03
READ HOLDING
REGISTER
04
READ INPUT REGISTER
06
08
PRESET SINGLE
REGISTER
LOOPBACK TEST
ACTION
Obtains current binary value in one
or more holding registers.
Obtains current binary value in one
or more input registers.
Place a specific binary value into a
holding register.
Enables the master to test the
communication system.
Data Field
The data field contains information needed by the slave controller to perform the specific
function or it contains data collected by the slave in response to a query. This
information may be values, address references, or limits. For example, the function code
tells the slave to read a holding register, and the data field is needed to indicate which
register to start at and how many to read.
Exception Responses
Programming or operation errors are those involving illegal data in a message, no
response from the controller to the master, or difficulty in communicating with a
controller. These errors result in an exception response from either the master or the
controller, depending on the type of error.
The exception response codes are listed below. When a controller detects one of these
errors, it sends a response message to the master consisting of the slave address, function
code, error code, and error check fields. To indicate that the response is a notification of
an error, the high-order bit of the function code is set to one.
CODE NAME
01
ILLEGAL FUNCTION
02
03
07
NAK-NEGATIVE
ACKNOWLEDGMENT
MEANING
The message function received is not
an allowable action.
The address referenced in the data field
is not an allowable address for the data.
The value referenced in the data field is
not allowable in the addressed location.
The function just requested could not
be performed.
Memory Notation
Data points in the controller are referenced in the same manner as points in a Modicon
PLC. This notation allows for four different types of data: coils, discrete inputs, input
registers, and holding registers. Register variables consist of two bytes, while coils and
discrete inputs are single bits. The coil and discrete input data types are not used as they
have no application in the controller.
Each function references only one type of data and uses a relative address in the message
frame with a zero offset. For example, holding register 40001 relative address is 0000,
input register 30003 relative address is 0002, and so on.
Data Type
Input Registers
Holding Registers
Absolute Address
30001-39999
40001-49999
Relative Address
0-9998
0-9998
Function
4
3,6
STARTING
REGISTER
2 BYTES
SEE HOLDING
REGISTER
MAP
REGISTER
COUNT
2 BYTES
NUMBER OF
REGISTERS
ERROR
CHECK
2 BYTES
CRC-16
The starting register number is shown in the following table. The register count specifies
how many consecutive register values will be returned in the response message. An
exception message will be returned when specifying a register number that is not defined.
Note that the message frame uses relative addressing; see Memory Notation above for
more information.
HOLDING REGISTER MAP
REGISTER DESCRIPTION
0
System Pressure Set Point
1
System Pressure Offset Set Point
2
Max Discharge Pressure Set Point
3
Standby Pressure Offset Set Point
4
Check Valve Offset Set Point
100
Motor Status
101
Motor Load (%)
102
Protection Status
103
Last Alarm Monitoring Point
104
Last Trip Monitoring Point
105
Inlet Control Mode
106
Blow Off Control Mode
107
Network Control Mode
108
Network Pressure Set Point
109
Network Priority Number
110
Network Time Constant
111
Network Dead band
112
Network Cascade Set Point Adjustment
113
Network Start Pressure Offset
114
Network Start Time Delay
115
Network Availability
116
Automatic Start/Stop Mode
117
Automatic Start/Stop Lockout
118
Automatic Start Pressure Offset
NOTE
1
1
1
1
1
2
3
4
5
5
6
7
8
1
9
10
1
1
1
10
9
11
12
1
10
14
15
1
1
1
1
1
1
1
15
1
1
Notes:
1.
Stopped
Stopping
Starting
Running
Manual
Unloaded
System Pressure
Minimum Flow
Maximum Load
Manual
7
1
2
3
Unloaded
System Pressure
Discharge Pressure
Local Control
Networked Leader
Networked Follower
16
17
18
19
20
21
22
23
24
32
33
48
49
50
51
52
53
65
66
67
68
69
70
71
72
0
1
2
15.
.
RESPONSE FRAME
ADDRESS
FUNCTION
CODE
1 BYTE
1 BYTE
UNIT
03
NUMBER
BYTE COUNT
DATA
1 BYTES
NUMBER OF
REQUESTED
REGISTERS
X2
VARIABLE
SEE
HOLDING
REGISTER
TABLE
ERROR
CHECK
2 BYTES
CRC-16
The response message contains a variable length data field that is equal to the number of
registers requested multiplied by 2. The registers are ordered consecutively in the data
field as 2 byte values; high byte followed by low byte.
Exceptions
Exception code 02 is returned if the registers requested are not defined. Note that the
protection set point registers are defined based upon the configuration in the controller.
STARTING
REGISTER
2 BYTES
SEE INPUT
REGISTER
MAP
REGISTER
COUNT
2 BYTES
NUMBER OF
REGISERS
ERROR
CHECK
2 BYTES
CRC-16
NOTE
1
2
3
4
5
Notes:
10
1.
Normal
Alarm
Open
Short
Fault
Fail
The controller software version is expressed as two unsigned integer bytes. The
high byte contains the major version number; the low byte contains the minor
version number.
RESPONSE FRAME
ADDRESS
FUNCTION
CODE
1 BYTE
1 BYTE
UNIT
4
NUMBER
BYTE COUNT
DATA
1 BYTE
SEE MAP
TABLE
VARIABLE
SEE MAP
TABLE
ERROR
CHECK
2 BYTES
CRC-16
The response message contains a variable length data field that is equal to the number of
registers requested multiplied by 2. The registers are ordered consecutively in the data
field as 2 byte values; high byte followed by low byte.
Exceptions
Exception code 02 is returned if the registers requested are not defined. Note that the
monitoring and control point registers are defined based upon the configuration in the
controller.
11
REGISTER
NUMBER
2 BYTES
SEE PRESET
REGISTER
MAP
REGISTER
DATA
2 BYTES
SEE
REGISTER
MAP NOTES
ERROR
CHECK
2 BYTES
CRC-16
NOTE
1
1
2
3
4
5
1
1
1
5
6
1
7
8
9
1
1
1
1
1
1
Notes:
1.
with a precision of 1 and units of PSI, then a register value of 1123 indicates
112.3 PSI.
2. Set the motor start register to 1 to start the compressor, 0 to stop the compressor.
3. Set the alarm acknowledge register to 1 to acknowledge and silence the alarm.
4. An unsigned integer in the range of 1 to 32.
5. An unsigned integer greater than or equal to 1 that expresses a time value in
seconds.
6. The auto start lockout is enumerated as follows:
0
Normal Automatic start and stop are enabled.
1
Bypass Disabled but will be re-enabled on successful start.
2
Locked Automatic start and stopped are disabled.
7. An unsigned integer greater than or equal to 1 that expresses a time value in
minutes.
8. The capacity control mode is enumerated as follows:
0
Automatic
1
Unload
2
Base Load
9. An unsigned integer in the range of 10 to 2000 (1.0% to 200.0%) with an implied
decimal place of 1. For example a register value of 1021 indicates a data value of
102.1%. Data outside of the valid range will be ignored.
RESPONSE FRAME
ADDRESS
FUNCTION
CODE
1 BYTE
1 BYTE
UNIT
06
NUMBER
REGISTER
NUMBER
1 BYTES
SAME AS
REQUEST
FRAME
REGISTER
DATA
2 BYTES
SAME AS
REQUEST
FRAME
ERROR
CHECK
2 BYTES
CRC-16
The response frame is the same as the request message; returned to indicate that the
specified holding register was set to the data value in the request message.
Exceptions
Exception code 02 is returned if the registers requested are not defined. Note that the
protection set point registers are defined based upon the configuration in the controller.
Exception code 03 is returned if the register data is out of range or invalid for the
specified holding register.
13
DIAGNOSTIC
CODE
2 BYTES
0000
DATA
VALUE
2 BYTES
TEST DATA
ERROR
CHECK
2 BYTES
CRC-16
RESPONSE FRAME
ADDRESS
FUNCTION
CODE
1 BYTE
1 BYTE
UNIT
08
NUMBER
DIAGNOSTIC
CODE
2 BYTES
0000
DATA
VALUE
2 BYTES
TEST DATA
ERROR
CHECK
2 BYTES
CRC-16
The response frame is identical to the request frame if the test is successful. Typically the
data value is checked in the response to confirm the same as the value sent. Successful
completion of this test confirms that the physical and protocol layers of the
communication system are functioning properly.
Exceptions
Exception code 01 is returned if a diagnostic code other than 0000 is specified in the
request frame.
14
15
MODBUS
FUNCTION
4
4
4
4
4
3, 6
3, 6
3
3
3
3, 6
3
3, 6
3
3
3
3
3
3
3, 6
3, 6
3, 6
3, 6
3, 6
3, 6
3
3
3
3
3, 6
3, 6
3, 6
3, 6
3, 6
3, 6
3, 6
3, 6
16
41600 + N
3, 6
17