Beruflich Dokumente
Kultur Dokumente
g
GE Industrial Systems
Note Modbus support is available for either simplex or triple modular redundant
(TMR) configurations of the Mark VI, but only in simplex mode for the EX2100,
LS2100, and Innovation Series controller. In the TMR configuration, commands are
replicated to multiple controllers so only one physical Modbus link is required.
Parity provides a mechanism to error check individual serial 8-bit data bytes. The
Modbus slave device supports none, even, and odd parity. The default parity is none.
Code (byte size) is the number of data bits in each serial character. The Modbus
slave device supports seven and eight bit data bytes. The default byte size is eight
bits.
RS-485 Network
The master and slave devices are both set up as DTE devices. Both the master and
slave devices are connected to the LD485A-MP with a straight through 9-wire cable.
The two LD485A-MPs are connected together with a 4-wire twisted-pair cable as
follows:
The masters TXA is connected to the slaves RXA.
The masters TXB is connected to the slaves RXB.
The masters RXA is connected to the slaves TXA.
The masters RXB is connected to the slaves TXB.
Note A suggested cable to use for connecting the two LD485A-MPs is Belden
low capacitance 2-twisted-pair 24 gauge cable catalog number 9842.
The recommended jumper settings for the LD485A-MP are shown in Table 2.
Note Jumper W9 is the only jumper different between the master and slave LD485A-MPs.
RS-485
RS-232C
Controller
GE Multilin
F485 Converter
Note:
Shield should be grounded at one place only.
A terminating network should be attached to the last
device in the link. The F485 has a built-in terminator
at the beginning of the link.
The F485 is configured through two internal DIP-switch banks that are accessible by
removing the box cover (see illustration below). Switches A1 A8 are used to set
the baud rate for RS-485 communication and determine whether the F485 is DTE
(RS-232C direct) or DCE (RS-232C modem). Switches B1 B6 select the interface
type. The designation for each switch is marked on the printed circuit board.
ON
Switches
B1 B8
ON
Switches
A1 A8
Mode DIP-switch
A8 Position
DTE Off
DCE On
Configuration B1 B2 B3 B4 B5 B6
RS-232C to Off On Off On Off Off
RS-485
RS-232C to Off Off Off Off On On
fiber-optic*
RS-485 to On Off On Off Off Off
fiber-optic*
*These switch settings are not used for Modbus to
controller configurations.
DTE/DCE Control
The DTE/DCE setting reverses the transmit/receive data lines on the RS-232C side.
For communications between a computer and a slave device, DTE (direct) should be
selected. When connecting the F485 to a modem or other data communication
equipment, DCE should be selected. Another application that requires DCE is when
two F485s are connected back-to-back, such as converting RS-232C to RS-485, and
then converting the RS-485 back to RS-232C. In this case, the second F485 must be
set to DCE control.
Ethernet Interface
The controller supports Ethernet Modbus as a standard slave interface. Ethernet
establishes high-speed communication between the various portions of the control
system. Ethernet Modbus protocol is layered on top of the TCP/IP stream sockets.
The controller follows the Open Modbus /TCP Specification as defined by Modicon
(Schneider Electric), for class 0 and class 1 commands. This document is available
on the www.modicon.com web site. The master sends commands to TCP port 502 on
the controller. Modbus commands can be sent to any of the Ethernet physical
connections on the controller as long as they use the dedicated TCP port.
Refer to the Ethernet installation guidelines in GEH-6421, Volume I, Chapter 5 for
details on how to connect Ethernet to the controller.
Note The toolbox user privilege level must be set to at least two to create an I/O
device. (From the Options menu, select Privelege, then select 2).
Once a controller has been created in the toolbox, Modbus interfaces can be inserted
in the Outline View in order to access the Modbus functionality available on certain
hardware forms.
2. From the Edit menu, select Insert First. Or, click the right-mouse button and
select Insert First. The New I/O or Network Interface dialog box displays.
Select Serial/Ethernet
Modbus, then click OK.
3. Click OK. The Modbus item displays under the Hardware and I/O
Definition in the Outline View.
Note It is possible to define two different register sets, one Serial and one Ethernet
by creating two Hardware and I/O Definition entries in the Outline View screen
and selecting one to be Serial and the other to be Ethernet.
Repeat these steps for each register page you want to create. Once a page is inserted,
Modbus points can be added.
Note Create pages with the same Address Type but with different register ranges
by assigning a higher First Address. For example, define a page of holding
registers in the range on 1 to 200 and another page in the range of 1001 to 1200. The
advantage of doing this is that a master would get an error if it tried to reference
holding registers between 201 and 1000.
Repeat these steps for all the Modbus points to populate the Modbus registers.
Float values are rounded prior to being stored in short or long points. Short and long
points are clamped to their minimum and maximum limit if the conversion exceeds
their range.
Data Scaling
Data scaling is used to convert the Modbus point into a signal that represents
engineering units. Multiple signals can share one scaling record. The following is a
signal scaling record example.
Note The range of the Modbus point is determined by the points data type and not
by the scaling record. Each integer data type has an implied range. The raw data
range in the scale dialog box is only used to compute the gain and offset of the point
when converting it to a signal.
Message Format
The Serial RTU transmission mode uses the following format (where follower
address, function code, CRC-16 MSB, CRC-16 LSB are all bytes):
Station ID (follower address) is a number from 1 to 255 that specifies the unit with
which to communicate.
Function code specifies the purpose and format of the remaining message portion.
The abbreviation CRC stands CRC-16 are two bytes that complete every serial Modbus message. These bytes
for Cycle Redundancy Check. check errors and are calculated to ensure that no transmission error occurred while
the message was in transit. The method for calculating the CRC-16 is a public
protocol. . Refer to the Gould Modicon Modbus Protocol Reference Guide for
information on calculating a correct CRC.
All the same functions are supported over Ethernet that are supported over the serial
ports. All Modbus messages are received on Ethernet port 502. The Ethernet
physical layer provides a CRC-32 checksum on all transmissions so the Modbus
CRC-16 is not included. Modbus over Ethernet adds the header below to the
message formats.
Message Errors
When a message is received that cannot be acted upon, it is either ignored and the
controller waits for the next message or an exception message responds.
Any messages that are misunderstood, incomplete or altered in some manner
(framing, parity, or CRC-16 error) are always ignored because it is not possible to
reliably determine for whom the message was intended. The master must detect this
timeout condition and resend the message as necessary.
Function Description
Code
01 Read output coils
02 Read input coils
03 Read holding registers
04 Read input registers
05 Force (write) single output coil
06 Preset (write) single holding register
07 Read exception status
15 Force (write) multiple output coils
16 Preset (write) multiple holding registers
Starting output coil number is a number two-bytes in length that may be any value
less than the highest output coil number available in the output coil table. The
starting output coil number is equal to one less than the number of the first output
coil returned in the normal response to this request. For example, to get the first
output coil (output coil number 1) enter 0 for the starting output coil number. The
high order byte of the starting output coil number field is sent as the first byte. The
low order byte is sent next.
Number of output coils to return is a number two-bytes in length that must be in
the range from 1 to 2000 inclusive. It specifies the number of output coils returned in
the normal response. The sum of the starting output coil value and the number of
output coils value must be less than or equal to the highest output coil number
available in the output coil table. The high order byte of the number of output coils
field is sent as the first byte. The low order byte is sent next.
Format of normal message reply from the controller is:
Byte count is a binary number from 1 to 250; the specified number of data bytes
follow.
Starting input coil number is two-bytes in length and may be any value less than
the highest input coil available in the input coil table. The starting input coil number
is equal to one less than the number of the first input coil returned in the normal
response to this request. For example, to get the first input coil (input coil number
one) enter zero for the starting input coil number. The high order byte of the starting
input coil field is sent as the first byte. The low order byte is sent next.
Number of input coils to return is two-bytes in length and must be in the range
from 1 to 2000 inclusive. It specifies the number of input coils returned in the normal
response. The sum of the starting input coil value and the number of input coils value
must be less than or equal to the highest input coil available in the input coil table.
The high order byte of the number of input coils field is sent as the first byte. The
low order byte is sent next.
Format of normal message reply from the controller is:
Byte count is a binary number from 1 to 250; the specified number of data bytes
follow.
Data bytes (data field) are the packed input coil status data. Each byte contains
eight input coil values. The LSB of the first byte contains the value of the input coil
whose number is equal to the starting input coil plus one. The value of the inputs are
ordered by number starting with the LSB of the first byte of the data field and ending
with the MSB of the last byte of the data field. If the number of the input coils is not
a multiple of eight, then the last data byte contains zeros in one to seven of its
highest order bits.
Byte count is an even binary number from 2 to 254, or zero. If the byte count is zero
(0), then the master assumes 256 data bytes follow. Otherwise, the specified number
of data bytes follow. The byte count specifies the total number of bytes in the
message following the byte count, not including the two CRC-16 bytes (serial
mode).
Holding registers are returned in the data field in order of number with the lowest
number holding register in the first two bytes and the highest number holding
register in the last two bytes of the data field. The number of the first holding register
in the data field is equal to the starting holding register number plus one. The high
order byte is sent before the low order byte of each holding register.
Number of input registers value is two-bytes in length and must be in the range
from 1 to 128 inclusive. It specifies the number of input registers returned in the
normal response. The sum of the starting input register value and the number of input
registers value must be less than or equal to the highest input register number
available in the input register table. The high order byte of the number of input
registers field is sent as the first byte. The low order byte is sent next.
Format of normal message reply from the controller is:
Output coil number is two-bytes in length and may be any value less than the
highest output coil number available in the output coil table. The output coil number
is equal to one less than the number of the output coil forced. For example, to change
the first output coil (output coil number one) enter zero for the output coil number.
The high order byte of the starting output coil number field is sent as the first byte.
The low order byte is sent next.
State byte is sent by the master with only two possible values. A zero (00h) is sent
to turn the specified output coil off (set false). A value of 255 (FFh) is sent to turn
the specified output coil on (set true). The state byte is always followed by a single
byte with value zero.
Format of normal message reply from the controller is identical to the received
message.
Holding register number is two-bytes in length and may be any value less than the
highest holding register number available in the holding register table. The holding
register number is equal to one less than the number of the holding register changed
by this request. For example, to change the first holding register (holding register
number one) enter zero for the holding register number. The high order byte of the
starting holding register number field is sent as the first byte. The low order byte is
sent next.
Function
Code (07)
Data bytes (data field) are the packed output coil status data. The data byte contains
eight output coil values. The LSB of the byte contains the value of the output coil
number one. The MSB contains the value of output coil number eight.
Starting coil number is two-bytes in length and may be any value less than the
highest output coil number available in the output coil table. The output coil number
is equal to one less than the number of the output coil forced. For example, to change
the first output coil (output coil number one) enter zero for the output coil number.
The high order byte of the starting output coil number field is sent as the first byte.
The low order byte is sent next.
Coil count is two-bytes in length. It specifies the number of output coils to set. The
sum of the starting output coil value and the number of output coils value must be
less than or equal to the highest output coil number in the output coil table. The high
order byte of the number of output coils field is sent as the first byte. The low order
byte is sent next.
Byte count is the number of data bytes to follow.
Start register number is two-bytes in length and may be any value less than the
highest holding register number available in the holding register table. The holding
register number is equal to one less than the number of the holding register changed
by this request. For example, to change the first holding register (holding register
number one) enter zero for the holding register number. The high order byte of the
starting holding register number field is sent as the first byte. The low order byte is
sent next.
Number of holding registers value is two-bytes in length. It specifies the number of
holding registers to set. The sum of the starting holding register value and the
number of holding registers value must be less than or equal to the highest holding
register number in the holding register table. The high order byte of the number of
holding registers field is sent as the first byte. The low order byte is sent next.
Byte count is the number of data bytes to follow.
Register data field is two-bytes for each holding register to set. The first byte in the
data field contains the high order byte of each preset value. The next byte contains
the low order byte.
Format of a normal message reply from the controller is:
Note The Modbus diagnostic utilities require the GE Control System Toolbox. For
complete details on diagnostic utilities using the toolbox, refer to the appropriate
toolbox documents listed in the section, Related Toolbox Documents.
2. Highlight the appropriate Modbus Errs entry and click OK. The Controller
Status Command Report displays.