beautypg.com

ProSoft Technology PLX31-EIP-SIE User Manual

Page 130

background image

MBS Protocol

PLX3x Series

User Manual

Ethernet and Serial Gateways

Page 130 of 218

ProSoft Technology, Inc.

September 17, 2014

Parameter

Value

Description

1234)
Word Swap (1) -The words are swapped (1234=3412)
Word and Byte Swap (2) - The words are swapped, then the bytes
in each word are swapped (1234=4321)
Byte Swap (3) - The bytes in each word are swapped (1234=2143)
These swap operations affect 4-byte (or 2-word) groups of data.
Therefore, data swapping using these Swap Codes should be done
only when using an even number of words, such as when 32-bit
integer or floating-point data is involved.

Node
Address

1 to 255 (0
is a
broadcast)

Specifies the node address of the Modbus slave device. Values of 1
to 255 are permitted.
Note: Most Modbus devices only accept addresses in the range of
1 to 247, so check with the slave device manufacturer to see if a
particular slave can use addresses 248 to 255.
If the value is set to zero, the command will be a broadcast
message on the network. The Modbus protocol permits broadcast
commands for write operations. Do not use node address 0 for read
operations.

Modbus
Function

1, 2, 3, 4, 5,
6, 15, or 16

Specifies the Modbus Function Code to be executed by the
command. These function codes are defined in the Modbus
protocol. (More information on the protocol is available from

www.modbus.org

.) The following function codes are supported by

the gateway.

1 - Read Coil Status
2 - Read Input Status
3 - Read Holding Registers
4 - Read Input Registers
5 - Force (Write) Single Coil
6 - Preset (Write) Single Register
15 - Force Multiple Coils
16 - Preset Multiple Registers

MB Address
in Device

Varies

Specifies the starting Modbus register or bit address in the server to
be used by the command. Refer to the documentation of each
Modbus server device for the register and bit address assignments
valid for that device.

The Modbus Function Code determines whether the address will be
a register-level or bit-level OFFSET address into a given data type
range. The offset will be the target data address in the server minus
the base address for that data type. Base addresses for the different
data types are:

00001 or 000001 (0x0001) for bit-level Coil data (Function
Codes 1, 5, and 15).

10001 or 100001 (1x0001) for bit-level Input Status data
(Function Code 2)

30001 or 300001 (3x0001) for Input Register data (Function
Code 4)

40001 or 400001 (4x0001) for Holding Register data (Function
Codes 3, 6, and 16).

Address calculation examples:
o

For bit-level Coil commands (FC 1, 5, or 15) to read or
write a Coil 0X address 00001, specify a value of 0 (00001
- 00001 = 0).