OIMBTCP
OIMBTCP
User Guide
© 2020 AVEVA Group plc and its subsidiaries. All rights reserved.
No part of this documentation shall be reproduced, stored in a ret rieval system, or transmitted by any
means, electronic, mechanical, photocopying, rec ording, or otherwise, without the prior written
permission of AVEVA. No liability is assumed with respect to the use of the information contained herein.
Although precaution has been taken in the preparation of this doc umentation, AVEVA assumes no
responsibility for errors or omissions. The information in this documentation is subject to change without
notice and does not represent a commitment on the part of AVEVA. The soft ware described in this
documentation is furnished under a license agreement. This soft ware may be used or copied only in
accordance with the terms of such license agreement.
ArchestrA, Aquis, Avantis, Citect, DYNSIM, eDNA, EYESIM, InBatch, InduSoft, InStep, Int elaTrac,
InTouch, OASyS, PIPEPHASE, PRiSM, PRO/II, PROV ISION, ROMeo, SIM4ME, SimCentral, SimSci,
Skelta, SmartGlance, Spiral Software, Termis, WindowMaker, WindowViewer, and Wonderware are
trademarks of AVEVA and/or its subsidiaries. An extensive listing of AVEVA trademarks can be found at:
https://sw.aveva.com/legal. All other brands may be trademarks of their respective owners.
Publication date: Friday, November 20, 2020
Contact Information
AVEVA Group plc
High Cross
Madingley Road
Cambridge
CB3 0HB. UK
https://sw.aveva.com/
For information on how to cont act sales and customer training, see https://sw.aveva.com/contact.
For information on how to cont act technical support, see https://sw.aveva.com/support.
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Contents
Chapter 1 Introduction to the MBTCP Communication Driver........................................ 5
About the MB TCP Communication Driver ................................................................................... 5
Generic Modbus Controllers ...................................................................................................... 5
Supported Client Protocols ........................................................................................................ 6
OPC ................................................................................................................................... 6
SuiteLink ............................................................................................................................ 6
DDE/FastDDE ..................................................................................................................... 6
DDE ............................................................................................................................. 7
FastDDE ....................................................................................................................... 7
Supported Device Protocols....................................................................................................... 7
Modbus TCP/IP Ethernet Protocol ........................................................................................ 7
MBTCP OI Reference............................................................................................................ 49
Data Types ............................................................................................................................. 49
Support for 64-bit Data Types ............................................................................................ 49
Data and Register Types ......................................................................................................... 50
Modbus Item Naming .............................................................................................................. 51
Register-Number Item Names ............................................................................................ 51
Item Names Using the Modicon PLC Register Addresses .................................................... 54
Absolute Notation Item Names ........................................................................................... 54
Modulo-10000 Point Item Names ....................................................................................... 55
Modulo-10000 Items, BCD Register Ty pe, and Concept Data Structures .............................. 56
Zero- and One-B ased Addressing ............................................................................................ 57
3
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide Contents
4
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
C HAPTER 1
Introduction to the MBTCP Communication
Driver
5
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideIntroduction to the MBTCP Communication Driver
Configurable Zero Based Addressing to enable addressing both in Modbus PLCs that are
zero-based, such as the TS X Premium, and in Modbus PLCs that are one -based. Zero-based
addressing means that the first address bit (character) begins at 0 rather than at 1.
OPC
OPC (OLE for Proc ess Control) is a non -propriet ary set of standard interfac es based upon Microsoft’s
OLE/COM technology. This standard makes possible interoperability between automation/control
applications, field systems/ devices and business/offic e applications. A voiding the traditional
requirement of software/application developers to write custom d rivers to exchange data with field
devic es, OPC defines a c ommon, high performance interface that permits this work to be done once, and
then easily reused by HMI, SCA DA, control and custom applications. Over the network, OPC uses
DCOM (Distributed COM) for remote communications.
SuiteLink
SuiteLink uses a TCP/ IP-based protoc ol and is designed specifically to meet industrial needs such as
data integrity, high throughput, and easier diagnostics. This TCP/IP standard is support ed on Windows
NT and Windows NT-t echnology-based operating systems (for example, Windows 2000, Windows XP,
and Windows 2003).
SuiteLink is not a replacement for DDE, FastDDE, or NetDDE. The protocol used bet ween a client and a
server depends on your network connections and configurations. SuiteLink provides the following
features:
Value Time Quality (V TQ) places a timestamp and quality indicator on all data values delivered to
VTQ-aware clients.
Extensive diagnostics of the data throughput, server loading, computer resource consumption, and
network transport are made accessible through the operating system’s performance monit or. This
feature is critical for the operation and maintenance of distrib uted industrial networks.
Consistent high data volumes can be maintained between applications regardless if the applications
are on a single node or distributed over a large node count.
The network transport protocol is TCP/IP using Microsoft’s standard WinSock interface.
DDE/FastDDE
The DDE/FastDDE communication protocols allow communication between a client and a server. For
DDE/FastDDE communications the Communication Driver must be activated in Desktop mode (must
start from command line).
6
Introduction to the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
DDE
DDE is a communic ations protocol that allow applications in the Windows environment to send/receive
data and instructions to/from each other. It implements a Client -Server relationship between two
concurrently running applications.
The server application provides data and accepts requests from any other application interested in its
data. Requesting applications are called clients. Some applications such as InTouch and Microsoft Excel
can simultaneously be both a client and a server.
Note: On Windows Vista and later operating systems, Local DDE is supported only when the
Communication Driver is activated from its executable file or launched from InTouc h. Local DDE is not
supported when the Communication Driver is activated from the SMC.
FastDDE
FastDDE provides a means of packing multiple DDE messages into a single message. This packing
improves efficiency and performance by reducing the total number of DDE transactions required
between a client and a server.
Although FastDDE has extended the usefulness of DDE for our industry, this extension is being pushed
to its performance constraints in distributed environments.
Note: The MB TCP Communication Driver is capable of supporting dual network (NIC) cards in a system.
7
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideIntroduction to the MBTCP Communication Driver
For more information about Modbus Bridge models and other supported hardware, see Supported
MBTCP OI Server Hardware and Firmware on page 57.
Note: For more information on the Modbus protocol and to better understand how to read and write data
to the different Modicon controllers, please refer to the Modicon "Modbus Protocol Referenc e Guide"
(PI-MBUS-300).
8
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
C HAPTER 2
Configuring the MBTCP Communication
Driver
Note: For more information on the Modbus protocol and to better understand how to read and write data
to the different Modicon controllers, please refer to the Modicon Modbus Protoc ol Reference Guide
(PI-MBUS-300).
Note: See the Communication Drivers Pack Help for general information about working in this
snap-in environment.
6. Before the Communication Driver is started, you must first build the device hierarchy to establish
communications to each of the controllers.
9
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Important: For step-by-step procedures on how to build the device hierarchy, see MBTCP Hierarchy
in the OI Server Manager on page 10.
Note: Selecting the Configuration object of the hierarchy tree displays the Global Paramet ers
configuration view for this Communication Driver. The default Poke Mode settings for the
Communication Driver is Optimization mode. Configure all other global parameters as required for
this Communication Driver. For more information about the Global Parameters configuration view,
including descriptions of the different Poke Modes, see the Communication Drivers Pack Help. You
can access that documentation by right-clicking the OI Server Manager icon and selecting the Help
menu, and then navigating through the Communication Drivers Pack Help.
Important: Any Global Parameters that appear dimmed are either not supported or cannot be
configured for this Communication Driver. Simulation Mode is not supported.
7. When the MB TCP hierarchy build has been completed, you can start configuring the respective
devic es for communications.
8. You may create the desired Device Groups for each controller by:
o Navigating to the object of interest in the OI Server Manager tree view.
o Clicking on the Device Groups tab.
o Right -clicking in the Device Groups dialog box and selecting the A dd command from t he shortcut
menu.
Important: For step-by -step procedures on configuring Device Groups, see Device Group
Definitions on page 41.
9. Finally, you may create the desired Device Items for eac h controller by:
o Navigating to the object of interest in the OI Server Manager tree view.
o Clicking on the Device It ems tab.
o Right -clicking in the Device Items dialog box and selecting the Add command from the shortcut
menu.
Note: When any configuration view is in an open state and you open the same server the second
time, the Communication Driver locks the second instance of this same-server access for any update
or configuration activities. Access to this second opening instance will resume after the first one has
been closed.
The Communication Driver is now ready for use. In order to use the Communication Driver, you must
activate it.
If you are using an OPC Client, the Communication Driver can be auto -started.
If you are using DDE/SuiteLink, you must start the Communication Driver either as a manual or
automatic service.
To activate the Communication Driver, right-click on the appropri ate serve instance, such as
OI.MB TCP.4, and select Activate Server from the shortcut menu.
10
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: The default name created from adding a hierarchy object is in the format of
New_ObjectName_###, where ObjectName is the name of the object type and ### is a numeric value
starting from "000" enumerated sequentially per hierarchy object. The hierarchy object name is up to 32
characters long. The link name for the OP C items is constructed by assembling the respective object
names of the nodes along the hierarchy tree in the logical order, starting from this Communication
Driver’s TCPIP _PORT root down to the leaf. Therefore, the link name is always unique for the
Communication Driver.
Important: If you subs equently clear your configuration hierarchy, you must create this
TCPIP _PORT object from the Configuration branch of the hierarchy. From this point, all of the
following instructions apply.
11
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
o Port number: Dis plays the default port (socket) number, whic h is 502.
Note: The MB TCP Communication Driver uses port 502 as the default port number to contact the
PLC. The port number in this display is dimmed and is not changeable in this view. However, the
actual port to be used by the Generic Modbus PLCs can be configured in the ModbusPLC object.
This setting will override the port setting in the TCP IP_PORT object. Controllers configured under
the ModbusBridge object will always use port number 502.
From the New_PORT_TCP IP_000 branch of the Communication Driver hierarchy, the following
objects can be created:
o ModbusBridge Object
o TS XQuantum Object (representing the TS XQuantum cont roller)
o TS XMoment um Object (representing the TS XMomentum controller)
o TS XPremium Object (representing the TS XPremium cont roller)
o ModbusPLC Object (representing the Modbus Generic 4-Digit, 5-Digit, or 6-Digit controller)
Important: Eac h hardware c onfigured has a limitation to the number of connections it can support at
one time. Please refer to the respective hardware’s documentation for the maximum number of
simultaneous Modbus/ TCP server connections it can support.
Note: The TS XQuantum, TS XMomentum, TS XPremium, and ModbusPLC objects represent the
logical endpoint to the hardware hierarchy. If y ou add a ModbusBridge object, you must configure an
additional leaf on the hierarchy.
ModbusBridge Connection
To add ModbusBridge connection to your MBTCP hierarchy
1. Right -click on the TCPIP _PORT branch, and select Add ModbusBridge Connection from the
shortcut menu.
A new ModbusBridge object is created. Default name is New_ModbusBridge_000.
Note: You can add up to 247 objects of each type to the hierarchy. However, the bridge itself limits
the number of PLCs that can be connected to the serial line.
2. Rename as appropriate.
12
Configuring the MBTCP Comm unication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
From the ModbusBridge branch of the Communic ation Driver hierarchy, the following objects can be
created:
o Compact984 Object
o ModiconMicro Object
o TS XMoment umRS Object
o ModbusPLCRS Object
Compact984 Connection
The Compact984 connection can be created only from the ModbusBridge branc h.
13
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Note: You can add up to 247 objects of this type to the hierarchy.
2. Rename as appropriate.
o The New_Compact984_000 Parameters configuration view is dis played.
14
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Reply timeout (sec): Enter the amount of time the server will wait for an acknowledgment.
o The minimum value is 1 (one).
o The maximum value is 60.
o The default value is 3 (three).
Use Concept data structure s (Longs): Select to read data from the PLC in concept dat a structure
format for Long item types. If checked, the DAServer will process the data in the same register order
as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Use Concept data structure s (Reals): Select to read data from the PLC in concept data structure
format for Real item types. If checked, the DAServer will process the data in the same register order
as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Bit order format: The format of the bit order entered int o the PLC. There are four bit order formats
available for selection.
o B1 B2 … B16: (Default) Bit order is left to right (MSB = Bit 1; LSB = Bit 16)
o B16 B15 … B1: Bit order is right to left (MSB = Bit 16; LSB = Bit 1)
o B0 B1 … B15: Bit order is left to right (MSB = Bit 0; LSB = Bit 15)
o B15 B14 … B0: Bit order is right to left (MSB = Bit 15; LSB = Bit 0)
Register Order: The order of the PLC memory registers written to and read from, used to support
64-bit data types.
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, and R4 are the relative register addresses in the PLC.
Register size (digits): Select the correct register size for addressing the PLC.
o 5-digit register size (applies to 984-145 Compact PLCs).
o 6-digit register size (applies to 984-265 Compact PLCs).
o The default value is 5, for the 984-145 Compact PLCs.
String variable style: PLC string-data format. Select the option for the style used by the device to
store strings in its registers.
o Full lengt h (space padded) (Default)
o C style (null terminated)
o Pascal style (includes length specifier)
Register type: Select either Binary or BCD for the register type being used.
o Binary
o BCD
o The default register type is Binary.
15
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Maximum address range: There are five sub-elements in this Maximum addressable registers box.
The maximum addressable registers can be obtained from the Modicon Concept or Modsoft
configuration programs. The PLC will return an error if a register outside of this range is used to read
data. The MB TCP DAServer filters out registers outside of this range and logs error messages.
Discrete input Enter the maximum number of addressable Min = 1 (one) For 984-145
discrete inputs (read coils) in the PLC compact PLCs:
Max = 9999
(Default)
For 984-265
compact PLCs:
Max = 65536
Coil Enter the maximum number of addressable Min = 1 (one) For 984-145
write coils in the PLC. compact PLCs:
Max = 9999
(Default)
For 984-265
compact PLCs:
Max = 65536
Input register Enter the maximum number of addressable Min = 1 (one) For 984-145
input registers in the PLC. compact PLCs:
Max = 9999
(Default)
For 984-265
compact PLCs:
Max = 65536
Holding register Enter the maximum number of addressable Min = 1 (one) For 984-145
holding registers in the PLC. compact PLCs:
Max = 9999
(Default)
For 984-265
compact PLCs:
Max = 65536
Extended Enter the maximum number of addressable Min = 1 (one) For 984-145
register extended registers in the PLC. compact PLCs:
Max = 9999
Note: This option is not available if you set
(Default)
Register size to 6.
For 984-265
compact PLCs:
Max = 65536
Block I/O size: This Block I/O Sizes box contains seven sub-elements. The DAServer uses the
block I/O sizes to maximize data throughput. The MB TCP DAServer uses a 256 -byte buffer to read
or write dat a to the PLC. The maximum value is the maximum number of registers that can be read
or written from/to the PLC in one command.
16
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Discrete Enter the maximum number of discrete inputs or Min = 1 (one) Max = 1976
input/coil read coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding registers Min = 1 (one) Max = 123
read to read at one time. (Default)
Holding register Enter the maximum number of holding registers Min = 1 (one) Max = 100
write to write at one time. (Default)
Input register Enter the maximum number of input registers to Min = 1 (one) Max = 123
read read at one time. (Default)
Extended Enter the maximum number of extended Min = 1 (one) Max = 122
register read registers to read at one time. (Default)
Extended Enter the maximum number of extended Min = 1 (one) Max = 120
register write registers to write at one time. (Default)
Note: This option is unavailable if you set
Register size to 6.
ModiconMicro Connection
From the ModbusBridge branch of the Communic ation Driver hierarchy, the ModiconMicro connection
can be created.
To add ModiconMicro Connection to your MBTCP hierarchy
1. Right -click on your ModbusBridge branch, and select Add ModiconMi cro Connection from the
shortcut menu.
o A new ModiconMicro object is created as a node in the hierarchy tree.
o Default name is New_ModiconMicro_000.
Note: You can add up to 247 objects of this type to the hierarchy.
2. Rename as appropriate.
17
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
18
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Discrete input Enter the maximum number of addressable Min = 1 (one) Max = 9999
discrete inputs/read coils in the PLC (Default)
Coil Enter the maximum number of addressable Min = 1 (one) Max = 9999
write coils in the PLC. (Default)
19
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Input register Enter the maximum number of addressable Min = 1 (one) Max = 9999
input registers in the PLC. (Default)
Holding register Enter the maximum number of addressable Min = 1 (one) Max = 9999
holding registers in the PLC. (Default)
Block I/O size: This Block I/O Sizes box contains five sub-elements. The Communication Driver
uses the Block I/O sizes to maximize data throughput. The MB TCP Communication Driver uses a
256-byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete Enter the maximum number of discrete inputs or Min = 1 (one) Max = 1976
input/coil read coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding registers Min = 1 (one) Max = 123
read to read at one time. (Default)
Holding register Enter the maximum number of holding registers Min = 1 (one) Max = 100
write to write at one time. (Default)
Input register Enter the maximum number of input registers to Min = 1 (one) Max = 123
read read at one time. (Default)
TSXMomentumRS Connection
The TS XMomentumRS connection is created from the ModbusBridge branch of the OI Server Manager
hierarchy.
To add TSXMomentumRS Connection to your MBTCP hierarchy
1. Right -click on your ModbusBridge branch, and select Add TSXMomentumRS Connection from the
shortcut menu.
o A new TS XMomentumRS object is created as a node in the hierarchy tree.
o Default name is New_TS XMomentumRS_000.
Note: You can add up to 247 objects of this type to the hierarchy.
2. Rename as appropriate.
20
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
21
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Discrete input Enter the maximum number of addressable Min = 1 (one) Max = 65536
discrete inputs or read coils in the PLC (Default)
Coil Enter the maximum number of addressable Min = 1 (one) Max = 65536
write coils in the PLC. (Default)
22
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Input register Enter the maximum number of addressable Min = 1 (one) Max = 65536
input registers in the PLC. (Default)
Holding register Enter the maximum number of addressable Min = 1 (one) Max = 65536
holding registers in the PLC. (Default)
Extended Enter the maximum number of addressable Min = 1 (one) Max = 98303
register extended registers in the PLC. (Default)
Note: This option is not available if you set
Register size to 6.
Block I/O size: The Block I/O Sizes box contains seven sub -elements. The Communication Driver
uses Block I/O Sizes to maximize data throughput. The MB TCP Communication Driver uses a
256-byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete Enter the maximum number of discrete inputs Min = 1 (one) Max = 1976
input/coil read or coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 123
read registers to read at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 100
write registers to write at one time. (Default)
Input register Enter the maximum number of input registers Min = 1 (one) Max = 123
read to read at one time. (Default)
Extended Enter the maximum number of extended Min = 1 (one) Max = 122
register read registers to read at one time. (Default)
Note: This option is unavailable if you set
Register size to 6.
Extended Enter the maximum number of extended Min = 1 (one) Max = 120
register write registers to write at one time. (Default)
Note: This option is unavailable if you set
Register size to 6.
ModbusPLCRS Connection
The ModbusPLCRS connection is added to t he Communication Driver hierarchy from the ModbusBridge
branch.
To add ModbusPLCRS Connection to your MBTCP hierarchy
1. Right -click on your ModbusBridge branch, and select Add ModbusPLCRS Connection from the
shortcut menu.
o A new ModbusPLCRS object is created as a node in the hierarchy tree.
23
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Note: You can add up to 247 objects of this type to the hierarchy.
2. Rename as appropriate.
o The New_ModbusPLCRS_000 Parameters configuration view is displayed.
24
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: When the Support Multiple Register Write Parameter is not selected in the Generic PLC
configuration, it implies that the PLC does not support multiple register writes and the server will only
write single registers to the PLC.
This means that items that contain more than one register cannot be written either. For example,
items such as 4xxxxx L, 4xxxxx I, 4xxxxx U, 4xxxxx F, 4xxxxx -4xxxxx M, 5 HRL, 5 HRF, 5 PV, 5
HRU, and 4xxxxx-4xxxxx cannot be written. When you try to write to the PLC with this parameter not
selected, the following error message will be logged to the logger, "Cannot write to multiple register
item: 4xxxxx L on Node: TCPPort.GenPLC. The PLC configurable paramet er Support Multiple
Register Write is not checked."
25
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, and R4 are the relative register addresses in the PLC.
Register size (digits): Select the correct register size for addressing the PLC.
o 4-digit is used for addressing the Modbus Generic 4-Digit PLCs.
o 5-digit applies to the Modbus Generic 5 -Digit PLCs.
o 6-digit is used for addressing the Modbus Generic 6-Digit PLCs (default ).
Note: The selection for the Register size determines the maximum address range. They are
changeable as in other support ed PLCs listed in Supported MBTCP OI Server Hardware and
Firmware on page 57.
For 4-digit, the maximum value is 999; for 5-digit, the maximum value is 9999; for 6 -digit, the
maximum value is 65536 (default).
String variable style: PLC string-data format. Select the option for the style used by the device to
store strings in its registers.
o Full lengt h (space padded) (Default)
o C style (null terminated)
o Pascal style (includes length specifier)
Register type: Select either Binary or BCD for the register type being used.
o Binary (Default)
o BCD
Block I/O size: This Block I/O Sizes box contains four sub-elements. The Communication Driver
uses Block I/O Sizes to maximize data throughput. The MB TCP Communication Driver uses a
256-byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete Enter the maximum number of discrete inputs or Min = 1 (one) Max = 1976
input/coil read coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e at Min = 1 (one) Max = 800
one time. (Default)
Register read Enter the maximum number of extended Min = 1 (one) Max = 122
registers to read at one time. (Default)
Register writ e Enter the maximum number of holding registers Min = 1 (one) Max = 100
to write at one time. (Default)
The logic al endpoint for each branch of the MB TCP hierarchy tree is a hardware device (PLC).
Note: In order to use the Communication Driver, you must activate it. See the OI S erver Manager
documentation for information about how to activate and deactivate the Communication Driver.
26
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
TSXQuantum Connection
To add TSXQuantum Connection to your MBTCP hierarchy
1. Right -click on the TCPIP _PORT branch, and select Add TSXQuantum Connection from the
shortcut menu.
o A new TS XQuantum object is created as a node in the hierarchy tree.
o Default name is New_TSXQuantum_000.
2. Rename as appropriate.
o The New_TS XQuantum_000 Parameters configuration view is displayed.
27
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Maximum outstanding message s: Enter the maximum number of messages allowed in the queue.
o The minimum value is 1 (one).
o The maximum value is 20.
o The default value is 4 (four).
Use Concept data structure s (Longs): Select to read data from the PLC in concept dat a structure
format for Long item types. If checked, the Communication Driver will process the data in the same
register order as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Use Concept data structure s (Reals): Select to read data from the PLC in concept data structure
format for Real item types. If checked, the Communication Driver will process the data in the same
register order as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Bit order format: The format of the bit order entered into the PLC. There are four bit order formats
available for selection.
o B1 B2 … B16: (Default) Bit order is left to right (MSB = Bit 1; LSB = Bit 16)
o B16 B15 … B1: Bit order is right to left (MSB = Bit 16; LSB = Bit 1)
o B0 B1 … B15: Bit order is left to right (MSB = Bit 0; LSB = Bit 15)
o B15 B14 … B0: Bit order is right to left (MSB = Bit 15; LSB = Bit 0)
Register Order: The order of the PLC memory registers written to and read from, used to support
64-bit data types.
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, and R4 are the relative register addresses in the PLC.
String variable style: PLC string-data format. Select the option for the style used by the device to
store strings in its registers.
o Full lengt h (space padded) (Default)
o C style (null terminated)
o Pascal style (includes length specifier)
Register type: Select either Binary or BCD for the register type being used.
o Binary (Default)
o BCD
Maximum address range: There are five sub-elements in this Maximum addressable registers box.
The maximum addressable registers can be obtained from the Modicon Concept or Modsoft
configuration programs. The PLC will ret urn an error if a register within the configured range is used
to read data but does not exist in the PLC. The MB TCP Communication Driver filters out registers
outside of this range and logs error messages.
28
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Discrete input Enter the maximum number of addressable Min = 1 (one) Max = 65536
discrete inputs (read coils) in the PLC (Default)
Coil Enter the maximum number of addressable Min = 1 (one) Max = 65536
write coils in the PLC. (Default)
Input register Enter the maximum number of addressable Min = 1 (one) Max = 65536
input registers in the PLC. (Default)
Holding register Enter the maximum number of addressable Min = 1 (one) Max = 65536
holding registers in the PLC. (Default)
Extended register Enter the maximum number of addressable Min = 1 (one) Max = 98303
extended registers in the PLC. (Default)
Block I/O size: The Block I/O Sizes box contains seven sub-elements. The Communication Driver uses
the Block I/O sizes to maximize data t hroughput. The MB TCP uses a 256 -byte buffer to read or writ e data
to the PLC. The maximum value is the maximum number of registers that can be read or written from/to
the PLC in one command.
Discrete input/coil Enter the maximum number of discrete inputs Min = 1 (one) Max = 1976
read or coils to read at one time. (Default)
Coil write Enter the maximum number of coils to write at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 123
read registers to read at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 100
write registers to write at one time. (Default)
Input register read Enter the maximum number of input registers Min = 1 (one) Max = 123
to read at one time. (Default)
Extended register Enter the maximum number of extended Min = 1 (one) Max = 122
read registers to read at one time. (Default)
Extended register Enter the maximum number of extended Min = 1 (one) Max = 120
write registers to write at one time. (Default)
TSXMomentum Connection
From the TCPIP _PORT branch of the Communication Driver hierarchy, you can also create a
TS XMoment um Connection.
To add TSXMomentum Connection to your MBTCP hierarchy
1. Right -click on your TCP IP_PORT branch, and select Add TSXMomentum Connection.
29
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
30
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Use Concept data structure s (Longs): Select to read data from the PLC in concept dat a structure
format for Long item types. If checked, the Communication Driver will process the data in the same
register order as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Use Concept data structure s (Reals): Select to read data from the PLC in concept data structure
format for Real item types. If checked, the Communication Driver will process the data in the same
register order as the Concept programming software.
o Checked – selected (Default)
o Not checked – not selected
Bit order format: The format of the bit order entered int o the PLC. There are four bit order formats
available for selection.
o B1 B2 … B16: (Default) Bit order is left to right (MSB = Bit 1; LSB = Bit 16)
o B16 B15 … B1: Bit order is right to left (MSB = Bit 16; LSB = Bit 1)
o B0 B1 … B15: Bit order is left to right (MSB = Bit 0; LSB = Bit 15)
o B15 B14 … B0: Bit order is right to left (MSB = Bit 15; LSB = Bit 0)
Register Order: The order of the PLC memory registers written to and read from, used to support
64-bit data types.
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, and R4 are the relative register addresses in the PLC.
String variable style: PLC string-data format. Select the option for the style used by the device to
store strings in its registers.
o Full lengt h (space padded) (Default)
o C style (null terminated)
o Pascal style (includes length specifier)
Register type: Select either Binary or BCD for the register type being used.
o Binary (Default)
o BCD
Maximum address range: There are five sub-elements in this Maximum addressable registers box.
The maximum addressable registers can be obtained from the Modicon Concept or Modsoft
configuration programs. The PLC will return an error if a register outside of this range is used to read
data. The MB TCP Communication Driver filters out registers outside of this range and logs error
messages.
Discrete input Enter the maximum number of addressable Min = 1 (one) Max = 65536
discrete inputs (read coils) in the PLC (Default)
31
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Coil Enter the maximum number of addressable Min = 1 (one) Max = 65536
write coils in the PLC. (Default)
Input register Enter the maximum number of addressable Min = 1 (one) Max = 65536
input registers in the PLC. (Default)
Holding register Enter the maximum number of addressable Min = 1 (one) Max = 65536
holding registers in the PLC. (Default)
Extended register Enter the maximum number of addressable Min = 1 (one) Max = 98303
extended registers in the PLC. (Default)
Block I/O size: This Block I/O Sizes box contains seven sub-elements. The Communication Driver
uses the block I/O sizes to maximize data throughput. The MB TCP Communication Driver us es a
256-byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete input/coil Enter the maximum number of discrete Min = 1 (one) Max = 1976
read inputs or coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e Min = 1 (one) Max = 800
at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 123
read registers to read at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 100
write registers to write at one time. (Default)
Input register read Enter the maximum number of input Min = 1 (one) Max = 123
registers to read at one time. (Default)
Extended register Enter the maximum number of extended Min = 1 (one) Max = 122
read registers to read at one time. (Default)
Extended register Enter the maximum number of extended Min = 1 (one) Max = 120
write registers to write at one time. (Default)
TSXPremium Connection
From the TCPIP _PORT branch of the Communication Driver hierarchy, you can also create a
TS XPremium Connection.
To add TSXPremium objecConnection ts to your MBTCP hierarchy
1. Right -click on your TCP IP_PORT branch, and select Add TSXPremium Connection.
o A new TS XPremium object is created as a node in the hierarchy tree.
o Default name is New_TS XP remium_000.
Note: You can add up to 1024 objects of this type to the hierarchy.
2. Rename as appropriate.
32
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
33
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
34
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Discrete input Enter the maximum number of addressable Min = 1 (Default) Min = 0
discrete inputs (read coils) in the PLC Max = 65536 Max = 65535
Input register Enter the maximum number of addressable Min = 1 (Default) Min = 0
input registers in the PLC. Max = 65536 Max = 65535
Holding register Enter the maximum number of addressable Min = 1 (Default) Min = 0
holding registers in the PLC. Max = 65536 Max = 65535
Block I/O size: The Block I/O Sizes box contains five sub-elements. The Communication Driver
uses the block I/O sizes to maximize data throughput. The MB TCP Communication Driver us es a
256-byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete Enter the maximum number of discrete inputs Min = 1 (one) Max = 1000
input/coil read or coils to read at one time. (Default)
Coil write Enter the maximum number of coils to writ e at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 123
read registers to read at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 100
write registers to write at one time. (Default)
Input register Enter the maximum number of input registers Min = 1 (one) Max = 123
read to read at one time. (Default)
ModbusPLC Connection
The ModbusPLC connection is created from the TCP IP_PORT branch of the Communication Driver
hierarchy. It is intended for PLCs/controllers that use the Modbus protocol but not in the list of Supported
MBTCP OI Server Hardware and Firmware on page 57. However, the PLCs/controllers need to conform
to and comply with the Modbus specifications as listed in Controller Function Codes on page 58, Modbus
Exception Codes on page 59, Controller Function Codes on page 58, and Data Types on page 49.
To add ModbusPLC Connection to your MBTCP hierarchy
1. Right -click on your TCP IP_PORT branch, and select Add ModbusPLC Connection.
o A new ModbusPLC object is created as a node in the hierarc hy tree.
o It is named New_ModbusPLC_000 by default.
2. Rename as appropriate.
35
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Note: The MB TCP Communication Driver uses port 502 as the default port number to contact the PLC.
The port number is configurable in this object. This will override the port setting in the parent
TCPIP _PORT object for this connectivity.
Reply timeout (sec): Enter the amount of time the server will wait for an ac knowledgment.
o The minimum value is 1 (one).
o The maximum value is 60.
o The default value is 3 (three).
Maximum outstanding message s: Enter the maximum number of outstanding messages in the
queue for the PLC.
o The minimum value is 1 (one).
o The maximum value is 20.
36
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: When the Support Multiple Register Write Parameter is not selected in the Generic PLC
configuration, it implies that the PLC does not support multiple register writes and the server will only
write single registers to the PLC.
This means items that contain more than one register cannot be written either. For ex ample, items such
as 4xxxxx L, 4xxxxx I, 4xxxxx U, 4xxxxx F, 4xxxxx -4xxxxx M, 5 HRL, 5 HRF, 5 PV, 5 HRU, and
4xxxxx-4xxxxx cannot be written. When you try to write to the PLC with this parameter not selected, the
following error message will be logged to the logger, "Cannot write to multiple register item: 4xxxxx L on
Node: TCPPort.GenP LC. The PLC configurable parameter Support Multiple Register Write is not
checked."
37
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
o B0 B1 … B15: Bit order is left to right (MSB = Bit 0; LSB = Bit 15)
o B15 B14 … B0: Bit order is right to left (MSB = Bit 15; LSB = Bit 0)
Register Order: The order of the PLC memory registers written to and read from, used to support
64-bit data types.
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, and R4 are the relative register addresses in the PLC.
Register size (digits): Select the correct register size for addressing the PLC.
o 4-digit is used for addressing the Modbus Generic 4-Digit PLCs.
o 5-digit applies to the Modbus Generic 5 -Digit PLCs.
o 6-digit is used for addressing the Modbus Generic 6-Digit PLCs. (Default )
Note: The selection for the Register size determines the maximum address range. They are changeable
as in other supported PLCs listed in Supported MBTCP OI Server Hardware and Firmware on page 57.
For 4-digit, the maximum value is 999; for 5-digit, the maximum value is 9999; for 6 -digit, the maximum
value is 65536.
String variable style: PLC string-data format. Select the option for the style used by the device to
store strings in its registers.
o Full lengt h ( space padded) (Default )
o C style (null terminated)
o Pascal style (includes length specifier)
Register type: Select either Binary or BCD for the register type being used.
o Binary (Default)
o BCD
Block I/O size: This Block I/O Sizes box contains four sub-elements. The Communication Driver
uses the block I/O sizes to maximize data throughput. The MB TCP Communicati on Driver us es a
256 byte buffer to read or write data to the PLC. The maximum value is the maximum number of
registers that can be read or written from/to the PLC in one command.
Discrete input/coil Enter the maximum number of discrete inputs Min = 1 (one) Max = 1976
read or coils to read at one time. (Default)
Coil write Enter the maximum number of coils to write at Min = 1 (one) Max = 800
one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 123
read registers to read at one time. (Default)
Holding register Enter the maximum number of holding Min = 1 (one) Max = 100
write registers to write at one time. (Default)
38
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
String-Data Handling
The MB TCP Communication Driver can process three different configurable string variable styles:
Full Length
C Style
Pascal
Depending on what string style the PLC is using, you can configure the server using the user interface in
the PLC configuration view in order to use the appropriate string variable style.
C Style
If a string is read using the C Style, the string always uses all of the registers allocated. The PLC stri ng is
stored in the server string as is, except that the last character contained in the last register of the string is
replaced with a null character (hex 00).
If a string is written and the string is shorter than the allocation of registers, it is padded with ASCII null
characters (hex 00).
For example:
If the string "Communications" is stored in the string item "400001-400010 m," registers 400001 through
400005 contain the string "Communications" and registers 400006 through 400010 contain nulls.
If the string "Communications" is stored in the string item "400001-400005 m," registers 400001 through
400005 contain the truncated string "Wonderwar0" with a null character replacing the last character "e."
A message is placed in the logger indicating that the string was truncated.
Pascal Style
If strings are read using the Pascal Style, each string uses a length obtained from the first byte of the
string to store data in the server. The PLC string is stored in the server string as is, up to the length
obtained from the first byte of the string. If the lengt h is greater than the number of registers defined in the
item, then the PLC string is stored in the server string as is, up to the maximum number of registers.
The first byte written of any string of this style contains the character count. The string being written starts
in the second byte. If a string is written and the string plus the character count are shorter than the
allocation of registers, it is padded with ASCII null characters (hex 00).
For example:
39
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
If the string "Communications" is stored in the string item "400001-400010 m," registers 400001 through
400006 contain the string "(10)Communications0" and registers 400007 through 400010 contain nulls.
The (10) in the string implies one byte cont aining the character count.
If the string "Communications" is stored in the string item "400001-400005 m," registers 400001 through
400005 contain the truncated string "(9)Communication."
A message is placed in the logger indicating that the string was truncated.
Message Optimization
The MB TCP Communication Driver uses Multi read and write commands to optimize PLC read/ write
messages. The MB TCP Communication Driver optimizes the reading and writing of data by grouping
points that are in consecutive registers. The Block I/O sizes parameters control the buffer size. The
default is to maximize the buffer size.
Note: The number of bytes for the query and response buffers must not exceed the Modbus maximum
buffer size of 256 bytes.
40
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
6. Enter or use the device browser to select the primary and secondary devices. Save the hierarchy
node configuration by clicking on the save icon.
Note: The primary device and secondary device must be a PLC object, and not the Port or Bridge
objects.
Note: Unsolicited message configuration is not supported from the device redundant hierarchy.
Important: A Ping item must be specified and be a valid tag in both the primary and secondary
controllers to determine the connection status for $SYS$Status. The Ping item can be a static item in the
devic e such as a firmware version or proc essor type. If the Ping item is invalid or does not exist in the
controller, the failover operation may not work correctly as the value of $SYS$Status may continue to
stay as FALSE in the standby device.
Important: For DDE/SuiteLink, it is strongly recommended that eac h device group (topic) definition
contain a unique name for the PLC associated with it. The OPC, however, has the flexibility to use any
names, including duplicate names, for the device group definitions.
Each device group (topic) definition should contain a unique name for the PLC associated with it.
The Device Groups dialog box, which is displayed by clicking the Device Groups tab in the
New_< Name>P LC_000 Parameters configuration view, is used to perform the following activities:
Adding, defining, and deleting device groups.
41
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
Note: When you add a new device group, ent er a unique name.
Note: When you select another part of the Communication Driver tree hierarchy, you are prompt ed to
save the modifications to the configuration set.
Note: When you select another part of the MB TCP Communication Driver tree hierarchy, you are
prompted to save the modifications to the configuration set.
1. Click on the PLC’s name in the PLC branc h of the Communic ation Driver hierarchy.
2. Select the Device Group tab of the configuration view pane at right.
3. Add a new device group or select an existing device group.
4. Right -click on the devic e group name, then select Edit from the shortcut menu.
42
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
5. In the Device Group Parameters dialog box, select the Support Unsolicited Messages check box.
6. Click the OK button to close the dialog box.
Note: Since the status of Support Unsolicited Messag es check box cannot be readily viewed from the
Device Groups tab, proper naming of device groups which support unsolicited messages is strongly
recommended. Unsolicited messages are only supported in the base instance of the Communication
Driver (the instance of the Communication Driver without the custom name).
7. Save the configuration change by clicking the Save icon located at the upper-right corner of the
configuration view pane.
Note: For more information on unsolicited messages, see Unsolicited Message Handling on page 47.
Note: When you select another part of the MB TCP Communication Driver tree hierarchy, you are
prompted to save the modifications to the configuration set.
Each configuration view associated with nodes/objects in the Communication Driver hierarchy tree has a
common feat ure, the Save button.
43
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
1. When you modify any parameters in the Device Gro ups dialog box, click Save to save and
implement the new modifications.
o If you do not click Save, the configuration is reset to its original condition (since the last save).
2. After all modifications, you must save when prompted for the new data t o be saved to the
configuration set.
Holding1 400001
Holding10F 400010 F
Note: When you create or add a new device item, a unique name needs to be entered for it.
Once the Device Items feature is utilized to configure item names, the Communication Driver gains the
capability to browse OP C Items. When the Communication Driver is running and an OP C client requests
item information, the configured items will show up under the PLC hierarchy node.
To create or add device items
1. Right -click in the Device Items dialog box.
2. Select the Add command from the shortcut menu.
o A device item is created in the Name column, and it is numerically named by default.
For example, Item_0, It em_1, and so on.
3. Change the default name by double -clicking on it and entering the new name.
o Enter a unique name for the new device item.
For example, "Holding1."
To add item references
Item references for eac h of the device items that have been created can be added as follows:
44
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
1. In the Item Reference column, double -click on the area in the same horizontal line as the selected
devic e item.
2. Type in the actual PLC item name in the frame that appears.
o For example, "400001."
3. Click anywhere in the dialog box or press the ENTER key to have the change take effect.
Note: System items are not valid item references, but Communication Driver -specific system items are
valid.
Note: When you select another part of the MB TCP Communication Driver tree hierarchy, you are
prompted to save the modifications to the configuration set.
45
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
o The file name has defaulted into "PLC Hierarchyname.cs v," within the
current-system-configured default directory.
3. Accept the defaults to save the file.
o The file is saved as New_<PLC Name>_000.cs v.
o It is editable in Microsoft Excel.
However, if you prefer to save the list someplace else and rename it, perform the following steps
after step 2.
4. Select the folder int o which the list is to be saved.
5. Name the list to be archived.
6. Click the Save button.
o The whole list will be saved as a .csv file in Excel.
The file can now be edited off-line. It contains one row for each item configured with two
columns, Name and Item Referenc e, respectively.
To import device items
1. To import the list, right-click anywhere in the Device Items dialog box.
2. Select the Import command from the shortcut menu.
3. Select the archived list (.csv file) to be imported from the folder in which it is saved.
4. Click the Open button.
o The whole list will be brought into the Device Items dialog box.
Note: When the list to be imported contains duplicate names as found in the current list but the Item
Referenc es are different, a dialog box will appear to prompt you to make a selection.
o While imported files are processed, new item references will be added, based on unique names.
46
Configuring the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
If there are duplicat e names, you will be provided with the option to replace the existing entry with the
new entry, or ignore the new entry.
47
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideConfiguring the MBTCP Communication Driver
With unsolicited messaging enabled (the default), you can use the Device Groups dialog to configure
unsolicited messaging as a Device Group parameter for the PLC nodes directly connected to the
TCPIP _Port node.
For the step-by-step procedure to configure the Device Group to rec eive unsolicited messages, see
Device Group Definitions on page 41.
48
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
C HAPTER 3
MBTCP OI Reference
Data Types
The MB TCP Communication Driver supports the following generic data types:
Boolean
16-bit signed int eger
16-bit unsigned integer
32-bit signed int eger
32-bit unsigned integer
ASCII string
32-bit single precision floating point
64-bit floating point
64-bit unsigned integer
64-bit signed int eger
Clients advising data values from the MB TCP Communication Driver can subscribe to tags in these
64-bit data-types using specific item syntax. The MBTCP Communication Driver reads four cons ecutive
registers in the P LC to get a 64-bit value. Thes e registers are read in four register orders:
o Order 1: R1 R2 R3 R4 (Default)
o Order 2: R2 R1 R4 R3
o Order 3: R3 R4 R1 R2
o Order 4: R4 R3 R2 R1
where R1, R2, R3, R4 are the registers. You can select the order in which the registers are to be read.
Comparison examples of zero- and one-based addressing:
49
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
400001 00001
400001 00000
400002 00001
50
MBTCP OI Reference AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: The unsigned integer data type "U" has a valid range of 0 (zero) to 2147483647 when accessed
through DDE/SL client; for OP C clients the valid range is from 0 to 4294967295. System -defined types
are not supported as block reads. A read on any of these dat a types returns only the first element.
The following table lists the PLC register types, the data types contained in the registers, and what each
is processed as.
PLC Regi ster Type Data Type Contained in the Register Processed As
51
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
TSX Premium
(1-ba sed TSX Premium
Register addressing) (0-ba sed
Type [Default] addressing) Tag Type Acce ss
52
MBTCP OI Reference AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: The x in the Extended register number indicates the file number, where x = 0 implies file number 1,
x = 1 implies file number 2, up to x = 9 implies file number 10. The extended memory size in the PLC
determines how many extended memory files exist. Each file contains up to 10000 registers. The last file
in the PLC will always contain less than 10000 registers.
For example:
A 24K-extended-memory-size PLC contains three (3) files, where the last file cont ains 4576
registers.
A 72K-extended-memory-size PLC contains eight (8) files, where the last file contains 3728
registers.
A 96K-extended-memory-size PLC contains 10 files, where the last file contains 8304 registers.
1K is 1024 registers.
53
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
400001 When no spaces and no letters follow the register number, the register cont ents
are treated as a 16-bit unsigned quantity.
400001 S When a space and the letter "S" follow the register number, the register contents
are treated as a 16-bit signed quantity.
400001 I When a space and the letter "I" follow the register number, the register contents
are treated as a 32-bit signed quantity.
This takes up two consecutive registers.
400001 L When a space and the letter "L" follow the register number, the register contents
are treated as a 32-bit signed quantity.
This takes up two consecutive registers.
400001 F When a space and the letter "F" follow the register number, the register contents
are treated as a floating-point quantity.
This takes up two consecutive registers.
400001 U When a space and the letter "U" follow the register number, the register contents
are treated as a 32-bit unsigned quantity.
This takes up two consecutive registers.
400001 LF When a space and the letter "LF", follows the register number, the register
contents are treated as a 64-bit floating-point quantity. This takes up four
consecutive registers.
400001 LL When a space and the letter "LL", follows the register number, the register
contents are treated as a 64-bit signed quantity. This takes up four consecutive
registers.
400001 UL When a space and the letter "UL", follows the register number, the register
contents are treated as a 64-bit unsigned quantity. This takes up four consecutive
registers.
400001-400003 When a space and the letter "M" follow the register number or register number
M pair separated by a dash, the register contents are treated as ASCII data.
Each register contains up to two (2) ASCII characters.
This example represents six (6) ASCII characters.
300001:10 When a colon and a number from 1 (one) to 16 follow the register number, the
register contents are treated as discrete data.
This example represents bit 10 of the input register 300001.
54
MBTCP OI Reference AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
The IR and HR absolute notation can also be combined with the following conversions: L (long), F
(floating), S (signed), or U (unsigned).
For example:
219 HRS 16-bit signed int eger
000 HRL 32-bit signed int eger
100 HRF 32-bit floating point
000 HRU 32-bit unsigned integer
100 HRLF 64-bit floating point
000 HRLL 64-bit signed int eger
000 HRUL 64-bit unsigned integer
55
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
When grouping three consecutive registers for interpretation as a single numeric quantity, overflow
becomes a possibility.
The largest number that may be represent ed in the PLC with three consecutive Modulo -10000
registers is 999, 999, 999, 999; however, the largest number that can be contained in an integer -type
variable is 2,147,483,647. The latter number is used by the OI Server to represent an overflow
condition.
Therefore, the maximum us able value represented in three Modulo -10000 registers is
2,147, 483,646 or (<21><4748><3646>). Any number larger than this will be clamped at
2,147, 483,647.
56
MBTCP OI Reference AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
TS X Quantum 140 CPU 21304 Cont roller Exec ID 0871 HID 0405 Rev
02.10
57
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
58
MBTCP OI Reference AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
Note: In communicating with the Generic Modbus PLCs, the MB TCP Communication Driver acts as a
master and sends out the function codes to the PLCs.
01 (0x01) Read Coils Reads the ON/OFF status of discrete outputs (0X references, coils) in
the slave.
02 (0x02) Read Discret e Reads the ON/OFF status of discrete inputs (1XXXXX references) in
Inputs the slave.
03 (0x03) Read Holding Reads the binary contents of holding registers (4XXXXX referenc es)
Registers in the slave.
04 (0x04) Read Input Reads the binary contents of input registers (3XXXXX references ) in
Registers the slave.
05 (0x05) Write Single Forces a single coil (0X reference) to either ON or OFF.
Coil
06 (0x06) Write Single Presets a value into a single holding register (4XXXXX reference).
Register
15 (0x0F) Write Multiple Forces each coil (0XXXXX reference) in a sequence of coils to either
Coils ON or OFF.
16 (0x10) Write Multiple Presets values into a sequence of holding registers (4XXXXX
Registers references).
20 (0x14) Read General Returns the contents of registers in the Extended Memory file
Referenc e (6XXXXX) references.
21 (0x15) Write General Writes the contents of registers in the Extended Memory file
Referenc e (6XXXXX) references.
22 (0x16) Mask Write Modifies the contents of a specified (4XXXXX reference) holding
Holding register using a combination of an AND mask, an OR mask, and the
Register register’s current contents. The function can be used to set or clear
individual bits in the register.
Exception
Code
(Hex) Name Explanation
01 ILLEGAL The function code received in the query is not an allowable action for the
FUNCTION slave. This may be bec ause the function code is only applicable to newer
controllers, and was not implement ed in the unit selected. It could als o
indicate that the slave 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.
59
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide MBTCP OI Reference
Exception
Code
(Hex) Name Explanation
02 ILLEGAL DA TA The data address received in the query is not an allowable address for
ADDRESS the slave. More specifically, the combination of reference number and
transfer length is invalid. For a controller with 100 registers, a request
with offset 96 and lengt h 4 would succee d, a request with offset 96 and
length 5 will generate exception 02.
03 ILLEGAL DA TA A value contained in the query data field is not an allowable value for the
VALUE slave. 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, since the
MODB US protocol is unaware of the significance of any particular value
of any particular register.
04 ILLEGAL Indicates that the request as framed would generate a res ponse whose
RESPONSE size exceeds the available MODBUS data size. Used only by functions
LENGTH generating a multi-part response, such as functions 20 and 21.
05 ACKNOWLE DGE Specialized use in conjunction with programming commands.
0A GATEWAY PATH Specialized use in conjunction with gateways; it indicates that the
UNAVA ILABLE gateway was unable to allocate a Modbus Plus PATH to use to proc ess
the request. It usually means that the gateway is misconfigured.
TCP Port
The MB TCP Communication Driver uses port 502 as the default to contact all PLCs. This includes the
port used for unsolicited messages from the PLCs that are programmed to provide unsolicited data (that
is, the PLCs that are directly connected to the TCPIP _PORT; controllers under the ModbusBridge Object
hierarchy cannot utilize this unsolicited messaging feature).
However, you have the option to configure the actual port to be used through the ModbusPLC object.
When a non-502 port is used by the Generic Modbus PLC to communicate with the MB TCP
Communication Driver, it will not be able to send unsolicited data to the Communication Driver.
60
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
C HAPTER 4
Troubleshooting the MBTCP
Communication Driver
61
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideTroubleshooting the MBTCP Communication Driver
62
Troubleshooting the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
63
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideTroubleshooting the MBTCP Communication Driver
64
Troubleshooting the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
CreateItem failed The server The client defined The client must DASProtFail
due to invalid item encountered an invalid an invalid item define a valid
name <PLC item name. name. item name.
name>.<Item
Name>.
DASMB TCP failed to The server could not Too many items Stop unwant ed DASProtFail
allocate memory. allocate memory to have been programs,
continue operating. defined by client define less
or too many points by client,
programs are or add more
running in this memory to the
PC. PC.
DASMB TCPPLCSoc The PLC returned an The PLC may be Check the PLC. DASProtFail
ket::OnSocketRead( error code on a request having problems.
1) failed with for data.
errorcode <Error
code>.
DASMB TCPPLCSoc The PLC returned an The PLC may be Check the PLC. DASProtFail
ket::OnSocketRead( error code on a request having problems.
2) failed with for data.
errorcode <Error
code>.
DASMB TCPPLCSoc The PLC returned an The PLC may be Check the PLC. DASProtFail
ket::OnSocketRead( error code on a request having problems.
3) failed with for data.
errorcode <Error
code>.
DASMB TCPPLCSoc The PLC returned an The PLC may be Check the PLC. DASProtFail
ket::OnSocketWrite error code on a write to having problems.
failed with errorcode PLC command.
<Error code>.
Error in Reading The PLC returned an The PLC may be Check the PLC. DASProtFail
from PLC for item exception. having problems.
<PLC name>.<Item
Name>.
Error in Writing to The PLC returned an The PLC may be Check the PLC. DASProtFail
PLC for item <PLC exception. having problems.
name>.<Item
Name>.
Fail to Connect to The host name used in Invalid IP A valid host DASProtFail
PLC <PLC name> at the IP Address field is Address was name or IP
IP Address <Host invalid. configured. Address must
name>, error code = be configured.
<Error code>.
Failed to retrieve The host name used in Invalid IP A valid host DASProtFail
host information from the IP Address field is Address was name or IP
a host database. invalid. configured. Address must
Error code = <Error be configured.
65
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideTroubleshooting the MBTCP Communication Driver
Failed to split the A message returned by The message Increase the DASProtFail
message from the PLC was not found may have timed Reply Timeout
ReceiveB uffer for in the requested out and was timer.
Sequence Number messages queue. removed from the
<Sequence queue.
Number>, message
possibly revoked.
Invalid value read for The Modulo-10000 The maximum Check the PLC DASProtWar
Mod 10000 register: point value overflows. usable value for the value in n
<Item Name> on The value is clamped represented in the registers.
Node: <PLC Name>. to 2147483647 to three
Not a valid indicate overflow Modulo-10000
BCD-value. condition. registers is
Convert to 2,147, 483,646.
2147483647.
Read value beyond The Modulo-10000 The maximum Check the PLC DASProtWar
limits for Mod 10000 point value overflows. usable value for the value in n
register: <It em The value is clamped represented in the registers.
Name> on Node: to 9999. one
<PLC Name>. Value Modulo-10000
clamped to 9999. registers is 9999.
rec v() failed with The PLC responded The PLC may be Check the PLC DASProtFail
errorcode <Error with an error. down or there is a and the
Code>. communications communication
problem. s link.
Register Type is The Register Type The user modified The Register DASProtWar
hot-configured to parameter was the Register Type Type parameter n
<Register type>. modified at run time. parameter while can be modified
the server was at run time.
running.
Reply Timeout is The Reply Timeout The user modified The Reply DASProtWar
hot-configured to parameter was the Reply Timeout n
<Reply timeout modified at run time. Timeout parameter can
value>. parameter while be modified at
the server was run time.
running.
66
Troubleshooting the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
String Variable Style The String Variable The user modified The String DASProtWar
is hot-configured to Style parameter was the String Variable Style n
<String variable modified at run time. Variable Style parameter can
style>. parameter while be modified at
the server was run time.
running.
The item name The item name is A non-numeric Make register a DASProtFail
<PLC Name>.<Item invalid. register was numeric
Name> is Invalid. It defined where register.
is non-numeric. numeric was
required.
The item name The item name has an The client defined The item bit DASProtFail
<PLC Name>.<Item invalid bit number. an item with an number must
Name> is invalid. invalid bit be bet ween 1
The bit number is number. (one) and 16.
invalid.
The item name The item name has an The client defined The item bit DASProtFail
<PLC Name>.<Item invalid bit number. an item with an number must
Name> is invalid. invalid bit be bet ween 1
The bit number is out number. (one) and 16.
of range.
The item name The server The client defined The client must DASProtFail
<PLC Name>.<Item encountered an invalid a data type not use a valid data
Name> is invalid. data type. supported by the type.
The data type is server.
invalid.
The item name The Modulo-10000 The client defined The client must DASProtFail
<PLC Name>.<Item item defined by the an invalid item use two or three
Name> is invalid. client exceeds the 3 name. registers when
The register range is register limit. defining
invalid. Modulo-10000
item names.
The item name The server trunc ated Not enough Add more DASProtFail
<PLC Name>.<Item the string being written registers were registers or
Name> written string to the PLC. defined by the write less data.
value <String Value> client to hold the
was trunc ated to string data being
<Truncated String written.
Value>. Not enough
registers were
defined to hold the
string value.
67
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideTroubleshooting the MBTCP Communication Driver
The PLC <PLC The server did not get The PLC is offline Check PLC's DASProtFail
Name> message a response from the or the data network
timed out PLC in the request has an connection or
(OnP LCReceiverTim <Reply Timeout> invalid register configuration
eout), revoking allotted time. number obtained file.
message <Message from the
ID>. configuration file.
The PLC <PLC The function code This may be Check the item DASProtFail
name> reported received in the query is because the definition and
receiving an not an allowable action function code is PLC
ILLEGAL for the slave. only applicable to configuration.
FUNCTION code newer controllers,
from the OI Server. and was not
PLC errorcode 01. implemented in
the unit selected.
It could also
indicate that the
slave 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.
The PLC <PLC The data address The item address Check the item DASProtFail
name> reported received in the query is is out of the definition and
receiving an not an allowable configured-slave PLC
ILLEGAL DA TA address for the slave. address range, or configuration.
ADDRESS from the the combination
OI Server. PLC of reference
errorcode 02. 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.
The PLC <PLC A value contained in This indicates a Check the data DASProtFail
name> reported the query data field is fault in the value sent to
receiving an not an allowable value structure of the the PLC.
ILLEGAL DA TA for the slave. remainder of a
68
Troubleshooting the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
The PLC <PLC An unrecoverable error Indicates that the Check the PLC. DASProtFail
name> reported occurred while the request as
ILLEGAL slave was attempting framed would
RESPONSE to perform the generate a
LENGTH while requested action. response whose
working on the size exceeds the
current request. PLC available
errorcode 04. MODB US data
size.
The PLC <PLC The slave has This response is Check the PLC. DASProtFail
name> reported accepted the request returned to
ACKNOWLE DGE and is processing it, prevent a timeout
while working on the but a long duration of error from
current request. PLC time will be required to occurring in the
errorcode 05. do so. client (or master).
The PLC <PLC The slave is engaged The PLC program Check the PLC. DASProtFail
name> reported in processing a is taking too long
SLAVE DEVICE long-duration program to respond to the
BUSY and cannot command. OI Server.
process the current
request. PLC
errorcode 06.
The PLC <PLC The slave cannot The Check the PLC. DASProtFail
name> reported perform the program communications
NEGA TIVE function received in the data is corrupted
ACKNOWLE DGE query. or a OI Server
and cannot process problem is
the current request. encountered.
PLC errorcode 07.
The PLC <PLC The slave attempted to The PLC may Check the DASProtFail
name> reported read extended need to be PLC's extended
MEMORY PARITY memory, but detected serviced. memory.
ERROR while a parity error in the
attempting to read memory.
extended memory.
PLC errorcode 08.
The PLC <PLC Specialized use in It usually means Check the DASProtFail
name> reported conjunction with that the gateway Bridge
GATEWAY PATH gateways; it indicates is misconfigured. connected to
UNAVA ILABLE that the gateway was the PLC.
while attempting to unable to allocat e a
read extended Modbus Plus PATH to
memory. PLC use to process the
69
AVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User GuideTroubleshooting the MBTCP Communication Driver
The PLC <PLC Specialized use in It usually means Check the DASProtFail
name> reported conjunction with that the device is Bridge
GATEWAY TARGE T gateways; it indicates not present on the connected to
DEVICE FAILED TO that no response was network. the PLC.
RESPOND while obtained from the
attempting to read target device.
extended memory.
PLC errorcode 0B.
The PLC <PLC The PLC returned an The Check the PLC. DASProtFail
name> reported unknown error code. communications
unknown exception data is corrupted.
code. PLC errorcode
<Error Number>.
The property The RegisterSize The entry in the Use the OI DASProtFail
RegisterSize value value in the file was modified Server
<Value> is invalid for configuration file is manually. Manager to
PLC <PLC Name>. invalid. rebuild the file.
The register number The register defined by The client defined Client must use DASProtFail
for the item name the client is out of an invalid register a register
<PLC name>.<Item range compared to the number. number less
Name> exceeds the maximum addressable than or equal to
configured PLC register number. the configured
Maximum maximum
Addressable addressable
Registers. register.
The socket is The connection to the The PLC or the Check the PLC DASProtFail
marked as PLC failed. network may be or the network.
nonblocking and the having problems.
connection cannot
be completed
immediat ely for host
<Host name>.
The write Item <Item The register being The client is Select a DASProtFail
Name> is invalid. written t o is a read-only writing to a different
The item is a read register. read-only register.
only item. register.
Write attempt The output value was The client wrote a The client must DASProtFail
beyond limits for clamped to a value to the PLC write a smaller
Mod 10000 register: predefined value that was too large value.
<Item Name> on because the output for the register.
Node: <PLC Name>. value exceeded certain
Value clamped to limits.
<new value>.
70
Troubleshooting the MBTCP Communication DriverAVEVA™ Communication Drivers Pack – Modicon - MBTCP Driver User Guide
71