![Littelfuse SE-330 Скачать руководство пользователя страница 5](http://html1.mh-extra.com/html/littelfuse/se-330/se-330_manual_1928632005.webp)
Page 1
SE-330 Series (New Revision) Modbus/TCP Interface
Rev. 0-E-121117
1. G
ENERAL
This document describes the Modbus/TCP features
supported by the new revision SE-330, SE-330AU, and
SE-330HV.
Unless otherwise indicated, “
SE-330
”
refers
to all three monitor series in general. The Ethernet
network communications interface supports the Modbus-
RTU protocol over TCP/IP using an encapsulating
protocol called Modbus/TCP.
SE-330 ordering options 3, 4, 5, 6, 7 and 8 include dual
Ethernet ports with support for fiber-optic or RJ45
interfaces. See Figs. 1, 2, and 3.
2. M
ODBUS
P
ROTOCOL
The SE-330 implements the Modbus
®
TCP protocol on
port 502. The SE-330 is a server (slave) and can
communicate simultaneously with 5 clients (masters).
Modicon Modbus
®
is a registered trademark of
Schneider Electric.
All
Modbus/TCP
messages
are
essentially
Modbus-RTU
messages
encapsulated
with
a
Modbus/TCP header, both of which are encapsulated in a
TCP and an IP header. The TCP/IP-header and Modbus
RTU framing is beyond the scope of this document.
2.1 P
ROTOCOL
S
ETUP
The SE-330 can be configured using SE-MON330
(version 3.2 or higher). The IP address, subnet mask, and
gateway can all be set for each of the network ports.
For more information, see the SE-MON330 help file.
Note: Ensure that each port is configured with a
unique IP address even if not used.
2.2 E
RROR
C
HECKING
Modbus/TCP uses the TCP/IP checksum and error
correction techniques to ensure reliable communications.
If the checksum is correct but the internal data in the
message is not correct, the SE-330 will respond with an
exception code.
2.3 F
UNCTION
C
ODES
S
UPPORTED
The SE-330 Modbus Protocol supports the following
function codes:
•
Read Holding Registers (Function Code 3)
•
Read Input Registers (Function Code 4)
•
Write Single Register (Function Code 6)
•
Write Multiple Registers (Function Code 16)
•
Command Instruction (Function Code 5)
2.3.1 R
EAD
I
NPUT
/H
OLDING
R
EGISTERS
(C
ODE
4/3)
Function Codes 3 and 4 are used to read the register
attributes listed in Appendix A.
Function Codes 3 and 4 perform the same function in the
SE-330.
Registers in Modbus start at 40001 decimal and this
register address refers to register/attribute 0.
Note: For hexadecimal numbers, 0x precedes the
value.
2.3.2 W
RITE
S
INGLE
R
EGISTER
(C
ODE
6)
Function Code 6 writes a single 16-bit value to the
SE-330.
Provided no errors occurred, the slave (SE-330) will
return the original message to the master. The response
message is returned only after the
‘write’
has been
executed by the slave.
2.3.3 W
RITE
M
ULTIPLE
R
EGISTERS
(C
ODE
16)
Function Code 16 is used to write multiple registers to
the SE-330.
The slave will reply with the slave address, function
code, register address, and the quantity of registers
written.
2.3.4 C
OMMAND
I
NSTRUCTION
(C
ODE
5)
Modbus Function Code 5 (Force Single Coil) is used to
issue commands to the SE-330. The command code
actions and corresponding coil number are listed in
Table 1.
TABLE 1. S
UPPORTED
C
OMMANDS
C
OMMAND
C
ODE
C
OIL
N
UMBER
A
CTION
0x0001
0x0002
0x0005
0x0008
0x0010
2
3
6
9
17
Remote Trip
Clear Event Records
Set to Defaults
Remote Reset
Remote Calibration
Except for a broadcast address, the slave will return the
original packet to the master.
2.3.5 C
OMMAND
I
NSTRUCTIONS
U
SING
R
EGISTER
W
RITES
For PLCs not supporting Function Code 5, commands
can be issued using Write Single Register (Code 6) and
Write Multiple Register (Code 16).
Commands are written to SE-330 register 6 (Modbus
register 40007). Supported commands are listed in the
COMMAND CODE column in Table 1.
When using the Write Multiple Registers function
code, the write should be to the single SE-330
Register 6. If multiple registers are written starting at
SE-330 Register 6, the first data element will be
interpreted as the command code but no other registers
will be written. If the command is successful, the
SE-330 will return a valid response message.