PLX3x User Manual
PLX3x User Manual
PLX3x User Manual
USER MANUAL
How to Contact Us
ProSoft Technology
5201 Truxtun Ave., 3rd Floor
Bakersfield, CA 93309
+1 (661) 716-5100
+1 (661) 716-5101 (Fax)
www.prosoft-technology.com
[email protected]
Copyright 2014 ProSoft Technology, Inc., All rights reserved.
PLX3x Series Ethernet and Serial Gateways User Manual
September 17, 2014
ProSoft Technology , ProLinx , inRAx , ProTalk , and RadioLinx are Registered Trademarks of ProSoft
Technology, Inc. All other brand or product names are or may be trademarks of, and are used to identify products
and services of, their respective owners.
Adobe Acrobat Reader file format (.PDFs). These product documentation files may also be freely downloaded from
our web site: http://www.prosoft-technology.com/
This Equipment is Suitable For Use in Class I, Division 2, Groups A, B, C, D or Non-Hazardous Locations Only
WARNING Explosion Hazard Substitution of Any Components May Impair Suitability for Class I, Division 2
WARNING Explosion Hazard Do Not Disconnect Equipment Unless Power Has Been Switched Off Or The Area
is Known To Be Non-Hazardous
PLX3x Series
Ethernet and Serial Gateways
Contents
User Manual
Contents
Your Feedback Please ........................................................................................................................ 2
How to Contact Us .............................................................................................................................. 2
Start Here
1.1
1.2
1.3
1.4
1.5
1.6
9
System Requirements ............................................................................................... 9
Package Contents ................................................................................................... 10
Mounting the Gateway on a DIN-rail ....................................................................... 11
Jumper Settings ...................................................................................................... 12
SD Card ................................................................................................................... 12
Connecting Power to the PLX3x Gateway .............................................................. 13
15
Hardware Information
4.1
4.1.1
4.2
33
45
Hardware Specifications.......................................................................................... 46
Serial Port Specifications ........................................................................................ 47
Serial Port Cables (for Gateways with Serial Ports) ............................................... 48
Page 5 of 218
Contents
User Manual
PLX3x Series
Ethernet and Serial Gateways
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
EIP Protocol
5.1
5.1.1
5.2
5.2.1
5.2.2
5.2.3
5.3
5.3.1
5.3.2
5.3.3
5.4
5.4.1
5.4.2
5.4.3
5.4.4
MBTCP Protocol
6.1
6.1.1
6.1.2
6.2
6.2.1
6.2.2
6.2.3
6.3
6.3.1
6.3.2
6.3.3
6.4
6.4.1
7.1.1
7.1.2
7.1.3
7.2
7.2.1
7.2.2
7.3
7.3.1
7.3.2
7.3.3
Page 6 of 218
93
MBS Protocol
7.1
51
121
PLX3x Series
Ethernet and Serial Gateways
7.4
7.4.1
8.1.1
8.1.2
8.1.3
8.2
8.2.1
8.3
8.3.1
8.3.2
9.1.1
9.1.2
9.2
9.2.1
9.2.2
9.3
9.3.1
9.3.2
9.4
9.4.1
11
Index
193
165
PND Protocol
10.1
10.2
10.3
10.3.1
10.3.2
10.4
10.4.1
151
SIE Protocol
9.1
10
ASCII Protocol
8.1
Contents
User Manual
215
217
Page 7 of 218
Contents
User Manual
PLX3x Series
Ethernet and Serial Gateways
Page 8 of 218
PLX3x Series
Ethernet and Serial Gateways
Start Here
User Manual
Start Here
In This Chapter
1.1
SD Card ............................................................................................ 12
System Requirements
The ProSoft Configuration Builder configuration software for the gateway
requires the following minimum hardware and software components:
Pentium II 450 MHz minimum. Pentium III 733 MHz (or better)
recommended
128 Mbytes of RAM minimum, 256 Mbytes of RAM recommended
100 Mbytes of free hard disk space (or more based on application
requirements)
256-color VGA graphics adapter, 800 x 600 minimum resolution (True Color
1024 768 recommended)
DVD drive
Supported operating systems:
Microsoft Windows 7 (32 bit)
Microsoft Windows XP Professional with Service Pack 1 or 2
Page 9 of 218
Start Here
User Manual
1.2
PLX3x Series
Ethernet and Serial Gateways
Package Contents
The following components are included with your gateway, and are all required
for installation and configuration. The quantity of cables provided depends on the
specific protocol combination being used.
Important: Before beginning the installation, please verify that all of the following items are
present.
Gateway with Ethernet Port
Qty.
1
1
1
1
Part Name
Ethernet cable
Mini screwdriver
Power connector
ProSoft Solutions
DVD
Part Number
RL-CBL025
HRD250
J180
DVD-001
Part Description
5 straight-through cable
Tool for wiring and securing the power connector
PLX3x gateway power connector
Contains sample programs, utilities,
documentation and videos for the gateway
Part Name
Ethernet cable
Mini screwdriver
Power connector
ProSoft Solutions
DVD
Part Number
RL-CBL025
HRD250
J180
DVD-001
Part Description
5 straight-through cable
Tool for wiring and securing the power connector
PLX3x gateway power connector
Contains sample programs, utilities,
documentation and videos for the gateway
Qty.
1
1
1
1
1
1
Part Number
RL-CBL025
1454-9F
Part Description
5 straight-through cable
DB9 to screw terminal adapter
CABLE14
J180
HRD250
DVD-001
Part Name
Ethernet cable
DB9 to Screw
Terminal Adaptor
RJ45-DB9M Serial
Adapter Cable
Power Connector
Mini screwdriver
ProSoft Solutions
DVD
Page 10 of 218
Part Number
RL-CBL025
1454-9F
Part Description
5 straight-through cable
DB9 to screw terminal adapter
CABLE14
J180
HRD250
DVD-001
PLX3x Series
Ethernet and Serial Gateways
1.3
Start Here
User Manual
Page 11 of 218
Start Here
User Manual
1.4
PLX3x Series
Ethernet and Serial Gateways
Jumper Settings
There are three sets of jumper settings located on the back of the module.
1.5
MODE 1 - Development Mode Jumper: This is the top jumper, used for
firmware updates only. The two pins should NOT be jumpered during
normal operation.
SD Card
PLX3x products can be ordered with an optional SD card (Part Number SDI-1G).
In the event of a disaster, the SD card can be moved from one module to the
next and resume operation. Below is a list of how the module will act - with and
without an SD card.
Without an SD Card
Configuration data is downloaded to the internal memory of the module.
If a blank SD Card is inserted in to the module after the module has been
configured, the configuration data will not be transferred to the SD card.
The configuration data would need to be downloaded to the module while
the SD card is in place.
With an SD Card
Configuration data is downloaded to the SD Card
The configuration data is not transferred from the SD card to the internal
memory of the module. If the SD card is removed and power is cycled to
the module, the module will load the configuration data from the modules
memory. If there is no configuration data in the modules memory, it will
be restored to factory default.
Page 12 of 218
PLX3x Series
Ethernet and Serial Gateways
1.6
Start Here
User Manual
WARNING: Ensure that polarity is not reversed when applying power to the gateway. This will
cause damage to the gateways power supply.
Page 13 of 218
User Manual
Page 14 of 218
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
In This Chapter
Page 15 of 218
2.1
PLX3x Series
Ethernet and Serial Gateways
1
2
3
Insert the ProSoft Solutions DVD into the DVD drive of your PC. Wait for the
DVD menu to appear.
On the startup screen, navigate to your product by selecting the proper
PLATFORM and PRODUCT.
Select PROSOFT CONFIGURAITON BUILDER. Follow the instructions on
your screen to install the software on your PC.
Page 16 of 218
PLX3x Series
Ethernet and Serial Gateways
2.2
2.3
Page 17 of 218
PLX3x Series
Ethernet and Serial Gateways
Use the mouse to select DEFAULT MODULE in the tree view, and then click
the right mouse button to open a shortcut menu.
Page 18 of 218
PLX3x Series
Ethernet and Serial Gateways
On the shortcut menu, select CHOOSE MODULE TYPE. This action opens
the Choose Module Type dialog box.
In the Product Line Filter area of the dialog box, select the PLX30 radio
button.
In the STEP 1: Select Module Type drop-down list, select the model number
that matches your gateway, and then click OK to save your settings and
return to the PCB Main window.
Page 19 of 218
2.4
PLX3x Series
Ethernet and Serial Gateways
The Default Project and Default Location folders may be renamed in the tree
view. Select the object, and then click the right mouse button to open a shortcut
menu. From the shortcut menu, choose RENAME.
1
2
Page 20 of 218
PLX3x Series
Ethernet and Serial Gateways
2.5
Click the [+] sign next to the Gateway icon to expand gateway information.
Click the [+] sign next to any
icon to view gateway information and
configuration options.
3
4
Double-click any
icon to open an Edit dialog box.
To edit a parameter, select the parameter name in the left hand pane, then
edit its corresponding field in the right hand pane.
Note: Depending on the parameter, the editable field will accept typed input in the form of text or a
valid numerical value, or it will have a dropdown list with options to choose from.
Page 21 of 218
PLX3x Series
Ethernet and Serial Gateways
Double-clicking any
Page 22 of 218
PLX3x Series
Ethernet and Serial Gateways
Page 23 of 218
PLX3x Series
Ethernet and Serial Gateways
To edit the row, click the Edit Row button. This will open an Edit dialog box
where you can edit the row parameters.
8
9
Page 24 of 218
PLX3x Series
Ethernet and Serial Gateways
2.6
The Data Map section allows data to be copied between areas in the gateway's
internal database.
The Data Map is especially useful for copying protocol-specific error and status
data from the gateways upper memory registers (address 4000 and up) to the
user-accessible memory registers (addresses 0 to 3999). The error and status
data copied into the user memory area can then be accessed by a remote
device, such as an HMI or processor.
Information about upper memory addresses where the gateway places protocolspecific error and status data can be found in the Diagnostics section in the
appropriate protocol chapter of this manual:
EIP diagnostics (page 70)
MBTCP diagnostics (page 105)
MBS diagnostics (page 132)
ASCII diagnostics (page 163)
SIE diagnostics (page 181)
PND diagnostics (page 213)
The Data Map can also be used to condense widely dispersed data into one
contiguous data block, for simplified access.
A maximum of 100 registers per Data Map command can be copied, and a
maximum of 200 separate copy commands can be configured.
The byte and/or word order can be rearranged during the copy process. For
example, by rearranging byte or word order, floating-point values can be
converted to the correct format for a different protocol.
Page 25 of 218
PLX3x Series
Ethernet and Serial Gateways
The following table describes the parameters for configuring the Data Map.
Parameter
From Address
Value
0 to highest
Status Data
address
To Address
0 to 3999
Register Count
Swap Code
1 to 100
No Change
Word Swap
Word and Byte
Swap
Byte Swap
Delay Preset
Page 26 of 218
Description
This parameter specifies the beginning internal database
register address for the copy operation. This address can be
any valid address in the User Data Area or the Status Data
Area of the gateway.
This parameter specifies the beginning destination register
address for the copy operation. This address must always be
within the User Data registers area. A destination address
must be specified that will not overwrite data that has been
stored in memory by one of the communication protocols
running on the gateway.
This parameter specifies the number of registers to copy.
The order of the bytes in the registers may need to be
swapped during the copy process in order to change the
alignment of bytes between dissimilar protocols. This
parameter is helpful when dealing with floating-point or other
multi-register values, as there is no standard method of
storage of these data types in slave devices.
No change: No change is made in the byte ordering (1234 =
1234)
Word Swap: The words are swapped (1234=3412)
Word and Byte Swap: The words are swapped, then the
bytes in each word are swapped (1234=4321)
Byte Swap: The bytes in each word are swapped
(1234=2143)
This parameter sets an interval for each Data Map copy
operation. The value that is specified for the Delay Preset is
not a fixed amount of time. It is the number of firmware scans
that must transpire between copy operations.
PLX3x Series
Ethernet and Serial Gateways
2.7
Configuring an IP Address
Use this procedure to configure the Ethernet settings for your Gateway. You
must assign an IP address, subnet mask and gateway address. After you
complete this step, you can connect to the Gateway with an Ethernet cable.
Note: The PLX32 module contains two Ethernet ports. In this case, you would specify network
settings for the first Ethernet protocol on Enet P1 and another set of settings for the second
Ethernet Protocol on Enet P2.
Determine the network settings for your Gateway, with the help of your
network administrator if necessary. You will need the following information:
o IP address (fixed IP required) _____ . _____ . _____ . _____
o Subnet mask
_____ . _____ . _____ . _____
o Gateway address
_____ . _____ . _____ . _____
Note: The gateway address is optional, and is not required for networks that do not use a default
gateway.
Edit the values for my_ip, netmask (subnet mask) and gateway (default
gateway).
Page 27 of 218
PLX3x Series
Ethernet and Serial Gateways
Note: If you are using a PLX32 module, you must specify values for both ports. My_ip is used to
specify values for the first protocol. For example, if you are configuring a PLX32-EIP-PND, you
would specify the network values for the EIP protocol first. A second set of values are available for
the second protocol; in this case, PND.
When you are finished editing, click OK to save your changes and return to
the ProSoft Configuration Builder window.
Page 28 of 218
PLX3x Series
Ethernet and Serial Gateways
2.8
1
2
In the tree view in ProSoft Configuration Builder, click once to select the
gateway.
Right-click the Gateway icon to open a shortcut menu. From the shortcut
menu, choose DOWNLOAD FROM PC TO DEVICE.
Page 29 of 218
PLX3x Series
Ethernet and Serial Gateways
Enter the same IP address and network mask that you entered in the
Ethernet configuration of the gateway. Click OK. The gateway will reboot.
Close the ProSoft Discovery Service window to return to the Download dialog
box.
Click the DOWNLOAD button.
The gateway will perform a platform check to read and load its new settings.
When the platform check is complete, the status bar in the Download dialog
box will display the message Module Running.
6
7
Page 30 of 218
PLX3x Series
Ethernet and Serial Gateways
2.9
Select the Gateway icon, and then click the right mouse button to open a
shortcut menu.
On the shortcut menu, choose VIEW CONFIGURATION. This action opens
the View Configuration window.
In the View Configuration window, open the FILE menu, and choose PRINT.
This action opens the Print dialog box.
In the Print dialog box, choose the printer to use from the drop-down list,
select printing options, and then click OK.
Page 31 of 218
User Manual
Page 32 of 218
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
In This Chapter
Page 33 of 218
3.1
PLX3x Series
Ethernet and Serial Gateways
LED Indicators
Troubleshooting can be performed using several methods.
The first and quickest is to scan the LEDs on the gateway to determine the
existence and possibly the cause of a problem. The gateways LEDs provide
valuable information such as
The state of each port
System configuration errors
Application errors
Fault indications
FLT
(Fault)
State
Off
Solid Green
Off
Solid Red
CFG
(Configuration)
Off
Solid Amber
ERR
(Error)
Off
FlashingAmber
Solid Amber
NS
(Network
Status)
MS
(Module
Status)
Page 34 of 218
Off
Solid Red
Solid Green
Flashing Red
Flashing Green
Alternating Red
and Green Flash
Off
Solid Red
Solid Green
Flashing Red
Flashing Green
Alternating Red
and Green Flash
Description
Power is not connected to the power terminals or source is
insufficient to properly power the gateway (208 mA at 24 VDC is
required).
Power is connected to the power terminals.
Normal operation.
A critical error has occurred. Program executable has failed or
has been user-terminated and is no longer running. Press
theResetbutton or cycle power to clear the error.
Normal operation.
The unit is in configuration mode. Either a configuration error
exists, or the configuration file is currently being downloaded or
read. After power-up, the configuration is read, and the unit
implements the configuration values and initializes the hardware.
This occurs during power cycle or after the Reset button is
pressed.
Normal operation.
An error condition has been detected and is occurring on one of
the application ports. Check configuration and troubleshoot for
communication errors.
This error flag is cleared at the start of each command attempt
(Master/Client) or on each receipt of data (slave/adapter/server);
so, if this condition exists, it indicates a large number of errors are
occurring in the application (due to bad configuration) or on one or
more ports (network communication failures).
No power or noIP address
Duplicate IP address
Connected
Connection timeout
IP address obtained; no established connections
Self-test
No power
Major fault
Device operational
Minor fault
Standby
Self-test
PLX3x Series
Ethernet and Serial Gateways
State
Off
Solid Green
100 Mbit
Off
Flashing Amber
Description
No physical network connection is detected. No Ethernet
communication is possible. Check wiring and cables.
Physical network connection detected. This LED must be
ON solid for Ethernet communication to be possible
No activity on the port.
The Ethernet port is actively transmitting or receiving data.
State
Off
Flashing Green
Off
Flashing Amber
Description
No activity on the port.
The port is actively receiving data.
No activity on the port.
The port is actively transmitting data.
Page 35 of 218
3.2
PLX3x Series
Ethernet and Serial Gateways
Start PCB, and then select the gateway. Click the right mouse button to open
a shortcut menu.
Page 36 of 218
PLX3x Series
Ethernet and Serial Gateways
Click the Connect button. Verify that the Ethernet is connected properly
between your computers communication port and the gateway.
If you are still not able to establish a connection, contact ProSoft Technology
for assistance.
Page 37 of 218
PLX3x Series
Ethernet and Serial Gateways
Caution: Some of the commands available to you from this menu are designed for advanced
debugging and system testing only, and can cause the gateway to stop communicating with the
processor or with other devices, resulting in potential data loss or other communication failures.
Use these commands only if you fully understand their potential effects, or if you are specifically
directed to do so by ProSoft Technology Technical Support Engineers.
Page 38 of 218
PLX3x Series
Ethernet and Serial Gateways
Database
View
Submenu
Command
Version
Data Map
ASCII
Decimal
Hex
Float
Description
Displays the gateways current software version and other
important values. You may be asked to provide this information
when calling for technical support.
Displays the gateways Data Map configuration.
Displays the contents of the gateways database in ASCII
character format.*
Displays the contents of the gateways database in decimal
number format.*
Displays the contents of the gateways database in hexadecimal
number format.*
Displays the contents of the gateways database in floating-point
number format.*
* Use the scroll bar on the right edge of the window to navigate through the database. Each page
displays 100 words of data. The total number of pages available depends on your gateways
configuration.
Page 39 of 218
PLX3x Series
Ethernet and Serial Gateways
To view the log file created, click the View Log File button. The log file will
open as a text file, which can be renamed and saved to a different location.
To email the log file to ProSoft Technologys technical support team, click the
Email Log File button. (For this to work, Microsoft Outlook must be installed
on your PC.)
If you do multiple sequential captures, PCB will append data from a new
capture to the end of the previously captured data. If you want previous data
to be cleared from the log file each time you start a new capture, click the
Clear Data button.
Page 40 of 218
PLX3x Series
Ethernet and Serial Gateways
1
2
In the Data Analyzer Setup dialog box, specify the time tick interval, the serial
port number, and whether the data packet contents should be displayed in
hexadecimal number or ASCII character format. Click OK.
Note: The time tick is a symbol (_TT_) displayed on the Data Analyzer screen that allows you to
estimate time intervals during a Data Analyzer session. The time tick will print at the time interval
you specify in the Data Analyzer Setup dialog box. For example, if you select 10 mS Ticks, it will
print every 10 milliseconds.
Page 41 of 218
PLX3x Series
Ethernet and Serial Gateways
If you wish to capture the Data Analyzer session to a log file, click the Log
File button.
Click the Start Data Analyzer button to start the Data Analyzer. Click it again
to stop it.
7
8
9
For Modbus protocol users: To interpret the data packets, refer to the Modbus Protocol
Specification, which can be found in this manual (page 139) or at www.modbus.org.
Page 42 of 218
PLX3x Series
Ethernet and Serial Gateways
3.3
Description
Program Cycle Counter
Product Code (ASCII)
Product Revision (ASCII)
Operating System Revision (ASCII)
OS Run Number (ASCII)
Page 43 of 218
User Manual
Page 44 of 218
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
Hardware Information
User Manual
Hardware Information
In This Chapter
Page 45 of 218
Hardware Information
User Manual
4.1
PLX3x Series
Ethernet and Serial Gateways
Hardware Specifications
Specification
Power Supply
Current Load
Operating Temperature
Storage Temperature
Relative Humidity
Dimensions
(Height x Width x
Depth)
LED Indicators
(On all gateways)
Description
24 VDC nominal
10 VDC to 36 VDC allowed
Positive, Negative, GND Terminals
208mA normal @ 24 VDC normal
300 mA maximum @ 36 VDC maximum
-25C to 70C (-13F to 158F)
-40C to 80C (-40F to 176F)
5% to 95% RH with no condensation
Standard: 5.38 in x 1.99 in x 4.38 in
(13.67 cm x 5.05 cm x 11.13 cm)
Page 46 of 218
PLX3x Series
Ethernet and Serial Gateways
Hardware Information
User Manual
Type
Serial Port Isolation
Specifications
2500 Vrms port signal isolation per UL 1577
serial port communication signal uses RF(Radio
Frequency) modulation signal as isolation media, IC
chip model is Silicon Labs Si844x
(Si8440,Si8441,Si8442).
RS-485/422 port interface lines TVS diode protected
at +/- 27V standoff voltage.
RS-232 port interface lines fault protected to +/- 36V
power on, +/- 40V power off.
Page 47 of 218
Hardware Information
User Manual
4.2
PLX3x Series
Ethernet and Serial Gateways
Each physical serial port has a RJ45 jack connector. A six-inch RJ45 to DB9Male
adapter cable is provided for each serial port. The DB9Male adapter cable
provides connections for RS-232, wired as Data Terminal Equipment (DTE), RS422 and RS-485.
Page 48 of 218
PLX3x Series
Ethernet and Serial Gateways
Hardware Information
User Manual
Note: If the port is configured to use RTS/CTS handshaking, then a jumper is required between the
RTS and the CTS line on the gateway connection.
Page 49 of 218
Hardware Information
User Manual
PLX3x Series
Ethernet and Serial Gateways
NOTE: This type of connection is commonly called a RS-485 half-duplex, 2-wire connection. If you
have RS-485 4-wire, full-duplex devices, they can be connected to the gateway's serial ports by
wiring together the TxD+ and RxD+ from the two pins of the full-duplex device to Pin 1 on the
gateway and wiring together the TxD- and RxD- from the two pins of the full-duplex device to Pin 8
on the gateway. As an alternative, you could try setting the gateway to use the RS-422 interface
and connect the full-duplex device according to the RS-422 wiring diagram. For additional
assistance, please contact ProSoft Technical Support.
Page 50 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
EIP Protocol
In This Chapter
EIP Configuration.............................................................................. 54
Page 51 of 218
EIP Protocol
User Manual
5.1
PLX3x Series
Ethernet and Serial Gateways
Connection Type
I/O
Class 3
Connected Client
Unconnected Client
Server
Page 52 of 218
Number of Connections
Depends on the gateway model:
PLX31-EIP-MBTCP - 2 connections
PLX31-EIP-MBS - 2 connections
PLX31-EIP-MBS4 - 8 connections
PLX31-EIP-ASCII - 1 connection
PLX31-EIP-ASCII4 - 4 connections
PLX31-EIP-SIE 2 connections
2
1
5
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Connected Clients: 2
Unconnected Clients: 1
Support for 100 commands per Client, each configurable for
command type, IP address, register to/from addressing and
word/bit count.
User-configurable polling of commands, including disabled,
continuous and on change of data (write only).
Number of Commands (up to 100 per Client)
Min Command Delay
Response Timeout
Retry Count
Command Error Pointer
Page 53 of 218
EIP Protocol
User Manual
5.2
PLX3x Series
Ethernet and Serial Gateways
EIP Configuration
5.2.1 EIP Class 3 Server Connection
The EIP Class 3 Server Connection is used when the gateway is acting as a
server (slave) device responding to message instructions initiated from a Client
(Master) device such as an HMI, DCS, or PLC5.
Configuring EIP Class 3 Server Connections in PCB
The PLX3x Server connection file size is user selectable for 100 or 1000
integers. If a value of 100 is selected valid registers will be from N10:0 to N10:99.
If a value of 1000 is selected valid registers will be from N10:0 to N10:999.
Accessing the Gateways Internal Memory
Data Type
Tag Name
BOOL
Bit Array
SINT
INT
DINT
REAL
BOOLData[ ]
BITAData[ ]
SINTData[ ]
INT_Data[ ]
DINTData[ ]
REALData[ ]
The following tables define the relationship of the gateways internal database to
the addresses required in the MSG instructions:
MSG Instruction Type - CIP
Database
Address
0
CIP Integer
CIP Boolean
CIP Byte
CIP DINT
CIP Real
Int_data[0]
BoolData[0]
BitAData[0]
SIntData[0]
DIntData[0]
RealData[0]
999
Int_data[999]
BoolData[15984]
1000
Int_data[1000]
BoolData[16000]
DIntData[500]
RealData[500]
1999
Int_data[1999]
BoolData[31984]
2000
Int_data[2000]
BoolData[32000]
DIntData[1000]
RealData[1000]
2999
Int_data[2999]
BoolData[47984]
3000
Int_data[3000]
BoolData[48000]
DIntData[1500]
RealData[1500]
3999
Int_data[3999]
Page 54 of 218
BoolData[63999]
SIntData[1998]
BitAData[500]
SIntData[2000]
SIntData[3998]
BitAData[1000]
SIntData[4000]
SIntData[5998]
BitAData[1500]
SIntData[6000]
SIntData[9998]
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Database Address
0
999
1000
1999
2000
Function
N/A
N/A
N/A
N/A
N/A
Definition
Protected Write
Unprotected Read
Protected Bit Write
Unprotected Bit Write
Unprotected Write
Supported in Server
X
X
X
X
X
Function
0x00
0x01
0x0F
0x0F
0x0F
0x0F
0x0F
0x26
0x00
0x01
0x26
Definition
Word Range Write (Binary Address)
Word Range Read (Binary Address)
Typed Range Read (Binary Address)
Supported in Server
X
X
X
X
X
Function
0xA1
0x0F
0xA2
0x0F
0xA9
0x0F
0xAA
0x0F
0xAB
Supported in Server
Definition
X
Protected Typed Logical Read With Two
Address Fields
X
Protected Typed Logical Read With Three
Address Fields
X
Protected Typed Logical Write With Two
Address Fields
X
Protected Typed Logical Write With Three
Address Fields
Protected Typed Logical Write With Mask (Three Address Fields)
Page 55 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Page 56 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
4. Next add a New Module under the Generic EtherNet Bridge and add a
CIP-Connection. Here the parameters for the I/O connection are
specified. The input and output sizes need to match the input and output
sizes configured in PCB. The Address field value represents the
connection number in PCB. By default all of the connections have 248
Input words, 248 Output words, and 0 Configuration words. The Comm
format should be set to Data type INT, and the Assembly instances
should be "1" for input, "2" for output, and "4" for configuration.
5. A CIP Connection will need to be added and configured for each I/O
connection.
Configuring EIP Class 1 Connections in PCB
There are four configurable parameters for each I/O connection in PCB.
Parameter
Value Range
Description
Input Data
Address
0-3999
Input Size
0-248
Output Data
Address
0-3999
Output Size
0-248
Page 57 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Minimum
Command
Delay
0 to 65535
milliseconds
Response
Timeout
0 to 65535
milliseconds
Retry Count
0 to 10
Page 58 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Page 59 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Enable
Enable
Disable
Conditional Write
Internal
Address
0 to 3999
Poll Interval
0-65535
Reg Count
Swap Code
None
Word swap
Word and Byte
swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
501
509
File Type
Binary
Counter
Timer
Control
Integer
Float
ASCII
String
Status
File Number
-1
Page 60 of 218
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
EIP Protocol
User Manual
Description
file will be used.
Element
Number
Comment
Page 61 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Enable
Enable
Disable
Conditional Write
Internal Address
0 to 3999
Poll Interval
0 to 65535
Reg Count
Swap Code
None
Word swap
Word and Byte
swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
502
510
511
Page 62 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Parameter
Value
Description
File Type
Binary
Counter
Timer
Control
Integer
Float
ASCII
String
Status
File Number
-1
Element
Number
Sub Element
Comment
Page 63 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Enable
Enable
Disable
Conditional Write
Internal Address
0 to 3999
Poll Interval
0 to 65535
Reg Count
Swap Code
None
Word swap
Word and Byte
swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
100
101
102
File Type
Binary
Counter
Timer
Control
Integer
Float
ASCII
String
Status
-1
File Number
Page 64 of 218
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
EIP Protocol
User Manual
Description
the command. If a value of -1 is entered for the
parameter, the field will not be used in the command,
and the default file will be used.
Element
Number
Sub Element
Comment
Page 65 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Enable
Enable
Disable
Conditional Write
Internal Address
0 to 3999
Poll Interval
0 to 65535
Reg Count
Swap Code
None
Word swap
Word and Byte
swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
150
151
152
File Type
Binary
Counter
Timer
Control
Integer
Float
ASCII
String
Status
File String
Page 66 of 218
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
EIP Protocol
User Manual
Description
N10:300
Comment
Page 67 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Enable
Enable
Disable
Conditional Write
Internal Address
0 to 3999
Poll Interval
0 to 65535
Reg Count
Swap Code
None
Word swap
Word and Byte
swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
332
333
Data Type
Bool
SINT
INT
DINT
REAL
DWORD
Tag Name
Page 68 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Value
Description
Enable
Enable
Disable
Conditional Write
Internal
Address
0 to 3999
Poll Interval
0-65535
Reg Count
Swap Code
None
Word swap
Word and Byte swap
Byte swap
IP Address
xxx.xxx.xxx.xxx
Slot
-1
Func Code
1
2
3
4
5
Word Address
Comment
Page 69 of 218
EIP Protocol
User Manual
5.3
PLX3x Series
Ethernet and Serial Gateways
EIP Diagnostics
5.3.1 PCB Diagnostics Menu
The best way to troubleshoot the EIP driver is to use ProSoft Configuration
Builder to access the diagnostic capabilities of the gateway through the Ethernet
debug port. For instructions on how to access Diagnostics, see Using
Diagnostics in ProSoft Configuration Builder (page 36).
The following table summarizes the status information available in PCB for the
EIP driver.
Connection Type
EIP Class 1
Submenu Item
Config
Status
Config
Comm Status
EIP Class 3
Client/UClient [x]
Config
Comm Status
Commands
Cmd Errors
(Decimal)
Cmd Errors
(Hex)
Description
Configuration settings for Class 1 Connections.
Status of the Class 1 Connections: Displays any
configuration error present, as well as the number of
Class 1 Connections.
Configuration settings for Class 3 Server Connections.
Status information for each Class 3 Server Connection:
Displays port numbers, IP addresses, socket status, and
read and write counts.
Configuration settings for Class 3 Client/UClient
Connections.
Status information for Class 3 Client/UClient [x]
commands. Displays a summary of all the errors
resulting from Class 3 Client/UClient [x] commands.
Configuration for the Class 3 Client/UClient [x] command
list.
Displays current error codes for each command on the
Class 3 Client/UClient [x] command list in decimal
number format. A zero means there is currently no error
for the command.
Displays current error codes for each command on the
Class 3 Client/UClient [x] command list in hexadecimal
number format. A zero means there is currently no error
for the command.
Page 70 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Address Range
7900 through 7909
8100 through 8109
12800 through 12809
The content of each Clients status data area is structured the same. The
following table describes the content of each register in the status data area.
Offset
0
1
2
3
4
5
6
7
8
9
Description
Number of Command Requests
Number of Command Responses
Number of Command Errors
Number of Requests
Number of Responses
Number of Errors Sent
Number of Errors Received
Reserved
Current Error Code
Last Error Code
Address Range
7910 through 8009
8110 through 8209
12810 through 12909
The first word in each Clients command list error data area contains the
status/error code for the first command in the Clients command list. Each
successive word in the command error list is associated with the next command
in the list. Therefore, the size of the command list error data area depends on the
number of commands defined.
Page 71 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
The structure of the command list error data area (which is the same for all
Clients) is displayed in the following table.
Offset
0
1
2
3
4
.
.
.
97
98
99
Description
Command #1 Error Code
Command #2 Error Code
Command #3 Error Code
Command #4 Error Code
Command #5 Error Code
.
.
.
Command #98 Error Code
Command #99 Error Code
Command #100 Error Code
A non-zero error code indicates an error. To interpret the status/error codes, refer
to EIP Error Codes (page 73).
EIP Server Status Data
The following table lists the addresses in upper memory that hold status data for
each EIP server.
EIP Server
0
1
2
3
4
Address Range
8900 through 8915
8916 through 8931
8932 through 8947
8948 through 8963
8964 through 8979
The content of each servers status data area is structured the same. The
following table describes the content of each register in the status data area.
Offset
0 through 1
2 through 3
4 through 5
6 through 7
8 through 15
Page 72 of 218
Description
Connection State
Open Connection Count
Socket Read Count
Socket Write Count
Peer IP
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Note: The gateway specific error codes (not EtherNet/IP/PCCC compliant) are returned from within
the gateway and never returned from an attached EtherNet/IP/PCCC slave device. These are error
codes that are part of the EtherNet/IP/PCCC protocol or are extended codes unique to this
gateway. The most common errors for the EtherNet/IP/PCCC protocol are shown in the following
tables:
Code (Hex)
0x0000
0x0100
0x0200
0x0300
0x0400
0x0500
0x0600
0x0700
0x0800
Description
Success, no error
DST node is out of buffer space
Cannot guarantee delivery (Link Layer)
Duplicate token holder detected
Local port is disconnected
Application layer timed out waiting for response
Duplicate node detected
Station is offline
Hardware fault
Page 73 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Code (Hex)
0x0000
0x1000
0x2000
0x3000
0x4000
0x5000
0x6000
0x7000
0x8000
0x9000
0xA000
0xB000
0xC000
0xD000
0xE000
0xF0nn
Description
Success, no error
Illegal command or format
Host has a problem and will not communicate
Remote node host is missing, disconnected or shut down
Host could not complete function due to hardware fault
Addressing problem or memory protect rungs
Function not allowed due to command protection selection
Processor is in Program mode
Compatibility mode file missing or communication zone problem
Remote node cannot buffer command
Wait ACK (1775-KA buffer full)
Remote node problem due to download
Wait ACK (1775-KA buffer full)
Not used
Not used
Error code in the EXT STS byte (nn contains EXT error code)
Page 74 of 218
Code (Hex)
0xF000
0xF001
0xF002
0xF003
0xF004
0xF005
0xF006
0xF007
0xF008
0xF009
0xF00A
0xF00B
0xF00C
0xF00D
0xF00E
0xF00F
0xF010
0xF011
0xF012
0xF013
0xF014
0xF015
0xF016
0xF017
0xF018
0xF019
Description
Not used
A field has an illegal value
Less levels specified in address than minimum for any address
More levels specified in address than system supports
Symbol not found
Symbol is of improper format
Address does not point to something usable
File is wrong size
Cannot complete request
Data or file is too large
Transaction size plus word address is too large
Access denied, improper privilege
Condition cannot be generated - resource is not available
Condition already exists - resource is already available
Command cannot be executed
Histogram overflow
No access
Illegal data type
Invalid parameter or invalid data
Address reference exists to deleted area
Command execution failure for unknown reason
Data conversion error
Scanner not able to communicate with 1771 rack adapter
Type mismatch
1171 Gateway response was not valid
Duplicate label
PLX3x Series
Ethernet and Serial Gateways
Code (Int)
-4070
-4069
-4068
-4067
-4066
-4065
Code (Hex)
0xF01A
0xF01B
0xF01C
0xF01D
0xF01E
0xF01F
EIP Protocol
User Manual
Description
File is open; another node owns it
Another node is the program owner
Reserved
Reserved
Data table element protection violation
Temporary internal problem
Code (Hex)
0xFFFF
0xFFFE
0xFFF6
0xFFF5
0xFFF4
0xFFEC
0xFFEB
0xFF38
Description
CTS modem control line not set before transmit
Timeout while transmitting message
Timeout waiting for DLE-ACK after request
Timeout waiting for response after request
Reply data does not match requested byte count
DLE-NAK received after request
DLE-NAK sent after response
DLE-NAK received after request
Error (Hex)
0xFFDF
0xFFDE
0xFFDD
0xFFDC
0xFFDB
Description
Failed to connect to target
Failed to register session with target (timeout)
Failed forward open response timeout
PCCC/Tag command response timeout
No TCP/IP connection error
Error (Hex)
0xFFD8
0xFFD7
0xFFD6
0xFFD5
0xFFD4
0xFFD3
0xFFD2
0xFFD1
0xFFD0
0xFFCF
Description
Invalid response length
CPF item count not correct
CPF address field error
CPF packet tag invalid
CPF bad command code
CPF status error reported
CPF incorrect connection ID value returned
Context field not matched
Incorrect session handle returned
CPF not correct message number
Page 75 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Error (Hex)
0xFFCE
0xFFCD
0xFFCC
Description
Message length received not valid
Status error reported
Invalid version
Error (Hex)
0xFFC9
0xFFC8
Description
Message length received not valid
Status error reported
Error (Hex)
0xFFC3
0xFFC2
0xFFC1
0xFFC0
Description
Message length received not valid
Status error reported
CPF bad command code
TNS in PCCC message not matched
0xFFBF
-66
0xFFBE
Page 76 of 218
PLX3x Series
Ethernet and Serial Gateways
5.4
EIP Protocol
User Manual
EIP Reference
5.4.1 SLC and MicroLogix Specifics
Messaging from a SLC 5/05
The gateway can be used to receive messages from a SLC 5/05 containing an
Ethernet interface. The gateway supports both read and write commands. A
discussion of each operation is provided in the following topics.
SLC5/05 Write Commands
Write commands transfer data from the SLC processor to the gateway. An
example rung used to execute a write command is shown in the following
diagram:
Page 77 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
The TARGET DEVICE DATA TABLE ADDRESS must be set to a valid file
element (such as, N11:0) for SLC and PLC5 messages. The MULTIHOP option
must be set to YES. The MULTIHOP tab portion of the dialog box must be
completed as displayed in the following window:
Set the IP address value to the gateways Ethernet IP address. The "Insert" key
must be pressed to add the second line for ControlLogix Backplane and set the
slot number to zero.
SLC5/05 Read Commands
Read commands transfer data to the SLC processor from the gateway. An
example rung used to execute a read command is shown in the following
diagram:
Page 78 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
The TARGET DEVICE DATA TABLE ADDRESS must be set to a valid file
element (such as, N11:0) for SLC and PLC5 messages. The MULTIHOP option
must be set to YES.
Fill in the MULTIHOP tab portion of the dialog box as shown in the following
illustration.
Set the IP address value to the gateways Ethernet IP address. The "Insert" key
must be pressed to add the second line for ControlLogix Backplane and set the
slot number to zero.
Page 79 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Description
Status
Bit
Timer
Counter
Control
Integer
Floating-point
String
ASCII
The File Type Command Code is the ASCII character code value of the File Type
letter. This is the value to enter into the "File Type" parameter of the PCCC
Command configurations in the data tables in the ladder logic.
Additionally, the SLC specific functions (502, 510 and 511) support a subelement field. This field selects a sub-element field in a complex data table. For
example, to obtain the current accumulated value for a counter or timer, the subelement field should be set to 2.
Page 80 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
In order to complete the configuration of the MSG instruction, select the SETUP
SCREEN area of the MSG object. This displays the following dialog box.
Page 81 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
The MULTIHOP option must be set to YES. The MULTIHOP tab portion of the
dialog box must be completed as shown in the following window:
Set the IP address value to the gateways Ethernet IP address. The "Insert" key
must be pressed to add the second line for ControlLogix Backplane and set the
slot number to zero.
PLC5 Read Commands
Read commands transfer data to the PLC5 processor from the gateway. An
example rung used to execute a read command is shown in the following
diagram:
In order to complete the configuration of the MSG instruction, select the SETUP
SCREEN area of the MSG object. This displays the following dialog box.
Page 82 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Set the IP address value to the gateways Ethernet IP address. The "Insert" key
must be pressed to add the second line for ControlLogix Backplane and set the
slot number to zero.
Page 83 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Description
Control
Preset
Accumulated
Control
Code
0
1
2
Description
Control
Length
Position
PD*
Description
Code
Control
0
SP
2
Kp
4
Ki
6
Kd
8
PV
26
*All PD values are floating point values, so they are two words long.
BT
Code
0
1
2
3
4
5
Description
Control
RLEN
DLEN
Data file #
Element #
Rack/Grp/Slot
MG
Code
0
1
2
3
Page 84 of 218
Description
Control
Error
RLEN
DLEN
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Page 85 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Complete the dialog box for the data area to be transferred. For PLC5 and SLC
messages, the DESTINATION ELEMENT should be an element in a data file
(such as, N10:0). For the PLC2 Unprotected Write message, the DESTINATION
ELEMENT is the address in the gateways internal database and cannot be set
to a value less than ten. This is not a limitation of the gateway but of the RSLogix
software. For a PLC2 unprotected write or read function, the database address
should be entered in octal format. The COMMUNICATION information must also
be configured. The following is an example of the dialog box.
Page 86 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Page 87 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Complete the dialog box for the data area to be transferred. For PLC5 and SLC
messages, the SOURCE ELEMENT should be an element in a data file (such as,
N10:0). For the PLC2 Unprotected Read message, the SOURCE ELEMENT is
the address in the gateways internal database and cannot be set to value less
than ten. This is not a limitation of the gateway but of the RSLogix software. The
COMMUNICATION information must also be configured. An example of the
dialog box follows:
Page 88 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Complete the dialog box for the data area to be transferred. CIP Data Table
messages require a tag database element for both the source and destination.
The SOURCE TAG is a tag defined in the Controller Tag database. The
DESTINATION ELEMENT is the tag element in the gateway.
The gateway simulates a tag database as an array of elements defined by the
maximum register size for the gateway (user configuration parameter "Maximum
Register" in the [Gateway] section) with the tag name INT_DATA.
Page 89 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
In the previous example, the first element in the database is the starting location
for the write operation of ten elements. The COMMUNICATION information must
also be configured. An example of the dialog box follows:
Page 90 of 218
PLX3x Series
Ethernet and Serial Gateways
EIP Protocol
User Manual
Complete the dialog box for the data area to be transferred. CIP Data Table
messages require a tag database element for both the source and destination.
The DESTINATION TAG is a tag defined in the Controller Tag database. The
SOURCE ELEMENT is the tag element in the EIP gateway. The gateway
simulates a tag database as an array of elements defined by the maximum
register size for the gateway (user configuration parameter "Maximum Register"
in the [Gateway] section) with the tag name INT_DATA. In the example above,
the first element in the database is the starting location for the read operation of
ten elements. Additionally, the COMMUNICATION information must also be
configured. An example of the dialog box follows:
Page 91 of 218
EIP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
3
Poll
Interval
Time
4
Count
9
10
11
Function Parameters
12
Page 92 of 218
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
MBTCP Protocol
In This Chapter
Page 93 of 218
MBTCP Protocol
User Manual
6.1
PLX3x Series
Ethernet and Serial Gateways
Page 94 of 218
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
Configurable
Parameters:
(Client and Server)
Configurable
Parameters:
(Client Only)
Command List
Status Data
Page 95 of 218
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Page 96 of 218
PLX3x Series
Ethernet and Serial Gateways
Database Address
0
1000
2000
3000
3999
MBTCP Protocol
User Manual
Modbus Address
40001
41001
42001
43001
44000
The following virtual addresses are not part of the normal gateway user database
and are not valid addresses for standard data. However, these addresses may
be used for incoming commands that are requesting floating-point data.
To use addresses in this upper range requires the following
Set the Float Flag in the MBTCP server configuration to Yes
Set the Float Start to a database address in the range below
Set the Float Offset to a database address in the gateway user memory
area shown above.
Remember that, once this is done, all data above the Float Start address must be
floating-point data.
Database Address
4000
5000
6000
7000
8000
9000
9999
Modbus Address
44001
45001
46001
47001
48001
49001
50000
The MBTCP gateway must be correctly configured and connected to the network
before any attempt is made to use it. Use a network verification program, such as
ProSoft Discovery Service or the command prompt PING instruction, to verify
that the gateway can be seen on the network. Use ProSoft Configuration Builder
to confirm proper configuration of the gateway and to transfer the configuration
files to and from the gateway.
Modbus Message Routing: Port 2001
When Modbus messages are sent to the Gateway over the TCP/IP connection to
port 2001, the messages are sent (routed in the Gateway) directly out the serial
communication port (Port 0, if it is configured as a Modbus Master. The
commands (whether a read or a write command) are immediately routed to the
slave devices on the serial port. Response messages from the slave devices are
routed to the TCP/IP network to be received by the originating host.
Page 97 of 218
MBTCP Protocol
User Manual
6.2
PLX3x Series
Ethernet and Serial Gateways
MBTCP Configuration
6.2.1 MBTCP Servers
This section contains database offset information used by the server when
accessed by external Clients. These offsets can be utilized to segment the
database by data type.
Parameter
Value
Description
Float Flag
YES or NO
Float Start
0 to 65535
Float Offset
0 to 3999
Output
Offset
0 to 3999
Page 98 of 218
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
MBTCP Protocol
User Manual
Description
Code 1 command is received requesting Coil address 0 (virtual
Modbus Coil address 00001 or 000001), the data returned in the
response will be the value at register 50, bit 0 in the gateway's
database.
Bit Input
Offset
0 to 3999
Holding
Register
Offset
0 to 3999
Word Input
Offset
0 to 3999
Connection
Timeout
0 to 1200
seconds
This parameter specifies the number of seconds the server will wait
to receive new data. If the server does not receive any new data
during this time, it will close the connection.
Page 99 of 218
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
Description
Minimum
Command
Delay
0 to 32767
Response
Timeout
0 to 65535
milliseconds
Retry Count
0 to 10
Float Flag
YES or NO
Float Start
0 to 32767
Float Offset
0 TO 3998
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
MBTCP Protocol
User Manual
Description
only if the Float Flag is set to YES.
For example, if the Float Offset value is set to 3000 and the
Float Start parameter is set to 7000, the data returned as
floating-point data for register 47001 (or 407001) will actually
come from internal gateway registers 3000 and 3001. If the
requested address was 47002 (407002), the data will be
returned from internal registers 3002 and 3003. If the requested
address was 47101 (407101), the data will be returned from
internal registers 3200 and 3201; and so on.
ARP Timeout
1 to 60
Command
Error Delay
0 to 300
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
In order to interface the PLX3x gateway with Modbus TCP/IP server devices, a
command list must be constructed. The commands in the list specify the server
device to be addressed, the function to be performed (read or write), the data
area in the device to interface with and the registers in the internal database to
be associated with the device data. The Client command list supports up to 16
commands per Client. The command list is processed from top (command #0) to
bottom.
The following table describes the command list configuration parameters.
Parameter
Value
Description
Enable
YES
NO
CONDITONAL
Internal
Address
0 to 3999 (for
register-level
addressing)
or
0 to 63999(for
bit-level
addressing)
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
MBTCP Protocol
User Manual
Description
interpreted as a bit-level address.
For Modbus functions 3, 4, 6, and 16, this parameter is
interpreted as a register-level address.
Poll Interval
0 to 65535
Reg Count
1 to 125 (for
registers)
or
1 to 800 (for
coils)
Swap Code
No Change
Word Swap
Word and Byte
Swap
Byte Swap
Node IP
Address
xxx.xxx.xxx.xxx
Serv Port
502 or other
supported port
on server
Slave
Address
1 to 255 (0 is a
broadcast)
Modbus
1, 2, 3, 4, 5, 6,
15, or 16
MBTCP Protocol
User Manual
Parameter
PLX3x Series
Ethernet and Serial Gateways
Value
Function
MB Address
in Device
Description
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
Varies
PLX3x Series
Ethernet and Serial Gateways
6.3
MBTCP Protocol
User Manual
MBTCP Diagnostics
6.3.1 PCB Diagnostics
The best way to troubleshoot the MBTCP driver is to use ProSoft Configuration
Builder to access the diagnostic capabilities of the gateway through the Ethernet
debug port. For instructions on how to access Diagnostics, see Using
Diagnostics in ProSoft Configuration Builder (page 36).
Address Range
6200 through 6209
6210 through 6219
6220 through 6229
The content of each server ports status data area is structured the same. The
following table describes the content of each register in the status data area.
Offset
0
1
2
3
4
5
6
7
8
9
Description
Number of Command Requests
Number of Command Responses
Number of Command Errors
Number of Requests
Number of Responses
Number of Errors Sent
Number of Errors Received
Configuration Error Word
Current Error Code
Last Error Code
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Address Range
8
9
The content of each Clients status data area is structured the same. The
following table describes the content of each register in the status data area.
Offset
0
1
2
3
4
5
6
7
8
9
Description
Command Request Count (total Client commands sent)
Command Response Count (total command responses received)
Command Error Count
Number of Request Packets
Number of Response Packets
Errors Sent
Errors Received
Reserved
Current Error
Last Error
Offsets 8 and 9 contain information about the most recent communication errors.
The Current Error (offset 8) will have a non-zero value if the currently executing
Client command experiences an error.
The Last Error (offset 9) will store the most recent non-zero value error code that
was reported by the Client the last time it experienced an error. Note that this
value is retentive. This register will hold the last error value until the memory is
cleared by a restart, reset, cold-boot, or warm-boot operation. Therefore, any
value you see here may indicate an error that could have occurred at any time
since the gateway was last restarted and may not indicate a current or recent
error. For details on error codes, see MBTCP Client Command List Error Data
(page 108).
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
Address Range
8
9
The first word in each Clients command list error data area contains the
status/error code for the first command in the Clients Command List. Each
successive word in the Command Error List is associated with the next command
in the Client Command List. Therefore, the number of valid error values is
dependent upon the number of commands defined.
The structure of the command list error data area (which is the same for all
Clients) is displayed in the following table.
Offset
0
1
2
3
4
.
Description
Command #1 Error Code
Command #2 Error Code
Command #3 Error Code
Command #4 Error Code
Command #5 Error Code
.
13
14
15
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Description
Illegal function
Illegal data address
Illegal data value
Failure in associated device
Acknowledge
Busy; message was rejected
Description
Failed to connect to server specified in command
Wrong message length in the response
MBTCP command response timeout (same as -11)
TCP/IP connection ended before session finished
Description
Too few parameters
Invalid enable code
Internal address > maximum address
Invalid node address (<0 or >255)
Count parameter set to 0
Invalid function code
Invalid swap code
Description
Timeout while transmitting message
Timeout waiting for response after request (same as -36)
Incorrect slave/server address in response
Incorrect function code in response
Invalid CRC/LRC value in response
PLX3x Series
Ethernet and Serial Gateways
6.4
MBTCP Protocol
User Manual
MBTCP Reference
6.4.1 Modbus Protocol Specification
Read Coil Status (Function Code 01)
Query
This function allows the user to obtain the ON/OFF status of logic coils used to
control discrete outputs from the addressed server only. Broadcast mode is not
supported with this function code. In addition to the server address and function
fields, the message requires that the information field contain the initial coil
address to be read (Starting Address) and the number of locations that will be
interrogated to obtain status data.
The addressing allows up to 2000 coils to be obtained at each request; however,
the specific server device may have restrictions that lower the maximum quantity.
The coils are numbered from zero; (coil number 1 = zero, coil number 2 = one,
coil number 3 = two, and so on).
The following table is a sample read output status request to read coils 0020 to
0056 from server device number 11.
Adr
11
Func
01
Data Start Pt Hi
00
Data Start Pt Lo
13
Response
An example response to Read Coil Status is as shown in Figure C2. The data is
packed one bit for each coil. The response includes the server address, function
code, quantity of data characters, the data characters, and error checking. Data
will be packed with one bit for each coil (1 = ON, 0 = OFF). The low order bit of
the first character contains the addressed coil, and the remainder follows. For coil
quantities that are not even multiples of eight, the last characters will be filled in
with zeros at high order end. The quantity of data characters is always specified
as quantity of RTU characters, that is, the number is the same whether RTU or
ASCII is used.
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Because the server interface device is serviced at the end of a controller's scan,
data will reflect coil status at the end of the scan. Some servers will limit the
quantity of coils provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status from sequential scans.
Adr Func
11
01
Byte
Count
05
Data Coil
Status 20 to
27
CD
Data Coil
Status 28 to
35
6B
Data Coil
Status 36 to
43
B2
Data Coil
Status 44 to
51
OE
Data Coil
Status 52 to
56
1B
Error
Check
Field
CRC
Func
02
Data Start Pt Hi
00
Data Start Pt Lo
C4
Response
An example response to Read Input Status is as shown in Figure C4. The data is
packed one bit for each input. The response includes the server address,
function code, quantity of data characters, the data characters, and error
checking. Data will be packed with one bit for each input (1=ON, 0=OFF). The
lower order bit of the first character contains the addressed input, and the
remainder follows. For input quantities that are not even multiples of eight, the
last characters will be filled in with zeros at high order end. The quantity of data
characters is always specified as a quantity of RTU characters, that is, the
number is the same whether RTU or ASCII is used.
Page 110 of 218
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
Because the server interface device is serviced at the end of a controller's scan,
data will reflect input status at the end of the scan. Some servers will limit the
quantity of inputs provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status for sequential scans.
Adr
Func
11
02
Byte
Count
03
Response
The addressed server responds with its address and the function code, followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are two bytes each, with the binary content right justified within each pair
of characters. The first byte includes the high order bits and the second, the low
order bits.
Because the server interface device is normally serviced at the end of the
controller's scan, the data will reflect the register content at the end of the scan.
Some servers will limit the quantity of register content provided each scan; thus
for large register quantities, multiple transmissions will be made using register
content from sequential scans.
ProSoft Technology, Inc.
September 17, 2014
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
In the example below, the registers 40108 to 40110 have the decimal contents
555, 0, and 100 respectively.
Adr
11
Func
03
ByteCnt
06
Hi Data
02
Lo Data
2B
Hi Data
00
Lo Data
00
Hi Data
00
Lo Data
64
Response
The addressed server responds with its address and the function code followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are 2 bytes each, with the binary content right justified within each pair of
characters. The first byte includes the high order bits and the second, the low
order bits.
Because the server interface is normally serviced at the end of the controller's
scan, the data will reflect the register content at the end of the scan. Each PC will
limit the quantity of register contents provided each scan; thus for large register
quantities, multiple PC scans will be required, and the data provided will be form
sequential scans.
In the example below the register 3009 contains the decimal value 0.
Adr
11
Func
04
Byte Count
02
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
Note: Functions 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Func
05
Data Coil # Hi
00
Data Coil # Lo
AC
Data
00
Response
The normal response to the Command Request is to re-transmit the message as
received after the coil state has been altered.
Adr
11
Func
05
Data Coil # Hi
00
Data Coil # Lo
AC
Data
00
Note: The Modbus protocol does not include standard functions for testing or changing the
DISABLE state of discrete inputs or outputs. Where applicable, this may be accomplished via
device specific Program commands (In ProSoft products, this is only accomplished through ladder
logic programming).
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Coils that are reprogrammed in the controller logic program are not automatically
cleared upon power up. Thus, if such a coil is set ON by function Code 5 and
(even months later), an output is connected to that coil, the output will be "hot".
Preset Single Register (Function Code 06)
Query
Function (06) allows the user to modify the contents of a holding register. Any
holding register that exists within the controller can have its contents changed by
this message. However, because the controller is actively scanning, it also can
alter the content of any holding register at any time. The values are provided in
binary up to the maximum capacity of the controller unused high order bits must
be set to zero. When used with server address zero (Broadcast mode) all server
controllers will load the specified register with the contents specified.
Note Functions 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Adr
Func
11
06
00
CRC
03
Response
The response to a preset single register request is to re-transmit the query
message after the register has been altered.
Adr
11
Func
06
Data Reg Hi
00
Data Reg Lo
01
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
A server device can, however, be forced into 'Listen Only Mode' in which it will
monitor the messages on the communications system but not respond to them.
This can affect the outcome of your application program if it depends upon any
further exchange of data with the remote device. Generally, the mode is forced to
remove a malfunctioning remote device from the communications system.
Sub-function Codes Supported
Only Sub-function 00 is supported by the gateway.
00 Return Query Data
The data passed in the request data field is to be returned (looped back) in the
response. The entire response message should be identical to the request.
Data Field (Request)
Any
Sub-function
00 00
Request
Field Name
Function
Sub-function Hi
Sub-function Lo
Data Hi
Data Lo
(Hex)
08
00
00
A5
37
Field Name
Function
Sub-function Hi
Sub-function Lo
Data Hi
Data Lo
(Hex)
08
00
00
A5
27
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
The data fields in responses to other kinds of queries could contain error counts
or other data requested by the sub-function code.
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
(Hex)
01
04
A1
00
01
Response
Field Name
Function
Exception Code
(Hex)
81
02
In this example, the Master addresses a request to server device. The function
code (01) is for a Read Output Status operation. It requests the status of the
output at address 1245 (04A1 hex). Note that only that one output is to be read,
as specified by the number of outputs field (0001).
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
If the output address does not exist in the server device, the server will return the
exception response with the exception code shown (02). This specifies an illegal
data address for the server.
Modbus Exception Codes
Code
01
02
03
04
05
06
08
0a
0b
Name
Illegal Function
Meaning
The function code received in the query is not an allowable
action for the server. This may be because the function
code is only applicable to newer devices, and was not
implemented in the unit selected. It could also indicate that
the server is in the wrong state to process a request of this
type, for example because it is unconfigured and is being
asked to return register values.
Illegal Data Address
The data address received in the query is not an allowable
address for the server. More specifically, the combination
of reference number and transfer length is invalid. For a
controller with 100 registers, a request with offset 96 and
length 4 would succeed; a request with offset 96 and length
5 will generate exception 02.
Illegal Data Value
A value contained in the query data field is not an allowable
value for server. This indicates a fault in the structure of the
remainder of a complex request, such as that the implied
length is incorrect. It specifically does not mean that a data
item submitted for storage in a register has a value outside
the expectation of the application program, because the
Modbus protocol is unaware of the significance of any
particular value of any particular register.
Slave Device Failure
An unrecoverable error occurred while the server was
attempting to perform the requested action.
Acknowledge
Specialized use in conjunction with programming
commands. The server has accepted the request and is
processing it, but a long duration of time will be required to
do so. This response is returned to prevent a timeout error
from occurring in the Master. The Master can next issue a
poll program complete message to determine if processing
is completed.
Slave Device Busy
Specialized use in conjunction with programming
commands. The server is engaged in processing a longduration program command. The Master should retransmit
the message later when the server is free.
Memory Parity Error
Specialized use in conjunction with function codes 20 and
21 and reference type 6, to indicate that the extended file
area failed to pass a consistency check. The server
attempted to read record file, but detected a parity error in
the memory. The Master can retry the request, but service
may be required on the server device.
Gateway Path Unavailable Specialized use in conjunction with gateways, indicates
that the gateway was unable to allocate an internal
communication path from the input port to the output port
for processing the request. Usually means that the gateway
is misconfigured or overloaded.
Gateway Target Device
Specialized use in conjunction with gateways, indicates
Failed To Respond
that no response was obtained from the target device.
Usually means that the device is not present on the
network.
PLX3x Series
Ethernet and Serial Gateways
MBTCP Protocol
User Manual
Note: Functions 5, 6, 15, and 16 are the only messages (other than Loopback Diagnostic Test) that
will be recognized as valid for broadcast.
The following example forces 10 coils starting at address 20 (13 HEX). The two
data fields, CD =1100 and 00 = 0000 000, indicate that coils 27, 26, 23, 22, and
20 are to be forced on.
Adr
Func
Hi Add
11
0F
00
Lo
Add
13
Quantity
00
Byte
Cnt
0A
Error Check
Field
CRC
00
Response
The normal response will be an echo of the server address, function code,
starting address, and quantity of coils forced.
Adr
11
Func
0F
Hi Addr
00
Lo Addr
13
Quantity
00
MBTCP Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Note: Function codes 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Adr
Func
11
10
Hi
Add
00
Lo Add
Quantity
87
00
02
Byte
Cnt
04
Hi
Data
00
Lo
Data
0A
Hi
Data
01
Response
The normal response to a function 16 query is to echo the address, function
code, starting address and number of registers to be loaded.
Adr
11
Func
10
Hi Addr
00
Lo Addr
87
Quantity
00
02
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
MBS Protocol
In This Chapter
MBS Protocol
User Manual
7.1
PLX3x Series
Ethernet and Serial Gateways
Supported Modbus
Function Codes
Polling of Command
List
Status Data
Node Address
RS Interface
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Specifications
Internal Database
Communication parameters
Modbus Modes
Floating Point Data
Modbus Function Codes
Modbus Master
Command List
Status Data
Modbus Slave
Node address
Status Data
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Modbus Address
40001 (five-digit addressing) or 400001 (six-digit addressing)
41001 or 410001
42001 or 420001
43001 or 430001
44000 or 440000
PLX3x Series
Ethernet and Serial Gateways
7.2
MBS Protocol
User Manual
MBS Configuration
7.2.1 MBS Port [x]
The Modbus Port [x] sections of the PCB Tree Window, where x stands for 1, 2,
3 or 4, set the Modbus Master and slave port communication parameters and
specify the protocol-specific settings.
Configuration Parameters Common to Master and Slave
Parameter
Value
Description
Enabled
YES or NO
Specifies if the port will be used. If the parameter is set to No, the
port will not be used. If the parameter is set to Yes, the port will be
used.
RS Interface
RS-232
RS-485
RS-422
MASTER
or
SLAVE
Float Flag
YES or NO
Float Start
0 to 32767
Float Offset
0 to 3998
Protocol
RTU or
ASCII
Various
Parity
None
Odd
Even
Data Bits
7 or 8
Specifies the number of data bits for each word used by the
protocol. All devices communicating through this port must use the
same number of data bits.
Stop Bits
1 or 2
Stop bits signal the end of a character in the data stream. For most
applications, use one stop bit. For slower devices that require more
time to re-synchronize, use two stop bits.
All devices communicating through this port must use the same
number of stop bits.
Type
Baud Rate
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
Description
RTS On
0 to 65535
RTS Off
0 to 65535
Use CTS
Line
YES or NO
Value
Description
Response
Timeout
0 to 65535
Retry Count
0 to 10
End of
Message
Delay
0 to 65535
Minimum
Command
Delay
0 to 32767
Error Delay
Counter
0 to 60000
Command
Control Reg
-1, 0 to 3900
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
MBS Protocol
User Manual
Description
all commands, no commands will be executed. If the value in the
first control register is changed to one (1), command zero will be
executed continuously. If the value is the control register for a write
command is set to two (2), the command will be enabled for
conditional writing, which will cause the command to be executed
whenever the values in the database registers associated with the
command change. Use the value of three (3) only for bit-level write
commands, FC 5 and 15. If the parameter is set to three (3), the
command will be executed only if the internal bit data associated
with the command changes. It will also clear the bit or bits in the
internal database after the write command is built.
To use this feature, configure the commands as disabled (enable
code = 0).
This Command Control feature can be disabled by setting this
parameter to a value of 0 to -1.
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Value
Description
Minimum
Response
Delay
0 to 65535
Internal
Slave ID
0 to 247
Defines the virtual Modbus slave address for the port. Any
commands received on the slave port, addressed to the node
address entered here, will be processed by the gateway. Each slave
device on the network must be assigned a unique address.
Bit Input
Offset
0 to 3998
Word Input
Offset
0 to 3998
Output
Offset
0 to 3998
Holding
Register
Offset
0 to 3998
End of
Message
Delay
0 to 65535
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Value
Description
Enable
Disabled
Continuous
Event
Command
Conditional
Internal
Address
0 to 3999
(for registerlevel
addressing)
or
0 to 63999
(for bit-level
addressing)
Poll Interval
0 to 65535
Reg Count
1 to 125 (for
registers)
or
1 to 800 (for
coils)
Swap Code
No Change
Word Swap
Word and
Byte Swap
Byte Swap
MBS Protocol
User Manual
Parameter
PLX3x Series
Ethernet and Serial Gateways
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)
Modbus
Function
1, 2, 3, 4, 5,
6, 15, or 16
MB Address
in Device
Varies
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
MBS Protocol
User Manual
Description
o
o
MBS Protocol
User Manual
7.3
PLX3x Series
Ethernet and Serial Gateways
MBS Diagnostics
7.3.1 PCB Diagnostics
The best way to troubleshoot the MBS driver is to use ProSoft Configuration
Builder to access the diagnostic capabilities of the gateway through the Ethernet
debug port. For instructions on how to access Diagnostics, see Using
Diagnostics in ProSoft Configuration Builder (page 36).
Starting Address
4400
4800
5200
5600
*Status data for Ports 2 through 4 is only present in 4-port MBS gateways.
Note: None of the addresses are available in the Modbus address range. In order for them to be
accessed via a Modbus request, they must be moved into the 0 to 3999 address range. See Using
the CommonNet Data Map (page 25).
The status data area is initialized with zeros whenever the gateway is restarted.
This occurs during a cold-start (power-on), reset (reset push-button pressed) or a
warm-boot operation (commanded from a debug screen or after downloading a
new configuration).
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Offset
Description
0
1
2
3
4
5
6
7
8
9
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
These status values are state registers. They are used as scratchpad areas by
the operating firmware to keep track of the current logical state of activities on a
slave port. These state registers are constantly changing as the gateway
progresses through the various stages needed to process communication on the
serial ports. This processing happens faster than can be followed, unless a port
error causes the value to remain constant for some noticeable length of time.
The diagnostic screen displays are 'snapshot' type screens; that is, they display
the current value at the time they are called but do not continue to automatically
update the data displayed. They are not live-data screens. Therefore, to see a
change in STATE or COMM STATE, you must repeatedly call the screen by
pressing the appropriate menu key to have the screen refreshed. Depending on
the refresh timing you may or may not see a change in the displayed values
every time you call for an update.
The STATE register may display any of the following values.
STATE Value
-2
-1
0
1
2
7
2000
Description
Preparing port, Flushing all buffers, Scan for RTS-Off, or Waiting for port
enable signal
Waiting for receipt of data
Undefined state
Receiving a message from the Master
Building a slave response message
Modbus master is fetching next command
Sending slave response to the Master
The COMM STATE register may display any of the following values.
COMM STATE
Value
Description
0
1
101
2
3
4
5
6
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Modbus Port
1
2*
3*
4*
*Status data for Ports 2 through 4 is only present in 4-port MBS gateways
Offset
Description
0
1
2
3
4
...
...
...
97
98
99
Note that the values in the Command Error List tables are initialized to zero (0) at
power-up, cold boot, and warm boot. If a command executes successfully, the
value in the associated register will remain at zero (0), indicating no command
error was detected. Any non-zero value in this table indicates the corresponding
command experienced an error.
The data in this table is dynamic. It is updated each time a command is
executed. Therefore, if the command fails once and succeeds on the next
attempt, the Error Code from the previously failed attempt will be replace with
zero and be lost. Error Codes are not archived in the gateway's database. To see
if the port has experienced an error since the most recent restart and what the
most recently occurring error was, if any, you can check the Last Error/Index.
ProSoft Technology, Inc.
September 17, 2014
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Modbus Port
1
2*
3*
4*
4510 to 4764
4910 to 5164
5310 to 5564
5710 to 5964
*Status data for Ports 2 through 4 is only present in 4-port MBS gateways.
Offset
Description
0
1
2
3
4
.
Slave #1 Status
Slave #2 Status
Slave #3 Status
Slave #4 Status
Slave #5 Status
.
The slave status list contains the current poll status of each slave device on a
Master port. Slaves attached to a Master port can have one of three states.
0
1
2
The slave has not defined in the command list for the Master port and will not be polled
from the Command List.
The slave is configured to be polled by the Master port and the most recent
communication attempt was successful.
The Master port has failed to communicate with the slave device. Communication with
the slave is suspended for a user defined period based on the scanning of the
command list.
Slaves are defined to the system when the gateway loads the Master Command
List during start-up and initialization. Each slave defined will be set to a state
value of 1 in this initial step. If the Master port fails to communicate with a slave
device (timeout expired on a command, retries failed), the Master will set the
state of the slave to a value of 2 in this status table. This suspends
communication with the slave device for a user-specified Error Delay Count.
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
When the Master first suspends polling of a particular slave, it creates an Error
Delay Counter for this slave address and set the value in that counter equal to
the Error Delay Counter parameter in the configuration file. Then, each time a
command in the list is scanned that has the address of a suspended slave, the
delay counter value for that slave will be decremented. When the value reaches
zero, the slave state will be set to 1. This will re-enable polling of the slave.
The first word in the defined register locations contains the status code for slave
node address 1. Each successive word in the list is associated with the next
node in sequence, up to slave node address 255.
Note: The values in the slave List Status tables are initialized to zero (0) at power-up, cold boot
and during warm boot.
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Description
Illegal Function
Illegal Data Address
Illegal Data Value
Failure in Associated Device
Acknowledge
Busy, Rejected Message
Description
CTS modem control line not set before transmit
Timeout while transmitting message
Timeout waiting for response after request
Incorrect slave address in response
Incorrect function code in response
Invalid CRC/LRC value in response
Description
Invalid enable code
Internal address > maximum address
Invalid node address (<0 or > 255)
Count parameter set to 0
Invalid function code
All parameters set to 0
All parameters set to -1
PLX3x Series
Ethernet and Serial Gateways
7.4
MBS Protocol
User Manual
MBS Reference
7.4.1 Modbus Protocol Specification
Read Coil Status (Function Code 01)
Query
This function allows the user to obtain the ON/OFF status of logic coils used to
control discrete outputs from the addressed server only. Broadcast mode is not
supported with this function code. In addition to the server address and function
fields, the message requires that the information field contain the initial coil
address to be read (Starting Address) and the number of locations that will be
interrogated to obtain status data.
The addressing allows up to 2000 coils to be obtained at each request; however,
the specific server device may have restrictions that lower the maximum quantity.
The coils are numbered from zero; (coil number 1 = zero, coil number 2 = one,
coil number 3 = two, and so on).
The following table is a sample read output status request to read coils 0020 to
0056 from server device number 11.
Adr
11
Func
01
Data Start Pt Hi
00
Data Start Pt Lo
13
Response
An example response to Read Coil Status is as shown in Figure C2. The data is
packed one bit for each coil. The response includes the server address, function
code, quantity of data characters, the data characters, and error checking. Data
will be packed with one bit for each coil (1 = ON, 0 = OFF). The low order bit of
the first character contains the addressed coil, and the remainder follows. For coil
quantities that are not even multiples of eight, the last characters will be filled in
with zeros at high order end. The quantity of data characters is always specified
as quantity of RTU characters, that is, the number is the same whether RTU or
ASCII is used.
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Because the server interface device is serviced at the end of a controller's scan,
data will reflect coil status at the end of the scan. Some servers will limit the
quantity of coils provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status from sequential scans.
Adr Func
11
01
Byte
Count
05
Data Coil
Status 20 to
27
CD
Data Coil
Status 28 to
35
6B
Data Coil
Status 36 to
43
B2
Data Coil
Status 44 to
51
OE
Data Coil
Status 52 to
56
1B
Error
Check
Field
CRC
Func
02
Data Start Pt Hi
00
Data Start Pt Lo
C4
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Response
An example response to Read Input Status is as shown in Figure C4. The data is
packed one bit for each input. The response includes the server address,
function code, quantity of data characters, the data characters, and error
checking. Data will be packed with one bit for each input (1=ON, 0=OFF). The
lower order bit of the first character contains the addressed input, and the
remainder follows. For input quantities that are not even multiples of eight, the
last characters will be filled in with zeros at high order end. The quantity of data
characters is always specified as a quantity of RTU characters, that is, the
number is the same whether RTU or ASCII is used.
Because the server interface device is serviced at the end of a controller's scan,
data will reflect input status at the end of the scan. Some servers will limit the
quantity of inputs provided each scan; thus, for large coil quantities, multiple PC
transactions must be made using coil status for sequential scans.
Adr
Func
11
02
Byte
Count
03
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Response
The addressed server responds with its address and the function code, followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are two bytes each, with the binary content right justified within each pair
of characters. The first byte includes the high order bits and the second, the low
order bits.
Because the server interface device is normally serviced at the end of the
controller's scan, the data will reflect the register content at the end of the scan.
Some servers will limit the quantity of register content provided each scan; thus
for large register quantities, multiple transmissions will be made using register
content from sequential scans.
In the example below, the registers 40108 to 40110 have the decimal contents
555, 0, and 100 respectively.
Adr
11
Func
03
ByteCnt
06
Hi Data
02
Lo Data
2B
Hi Data
00
Lo Data
00
Hi Data
00
Lo Data
64
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Response
The addressed server responds with its address and the function code followed
by the information field. The information field contains 1 byte describing the
quantity of data bytes to be returned. The contents of the registers requested
(DATA) are 2 bytes each, with the binary content right justified within each pair of
characters. The first byte includes the high order bits and the second, the low
order bits.
Because the server interface is normally serviced at the end of the controller's
scan, the data will reflect the register content at the end of the scan. Each PC will
limit the quantity of register contents provided each scan; thus for large register
quantities, multiple PC scans will be required, and the data provided will be form
sequential scans.
In the example below the register 3009 contains the decimal value 0.
Adr
11
Func
04
Byte Count
02
Note: Functions 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Func
05
Data Coil # Hi
00
Data Coil # Lo
AC
Data
00
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Response
The normal response to the Command Request is to re-transmit the message as
received after the coil state has been altered.
Adr
11
Func
05
Data Coil # Hi
00
Data Coil # Lo
AC
Data
00
Note: The Modbus protocol does not include standard functions for testing or changing the
DISABLE state of discrete inputs or outputs. Where applicable, this may be accomplished via
device specific Program commands (In ProSoft products, this is only accomplished through ladder
logic programming).
Coils that are reprogrammed in the controller logic program are not automatically
cleared upon power up. Thus, if such a coil is set ON by function Code 5 and
(even months later), an output is connected to that coil, the output will be "hot".
Preset Single Register (Function Code 06)
Query
Function (06) allows the user to modify the contents of a holding register. Any
holding register that exists within the controller can have its contents changed by
this message. However, because the controller is actively scanning, it also can
alter the content of any holding register at any time. The values are provided in
binary up to the maximum capacity of the controller unused high order bits must
be set to zero. When used with server address zero (Broadcast mode) all server
controllers will load the specified register with the contents specified.
Note Functions 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Adr
Func
11
06
00
CRC
03
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Response
The response to a preset single register request is to re-transmit the query
message after the register has been altered.
Adr
11
Func
06
Data Reg Hi
00
Data Reg Lo
01
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Request
Field Name
Function
Sub-function Hi
Sub-function Lo
Data Hi
Data Lo
(Hex)
08
00
00
A5
37
Field Name
Function
Sub-function Hi
Sub-function Lo
Data Hi
Data Lo
(Hex)
08
00
00
A5
27
The data fields in responses to other kinds of queries could contain error counts
or other data requested by the sub-function code.
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
(Hex)
01
04
A1
00
01
Response
Field Name
Function
Exception Code
(Hex)
81
02
In this example, the Master addresses a request to server device. The function
code (01) is for a Read Output Status operation. It requests the status of the
output at address 1245 (04A1 hex). Note that only that one output is to be read,
as specified by the number of outputs field (0001).
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
If the output address does not exist in the server device, the server will return the
exception response with the exception code shown (02). This specifies an illegal
data address for the server.
Modbus Exception Codes
Code
01
02
03
04
05
06
08
0a
0b
Name
Illegal Function
Meaning
The function code received in the query is not an allowable
action for the server. This may be because the function
code is only applicable to newer devices, and was not
implemented in the unit selected. It could also indicate that
the server is in the wrong state to process a request of this
type, for example because it is unconfigured and is being
asked to return register values.
Illegal Data Address
The data address received in the query is not an allowable
address for the server. More specifically, the combination
of reference number and transfer length is invalid. For a
controller with 100 registers, a request with offset 96 and
length 4 would succeed; a request with offset 96 and length
5 will generate exception 02.
Illegal Data Value
A value contained in the query data field is not an allowable
value for server. This indicates a fault in the structure of the
remainder of a complex request, such as that the implied
length is incorrect. It specifically does not mean that a data
item submitted for storage in a register has a value outside
the expectation of the application program, because the
Modbus protocol is unaware of the significance of any
particular value of any particular register.
Slave Device Failure
An unrecoverable error occurred while the server was
attempting to perform the requested action.
Acknowledge
Specialized use in conjunction with programming
commands. The server has accepted the request and is
processing it, but a long duration of time will be required to
do so. This response is returned to prevent a timeout error
from occurring in the Master. The Master can next issue a
poll program complete message to determine if processing
is completed.
Slave Device Busy
Specialized use in conjunction with programming
commands. The server is engaged in processing a longduration program command. The Master should retransmit
the message later when the server is free.
Memory Parity Error
Specialized use in conjunction with function codes 20 and
21 and reference type 6, to indicate that the extended file
area failed to pass a consistency check. The server
attempted to read record file, but detected a parity error in
the memory. The Master can retry the request, but service
may be required on the server device.
Gateway Path Unavailable Specialized use in conjunction with gateways, indicates
that the gateway was unable to allocate an internal
communication path from the input port to the output port
for processing the request. Usually means that the gateway
is misconfigured or overloaded.
Gateway Target Device
Specialized use in conjunction with gateways, indicates
Failed To Respond
that no response was obtained from the target device.
Usually means that the device is not present on the
network.
PLX3x Series
Ethernet and Serial Gateways
MBS Protocol
User Manual
Note: Functions 5, 6, 15, and 16 are the only messages (other than Loopback Diagnostic Test) that
will be recognized as valid for broadcast.
The following example forces 10 coils starting at address 20 (13 HEX). The two
data fields, CD =1100 and 00 = 0000 000, indicate that coils 27, 26, 23, 22, and
20 are to be forced on.
Adr
Func
Hi Add
11
0F
00
Lo
Add
13
Quantity
00
Byte
Cnt
0A
Error Check
Field
CRC
00
Response
The normal response will be an echo of the server address, function code,
starting address, and quantity of coils forced.
Adr
11
Func
0F
Hi Addr
00
Lo Addr
13
Quantity
00
MBS Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Note: Function codes 5, 6, 15, and 16 are the only messages that will be recognized as valid for
broadcast.
Adr
Func
11
10
Hi
Add
00
Lo Add
Quantity
87
00
02
Byte
Cnt
04
Hi
Data
00
Lo
Data
0A
Hi
Data
01
Response
The normal response to a function 16 query is to echo the address, function
code, starting address and number of registers to be loaded.
Adr
11
Func
10
Hi Addr
00
Lo Addr
87
Quantity
00
02
PLX3x Series
Ethernet and Serial Gateways
ASCII Protocol
User Manual
ASCII Protocol
In This Chapter
ASCII Protocol
User Manual
8.1
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
ASCII Protocol
User Manual
Data received from the ASCII device is accepted by the receive driver and placed
in the receive database location configured by the user. The receive driver waits
until the user-configured termination condition is recognized while receiving the
data before placing the new data into the database.
For example, if the carriage-return character (ASCII 13) is used as the
termination condition for a received message, this signals the end of the
message. When the receive driver observes this character in the input stream, it
takes all received characters and places them in the internal database.
In both receive and transmit operations, a signal is required to determine when
new data is received or must be transmitted. The first word in the two data area
is used for this purpose. There is new data available when the first word
changes.
Example:
The sequence number in the receive data block has a value of 0 as set when the
gateway initializes. The ASCII device sends a new data packet and the
termination condition is present. The receive driver copies the data into the
internal data area, sets the message length in the data area, and finally, sets the
new sequence number. Receive and transmit data block structure is discussed in
the following topics.
ASCII Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Receive Data
Data received by the receive driver is placed in the gateways internal database
in a fixed format at the location selected by the user. The receiver driver is
disabled if the database start location is set to a value of -1. The following table
shows the structure of the received data.
Word Offset
0
1
2
3
4
5
6
7
8
9 to 136
Description
Receive sequence number. This register is incremented by the gateways Receive
Driver for each new packet received.
Number of characters transmitted (0 to 255) from last transmit request
Number of characters (0 to 256) in receive block (9 to 136)
Receive State
-1 = Listening for data
1 = Receiving port data
Total receive character count
Total receive message count
Transmit State
0 = Waiting for data to send
1 = RTS on
2 = RTS timeout
3 = Sending data
4 = Waiting for RTS off
5 = RTS turned off
30 = Intercharacter delay
31 = Intercharacter delay
32 = Intercharacter delay
100 = Message delay before transmit
101 = Message delay before transmit
Total transmit character count
Configuration error word
Received data on port
PLX3x Series
Ethernet and Serial Gateways
ASCII Protocol
User Manual
Transmit Data
Data to transmit by the transmit driver is placed in the gateways internal
database in a fixed format at the location selected by the user. The transmit
driver is disabled if the database start location is set to a value of -1. The
following table shows the structure of transmit data.
Word Offset
0
1
2
3
4 to 131
Description
Transmit sequence number. This number is incremented by the users application
for each new packet to transmit.
Number of characters received (0 to 256) from last receive request
Inter-character delay for this message (milliseconds between characters)
Number of characters to transmit on port (0 to 255)
Data to transmit on port
The first word of the data block is used to signal when new transmit data is
available. Word 1 of the block may optionally contain the number of characters
processed in the last receive message. Word 2 of the message is used to pace
the characters during the transmission process. This may be required when
interfacing with slow ASCII devices (that is, modems in command mode).
If the word is set to a value other than zero, a time delay corresponding to the
number of milliseconds entered will be placed between each character
transmitted. If the word is set to zero, the whole data packet will be transmitted
as fast as the transmit driver can function. Word 3 of the data block contains the
number of bytes present in the transmit data area to send out the ASCII serial
communication port. Words 4 to 131 contain the actual data to transmit. If the
swap option is utilized, the transmit driver will swap each byte in the words
received before transmitting them.
Note: If an odd number of bytes are sent by the end device when the swap option is used, then the
last byte of the message may be lost.
ASCII Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
ASCII Protocol
User Manual
Transmit-Only Mode
A port on the gateway configured to function in transmit-only mode is set up to
only transmit data from the PLX3x gateways internal database (received from an
external source) to an ASCII device. When the transmit driver (Tx Driver)
recognizes a new write block containing data (data placed in the gateways
internal database), it transmits this data out to the port. The sequence number
used in the block will be different than that of the previous block, and therefore,
signals that the packet is fully assembled and ready to send. The following
illustration shows data flow for a transmit-only device.
ASCII Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Transmit-Receive Mode
A port configured in transmit-receive mode can send and receive data from an
ASCII device such as a terminal. This mode functions the same way as transmitonly mode or receive-only mode, but handles both the transmit and receive
functions. Data flow to and from an ASCII device is handled by the gateways
transmit and receive drivers. Data received from the ASCII device is stored in the
gateways internal database until ready to be sent to an external device. Data
received by an external device is also stored in the gateways internal database
until ready to be transmitted to the ASCII device. The following illustration shows
the data flow when the port is configured for transmit-receive mode:
PLX3x Series
Ethernet and Serial Gateways
ASCII Protocol
User Manual
4 to 7
Definition
Reserved
3
8
2
4
1
2
0
1
Packet size
limit used
Intercharacter
delay timeout
used
Message
timeout used
Termination
character(s)
used
If none of the bits are set (Type=0), the port will be configured for stream mode.
Any characters received on the port are immediately sent to the processor. The
processor must buffer and assemble a packet of information if this mode is
selected as required by the application. If the data can be handled by the
processor in this mode and it is appropriate for your application, this is the fastest
method of communication between the device and the processor.
ASCII Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Any combination of bits is acceptable to the gateway and should be set to match
the device on the specific port. An example of each termination type is given
below.
Termination character(s) used
Settings:
Count = 1 (RTermCnt=1)
Termination on 0x0d (carriage return character) (RTermChar = 0d 00 00 00 )
Data Received on port:
A B C 0x0d
D E
Comment:
The characters "ABC" will be sent along with the 0x0d character to the controller after the
0x0d character is received. The characters "DE" will not be sent until the 0x0d character is
received.
2000 mSec
Comment:
After the 'A' character is received on the port, the message timeout is started.
The characters "ABCDE" will be sent to the controller in one block. The characters
"FG" will follow in the second block one second later.
2000 mSec
G H
>=300mSec time gap
Comment:
After each character is received, the intercharacter delay timer is reset. The characters
"ABCDEF" will be sent to the controller in one block because the delay timer expires.
The characters "GH" will follow in the second block when the next time gap is recognized.
G H I
Comment:
The first block sent to the controller will contain the characters "ABCD", and the second
block will contain the characters "EFGH". The characters "IJ" will not be sent until two
more characters are received on the port.
PLX3x Series
Ethernet and Serial Gateways
8.2
ASCII Protocol
User Manual
ASCII Configuration
In order for the ASCII driver to function, a minimum amount of configuration data
must be transferred to the gateway from the gateway's file system. Care must be
taken in constructing the gateway configuration parameters. If the gateway does
not function as expected, examine the configuration parameters using PCB
Diagnostics.
After setting up the configuration in PCB, download it to the gateway.
Value
Description
Enabled
YES or NO
RS Interface
RS-232
RS-485
RS-422
-1
or
0 to 3896
Tx DB Start
-1
or
0 to 3896
Baud Rate
Various
Parity
None
Odd
Even
Data Bits
7 or 8
Specifies the number of data bits for each word used by the
protocol. All devices communicating through this port must
use the same number of data bits.
Stop Bits
1 or 2
RTS On
0 to 65535
RTS Off
0 to 65535
Rx DB Start
ASCII Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
Description
Handshaking
NO
YES
DTR-DSR
XON-XOFF
Rx
Termination
Type
TERMINATION
CHARACTERS
MESSAGE
TIMEOUT
INTERCHARACTER
DELAY
PACKET SIZE
Rx Term
Count
0 to 12
Rx Term
Chars
ASCII Characters
Rx Packet
Length
0 to 200
Rx Timeout
0 to 65535
Rx Delay
0 to 65535
Swap Rx
Data Bytes
YES or NO
Tx Timeout
0 to 65535
Tx Minimum
Delay
0 to 65535
Swap Tx
Data Bytes
YES or NO
PLX3x Series
Ethernet and Serial Gateways
8.3
ASCII Protocol
User Manual
ASCII Diagnostics
8.3.1 PCB Diagnostics
The best way to troubleshoot this driver is to use ProSoft Configuration Builder to
access the diagnostic capabilities of the gateway through the Ethernet debug
port. For instructions on how to access Diagnostics, see Using Diagnostics in
ProSoft Configuration Builder (page 36).
*Status data for Ports 2 through 4 are only present in 4-port ASCII gateways.
1
2
3
4
5
6
7 to 9
Description
Receive state:
-1 = Listening for data
1 = Receiving port data
Total receive character count
Total receive message count
Transmit state:
0 = Waiting for Data to Send
1 = RTS On
2 = RTS Timeout
3 = Sending data
4 = Waiting for RTS Off
5 = RTS turned off
30, 31, and 32 = Intercharacter Delay
100 and 101 = Message Delay before Transmit
Total transmit character count
Total transmit message count
Reserved
No valid data
User Manual
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
SIE Protocol
In This Chapter
SIE Protocol
User Manual
9.1
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
9.2
SIE Protocol
User Manual
SIE Configuration
9.2.1 SIE Client x
This section defines general configuration for the SIE Client (Master).
Parameter
Value
Description
Minimum
Command
Delay
0 to 65535
Response
Timeout
0 to 65535
Specifies the time in milliseconds that a Client will wait before retransmitting a command if no response is received from the
addressed server. The value to use depends on the type of
communication network used, and the expected response time of
the slowest device on the network.
Retry Count
0 to 65535
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Function
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
TIME
COUNT
COUNT
Timer:
Address Type
Function
Timer
READ
Data Type
TIME
Counter:
Address Type
Function
Counter
READ
Data Type
Count
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Flag:
Address Type
Function
Data Type
Flag
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
TIME
Count
Count
Address Type
Function
Data Type
Output
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
TIME
Count
Count
Output:
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Input:
Address Type
Function
Data Type
Input
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
Write
READ
Write
TIME
Count
Count
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
S7-200:
Data Block:
Address Type
Function
DB
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
Address Type
Function
Data Type
Flag
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
Address Type
Function
Output
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
Flag:
Output:
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Input:
Address Type
Function
Input
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
S7-1200:
Data Block:
Address Type
Function
DB
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
TIME
COUNT
COUNT
Flag:
Address Type
Function
Flag
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
READ
Write
Data Type
BOOL
BOOL
BYTE
BYTE
DINT
DINT
REAL
REAL
INT
INT
TIME
TIME
Count
Count
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Output:
Address Type
Function
Data Type
Output
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
Address Type
Function
Data Type
Input
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
Input:
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Value
Description
Enable
DISABLED
ENABLED
CONDITIONAL
Internal
Address
0 to 3999 (for
register-level
addressing)
or
0 to 63999(for
bit-level
addressing)
Poll Interval
0 to 65535
Reg Count
Commanddependent
Swap Code
No Change
Word Swap
Word and Byte
Swap
Byte Swap
Node IP
Address
xxx.xxx.xxx.xxx
PLC Type
S7-200
S7-300/S7400/S7-1200
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Parameter
Value
Description
Rack
0 to 999
Slot
0 to 12
TSAP
Func Type
Read
Write
Data Type
BOOL
BYTE
DINT
REAL
INT
TIME
COUNT
Address
Type
INPUT
OUTPUT
FLAG
TIMER
COUNTER
DB
0 to 32767
DB Number
Address
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
DB1.DBB3
DB1.DBB2
DB1.DBB4
DB1.DBW3
DB1.DBW0
DB1.DBW2
The gray area above represents the byte memory locations being overlapped
when word address is used consecutively (DB1.DBW0, DB1.DBW1, DB1.DBW2,
etc).
If DB1.DBW0 is used as the first address in the Siemens processor, the next
word address that can be used without overwriting the data would be
DB1.DBW2.
Double Word Address in Data Block:
DB1.DBD1
2#0000_0110 2#0000_0000 2#0110_0001 2#0011_0110 2#1100_0110
DB1.DBD0
The gray area above represents the byte memory locations being overlapped
when double word address is used consecutively (DB1.DBD0, DB1.DBD1,
DB1.DBD2, etc).
ProSoft Technology, Inc.
September 17, 2014
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
If DB1.DBD0 is used as the first address in the Siemens processor, the next
double word address that can be used without overwriting the data would be
DB1.DBD4.
All of the above share the same memory locations in the processor.
Note: Incorrect memory location addressing can cause the data to be overwritten.
Below is a graphical representation of the addressing of the processors memory
locations.
DB1.DBD1
DB1.DBW0
DB1.DBW1
DB1.DBW2
DB1.DBW3
DB1.DBB2
DB1.DBB3
DB1.DBB4
DB1.DBD0
Example:
Sending an integer value of 11733 from gateway register 1000 to a Siemens S7300 processor demonstrates the addressing scheme in the Siemens S7-300
processor:
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
PCB screen shot showing Client command to send INT data to DB1 address 0:
Row 1 in the SIMATICS Manager screen shot below shows the data transferred
from the gateway.
If the data is broken up and displayed in binary format, it can be seen that the
binary data stored in the first byte of DB1.DBW 0 is identical to that stored in byte
address DB1.DBB 0. This is because the memory locations referenced by the
first byte of DB1.DBW 0 and by DB1.DBB0 are one and the same, as explained
previously.
DB1.DBB1
2#1101_0101 2#0101_0111
DB1.DBB1
DB1.DBB2
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
The second byte of DB1.DBW0 is the same as DB1.DBB1, and is the same as
the first byte of DB1.DBW1.
In reality, the memory space looks like below:
DB1.DBW0
DB1.DBW1
DB1.DBB1
DB1.DBB2
Note: To access the first address of Data Block, Flag, Input, Output, Timer, and Counter memory
locations in the S7-300 and S7-1200 processors, use the following address syntax.
PLX3x Series
Ethernet and Serial Gateways
9.3
SIE Protocol
User Manual
SIE Diagnostics
The best way to troubleshoot the SIE driver is to use ProSoft Configuration
Builder to access the diagnostic capabilities of the gateway through the Ethernet
debug port. For instructions on how to access Diagnostics, see Using
Diagnostics in ProSoft Configuration Builder (page 36).
18
19
21568
21594
The following table describes the content of each Clients status data area.
Word Offset
0
1
2
3
4
5
6
7
8
9
10 to 25
Description
Command Request Count
Command Response Count
Command Error Count
Number of Request Packets
Number of Response Packets
Errors Sent
Errors Received
Configuration Error Word
Current Error
Last Error
Command List Errors (16 per Client)
For every command that has an error, the gateway automatically sets the poll
delay parameter to 30 seconds. This instructs the gateway to wait 30 seconds
before it attempts to issue the command again.
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
As the commands in the Client Command List are polled and executed, an error
codeis maintained in the gateway for each command. The current error value for
each command is displayed in the Command List Errors section of each Clients
status data area. There is one register for each of the 16 commands in the
command list. An error code of 0 means no error is currently detected for the
specified command.
The following tables list the various error codes that may be displayed and their
descriptions.
Hex
Description
0x0001
0x0003
0x0005
0x0006
0x0007
10
0x000a
-123
0xff85
-124
0xff84
-125
0xff83
-126
0xff82
-127
0xff81
-128
0xff80
-129
0xff7f
-1024
0xfc00
-1025
0xfbff
-32767
0x8001
-32511
0x8101
Hardware fault
-32509
0x8103
-32508
0x8104
-32507
0x8105
Invalid address
-32506
0x8106
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Decimal
Hex
Description
-32505
0x8107
-32502
0x810A
-31999
0x8301
-31742
0x8402
-31740
0x8404
Severe error
-31488
0x8500
-30974
0x8702
Address invalid
-12286
0xd002
-12284
0xd004
-12127
0xd0A1
-11775
0xd201
-11774
0xd202
-11773
0xd203
-11772
0xd204
-11771
0xd205
-11770
0xd206
-11769
0xd207
-11767
0xd209
-11762
0xd20e
No block present
-11760
0xd210
-11712
0xd240
-11711
0xd241
-11710
0xd242
-11263
0xd401
Invalid SZL ID
-11262
0xd402
-11258
0xd406
-11255
0xd409
Diagnosis: DP error
-9215
0xdc01
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Hex
Description
-33
0xffdf
-34
0xffde
-36
0xffdc
-37
0xffdb
Hex
Description
-40
0xffd8
-41
0xffd7
-42
0xffd6
-44
0xffd4
-45
0xffd3
-46
0xffd2
-47
0xffd1
PLX3x Series
Ethernet and Serial Gateways
9.4
SIE Protocol
User Manual
SIE Reference
9.4.1 Maximum Register Counts
CPU315-2 DP
Data Block:
Address Type
Function
Data Type
DB
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
COUNT
Write
COUNT
1
164
164
41
41
41
41
82
82
82
41
82
82
Timer:
Address Type
Function
Data Type
Timer
READ
TIME
Address Type
Function
Data Type
Counter
READ
Count
111
Counter:
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Flag:
Address Type
Function
Data Type
Flag
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
Address Type
Function
Data Type
Output
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
1
222
212
55
53
55
53
111
106
111
53
111
106
Output:
1
128
128
32
32
32
32
64
64
64
32
64
64
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Input:
Address Type
Function
Data Type
Input
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
1
128
128
32
32
32
32
64
64
64
32
64
64
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
CPU1212C:
Data Block:
Address Type
Function
Data Type
Max Read
DB
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
COUNT
Write
COUNT
Address Type
Function
Data Type
Flag
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
Max Write
1
30
30
7
7
7
7
15
15
15
15
15
15
Flag:
1
212
212
53
53
53
53
106
106
105
105
106
106
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Output:
Address Type
Function
Data Type
Output
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
Address Type
Function
Data Type
Input
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
READ
TIME
Write
TIME
READ
Count
Write
Count
1
212
212
53
53
53
53
106
106
105
105
111
106
Input:
1
222
212
55
53
55
53
111
111
111
106
111
106
SIE Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
CPU224XP:
Data Block:
Address Type
Function
Data Type
Max Read
DB
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
Address Type
Function
Data Type
Flag
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
Max Write
1
222
212
55
53
55
53
111
106
Flag:
1
32
32
8
8
8
8
16
16
PLX3x Series
Ethernet and Serial Gateways
SIE Protocol
User Manual
Output:
Address Type
Function
Data Type
Output
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
Address Type
Function
Data Type
Input
READ
BOOL
Write
BOOL
READ
BYTE
Write
BYTE
READ
DINT
Write
DINT
READ
REAL
Write
REAL
READ
INT
Write
INT
1
16
16
4
4
4
4
8
8
Input:
1
16
16
4
4
4
4
8
8
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
10 PND Protocol
In This Chapter
PND Protocol
User Manual
10.1
PLX3x Series
Ethernet and Serial Gateways
10.2
PND Configuration
The following procedure provides the required steps to configure the PLX31-EIPPND module using ProSoft Configuration Builder (PCB). This configuration
provides the ability to communicate with a Siemens processor via the PROFINET
protocol.
1. Launch ProSoft Configuration Builder.
2. Create a new PLX3x-EIP-PND module.
3. Click OK.
Page 194 of 218
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
4. Expand PND MODULE MAP and double-click PND MODULE MAP to edit.
5. In this example, 32-bytes of input and 32-bytes of output will be used (a dropdown list provides the range that could be used in each slot).
6.
7.
Select Slot 1.
Select the number of input bytes. In this example, select Input 32 Byte
from the drop down list.
PND Protocol
User Manual
8.
9.
PLX3x Series
Ethernet and Serial Gateways
Select Slot 2.
Select the number of output bytes. In this example, select Output 32
Byte from the drop down list.
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
Important: The PND module map is very important because the values entered here must match
the values that are entered in the Siemens processor in order for them to communicate. The total
combined Input bytes and total combined Output bytes must not be greater than 1440.
PND Protocol
User Manual
10.3
PLX3x Series
Ethernet and Serial Gateways
Step 7 Configuration
This procedure describes the tasks required to set up the module with Siemens
Step 7. It is important to note that the configuration parameters used during PCB
Configuration and download to the module must match parameters configured
here within this procedure.
1
2
4
5
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
Select the file and click the Install button. The system informs you when the
install is complete.
Click OK.
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
11 Drag and drop the processor to be used in the network. The example uses
315-2 PN/DP.
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
13 Insert the ProfiNet bus network where the ProSoft module will be added by
clicking on the PN-IO option and select New. The Properties - Ethernet
Interface dialog opens.
14 Click the New button. The Properties - New subnet Industrial Ethernet dialog
opens.
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
18 Configure the inputs and outputs to match the PCB configuration. The
example uses 32 inputs and 32 outputs.
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
19 Verify the name and IP address by clicking PLC > Ethernet > Verify Device
Name
If the status is not green, the module needs the name and IP to be assigned.
This is done by clicking PLC > Ethernet > Assign Device Name.
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
Once you download the program, the RUN LED and the DC5V on the processor
should be green. There should be no red LEDs.
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
To monitor the values coming out of the processor, click on the Input and
choose the Monitor/Modify option.
The values coming into the processor are displayed at the input section.
PND Protocol
User Manual
PLX3x Series
Ethernet and Serial Gateways
To modify the values that the processor sends to the module, choose the
Output, select the desired value, and select Modify Value.
PLX3x Series
Ethernet and Serial Gateways
PND Protocol
User Manual
PND Protocol
User Manual
3
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
10.4
PND Protocol
User Manual
PND Diagnostics
Input Error Status
Error code
Description
No error
0x0604
0x0503
0x060A
Description
No error
0x0001
0x0604
0x060B
IOCR ID is 0
0x0803
0x060A
Description
No error
18
19
20
21
22
23
User Manual
PLX3x Series
Ethernet and Serial Gateways
PLX3x Series
Ethernet and Serial Gateways
In This Chapter
11.1
Note: For technical support calls within the United States, ProSofts 24/7 after-hours phone
support is available for urgent plant-down issues. Detailed contact information for all our
worldwide locations is available on the following page.
PLX3x Series
Ethernet and Serial Gateways
Web Site: www.prosoft-technology.com/support
E-mail address: [email protected]
11.2
Warranty Information
For complete details regarding ProSoft Technologys TERMS & CONDITIONS
OF SALE, WARRANTY, SUPPORT, SERVICE AND RETURN MATERIAL
AUTHORIZATION INSTRUCTIONS, please see the documents on the
Product DVD or at www.prosoft-technology/legal
Documentation is subject to change without notice.
PLX30 Series
Ethernet and Serial Gateways
Index
User Manual
Downloading the Project to the Gateway 29
Index
[
[Modbus Port X Commands] 126
0
00 Return Query Data 115, 145
4
4101 Series LEDs 35
A
ARP Timeout 101
ASCII Configuration 161
ASCII Functional Overview 152
ASCII Port [x] 161
ASCII Protocol 151
B
Basic Command Set Functions 55
Bit Input Offset 99, 128
BT 84
C
CIP Data Table Operations 89
CIP Data Table Read 90
CIP Data Table Write 89
Client Command Errors 181
Command Error Delay 101
Command List Entry Errors 108, 184
Command List Error Codes 138
Command List Overview 167
Commands Supported by the Module 168
Configuring a Port for Transmit-Only Mode 157
Configuring a Port for Transmit-Receive Mode 158
Configuring an IP Address 27
Configuring the Drivers 21
Configuring the Port for Receive-Only Mode 156
Configuring Your Gateway 15
Connecting Power to the PLX30 Gateway 13
Connection Timeout 99
Contacting Technical Support 215
Control 84
ControlLogix and CompactLogix Processor Specifics
85
D
Data Flow 153
DFNT Client 0 Status 71
DFNT Servers 1 Through 4 72
Diagnostics (Function Code 08) 114, 145
Diagnostics Menu 38
F
Float Flag 98, 100, 125
Float Offset 98, 100, 125
Float Start 98, 100, 125
Force Multiple Coils (Function Code 15) 119, 149
Force Single Coil (Function Code 05) 113, 143
G
Gateway Communication Error Codes 108
GatewayInternal Database 124, 166
General Specifications 152, 166
General Specifications - Modbus TCP/IP 94
H
Hardware Information 45
Holding Register Offset 99, 128
How to Contact Us 2
I
Important Installation Instructions 3
Installing ProSoft Configuration Builder Software 16
Internal Database 95
L
LED Indicators 34
Local STS Error Codes 73
M
Main Gateway LEDs 34
Master Port
Command List Errors 135
Modbus Slave List Status 136
MBS Configuration 125
MBS Functional Overview 122
MBS Port [x] Commands 129
MBS Port[ x] 125
MBS Protocol 121
MBTCP Client [x] 100
MBTCP Client [x] Commands 102
Index
User Manual
PLX30 Series
Ethernet and Serial Gateways
O
Output Offset 98, 128
P
Package Contents 10
PD* 84
Pinouts 3
PLC-5 Command Set Functions 55
PLC5 Read Commands 82
PLC-5 Sub-Element Fields 84
PLC5 Write Commands 81
Port 1 Command Error List Layout 135
Port 1 Slave List Status Layout 136
Preset Multiple Registers (Function Code 16) 120,
150
Preset Single Register (Function Code 06) 114, 144
Printing a Configuration File 31
ProSoft Technology Product Documentation 2
Register Count 26
Remote STS Error Codes 74
Renaming PCB Objects 20
Response Timeout 100
Retry Count 100
RS-232 - DTE to DCE Modem Connection 49
RS-232 - Null Modem (DTE with Hardware
Handshaking) 48
RS-232 - Null Modem (DTE without Hardware
Handshaking) 49
RS-422 Interface Connections 50
RS-485 Interface Connections 50
S
Serial Port Cables 48
Serial Port Specifications 47
Setting Up the Project 17
SLC File Types 80
SLC5/05 Read Commands 78
SLC5/05 Write Commands 77
SLC-500 Command Set Functions 55
Standard Modbus Exception Code Errors 108
Start Here 9
Sub-function Codes Supported 115, 145
Support, Service & Warranty 215
Swap Code 26
System Requirements 9
T
TCP/IP Interface Errors 75
Termination of Received Data 159
Timer / Counter 84
To Address 26
Transmit Data 155
Transmit-Only Mode 157
Transmit-Receive Mode 158
U
Using Diagnosticsin ProSoft Configuration Builder 36
Using the CommonNet Data Map 25
Using the Online Help 17
W
Warranty Information 216
Word Input Offset 99, 128
Y
Your Feedback Please 2
R
Read Coil Status (Function Code 01) 109, 139
Read Holding Registers (Function Code 03) 111, 141
Read Input Registers (Function Code 04) 112, 142
Read Input Status (Function Code 02) 110, 140
Receive Data 154
Receive-Only Mode 156