You are on page 1of 396

FactoryLink

Version 8.0




























Device Interfaces - OPC and
Other Guide




Disclaimer of Liability
The information contained in this document (and other media provided
herewith) constitutes confidential information of Siemens AG and is
protected by copyright laws and international copyright treaties, as well
as other intellectual property laws and treaties. Such information is not to
be disclosed, used or copied by, or transferred to, any individual,
corporation, company or other entity, in any form, by any means or for
any purpose, without the express written permission of Siemens AG.
The information contained in this document and related media
constitutes documentation relating to a software product and is being
provided solely for use with such software product. The software product
was provided pursuant to a separate license or other agreement and
such information is subject to the restrictions and other terms and
conditions of such license or other agreement.
The information contained in this document and related media is subject
to change without notice and does not represent a commitment and does
not constitute any warranty on the part of Siemens AG. Except for
warranties, if any, set forth in the separate license or other agreement
relating to the applicable software product, Siemens AG makes no
warranty, express or implied, with respect to such information or such
software product.

Trademarks
Siemens AG and FactoryLink are trademarks or registered trademarks of
Siemens AG in the United States and/or other countries. All other brand
or product names are trademarks or registered trademarks of their
respective holders.

Siemens AG Copyright © Siemens AG 2007.


Automation and Drives 0829/2007 Technical data subject to change
Postfach 48 48
90327 NÜRNBERG
GERMANY
Contents

Chapter 1 Device Interface Overview ........................................................................... 1


Supported Drivers ................................................................................................................. 1
Guidelines for Driver Technology Selection ........................................................................ 6

Chapter 2 KTDTL and NetDTL .................................................................................... 7


Overview .............................................................................................................................. 7
Offlink Addressing ............................................................................................................... 9
KTDTL Topology ............................................................................................................... 12
NetDTL Topology .............................................................................................................. 15
Setting Up FactoryLink ...................................................................................................... 18
Configuring System Configuration Table .................................................................. 18
Optimizing Task Performance .................................................................................... 19
Configuring Communication Paths .................................................................................... 20
Logical Station Concepts ........................................................................................... 20
Allen-Bradley NetDTL Driver ........................................................................................... 22
Station Control Table ................................................................................................. 22
Ethernet Address Information Table .......................................................................... 24
Station Information Table .......................................................................................... 25
KTDTL Driver .................................................................................................................... 29
Station Control ........................................................................................................... 29
Station Information .................................................................................................... 29
Sample Logical Station Table Entries ........................................................................ 33
Logical Station Entries ............................................................................................... 41
Reading and Writing Data .................................................................................................. 45
Reading Data from a Device ...................................................................................... 46
Writing Data to a Device ........................................................................................... 48
Configuration Tips and Techniques ........................................................................... 51
Configuring Triggered Read, Block Write, Exception Write ............................................. 56
Read/Write Control Table .......................................................................................... 56
Read/Write Information Table .................................................................................... 62
Configuring an Unsolicited Read ....................................................................................... 63
Unsolicited Read Operation Concepts ....................................................................... 63
Unsolicited Read Control Table ................................................................................. 69

FactoryLink Device Interfaces - OPC and Other Guide / iii






Unsolicited Read Information Table .......................................................................... 70
Sample Read and Write Table Entries ................................................................................ 72
Techniques for Improving Communication Performance .................................................. 80
Specifying Priority ..................................................................................................... 80
Overtriggering ........................................................................................................... 80
Efficient Triggering .................................................................................................... 81
Allen-Bradley Data Types and Addresses .......................................................................... 85
Supported Data Types ......................................................................................................... 86
Address Specification Formats .................................................................................. 87
PLC-3 File Type Reference ........................................................................................ 89
PLC-5 File Type Reference ........................................................................................ 90
PLC-5/250 File Type Reference ................................................................................. 95
SLC 500 File Type Reference ................................................................................... 100
Program Arguments .......................................................................................................... 102
Messages and Codes ......................................................................................................... 104
Status Messages ....................................................................................................... 104
Error Messages ........................................................................................................ 105
Allen-Bradley Return Codes .................................................................................... 107

Chapter 3 Enhanced Communication Interface (ECI/OPC).................................. 109


Overview .......................................................................................................................... 109
Basic Concepts ................................................................................................................. 111
Read and Write Procedures ..................................................................................... 113
Action=Reaction ...................................................................................................... 116
EDI Drivers, RAPD, and OPC Data eXchange ...................................................... 117
TagArray Concept .................................................................................................... 121
Exception <=> Encoded Write ................................................................................ 123
Indirect Addressing with Unsolicited Read ............................................................. 125
General Rules .......................................................................................................... 126
Configuration Tables ........................................................................................................ 128
ECI/OPC Object Control ......................................................................................... 128
ECI/OPC Object Information .................................................................................. 134
Tag/Item Addressing and Conversion Code ..................................................................... 146
Hexadecimal and Octal Tag Addresing ................................................................... 146
Intel <=> Motorola Format and Composite Object .......................................................... 150
Dataset Layout for Timestamps ........................................................................................ 152
Dataset or OPC Group Write Procedures ......................................................................... 154

iv / FactoryLink Device Interfaces - OPC and Other Guide


Dataflow PLC <=> RAPD/OPC <=> ECI <=> Database ................................................ 155
Sample Tables for Standard Drivers ................................................................................. 156
Allen-Bradley RSLinx Driver ................................................................................... 157
Modbus Ethernet Driver .......................................................................................... 158
Saia S-BUS Driver ................................................................................................... 160
Siemens Sinec-H1 Driver ......................................................................................... 161
Siemens SIMATIC S7-Protocol Driver .................................................................... 162
Sample Tables for OPC Data eXchange with ODX ......................................................... 164
Emulation of RAPD and EDI Drivers ..................................................................... 164
OPC-Specific Configuration Tables ........................................................................ 166
Sample Application Translation IOX –>ECI ................................................................... 168
IOX Conversion Code -> ECI Rd/Wr Code ............................................................. 169
Dataset Exchange in Redundant System with VRN ........................................................ 171
Data Embedding and Function Merge .............................................................................. 172
Write/Output Triggering by Function TRxxx=vvv .......................................................... 174
Array Handling by Function ARYnnn:x:y:z .................................................................... 176
Statistical Functions XR, XP, XF, XT, XA, XS ................................................................ 177
Summary .......................................................................................................................... 179
OPC Data Translation => Method: RAPD/EDI and OPC Specific ....................... 179
OPC-Specific Table Overview ................................................................................. 179
Control Table Summary ........................................................................................... 180
Information Table Summary .................................................................................... 181
Terms ................................................................................................................................ 185
Program Arguments .......................................................................................................... 187
Information and Error Messages ...................................................................................... 190

Chapter 4 FLGEM.................................................................................................... 195


Overview .......................................................................................................................... 195
FLGEM Port Definition Table .......................................................................................... 195
Accessing ................................................................................................................. 195
Field Descriptions ................................................................................................... 195
FLGEM Device Definition Table ..................................................................................... 199
Accessing ................................................................................................................. 199
Field Descriptions ................................................................................................... 199
FLGEM Variable Definitions Table ................................................................................. 200
Accessing ................................................................................................................. 200
Field Descriptions ................................................................................................... 200
FLGEM Limits Monitoring Table .................................................................................... 203

FactoryLink Device Interfaces - OPC and Other Guide / v






Accessing ................................................................................................................. 203
Field Descriptions ................................................................................................... 203
FLGEM Equipment Control/Status Table ........................................................................ 204
Accessing ................................................................................................................. 204
Field Descriptions ................................................................................................... 204
FLGEM Collection Events Table ..................................................................................... 207
Accessing ................................................................................................................. 207
Field Descriptions ................................................................................................... 207
FLGEM Collection Event Reports Table ......................................................................... 209
Accessing ................................................................................................................. 209
Field Descriptions ................................................................................................... 209
FLGEM Alarms Table ...................................................................................................... 210
Accessing ................................................................................................................. 210
Field Descriptions ................................................................................................... 210
FLGEM Event Reports Table ........................................................................................... 212
Accessing ................................................................................................................. 212
Field Descriptions ................................................................................................... 212
FLGEM Report Detail Table ............................................................................................ 213
Accessing ................................................................................................................. 213
Field Descriptions ................................................................................................... 213
FLGEM Trace Reports Table ........................................................................................... 214
Accessing ................................................................................................................. 214
Field Descriptions ................................................................................................... 214
FLGEM Trace Detail Table .............................................................................................. 215
Accessing ................................................................................................................. 215
Field Descriptions ................................................................................................... 215
FLGEM Remote Commands Table .................................................................................. 216
Accessing ................................................................................................................. 216
Field Descriptions ................................................................................................... 216
FLGEM Remote Commands Detail Table ....................................................................... 217
Accessing ................................................................................................................. 217
Field Descriptions ................................................................................................... 217
FLGEM Terminal Messages Table ................................................................................... 218
Accessing ................................................................................................................. 218
Field Descriptions ................................................................................................... 218
FLGEM Message Detail Table ......................................................................................... 219
Accessing ................................................................................................................. 219
Field Descriptions ................................................................................................... 219

vi / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM SECS-II Message Definition Control Table ...................................................... 220
Accessing ................................................................................................................. 220
Field Descriptions ................................................................................................... 220
FLGEM SECS-II Message Definition Information Table ................................................ 221
Accessing ................................................................................................................. 221
Field Descriptions ................................................................................................... 221
FLGEM SECS Read/Write Control Table ........................................................................ 224
Accessing ................................................................................................................. 224
Field Descriptions ................................................................................................... 224
FLGEM Process Programs Table ..................................................................................... 226
Accessing ................................................................................................................. 226
Field Descriptions ................................................................................................... 226
FLGEM Data Sets Table .................................................................................................. 231
Accessing ................................................................................................................. 231
Field Descriptions ................................................................................................... 231
Technical Notes ................................................................................................................ 233
Custom Message Specific ........................................................................................ 233
Installation ............................................................................................................... 236
GWGEM Required Equipment Constants and Status Variables .............................. 237
Program Arguments .......................................................................................................... 247
Run-Time Application Messages ..................................................................................... 248
Start-Up Errors ........................................................................................................ 248
Run-Time Messages ................................................................................................. 250

Chapter 5 MECOM................................................................................................... 251


Overview .......................................................................................................................... 251
Required Hardware and Software .................................................................................... 253
Hardware ................................................................................................................. 253
Software ................................................................................................................... 253
Installing The Mitsubishi PLC-driver .............................................................................. 254
Enabling Ethernet Communication ......................................................................... 254
Installation ............................................................................................................... 254
Add Data in System Configuration .......................................................................... 254
Upgrading ................................................................................................................ 255
PLC Configuration ........................................................................................................... 256
Mitsubishi Definition Tables ............................................................................................ 258
Communication Task Definition Table ..................................................................... 258

FactoryLink Device Interfaces - OPC and Other Guide / vii






Remote Station Definition Table .............................................................................. 260
PLC Definition Table ............................................................................................... 261
Mitsubishi Read Tables .................................................................................................... 263
Read Header Table .................................................................................................. 263
Read Table ............................................................................................................... 265
Mitsubishi Write Tables .................................................................................................... 266
Write Header Table .................................................................................................. 266
Write Table ............................................................................................................... 269
Minimum Configuration Example ........................................................................... 271
Function Description ........................................................................................................ 272
Startup ...................................................................................................................... 272
Stand-alone Validation ............................................................................................. 272
Transfer of Data ....................................................................................................... 273
Modem Usage .......................................................................................................... 278
Sharing the Communication .................................................................................... 281
Optimization Methods .............................................................................................. 282
Trace ........................................................................................................................ 283
Messages .................................................................................................................. 283
Program Arguments ................................................................................................. 284
Communication Guide ..................................................................................................... 285
Serial Communication without Modem ................................................................... 285
Serial Communication with Modem ........................................................................ 288
Ethernet Communication ......................................................................................... 290
Troubleshooting ................................................................................................................ 291
PLC Errors .............................................................................................................. 291
Error Messages from MECOM ................................................................................ 291
Error Messages from MELCOM32.DLL ................................................................. 292
Modem Error Guide ................................................................................................. 292
Ethernet Guide ......................................................................................................... 294
Uninstallation ................................................................................................................... 296
Files ......................................................................................................................... 296
Contents of Some Special Files ................................................................................ 298
Registry Modifications ............................................................................................. 298

Chapter 6 OPC Client ............................................................................................... 299


Overview .......................................................................................................................... 299
Performance Considerations ............................................................................................. 300

viii / FactoryLink Device Interfaces - OPC and Other Guide


Tag Groups ............................................................................................................... 300
Performance ............................................................................................................ 300
Configuring the OPC Client ............................................................................................. 301
OPC Explorer ................................................................................................................... 301
Configuration Tables ........................................................................................................ 302
OPC Server Definition Table ................................................................................... 302
Tag Definition Table ................................................................................................. 304
Using VT_ARRAY Data with OPC Client ...................................................................... 306
Differences in OPC VT_Arrays and FactoryLink Tag Arrays ................................. 306
Transferring Values Between Arrays ....................................................................... 307
Differences in Access Atomicity ............................................................................... 308
Configuration of Tag-to-Item Array Mappings ........................................................ 309
Program Arguments .......................................................................................................... 310
Troubleshooting ................................................................................................................ 311
Configuration Issues ................................................................................................ 311
Error Messages ........................................................................................................ 313

Chapter 7 OPC Data eXchange (ODX).................................................................... 315


Overview .......................................................................................................................... 315
OPC Server Connection ................................................................................................... 316
ODX OPC Server Connection Table ........................................................................ 316
ECI Object Reference ....................................................................................................... 318
Emulation of RAPD and EDI Drivers ..................................................................... 318
OPC-Specific Configuration .................................................................................... 319
ECI Object Reference Table ..................................................................................... 319
Sample Configuration of Communication Objects .......................................................... 325
Emulation of RAPD and EDI Drivers ..................................................................... 325
OPC-Specific Configuration Tables ........................................................................ 327
ECI Object for ODX Statistics Read ........................................................................ 328
Dataset Exchange in a Redundant System Using VRN ........................................... 330
OPC Server, DCOM, and Windows Setup ....................................................................... 332
Performance Considerations ................................................................................... 332
Troubleshooting ....................................................................................................... 333
Program Arguments .......................................................................................................... 335
Information and Error Messages ...................................................................................... 339

FactoryLink Device Interfaces - OPC and Other Guide / ix






Chapter 8 SECS/HSMS (SDRV) Communications................................................. 345
Overview .......................................................................................................................... 345
Installation ............................................................................................................... 345
Add Driver to System Configuration ....................................................................... 345
SECS Communications Configuration Tables ................................................................. 346
Logical Device Control Table .................................................................................. 346
Logical Device Information Table ........................................................................... 349
Read/Write Control Table ........................................................................................ 350
SECS-II Message Definition Control Table ............................................................. 352
Message Definition Information Table .................................................................... 352
Examples .......................................................................................................................... 361
Program Arguments .......................................................................................................... 377
Technical Notes ................................................................................................................ 377
Application Specific ................................................................................................. 377
Error Messages ................................................................................................................. 379
Startup Messages ..................................................................................................... 379
Run-Time Messages ................................................................................................. 379
Status Return Codes ................................................................................................. 380

Chapter 9 Unity Pro Browser ................................................................................... 383


Operating Principles ......................................................................................................... 383
Linking to Unity Pro ......................................................................................................... 384
Creating Tags and Variables ............................................................................................. 386
Program Arguments .......................................................................................................... 386

x / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 1





Device Interface Overview

FactoryLink provides a number of device drivers that allow you to communicate with remote
devices that monitor and control processes. These devices include Programmable Logic
Controllers (PLCs), Remote Terminal Units (RTUs), or custom devices. Virtually all
industries, from the production of goods at a factory to the movement of liquid or gas down a
pipeline, use these devices.
By sending messages between FactoryLink and these devices, you can automate tasks
associated with processes, such as when valves are opened/closed, when machines are turned
on/off, or when data like temperature or pressure is collected. Each device uses a specific
communication protocol.

S UPPORTED D RIVERS
FactoryLink supplies a set of protocol-specific drivers for communicating with these devices.
Each protocol driver translates messages sent from FactoryLink into a format understood by
the device and translates messages sent from the device to a format understood by
FactoryLink.
FactoryLink provides several technologies that work with these drivers. These technologies
aid in providing a consistent, easy-to-use interface into the FactoryLink Real-time Database.
These technologies include External Device Interface (EDI), Rapid Application Protocol
Driver (RAPD), OLE for Process Control (OPC), and others. The FactoryLink documentation
set is centered around these technologies, so you will find the documentation for your driver in
the manual with its associated driver technology.

FactoryLink Device Interfaces - OPC and Other Guide / 1


• 1 | DEVICE INTERFACE OVERVIEW
Supported Drivers



The following table lists the drivers that are available in FactoryLink.
Supports
Windows
Driver PLC Protocol Technology Requires Mailbox
OS
Redundancy

Allen-Bradley PLC-2, PLC-3, RS232 EDI 2000, XP, No


Async PLC-4, PLC-5, 2003
PLC-250,
PLC-1774
Allen-Bradley PLC-2, PLC-3, Ethernet, Data RAPD 2000, XP, RSLinx Classic Yes
Device Interface PLC-5, PLC-5/250, Highway Plus, 2003 OEM (v2.5.00
PLC-5/xxE, RS232 recommended):
PLC-5/xx optional
ControlNet, Allen-Bradley
SLC-500 (series PKTX card,
03, 04, 05), Soft 5 optional Allen
or 500 PLC, PLC 5 Bradley PKTC
or 500 Emulation, card, optional
ControlLogix Allen Bradley Soft
PLC, optional
Allen Bradley PLC
Emulation
Software
Allen-Bradley PLC-2, PLC-3, Data Highway KTDTL 2000, XP, RSLinx Classic No
KTDTL PLC-5, PLC-5/250, Plus, Data 2003 OEM (v2.5.00
PLC-5/xxE, Highway-485 recommended):
PLC-5/xx Allen-Bradley
ControlNet, PKTX card or
SLC-500 (series PKTC ControlNet
03, 04) card
Allen-Bradley PLC-2, PLC-3, Ethernet, Data NetDTL 2000, XP, RSLinx Classic No
NetDTL PLC-5, PLC-5/250, Highway Plus 2003 OEM (v2.5.00
PLC-5/xxE, recommended)
SLC-500 (series 05
ethernet) and
(series 03, 04, 05
by remote bridging)
FLGEM SEMI Host RS232, Ethernet GW 2000, XP, No
Semiconductor Communication 2003
Interface Standard (SECS)
devices
General Electric GE Devices RS232 EDI 2000, XP, No
Fanuc 2003

2 / FactoryLink Device Interfaces - OPC and Other Guide


DEVICE INTERFACE OVERVIEW | 1
Supported Drivers

Supports
Windows
Driver PLC Protocol Technology Requires Mailbox
OS
Redundancy

General Purpose Non-specific RS232 EDI 2000, XP, No


Interface 2003
Mitsubishi Mitsubishi A-series, RS232 Beijer 2000 AJ71C24 No
MECOM Serial QnA-series, Computer Link
FX-series Module (optional)
Mitsubishi Mitsubishi A-series, RS232, Ethernet Beijer 2000, XP AJ71C24 No
MECOM Serial QnA-series, Computer Link
and Ethernet FX-series Module or
AJ71E71 Ethernet
Interface Module
(optional)
Modbus Plus Modicon 984, ModBus Plus EDI 2000, XP SA85 or PC85 No
Quantum, card with low-level
Momentum protocol specific
driver
Modbus Plus Modicon 984, ModBus Plus RAPD 2000, XP SA85 or PC85 No
RAPD Quantum, card with low-level
Momentum protocol specific
driver
Modbus Serial Modicon 184, 384, RS232 EDI 2000, XP, No
484, 584, 884, 984, 2003
M84, Quantum,
Momentum
Modbus TCP/IP Modicon 984 (using Ethernet RAPD 2000, XP, Yes
Ethernet Modicon TCP/IP - 2003
MBP+ Bridge),
Quantum,
Momentum
Omron Host Link C120, C200H, RS232 EDI 2000, XP, No
C500, C1000, 2003
C2000
Opto 22 Optomux Opto 22 Optomux RS232 EDI 2000, XP, No
devices 2003
Schneider April Line Ethernet EDI/ 2000 Telemecanique No
ETHWAY Custom Low-level drivers
with special
Ethway card
Schneider KS A120/A250 RS232 EDI/ 2000, XP No
Function Custom

FactoryLink Device Interfaces - OPC and Other Guide / 3


• 1 | DEVICE INTERFACE OVERVIEW
Supported Drivers



Supports
Windows
Driver PLC Protocol Technology Requires Mailbox
OS
Redundancy

Schneider A120/A250, Ethernet EDI/ 2000, XP Bit Bus card No


Modnet 1 SFB A350/A500 Custom Wnt-bik003-
Treiber with v.12
Low-level driver
Schneider TSX-37, TSX-57, Telemecanique EDI/ 2000, XP Telemecanique No
TE COM PCX57 XWAY Custom UNITE-XWAY
communication Low-level drivers
protocols with special
(XIPWAY, Fipway card, or
ISAWAY PC mounted
FIPWAY, PLC/PCX57
UNI-TELWAY)
Schneider TSX-37, TSX-57, Telemecanique Custom 2000, XP Telemecanique No
TE DRQ PCX57 Direct Requests UNITE-XWAY
Low-level drivers
with special
Fipway card, or
PC mounted
PLC/PCX57
Schneider TSX-37, TSX-57, Telemecanique Custom 2000, XP Telemecanique No
TE Load PCX57 File Transfer UNITE-XWAY
Low-level drivers
with special
Fipway card, or
PC mounted
PLC/PCX57
SECS with GW SEMI Host Ethernet GW 2000, XP, No
Libraries Communication 2003
HSMS/Ethernet Standard (SECS)
devices
SECS with GW SEMI Host RS232 GW 2000, XP, No
Libraries RS Communication 2003
232/Serial Standard (SECS)
devices
Siemens CP525 S5, S7 RS232 EDI 2000, XP, No
2003
Siemens H1 S5 Ethernet EDI 2000 DLC Protocol only No

Siemens Sinec S5, S7 Ethernet RAPD 2000, XP, ISO TP2000 Yes
H1 2003 Protocol

4 / FactoryLink Device Interfaces - OPC and Other Guide


DEVICE INTERFACE OVERVIEW | 1
Supported Drivers

Supports
Windows
Driver PLC Protocol Technology Requires Mailbox
OS
Redundancy

Siemens S7 S7 Ethernet ECI 2000, XP Siemens Softnet; No


Driver not supported on
2003 yet
Siemens 3964R S5, S7 RS232 RAPD 2000, XP, Yes
2003
Square D Square D SY/MAX Ethernet, RS232 EDI 2000, XP, SQRD RS232 No
Serial/Ethernet 2003
Symax No
2000 SQRD Ethernet
REQ DLC Protocol
Stack

FactoryLink Device Interfaces - OPC and Other Guide / 5


• 1 | DEVICE INTERFACE OVERVIEW
Guidelines for Driver Technology Selection



G UIDELINES FOR D RIVER TECHNOLOGY S ELECTION
This section provides guidelines for determining whether to use an EDI or RAPD driver in
your FactoryLink application. Factors include the hardware being used or whether you have an
existing or new application.
Depending on the protocol selected to communicate with the hardware device, such as serial or
Ethernet, your selection may depend on the driver availability for the specific
protocol/hardware.
Use the following guidelines to determine whether to use EDI or RAPD technology:
• If you are using EDI in an existing application and it works, we suggest that you continue
with the EDI technology.
• EDI is relatively easier to configure than RAPD.
• EDI is more vulnerable to problems from overtriggering than RAPD. However, when
proper triggering techniques are used, EDI performs as well as RAPD.
• With all RAPD drivers, you have the option of using the ECI task rather than the IOX task.
The ECI task has many powerful features, one of which is the ability to read and write to the
same tag. In EDI, you must create two tags for reading/writing to the same PLC address.
• If you will implement redundant FactoryLink servers, we recommend using RAPD
technology. This allows you to use the ECI task with your RAPD protocol driver and
implement mailbox marshalling through the VRN task to synchronize the servers.
To implement redundancy with EDI, you must synchronize the servers through VRN on a
tag-by-tag basis.
• For new applications, the OPC client may be the best choice. The standard OPC client
works for most applications, but if you are implementing redundant servers, you may wish
to use ODX, an OPC client that is actually a RAPD protocol driver.
Hardware-specific considerations include:
• For most Allen-Bradley hardware devices, you may use either the RAPD or EDI driver.
However, if you want to use Control Net, SLC, or one of the other newer Allen-Bradley
technologies, you must use RAPD.
Note that if you use RAPD, you can communicate with serial, Control Net, and so on using
the same tables. However, you must create different tables with EDI for each.
• If you have an existing application that works using Allen-Bradley hardware, continue using
the same technology.
• If you are using Modicon hardware, use:
Serial – EDI driver
Modbus Plus – EDI driver
Ethernet – RAPD driver

6 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 2





KTDTL and NetDTL

O VERVIEW
The FactoryLink Allen-Bradley RSLinx and INTERCHANGE tasks, KTDTL and NetDTL,
provide a device interface for programmable logic controller (PLC) and small logic controller
(SLC) communications with FactoryLink across one or more Allen-Bradley proprietary
networks.
Note: The KTDTL task and the Windows versions of the NetDTL task use
Allen-Bradley’s RSLinx communications software. Other operating system versions
of NetDTL use INTERCHANGE.
The KTDTL and NetDTL tasks can communicate with the following types of Allen-Bradley
devices: PLC-2, PLC-3, PLC-5, PLC-5/250 (Pyramid Integrator), PLC-5/xxE (NetDTL direct
Ethernet link only), and SLC-500 series 01, 02, 03, and 04 processors. (SLC-5/01, SLC-5/02,
and SLC-5/03 processors require an interface module. SLC-5/04 processors connect directly to
a Data Highway Plus).
Additionally, tasks can run concurrently with software other than FactoryLink that is also
using INTERCHANGE or RSLinx.
KTDTL – Data Highway Plus (DH+) communications can be established through an
Allen-Bradley KT, KTX, 1784-KT, 1784-KT2, or 1784-PCMK card port. The DH+ can link
with other networks, including another DH+, a Data Highway 485 (DH-485), or a Data
Highway (DH) via a compatible Allen-Bradley network interface module.
NetDTL – NetDTL communicates through an Ethernet card port using the TCP/IP network
protocol. Communications with Allen-Bradley devices occurs through either a PLC-5/250
with an Ethernet interface module providing a bridge to a DH+ network, or through a direct
Ethernet link to a device from the PLC-5/xxE family. Through the Pyramid Integrator, the
NetDTL task can communicate with stations on the local DH+ link as well as with stations on
other networks, including DH-485, DH, and DH+.
A Pyramid Integrator with an Ethernet interface module serving other devices can have
multiple clients (FactoryLink NetDTL tasks). In the same way, a FactoryLink NetDTL task
can connect to multiple servers. To prevent excessive network traffic, do not use more than
eight Pyramid Integrators as DH+ gateways in your application.

FactoryLink Device Interfaces - OPC and Other Guide / 7


• 2 | KTDTL AND NETDTL
Overview



Server with Multiple Clients

PLC 5/250 with


Allen-Bradley Ethernet Interface Allen-Bradley
RSLinx or RSLinx or
INTERCHANGE INTERCHANGE FactoryLink
FactoryLink
Real-Time Real-Time
Database Database

NetDTL NetDTL
Task Task

Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database

NetDTL
Task

Client with Multiple Servers

PLC 5/250 with


Ethernet Interface

PLC 5/250 with


Ethernet Interface Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
PLC 5/250 with Real-Time
Ethernet Interface Database

NetDTL
Task

8 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Offlink Addressing

O FFLINK A DDRESSING
The KTDTL and NetDTL tasks can communicate with devices off the local network link
(offlink) across one, two, or several Allen-Bradley networks. Networks can be split for various
reasons, including physical media limitations and functional splits. For example, all the
devices for a particular conveyor might be connected to one network while the devices for
another conveyor are connected to a different network. Consult the appropriate Allen-Bradley
documentation to verify you are using the correct media for connecting with networks and
devices.
The diagrams illustrate offlink connections by comparing them to a physical highway system.
• The Data Highway Plus directly connected to the FactoryLink station or, for NetDTL, to the
Ethernet interface, is the main thoroughfare. Using an appropriate Allen-Bradley interface
module, you can “exit” to other networks, or “highways.”
• An offlink address node you specify in the configuration tables identifies the route from the
FactoryLink station to the offlink device. In the diagrams, this address is depicted as a road
sign alongside a highway giving directions to a destination.
• An interface module that links networks together (such as 1785-KA5 or 1785-KA) is shown
as an interchange on a highway between different types of roads.
• An interface module that links devices to a network (such as 1775-KA or 1785-KA3) is
shown as an exit to a highway’s access road.

FactoryLink Device Interfaces - OPC and Other Guide / 9


• 2 | KTDTL AND NETDTL
Offlink Addressing



KTDTL Offlink Addressing Example

D
at
a
H
ig
hw
To the right of the main Data Highway
ay Plus, a 1785-KA5 interface module
Pl PLC-2 connects to a DH-485, which connects
u s to another 1785-KA5 interface module
57 and a Data Highway Plus.

178
5-K
D
at

A3
178
a
H
D ig

5-K
at h 46
a w
H ay PLC 5/40
A5
ig Pl
hw us
ay

13
178
5-K
17 7 A
PLC-2 1- K
A2
178

22
SLC 5/02
5- K

11
A5

PLC-3 1 77
5- K 26
A SLC 5/03
To the left of the main Data D
at
M

Highway Plus, a 1785-KA a


ai

H
n

interface module connects to ig


D

hw
at

a Data Highway. ay
a
H

48
ig

48 5
hw
ay
Pl

PLC-2 178
5- K
us

A3
to
Fa

Devices on each network are


ct

indicated by “road signs” that


or
yL

display the device node


in
k

addresses. 42
PC

FactoryLink Station

10 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Offlink Addressing

NetDTL Offlink Addressing Example

D
at
a
H
ig To the right of the main Data Highway
hw
ay Plus, a 1785-KA5 interface module
Pl PLC-2
us connects to a DH-485, which connects
57 to another 1785-KA5 interface module

178
and a Data Highway Plus.

5-K
D

A
at 178
a

3
H
D ig
5-K
at hw 46
a ay PLC 5/40
H
A

ig Pl
5

h w u
ay s
Devices on each network are
indicated by “road signs” that
display the device node
13
1 78 addresses.
5- K
A
PLC-2 1 77
1- K 22
A2
178

SLC 5/02
5- K

11 26
A5

SLC 5/03
PLC-3 17 7
5-K D
A at
D a
To the left of the main Data at H
a ig
H h w
Highway Plus, a 1785-KA ig ay
hw
interface module connects to 48 ay 48
a Data Highway. 5
Pl
u s
PLC-2 17 8
5- K
A3

A Pyramid Integrator with an PLC 5/250 Et


Ethernet interface connects he
rn
the FactoryLink station to a et
Data Highway Plus network. T C
P/
IP

FactoryLink Station

FactoryLink Device Interfaces - OPC and Other Guide / 11


• 2 | KTDTL AND NETDTL
KTDTL Topology



KTDTL TOPOLOGY
The diagrams provide examples of possible topologies for a KTDTL task configuration.
The following diagram illustrates simultaneous communications through two Allen-Bradley
KT card ports.
Example of KTDTL Communications

Allen-Bradley Communications through


RSLinx FactoryLink
two KT cards directly
Real-Time
connected to DH+ networks.
Database

KTDTL
Task

+
SLC 5/04

DH
PLC-2
us
yPl

PLC-5
wa
h
Hig
ta
Da

PLC-5/250

PLC-5 with
1785-KA5
1785-KA5 module in a
PLC-5 I/O rack provides the
link from DH+ to DH-485
SLC-5/03
85
y4
wa

SLC-5/02
gh
Hi
ta
Da

SLC-5/01

12 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Topology

The following diagrams illustrate ways communications can occur between the FactoryLink
station and various types of Allen-Bradley devices through an Allen-Bradley card port.
KTDTL Communications Options

Using a KTX card, a direct link to a DH+ or a


DH-485 network can be achieved.

Using a KT card, a direct link


to a DH+ can be achieved.

FactoryLink
Station

1784-KTX 1784-KT
Card Card

PLC 5
DH+

SLC 5/04

DH-485 1785-KA5

1747-AIC 1747-AIC

1747-C11

SLC 5/02 SLC 5/03

FactoryLink Device Interfaces - OPC and Other Guide / 13


• 2 | KTDTL AND NETDTL
KTDTL Topology



Typical Link Between the FactoryLink Station and Various Devices

Data Highway Offlink


With the 1785-KA module serving as a bridge between a Data
PLC-2 Highway Plus and a Data Highway, controllers in the PLC-2, PLC-3,
D
at and PLC-5 families residing at offlink addresses can communicate
a
H with the computer running the device interface software using
ig
hw appropriate interface modules (1771-KA2 and 1775-KA, for example).
ay 1771-KA2

PLC-3

1775-KA Data Highway 485 Offlink


The 1785-KA5 module serves as a bridge to let devices
residing at offlink addresses communicate with the
1785-KA computer running the device interface software.

SLC 5/02
D
at
a
Hi SLC 5/03
SLC 5/04 gh
w
ay
Pl 1785-KA5
us
D
at
a
H
ig
hw
ay
48
5
Data Highway Plus Local Link
The Data Highway Plus links the PLCs
to the computer running the device
interface software through a KT card.

1785-KA3

KT Card
PLC-2 PLC-5/250

14 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
NetDTL Topology

N ET DTL TOPOLOGY
The diagrams provide examples of possible topologies for a NetDTL task configuration.
The following diagram shows a basic physical link between the FactoryLink station and
devices on the Ethernet and DH+ networks communicating through a Pyramid Integrator with
an Ethernet interface module.
Typical Physical Link to Local Addresses

PLC 5/250 with


PLC-5 Ethernet Interface

DH+ Link Ethernet Link

PLC-3 PLC-5/xxE

PLC-5/xxE

Ethernet Card

FactoryLink Station

The following diagram shows a typical physical link between the FactoryLink station and
devices at offlink addresses.

FactoryLink Device Interfaces - OPC and Other Guide / 15


• 2 | KTDTL AND NETDTL
NetDTL Topology



Typical Physical Link to Offlink Addresses
Data Highway Offlink
PLC-2 With the 1785-KA module serving as a bridge between a Data
Highway Plus and a Data Highway, controllers in the PLC-2, PLC-3,
D and PLC-5 families residing at offlink addresses can communicate
at
a with the computer running the device interface software using
H
ig 1771-KA2 appropriate interface modules (1771-KA2 and 1775-KA, for example).
hw
ay
PLC-3

1775-KA
Data Highway 485 Offlink
The 1785-KA5 module serves as a bridge to let devices
1785-KA residing at offlink addresses communicate with the
computer running the device interface software.

D SLC 5/02
at
a
H
ig
hw
ay SLC 5/03
Pl
us 1785-KA5
D
at
a
H
ig
hw
ay
48
5

Ethernet Communications
The NetDTL task can
communicate directly to a device in
PLC-5/xxED the PLC-5/xxE family over TCP/IP.
at
a
Hi
gh
w
ay PI Et
Pl he
us rn
Data Highway Plus Ethernet Link et
The PLCs on the Data Highway Plus are
linked to the computer running the
device interface software through a
PLC-2/250 Pyramid Integrator with an
Ethernet interface module.

16 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
NetDTL Topology

To further illustrate NetDTL communications, the diagram below shows: point-to-point


Ethernet TCP/IP communications, DH+ network communications via an Ethernet interface
module, and DH-485 network communications via a 1785-KA5 module.
Example of NetDTL Communications

PLC-5 with
1785-KA5
1785-KA5 module in a
PLC-5 I/O rack provides the
SLC-5/03 link from DH+ to DH-485
5
48

SLC-5/02
ay

SLC-5/04
lu s
hw

yP
ig
H

wa

SLC-5/01
ta

gh
Da

Hi
ta

PLC-5/250
Da

Allen-Bradley
RSLinx or
INTERCHANGE FactoryLink
Real-Time
Database

PLC-5

NetDTL
Task

Communications through
an Ethernet card

PLC-5/250 with an
Ethernet interface
IP
P/

module provides the link PLC 5/250 PLC-5/xxE


TC

from Ethernet to DH+ with Ethernet Point-to-point


Interface Ethernet
communications
with a PLC-5/xxE

FactoryLink Device Interfaces - OPC and Other Guide / 17


• 2 | KTDTL AND NETDTL
Setting Up FactoryLink



S ETTING U P F ACTORY L INK
Before defining the communication paths and the read and write operations, you must set up
FactoryLink to recognize the KTDTL or NetDTL task and define information that optimizes
the performance of the task.
This section describes how to set up and optimize FactoryLink for KTDTL or NetDTL task
communications by filling out a row for the task in the System Configuration table.

Configuring System Configuration Table


KTDTL or NetDTL require a task entry in the System Configuration Table. For the
instructions to configure this table, see the “Run-Time Manager” chapter in the Task
Configuration Reference Guide.

Task Name Type KTDTL or NetDTL to identify the task to the system
Description Type Allen-Bradley KTDTL or Allen-Bradley NetDTL to describe the
task.
Task Flags • Select Run at Startup to instruct the task to start automatically at
run time.
• Select Create Session Window to instruct the task to open a
status window at run time where system messages from the
KTDTL or NetDTL task and the RSLinx or INTERCHANGE
software will appear.
Start Order Enter 1 to ensure the task starts up appropriately at run time.
Executable File Type bin/ktdtl or bin/netdtl to specify the location of the executable
file.
Program Enter the program parameter for the specific override, followed by
Arguments the override value, using the list of IDs in “Program Arguments” on
page 102.

18 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Setting Up FactoryLink

Optimizing Task Performance


To optimize performance of the KTDTL or NetDTL task and use of the CPU, set up the
override values for the major program control loop passes and sleep period parameters
according to the table described in the previous section. One control loop “pass” is defined as a
single completion of a list of developer-defined operations performed by the task. After the
task completes the specified number of control loop passes, it then “sleeps” for the specified
sleep period.
The following information is important to remember about the override values in optimizing
performance:
• The higher in value the control loop setting, the greater the amount of CPU used. Because
the termination flag is checked only on the first pass, the task will then be slower after a
normal termination request.
• The smaller in value the control loop setting, the smaller the amount of CPU space used and
the less reliable the task is in detecting changed data.
While there are no standard guidelines for setting the control loop and sleep period parameters,
one of the following procedures might help you obtain the desired results:
• Decrease the number of control loop passes and increase the sleep period until task
performance drops below an acceptable level.
• Increase the number of control loop passes and decrease the sleep period until task
performance reaches an acceptable level.

FactoryLink Device Interfaces - OPC and Other Guide / 19


• 2 | KTDTL AND NETDTL
Configuring Communication Paths



C ONFIGURING C OMMUNICATION P ATHS
To configure the paths over which FactoryLink will communicate with the devices, you create
logical station definitions in which you identify sources and destinations for read and write
requests and define FactoryLink tags to which system messages from the KTDTL or NetDTL
task and the RSLinx software will be written.

Logical Station Concepts


Setting parameters for a communication path between the source and destination of a read or
write request involves defining two basic components: the communications port through which
data will travel and a physical station (Allen-Bradley device) that will send or receive data.
The following diagram illustrates the components of a communication path.
KTDTL – For KTDTL, the communications port is an Allen-Bradley card port.
NetDTL – For NetDTL, the communications port is an Ethernet card port.
Components of a Communication Path

Device connected to FactoryLink


station through an Allen-Bradley
card or an Ethernet card

Because an application can be linked to multiple devices, define a unique communication path
to each device so the application can distinguish one device from another. This is done by
assigning specific numbers to represent physical aspects of your particular configuration. The
first number you assign, “logical port,” is common to all devices that will communicate with
the task and is typically defined only once per task, regardless of the number of cards to be
used.
KTDTL – For KTDTL, in addition to defining each logical port in the Logical Station table, you
must also edit specific system files to identify each port. If more than one card is being used,
instruct the task to differentiate between them by identifying the port numbers that represent
each card in the Logical Station table.

20 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring Communication Paths

To identify a particular device communicating through the logical port, define a “logical
station” number for the device. The logical station number represents a combination of the
logical port and the physical address of the device. Assign each device a logical station
number. The diagram below provides examples of logical ports and logical stations.
NetDTL – the is an Ethernet card, and a link from Ethernet to DH+ is provided by an Ethernet
Interface module in a PLC-5/250 I/O rack.
KTDTL – the card is a KT card. A 1785-KA5 module in a PLC-5/250 I/O rack is located at
address #4. Two devices are located at address #10: one is a PLC-5/250 on a DH+ network and
the other is a SLC 5/03 on a DH-485 network. To enable the KTDTL or NetDTL task to
differentiate between the two devices that have an address of 10, give each device its own
logical station number. Consequently, when an application is being run and the task receives a
request to write a value to a register in a device at address #10, the logical station number
provides the unique communication path that tells the task to which address #10 the value
should be written.
Logical Port and Logical Station

KT or Ethernet Logical Port 1


Card Port

1785-KA5 Module
FactoryLink Station
in a PLC-5
I/O Rack at
Address #4 DH-485
NetDTL—Ethernet interface
module in a PLC-5/250 I/O
rack provides the DH+ link DH+

SLC 5/03 at
Address #10
PLC-5/250 at
Address #10
Logical Station 1 consists of Logical Port 1
and a PLC-5/250 at DH+address #10.
Logical Station 2 consists of Logical Port 1
and a PLC-5 at DH+ address #4.

Logical Station 3 consists of Logical Port 1


and a SLC 5/03 at DH-485 address #10.

FactoryLink Device Interfaces - OPC and Other Guide / 21


• 2 | KTDTL AND NETDTL
Allen-Bradley NetDTL Driver



A LLEN -B RADLEY N ET DTL D RIVER
In the Configuration Explorer, ensure the current domain selected is Shared.

Station Control Table

Accessing

Device Interfaces > Allen-Bradley NetDTL > Logical Station Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Logical Port Number to represent the communications path. Since the X 0 to 999
task uses only one logical port, define only one port in
this table.
Response Length of time, in tenths of a second, the task will wait to X 0 to 99999
Timeout receive a response to a read or write command before (default = 55,
0.1 Sec timing out. Be sure to enter a value greater than zero; 5.5 seconds)
otherwise, the task immediately times out without
waiting for a response.
Status Tag to which a text string is written to indicate a tag name message
Msg Tag communications error associated with this logical port

22 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Allen-Bradley NetDTL Driver

FactoryLink Device Interfaces - OPC and Other Guide / 23


• 2 | KTDTL AND NETDTL
Allen-Bradley NetDTL Driver



Ethernet Address Information Table
Complete a row in the table for each device (Pyramid Integrator or PLC-5/xxE) that will have
a direct Ethernet connection from the FactoryLink Station (that is, each device that has a
separate TCP/IP address).

Accessing

Device Interfaces > Allen-Bradley NetDTL > Logical Station Control > “logical port” > Ethernet
Address Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


TCP/IP Ethernet TCP/IP address of a Pyramid Integrator or X 1 to 21
Address PLC-5/xxE that will process read or write requests numeric
Ethernet characters
Interface Note: To keep network traffic manageable, do not and decimal
(ASCII) connect to more than eight Pyramid Integrators points in
serving as routers. xxx.xxx.xxx.
xxx format
Ethernet Station number to which the Pyramid Integrator or X
Interface PLC-5/xxE is mapped in the RSLinx Ethernet-to-AB
Number communications configuration. For example, if the IP
address of a Pyramid Integrator is mapped to station 7,
the Ethernet interface number for that station will be 7.
Comment Reference information about this Ethernet device 1 to 21
characters

This table is new to this version of the NetDTL driver. The previous version of the NetDTL
driver limited the maximum number of IP address usages to 40. The new format removes this
restriction from the FactoryLink side. The maximum number of IP address usages is bound by
whatever the RSLinx is capable of supporting. Refer to the RSLinx documentation for this
information. If you are upgrading a FactoryLink application that uses the old style NetDTL
configuration table layout, use the following procedure to run the new NetDTL:
1. Run FLSAVE to save an existing NetDTL application to a .mps file.
2. Install the new version of NetDTL driver.
3. Run FLREST to restore the .mps file to the application.
4. Run FLCM to modify the application with the proper data.
5. Run FLRUN to use the new NetDTL driver.
6. Click Save to validate the data.

24 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Allen-Bradley NetDTL Driver

Station Information Table


Complete a row in the table for each device that will communicate through this logical port.
After defining this table, see “Reading and Writing Data” on page 45 to define the read and
write operations expected to occur between this logical port and the devices configured as
logical stations.

Accessing

Device Interfaces > Allen-Bradley NetDTL > Logical Station Control > “logical port” > Ethernet
Address Information > “IP address” > Logical Station Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Err/Status Tag to receive communication error codes associated tag name longana
Tag Name with this device (logical station). The high word value
written to this tag indicates the type of error received. The
low word value written to this tag is the specific error
code. The high word values written to this tag and the
meaning of the error code in the low word are:
0 – NetDTL return code
1 – Internal RSLinx code
2 – Operating system error code
Note: To display the codes stored in a tag for an
operator to view, use Client Builder to animate an
output-text object associated with the tag name and
display this object on a graphic screen.
Logical A unique number that identifies the logical station to 0 to 999
Station which the information in this row pertains. A logical
(Decimal) station represents the combination of a Logical Port, and
TCP/IP Address with a physical station. You will enter
this logical station number later in a read or write table to
represent the device defined in his row. In a read or write
table, this number identifies the device to or from which
data is to sent or received.
Pyramid (NetDTL) Defines the communications port in the
Channel ID Pyramid Integrator module providing the Ethernet link to
(ASCII) this logical station, and for offlink addresses, define the
path to the offlink station. The port entry must precede
the path to an offlink address. If you are defining the
Pyramid Integrator (PLC5/250) itself, leave this field
blank. If you are defining a PLC-5/xxE connected
directly to Ethernet, leave this field blank.

FactoryLink Device Interfaces - OPC and Other Guide / 25


• 2 | KTDTL AND NETDTL
Allen-Bradley NetDTL Driver



Syntax for Port Entry
ORM:n
where
0 is the RM pushwheel number
RM: is the module type, Resource Manager
n is either channel 2 or 3
Example: Enter 0RM:2 for RM channel 2
pKA:n
where
p is a pushwheel number from 1-4
KA: is the module type
n is either channel 2 or 3
Example: Enter 1KA:3 for KA channel 3 configured as pushwheel 1

The following diagram illustrates some typical port entries:


When defining the Pyramid Integrator (PLC-5/250)
as the target device, leave the field blank

0RM:3 1KA:2 2KA:2

0RM:2 1KA:3 2KA:3

26 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Allen-Bradley NetDTL Driver

Syntax for Path to Offlink Address


/B:b Use the bridge or router identifier /B: to route to a remote network at a
particular link. Follow the identifier with the bridge address b, an octal
value from 1 through 377.
/G:g Use the gateway identifier /G: with 5/01 and 5/02 processors to link to an
adjacent DH-485 network and to convert the 5/01 and 5/02 protocol for
DH-485 compatibility. Follow the identifier with the network address g, an
octal value from 1 through 377. The gateway identifier is not supported in
unsolicited operations.
/L:l The link identifier /L: is followed by the destination link ID l which is
either: a decimal value from 1 through 65,535, or 0 for single hop mode.
For bridges, enter the link ID for the offlinked network. For gateways, enter
the link ID for the local DH+ or DH-485 network.
/KA The 1785-KA addressing mode identifier is required when communicating
through a 1785-KA module from DH+ to DH. The /KA identifier is not
supported in unsolicited operations.
Example: 0RM:2/B:42/L:2 indicates that, for channel 2 of the Resource
Manager module, the address of the bridge to the network where the offlink
station resides is 42, and the destination link ID is 2.
See “Sample Logical Station Table Entries” on page 33 for other examples.

Field Name Description Req. Valid Entry Valid Data Type


Station Physical DH+, DH, or DH-485 network address of the
Address Allen-Bradley device. For each device address you enter,
(Octal) make a corresponding entry identifying the path to the
device; otherwise, the task ignores this address entry.
Note: The path is entered in the Pyramid Channel ID
(ASCII) field. If you are defining the Pyramid
Integrator (PLC5/250) itself or a PLC-5/xxE
connected directly to Ethernet, you do not need to
define a path. See “Path and Address Entries” on page
34 for examples of how this address corresponds to
the path entry for this logical station when you are
configuring an offlink address.
Valid Entry explanation:
DH+ – numeric value 0 - 77
DH – numeric value 0 - 377
DH-485 – numeric value 0 - 37

FactoryLink Device Interfaces - OPC and Other Guide / 27


• 2 | KTDTL AND NETDTL
Allen-Bradley NetDTL Driver



Field Name Description Req. Valid Entry Valid Data Type
Station Type of Allen-Bradley device from which data is to be X
Type read or to which data is to be written
Valid Entry explanation:
PLC – Same as PLC-2U
PLC-2 – Same as PLC-2U
PLC-2 – PPLC that will be accessed using basic (PLC-2)
unprotected-read and protected-write commands
PLC-2 – UPLC that will be accessed using basic (PLC-2)
unprotected-read and unprotected-write commands
PLC-3 –same as PLC3-KA
PLC-3KA – PLC-3 that is not a PLC-3SR
PLC-3SR – PLC-3 that uses a 1775-S5 or 1775-SR5
scanner for DH+ communications, allowing faster bit
write operations
PLC-4 – same as PLC-2U
PLC-5 – PLC-5 new or old generation
PLC-250 – PLC5/250 Pyramid Integrator
SLC-500 – SLC 500 series processor
Note: To display valid entry, use the Ctrl+K keys.
Comment Reference information about this logical station 1 to 21
characters

28 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

KTDTL D RIVER

Station Control

Accessing

Device Interfaces > Allen-Bradley KTDTL > Logical Station Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Logical Port Number that represents the communications path. X 0 to 999
Because the task uses only one logical port, define only
one port in this table.
Response Length of time, in tenths of a second, the task will wait to X 0 to 99999
Timeout receive a response to a read or write command before (default = 55,
(0.1 Sec) timing out. Enter a value greater than zero; otherwise, the or 5.5
task immediately times out without waiting for a seconds)
response.
Status Tag to which a text string is written to indicate a tag name message
Msg Tag communications error associated with this logical port

Station Information

Accessing

Device Interfaces > Allen-Bradley KTDTL > Logical Station Control > “logical port” > Logical
Station Information

FactoryLink Device Interfaces - OPC and Other Guide / 29


• 2 | KTDTL AND NETDTL
KTDTL Driver



Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Err/Status Tag that receives communication error codes associated tag name longana
Tag Name with this device (logical station). The high word value
written to this tag indicates the type of error received. The
low word value is the specific error code.
0 – KTDTL return code
1 – Internal RSLinx code
2 – Operating system error code
Note: To display the codes stored in a tag for an
operator to view, use Client Builder to animate an
output-text object associated with the tag name and
display this object on a graphic screen.
Logical A unique number that identifies the logical station to 0 to 999
Station which the information in this row pertains. A logical
(Decimal) station represents the combination of a logical port with a
physical station. You will enter this logical station
number later in a read or write table to represent the
device defined in this row. In a read or write table, this
number will identify the device to or from which data is
sent or received.
A-B KT Defines the communications port in the Allen-Bradley
Card ID card to which this logical station is connected. For offlink
(ASCII) addresses, defines the path to the offlink station. The port
entry must precede the path to an offlink address.

Syntax for Port Entry


pKT:0
where
p is the pushwheel or card number 1 through 8 that
corresponds to the pushwheel configured in the RSLinx
Client Application Configuration dialog box. For details,
see Allen-Bradley’s RSLinx documentation.
KT: is the module type.
0 is the channel number.
Example: Enter 5KT:0 if the InterChange port is mapped to port 5 in
the RSLinx Client Application Configuration dialog box.

30 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

The following diagram illustrates some typical port entries.


To specify the To specify the
first KT card, fourth KT card,
enter 1KT:0 enter 4KT:0

KT Card 1

KT Card 4
FactoryLink Station

Syntax for Path to Offlink Address


/B:b Use the bridge or router identifier /B: to route to a remote network at a
particular link. Follow the identifier with the bridge address b, an octal
value from 1 through 377.
/G:g Use the gateway identifier /G: with 5/01 and 5/02 processors to link to an
adjacent DH-485 network and to convert the 5/01 and 5/02 protocol for
DH-485 compatibility. Follow the identifier with the network address g, an
octal value from 1 through 377. The gateway identifier is not supported in
unsolicited operations.
/L:l The link identifier /L: is followed by the destination link ID l which is
either: a decimal value from 1 through 65,535, or 0 for single hop mode.
For bridges, enter the link ID for the offlinked network. For gateways, enter
the link ID for the local DH+ or DH-485 network.
/KA The 1785-KA addressing mode identifier is required when communicating
through a 1785-KA module from DH+ to DH. The /KA identifier is not
supported in unsolicited operations.
Example: 1KT:0/B:42/L:2 indicates that, for the first KT card, the address of
the bridge to the network where the offlink station resides is 42, and the
destination link ID is 2.
See “Sample Logical Station Table Entries” on page 33 for other examples.

FactoryLink Device Interfaces - OPC and Other Guide / 31


• 2 | KTDTL AND NETDTL
KTDTL Driver


Field Name Description Req. Valid Entry Valid Data Type


Station Physical DH+, DH, or DH-485 network address of the
Address Allen-Bradley device. For each device address you enter,
(Octal) make a corresponding entry identifying the path to the
device; otherwise, the task ignores this address entry.
Note: The path is entered in the A-B KT Card ID
(ASCII) field. See “Path and Address Entries” on page
34 for examples of how this address corresponds to
the path entry for this logical station when you are
configuring an offlink address.
Valid Entry explanation:
DH+ – numeric value 0 - 77
DH – numeric value 0 - 377
DH-485 – numeric value 0 - 37
Station Type of Allen-Bradley device from which data is to be X
Type read or to which data is to be written
Valid Entry explanation:
PLC – Same as PLC-2U
PLC-2 – Same as PLC-2U
PLC-2P – PLC that will be accessed using basic (PLC-2)
unprotected-read and protected-write commands
PLC-2U – PLC that will be accessed using basic (PLC-2)
unprotected-read and unprotected-write commands
PLC-3 –same as PLC-3KA
PLC-3KA – PLC-3 that is not a PLC-3SR
PLC-3SR – PLC-3 that uses a 1775-S5 or 1775-SR5
scanner for DH+ communications, allowing faster bit
write operations
PLC-4 – same as PLC-2U
PLC-5 – PLC-5 new or old generation
PLC-250 – PLC5/250 Pyramid Integrator
SLC-500 – SLC 500 series processor
Note: To display valid entry, use the Ctrl+K keys.
Comment Reference information about this logical station 1 to 21
characters

32 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

Sample Logical Station Table Entries


This section contains the following information:
• Typical Logical Station configuration table entries and descriptions that tell how
FactoryLink interprets these entries
• Topology diagrams illustrating how to enter local network and offlink addresses
• Flowcharts depicting configurations containing devices communicating across multiple
networks and corresponding Logical Station table entries

Logical Station Control Table

When all information on the Logical Station Control table is specified, the table resembles one
of the following sample tables.
KTDTL

In this example, Logical Port 0 is configured to communicate with a response timeout of 5.5
seconds. The KTDTL task will write communications error messages associated with this
logical port to a message tag, KT_MSG.
NetDTL

In this example, Logical Port 0 is configured to communicate with a response timeout of 5.5
seconds.

FactoryLink Device Interfaces - OPC and Other Guide / 33


• 2 | KTDTL AND NETDTL
KTDTL Driver



Logical Station Information Table

When all information on the Logical Station Information table is specified, the table resembles
the this sample table.
KTDTL

In this example, the tag KT_ERR is configured to hold port errors for logical station 0, which
communicates with a SLC 5/03 device at DH-485 address 3. The path from the FactoryLink
station to the SLC 5/03 device is as follows: The first KT card communications port is used.
The DH+ address of the bridge to the DH-485 network where the offlink station resides is 42,
and the destination link ID of the DH-485 network is 2.
NetDTL

In this example, the tag NDTL_ERR is configured to hold port errors for logical station 0,
which communicates with a SLC 5/03 device at DH-485 address A Pyramid Integrator at
192.1.1.21 (TCP/IP Address Pyramid El #1 in the Logical Station Control table) provides the
Ethernet link. The path from this Pyramid Integrator to the SLC 5/03 device is as follows:
Channel 2 of the Resource Manager module in this Pyramid Integrator is used. The DH+
address of the bridge to the DY-485 network where the offlink station resides is 42 and the
destination link ID of the DY-485 network is 2.

Path and Address Entries

The following topology diagrams illustrate how to enter local network and offlink addresses in
the Logical Station Information table. For practical purposes, the initial entry in the A-B KT
Card ID (ASCII) field is 1KT:0 throughout the examples.

34 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

KTDTL Network Topology 1


The local network has a link identifier of 1. Networks off of the local link have link identifiers of 2 and 3, respectively. The
1785-KA5 interface module that provides a network bridge is indicated by a box between the network circles. The
Allen-Bradley PLCs and SLC-500 family processors that are connected to the networks are indicated by boxes to the left
and right of the circle representing each network. The number beside each device box, just inside the network circle,
indicates the device address. The numbers above and below each KA5 box, just inside the network circles, indicate the
module’s address on the two networks to which it is connected.

To communicate with Device FactoryLink Station To communicate with Device B,


A, you would make the you would make the following
following field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0 1KT:0
Station Station
Address Address
(Octal) Link 1 (Octal)
43 56
Device A Device B
To communicate with Device C, To communicate with Device D,
depending upon the type of you would make the following
operation to be performed, you field entries:
would make the following field
A-B KT Card ID
entries:
(ASCII)
A-B KT Card ID
(ASCII) 1KT:0/G:42/L:1
(triggered only)
1KT:0/B:42/L:2
(triggered or unsolicited) Station
1KT:0/G:42/L:1 Address
Link 2
(triggered only) (Octal)
Device C Device D
Station 14
Address
(Octal)
18
To communicate with Device E, To communicate with Device F,
you would make the following you would make the following
field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0/B:42/L:3 Link 3 1KT:0/B:42/L:3
Station Station
Device E Device F
Address Address
(Octal) (Octal)
36 41

Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.

FactoryLink Device Interfaces - OPC and Other Guide / 35


• 2 | KTDTL AND NETDTL
KTDTL Driver



KTDTL Network Topology 2
In this example, three networks are connected to the FactoryLink station. The local network has a link identifier of 1.
Networks off of the local link have link identifiers of 2 and 3, respectively. The PLC-5/250 that provides a network bridge
is indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by
boxes to the left and right of the circle representing each network. The number beside each device box, just inside the
network circle, indicates the device address. The numbers above and below each PLC-5/250 box, just inside the network
circles, indicate the module’s address on the two networks to which it is connected.

FactoryLink Station
To communicate with Device A, To communicate with Device B,
you would make the following you would make the following
field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0 1KT:0
Station Station
Address Link 1 Address
(Octal) (Octal)
Device A Device B
43 56

To communicate with Device C, To communicate with Device D,


you would make the following you would make the following
field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0/B:42/L:2 1KT:0/B:42/L:2
Station Station
Address Link 2 Address
(Octal) Device C Device D (Octal)
34 26

To communicate with Device E, To communicate with Device F,


you would make the following you would make the following
field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0/B:42/L:3 1KT:0/B:42/L:3
Station Station
Address Link 3 Address
(Octal) Device E Device F (Octal)
36 41

All of these entries can be used for triggered and unsolicited operations.

36 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

KTDTL Network Topology 3


In this example, two networks are connected to the FactoryLink station. The local network has a link identifier of 1 and the
network off of the local link has a link identifier of 2. The 17xx-KA interface module that provides a network bridge is
indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by boxes
to the left and right of the circle representing each network. The number beside each device box, just inside the network
circle, indicates the device address. The numbers above and below each KA box, just inside the network circles, indicate
the module’s address on the two networks to which it is connected.

FactoryLink Station
To communicate with Device A, To communicate with Device B,
you would make the following you would make the following
field entries: field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)
1KT:0 1KT:0
Station Station
Address Address
(Octal) Link 1 (Octal)
Device A Device B
43 56

To communicate with Device C, To communicate with Device


you would make the following D, you would make the
field entries: following field entries:
A-B KT Card ID A-B KT Card ID
(ASCII) (ASCII)

1KT:0/B:42/KA 1KT:0/B:42/KA
(triggered only) (triggered only)

Station Link 2 Station


Address Device C Device D Address
(Octal) (Octal)

36 41

Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.

For practical purposes, the initial entry in the PYRAMID CHANNEL ID (ASCII) field is 0RM:2
throughout the following examples.

FactoryLink Device Interfaces - OPC and Other Guide / 37


• 2 | KTDTL AND NETDTL
KTDTL Driver



NetDTL Network Topology 1
The local network has a link identifier of 1. Networks off of the local link have link identifiers of 2 and 3, respectively. The
1785-KA5 interface module that provides a network bridge is indicated by a box between the network circles. The
Allen-Bradley PLCs and SLC-500 family processors that are connected to the networks are indicated by boxes to the left
and right of the circle representing each network. The number beside each device box, just inside the network circle,
indicates the device address. The numbers above and below each KA5 box, just inside the network circles, indicate the
module’s address on the two networks to which it is connected.

To communicate with Device A, FactoryLink Station To communicate with Device B,


you would make the following you would make the following
field entries: 0RM:2 field entries:
PYRAMID PYRAMID
CHANNEL ID 13 CHANNEL ID
0RM:2 0RM:2
Station Station
Address DH+ Address
(Octal) PLC 43 Link 1 56 PLC (Octal)
43 Device A Device B 56
To communicate with To communicate with Device D,
Device C, depending upon you would make the following
42
the type of operation to be field entries:
performed, you would make KA5 PYRAMID
the following field entries:
CHANNEL ID
PYRAMID 29
CHANNEL ID 0RM:2/G:42/L:1
(triggered only)
0RM:2/B:42/L:2
(triggered or unsolicited) Station
SLC DH-485 SLC 5/01,
0RM:2/G:42/L:1 5/03 18
Link 2 14 5/02 Address
(triggered only) (Octal)
Device C Device D
Station 14
Address
(Octal) 22
18 KA5
To communicate with Device E, To communicate with Device F,
you would make the following 25 you would make the following
field entries: field entries:
PYRAMID PYRAMID
CHANNEL ID CHANNEL ID
DH+
0RM:2/B:42/L:3 PLC 36 41 PLC 0RM:2/B:42/L:3
Link 3
Station Device E Device F Station
Address Address
(Octal) (Octal)
36 41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.

38 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

NetDTL Network Topology 2


In this example, three networks are connected to the FactoryLink station. The local network has a link identifier of 1.
Networks off of the local link have link identifiers of 2 and 3, respectively. The PLC-5/250 that provides a network bridge
is indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by
boxes to the left and right of the circle representing each network. The number beside each device box, just inside the
network circle, indicates the device address. The numbers above and below each PLC-5/250 box, just inside the network
circles, indicate the module’s address on the two networks to which it is connected.

To communicate with Device A, FactoryLink Station To communicate with Device B,


you would make the following you would make the following
field entries: 0RM:2 field entries:
PYRAMID PYRAMID
CHANNEL ID 13 CHANNEL ID
0RM:2 0RM:2
Station Station
Address DH+ Address
(Octal) PLC 43 56 PLC (Octal)
Link 1
43 Device A Device B 56

42
To communicate with Device C, PLC To communicate with Device D,
you would make the following 5/250 you would make the following
field entries: field entries:
52
PYRAMID PYRAMID
CHANNEL ID CHANNEL ID
0RM:2/B:42/L:2 0RM:2/B:42/L:2
Station DH+ Station
PLC 34 26 PLC
Address Link 2 Address
(Octal) Device C Device D (Octal)
34 26
47
To communicate with Device E, PLC To communicate with Device F,
you would make the following 5/250 you would make the following
field entries: field entries:
25
PYRAMID PYRAMID
CHANNEL ID CHANNEL ID
0RM:2/B:42/L:3 0RM:2/B:42/L:3
Station DH+ Station
PLC 36 41 PLC
Address Link 3 Address
(Octal) Device E Device F (Octal)
36 41

All of these entries can be used for triggered and unsolicited operations.

FactoryLink Device Interfaces - OPC and Other Guide / 39


• 2 | KTDTL AND NETDTL
KTDTL Driver



NetDTL Network Topology 3
In this example, two networks are connected to the FactoryLink station. The local network has a link identifier of 1 and the
network off of the local link has a link identifier of 2. The 17xx-KA interface module that provides a network bridge is
indicated by a box between the network circles. The Allen-Bradley PLCs connected to each network are indicated by boxes
to the left and right of the circle representing each network. The number beside each device box, just inside the network
circle, indicates the device address. The numbers above and below each KA box, just inside the network circles, indicate
the module’s address on the two networks to which it is connected.

To communicate with Device A, FactoryLink Station To communicate with Device B,


you would make the following you would make the following
field entries: 0RM:2 field entries:
PYRAMID PYRAMID
CHANNEL ID 13 CHANNEL ID
0RM:2 0RM:2
Station Station
Address Address
(Octal) PLC 43 DH+ 56 PLC (Octal)
Link 1
43 Device A Device B 56

To communicate with Device C, 42 To communicate with Device D,


you would make the following you would make the following
field entries: KA field entries:
PYRAMID PYRAMID
CHANNEL ID CHANNEL ID

0RM:2/B:42/KA 0RM:2/B:42/KA
(triggered only) (triggered only)
PLC 36 DH 41 PLC
Station Link 2 Station
Address Device C Device D Address
(Octal) (Octal)

36 41

Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.

40 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

Logical Station Entries


The configurations represented in the following topology flowcharts are defined in a Logical
Station table that appears after each chart.
KTDTL Configuration 1
FactoryLink
Station
1KT:0
DH+ 036
Data Highway + Link 1

DH+ 010 DH+ 013 DH+ 023 DH+ 035 DH+ 045
Log. Sta. 0 Log. Sta. 1 KA5 Log. Sta. 2 Log. Sta. 3
PLC-5 PLC-3 DH-485 002 PLC-5/250 PLC-5
DH-485 Link 2

DH-485 003 DH-485 011 DH-485 012 DH-485 022 DH-485 031
Log. Sta. 4 Log. Sta. 5 KA5 Log. Sta. 6 Log. Sta. 7
SLC-5/03 SLC-5/03 DH+ 056 SLC-5/02 SLC-5/03
Data Highway + Link 3

DH+ 011 DH+ 034 DH+ 046 DH+ 057


Log. Sta. 8 Log. Sta. 9 Log. Sta. 10 Log. Sta. 11
PLC-5 PLC-5

FactoryLink Device Interfaces - OPC and Other Guide / 41


• 2 | KTDTL AND NETDTL
KTDTL Driver



KTDTL Configuration 2

FactoryLink
Station
1KT:0
DH+ 036

Data Highway + Link 1

DH+ 010 DH+ 013 DH+ 023 DH+ 035 DH+ 045
Log. Sta. 0 Log. Sta. 1 KA Log. Sta. 2 Log. Sta. 3
PLC-5 PLC-3 PLC-5/250 PLC-5
Data Highway

DH 011 DH 013
Log. Sta. 4 Log. Sta. 5
PLC-3

42 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
KTDTL Driver

NetDTL Configuration 1
FactoryLink
Station

Ethernet TCP/IP

TCP/IP: abplc1 TCP/IP: abplc2


PLC 5/250 PLC-5/40E
Log. Sta. 0 Log. Sta. 1
ORM:2
DH+ 015/016
Data Highway + Link 1

DH+ 010 DH+ 013 DH+ 023 DH+ 035 DH+ 045
Log. Sta. 2 Log. Sta. 3 KA5 Log. Sta. 4 Log. Sta. 5
PLC-5 PLC-3 DH-485 002 PLC-5/250 PLC-5
DH-485 Link 2

DH-485 003 DH-485 011 DH-485 012 DH-485 022 DH-485 031
Log. Sta. 6 Log. Sta. 7 KA5 Log. Sta. 8 Log. Sta. 9
SLC-5/03 SLC-5/03 DH+ 056 SLC-5/02 SLC-5/03
Data Highway + Link 3

DH+ 011 DH+ 034 DH+ 046 DH+ 057


Log. Sta. 10 Log. Sta. 11 Log. Sta. 12 Log. Sta. 13
PLC-5

FactoryLink Device Interfaces - OPC and Other Guide / 43


• 2 | KTDTL AND NETDTL
KTDTL Driver



NetDTL Configuration 2

TCP/IP: abplc3
PLC 5/250
Log. Sta. 0
ORM:2
DH+ 015/016

Data Highway + Link 1

DH+ 010 DH+ 013 DH+ 023 DH+ 035 DH+ 045
Log. Sta. 1 Log. Sta. 2 KA Log. Sta. 3 Log. Sta. 4
PLC-5 PLC-3 PLC-5/250 PLC-5
Data Highway

DH 011 DH 013
Log. Sta. 5 Log. Sta. 6
PLC-3 PLC-3

44 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

R EADING AND W RITING D ATA


After setting up the communication paths, define requests that contain information about the
data to be read from and written to the devices. A read request instructs FactoryLink to read
data from specified locations in a device and store it in tags. A write request instructs
FactoryLink to write the values of tags to specified locations in a device.
Define read requests in either the Read/Write table or the Unsolicited Read table, and write
requests in the Read/Write table. Each table consists of two tables: a control table and an
information table.

The data entry columns in the KTDTL


Read/Write table and the NetDTL
Read/Write table are identical. The
only difference in the tables is the
table names. Likewise, the data entry
columns in the Unsolicited Read table
for KTDTL and NetDTL are the same.
For practical purposes, therefore,
KTDTL and NetDTL Read/Write and
Unsolicited Read tables are used
interchangeably in this chapter.

FactoryLink Device Interfaces - OPC and Other Guide / 45


• 2 | KTDTL AND NETDTL
Reading and Writing Data



Reading Data from a Device
You can define two types of read operations: triggered and unsolicited.
Triggered – In a triggered read operation, data is retrieved from a device and transferred to the
real-time database. First, FactoryLink requests data from specific locations (addresses) in a
device. Next, the data is read then stored in FactoryLink tags.
Triggered Read Operation

FactoryLink requests data from a device.

The device returns the requested data to FactoryLink.

FactoryLink stores the data as tags in the


real-time database.
FactoryLink Station

Triggered read operations occur based on either timed intervals or events. In both types of
operations, a change in value of a trigger tag prompts FactoryLink to read data in specific
locations in a device.
• Timed-Interval Reads – a read operation based on a timed interval instructs FactoryLink to
collect data at defined intervals, such as several times a minute or at a given time each day.
• Event-Driven Reads – a read operation based on an event instructs FactoryLink to collect
data only when a defined event occurs, such as when an operator selects a new graphic
window or when an alarm condition occurs.
Unsolicited – In an unsolicited read operation, FactoryLink does not initiate the reading of
data. Instead, it accepts certain types of data from specified locations in a device, then stores
the data in the real-time database. FactoryLink recognizes the device data because its starting
address and length match an identical address and expected data length configured in
FactoryLink.
Unsolicited Read Operation

The device sends data to FactoryLink.

FactoryLink ensures the incoming data


matches configuration parameters.

FactoryLink stores the data in the


real-time database.
FactoryLink Station

When filling out a request for a read operation, you specify in which tags the data read from
the device during the operation will be stored. Among other things, you specify: the tag name
assigned to the FactoryLink database tag storing the data, the logical station from which the
data will be read, and the address containing the data to be read.

46 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

Triggered Read Request – In a triggered read request table, configure a tag in the
Read/Write Control table as a trigger to initiate a block read operation that causes FactoryLink
to read each device address specified in the Read/Write Information table whenever the value
of the trigger tag is forced to 1 (ON). FactoryLink stores the value read from each address in a
real-time database tag (digital, analog, long analog, float, or message).
How a Triggered Read Operation Works

When the block read trigger is


forced on, FactoryLink does
the following:

Reads each defined address.

Then, stores the value read in the tag


specified to receive the value.

Unsolicited Read Request – In an unsolicited read request table, configure FactoryLink to


recognize and accept data of a particular structure. In the Unsolicited Read Control table, give
the request a name and indicate this is an unsolicited read request. In the Unsolicited Read
Information table, specify the addresses from which data is expected, the type of data
expected, and the tags (digital, analog, longana, float, or message) in which the data will be
stored when FactoryLink receives data that matches the specified criteria.
How an Unsolicited Read Operation Works

When you configure an Unsolicited Read


table, FactoryLink recognizes the data
structure of the value at each defined
address according to its data type.

When FactoryLink receives a value that


matches the criteria, it stores the value
in the tag specified to receive it.

FactoryLink Device Interfaces - OPC and Other Guide / 47


• 2 | KTDTL AND NETDTL
Reading and Writing Data



Writing Data to a Device
In a write operation, data is retrieved from the real-time database and transferred to a device.
FactoryLink reads the values of tags then writes them to specific locations in a device.
Write Operation

FactoryLink reads database tags and


sends their values to a device.

The device stores the values.

FactoryLink Station

You can define two types of write operations: block and exception.
Block – In a block write operation, a change in value of a trigger tag prompts FactoryLink to
write one or more database tag values to specific device locations.
Exception – In an exception write operation, a change in the value of a tag prompts
FactoryLink to write that value to a specific device location. When a tag’s value changes, an
internal change-status indicator within the tag also changes. If a tag is configured for an
exception write and this indicator has been set since the last scan of the real-time database
(indicating the value of the tag has changed), FactoryLink writes this tag’s value to the device.
The difference in these two operations is the way in which each is triggered. Both operations
write data from FactoryLink to the device when a trigger is activated. For a block write, the
trigger is a tag defined specifically for prompting a write operation. For an exception write, the
trigger is the change in status of the tag to be written.
When filling out a request for a write operation, specify the following basic information: the
tag name assigned to the FactoryLink database tag containing the data to be written, the logical
station to which the data will be written, and the address to which the data will be written.

48 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

Block Write Request – In a block write request table, a digital tag you configure in the
Read/Write Control table as a trigger to initiate a block write operation causes the task to write
tag values specified in the Read/Write Information table to their associated device addresses
each time the value of the tag is forced to 1 (ON).
How a Block Write Operation Works

When the block write


trigger is forced on,...

...FactoryLink writes the value of each


tag defined for this table...

...into the specified address.

FactoryLink Device Interfaces - OPC and Other Guide / 49


• 2 | KTDTL AND NETDTL
Reading and Writing Data



Exception Write Request – When any of the values of the tags defined in the Read/Write
Information table change in an exception write request table, the task writes those values to the
defined device addresses. Optionally, define a digital tag to disable and re-enable an exception
write table and a trigger tag to update the equipment once the table is re-enabled. Each defined
exception write results in a separate write command.
How an Exception Write Operation Works

When the Exception Write field is YES,


FactoryLink writes the values of the
tags associated with this table only
when they change.

A disable trigger allows you to disable


and re-enable an exception write table.
Once a table is re-enabled, you can use
a block write trigger to update any
values in the device that changed while
the table was disabled. Neither trigger is
required unless you plan to periodically
disable the table, but both are required if
you do plan to disable the table.

When the value of each defined tag


changes, FactoryLink writes it...

...to the specified device address.

50 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

Configuration Tips and Techniques


This section contains recommendations and considerations for configuring read and write
operations.

Verifying Proper Communications

While not required, it is recommended you configure two simple tables to test the
communication path before you define the read and write operations the application needs.
Perform the following steps to ensure the device can properly communicate with FactoryLink:
Configure two tables: a triggered read table and an exception write table.
In the read table, define:
• A trigger tag you will manually force to 1 (ON), using the FactoryLink Real-Time Monitor,
RTMON.
• A tag to hold the value read from a known address in one of the devices in your
configuration. You will watch the activity of this tag in RTMON to verify it is being
updated.
Define a tag in the write table to hold a value that will be written to the same address
configured in the read table. Change this tag’s value in RTMON to prompt the processing of
this table.
Note: The next steps in the procedure involve the use of the FactoryLink Real-Time
Monitor. For detailed instructions on using RTMON, see the Utilities Guide.
Create a watch list in RTMON containing the tags defined in the two tables. Use the Watch
option on the RTMON Options menu to create a watch list.
Prompt the processing of the triggered read table by forcing a 1 to the read trigger using the
Tag Input option on the RTMON Options menu. You can watch the value of the trigger change
in the watch list.

FactoryLink Device Interfaces - OPC and Other Guide / 51


• 2 | KTDTL AND NETDTL
Reading and Writing Data


When you force the read trigger to 1,...

...its value in the


watch list changes
from 0 to 1.

When the read table is


triggered, the value of
value1 is updated. If the
value read differs from
the tag’s current value,
you will see it change in
the watch list.

When the triggered read table is processed, the tag defined to hold the value read (value1 in the
sample table) is updated with the current value of the specified register address.
Use RTMON to prompt FactoryLink to process the exception write table. Change the value of
the tag to be written (value2 in the sample table) using the same option you used to trigger the
read table, Tag Input. When you change the tag’s value in this way, the exception write table is
processed and the value is written to the specified register address.

52 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

Choosing Operation Type

Following are some guidelines and examples to help you determine which types of read and
write operations work best for specific situations and how to configure these operations to
optimize FactoryLink’s performance.
Triggered Read Operations

A triggered read operation is the best choice for reading data that changes frequently and at
regular intervals. Use the following types of triggered read operations under the described
circumstances.
Interval If an application does not require all data to be collected at the same time,
you can increase FactoryLink’s efficiency by configuring several read
tables, each reading at a different interval and only as often as necessary.
For example, configure a table with timed reads that occur every five
seconds for tags with values that change frequently, and every thirty
seconds for tags with values that change less frequently.
Event If events occur infrequently, you can reduce the number of requests sent
between FactoryLink and the device and increase overall efficiency by
configuring several read tables, each triggered by a different event. For
example, if a graphic screen contains a large number of variables useful
only on that screen (that is, they are not alarm points and are not being
trended), configure a separate read table containing only these variables.
FactoryLink will only read the tags on that screen when the operator
triggers this read table by selecting the graphic screen for viewing. Using
this technique can reduce traffic between FactoryLink and the device when
an application has a large number of graphic screens.
As another example of an event-driven read operation, configure
FactoryLink to trigger a particular read table only if an alarm condition
occurs. The tag that detects the alarm condition can trigger FactoryLink to
collect additional information from the device about the status of related
processes.
Unsolicited Read Operations

Use an unsolicited read operation if values to be read change infrequently and at unspecified
intervals. For example, you might design an application to notify FactoryLink whenever an
unexpected event occurs, such as an electrical unit power surge of a specified magnitude.
Consider the frequency in which unsolicited read operations are expected to execute.
Unsolicited reads occurring too frequently and at irregular intervals can cause excessive traffic
leading to a jam on the communication link and poor system performance.

FactoryLink Device Interfaces - OPC and Other Guide / 53


• 2 | KTDTL AND NETDTL
Reading and Writing Data



Write Operations

Use the following types of write operations under the described circumstances.
Block If an application writes values of tags that change frequently to the device,
use a block write operation because FactoryLink sends the minimum
number of write commands necessary to write the specified data. A block
write is most efficient when your application writes a group of tags at one
time to the device (for example, when your application requires a new
recipe).
Exception If an application writes values of tags that change infrequently to the
device, or if the application only needs to change one value at a time (for
example, a new user-entered setpoint), use an exception write operation.
For each exception write, one packet of data per tag is sent to a device.

Choosing Effective Triggering Schemes

Consider the following triggering guidelines based on the read and write operation
recommendations described in “Choosing Operation Type” on page 53:
• Only Trigger When Data is Needed – how often you choose to trigger data to be read or
written can depend on several factors, including how often the data changes and whether the
changes occur regularly, the timing of the events in the application, and the types of read
and write operations the device supports.
• Only Trigger When on Specific Screens – trigger data needed more often at faster rates
while slowing down other requests.
• Daisy Chain Tables – link or daisy chain tables together in several loops by defining tags
in such a way that the completion of one operation triggers the beginning of another. See
“Cascaded” on page 81.
For detailed descriptions of specific techniques you can use to enhance the performance of
your application, see “Techniques for Improving Communication Performance” on page 80.

Configuring Read and Write Tables

Consider the following recommendations when filling out a request for a read or write
operation. For additional recommendations pertaining to unsolicited read operations only, see
“Unsolicited Read Operation Concepts” on page 63.
• Logically Group Table Entries – FactoryLink creates messages to send to a device based
on entries in a read or write table. Table entries are grouped according to the following
criteria: logical station number, FactoryLink data type, Allen-Bradley data type, and
address. The messages FactoryLink creates are based on the results of the grouped table
entries; therefore, for maximum efficiency, you should attempt to group read and write table
entries the same way in which FactoryLink internally groups them.
Another benefit of organizing table entries as FactoryLink does is debugging your
application is easier. If an error occurs in table processing, you can readily identify the
source of the error.

54 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Reading and Writing Data

• Keep Addresses Contiguous – whenever possible, keep addresses contiguous to reduce


the number of messages FactoryLink must generate to process a table.
If you define a table full of data of the same FactoryLink and Allen-Bradley data type that
will be read from or written to contiguous addresses, chances are FactoryLink will be able to
read or write the data in one transaction (provided the size of the data does not exceed the
maximum size the device can handle for one transmission). If this data is of a different type,
however, FactoryLink must send more than one message to complete the operation.
The following graphic illustrates how FactoryLink groups data being read from or written to
contiguous addresses into messages based on the data’s type. (This example is for a read
table but could also apply to a table for a write operation.)
Read Table Containing Two Different Allen-Bradley Data Types
FactoryLink would
need to generate
two messages to
process this table:
one to read INT2
data and another
to read INT4 data.

• Recognize Processing Differences in Read and Write Operations – FactoryLink


processes data being read differently than it processes data being written. All addresses
defined in a read table are read based on the specified range. Using the table above as an
example, you could get the same result (reading addresses 32 through 41) by defining only
four rows as shown in the following table.
Table Defined to Read a Range of Addresses
FactoryLink will
still generate two
messages to
process this
revised table. All
addresses in the
range of 32 to 41
will be read.

If you define a write table as shown in the table above, however, each row will generate a
separate message and data will only be written to the four addresses specified. To send a
single message to write to addresses 32 through 41, you would need to define each address

FactoryLink Device Interfaces - OPC and Other Guide / 55


• 2 | KTDTL AND NETDTL
Configuring Triggered Read, Block Write, Exception Write



separately as shown in the “Table Defined to Read a Range of Addresses” shown
previously. Only contiguous groups of data (up to the maximum allowed by the device)
would be put in one message for a write operation.
• Define Multiple Operations in a Single Table – Because the KTDTL and NetDTL tasks
can process multiple messages destined for a single device simultaneously, you can define
several read or write operations (within reason and based on the architecture of the
application) in a single table for maximum throughput. Each additional table you define
results in more messages the task must generate thus reducing the efficiency of your
application.
• Keep Disabled Messages Together – put entries that might need to be disabled
periodically in their own table, separate from entries that will not be disabled.
• Prioritize Read and Write Operations – the priority of read and write operations can
affect the speed and performance of an application. Assign a priority to give preference to
the most critical data to be read or written should FactoryLink receive more than one request
to execute a read or write operation at a time.

C ONFIGURING TRIGGERED R EAD , B LOCK W RITE , E XCEPTION W RITE


This section describes how to configure a triggered read, a block write, or an exception write
request table.

Read/Write Control Table


Ensure the current domain selected is Shared in the Configuration Explorer. Choose the
appropriate option.
Add an entry for each read or write request you want transmitted over a communication path to
a device. The information you provide depends on the type of request you are defining. See the
appropriate section:
• Triggered Read
• Block Write
• Exception Write

Accessing

(KTDTL) Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Read/Write Control
(NetDTL) Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Read/Write Control

56 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring Triggered Read, Block Write, Exception Write

Field Descriptions (Triggered Read)

Field Name Description Req. Valid Entry Valid Data Type


Table Name Name for read request table that reflects the operation it X 1 to 16
represents. Define as many request tables as available alphanumeric
memory allows. characters
When the Block Read Trigger tag defined for this table is
forced on, the tag prompts FactoryLink to process this
read table and any other read table with a Table Name
entry associated with the same trigger.
Exception Accept the default of NO to indicate this is not an X NO
Write exception write.
Block Read Indicates the priority of this table, relative to other read 1, 2, 3, 4
Priority operations. The highest priority is 1. This number (default = 1)
influences the order in which the KTDTL or NetDTL task
handles the queuing of block read requests. If the task
receives two requests at the same time, it processes the
request with the highest priority first.
Block Read Tag to initiate a block read of the addresses specified in X tag name digital
Trigger the associated Read/Write Information table. When this
tag’s value is forced to 1, the addresses are read.
This tag can also be defined in another FactoryLink task.
For example, you could define a digital tag in the Event
or Interval Timer, Math and Logic, or the Client Builder,
and assign the same tag name to a Block Read Trigger tag.
When the tag’s value changes to 1 (as the result of a math
operation or a defined event taking place, for example), it
prompts a read operation.
Note: For efficient performance, define a Block Read
Trigger tag as a Block Read State tag in one table,
creating a self-triggered table, or define tag names for
tags across several tables in such a way to create a
cascaded loop (or daisy-chain effect). When you give
identical names to a Block Read State and a Block
Read Trigger tag, the completion of one read operation
triggers the start of another. See page 80 for examples
of how to create a self-triggered table or a cascaded
loop.
For more information about triggers and using tags as
triggers, see “Choosing Effective Triggering Schemes”
on page 54.

FactoryLink Device Interfaces - OPC and Other Guide / 57


• 2 | KTDTL AND NETDTL
Configuring Triggered Read, Block Write, Exception Write



Field Name Description Req. Valid Entry Valid Data Type
Block Read Disables a block read of the tags specified in this table. tag name digital
Disable When this tag’s value is forced to 1, the read operation is
not executed, even when the block read trigger is set. Set
this tag back to 0 to re-enable a block read table that is
disabled.
Note: The Block Read Disable tag can be used to
disable a block read operation that is either part of a
cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered read
table, the Block Read Trigger tag must be toggled or
forced to 1. See “Techniques for Improving
Communication Performance” on page 80.
Block Read Indicates when this operation is complete. This tag is tag name digital
Complete forced to 1 at startup. After the tags defined in the
associated Read/Write Information table are updated in
the FactoryLink database, the complete tag is forced to 1
again.
Block Read Indicates the state of this operation: in progress or tag name digital
State complete. This tag is forced to 1 at startup. While the
table is being processed, the tag is set to 0. After the tags
defined in the associated Read/Write Information table
are updated in the FactoryLink database, the state tag is
forced back to 1.

58 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring Triggered Read, Block Write, Exception Write

Field Descriptions (Block Write)

Field Name Description Req. Valid Entry Valid Data Type


Table Name Name for write request table that reflects the operation it X 1 to 16
represents. Define as many request tables as available alphanumeric
memory allows. characters
When the Block Write Trigger tag defined for this table is
forced on, the tag prompts FactoryLink to process this
write table and any other write table with a Table Name
entry associated with the same trigger.
Exception Accept the default of NO to indicate this is not an X NO
Write exception write.
Block Write Indicates the priority of this table, relative to other write 1, 2, 3, 4
Priority operations. The highest priority is 1. This number (default = 1)
influences the order in which the KTDTL or NetDTL task
handles the queuing of this write request. If the task
receives two requests at the same time, it processes the
request with the highest priority first.
Block Write Tag to initiate a block write of the tag values specified in X tag name digital
Trigger the associated Read/Write Information table to the
addresses defined to receive the values. FactoryLink
writes the values when this tag’s value is forced to 1.
This tag can also be defined in another FactoryLink task.
For example, you could define a digital tag in the Event
or Interval Timer, Math and Logic, or the Client Builder,
and assign the same tag name to a Block Write Trigger tag.
When the tag’s value changes to 1 (as the result of a math
operation or a defined event taking place, for example), it
prompts a wrute operation.
Note: For efficient performance, define a Block Write
Trigger tag as a Block Write State tag in one table,
creating a self-triggered table, or define tag names for
tags across several tables in such a way to create a
cascaded loop (or daisy-chain effect). When you give
identical names to a Block Write State and a Block
Write Trigger tag, the completion of one read
operation triggers the start of another. See page 80 for
examples of how to create a self-triggered table or a
cascaded loop.
For more information about triggers and using tags as
triggers, see “Choosing Effective Triggering Schemes”
on page 54.

FactoryLink Device Interfaces - OPC and Other Guide / 59


• 2 | KTDTL AND NETDTL
Configuring Triggered Read, Block Write, Exception Write



Field Name Description Req. Valid Entry Valid Data Type
Block Write Disables a block write to the tags specified in this table. tag name digital
Disable When this tag’s value is forced to 1, the write operation is
not executed, even when the block write trigger is set. Set
this tag back to 0 to re-enable a block write table that is
disabled.
Note: The Block Write Disable tag can be used to
disable a block write operation that is either part of a
cascaded loop or is self-triggered. The triggering
cycle will cease upon disabling, however. To
re-enable a cascaded loop or a self-triggered write
table, the Block Write Trigger tag must be toggled or
forced to 1. See “Techniques for Improving
Communication Performance” on page 80.
Block Write Indicates when this operation is complete. This tag is tag name digital
Complete forced to 1 at startup. After the tags defined in the
associated Read/Write Information table is written to the
device, the complete tag is forced to 1 again.
Block Write Indicates the state of this operation: in progress or tag name digital
State complete. This tag is forced to 1 at startup. While the
table is being processed, the tag is set to 0. After the tags
defined in the associated Read/Write Information table is
written to the device, the state tag is forced back to 1.

60 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring Triggered Read, Block Write, Exception Write

Field Descriptions (Exception Write)

Field Name Description Req. Valid Entry Valid Data Type


Table Name Name for write request table that reflects the operation it X 1 to 16
represents. Define as many request tables as available alphanumeric
memory allows. characters
When the values of the tags you define in this Read/Write
Information table change, FactoryLink processes this
exception write table and any other exception write table
with a Table Name entry associated with the same tags.
Exception Choose YES for the task to write tag values only when X YES
Write those values change.
Note: Do not specify tags expected to change at
frequent and unpredictable intervals in an exception
write table. Any tag specified will be written to the
device in its own packet (message) each time it
changes. Defining tags that change value frequently
as exception writes can slow down communications
or result in an error message.
Block Write Indicates the priority of this table, relative to other write 1, 2, 3, 4
Priority operations. The highest priority is 1. This number (default = 1)
influences the order in which the KTDTL or NetDTL task
handles the queuing of this write request. If the task
receives two requests at the same time, it processes the
request with the highest priority first.
Block Write Ignore this field for an exception write table.
Trigger
Block Write Ignore this field for an exception write table.
Disable

FactoryLink Device Interfaces - OPC and Other Guide / 61


• 2 | KTDTL AND NETDTL
Configuring Triggered Read, Block Write, Exception Write



Read/Write Information Table

Accessing

(KTDTL) Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Read/Write Control >
“your table name” > Allen-Bradley KTDTL Read/Write Information
(NetDTL) Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Read/Write Control
> “your table name” > Allen-Bradley NetDTL Read/Write Information

Field Descriptions

Define information using the following field descriptions for each address to be read or to
which information is to be written. For a Read Table, add a table entry for each FactoryLink
tag in which data read from the device will be stored when the operation executes. For a Write
Table, add a table entry for each tag to be written when the operation executes.

Field Name Description Req. Valid Entry Valid Data Type


Tag Name (For Read Table) A tag in which FactoryLink will store X tag name digital, analog,
the data read from the device. float, message,
(For Write Table) A tag containing a value to be written longana
to the device.
Define a digital tag and a corresponding Allen-Bradley
data type of BIN or DIG in the Data Type field to read or
write to bit-level addresses (B3:0/4 or N7:3/11, for
example).
Logical Number representing the device from which the data is to
Station be read or to which the tag’s value will be written. This
number was originally defined in the Logical Station
Information table for the logical port through which
communications with this device occurs.
Address (For Read Table) The address in the device’s memory 1 to 65535
where the value to be stored in this tag is located.
(For Write Table) The address in the device’s memory to
which the tag value will be written.
The amount of memory assigned to each Allen-Bradley
data type depends on several factors, including the PLC
or SLC model number and the amount of memory
installed in the system. For address specification formats
and valid device file types and subtags, see
“Allen-Bradley Data Types and Addresses” on page 85.

62 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring an Unsolicited Read

Field Name Description Req. Valid Entry Valid Data Type


Data Type Type of data being read from or written to the device for
each tag defined in the Tag Name field. For descriptions
of the supported Allen-Bradley PLC and SLC data types
and their corresponding FactoryLink data types, see
“Allen-Bradley Data Types and Addresses” on page 85.
If you enter the data type BIN, the task automatically
chooses an Allen-Bradley data type compatible with the
FactoryLink data type of the Tag Name tag. For example,
if you enter BIN as the data type for an analog tag, the
task interprets BIN as INT2 and reads or writes to the tag
as if the data type is entered as INT2.

C ONFIGURING AN U NSOLICITED R EAD


You should understand the concepts before configuring a request for an unsolicited read
operation request. If you are not sure of when to use an unsolicited read operation, see
“Choosing Operation Type” on page 53.

Unsolicited Read Operation Concepts


When the KTDTL or NetDTL task receives unsolicited data from a device, the task updates
tags for which tag names are assigned in an Unsolicited Read table. Configure an Unsolicited
Read table with a specific amount (length) of data and a specific starting address from which
data is expected to be sent by the device. The task then builds the appropriate table structure
for receiving the data according to the data length and expected starting address.
After the task starts, it processes block read and write and exception write operations based on
triggers and state changes configured as tags that are assigned tag names in read and write
tables. As the task goes about its normal operations, it is always ready to accept unsolicited
data it is configured (in an Unsolicited Read table) to receive.
The MSG instruction (or statement) in the PLC or SLC ladder logic, depending upon how it
has been programmed, sends a user-defined block of data based on a particular time or event. If
this block of data and the Unsolicited Read table structure that was built do not match exactly
in length and offset (starting address), then the task will not receive the data.
Before configuring the Unsolicited Read table, be familiar with the concepts discussed in the
following pages related to data flow, data packet processing, address range limitations, and (if
SLC 5/03 and 5/04 devices are being used) SLC 5/03 and 5/04 MSG instructions.
Note: NetDTL—The RSLinx Ethernet interface only accepts unsolicited data from
devices connected directly to Ethernet. For details on configuring the NetDTL task to
receive unsolicited data from devices on DH+, DH, or DH 485 that communicate
through a Pyramid Integrator, see page 64.

FactoryLink Device Interfaces - OPC and Other Guide / 63


• 2 | KTDTL AND NETDTL
Configuring an Unsolicited Read



Data Flow

KTDTL – in unsolicited read operations, Allen-Bradley devices send PLC-2 format


unprotected write command packets over each configured network to the communications port
in the FactoryLink computer. The card port, in turn, passes these command packets to
FactoryLink and the KTDTL task.
NetDTL – unsolicited data flows from the devices in your configuration to FactoryLink and
NetDTL either directly, if the devices are PLC 5/xxEs, or through a PLC 5/250 Pyramid
Integrator (PI), in which case the data is first sent to an alternate address in the PI and then to
FactoryLink and NetDTL.
PLC 5/xxE devices are equipped with a built-in Ethernet interface and, therefore, do not
require a PLC 5/250 PI. In unsolicited read operations, data flows from addresses in the
specified PLC 5/xxE device as PLC-2 format unprotected write command packets. These
packets are sent directly to FactoryLink and NetDTL.
For PLC and SLC devices connected to FactoryLink and NetDTL through a PLC 5/250 PI, the
devices send PLC-2 format unprotected write command packets over each configured network
to an alternate address in the PI (described in the following section). The PI, in turn, passes
these command packets through the Ethernet Interface module and over the Ethernet TCP/IP
network to FactoryLink and the NetDTL task.
The MSG instruction in the ladder logic for each PLC or SLC device in your configuration
directs data to a particular device port. Each port connects directly to either Ethernet, a DH+,
or a DH-485. Refer to the appropriate Allen-Bradley documentation for information about the
MSG instruction.
Alternate Address Definitions in the Pyramid Integrator

NetDTL using INTERCHANGE – at startup, the Ethernet interface assigns itself an alternate
address on the Data Highway+ that is one value higher than the configured address for each
DH+ port on the Pyramid Integrator. (DH+ addresses are specified in octal format; that is, 108
is equal to 8.) The Pyramid Integrator uses this alternate address to process unsolicited data. To
distinguish data sent to a Pyramid Integrator Ethernet interface client from normal
PLC-to-PLC data sent to the PLC-5/250, the PLC writes unsolicited data to the alternate
address. For example, if the Resource Manager PLC-5/250 address is 10, for unsolicited data,
its alternate address is 11.
Pyramid Integrator as Data Concentrator

NetDTL using RSLinx – the alternate address applies to INTERCHANGE only. The RSLinx
Ethernet interface only accepts unsolicited data from devices connected directly to Ethernet.
To receive data from devices on DH+, DH, or DH 485, use the Pyramid Integrator as a data
concentrator; that is, send unsolicited messages to the Pyramid Integrator first as if it were
another PLC; then transmit the data from the Pyramid Integrator to the RSLinx Ethernet
interface.

64 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring an Unsolicited Read

Unsolicited Read Data Packets

A data packet is an unprotected write command for unsolicited reads. The KTDTL and
NetDTL tasks process data tags as packets of data rather than as individual addresses. Each
packet has a unique definition that includes the following information: path to the originating
station, command length (number of tags written), and the starting address (lowest address
defined for a particular logical station).
• NetDTL – for NetDTL, the path to the originating station includes the PI DH+ port and the
device's network address on that port, or the Ethernet address of a PLC 5/xxE device.
• KTDTL – for KTDTL, the path to the originating station includes the Allen-Bradley PC card
port and the device's network address.
The starting address of a data packet is flexible and can be assigned any value ranging from 0
to 7777 (octal). The address of the originating station and the command length, however, are
less flexible. They define similar packets of data from similar locations.
For unsolicited reads, it is only necessary to define the first and last addresses in a packet. You
can leave the middle addresses (everything other than the low and high addresses) undefined
or, most likely, assign them to single or multiple FactoryLink tags as described in the following
section.
Application Data Packets

When the KTDTL or NetDTL task maps unsolicited data to tags, it sorts the data into packets
based on the structure of PLC-2 write commands:
• For each defined Unsolicited Read table, the task sorts the entries in ascending order by
logical station and address. The lowest address for each logical station determines the
starting address of the packet.
• The task then determines the command length by first subtracting the starting address from
the highest referenced address, then by adding one. The highest referenced address is the
highest address plus the PLC-type length.
To Determine the PLC-Type Length – for the data types listed, add the specified value:
INT2 Add 0.
INT4, FLT Add 1.
STRUC, Add the length specifier (value of the Address field in the Unsolicited Read
ASC Information table) minus one.
Data Packet Processing

When the KTDTL or NetDTL task receives a data packet, it searches its list of defined packets
for definitions that match the originating station, starting address, and number of
Allen-Bradley tags of the received packet. When it finds matching definitions, the task reads
the received information and writes all of the data tags described in the definitions to the
real-time database according to the values of the data in the received packet. Any specific data

FactoryLink Device Interfaces - OPC and Other Guide / 65


• 2 | KTDTL AND NETDTL
Configuring an Unsolicited Read



tag that is mapped to an address is only processed if that data tag and address are present in the
definition of the received packet.
Two individual packet definitions with overlapping device addresses that differ in originating
station, starting address, or length are separate and unique. For example, a packet that starts at
address 0100 (octal) and writes ten tags (words) is not part of a definition for a packet from the
same station that also starts at address 0100 (octal) but writes eleven tags (words). Because the
length of the packets is different, the two are unique. Furthermore, if two identical packets
starting at address 0200 (octal) and comprising seven identical tags are received from different
originating stations, they are also unique.
Defining Multiple Data Packets

If one client (FactoryLink KTDTL or NetDTL task) requires multiple definitions of the same
data packet, the client itself handles the sorting of these packets using the criteria described in
“Data Packet Processing” on page 65. If multiple clients define identical data packets,
however, the server (Allen-Bradley INTERCHANGE or RSLinx) cannot differentiate between
these packets and it loses data; therefore, to avoid data loss, do not define identical data packets
from multiple clients of the same server.
If you need multiple definitions of the same data packet, define one packet in one table with
multiple tags per address. Alternatively, you could define two identical packets in two separate
Unsolicited Read Information tables.
Maximum Command Length of Data Packets
• KTDTL – for devices communicating through an Allen-Bradley card over a DH+, the
maximum command length for individual packets in unsolicited reads is 120 words (240
bytes).
• NetDTL – for devices communicating through a Pyramid Integrator with the Ethernet
Interface module over a DH+, the maximum command length for individual packets in
unsolicited reads is 120 words (240 bytes).
For SLC 5/03 and 5/04 processors, the maximum length is 41 tags (words).
If the range of addresses defined for a particular logical station exceeds this maximum
command length, send a second packet of addresses from the Allen-Bradley device for this
logical station. If FactoryLink tags are defined for appropriate (border) addresses, then these
packets will occupy contiguous space.
Number of Data Packets

For the most efficient performance of an unsolicited read operation, define only one packet per
logical station in a single configuration table. If you need to define more than one packet per
logical station, however, make the starting address number of each subsequent packet greater
than the highest address in the address range of the previous packet.

66 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring an Unsolicited Read

Address Range Limitations

All Allen-Bradley PLCs support the PLC-2 write command; however, some PLCs limit the
address ranges and data types that can be specified. Consult the appropriate PLC programming
guide for these restrictions.
Since unsolicited messages must be PLC-2-type unprotected writes, the destination station
type in the PLC ladder logic MSG instruction must be PLC-2. For most PLCs, the ladder logic
MSG instruction does not allow the source address to be an F, H, L, file type if the destination
PLC is a PLC-2. The communication binary format for INT4, FLT, and others depends on the
actual PLC type.
In standard Allen-Bradley PLCs, certain Allen-Bradley PLC data types (FLT and INT4, to
name a few) cannot be sent in a PLC-2 unprotected write command. To instruct the PLC to
send such data types to FactoryLink:
Define the PLC type. For the task to convert the PLC type for the originating logical station in
the definition of the logical station number, specify the actual PLC type (PLC-3, PLC-5,
PLC-250) in the Station Type field of the Logical Station Information table for the logical
station referenced in the Unsolicited Read Information table. The PLC type you enter in the
Station Type field corresponds to the PLC binary format for the data you specify in the Data
Type field on the Unsolicited Read Information table.
Copy the data to a binary or integer file. Build the PLC-2 write data from the PLC, sending the
data in a binary or integer file by copying the long integer, floating-point, or other data to the
binary or integer file.
Trigger a MSG instruction to send the data to the appropriate address:
• KTDTL – the MSG instruction should send the data from the file to the DH+ or DH-485
address of the PC card port.
• NetDTL – for a PI connected to a DH+, the MSG instruction should send the data from the
file to the PI’s alternate address. For a device with a built-in Ethernet interface, the MSG
instruction should send the data from the file to the IP address labeled CLIENT for
INTERCHANGE. For RSLinx, use the TCP/IP dot notation address (nnn.nnn.nnn.nnn) of
the FactoryLink client.
SLC 5/03 and 5/04 MSG Instruction Considerations

The SLC 5/03 and 5/04 processors, using the MSG instruction, can read and write data to and
from data table memory. To send and receive data from a user-defined data table memory
location, you specify information associated with the data for the Target Node, Target Offset,
and Message Length MSG instruction functions.
Note the following considerations when configuring the MSG instruction:
• When using the MSG instruction to send data to the KTDTL task, the SLC 5/03 or 5/04
must use the 485CIF as the target device.

FactoryLink Device Interfaces - OPC and Other Guide / 67


• 2 | KTDTL AND NETDTL
Configuring an Unsolicited Read



• When a SLC 5/03 processor writes to a DH+ station address across a 1785 KA5 module, or
when a SLC 5/04 processor writes directly to another DH+ address, be sure to adhere to the
following limits for each function:
Target Node The Target Node (target network station address) must be between 0 and 31
(octal). Although the DH+ network range is 0 to 77 (octal), any address you
enter in an Unsolicited Read Information table above 31 will result in an
error.
Target Offset For an unsolicited read table entry, divide the Target Offset (target memory)
value, which is entered in word tags, by two. For example, a Target Offset
field entry of 22 (decimal) in a MSG instruction translates to an Address
field entry of 13 (octal) in the Unsolicited Read Information table.
Message The Message Length determines the total word length of FactoryLink tags
Length you can configure in an unsolicited read table. For example, a Message
Length of 10 would be sufficient for defining ten FactoryLink tags for
Allen-Bradley data type INT2, or eight tags for data type INT2 and one tag
for data type INT4.
The Message Length in words must be between 0 and 41 (octal). Although
the DH-485 network allows up to 112 one-word tags, if the total word
length of the FactoryLink tags you configure in an unsolicited read table is
over 41, an error occurs.
Note: If the entries in the Unsolicited Read Information table do not exactly match
the values for these functions in the MSG instruction, the SLC 5/03 or 5/04 processor
displays an error.
• The entry fields for the SLC 5/03 and 5/04 MSG instruction only accept data in decimal
notation. Be sure to enter their octal equivalents into an unsolicited read table.
• For the SLC 5/03 processor, when the target node is a DH+ network address connected to
the NetDTL task through a 1785-KA5 module, configure the processor for remote
communications. If the target node is another DH-485 network address, configure the
processor for local communications.
• For the SLC 5/04 processor, when the target node is another DH+ network address,
configure the processor for local communications.
Refer to the Allen-Bradley’s reference manual for SLC 500 advanced programming software
for more information on SLC 5/03 and 5/04 MSG instructions.

68 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring an Unsolicited Read

Unsolicited Read Control Table

Accessing

(KTDTL) Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Unsolicited Read
Control
(NetDTL) Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Unsolicited Read
Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Table Name Name for unsolicited read request table that reflects the X 1 to 16
operation it represents. You can define as many request alphanumeric
tables as available memory allows. characters
Unsolicited Interprets this operation as an unsolicited read and X YES,
Type emulates the device’s addressing structure based on FORCE
entries you make in the Unsolicited Read Information
table. The incoming data will be written to the real-time
database as specified in this field.
YES – The data is written to the tag represented by the tag
name specified in the Unsolicited Read Information table.
If the current value of the tag is equal to the value being
written, the change-status indicator is unaffected. If a
different value is being written to the tag, however, it will
overwrite the current value and the tag’s change-status
indicator will be set to 1.
FORCE – The data is written and the change-status flag is
automatically set to 1, regardless of whether the tag’s
value has changed since the last write.

FactoryLink Device Interfaces - OPC and Other Guide / 69


• 2 | KTDTL AND NETDTL
Configuring an Unsolicited Read



Unsolicited Read Information Table

Accessing

(KTDTL) Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Unsolicited Read
Control > “your table name” > Allen-Bradley KTDTL Unsolicited Read Information
(NetDTL) Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Unsolicited Read
Control > “your table name” > Allen-Bradley NetDTL Unsolicited Read Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Tag Name Tag in which FactoryLink will store the data read from X tag name digital, analog,
the device. Be sure the message length defined in the float, message,
PLC or SLC MSG instruction is sufficient to handle the longana
number and types of tags you define in this table. See
“SLC 5/03 and 5/04 MSG Instruction Considerations” on
page 67.
For data expected from bit-level addresses (B3:0/4 or
N7:3/11, for example), define a digital tag and a
corresponding Allen-Bradley data type of BIN or DIG in
the Data Type field.
Logical Number representing the device from which the expected
Station data is to be read. This number was originally defined in
the Logical Station Information table for the logical port
through which communications with this device occurs.
Address The address in the device’s memory where the value to be 1 to 65535
stored in this tag is located. You must use the PLC-2
format. For address specification formats, see
“Allen-Bradley Data Types and Addresses” on page 85.
For special addressing requirements pertinent to
unsolicited reads, see “Unsolicited Read Operation
Concepts” on page 63. For offlink addressing
considerations pertinent to SLC 5/03 and 5/04 processors,
see “SLC 5/03 and 5/04 MSG Instruction
Considerations” on page 67

70 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Configuring an Unsolicited Read

Field Name Description Req. Valid Entry Valid Data Type


Data Type Type of data expected from the device for each tag
defined in the Tag Name field. For descriptions of the
supported Allen-Bradley PLC and SLC data types and
their corresponding FactoryLink data types, see
“Allen-Bradley Data Types and Addresses” on page 85.
If you enter the data type BIN, the task automatically
selects an Allen-Bradley data type compatible with the
FactoryLink data type of the Tag Name tag. For example,
if you enter BIN as the data type for an analog tag, the
task interprets BIN as INT2 and reads or writes to the tag
as if the data type is entered as INT2.

FactoryLink Device Interfaces - OPC and Other Guide / 71


• 2 | KTDTL AND NETDTL
Sample Read and Write Table Entries



S AMPLE R EAD AND W RITE TABLE E NTRIES
This section provides descriptions of some possible configuration table entries for a triggered
read, an unsolicited read, a block write, and an exception write request table. The table entries
provided in the following pages illustrate the way in which FactoryLink processes these
requests.

Sample Triggered Read Request

In the graphic below, the READ table is configured in the following way:
• When the value of KTDTL_READ_TRIGGER (Block Read Trigger) is 1, FactoryLink reads
the configured address and writes its value to the tag configured for this table (in the
Read/Write Information table). The block read priority, which is set automatically if you do
not enter a value, is set to the default of 1, the highest priority.
• When the value of KTDTL_READ_DISABLE (Block Read Disable) is 1, FactoryLink
disregards the trigger tag, KTDTL_READ_TRIGGER, and does not process the READ
table.
• Once the data is read and stored in the database tag defined (in the Read/Write Information
table) to receive it, FactoryLink forces a value of 1 to KTDTL_READ_STATE (Block Read
State) and to KTDTL_READ_COMPLETE (Block Read Complete). During the read
operation, KTDTL_READ_STATE is set to 0.
Read/Write Control Table for a Triggered Read

READ is
illustrated in
this example.

72 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Sample Read and Write Table Entries

As shown in the next graphic, when the READ table is triggered by


KTDTL_READ_TRIGGER, FactoryLink reads the value of bit 12 in file type B, file number
3, tag 1 in the device configured as logical station 0 and stores the value in a digital
FactoryLink tag, P240000.
Read/Write Information Table for a Triggered Read

The following graphic illustrates how this triggered read operation works.
How Triggered Read Operation Works
When the value of
KTDTL_READ_TRIGGER is
1, FactoryLink processes the
table, READ.

FactoryLink reads the value


of bit 12 in file type B, file
number 3, tag 1...

...then stores the value


read in P240000.

FactoryLink Device Interfaces - OPC and Other Guide / 73


• 2 | KTDTL AND NETDTL
Sample Read and Write Table Entries



Sample Unsolicited Read Request

In the next graphic, the UNSOL_READ table is configured to accept unsolicited data of the
type specified on the corresponding Read/Write Information table from the address specified
for this data type.
Unsolicited Read Control Table

UNSOL_READ is illustrated
in this example.

As shown in the next graphic, when FactoryLink receives a 16-bit, signed analog integer from
octal address 34 in the device configured as logical station 0, it reads the value then stores it in
an analog FactoryLink tag, ANA_15.
Unsolicited Read Information Table

74 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Sample Read and Write Table Entries

The following graphic illustrates how this unsolicited read operation works.
How Unsolicited Read Operation Works

When FactoryLink receives


INT2 data from address 34,
it processes the table,
UNSOL_READ.

FactoryLink reads the data


then stores it in the analog
tag, ANA_15.

Sample Block Write Request

In the graphic below, the WRITE table is configured as follows:


• When the value of KTDTL_WRITE_TRIGGER (Block Write Trigger) is 1, FactoryLink
reads the tag configured for this table (in the Read/Write Information table) and writes its
value to the configured register address. The block write priority, which is set automatically
if you do not enter a value, is set to the default of 1, the highest priority.
• When the value of KTDTL_WRITE_DISABLE (Block Write Disable) is 1, FactoryLink
disregards the trigger tag, KTDTL_WRITE_TRIGGER, and does not process the WRITE
table.
• Once FactoryLink writes the tag values, it forces a value of 1 to KTDTL_WRITE_STATE
(Block Write State), and to KTDTL_WRITE_COMPLETE (Block Write Complete). During
the write operation, KTDTL_WRITE_STATE is set to 0.

FactoryLink Device Interfaces - OPC and Other Guide / 75


• 2 | KTDTL AND NETDTL
Sample Read and Write Table Entries



Read/Write Control Table for a Block Write

WRITE is
illustrated in
this example.

As shown in the next graphic, when the WRITE table is triggered by


KTDTL_WRITE_TRIGGER, FactoryLink writes the value of a digital FactoryLink tag,
P240000, to bit 12 in file type B, file number 3, tag 1 in the device configured as logical station
0.

76 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Sample Read and Write Table Entries

Read/Write Information Table for a Block Write

The graphic below illustrates how this block write operation works.
How Block Write Operation Works

When the value of


KTDTL_WRITE_TRIGGER is
1, FactoryLink processes the
table, WRITE.

FactoryLink writes the


value of P240000...

...into bit 12 in file type B,


file number 3, tag 1.

FactoryLink Device Interfaces - OPC and Other Guide / 77


• 2 | KTDTL AND NETDTL
Sample Read and Write Table Entries



Sample Exception Write Request

In the following graphic, the EXCEPTION table is configured to read the tag configured for
this table (in the Read/Write Information table) and write its value to the configured address.
FactoryLink, however, will only perform this operation when the tag’s value changes. The
table is disabled when NDTL_EXCEPTION_DISABLE (Block Write Disable) is set to 1, and
re-enabled when NDTL_EXCEPTION_DISABLE is set to 0.
Read/Write Control Table for an Exception Write

EXCEPTION is
illustrated in
this example.

As shown in the next graphic, whenever the value of the digital tag P240000 changes,
FactoryLink processes the EXCEPTION table. This table writes the value of P240000 to bit 12
in file type B, file number 3, tag 1 in the device configured as logical station 0. If the table is
disabled then subsequently re-enabled and NDTL_EXCEPTION_TRIGGER (Block Write
Trigger) is set to 1, bit 12 is updated with the value of P240000 if the value has changed since
the table was disabled.

78 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Sample Read and Write Table Entries

Read/Write Information Table for an Exception Write

The next graphic illustrates how this exception write operation works.
How Exception Write Operation Works

When the value of


NDTL_EXCEPTION_DISABLE
is 1, FactoryLink does not
process the table, EXEPTION.

When the value of


NDTL_EXCEPTION_TRIGGER is
1 and the table has been disabled,
FactoryLink writes the value of
P240000 if it has changed since
the table was disabled.

Because this is an
exception write table,...

...when the value of


P240000 changes,
FactoryLink writes its
value into bit 12 of file
type B, file number 3,
tag 1.

FactoryLink Device Interfaces - OPC and Other Guide / 79


• 2 | KTDTL AND NETDTL
Techniques for Improving Communication Performance



TECHNIQUES FOR I MPROVING C OMMUNICATION P ERFORMANCE
This section describes application techniques that can improve the throughput and efficiency
of data communications between the KTDTL or NetDTL task and Allen-Bradley devices.
These techniques involve the specification of the priority in which the task processes read and
write operations and various methods of triggering the tables and tags defined in the
Read/Write Control table.

Specifying Priority
The Read/Write Control table contains two columns for specifying the priority of block reads
and block or exception writes: Block Read Priority and Block Write Priority. The priority of an
operation can range from 1 to 4. These values correspond to four first-in/first-out (FIFO)
priority queues which are set up in order of importance. Priority queue 1 has the highest
priority.
When the Block Read Trigger or Block Write Trigger tag for a table changes from 0 or is forced
to 1, or when a tag in an exception write table changes, that table or exception tag is placed into
one of the four queues for processing by the INTERCHANGE or RSLinx software. This queue
placement depends on the value specified in the Block Read Priority or Block Write Priority
column for the table.
Each queue can hold up to 256 pending tables. When a table is triggered and the priority queue
to which it has been assigned is not full, the table is placed in that queue. The Block Read State
or Block Write State tag for the table is reset to 1.
The queues are polled for tables (during each pass of the main loop of the KTDTL or NetDTL
task) according to the order of importance of the priority. The priority 1 queue is polled the
most frequently and the priority 4 queue is polled the least frequently. Every table is eventually
processed but the ones in the priority 4 queue can take more time to process.
After the INTERCHANGE or RSLinx software processes a pending table, the table is removed
from the queue. If the communication was successful, the tags defined in the processed table
are updated in the FactoryLink real-time database and the Block Read Complete or Block Write
Complete tag for the table is reset to 1.

Overtriggering
All tables are placed by default in the priority 1 queue, which is appropriate in most cases.
When an application contains a large number of tables, however, or when an exception write
table contains tag names for rapidly changing tags, an overtriggering situation can arise with
all tables going into the same queue. Overtriggering occurs when tables are being placed in a
priority queue faster than the INTERCHANGE or RSLinx software can pull the tables out and
process them.
When a queue is full, an additional request to place a table in it results in the generation of an
error message which is displayed on the Run-Time Manager screen: (KTDTL/NetDTL) in
Overtriggered State: Reduce Trigger Rate.

80 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Techniques for Improving Communication Performance

Since the maximum number of pending tables a queue can hold is 256, the maximum number
of total pending tables is 1024 (256 * 4 queues = 1024). If you accept the priority default of 1
for all tables, the total allowable number of pending I/O transactions is only 256. To more
evenly distribute tables across the four priority queues (thus reducing the priority 1 queue’s
burden of handling all the pending I/O requests), you could assign priority 1 or 2 to tables
containing more important data and priority 3 or 4 to tables containing less important data.
Using this logic, you would assign a high priority to an exception write table for an operation
that acknowledges a loud annoying alarm and a low priority to a block write table that
downloads a batch recipe once a day.

Efficient Triggering
This section discusses triggering techniques to consider for optimum performance of your
application.
Timed

The easiest and most basic way to trigger a block read or write operation is with a timed tag. To
define a timed trigger tag, enter a tag name for a Block Read Trigger or Block Write Trigger tag
in the Read/Write Control table that matches the tag name of an interval timer tag (defined in
the Interval Timer Information table). If you define this tag to change once per second, the
table is placed in its assigned queue once every second.
Using timed tags as triggers is acceptable in most cases. An overtriggering situation can occur,
however, if the trigger rate causes tables to be placed into a queue faster than the
INTERCHANGE or RSLinx software can process them.
A situation in which triggers overlap can occur as well. To illustrate, suppose a 5-second, a
15-second, and a 30-second timed tag are used to trigger various tables. Each table is placed in
its designated queue every 30 seconds when the various triggers line up. The use of prime
numbers quickly solves this problem, but a more effective method follows.
Note: The next two triggering methods, cascaded and self-triggered, can solve
potential overtriggering situations in many cases. These methods, however, might not
be appropriate for every read or write table you define. For instance, the timed method
works best for tables that do not need to be updated at the highest possible rate.
Cascaded

The cascading of tables is an alternative to using timed triggers. As mentioned previously, the
Block Read State or Block Write State tag is reset to 1 after a table is placed into a priority
queue. Similarly, the Block Read Complete or Block Write Complete tag is reset to 1 after the
INTERCHANGE or RSLinx software processes the table.
In the Read/Write Control table, if either the complete or state tag is defined as the trigger tag
for the table in the row below the current table, that table will not be triggered and placed into
a queue until the preceding table is either successfully placed in a queue or processed. If the
table defined in the final row of the Read/Write Control table contains a tag name for a

FactoryLink Device Interfaces - OPC and Other Guide / 81


• 2 | KTDTL AND NETDTL
Techniques for Improving Communication Performance



complete or state tag that matches the tag name of the trigger tag for the table defined in the
first row, the completion of the final table triggers the first table. This endless loop results in
the sequential processing of tables at the fastest possible rate.
The next graphic illustrates a series of read tables created using the cascading technique. This
type of table setup is also referred to as a daisy chain of tables.
Cascaded Read Tables

When the READ1 table


has been processed, its
state tag, r1_state, is
forced back to 1.
Since r1_state is defined as
the read trigger for the
READ2 table, READ2 is the
next table triggered.

A table is placed in a queue only after the previous table has been placed or processed. If you
use the Block Read State or Block Write State tag to perform the cascade, the successful
processing of a table prior to the next table in the loop being triggered is not guaranteed; but
overtriggering is prevented. Regardless of communications, the loop will continue to process.
If a table is to be placed into a queue that has become full, the value of the state tag for that
table will not change. Consequently, the next table will not be triggered until room is available
in the queue for the current table.
If you use the Block Read Complete or Block Write Complete tag to perform the cascade, the
next table in the loop is placed into its queue after the previous table is successfully
communicated through the INTERCHANGE or RSLinx software. In this case, successful
processing of the transaction is guaranteed. (A timeout error occurring somewhere in the loop
will slow the performance of the cascade.)
A parallel between timed and cascaded triggering further illustrates this method’s
effectiveness. When the same timed trigger tag is used to trigger each of several tables defined
in the Read/Write Control table, the tables are processed sequentially (starting with the
beginning row of the table) on each occurrence of the trigger. Essentially, this scenario
represents a timer-initiated cascade. If each instance of the timed tag is replaced by a tag that,
when combined with other tags, creates the cascaded triggering effect, the fastest rate at which
the tables can be placed into queues is naturally set by the tables themselves.
For example, experimentation determines that when one 3.2-second timed digital tag is used as
the same trigger tag for a number of tables, the application can trigger the tables without the
overtrigger message appearing. (Tests performed with a 3.1-second tag resulted in the message
appearing and 3.2 was found to be the limit.) When the triggering method for these tables is
changed from timed to cascaded, the frequency at which the tables update themselves in the
loop is exactly 3.2 seconds.

82 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Techniques for Improving Communication Performance

Self-Triggered

NetDTL – for communications with PLC-5/xxE devices and PLC-5/250 devices with an
Ethernet interface module, the use of self-triggered tables can increase the throughput and
efficiency of read and write operations.
FactoryLink can process tables for read and write operations to Ethernet devices more quickly
than it can process tables going to devices not connected directly to Ethernet. (The Ethernet
connection and the I/O time for the NetDTL interface are faster.) If you use the cascaded
method for triggering tables going to devices that will process the tables at different speeds,
tables to the devices that process more quickly (Ethernet devices) will idle in the loop waiting
for the tables going to the other devices that occur earlier in the cascade to finish processing.
In a self-triggered table, instead of a state or complete tag serving as a trigger for the next table
in a cascaded loop, a state or complete tag serves as a Block Read Trigger or Block Write Trigger
tag for the table in which it is defined. In other words, one tag name is defined for both the
trigger tag and the complete or state tag in a single table:
Self-Triggered Read Table

When FactoryLink starts, the complete or state tag is automatically set to 1. If you have
defined this same tag as the trigger tag, the table is also placed in its priority queue at startup.
When the complete or state tag is set again as a result of the operation, the cycle starts over and
the table is placed in its priority queue again (because the complete or state tag is also the
trigger).
Overtriggering does not occur with a self-triggered table because a table destined for a device
is only placed into a queue or processed after the successful previous processing or queue
placement of the table.
Note: The continuation of a cascaded loop or self-triggered table will cease if the Block
Read Disable or Block Write Disable tag is set to 1. To restart after the disable tag is set
to 0 again, the Block Read Trigger or Block Write Trigger tag must be reset to 1.

FactoryLink Device Interfaces - OPC and Other Guide / 83


• 2 | KTDTL AND NETDTL
Techniques for Improving Communication Performance



The following graphic illustrates the methodology of a self-triggered read table that uses the
state tag to self trigger.
Self-Triggered Read Table

At FactoryLink startup, selftrig (as a


state tag) is set to 1.
As a trigger tag, selftrig also places the
R_AGAIN table into queue 1 at startup.

During processing of the R_AGAIN


table, selftrig (as a state tag) is set to 0.

If the table completes successfully (the


data is read then stored in the tags
defined in the Read/Write Information
table), selftrig (as a state tag) is set to 1.

When the state tag, selftrig, is set to 1, the table is


placed into its queue again because selftrig is also
the trigger tag. If selftrig (as a state tag) remains 0
because the table does not complete successfully,
selftrig (as a trigger tag) never gets set for queuing
the table again.

84 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Allen-Bradley Data Types and Addresses

A LLEN -B RADLEY D ATA TYPES AND A DDRESSES


This section provides information about: the conversion of Allen-Bradley data types to
FactoryLink data types, formats for entering addresses, and valid device-specific file types and
subtags you can specify in addresses.
Data Types – the KTDTL and NetDTL tasks can convert numerous Allen-Bradley data types
into compatible FactoryLink data types. “Supported Data Types” on page 86 provides a list of
each supported Allen-Bradley data type and its FactoryLink data type after conversion.
Addresses – enter the addresses of the PLC and SLC memory locations being accessed in the
Address field on the Read/Write Information and Unsolicited Read Information tables. For
information about valid address formats, see “Address Specification Formats” on page 87.
For information about valid file types and subtags for specific device types, see the appropriate
section:
• “PLC-3 File Type Reference” on page 89
• “PLC-5 File Type Reference” on page 90
• “PLC-5/250 File Type Reference” on page 95
• “SLC 500 File Type Reference” on page 100

FactoryLink Device Interfaces - OPC and Other Guide / 85


• 2 | KTDTL AND NETDTL
Supported Data Types



S UPPORTED D ATA TYPES
The following table provides descriptions of the supported Allen-Bradley PLC and SLC data
types and their corresponding FactoryLink data types.

FactoryLink Allen-Bradley Description/Conversion


Data Type Data Type
Digital BIN Automatic conversion to DIG
DIG Individual bit in a PLC file tag
Analog BIN Automatic conversion to INT2
INT2 16-bit signed integer
INT4 32-bit signed integer
BCD3 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
BCD4 16-bit binary-coded decimal 4 digits
UBCD 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
FLT 32-bit floating-point value; the specific format
depends on the PLC type
Longana BIN Automatic conversion to INT4
INT2 16-bit signed integer
INT4 32-bit signed integer
BCD3 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
BCD4 16-bit binary-coded decimal 4 digits
UBCD 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
FLT 32-bit floating-point value; the specific format
depends on the PLC type

86 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

FactoryLink Allen-Bradley Description/Conversion


Data Type Data Type
Floating-point BIN Automatic conversion to FLT
INT2 16-bit signed integer
INT4 32-bit signed integer
BCD3 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
BCD4 16-bit binary-coded decimal 4 digits
UBCD 16-bit binary-coded decimal 3 digits; most-significant
nibble zeroed/ignored
FLT 32-bit floating-point value; the specific format
depends on the PLC type
Message BIN Automatic conversion to STRUCT
STRUCT Raw file contents as transmitted over the Data
Highway; length in tags based on native tag size of the
PLC file
ASC “STRUCT” valid only in PLC files with one word per
tag; high and low order bytes swapped from Data
Highway packet contents
ST Special PLC type specification for the “ST” PLC file
types; one tag per FactoryLink message tag

Address Specification Formats


This section contains descriptions of the formats you can use in specifying addresses in read
and write tables.

PLC-2 Format

Use the following formats to specify addresses for PLC-2 devices, and for PLC-3, PLC-5, and
PLC-5/250 devices configured for PLC-2 compatibility.
Note: You must use this format for unsolicited read operations.
word
word/bit
word,length
where:
word (Required) Enter the address of the PLC tag in octal. Valid values are 0
through 7777 octal. The actual high address depends on the specific PLC
addressed.

FactoryLink Device Interfaces - OPC and Other Guide / 87


• 2 | KTDTL AND NETDTL
Supported Data Types



/bit (Optional) After the address, enter a front slash (/) then the octal bit number
inside the PLC tag addressed by the word. Valid values are 0 through 17
octal, where 0 is the least significant bit and 17 is the most significant bit.
,length (Optional) After the address, enter a comma (,) then the decimal number of
words to be written to FactoryLink message tags.
Sample Address Entries
17 Word 15 decimal
23/17 Bit 17 of word 23 (word 19 decimal)
7/7 Bit 7 of word 7 (7 decimal)
0,100 First 100 decimal words

PLC-3, PLC-5, and PLC-5/250 Format

Use the following formats to specify addresses for PLC-3, PLC-5, and PLC-5/250 devices.
The brackets enclose the parts of the format; do not enter these in your address specification.
Do not enter spaces between the parts of the format.
[module_id][filetype][filenumber][:;][tag][/bit][,length][.subtag]
module_id (Valid for PLC-5/250 devices) Define the module ID (pushwheel) number
that specifies the thumbwheel value on the processor module. (RM default
is 0.)
filetype (Required) Specify the PLC file type. For valid entries for a specific PLC
type, see the appropriate PLC file types and subtags table.
filenumber (Optional) Enter the file number. The default is 0 for all PLC types except
PLC-5, where a default file number exists for some file types.
:; (Required) Enter either a colon (:) or semicolon (;).
tag (Optional; assumed 0 if not entered) Enter the file tag number in octal for
input/output files and in decimal for all other PLC file types. Follow this
number with an appropriate separator and either the bit specifier, length in
file tags, or appropriate subtag.
/bit (Optional) Enter a front slash (/) then the bit specifier in octal for PLC-3 and
input/output files and in decimal for all other PLC types. If a back slash (\)
is erroneously entered, the default value will be used. The default is the
least significant bit, 0.
,length (Enter for message tags) Enter a comma (,) then specify the length, in file
tags, to be read or written. The default is 1.
.subtag (Optional) Enter a period (.) and then specify a subtag member of the
specified address file tag. For valid entries for a specific PLC type, see the
appropriate file types and subtags table.

88 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

PLC-3 File Type Reference


This section provides a list of the valid file types for PLC-3 addresses and the valid subtags for
files types C and T.

File Types

The following file types can be used in PLC-3 address specifications:


Valid File Types for PLC-3 Addresses
Allen-Bradley Tag Length
File Type Description Data Type in Words
O Outputs DIG/INT2 1
I Inputs DIG/INT2 1
T Timers STRUCT 3
C Counters STRUCT 3
N Integers DIG/INT2 1
F Floating-point FLT 2
D Decimal BCD4 BCD4 1
B Binary DIG/INT2 1
A ASCII ASC 1
H Long integer INT4 2
S Status table DIG/INT2 1

Subtags

The following subtags are valid for the specified file types in PLC-3 address specifications:

File Type C
Subtag Description Data Type Writable
U Up enable DIG No
CD Down enable DIG No
DN Done DIG No
OV Overflow DIG No
UF Underflow DIG No
CTL Control word INT2 No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

FactoryLink Device Interfaces - OPC and Other Guide / 89


• 2 | KTDTL AND NETDTL
Supported Data Types



File Type T
Subtag Description Data Type Writable
TE Enabled DIG No
TT Timing DIG No
TD Done DIG No
CTL Control word INT2 No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

PLC-5 File Type Reference


This section provides a list of the valid file types for PLC-5 addresses and the valid subtags for
files types BT, C, MG, PD, R, SC, T, and TD.

File Types

The following file types are valid for PLC-5 address specifications. Note that some file types
are valid only on new generation PLC-5 devices.

Valid File Types for PLC-5 Addresses


Allen-Bradley Default Tag Length
File Type Description Data Type File Number in Words
O Output image DIG/INT2 0 1
I Input image DIG/INT2 1 1
S Status INT2 2 1
B Binary INT2 3 1
T Timers STRUCT 4 3
C Counters STRUCT 5 3
N Integer INT2 7 1
F Floating-point FLT 8 2
R Control STRUCT 6 3
BT Block-transfer STRUCT None 6
MG Message control STRUCT None 61
PD PID STRUCT None 82
SC SFC status STRUCT None 3
ST ASCII string ST None 42
TD Token data STRUCT None 2

90 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

Subtags

The following subtags are valid for the specified file types in PLC-5 address specifications:
File Type BT
Subtag Description Data Type Writable
EN Enable DIG No
ST Start DIG No
DN Done DIG No
ER Error DIG No
CO Continue DIG No
EW Enable waiting DIG No
NR No response DIG No
TO Time out DIG No
RW Read/write DIG No
RLEN Requested word count INT2 Yes
DLEN Transmitted word count INT2 Yes
FILE File-type number INT2 Yes
ELEM Word number INT2 Yes
RGS Rack/group/set INT2 Yes

File Type C
Subtag Description Data Type Writable
CU Up enable DIG No
CD Down enable DIG No
DN Done DIG No
OV Overflow DIG No
UN Underflow DIG No
CTL Control word INT2 No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

FactoryLink Device Interfaces - OPC and Other Guide / 91


• 2 | KTDTL AND NETDTL
Supported Data Types



File Type MG
Subtag Description Data Type Writable
NR No response DIG No
TO Time out DIG No
EN Enable DIG No
ST Start transmission DIG No
DN Done DIG No
ER Error DIG No
CO Continuous DIG No
EW Enabled waiting DIG No
ERR Error code INT2 Yes
RLEN Request length INT2 Yes
DLEN Done length INT2 Yes

File Type PD
Subtag Description Data Type Writable
EN Enable DIG Yes
CT Cascaded type DIG No
CL Cascaded loop DIG No
PVT PV tracking DIG Yes
DO Derivative of DIG No
SWM Software A/M mode DIG Yes
CA Control action DIG No
MO Station A/M mode DIG Yes
PE PID equation type DIG No
INI PID initialized DIG No
SPOR SP out of range DIG No
OLL Output limit low DIG No
OLH Output limit high DIG No
EWD Error within deadband DIG No
DVNA Deviation high alarm DIG No
DVPA Deviation low alarm DIG No

92 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

File Type PD (continued)


Subtag Description Data Type Writable
PVLA PV low alarm DIG No
PVHA PV high alarm DIG No
SP Set point FLT Yes
KP Proportional gain FLT Yes
KI Integral gain FLT Yes
KD Derivative time FLT Yes
BIAS Output bias% FLT Yes
MAXS Setpoint maximum FLT Yes
(scaled value)
MINS Setpoint minimum FLT Yes
(scaled value)
DB Deadband FLT Yes
SO Set output% FLT Yes
MAXO Output limit high% FLT Yes
MINO Output limit low% FLT Yes
UPD Update time FLT Yes
PV Process variable FLT Yes
ERR Error FLT Yes
OUT Output% FLT Yes
PVH PV alarm high FLT Yes
PVL PV alarm low FLT Yes
DVP Deviation alarm + FLT Yes
DVN Deviation alarm - FLT Yes
PVDB PV alarm deadband FLT Yes
DVDB Deviation alarm deadband FLT Yes
MAXI Input range maximum FLT Yes
MINI Input range minimum FLT Yes
TIE Tieback% FLT Yes

FactoryLink Device Interfaces - OPC and Other Guide / 93


• 2 | KTDTL AND NETDTL
Supported Data Types



File Type R
Subtag Description Data Type Writable
EN Enable DIG No
EU Enable unloading DIG No
DN Done DIG No
EM Empty DIG No
ER Error DIG No
UL Unload DIG No
IN Inhibit comparisons DIG No
FD Found DIG No
CTL Control word INT2 No
LEN Length INT2 Yes
POS Position INT2 Yes

File Type SC
Subtag Description Data Type Writable
SA Scan active DIG No
FS First scan DIG No
LS Last scan DIG No
OV Timer overflow DIG No
ER Step errored DIG No
DN Done DIG No
PRE Preset value INT2 Yes
TIM Active time INT2 Yes

94 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

File Type T
Subtag Description Data Type Writable
EN Enable DIG No
TT Timing DIG No
DN Done DIG No
CTL Control word INT2 No
PRE Preset value INT2 Yes
ACC Accumulated value NT2 Yes

File Type TD
Subtag Description Data Type Writable
HI High word INT2 Yes
LO Low word INT2 Yes

PLC-5/250 File Type Reference


This section provides a list of the valid file types for PLC-5/250 addresses and the valid
subtags for files types AS, C, MSG, PD, R, and T.

File Types

The following file types can be used for PLC-5/250 address specifications:
Valid File Types for PLC-5/250 Addresses
Allen-Bradley Tag Length
File Types Description Data Type in Words
O Outputs DIG/INT2 1
I Inputs DIG/INT2 1
L Long integer INT4 2
SD CVIM shared memory DIG/INT2 1
ST String ST 42
PD PID STRUCT 82
MSG Message control STRUCT 56
AS Adapter status DIG/INT2 2
IS Forced internal storage DIG/INT2 1

FactoryLink Device Interfaces - OPC and Other Guide / 95


• 2 | KTDTL AND NETDTL
Supported Data Types



Valid File Types for PLC-5/250 Addresses (continued)
Allen-Bradley Tag Length
File Types Description Data Type in Words
S System public status DIG/INT2 1
B Binary DIG/INT2 1
T Timer STRUCT 6
C Counter STRUCT 3
R Control STRUCT 3
N Integer DIG/INT2 1
F Floating-point FLT 2

Subtags

The following subtags are valid for the specified file types in PLC-5/250 address
specifications:

File Type AS
Subtag Description Data Type Writable
OI Output inhibit DIG No
CF Fault DIG No
RC Retry count INT2 Yes

File Type C
Subtag Description Data Type Writable
CU Up enable DIG No
CD Down enable DIG No
DN Done DIG No
OV Overflow DIG No
UN Underflow DIG No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

96 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

File Type MSG


Subtag Description Data Type Writable
EN Enable DIG No
ST Start transmission DIG No
AD Asynchronous done DIG No
AE Asynchronous error DIG No
CO Continuous DIG No
EW Enabled waiting DIG No
DN Done DIG No
ER Error DIG No
ERR Error code INT2 Yes
RLEN Request length INT2 Yes
DLEN Done length INT2 Yes

File Type PD
Subtag Description Data Type Writable
EN Enable DIG No
CT Cascaded type DIG No
CL Cascade loop DIG No
PVT PV tracking DIG No
DO Derivative of DIG No
SWM Software A/M mode DIG No
CA Control action DIG No
MO Mode DIG No
PE PID equation DIG No
INI PID initialized DIG No
SPOR SP out of range DIG No
OLL Output limit low DIG No
OLH Output limit high DIG No
EWD Error within deadband DIG No
DVNA Deviation high alarm DIG No

FactoryLink Device Interfaces - OPC and Other Guide / 97


• 2 | KTDTL AND NETDTL
Supported Data Types



File Type PD (continued)
Subtag Description Data Type Writable
DVPA Deviation low alarm DIG No
PVLA PV low alarm DIG No
PVHA PV high alarm DIG No
SP Setpoint FLT Yes
KP Proportional gain FLT Yes
KI Integral gain FLT Yes
KD Derivative gain FLT Yes
BIAS Output bias% FLT Yes
MAXS Setpoint maximum FLT Yes
MINS Setpoint minimum FLT Yes
DB Deadband FLT Yes
SO Set output% FLT Yes
MAXO Output limit high% FLT Yes
MINO Output limit low% FLT Yes
UPD Update time FLT Yes
PV Process variable FLT Yes
ERR Error code FLT Yes
OUT Output FLT Yes
PVH PV alarm high FLT Yes
PVL PV alarm low FLT Yes
DVP Deviation alarm + FLT Yes
DVN Deviation alarm - FLT Yes
PVDB PV alarm deadband FLT Yes
DVDB Deviation alarm deadband FLT Yes
MAXI Input range maximum FLT Yes
MINI Input range minimum FLT Yes
TIE Tieback% FLT Yes

98 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

File Type R
Subtag Description Data Type Writable
EN Enable DIG No
WU Enable unloading DIG No
DN Done DIG No
EM Empty DIG No
ER Error DIG No
UL Unload DIG No
IN Inhibit comparisons DIG No
FD Found DIG No
LEN Length INT2 Yes
POS Position INT2 Yes

File Type T
Subtag Description Data Type Writable
EN Enable DIG No
TT Timing DIG No
DN Done DIG No
PRE Preset value INT4 Yes
ACC Accumulated value INT4 Yes

FactoryLink Device Interfaces - OPC and Other Guide / 99


• 2 | KTDTL AND NETDTL
Supported Data Types



SLC 500 File Type Reference

File Types

The following file types can be used for SLC 500 address specifications. Note that some file
types are only valid on later model SLC processors.
Valid File Types for SLC-500 Addresses
Tag
Allen-Bradley Default
File Type Description Length
Data Type File Number in Words
O Output DIG/INT2 0 1
I Input DIG/INT2 1 1
S Status DIG/INT2 2 1
B Bit (binary) DIG/INT2 3 1
T Timers STRUCT 4 3
C Counters STRUCT 5 3
R Control STRUCT 6 3
N Integer INT2 7 1
F Floating-point FLT 8 2

Subtags

The following subtags are valid for the specified file types in SLC-500 address specifications:

File Type C
Subtag Description Data Type Writable
CU Up enable DIG No
CD Down enable DIG No
DN Done DIG No
OV Overflow DIG No
UN Underflow DIG No
UA Update accumulated value DIG No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

100 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Supported Data Types

File Type R
Subtag Description Data Type Writable
EN Enable DIG No
EU Unload enable DIG No
DN Done DIG No
EM Stack empty DIG No
ER Error DIG No
UL Unload DIG No
IN Inhibit DIG No
FD Found DIG No
LEN Length INT2 Yes
POS Position INT2 Yes

File Type T
Subtag Description Data Type Writable
EN Enable DIG No
TT Timing DIG No
DN Done DIG No
PRE Preset value INT2 Yes
ACC Accumulated value INT2 Yes

FactoryLink Device Interfaces - OPC and Other Guide / 101


• 2 | KTDTL AND NETDTL
Program Arguments



P ROGRAM A RGUMENTS

Argument Description
-A<pathname> Specifies a new FactoryLink application directory. Enter the
ID followed by the full path name that identifies the location
of the new directory.
Example: -AC:\FLECS\FLAPP or -A/usr/users/flapp
-B<#> Specifies a value for the unsolicited message backlog queue
in the Allen-Bradley interface. Enter the ID followed by the
appropriate value. (# = 1 to 40, default = 5)
-C<#> Specifies the number of seconds the task waits before it
attempts to reconnect to a disconnected RSLinx or
INTERCHANGE software interface. Enter the ID followed
by the number of seconds. If you do not want the task to
attempt reconnection, enter 0. (# = 0 to 32767, default = 5)
-F<#> Specifies the number of times the task is to pass through its
major control loop before “sleeping”. Enter the ID followed
by the number of passes. Use this parameter in conjunction
with the sleep period parameter, S, to optimize the
performance of the task and to minimize its CPU use. (# = 0
to 32767, default = 10)
-L<pathname> Specifies a directory and path for an error log file. Enter the
ID followed by the full path name for the location of the file.
Example: -LC:\FLECS\ERRLOG or -L/usr/users/errlog.txt
-N<#> Specifies a maximum number of solicited requests that can be
pending at any given time within the RSLinx or
INTERCHANGE software library. Enter the ID followed by
the number of requests. (# = 1 to 39, default = 39)
-P<pathname> Specifies a new FactoryLink program directory to override
the default program directory. Enter the ID followed by the
full path name for the location of the new directory.
Example: -PC:\FLECS\FLINK or -P/usr/users/flink
-R<#> Specifies the number of seconds an error message displays on
the KTDTL or NetDTL task line on the Run-Time Manager
screen after the error is detected. Enter the ID followed by the
number of seconds. (# = 0 to 32767, default = 10)
-S<#> Specifies the number of milliseconds the task will “sleep”
after completing the specified number of control loop passes
(-F parameter). Enter the ID followed by the number of
milliseconds. To specify no sleep period after the passes,
enter 0. (# = 0 to 32767, default = 0)

102 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Program Arguments

Argument Description
-U<#> Specifies the number of unsolicited messages the task can
process before releasing the CPU for other operations. Enter
the ID followed by the number of messages. When the task
processes the specified number of unsolicited messages, or
when no unsolicited messages are pending, the task continues
with solicited operations. (# = 1 to 32767. default = 1)
-Z Clears the change status indicators in the FactoryLink tags
written to the FactoryLink database for the KTDTL or
NetDTL task. Enter the ID only.

FactoryLink Device Interfaces - OPC and Other Guide / 103


• 2 | KTDTL AND NETDTL
Messages and Codes



M ESSAGES AND C ODES
This section contains information about deciphering run-time status and error messages that
appear on the Run-Time Manager screen and about how Allen-Bradley INTERCHANGE and
RSLinx return codes function with the KTDTL and NetDTL tasks.
Messages and error codes appear at run time on the Run-Time Manager screen opposite the
Shared Task description for the KTDTL or NetDTL task in the message area under Last
Message. These messages can be written to a real-time database message tag for display on a
custom graphics screen. See “Configuring Communication Paths” on page 20.
If you configured your application to create a run-time status window for message display or if
you specified a log file, status and error messages will appear in this window or file as well. To
create a status window, specify S in the Flags column of the System Configuration Information
table. To define a file for logging messages, specify the -L parameter in the Program
Arguments column.
Allen-Bradley return code messages are ASCII text strings returned by the INTERCHANGE
or RSLinx software to describe an error condition. Return code messages are indicated as (A-B
return-code message). For more information about return code messages, see “Allen-Bradley
Return Codes” on page 107.

Status Messages
Status messages for the KTDTL and NetDTL tasks can be generated and displayed by
FactoryLink at task startup and at shutdown. The following status messages appear in the order
they are listed every time the task is started or shutdown by the Run-Time Manager. These
messages do not require any action; they display for information only.

Error Message Cause


Startup
Allen-Bradley (KTDTL/NetDTL) The task is starting up normally.
Interface Startup
Processing (DCT Filename) The task is reading the internal, preconfigured binary
configuration table files and packetizing information from the
specified internal device configuration table (DCT) file.
Block rd (#) block wr (#) excpt wr (#) The task is displaying the total number of communication
unsol (#) transactions configured for each type of operation defined in the
DCT files.
Tot 0 Allen-Bradley (KTDTL/NetDTL) The task has started up normally.
Interface Started
Shutdown
Normal Termination The task has shut down normally.

104 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Messages and Codes

Error Messages
Error messages for the KTDTL and NetDTL tasks can be generated and displayed by
FactoryLink at task startup, during communications attempts, and at shutdown. These
messages require corrective steps to be taken; the action required is described following the
description of the cause of each message.

Error Message Cause and Action


Startup
no reads, no writes >>> nothing to do Cause: No read or write operations are defined for the task.
Action: Open the KTDTL or NetDTL configuration tables and
define a read or a write operation in the Read/Write
Control and Information tables.
Cause: The device configuration table files were not properly
built, possibly because the tables contain incorrect
entries.
Action: Verify the configuration table entries and correct as
needed. Check the FLAPP\DCT directory to verify the
.DCT files were built. Restart FactoryLink to regenerate
these files, if necessary.
Cause: The task does not recognize any read or write operations
because it is unable to read the FLAPP\DCT directory.
Action: Verify the FLAPP\DCT directory has read and write
privileges. Grant these privileges if necessary.
Internal:Bad read on file Cause: The task did not initialize properly. An internal message
Internal:Out of memory tag array can appear for a variety of reasons, including an incorrect
Internal:... file conversion that occurred or an insufficient allocation
of memory.
Action: Make a note of the message and what keys you pressed
or function you attempted to perform before the error
occurred, then contact Customer Support for assistance.

FactoryLink Device Interfaces - OPC and Other Guide / 105


• 2 | KTDTL AND NETDTL
Messages and Codes



Error Message Cause and Action
Communications
Connect (A-B KT card #/EI #): (A-B Cause: After the task has started up and is attempting to establish
return-code message) communications, it can display the status of the initial
connection to the specified card, port, or Ethernet
interface.
Action: Take the appropriate action indicated in the message to
correct the error.
(KTDTL/NetDTL) in Overtriggered Cause: The timed trigger tag is changing too rapidly.
State: Reduce Trigger Rate
Action: Reduce the trigger rate or alter the method in which read
and write tables are triggered. See “Techniques for
Improving Communication Performance” on page 80.
Tot (# of errors since startup) (Table Cause: This message indicates the total number of
Name) Lsta: (Logical Station #) (A-B communication errors that have occurred for the
return-code message) specified logical station since task start up. The return
code indicates the status of a read or write operation for
the specified table name.
Action: Take the appropriate action indicated in the message to
correct the error.
Shutdown
Termination In Progress Cause: The termination procedure was started because of either
an internal run-time error or a normal FactoryLink
termination request.
Action: Check the log file or the status window for other
messages displayed after this one. If the termination is
not the result of a normal termination request and another
system message was generated, make a note of this
message.
Disconnect (A-B KT card #/EI #): (A-B Cause: The task is displaying the status of the disconnection
return-code message) from the specified card or Ethernet interface.
Action: Take the specified action (if any) to correct the error.
Disconnect (A-B KT card #/EI #): Was Cause: This message appears only if the task was not connected
Not Connected with the specified card or Ethernet interface at shutdown.
Action: Check the log file for the message Connect (A-B KT card
#/EI #): (A-B return-code message). This message is
displayed prior to the disconnect message.

106 / FactoryLink Device Interfaces - OPC and Other Guide


KTDTL AND NETDTL | 2
Messages and Codes

Allen-Bradley Return Codes


Allen-Bradley INTERCHANGE and RSLinx return-code messages function in the following
manner:
• The KTDTL and NetDTL tasks communicate with the Allen-Bradley INTERCHANGE and
RSLinx software through program function calls.
• The INTERCHANGE or RSLinx software returns a code to the KTDTL or NetDTL task
that provides information about the status of each function call.
• When the task receives the code (status or error) from the INTERCHANGE or RSLinx
software, it calls the utility function, DTL_ERROR_S, which provides an ASCII string
description of the status or error.
• These ASCII strings appear on the Run-Time Manager screen in place of the run-time
message (A-B return-code message).
In general, these messages are self-explanatory. Refer to Allen-Bradley’s documentation for
further information.

FactoryLink Device Interfaces - OPC and Other Guide / 107


• 2 | KTDTL AND NETDTL
Messages and Codes


108 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 3





Enhanced Communication
Interface (ECI/OPC)

O VERVIEW
ECI is a universal Converter (also-called Decoder or I/O Translator) for true bidirectional
input/output data (I/O), such as scaled values, commands, and setpoints, which may be
controlled in real time by both an external device and FactoryLink. Several functions are
implemented, which can be combined for best performance of communication:
• Action=Reaction – principle by means of bidirectional communication. The user interface
is represented by a single Object I/O Tag for each function to be performed. Object I/O data
can be entered and displayed from the very same tag, thereby providing instantaneous
indication onscreen while data is automatically conducted to and from the PLC in the
background.
• Decoder/Encoder –function for common data formats including Bits, Nibbles, and Bytes
from/to Long/Short Integers and Arrays, as well as the conversion of Strings, BCD, HEX,
and Float values. Inputs are decoded and displayed at the Object I/O, while Object I/Os are
encoded to PLC compatible outputs. It also converts user specified Timestamps or provides
Trigger Outputs by value comparison, as well as event-driven Copy for timestamping or
Enumerated text display, Link Supervision (Watchdog), and so forth.
• OPC Items/ItemArrays – can be extracted including Timestamps (milliseconds), as well as
OPC native and vendor-specific Quality Status, Limits, and Access Rights. Quality bits can
be merged to ECI I/O Status to indicate data quality, including “in transition” by a single
tag.
• Scale/Normalize – is performed for read and write, including range supervision and
deadbanding. Object I/Os are displayed according to the formula y = a x + b. This allows for
bidirectional communication of normalized values in a PLC, which appear in engineering
units in FactoryLink.
• Statistical Data – calculation as timestamped Dip/Peak detection (minimum/maximum),
Filter (low pass) with adjustable attenuation, Totalizer/Counter (sum of samples), Squared
Sum (sum of samples squared), Average (arithmetical mean) and Sigma (standard
deviation).
• Indirect Addressing – is supported to send multiplexed data from/to a PLC. A decoder
routine is required in the PLC to store data at the appropriate location. This is a powerful
method to transmit hundreds of commands and setpoints, etc., without loading
communication.
• Versatile Interface – supporting EDI Drivers by Alternate Tags as well as RAPD Drivers
and OPC Servers using the Intertask Mail eXchange IMX protocol for data transmission
through mailboxes. Mailbox information may be conducted through FactoryLink-LAN or
VRN, which can be used to set up a Redundant System. And, because of its Alternate Tag

FactoryLink Device Interfaces - OPC and Other Guide / 109


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Overview



interface, ECI can run as a Stand-Alone Converter using Database Tags for any of above
functions.

Graph ECI with Graph ECI with


EDI Drivers RAPD and OPC

• Common Data Format (binary dump)


Scale/Converter • Standardized Datasets
Tables using • Indirect Addressing and Bit Access
FactoryLink ECI FactoryLink • ECI Output Queue Management
Database Tag Interface Database
Tags/Arrays Tags/Arrays
• Simple/Fast Independent Drivers

EDI Device Interface


Base Module Tables Scale/Converter
Tables using
ECI
Board Service IMX Interface
SerialPort DigiBoard Ethernet Tables

GPI OMR TXI SQD A-B MOD SIE OPC

External Device Interface EDI Driver Tables Intertask Mail eXchange IMX / RADP and OPC Driver Tables

110 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

B ASIC C ONCEPTS
An ECI Communication Object is defined as a set of Object I/O Tags having individual or
common inputs and/or outputs (Alternate Tags, Datasets or OPC Groups of Items). It is
specified by a single ECI Information table, which is identified by a line entry in the ECI
Control table.
An ECI Composite Object is defined by two or more Object I/O Tags using the same specific
Read/Input (Alternate Read Tag, Tag Address or OPC Item) by a coherent block of line entries
in the ECI Information table. In this case, a particular Object I/O may directly influence
adjacent Object I/Os, similar to a PLC where a changed Bit influences its residing Byte or
Word, etc. This ECI internal I/O processing is done only from lower towards higher ranking
data within Composite Objects, that is, a Bit is inserted in its corresponding Nibble, Byte,
Short, etc., or a Byte is inserted in its corresponding Short and Long integer, etc. but the
opposite is not true. Note that scattered Read/Inputs or Write/Outputs are considered to be
separate objects.
An ECI Object I/O Tag represents a Bit, a Nibble, a Byte or a number of Bytes corresponding
to a data memory in the external device or any tag of the FactoryLink database. Object I/O data
(input/output) is transmitted bidirectionally from any type of Read and/or to any type of Write
tags. Thus, ECI provides an Interface, which suits any type of communication. The system
may be compared to a Dual Ported RAM (Random Access Memory) as it mirrors process I/O
data, which can be changed in real-time by both external device and FactoryLink.

FactoryLink Device Interfaces - OPC and Other Guide / 111


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts


Read or Input data is transmitted from


an external device through an Alternate
Read Tag or a Read Dataset for RAPD or
Object OPC Drivers.
I/O Tags
Write or Output information is
transmitted to an external device through
an Alternate Write Tag, a Write Dataset or
an Encoded Array.
Update Delay Read Cycle, Update Delay and Write
Interval are transmission control
ECI Object Information
parameters used for performance and load
RdElem(1) | I/O_Tag(1) | WrElem(1) control. They are adjusted in the ECI
RdElem(2) | I/O_Tag(2) | WrElem(2) Control table.
RdElem(3) | I/O_Tag(3) | WrElem(3) Both EDI drivers using Tags as well as
RdElem(x) | I/O_Tag(X) | WrElem(x) RAPD and ODX driver using Datasets
and Mailboxes are supported. While both
Read Cycle Write Interval types may be applied simultaneously, the
Object I/Os remain the same: individual
Alternate Read Tags
and/or
Alternate Write Tags
and/or
I/O Tags for bi-directional
Read Dataset Write Dataset communication from and to an external
device, such as a PLC.
Read Write
Table / Mbx Driver Interface Table / Mbx
EDI / RAPD / OPC

External Device / PLC / OPC Server

Object I/O data is extracted, converted and scaled from Read/Input data according to the
functions specified in the ECI Information table. If Object I/O data is changed, for example,
due to an operator command, Write/Output data is created according to the inverted functions
identified.
Object I/O data can thus be entered in and displayed from the very same tag, providing
instantaneous indication on screen, called Action=Reaction, while data is conducted through
the Read and Write channels in the background. As changed I/O data is displayed on screen,
updating is delayed to allow for a feedback from an external device before the Object I/O is
newly updated.
Because of its versatile device interface, ECI can also be applied as a standalone converter, or
Read/Write information can be sent through networks as FactoryLink LAN or VRN for
redundancy.

112 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

Read and Write Procedures


Any I/O Tag may be set up either for one-way or bidirectional communication by simple
configuration.

Read Only
ECI Object Information
RdElem(1) | I/O_Tag(1) | Changed data
RdElem(2) | I/O_Tag(2) |
RdElem(3) | I/O_Tag(3) |
received at
RdElem(x) | I/O_Tag(X) | Read Cycle

Read Tags / Dataset


RdElem(1), Value(a)
RdElem(2), Value(b)
RdElem(3), Value(c)

Read Driver Interface


Table / Mbx EDI / RAPD / OPC

External Device

Read Only data is specified by simply addressing a Read Tag (Tag, Address or OPC Item) in
the ECI Information table.
A Read Tag is a portion – normally a dataword or register - read from the external device or, it
may be a database tag if data is read from an EDI driver.
Data from the external device is read in packages (Datasets or Blocks) at an adjustable Read
Cycle (event or change driven and/or continuous or unsolicited).

FactoryLink Device Interfaces - OPC and Other Guide / 113


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



Note that “Read” refers to data read by ECI or sent by the external device, respectively.

Write Only
ECI Object Information
| I/O_Tag(1) | WrElem(1) Changed data
| I/O_Tag(2) | WrElem(2)
| I/O_Tag(3) | WrElem(3)
transmitted at
| I/O_Tag(X) | WrElem(x) Write Interval

Write Tags / Dataset


WrElem(1), Value(x)
WrElem(2), Value(y)
WrElem(3), Value(z)

Driver Interface Write


EDI / RAPD / OPC Table / Mbx

External Device

Write Only data is specified by simply addressing a Write Tag (Tag, Address or OPC Item) in
the ECI Information table.
A Write Tag is a portion – normally a dataword or register – written to the external device or, it
may be a database tag if data is written to an EDI driver.
Data changed at the ECI is sent in packages (Datasets or Blocks) or individually at an
adjustable Write Interval (event or trigger driven).
Note that “Write” refers to data written to the external device or sent by ECI, respectively.

114 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

Read Write
ECI Object Information
RdElem(1) | I/O_Tag(1) | WrElem(1) Changed data
RdElem(2) | I/O_Tag(2) | WrElem(2) corrected after
RdElem(3) | I/O_Tag(3) | WrElem(3) Update Delay
RdElem(x) | I/O_Tag(X) | WrElem(x)

Read Tags / Dataset Write Tags / Dataset


RdElem(1), Value(a) WrElem(1), Value(x)
RdElem(2), Value(b) WrElem(2), Value(y)
RdElem(3), Value(c) WrElem(3), Value(z)

Read Driver Interface Write


Table / Mbx EDI / RAPD / OPC Table / Mbx

External Device

Read/Write data is specified by simply addressing both a Read and a Write Tag (Tag, Address
or OPC Item) in the ECI Information table.
Data changed at either side is transmitted accordingly while updating at the ECI side is delayed
by an adjustable Update Delay to allow for a feedback from an external device before the
Object I/O is newly updated (data consistency).
Note: For ECI Startup Procedures and Data Initialization, see the “General Rules” on
page 126.

FactoryLink Device Interfaces - OPC and Other Guide / 115


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



Action=Reaction
Read and Write tags may or may not be identical. The fact that individual Read/Write data can
be combined in a single I/O Tag at ECI provides powerful methods for visualization as shown
in the following example.

Visualizing a Pump
A motor command sent through the Write channel
may be interlocked by hardware and software
before it is returned as a contactor feedback signal
through the corresponding Read channel.
However, the I/O Tag in the ECI Information table
may be identical for both command and feedback.
Consider an I/O Tag, which is used for animation
of a pump using the values:
0 = OFF1 = RUNNING
2 = STOPPING3 = STARTING
To start the pump, you would set the I/O Tag’s
value to 3 to indicate STARTING by sending the
value as a command to the external device, for
example a PLC. If the feedback signal from the
PLC now indicates a starting pump by a value of 3
in the Update Delay time, the animation remains
on STARTING and you have achieved
Action=Reaction – virtually in real-time.
Regardless of other delays, the feedback signal
may only indicate RUNNING after a while. To
stop the pump, enter value 2 to indicate
STOPPING. In turn, the feedback will indicate a
value of 2 for STOPPING and, after a while, return
to zero to indicate OFF.
All this is done with a single I/O Tag at ECI while
control of the pump is possible at either side – ECI
or PLC.

116 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

Visualizing a Setpoint
A setpoint value may be transmitted to and from
the very same address in the external device, for
example a PLC emulating a Dual Ported RAM
through individual Read and Write channels. In
this case, it is obvious, that the ECI's I/O Tag is
linked with Read and Write tags, which both
represent the very same Setpoint address in the
PLC.
On the other hand, it is not obvious that the
setpoint may be changed at any time on either side,
ECI or PLC – the last action accepted at the PLC
will win. If a changed value is not accepted by the
PLC, the setpoint returns to the actual feedback
value after the Update Delay. Thus, the system
automatically takes care of data consistency. And,
because of the Write Interval, data transmission
may at any time run at moderate speed still
providing fast Action=Reaction – virtually in
real-time – for the operator. This unburdens
communication even if the setpoint is changed
frequently, for example, due to keyboard auto
repeating.
All this is included for each single I/O tag with
ECI.

EDI Drivers, RAPD, and OPC Data eXchange


External Device Interface EDI Drivers using Tags or Arrays in ordinary Read and Write
Tables. Tags are referenced in Alternate Read and Write columns in the ECI Information table.
• Block Read data may be received unsolicited or polled by the Read Dataset IdxTag trigger,
which can be specified for each ECI Information table (Interval Timer not required).
• Block Write data can be sent using a trigger as desired. Additionally, ECI provides a trigger
whenever Object I/O data has been changed for a particular table (see Function IOChgWr).
• Exception Write can be applied since Alternate Write Tags are forced written whenever the
corresponding Object I/O data is changed.
• Encoded Write is additionally supported for any driver. This method transmits an Address,
a Code and the Tags Value to a Encoded Array, which is sent by a Block Write command to
the PLC. A simple routine is required to decode the information in the PLC. ECI supports
triggering by the appropriate Write Dataset IdxTag. The method allows for writing any data
as Bits, Nibbles and Bytes, etc., which is normally not accessible for the driver.

FactoryLink Device Interfaces - OPC and Other Guide / 117


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



The ECI Information table has been designed to reflect the dataflow Read > Object I/O > Write
as shown below.

In the example above, the EDI driver reads Word 73 and puts the information to Analog Tag
AnaX. Then, ECI examines Bit 12 to be displayed by I/O Tag MotorXY_ST.
On the other hand, whenever MotorXY_ST is changed by a task other than ECI, the
information is put to Digital Tag DigY to be written by the EDI driver to Bit 0 of Word 109 in
the PLC. In this case, the EDI driver requires bit access for single commands, unless Encoded
Write or Function Merge is applied.
There are no restrictions with regard to the source and/or target of Alternate Read/Write data.
For example, the output information could be sent through LAN to another FactoryLink station
or, it can be written back to its source (Bit 12 of Word 73) to emulate a Dual Ported RAM for
the particular Object I/O. Note that the Elem Addr columns are used to access Datasets of
RAPD Drivers or to address Encoded Write data.
Note: If you want to apply Encoded Write with an EDI driver, specify an Encoded
Array with a Write Interval in the ECI Control table and send the array as a standard
block information to the PLC using the ECI Write IdxTag as the EDI Block Write
Trigger.
Rapid Application Protocol Drivers RAPD use the IMX Intertask Mail eXchange protocol
for the transmission of Datasets through Mailboxes. ECI supports Block Read, Block Write,
Exception and Encoded Write procedures for the IMX interface as for EDI drivers described
above.
• A Mailbox (Mbx) is always owned by the receiving task. Thus, the owner of the Read
Mailbox (also-called Decoder or I/O Translator Mailbox) is ECI while the owner of the
Write Mailbox (also-called Protocol Driver Mailbox) is the RAPD Driver. Mailbox Tags are
referenced in either task together with individual Dataset identifiers called Index (Idx).

118 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

• A Dataset (Ds) represents a number of data Tags forming a coherent block of data with
contiguous addresses in the external device. It is specified in the RAPD Driver Dataset
Definition table and identified by a unique Tag (Dataset IdxTag) or a Constant (Ds Idx).
Read and Write Datasets may or may not be identical for a particular ECI Object. Datasets
are standardized, independently of the external device and may be transmitted in portions or
entirely. All Tags within a particular Dataset have the same size.
• A Tag (Elem) of a Dataset is defined as one discrete bit or a 1, 2 or 4 byte binary value
having a dedicated tag address in the external device, such as an Allen-Bradley or
Telemecanique WORD, a Modicon COIL or REGISTER, or a Siemens FLAG or BYTE.
Thus, an ECI Object I/O always represents a Sub-Tag (example: a bit) a tag (example: a
byte) or a number of Tags (example: a float) of a Dataset in the external device.
The sample ECI Information table below shows the same setup as described for the EDI driver
above.

For example, the RAPD Driver reads for example all Words 71..74 (Tags) and sends them as a
Read Dataset to ECI, which then examines Bit 12 of Word 73 to be displayed by I/O Tag
MotorXY_ST.
On the other hand, whenever MotorXY_ST is changed by a task other than ECI, the
information is sent to a Write Dataset for the RAPD Driver to be written to Bit 0 of Word 109
in the PLC. In this case, the RAPD Driver requires bit access for single commands, unless
Encoded Write or Function Merge is applied.
PLC source and target data Tags always belong to a particular Dataset assigned to the RAPD
Driver. If you wish to emulate a Dual Ported RAM for a particular Object I/O, then both Read
and Write Dataset must cover the same Tag in the PLC. Note that Alternate Read/Write Tags
may additionally be used in any ECI Information table.

FactoryLink Device Interfaces - OPC and Other Guide / 119


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



Note: The same setup can be used with ODX when replacing a RAPD by an OPC
Server for the particular PLCs. In this case, the only rule refers to the OPC Item names,
which must carry the Tag Address as follows: ItemName{ElemAddr}. For standard
OPC setup see the next section.
ODX OPC Data eXchange uses the IMX Intertask Mail eXchange protocol to transmit OPC
Group and OPC Item information from/to any OPC Server using (D)COM for local or remote
access. ECI supports Block Read, Block Write and Exception Write as described for EDI
drivers above.
• An OPC Server (OLE for Process Control by Microsoft) comprises several objects: the
server itself (Database), the groups (Datasets) and the items (Tags). The OPC Server
essentially is a Vendor Specific Real-Time Database, which serves as a container for OPC
Group objects. It is configured by vendor specific tools and is accessed by (D)COM for
local or remote data exchange. There are hundreds of OPC Servers available for almost any
PLC make or bus system.
• An OPC Group represents a Dataset of logically organized OPC Items. All access to OPC
Items is by an OPC Group, which holds attributes for read/write intervals on change/polled
or block/exception transmission. Read and Write groups may or may not be identical for a
particular ECI Object. They are basically independent from the external device even if
reflected there.
• An OPC Item represents a tag of an external device as a Boolean/Flag, Integer/Word,
Real/Float or Message/String, etc. Associated with each item is a Value, Quality and
Timestamp. Note, the items are not the data source – they are just connections to them. They
should be thought of as symbolic addresses to the data.
• Microsoft’s (D)COM (Distributed) Component Object Model is used to communicate
between ODX acting as an OPC Client and the OPC Server. COM is used if the server
resides on the local machine. DCOM uses TCP/IP to access a remote server.
The sample OPC-specific information table below shows a setup as described previously for
EDI and RAPD above.

120 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

For example, the ODX driver reads for example all Motor items (Tags) and sends them as a
Read OPC Group to ECI, which then examines Bit 12 of MotorXY.Status to be displayed by
I/O Tag MotorXY_ST. (This could represent Bit 12 of Word 73 in a PLC as in the examples
above.)
On the other hand, whenever MotorXY_ST is changed by a task other than ECI, the
information is sent to a Write OPC Group to be written to MotorXY.Cmd in the OPC Server.
(This could represent Bit 0 of Word 109 in a PLC as in the examples above.)
There are basically no restrictions with regard to the source and target of transmitted data
unless you desire to write a sub-tag within an OPC Item. In this case (for example to write a bit
within the OPC Item), you must assemble the data before transmission using Function Merge.
On the other hand, the ECI/OPC also supports attribute access, such as Quality, Timestamp,
etc. using appropriate OPC-specific Rd/Wr Codes.
Note: When replacing a RAPD by an OPC Server, the ECI tables can be kept as shown
for RAPD.

TagArray Concept
For TagArrays, you must consider the High/Low value order of Tags if data is assembled with
more than one Tag. Note that “High” indicates that the high value is located at the lower Tag
address (MOTOROLA Format) and “Low” indicates that the low value is located at the lower
address (INTEL Format) (see “Intel <=> Motorola Format and Composite Object” on page
150). For example, the High/Low value order must be considered if a 32-Bit Float (CDE=F0)
or LongAnalog (CDE=L0) is created or extracted from two 16-Bit Analog Tags. Or if, for
example, the most significant Byte (CDE=B3) is extracted from a LongAnalog Tag and so
forth.
Multiple Read/Write Tags are assigned to a single I/O Tag whenever data conversion
requires more than one Read/Write Tag to suit the size specified by the Conversion Code CDE.
In this case, ECI automatically examines and/or writes to multiple Read/Write Tags:

FactoryLink Device Interfaces - OPC and Other Guide / 121


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



ECI/OPC Object Information - Shared

Read Tag, Addr Rd Object Wr Write Tag, Addr R/W


or OPC Item CD I/O Tag CDE or OPC Item Range Comment:
E Function

ReadElem[a] I/O_Tag WriteElem[A] single line entry

ReadElem[b] WriteElem[B] assumed Array offsets [a,b,c..],


ReadElem[c] WriteElem[C] hidden and [A,B,C..]
ReadElem[..] WriteElem[..] tags specified by
Read/Write Elem size
and Conversion
Codes CDE

DigElem[0..31] L0 LongAnaTag L0 AnaElem[0..1] example


LongAnalog

Byte[0..1] S0 AnaTag B0 DigElem[0..7] example Analog

Caution: TagArrays are automatically assumed for single I/O Tags. This may cause
unpredictable reactions if a TagArray is not properly assigned in advance
by the user. For example, a TagArray of 19 Digital Tags would be
expected if Bit number 18 (CDE=18) is extracted from a Digital
Read/Input, while only a single Tag would be examined if a 32-Bit
LongAnalog Tag is assigned to the same Read/Input.
Multiple Read/Write Tags may be assigned to an I/O TagArray to transmit a pattern of
Bits, Bytes or Words by a single line entry. In this case, pattern extraction/insertion is specified
by the ARYnnn:x:y:z statement in the Function column of the ECI Information table.

122 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

ECI/OPC Object Information – Shared

Read Tag, Addr Rd Object Wr Write Tag, Addr R/W Range


or OPC Item CDE I/O Tag CDE or OPC Item Function Comment:

ReadElem[a] I/O_Tag[0] WriteElem[A] ARYnnn:x:y:z single line entry

ReadElem[b] I/O_Tag[1] WriteElem[B] assumed Array offsets [a,b,c..],


ReadElem[c] I/O_Tag[2] WriteElem[C] hidden and [A,B,C..] specified
ReadElem[d] I/O_Tag[..] WriteElem[D] tags by Array Function,
ReadElem[..] WriteElem[..] Read/Write Elem size
I/O_Tag[n-1] and Conversion
Codes CDE

ByteElem[0..199] S0 AnaTag[0..99] S0 DigElem[0..1599] ARY100:2:1:16 example Analog


Array

AnaElem[0..31] 00 DigTag[0..511] 00 ByteElem[0..63] ARY512:1:16:2 example Digital Array

Array Function: nnn=Number of I/O Tags, x=Read Elem increm, y=I/Os per Read Elem,
z=Write Elem increm.
For OPC specific tables, ReadElem[a] and WriteElem[A] must be of type OPC Item Array in
the OPC Server.

Exception <=> Encoded Write


Exception Write transmits individual data for each output to a PLC. Whenever an Object I/O
is changed or forced written, data is immediately sent unless a Write Interval has been
adjusted. Many communication protocols do not allow writing Bits, Nibbles, etc. in a tag (use
Function Merge to assemble Write data). Note that some drivers may read a Word, insert a Bit
and send the entire Word (including the inserted Bit) back to the PLC. Caution – this may
cause unpredictable reactions if data on the same Word is changed in the PLC during a write
procedure. For example, data, which was previously read, could erroneously be reinstated.
Encoded Write transmits an Address and a Code together with a Value as a Encoded Array by
a Block Write command to the PLC. An internal routine is required in the PLC to decode the
information and transfer the value to the desired location. This method substitutes Exception
Write commands and is very powerful regarding to safety and possible access to Bits, Nibbles,
Bytes, etc., in a system. It should be applied with a Write Interval and can be used with any

FactoryLink Device Interfaces - OPC and Other Guide / 123


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



EDI or RAPD Driver. Any ECI table may be set up for Encoded Write as shown in this
example.

If the Wr Mode corresponds to the data format in the external device, the array header for
Format and ElemSize may be ignored. A Segment Address may be specified by Function
SegmAddr=0..65500 at the top of the table. In this case, the second array tag displays the
Segment Address while the Access flag indicates “direct”. Normally, it displays the Number of
Tags in the Datablock, and the Access flag indicates “indirect.” For more information, see
Write EncArray / MailboxTag column and “Tag/Item Addressing and Conversion Code” on
page 146.
Depending on the PLC data types available or the total number of data to be processed, it may
be useful to apply either one or both methods. For example Bits, Nibbles and Bytes may be
transferred by Encoded Write while all other values are transmitted by Exception Write.
Regardless which applied method is used, the Object I/O interface always remains the same.
Note: This method is applicable only for Tags addressed by the Write Elem Addr
column.

124 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

Indirect Addressing with Unsolicited Read

Read Model “A” allows access to any Read Model “I” allows access to any
Dataset Address by an external device or These Dataset Index by an external device or PLC.
PLC. In this case, specify prefix “A” in the methods are In this case, specify prefix “I” in the Read
Read Mode column of the ECI Control applicable Mode column of the ECI Control table as
table. The Tag Start Address must appear as only for well as an index number Ds Idx to identify
a long integer in the first four bytes of the Tags the desired Dataset(s). The Ds Idx number
data block transmitted. In the example addressed must be transmitted as a long integer in the
shown below, a single DataSetX with Tag by Read first four bytes of the data block. In the
Addresses 150..970 is assigned to multiple Elem Addr example shown below, three Datasets with
ECI Objects A..C. Read data may be column. Index 751..753 are assigned to
transmitted on change and with block sizes corresponding ECI Objects. Read data may
as desired by the external device. be transmitted on change as desired by the
external device.

FactoryLink Device Interfaces - OPC and Other Guide / 125


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Basic Concepts



A routine in the external device or PLC is required to encode the information to be transmitted
to the desired location within ECI. This is done by simply adding the Address (for example,
630) or the Index (for example, 752) as a long integer (32bit) with a valid range of 0 to 65500
on top of the information. Apart from starting with Tag Address 0, no other restriction is given
for Read Mode “I” in the ECI Information tables.

General Rules
• Startup Procedure – ECI initially clears all Read Mailboxes while the corresponding
Object I/Os are updated after receiving a Dataset or after the Update Delay if an I/O has
been changed. This should be considered for synchronizing unsolicited read information.
You can prevent reading uncertain (not updated) mailbox data at initialization by Program
Argument –InitUncertain. In this case, all I/O Status Tags will display a value ≥ 64
(Uncertain flag). All Object I/Os will only be updated after receiving a first valid Dataset.
This may be used to prevent overwriting of persistent bidirectional Object I/O data at
initialization.
On the other hand, ECI normally prevents sending Write/Output information at initialization
and thus inadvertently transmitting data to an external device. This is achieved by clearing
all I/O change flags at startup unless Program Argument –InitWrite is set to send persistent
information to an external device. Caution: In this case, any changed or forced written I/O
data may be written at startup or restart of ECI.
• Read/Inputs are specified either by an Alternate Read Tag, a Read Tag Address or an OPC
Item name while a possible Tag has priority. To prevent hunting (that is, a race-around
condition), Read/Input data is never directly conducted to a Write/Output. For Write-only
communication, a Read/Input may be omitted. At startup, Read Mailboxes are emptied
(cleared). This should be considered when reading unsolicited data. An init-flag can be set
when the first valid Dataset has been read (see Init Function).
• Write/Outputs are specified by an Alternate Write Tag, Write Tag Address or OPC Item
name. To prevent hunting, Read/Input data is never directly conducted to a Write/Output.
For Read-only communication, a Write/Output may be omitted. At startup, no Write/Output
is written (I/O change flags are cleared) unless enabled by Program Argument –InitWrite.
Object I/Os must always be specified and not be linked to its own created Write/Output.
Object I/Os are only updated if the corresponding Read/Input has changed or if Function
IOUpd or IOUpdAll is applied. At startup, the behavior may be specified by Program
Argument –InitUncertain. The valid range of the FactoryLink Tag Type must be considered
for conversion: when for example extracting an Unsigned Long value (Rd CDE=UL0), it
should be assigned to a Float since a LongAna cannot take its possible maximum of
4.29*109. Characters in Object I/O Messages must be 1..255 ASCII equivalent. Extracted
message text (Rd CDE=MSG) is truncated at the location of the first character found 0
ASCII equivalent.
• Object I/Os or Alternate Read/Write Tags may be connected to other ECI Tags to provide
an encoder function. The following connections are allowed:

Alternate Read Tag own created Object Use Merge Function if a Write/Output is
I/O. required.

126 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Basic Concepts

Alternate Read Tag other Object I/O. Use Link Function were Object I/O is
created.
Alternate Read Tag Alternate Write Tag. No restrictions.

• Multiple Object I/Os may be decoded of a particular Read/Input. Object I/O data
assembling, merging, statistics, etc. must form a coherent block of line entries identified as a
Composite Object using the same Read/Input. If a Read/Input is decoded at scattered
locations, the entries are considered independent and may not provide the desired results.
• TagArrays are automatically assumed. Caution – this especially applies for Alternate
Read/Write Tags and may cause unpredictable reactions if a TagArray is not properly
assigned (see TagArray Concept). Analog Arrays containing a Long Integer or Float must
be pairs of consecutive 16-bit binary values. For TagArrays, the High/Low value order must
be considered. However, an Object I/O TagArray is only assumed when specifying an
ARYnnn:x:y:z Function.
• Multiple Functions may be applied with certain restrictions only. While some
combinations, such as scaling and deadbanding, make sense, others, such as statistics and
data merging, are useless. Because of the variety of possible combinations, it is
recommended that you test the desired combination prior to implementation.

FactoryLink Device Interfaces - OPC and Other Guide / 127


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



C ONFIGURATION TABLES
In Configuration Explorer, select the desired option in the Shared folder/domain. Then, select
the appropriate table(s) to configure the ECI Communication Objects:
• ECI Dataset Converter (default for EDI, RAPD and Emulation by ODX driver)
• ECI OPC Item Converter (requires ODX OPC Data eXchange driver)
ECI may be set up for hexadecimal and octal addressing if required; see “Tag/Item Addressing
and Conversion Code” on page 146.

ECI/OPC Object Control


The ECI/OPC Object Control tables identify Communication Objects, each having their own
Read, Write Dataset, or OPC Group, respectively. It identifies the Mailbox interface and the
Datasets to be transmitted together with Read/Write control parameters, such as the type of
writing Block, Exception, Tag size and so forth. Individual object information is specified in
the ECI Object Information tables discussed in the next section.

Table Name Read/Input Read Control Write/Output Write Control


referenced
by RAPD

Object Table A user-specified name of up to 15 characters for the ECI Information table
Name must be defined. All other entries in this line are optional or have default
settings. Note that table names may be referenced by ECI-based RAPD
Drivers. For a redundant setup using VRN, use DsIdx numbers for Dataset
identification, then duplicate the line, rename the Read/Write Mailboxes
and add an asterisk to the table name, for example, *TAB1 to create a
dummy entry referenced by the RAPD Driver (see “Dataset Exchange in
Redundant System with VRN” on page 171).
Read Mailbox Tag Required to transmit Datasets from RAPD, ODX or a network to ECI. For
non-OPC specific tables, you must also assign a Read Dataset IdxTag or
Index. The Read Mailbox (also-called I/O Translator or Decoder Mailbox)
is owned by ECI and may be used several times within this column.
Valid Entry: tag name
Valid Data Type: mailbox (normally one only for each RAPD driver)

128 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

If numerous Datasets will be processed, multiple Read Mailboxes may be


applied to group data from different drivers or stations.
Read Dataset This is the Database Tag used for Read Dataset Identification and/or Read
IdxTag Update Control. The IdxTag (also-called Dataset Control Tag) is used to
identify a Dataset referenced in a RAPD table. And, it can be used as a
trigger for polling Block Read data from any type of driver. Valid entries are
(not applicable for OPC-specific tables):
Valid Entry: tag name
Valid Data Type: digital
The trigger can be replaced by Function RdTrigg. It may be controlled
solely by ECI or by other tasks, as required. It is automatically set on
startup to initialize input data. ECI triggers the IdxTag time delayed by the
Read Interval whenever an Object I/O in the appropriate Information table
has been changed.
Read Dataset Data in this column is considered a user specified unique identifier, which
Index > Rd Ds Idx supersedes Dataset identification by the Read Dataset IdxTag. All other
functions for the IdxTag remain intact. If Mailbox data is received from a
network, an entry is required. Valid entries are (for OPC-specific tables
created internally):
Valid Entry: -1 to 65534 [default = -1 (none)]
Read Mode The entry in this column essentially identifies the High/Low value order
(see “Intel <=> Motorola Format and Composite Object” on page 150) for
Alternate Read TagArrays. This is required if for example a LongAna or
Float will be assembled from multiple Tags. Valid entries are (for
OPC-specific tables forced to L4M internally):
H=High low (default) or L=Low high or, combinations with characters
as listed below, whereas ...
Number = Tag size in 0=bit, 1,2,4 bytes (L# required for EDI or RAPD
Emulation by ODX)
Prefix A=Address or I=Index in data (must be located in first 4 bytes of
Dataset)
Prefix X=swap Dataset header and
Suffix M=Mailbox read request
Suffix “M” specifies how to request a Read Dataset: either by the Dataset
IdxTag (default) or through the Write Mailbox. A Mailbox read request
specified by suffix M will disable the Dataset IdxTag as a trigger for
polling. In this case, a read request will be sent through the Write Mailbox.
You must specify a Write Mailbox (if necessary, with a dummy Write
Dataset IdxTag or Ds Idx) in the same line. If you wish to trigger a read
request, assign a Tag with Function RdTrigg in the appropriate columns.

FactoryLink Device Interfaces - OPC and Other Guide / 129


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



Prefix “A” and “I” are used to specify a tag Start Address or a Dataset
Index number as part of the transmitted data (unsigned long integer in first
4 data bytes). This can be used for multiplexing Read data, controlled by the
external device through any RAPD Driver. Note that indexed data will
always be shifted to begin with Elem Addr = 0 within an ECI Information
table.
You can force the Tag order and size to 0=bit or 1,2,4 byte for any Dataset.
For EDI - RAPD Emulation by ODX, specify L0..L4 to suit the addressing
of the external device. Prefix “X” will swap the Dataset header information
prior to processing for non-ECI based RAPD residing on a Motorola host
(see “Intel <=> Motorola Format and Composite Object” on page 150).
Read Interval After Separate Read Interval after changing an Object I/O (fast update) and
Change or Continuous Read Interval (slow update) for normal transmission by a slash
Continuous > or a semicolon (for example, 1.6/25). Note that these values are also used as
Interv Ch/Cont update rates for ODX OPC Data eXchange.
Valid Entry: 0 = default (never, inactive)
0.1 to 10000/0.1 to 10000 seconds
The first entry is the time to repeat the Read Dataset IdxTag as a trigger for
polling whenever an Object I/O has been changed (for example, 1.6 sec). It
automatically appears twice after a change to ensure proper feedback (for
example, 1.6 and 3.2 sec). If multiple Object I/Os are changed within an
activated delay, the trigger is repeated until the last change has timed out. A
Read Interval after changing will be adjusted to approx. the time required to
send data to the external device.
The second entry is the time to repeat the trigger continuously (for example,
every 25 sec). Thus, Read data may normally be polled slowly to unburden
communication, while it is polled more frequently for fast reaction at an
Object I/O change. The second entry essentially replaces polling by the
Interval Timer task.
Read Update This is the time delay to refresh each particular Object I/O after it has been
Delay changed (or forced written) by a task other than ECI and caused a possible
Write/Output. Valid entries are:
Valid Entry: 0 (default – immediate up-date)
0.1 to 10000 seconds
You can stop the Update Delay timer by Function IOUpdHalt or Program
Argument
–InitUncertain at startup. If a Write Interval is applied, the delay must be
greater than twice the Write Interval time or, it may be set to zero for test
purposes (for example, to check the time required to receive a feedback
information).
Note: Increasing the Update Delay time allows for more simultaneous Object I/O
changes while increasing the Write Interval time reduces this number.

130 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

Write Encoded An Encoded Array may be assigned to transmit Encoded Write data to an
Array or Mailbox EDI driver. A Write Mailbox (also-called Protocol Driver Mailbox) must be
Tag assigned to transmit any type of output data (Exception, Encoded, Block or
Dataset Write) to RAPD, ODX or a network. Valid entries are:
Valid Entry: tag name
Valid Data Type: analog or mailbox (normally one only for each RAPD
driver)
A Write Mailbox is owned by the receiving task as RAPD, ODX or
network. It may be entered as often as required in this column. For
non-OPC specific tables, you must assign a Write Dataset IdxTag or Index.
However, an Encoded Array must be unique for each ECI Information table
and it can only be used for encoded outputs of type E, EB or EN entered in
the Write at Change column.
For any case, Encoded output data must be decoded in the target system.
Encoded Write is controlled by a command buffer if a Write Interval is
assigned. An output is immediately set on the first Object I/O change and
subsequently updated by the interval if further I/Os are being changed.
However, the Write Dataset IdxTag will be triggered only if an Encoded
Array is assigned. Thus, the trigger can be used to send the Encoded Array
to a PLC using an ordinary EDI Block Write table.

A Segment Address may be specified for each ECI Information table by


entering Function SegmAddr=## at the top. In this case, offset [1] indicates
the Segment Address and the Access flag is set Off direct. Normally, it
displays the Number of Tags in the Datablock and the Access flag is set
On indirect.
A RAPD Driver sends the entire Encoded Array to the target system,
starting with the address entered in the Wr Enc Addr column. “New data” is
identified whenever data at offset [0]=header or [3]=code is not zero. After
a particular command has been decoded, that is, the current Datablock has
been processed, the target system will clear the information at offset [0] or
[3] to detect “new data” again. For message decoding, keep all message
lengths identical (see Function LNnn) to overwrite any characters
previously stored.
Write Dataset This database tag is used for both Write Dataset Identification and
IdxTag Block/Dataset Write trigger. The IdxTag (also-called Dataset Control Tag)
is used to identify a Dataset referenced in a RAPD table. And, it can be used

FactoryLink Device Interfaces - OPC and Other Guide / 131


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



as a trigger to write Block/Dataset information to RAPD, or Encoded data
trough an EDI driver by triggering the corresponding Block Write Table.
Valid entries are (not applicable for OPC-specific tables):
Valid Entry: tag name
Valid Data Type: digital
An IdxTag may be assigned as a Block/Dataset Write trigger unless defined
by Function WrTrigg. A trigger is only accepted if enabled in the Wr by Tr
column. It is released (forced written) by other tasks, such as Timer. If an
AnalogArray is assigned in the Write EncArray / MailboxTag column, ECI
releases the Write IdxTag as a trigger whenever an Encoded output
command is written. Thus, it can be used to send the Array to the external
device using an ordinary EDI Block Write table.
Write Dataset Data in this column is considered a user-specified unique identifier, which
Index > Wr Ds Idx supersedes the identification by the Write Dataset IdxTag. All other
functions for the IdxTag remain intact. Iif Mailbox data is sent through the
network, an entry is required. Valid entries are (for OPC specific tables
created internally):
Valid Entry: -1 to 65534 [default = -1 (none)]
Write Mode The entry in this column identifies the High/Low value order for Alternate
Write TagArrays and, it specifies the order and Tag size of 0=bit or 1,2, 4
bytes for the Write Dataset. Order and size will determine the Tag
addressing for Block or Dataset Write commands. Therefore, it should suit
the format in the external device (see “Intel <=> Motorola Format and
Composite Object” on page 150). Valid entries are (for OPC-specific tables
forced to L4 internally):
H or H1=High low (default), H0, H2, H4, or combinations with suffix T,
or
L or L1=Low high, L0, L2, L4, or combinations with suffix T
Suffix “T” may be added to Test or Transfer output data to another ECI or
Dataset. In this case, the output is converted to a Read job, where the
commands can be written to a Read Mailbox for further processing.
Write by Trigger > This column identifies the type of data to be transmitted to the Write
Wr by Tr Mailbox if a Block or Dataset Write trigger is released (forced written).
Note that the Write Dataset IdxTag is considered a trigger input for
Block/Dataset Write commands unless a specific WrTrigg is defined in the
R/W Range Function column (see “Dataset or OPC Group Write
Procedures” on page 154).
Valid Entry: N = No Write by Trigger (default)
D = Dataset (Mailbox only)
B = Block (Mailbox only) (not applicable for
OPC-specific tables)
Note: You must adjust the Tag Format in the Wr Mode column for Block or Dataset
Write.

132 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

A Block Write command means that outputs with consecutive (contiguous)


addresses are sent as packages (coherent blocks) that is, if “address gaps”
are found in the output addressing, multiple packages are transmitted.
On the other hand, a Dataset Write command means that the entire Dataset
is transmitted while data of non-configured addresses (gaps) are set to zero.
This is the most efficient way for a block transfer, although the tags in
“address gaps” may not be used in the external device. Note that these
methods have no influence on Alternate Write/Outputs entered in the ECI
Information table.
Write at Change > This column identifies the type of data to be transmitted to the Write
Wr at Ch Mailbox or the Encoded Array whenever an Object I/O has been changed
(forced written) by a task other than ECI (see “Dataset or OPC Group Write
Procedures” on page 154). Valid entries are (** means not applicable for
OPC-specific tables):
N=No Write at Change
X=eXception Write (default for Alternate Write Tags and Mailbox)
D=Dataset (Mailbox only)
B=Block (Mailbox only)**
E=Encode all data types (Encoded Array or Mailbox)**
EB=Encode Bytes, Nibbles and Bits only (Encoded Array or Mailbox),
Exception for all other types**
EN=Encode Nibbles and Bits only (Encoded Array or Mailbox), Exception
for all other types**
All methods above have no influence on Alternate Write/Outputs entered in
the ECI Information table. ECI normally prevents sending Write/Output
information at initialization and thus inadvertently transmit data to an
external device unless Program Argument –InitWrite is set. Caution: in this
case, any changed or forced written I/O data may be written at startup or
restart of ECI.
Block Write and Dataset Write are as described for the Write by Trigger
column above. Important: You must adjust the Tag Format in the Wr Mode
column for Block/Dataset Write. For Exception (default) and Encoded
Write, see Basic Functions.
Write Encoded Contains the address in the particular dataset to which the Encoded data is
Address > Enc written. If a Write Mailbox is assigned, an entry is required for codes E, EB
Addr and EN in the Write at Change column Valid entries are (not applicable for
OPC-specific tables):
Valid Entry: 0 to 65500 or -1=none (default)

FactoryLink Device Interfaces - OPC and Other Guide / 133


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



Write Interval Time The Time to delay data output if multiple outputs are written sequentially to
> Write Interv the target system. The time adjusted represents the transmission time
required to write data to the target system.
Valid Entry: 0 = every scan (default)
0.1 to 10000 seconds
Output commands as well as the Write Dataset IdxTag trigger for Encoded
Arrays are controlled independently for each dataset by an internal
command buffer. If the buffer is empty, an Object I/O change is returned
immediately to the output. A further command is only released after the
Write Interval time has elapsed.
Unless Function WrX (Write eXceptionally) is assigned, a particular output
command is replaced (overwritten) as long as it is queued in the buffer. This
prevents overloading of communication if a value is incremented at the
speed of the keyboard auto repeat frequency.
If the buffer is full, further Object I/O changes are rejected by automatically
restoring the actual Read/Input to the Object I/O to alert the operator. The
buffer is considered full if the currently retained time plus an attempted
increase of twice the Write Interval is greater than the particular Update
Delay.
Note: Increasing the Update Delay time allows for more simultaneous Object I/O
changes while increasing the Write Interval time reduces this number.

ECI/OPC Object Information


The ECI Information table identifies individual Object I/Os, which are extracted, converted,
scaled or calculated from the Read/Input and which may be encoded, converted, normalized,
and transmitted to the Write/Output. The table virtually reflects the dataflow Read/Input >
Object I/O > Write/Output as follows:

Read/Input Object I/O Write/Output Optional Data Scaling and Deadbanding Quality Info

An ECI Information table may be used for Read-only, Write-only and/or Bidirectional
communication by simply filling in the desired fields. The following functions are included:
• Extraction from Bit, Nibble, Byte, Short, Long, Float, BCD, HEX, Message, and Array
values

134 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

• Scaling, including range supervision and error detection


• Assembling, merging, or conversion of different data types, including OPC specific
attributes
• Comparison of changed values to create trigger commands
• Copy values on trigger commands
• Calculation of Statistical Data
(Alternate) Read Read/Input information is extracted from the Tag or Array specified in this
Tag or OPC Item column. In this case, a possible Read Elem Addr cannot be used. Valid
entries are:
Valid Entry: tag name
Valid Data Type: digital, analog, longana, float, message
OPCItemName (preceded by a single quote) for OPC specific tables,
default = none
For OPC ItemArrays, you can address an Array Tag by entering the Tag
offset in braces { }. For example, 'NameX{3} will address Tag 3, and so on.
Note that the Tag size in OPC specific tables is always 4 bytes.
An Alternate Read Tag may be linked to its own tag, another Object I/O, or
an Alternate Write Tag. In this case, you may apply Function Link or Merge
to provide the desired results (see General Rules).
Whenever data will be extracted from more than one Tag, ECI
automatically assumes an Array. In this case, consider the Hi/Lo value order
and the number of Tags assigned (see TagArray Concept).
Read Tag Address Required if data is taken from a dataset. In this case, no Alternate Read Tag
> Elem Addr must be entered in this line. Valid entries are (for OPC-specific tables
created internally):
Valid Entry: 0 to 65500 or -1=none (default)
A Tag of a dataset is a memory portion having an address in the external
device (see RAPD Driver).
Read Code > Rd Contains code defining the convert function for Read/Input data. Unless
CDE otherwise specified, the Wr CDE is identical (indicated by a dash). Data is
extracted on change and transmitted to the corresponding Object I/O. See
also Basic Functions and TagArray Concept. In the list below, alternate
codes are indicated by , prefix U=unsigned, suffix R=reversed (byte
swapped) and dotted codes = OPC Item Attributes for OPC specific
tables only. For additional information see “Tag/Item Addressing and
Conversion Code” on page 146 and “Intel <=> Motorola Format and
Composite Object” on page 150. Valid entries are:

Boolean, Bits: BOOL LSB Least Significant Bit, default, 0..31 (binary decimal) reflects Bit Weight
20..231,

FactoryLink Device Interfaces - OPC and Other Guide / 135


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



0R..15R (reversed), 1D..32D (decimal), 0X..1FX (hexa), 0C..37C (octal), 16M..1M
(Modicon)
Nibble: N0..N3 (Half a byte, four bits of low word), N4..N7 (of high word) value 0..15
Byte, Char: I1 B0, UI1 UB0, B1, UB1 (Byte of low word), B2, UB2, B3, UB3 (of high word)
Integer: I2 S0, UI2 US0 (16bit Short), S1, US1 (of high word), I4 L0, L0R, UI4 UL0
(32bit Long)
BCD: BCD3, UBC3, UBC4 (3 or 4 digit BCD), BCD7, UBC7, UBC8 (7 or 8 digit BCD)
Float, Real: R4 F0, F0R (32bit IEEE), FSIE G0 (Siemens), FMOT (Motorola), R8 D0 (64bit
IEEE Double)
Message: MSG, MSG1..2, MSR (byte swapped) string identified by Function LNnnn ECaaa, where:
Length nnn=1..1024 char and optional Ending fill Character aaa=0..255 ASCII
equivalent.
MSG and MSR are decoded as NULL terminated strings i.e. they are truncated at the
first character found ASCII 0.
MSG1 contains the actual string length in the first byte (that is the number of
characters to be displayed),
MSG2 contains the max length (nnn-2) in the first byte and the actual string length in
the second byte.
Timestamp: .UTC or UTC0 Universal Time Coordinated, FileTime binary dump, not for display, I/O=Float
.UTF or UTF0 UTC Float conversion (15 digits max) or UTCF Float UTC FileTime
dump, I/O=Float
.TIM, TIM0..3 or TIMF SecTime [s], .TIX, TIX0 or TIXF 0..999 [ms], I/O=LongAna,
Analog
.TIH, TIH0..3 or TIHF HourTime hh:mm:ss.xxx [ms], use Function LNnn to truncate
I/O=Msg
.TID, TID0..3 or TIDF DateTime YYYY-MM-DD hh:mm:ss.xxx [ms], use LNnn,
I/O=Msg
Codes TI?0 require an 8 byte UTC FileTime input, codes TI?F require a UTC to Float
converted input.
Codes TI?1..3 require Dataset structures specified by Program Argument –
TIM1..3=Y/M/D/h/m/s/x.
Use Program Argument –DATE=... to modify the ISO 8601 format YYYY-MM-DD
for example, –DATE=MM/DD/YY, etc.
SecTime outputs are limited to year 2037 due to ANSI C mktime. For more info see
“Dataset Layout for Timestamps” on page 152.
Quality: .QA Native Flags QQSSSSLL 0..255 where Q=Quality**, S=Status, L=Limit**,
I/O=Analog
** Note that flags QQ and LL may also be displayed by the I/O Status Tag when using
Function Qual
.QX Vendor Specific Value (high byte of short integer), I/O=Analog

136 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

Quality Limit: .QL Flags LL 0=Ok/NotLimited, 1=LoLimit, 2=HiLimit, 3=ConstantValue,


I/O=Analog
Quality Status: .QS Flags QQSSSS 0..15=Bad, 16..31=Uncertain, 32..63=Ok/Good, I/O=Analog
0=Bad, 1=ConfigError, 2=NoConnect, 3=DeviceFail, 4=SensorFail, 5=LastKnownVal,
6=CommFail, 7=OutOfSevice
16=Uncertain, 17=LastUsableVal, 20=SensorNotAccurate, 21=EngUnitsExceeded,
22=SubNormal
48=Ok/Good, 54=LocalOverride/Forced. Note that all other numbers are not specified.
Access Rights: .AR Native 0=NoAccess, 1=Readable, 2=Writeable, 3=Read/Write, I/O=Analog
.AX Vendor Specific Value (high word of long integer), I/O=Analog

Object I/O Tag Represents a bidirectional single Tag interface, which can be used for both
input and/or output from/to the external device or Alternate Read/Write
Tags.
Valid Entry: tag name
Valid Data Type: digital, analog, longana, float, message
The valid range of the FactoryLink tag type should be considered for
conversions. For example, when extracting an Unsigned Long (Rd
CDE=UL0), it should be assigned to a Float since a LongAnalog cannot
take 4.29*109. Characters in Object I/O Messages must be 1 – 255 ASCII
equivalent. Extracted input text (Rd CDE=MSG) will be truncated at the
location of the first character found 0 ASCII equivalent.
Read/Input data is normally converted and transmitted to the corresponding
Object I/O. If Object I/O data is changed by a task other than ECI,
Write/output data is created according to the inverted function identified.
Simultaneously, updating from the Read/Input is delayed by the Update
Delay. This allows for refreshing the Read/Input before the Object I/O is
newly updated. For data initialization, see General Rules and Program
Argument -InitUncertain.
An Object I/O must always be specified while it must not be linked to its
own created Write/Output. However, it may be linked to its own Alternate
Read Tag. In this case, a possible Write/Output is only processed if the
Merge Function is applied (see General Rules). Object I/Os may be
assigned as arrays by using the ARYnnn:x:y:z Function (see TagArray
Concept).
Write Code > Wr Contains a code defining how data will be converted and encoded for the
CDE Write/Output (see “Tag/Item Addressing and Conversion Code” on page
146). Data for Block/Dataset commands is assembled or inserted
accordingly. Valid entries are:
Any code listed for Rd CDE above, a minus sign “-” sets the Wr CDE
equal Rd CDE (default)
A Write/Output is written on a change of the Object I/O. See also Basic
Functions, TagArray Concept.

FactoryLink Device Interfaces - OPC and Other Guide / 137


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



Write Tag Address Required if data is sent to a dataset or to an Encoded Array for entries E, EB
> Elem Addr or EN in the Write at Change column. Valid entries are (for OPC specific
tables created internally):
Valid Entry: 0 to 65500 or -1 = none (default)
A Tag of a Dataset is a memory portion having an address in the external
device (see RAPD Driver). Output data is created in parallel
(simultaneously) to a possible Alternate Write/Output.
(Alternate) Write Individual output information is transmitted to the Tag or Array identified
Tag or OPC Item in this column regardless whether a Write Encoded Array or a Mailbox is
specified (parallel operation).
Valid Entry: tag name
Valid Data Type: digital, analog, longana, float, message or ...
OPCItemName or ‘= (preceded by a single quote) for OPC-specific
tables, default = none
Note that the equal sign specifies the Write Item = Read Item without
entering the name.
For OPC ItemArrays, you can address an Array Tag by entering the Tag
offset in braces { }, for example, 'NameX{4} will address Tag 4 and so on.
Note that the Tag size in OPC specific tables is always 4 bytes.
Outputs are treated simultaneously if specified for both Write Tag and Tag
Address. A Write Tag is forced written on change of its Object I/O.
However, a Write Interval is not applicable. If data will be assembled, ECI
assumes a TagArray and writes to multiple Tags. Consider the Hi/Lo value
order and the number of Tags assigned. See also TagArray Concept,
Function Merge, General Rules, and Program Argument -InitWrite for
initialization.
R/W Range and/or Contains the Read/Write Range of normalized data transmitted from/to the
Function external device. A Function may be added for special processing or
conditioning of I/Os. A R/W Range is specified by a min and a max value
separated by a semicolon or colon using exponential notation as desired.
R/W Range and/or Function(s) are entered as a string and separated by a
space. Valid entries are:
Valid Entry: R/W Range as ±3.4E38min±3.4E38max
plus Function(s) as described below (default no entry)
Suffix “A” or “B” to the R/W Range will apply LimitType=A or B as
described for the I/O Scale Min/Max column. If a R/W Range is not
specified, Read/Input, Object I/O and Write/Output data are transmitted 1:1
(default). If specified, the R/W Range must be the first entry followed by a
possible Function while an Array statement must be the last entry. Possible
Functions are (case insensitive):
• Init > Initial Read Completion after startup (to be entered at beginning of table). The
Object I/O in this line is used as a trigger output from this table. It is forced ON after the
Read Dataset has been processed completely at startup. All other entries are default.

138 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

• IOChgRd > I/O Changed/Updated by Read/Input (to be entered at beginning of table).


The Object I/O in this line is used as a trigger output from this table. It is forced ON
whenever an Object I/O has been updated or changed by its Read/Input. All other entries are
default.
• IOChgWr > I/O Changed for Write/Output (to be entered at beginning of table). The
Object I/O in this line is used as a trigger output from this table. It is forced ON whenever a
Write/Output has been created due to a changed Object I/O. All other entries are default.
• IOChg > I/O Changed/Updated (to be entered at beginning of table). The Object I/O in
this line is used as a trigger output from this table. It is forced ON whenever an Object I/O
has been updated or changed due to an input OR an output command. All other entries are
default.
• IOUpdHalt > I/O Update Halted (to be entered at beginning of table). The Object I/O in
this line is used as a control input, which - if set “1” or ON, will stop all Update Delay
timers in this table. For example, this can be used to modify a Dataset representing a recipe,
while changed data can be watched using the Status Tag before the Dataset is sent to the
external device. All other entries are default.
• IOUpdAll > Update all I/Os unconditionally (to be entered at beginning of table). This
parameter does not require an I/O Tag. All Object I/Os for this table are updated (not forced
written!) regardless whether the received Dataset has changed or not. Normally, after
initialization, I/Os are only updated on change (default) of the corresponding input values.
• IOUpd > Update this I/O unconditionally. The particular Object I/O is updated (not
forced written!) regardless whether the input from the received Dataset has changed or not.
Normally, after initialization, an I/O is only updated on change (default) of the
corresponding input value.
• RdTrigg > Dataset Read Trigger (to be entered at beginning of table). This Function is
only useful if the Read Mode is set for Mailbox read request (suffix “M” in Rd Mode
column). In this case, the Object I/O in this line is used as a trigger input. For example, if
forced ON by the Timer task, a read request is released through the Write Mailbox. All other
entries are default.
• RdCompl > Read Complete Trigger (to be entered at beginning of table). The Object I/O
in this line is used as a “Mailbox Read Complete” output for this table. A digital I/O Tag is
forced ON whenever data from the Read Mailbox has been processed completely, while an
analog I/O Tag is forced to 3=Read_ok, 7=Unsol_Read_ok, 11=Read_Error or
15=Unsol_Read_Error (Error=Bit3). All other entries are default.
• RdDisabl > Read Mbx Disabled (to be entered at beginning of table). The Object I/O in
this line is used as a control input, which, if set to “1” or O, will stop reading Object I/Os
from a Dataset in this table (Read Mailbox data is dumped). All other entries are default.
Note that Alternate Read Tags, Update Delay, and other functions remain operative.
• WrTrigg > Block or Dataset Write Trigger (to be entered at beginning of table). The
Object I/O in this line is used as a trigger input for this table. For example, if forced ON by
the Timer or Graphics task, data identified by the Wr by Tr column is sent to the Write
Mailbox. All other entries are default. Note that the WrTrigg Function will supersede the
Write Dataset IdxTag as a trigger input.

FactoryLink Device Interfaces - OPC and Other Guide / 139


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



• WrCompl > Write Complete Trigger (to be entered at beginning of table). The Object I/O
in this line is used as a “Mailbox Write Complete” output for this table. A digital I/O Tag is
forced ON whenever the RAPD Driver sends a “complete” feedback for this Dataset
through the Read Mailbox. If an analog I/O Tag is assigned, it is forced to 5=Write_ok or
13=Write_Error (Error=Bit3). All other entries are default. Important! not all RAPD
Drivers support this feature.
• WrDisabl > Write Mbx Disabled (to be entered at beginning of table). The Object I/O in
this line is used as a control input, which, if set to “1” or ON, will stop writing to a Dataset
from this table. All other entries are default. Note that Alternate Write Tags remain
operative.
• WrMode=x;y and WrType=z > Write Mode and Type in IMX protocol for certain
RAPD drivers (to be entered at beginning of table) where x=1 reverse Bit direction, x=2
lowest ElemAddr=1, x=4 lowest BitAddr=1, or combinations, such as 5=1+4, and y=1..9
IMX version (option) and z=1 More data flag, z=2 Host direction flag, z=4 Reserved or
combinations, e.g. 3=1+2. Default settings: WrMode=0;1 and WrType=0 (no I/O Tag
required).
• WrX > Write this Output eXceptionally. The particular output command information will
not be replaced (overwritten) in the internal command buffer, which is assigned by a Write
Interval.
• SegmAddr=xx > Segment Address for Encoded Write (to be entered at beginning of a
table). This parameter does not require an I/O Tag. All Encoded Write commands of this
table are transmitted with address xx at Encoded Array offset [1] while the Access flag is set
Off direct.
• Mux=xx or Ignore=xx > Multiplex or Ignore Table (to be entered in the first line in table).
The Object I/O in this line is a control input, which, if it matches the expression, enables
read/write to/from this table or ignores it completely at startup (irreversible at runtime). The
Function supports the following expressions: =, !=, <, <=, >, >= or <>, while xx denotes the
I/O Tag value. It essentially works as RdDisabl, WrDisabl and IOUpdHalt altogether
including enable/disable Alternate Tags.
• Merge > Merge Write/Output Data of a Composite Object. A merged output is released
when changing its own tag or a Composite Object I/O (for example, Bit 2 of Nibble N0).
That is, it creates a common Write/Output for multiple Object I/Os and may be used to send
the entire Byte at any Bit change within that Byte (see “Data Embedding and Function
Merge” on page 172). Note that if an Object I/O is fed back to its own Read/Input, the
corresponding Write/Output is only processed when the Merge Function is applied.
• Qual > Display OPC Quality information by I/O Status Tag. The OPC Quality Limit and
Status flags are transferred to bits 3, 4, 6 and 7 of the I/O Status. This function may only be
applied in OPC-specific tables, however, not in conjunction with the ARYnnn:x:y:z
Function.
• Link > Link this Object I/O to other Object I/O(s) or Alternate Read Tag(s) to distribute or
rearrange data (marshalling). The function essentially maintains the change status flag of the
appropriate Object I/O within a Composite Object, that is, a Write/Output is not allowed
(read only).

140 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

• Copy > Copy Alternate Read Tag to Write Tag if the Object I/O is changed or forced
written. For example, this may be used to create a timestamp for a changed value (see
“Statistical Functions XR, XP, XF, XT, XA, XS” on page 177).
Note: Although Copy and Enum (below) are similar, they are only valid for (Alternate)
Read/Write Tags.
• EnumX;Y > Enumerated Output taken from Read TagArray Index X..Y if the Object
I/O is changed or forced written to integer x..y where x=0..255 lowest and y=1..255 highest
ArrayIndex. For example, this may be used to select a text as “Open”, “Close”, “In
Transit,” and so on, corresponding to a value of 0, 1, 2, and so on. Make sure the array
dimension is properly assigned (see also TagArray Concept). For bidirectional Enum values,
create a Composite Object and use Function Link for ArrayIndex:

ECI/OPC Object Information - Shared

Read Tag, Addr Rd Object Wr Write Tag, Addr R/W Range Sample description:
or OPC Item CDE I/O Tag CDE or OPC Item Function
EnumArray[0] EnumArrayIdx EnumOutput Enum0;4 Enum Output Principle
EnumArray[1] assumed
EnumArray[2] hidden
EnumArray[3] tags
EnumArray[4]
`EnumItem N0 EnumValue N0 `EnumItem OPC Bidirectional Enum
`EnumItem N0 EnumArrayIdx - Link Composite Object to Link
EnumText[0] MSG EnumArrayIdx MSG EnumTextOut LN9 Enum0;7 EnumArrayIdx=EnumValue

• TRxxx=vvv > Trigger Write/Output to Value vvv if the Object I/O is changed or forced to
xxx, where xxx, vvv = integer (see “Write/Output Triggering by Function TRxxx=vvv” on
page 174). This is used to trigger individual commands of value vvv depending on particular
I/O values, for example, if a Toggle turns to zero (TR0=vvv) or an Analog value is set 5
(TR5=vvv). If =vvv is not specified, the Write/Output is forced to “1” or ON (Trigger). If no
value xxx is specified, the output is released on any changed or forced Object I/O.
• DBxx.xx > Deadband for Object I/O, xx.xx denotes the absolute Deadband value (integer
or float). The Object I/O is updated only if a possible new I/O value rises or falls by ½ *
xx.xx. This Function is only valid for non-Message Object I/Os and is not valid for
Statistical Data Calculation.
• LNnnn ECaaa > Length of Message String and Ending fill Character, nnn = 1..1024 in
Bytes and aaa = 0..225 ASCII equivalent for ending char (option, default=0), valid for
Rd/Wr codes MSG, MSG1/2 and MSR. Size Read/Input and/or Write/Output array length
accordingly. For MSG and MSR, the extracted text must be ASCII 1..255 else, it will be
truncated at the first character found ASCII 0 (NULL terminated string).
• HEXn > HexaDec Value displayed in Object I/O Message Tag of “n” characters. A
non-specified “n” will be set to 4 or 8 depending on Code CDE.

FactoryLink Device Interfaces - OPC and Other Guide / 141


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



• ARYnnn:x:y:z > Array Statement used to extract and insert data from/to multiple
Read/Inputs or Write/Outputs respectively (see “Array Handling by Function
ARYnnn:x:y:z” on page 176). For example, ARY76:2:5:3 is explained as follows:
ARY{nnn} specifies the number of Tags for the Object I/O TagArray (for example 76). It is
required and represents the smallest array dimension to be specified in the Configuration
Explorer.
ARY{x} specifies the Read Tag Increment (for example, 2). For example, it may be
assigned to select only every second Tag for data extraction (min=0, default=1) while the
start address is given by the Read/Input Tags ArrayIndex or Address specified for this line.
ARY{y} specifies the number of Object I/Os created per Read Tag (for example, 5). For
example, it may be assigned to create five Digital Tags of every Input/Output Tag accessed,
(min=0, default=1) while the start address is given by the Rd/Wr CDEs entered in this line.
ARY{z} specifies the Write Tag Increment (for example, 3). For example, it may be
assigned to select only every third Tag for data insertion (min=0, default=1) while the start
address is given by the Write/Output Tags ArrayIndex or Address specified for this line.
Note: The ARYnnn:x:y:z must always be the last statement entered in a Function field.
A value of zero is allowed in arguments “y:x:z”. In this case, a single tag may be linked
to multiple Rd, Wr or I/O Tags.

Link Supervision (Watchdog)

Alive=xx > Heartbeat signal allowing for a regular supervision of this table or of this connect
every xx seconds. In case of a disruption, an "Transmission ERROR" alarm is indicated by an
I/O Status Tag's value of ≥ 256. The Alive heartbeat interval is a third of time xx adjusted. A
value of 0..255, indicated by the Object I/O Tag, is transmitted periodically through the Read
and Write Tags. That is, the corresponding tags in the external device (PLC) must be reserved
for this function.

Statistical Data Calculation

The following Functions may be applied to calculate statistical values (see “Statistical
Functions XR, XP, XF, XT, XA, XS” on page 177). Note that statistical input values are taken
either from the Alternate Read Tag, OPC Item or from the Elem Addr (Read Dataset).
However, outputs to a Write Dataset or OPC Item are ignored:
• XR > Reset Statistics by a tag of Type Digital or Analog entered in the Object I/O column.
If the Reset input is forced ON, all outputs subsequently listed for all Codes XD, XP, XF,
XT, XA and XS of this table are reset. Dip, Peak, Filter and Average outputs are thereby set
to the current sample value while Total, Squared Sum, Standard Deviation and Number of
Samples are set to zero.
Note: A Reset Tag is valid downwards in the table unless a new Tag is specified by
Code XR. Individual resets may be performed if specifying a Reset line with Code XR
prior each calculation or, by forcing the appropriate Enable, Interval or Sample Tag to
zero.

142 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

• XD, XDA or XP, XPA > Dip or Peak Value Indicator represented by an Analog, LongAna
or Float Tag entered in the Alternate Write Tag column. If an Enable Tag (Digital or Analog)
is assigned to the Object I/O column, the detector is only active as long as its value is ON. A
Dip or Peak value may be reset to the current sample value if a preceding Reset Tag is
forced ON or if the Enable Tag is forced OFF. Functions XDA and XPA provide an automatic
reset at startup of ECI.
• XFxxx, XFAxxx > Low Pass Filter output represented by an Analog, LongAna or Float
Tag entered in the Alternate Write Tag column. A new output value will be calculated each
time the associated Interval Trigger (Digital or Analog) entered in the Object I/O column is
forced ON. xxx represents the attenuation value of 1..255. The Filter output may be reset to
the current sample value if a preceding Reset Tag is forced ON or if the Interval Trigger is
forced OFF. Function XFAxxx provides an automatic reset at startup of ECI.
• XT > Totalizer or Counter represented by an Analog, LongAna or Float Tag entered in the
Alternate Write Tag column. A new output value will be calculated each time the associated
Sample Trigger (Digital or Analog) entered in the Object I/O column is forced ON. The
Total output may be reset to zero if a preceding Reset Tag is forced ON or if either the
Sample Trigger or the associated sample counter nSamples are forced OFF.
• XA > Average Calculation represented by an Analog, LongAna or Float Tag entered in the
Alternate Write Tag column. It may only be entered in conjunction with a Totalizer right
after Function XT. A new output value will be calculated together with the number of
samples for the associated Tag of Type LongAna or Float to the Object I/O column each
time the Sample Trigger for the Totalizer is forced ON. The Average output may be reset to
the current sample value and the sample counter is set to zero if a preceding Reset Tag is
forced ON or if the associated Sample Trigger is forced OFF.
• XS > Standard Deviation represented by an Analog, LongAna or Float Tag entered in the
Alternate Write Tag column. It may only be entered in conjunction with a Totalizer and its
associated Average calculation right after Functions XT and XA. A new output value will be
calculated together with the sum of sample squared values for the associated Tag of Type
Float entered in the Object I/O column each time the Sample Trigger for the Totalizer is
forced ON. The Sigma output together with its sum of sample squared value is reset to zero
if a preceding Reset Tag is forced ON or if the associated Sample Trigger is forced OFF.
Note: The Average calculation XA requires a preceding Total calculation XT. The
Standard Deviation XS requires both a preceding Average calculation XA and Total
calculation XT.

Also note that ECI 7.00 and older versions only support Alternate Read Tags (or Read
CDE=S0 for Datasets) for Statistical Functions, this legacy method can be reinstated
by Program Argument -TagOnlyStatistics.

FactoryLink Device Interfaces - OPC and Other Guide / 143


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Configuration Tables



I/O Scale Min/Max and I/O Scale Min/MaxTag

These columns are used to specify the lower and/or upper scale for a particular Object I/O if a
R/W Range is specified. For OPC-specific tables. you can enter a value or a tag name in the
same column. Valid entries are:
Any value for the Scale Min/Max column (default = none)
or a
TagName for Tag of Type Analog, LongAna, Float for the Min/MaxTag
column (default = none)
No entry defines the ScaleMin value=0 and the ScaleMax value=100, if a R/W Range is
specified this is used for a scale of 0..100%. ECI can compute Object I/Os with or without
min/max limitation. This is specified globally, by Program Argument –LimitType=A for
infinite scale (default) or –LimitType=B for scale with min/max boundaries (see graph). And, it
may be specified individually by entering suffix “A” or “B” in the desired R/W Range in the
corresponding column.

Scale / Normalize Formulas


LimitType=A
I/O Scale Infinite (default) Scaled Object I/O = Read/Inputextracted * a + b
Status>=32
Max NormalizedRead/Input or Write/Output =
(ObjectI/O - b) / a
Status=0 LimitType=B
) Boundary I/OScaleMax - I/OScaleMin
(a
where ...a = R/WRangeMax - R/WRangeMin
Min
Status>=4
... and b = I/OScaleMin - R/WRangeMin * a

(b) Default values if ...

Min Max R/W Range R/W Range not specified a = 1, b = 0


R/W Range specified only Scaled I/O Range = 0 – 100
[%]

144 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Configuration Tables

I/O Status Tag

This column specifies a Status Indication Tag, which provides the information below. Valid
entries are:
TagName for Tag of Type Digital, Analog, LongAna or Float (default =
none). Tag values are:

Value Bit Number Status Indication

0 or OFF All OFF I/O Value Status Normal/Ok (independent on Read/Write interface)

1 or ON 0=ON I/O Value in Transition = CHANGED (Data Transmission Active)

4 2=ON I/O Value < ScaleMin = Out of Range (independent on Read/Write interface)

8 3=ON I/O Value Low, OPC Quality Limit = 1 (OPC)

16 4=ON I/O Value High, OPC Quality Limit = 2 (OPC)

32 5=ON I/O Value > ScaleMax = Out of Range (independent on Read/Write interface)

64 6=ON I/O Value Uncertain, OPC Quality Status = 16..31 (OPC)

128 7=ON I/O Value Bad, OPC Quality Status = 0..15 (OPC)

256 8=ON Read/Input or Transmission ERROR (IMX based drivers or Alive function)

The I/O Status Tag may be applied in the graphics to inform the operator of a command
transmission, which is still transient, and, it may be used to indicate an Out-of-Range Status.
Transmission Errors are only indicated for IMX based drivers supporting this feature. The
OPC Quality information (shaded) is only available in OPC-specific tables when entering the
Qual Function but not in conjunction with an ARYnnn:x:y:z Function on the same line. The
Uncertain flag (value ≥ 64) can also be enabled at startup when applying Program Argument –
InitUncertain. In this case, the I/O Status Tag will display “uncertain” until the Object I/O is
updated by the first valid Dataset.

FactoryLink Device Interfaces - OPC and Other Guide / 145


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Tag/Item Addressing and Conversion Code



TAG /I TEM A DDRESSING AND C ONVERSION C ODE

Hexadecimal and Octal Tag Addresing


If you require a table with a tag Address other than decimal, then you may manually add the
desired tables by entering a new line “ECI00.ac” for HexaDec and/or “ECI02.ac” for Octal to
file %flink%\ac\titles using an ordinary editor. After this modification, you must run “acctmgr
-d -c” from the Run dialog box.

Read/Write Code CDE Hex Code in Encoded Array

The table below shows all Codes CDE that can be applied for conversion of Read/Write data
types entered to the corresponding column in the ECI/OPC Information table. For ECI, data
from/to the external device is represented in binary, that is you can access any bit or byte as
desired appropriate Code CDE. The Hex Code is transmitted by Encoded Array offset [3], it
has been designed to make decoding easy as discussed in the next section.

Boolean (1-Bit) l DIGITAL Hex TagArray or Block (1..nnn Bytes) Hex

BOOL LSB = Boolean/Least Significant Bit 100 Any code identified by Function ARYnnn:x:y:z C00
(default) where

0..31 = Bit (decimal, 0=least significant) 1xx nnn = Nbr of I/O Tags, x=Read Elem increm,

0X..1FX = Bit (hexadecimal, 0X=least) 1xx y=I/Os per Read Elem, z=Write Elem increm

0C..37C = Bit (octal, 0C=least) 1xx Message Text (1..1024 Bytes)

1D..32D = Bit (decimal, 1D=least) 1xx MSG = String l MESSAGE Length + End fill Char C80

0R..15R = Bit (reversed addr in Word, 15R=least) 10x MSG1 = ditto with actual lenght in 1st byte C81

16M..1M = Bit (Modicon decimal, 16M=least) 10x MSG2 = ditto max len (nnn-2) in 1st, act len in 2nd C82
byte

Nibble (4-Bit) MSR = String reversed (byte swapped) CC0

N0 (.AR) ..N3 = Nibble value 0..15 30x

N4 (.QL) ..N7 = Nibble in upper value (Bit 16..31) 31x Length + Ending fill Character are identified

Byte (8-Bit) by Function LNnnn ECaaa where ...

I1 B0, B1 = Signed Char/Byte –128..127 40x nnn = 1..1024 and aaa = 0..255 ASCII equivalent.

B2, B3 = Signed Byte in upper value (Bit 16..31) 41x Input text for codes MSG and MSR is truncated

146 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Tag/Item Addressing and Conversion Code

UI1 UB0 (.QA), UB1 (.QX) = Unsign. Char/Byte 50x at 1st char found 0 ASCII (NULL terminated
0..255 strings)

UB2, UB3 (.QS)= Unsigned Byte in upper value 51x

Short Integer or Word (16-Bit) Timestamps (UTC or User specified)

I2 S0 = Int2/Short –32768..32767=±215 l 600 TIM0 (.TIM) = SecTime [s] of UTC LNGANA D00
ANALOG

S1 = Signed Short in upper value (Bit 16..31) 610 TIM1..3 = SecTime [s] of user specified bytes D0x

UI2 US0 = Unsigned Int2/Short 0..65535=0..216-1 700 TIMF = SecTime [s] of UTCFloat D0F

US1 (.AX) = Unsigned Short in upper value 710 TIX0 (.TIX) = 0..999 [ms] of UTC LNGANA, ANA D10

Binary Coded Decimal (16-Bit) TIXF = 0..999 [ms] of UTCFloat D1F

BCD3 = Signed BCD ±999 (MSB=sign) 680 TIH0 (.TIH) = hh:mm:ss.xxx [ms] of UTC MSG, D20
LNn

UBC3 = Unsigned BCD 0..999 (3-digit) 780 TIH1..3 = hh:mm:ss.xxx [ms] of user specified D2x
bytes

UBC4 = Unsigned BCD 0..9’999 (4-digit) 7C0 TIHF = hh:mm:ss.xxx [ms] of UTCFloat D2F

Long Integer or DoubleWord (32-Bit) TID0 (.TID) = Y-M-D hh:mm:ss.xxx of UTC MSG, D30
LNn

I4 L0 = Signed Int4/Long ±2.1*109=±231 l 800 TID1..3 = Y-M-D hh:mm:ss.xxx of user specified D3x
LONGANA bytes

L0R = Reversed Signed Long (byte swapped) 840 TIDF = Y-M-D hh:mm:ss.xxx of UTCFloat D3F

UI4 UL0 = Unsigned Int4/Long 900 UTC0 (.UTC) = UTC native (binary dump) FLT D40
0..4.3*109=0..232-1

UL0R = Reversed Unsigned Long (byte swapped) 940 UTF0 (.UTF) = UTC native to UTCFloat FLT D4F

Binary Coded Decimal (32-Bit) UTCF = UTCFloat to UTC native (binary dump) D50
FLT

FactoryLink Device Interfaces - OPC and Other Guide / 147


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Tag/Item Addressing and Conversion Code


BCD7 = Signed BCD ±9’999’999 (MSB=sign) 880


OPC Timestamps are Universal Time
Coordinated. SecTimes are limited to 2037 due to x=
ANSI C mktime. All other Timestamps or the date 1..3
format YYYY-MM-DD (ISO 8601) may be specified
by Program Arguments.

UBC7 = Unsigned BCD 0..9’999’999 (7-digit) 980

UBC8 = Unsigned BCD 0..99’999’999 (8-digit) 9C0

Floating Point/Real (32-Bit)

FSIE G0 = Siemens Gleitpunkt ±1.7*1038 A00

FMOT = Motorola Fastfloat ±9.2*1018 A40

R4 F0 = Real4/IEEE Float ±3.4*1038 A80

F0R = Reversed IEEE Float (byte swapped) AC0

Double Precision Floating Point/Real (64-Bit)

R8 D0 = Real8/IEEE Double ±1.7*10308 l FLOAT B00

Bit shift xx=00..1Fhex in Tag to be accessed. For I/O Translator compatible codes, see “Sample
Application Translation IOX –>ECI” on page 168

Legend: Alternate codes, l FactoryLink equivalent type, (..) OPC Attribute code, Boundary OPC specific tables = Intel 4-Byte

148 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Tag/Item Addressing and Conversion Code

Comparison of Bit Position/Weight Code CDE / Hex Code

The Hex Code transmitted by Encoded Array offset [3] has been designed to make decoding
easy. The first hex number indicates the type and size of data 1=Bit, 3=Nibble, 4/5=Byte,
6/7=Short, 8/9=Long to be decoded, whereas odd=unsigned and even=signed values. The last
two numbers indicate the position by bit shift 00..1Fhex in the Tag to be accessed, for example,
107 identifies a Bit shifted by 07hex bits in the Tag or, 418 identifies a signed Byte shifted by
18hex bits in the Tag, and so on.

Bit Pos Boolean (1-Bit) Nibble Byte Short Long

Weight Decimal Decimal HexaDec Octal Reversed Modicon (4-Bit) (8-Bit) (16-Bit) (32-Bit)
0
2 ..2 3 00..03 1D..4D 0X..3X 0C..3C 15R..12R 16M..13M N0/300 B0/400
UB0/500 S0/600
US0/700

L0/800
UL0/900

24..27 04..07 5D..8D 4X..7X 4C..7C 11R..8R 12M..9M N1/304

28..211 08..11 9D..12D 8X..BX 10C..13C 7R..4R 8M..5M N2/308 B1/408


UB1/508

212..215 12..15 13D..16D CX..FX 14C..17C 3R..0R 4M..1M N3/30C

216..219 16..19 17D..20D 10X..13X 20C..23C N4/310 B2/410


UB2/510 S1/610
US1/710

220..223 20..23 21D..24D 14X..17X 24C..27C not not N5/314


24
2 ..2 27 24..27 25D..28D 18X..1BX 30C..33C applicable applicable N6/318 B3/418
UB3/518

228..231 28..31 29D..32D 1CX..1FX 34C..37C N7/31C

Because data is converted to the format of the external device (Intel or Motorola) by the Write
Mode, only the address from offset [2], the size and position from offset [3], as well as the
value from offset [4...] is required for decoding. That is, the data type, sign, format or tag size
can be neglected unless message strings of variable length will be decoded.

FactoryLink Device Interfaces - OPC and Other Guide / 149


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Intel <=> Motorola Format and Composite Object



I NTEL <=> M OTOROLA F ORMAT AND C OMPOSITE O BJECT
Two or more Object I/O Tags using the same specific Read/Input (Alternate Read Tag or Elem
Addr) are considered a Composite Object if entered as a coherent block of lines. In this case, a
particular I/O Tag may directly influence its adjacent Object I/Os, similar to a PLC where a
changed Bit influences its residing Byte or Word, etc. However, this ECI internal I/O
processing is done only from lower towards higher ranking data in Composite Objects. For
example, a Bit is inserted in its corresponding Nibble, Byte, Short, etc. or a Byte is inserted in
its corresponding Short and Long integer, and so on, but the opposite is not true. This can be
used to assemble data.

PLC Memory INTEL Format MOTOROLA Format


Tag Address Low value on first Address High value on first Address

B# S# L# Byte Short Long Integer Byte Short Long Integer


Byte Short Long (Byte) (Word) (DoubleWord) (Byte) (Word) (DoubleWord)

B0 S0 L0 0 0 0 low 0 8 24 hig

1 N0 1 N0 1 N0 1 N0 9 N2 25 N6
2 2 2 2 10 26
3 3 B0 3 B0 3 11 B1 27 B3
4 4 4 4 12 28
5 N1 5 N1 5 N1 5 N1 13 N3 29 N7
6 6 6 6 14 30
7 7 7 S0 7 15 31 S1
B1 0 8 8 0 0 16
1 N0 9 N2 9 N2 1 N0 1 N0 17 N4
2 10 10 2 2 18
3 11 B1 11 B1 3 3 B0 19 B2
4 12 12 4 4 20
5 N1 13 N3 13 N3 5 N1 5 N1 21 N5
6 14 14 6 6 22
7 15 15 7 7 23
B2 S1 0 0 16 hig 0 8 8 low

150 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Intel <=> Motorola Format and Composite Object

1 N0 1 N0 17 N4 1 N0 9 N2 9 N2
2 2 18 2 10 10
3 3 B0 19 B2 3 11 B1 11 B1
4 4 20 4 12 12
5 N1 5 N1 21 N5 5 N1 13 N3 13 N3
6 6 22 6 14 14
7 7 23 S1 7 15 15 S0
B3 0 8 24 0 0 0
1 N0 9 N2 25 N6 1 N0 1 N0 1 N0
2 10 26 2 2 2
3 11 B1 27 B3 3 3 B0 3 B0
4 12 28 4 4 4
5 N1 13 N3 29 N7 5 N1 5 N1 5 N1
6 14 30 6 6 6
7 15 31 7 7 7
B4 S2 L1

0 = Least Significant Bit (LSB, Weight=20) l DIGITAL

# = Bit #=1..31 (Weight=21..231) l DIGITAL

N# = Nibble #=0..3 of low word, #=4..7 of high word (4-Bit) l ANALOG

B# = Byte #=0..1 of low word, #=2..3 of high word (8-Bit) l ANALOG

S# = Short #=0 low word, #=1 high word (16-Bit) l ANALOG

L# = Long (32-Bit) l LONGANA

l Corresponding FactoryLink Data Type

FactoryLink Device Interfaces - OPC and Other Guide / 151


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Dataset Layout for Timestamps



D ATASET L AYOUT FOR T IMESTAMPS
OPC-Specific Dataset for Quality, Access Rights and Timestamp

If needed, use .UTF or UTFO to convert UTC to Float; use TIMF, TIXF, TIHF, TIDF, and
UTCF to extract information from UTCFloat.

Default Dataset of User-Specified Timestamps

152 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Dataset Layout for Timestamps

Sample Dataset Layouts of User-Specified Timestamps

ECI Object Information table for above sample SIMATIC-S7 PLCClock/Calendar, starting
at byte address 70:

Note: Use Program Argument -DATE=... to modify the ISO 8601 standard output format
YYYY-MM-DD; for example: -DATE=MM/DD/YY

FactoryLink Device Interfaces - OPC and Other Guide / 153


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Dataset or OPC Group Write Procedures



D ATASET OR OPC G ROUP W RITE P ROCEDURES
The figure below illustrates the possible write procedures for a particular ECI Information
table specified in the appropriate columns of the ECI Control table. A write command can be
specified to be released either by a Trigger (grey) and/or at Change (black) of any Object I/O
in that table. Note that Encoded Array data is decoded externally in the PLC (indirect
addressing). For OPC specific tables, only Dataset or eXception Write procedures are possible:

Examples using both Dataset Trigger and Object I/O Change for write control:

154 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Dataflow PLC <=> RAPD/OPC <=> ECI <=> Database

D ATAFLOW PLC <=> RAPD/OPC <=> ECI <=> D ATABASE

FactoryLink Device Interfaces - OPC and Other Guide / 155


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for Standard Drivers



S AMPLE TABLES FOR S TANDARD D RIVERS
Link Supervision by Function Alive (Watchdog)

ECI Information Table using the Read Tag or OPC Item for a regular Read-Only test. The
value of tag AliveSignal must change at least every 10 seconds, else a "Transmission ERROR"
is indicated by a value of ≥ 256 in I/O Status Watch_ReadOnly:

ECI Information Table using a Dataset Tag of a RAPD driver for a regular Read/Write
supervision. The value of Object I/O HeardBeat_ReadWrite is automatically changed at a
third of the time specified by Alive=30. That is, the value will be written periodically to Tag 67
in the external device (PLC). If the value is not sent back within 30 seconds, then a
"Transmission ERROR" is indicated by a value of ≥ 256 in I/O Status Watch_ReadWrite:

Note: You can apply the corresponding configurations for any EDI, RAPD or OPC
Data eXchange driver. Function Alive=xx may be controlled/suspended by Functions
RdDisabl, WrDisabl, and Mux=xx.

156 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for Standard Drivers

Allen-Bradley RSLinx Driver


The ECI Information Table for Object STAT1_OBJ24 below uses words 100..199 as a Read
Dataset and words 200..229 as a Write Dataset specified AB-RSLinx Driver tables. All data is
converted by 5 line entries. Word 100 is a Composite Object, Words 101..199 represent arrays
of 29 words and 35 doublewords:

The following are sample Allen-Bradley RSLinx Driver tables showing the entries for object
STAT1_OBJ24 to read Integer N47:100 for 100 words and write Integer N47:200 for 30
words:

FactoryLink Device Interfaces - OPC and Other Guide / 157


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for Standard Drivers



Data may be read by triggering the Read Dataset IdxTag. This can be done automatically by
setting a Read Interv Ch/Cont (interval after change and/or continuous). For bidirectional
communication, it is recommended that you set the Read Update Delay.
Note: For a redundant setup, rename the Mailboxes in the driver tables, using VRN.
For example, EciRmbx+EciWmbx–>
DrvRmbx+DrvWmbx, and then follow the instructions in “Dataset Exchange in
Redundant System with VRN” on page 171.

Modbus Ethernet Driver


The ECI Information Table for Object MOD1_OBJ4 below uses register words 1000..1019
as a Read and/or Write Dataset specified in the Modbus Ethernet Driver tables. All data is
converted by 5 line entries. Register 1000 is considered a Composite Object. Register 1001 is a
bidirectional scaled value and register 1002..1019 represents an array of 9 Float values with
bidirectional access:

158 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for Standard Drivers

The following are sample Modbus Ethernet Driver tables showing object MODI_OBJ4 to
read and/or write from/to HighRegister 1000 for a length of 20 words:

For Bit, Nibble and Byte access use Function Merge or Encoded Write. Using Exception Write
to insert Bits to a Register may cause to first read the Register before writing (including the
Bit). If Bit addresses are swapped, you may apply the WrCDE for reversed Bits. Data may be
read by triggering the Read Dataset IdxTag. This can be done automatically by setting a Read
Interv Ch/Cont (interval after change and/or continuous). For bidirectional communication, set
the Read Update Delay.
Note: For a redundant setup, rename the Mailboxes in the driver tables using VRN,
for example, EciRmbx+EciWmbx DrvRmbx+DrvWmbx and follow the instructions
in “Dataset Exchange in Redundant System with VRN” on page 171.

FactoryLink Device Interfaces - OPC and Other Guide / 159


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for Standard Drivers



Saia S-BUS Driver
The ECI Information Table for Object STAT3_OBJ5 below uses 32-Bit Registers
2140..2200 as a Read and/or Write Dataset specified in the SBD Saia S-BUS Driver tables. All
data is converted by 5 line entries. Register 2140 is considered a Composite Object. Registers
2141..2200 represent a Float array of 60 tags with Read/Write access:

The following are sample Saia S-BUS Driver tables showing object STAT1_OBJ5 to
Read/Write Registers as from address 2140 for 61 registers with Read Priority 3:

Note that the Saia S-BUS Driver is supplied with the SAIA PCD Communication Library,
which handles both the S-BUS and/or the P800 Protocol.
For Bit, Nibble and Byte access use Function Merge or Encoded Write. Using Exception Write
to insert Bits to a Register may cause to first read the Register before writing (including the
Bit). If Bit addresses are swapped, you may apply the WrCDE for reversed Bits. Data may be
read by triggering the Read Dataset IdxTag. This can be done automatically by setting a Read
Interv Ch/Cont (interval after change and/or continuous). For bidirectional communication, set
the Read Update Delay.
Note: For a redundant setup, follow the instructions in “Dataset Exchange in
Redundant System with VRN” on page 171 using VRN.

160 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for Standard Drivers

Siemens Sinec-H1 Driver


The ECI Information Table for Object SIM1_OBJ24 uses words 50..135 as a Read Dataset
and words 250..255 as a Write Dataset specified in the Sinec-H1 Driver. Word 50 is a
Composite Object of which Nibble0 triggers bit 0 or 1 of word 250 if set to 7 or 9. Words
51..55 represent a Message of 10 characters with Read/Write access, Words 56..135 represent a
Float Array of 40 tags:

The following are sample Sinec-H1 Driver tables showing object SIM1_OBJ24 to read
DataBlock 27 as from word 50 for 86 words and write DataBlock 31 as from word 255 for 6
words:

For Bit, Nibble and Byte access use Function Merge or Encoded Write. Using Exception Write
to insert Bits to a Word may cause to first read the Word before writing (including the Bit). If
Bit addresses are swapped, you may apply the WrCDE for reversed Bits. Data may be read by
triggering the Read Dataset IdxTag. This can be done automatically by setting a Read Interv

FactoryLink Device Interfaces - OPC and Other Guide / 161


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for Standard Drivers



Ch/Cont (interval after change and/or continuous). For bidirectional communication, set the
Read Update Delay.
Note: For a redundant setup, rename the Mailboxes in the driver tables using VRN,
for example, EciRmbx+EciWmbx DrvRmbx+DrvWmbx and follow the instructions
in “Dataset Exchange in Redundant System with VRN” on page 171.

Siemens SIMATIC S7-Protocol Driver


The ECI Information Table for Object SIM1_OBJ24 below uses bytes 200..399 as a Read
Dataset and bytes 400..459 as a Write Dataset specified in the S7D Siemens SIMATIC
S7-Protocol Driver tables. All data is converted by 5 line entries. Word 200 is considered a
Composite Object with bit access for read and write. Words 202..399 represent arrays of 29
words and 20 doublewords respectively:

The following are sample S7D Siemens SIMATIC S7-Protocol Driver tables showing object
SIM1_OBJ24 to Read DataBlock 47 Word 200 for 100 words and Write DataBlock 47 Word
400 for 30 words:

Note that the S7D Driver requires the Siemens SOFTNET-S7 Library for Industrial Ethernet
and/or MPI/PROFIBUS and possible PC boards as supplied by Siemens. A standard 3COM

162 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for Standard Drivers

Ethernet Board may be used if applying Industrial Ethernet with TCP/IP. Bits can directly be
accessed for areas DB##,B#, DI##,B#, MB# and OB# within a byte boundary as shown above.
For Bit, Nibble and Byte access you may use Function Merge or Encoded Write. Data may be
read by specifying a Continuous Trigger Tag or by triggering the Read Dataset IdxTag. This
can be done automatically by setting a Read Interv Ch/Cont (interval after change and/or
continuous). For bidirectional communication, set the Read Update Delay.
Note: For a redundant setup, follow the instructions in “Dataset Exchange in
Redundant System with VRN” on page 171, using VRN.

FactoryLink Device Interfaces - OPC and Other Guide / 163


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for OPC Data eXchange with ODX



S AMPLE TABLES FOR OPC D ATA E X CHANGE WITH ODX

Emulation of RAPD and EDI Drivers

In this case, OPC Items are specified in ODX and referenced in ECI by simply entering a PLC
address to the Elem Addr columns as for any RAPD Driver. The only rule is that OPC Items
forming a Dataset must have identical names, which include the Tag address at a particular
location within the name.
The idea is to specify intelligible item names that correspond with the origin PLC addresses,
for example D4_x120, D4_x121, D4_x122 and so on. That is, the item names are defined by
expression D4_x{##} where {##} is the Tag address and D4_x is any text. Note that you must
adjust the ECI Rd and Wr Mode to correspond with the addressing of the external device. If the
OPC Server supports block data exchange by array items then no naming convention is
required and you may simply enter an array item name as for example D4.
Note: This method keeps PLC addressing transparent throughout communication and,
with ECI virtually no configuration changes are required when replacing an existing
RAPD Driver.

164 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for OPC Data eXchange with ODX

Note that ODX requires an OPC Server on the local PC to run COM or an ordinary 3COM
Ethernet Board to run DCOM with any remote OPC Server.
For Bit, Nibble and Byte access, use Function Merge or Encoded Write. Data may be read by
triggering the Read Dataset IdxTag or unsolicited if setting the Read Prio OnChange. The read
interval is automatically taken from the Read Interv Ch/Cont (interval after change and/or
continuous). For bidirectional communication, set the Read Update Delay.
Note: For a redundant setup, follow the instructions in “Dataset Exchange in
Redundant System with VRN” on page 171 using VRN.

FactoryLink Device Interfaces - OPC and Other Guide / 165


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Tables for OPC Data eXchange with ODX



OPC-Specific Configuration Tables

In this case, OPC Items are specified in ECI while Datasets are automatically created. This
method accepts any OPC Item naming and additionally supports the following standard OPC
Attributes:

Rd CDE Conversion Codes for Standard OPC Attributes (for detailed info see Read Code CDE)

166 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Tables for OPC Data eXchange with ODX

.UTC Timestamp Native, Universal Time Coordinated, FileTime format not for display unconverted to Double
FactoryLink SecTime [s] as from 1980-01-01 and/or Milliseconds [ms] decoded to LongAna or Analog for
.TIM/.TIX [ms]
HourTime “hh:mm:ss.xxx” or DateTime ISO 8601 “YYYY-MM-DD hh:mm:ss.xxx” [ms] decoded to
.TIH/.TID Message

.QA/.QX Quality Native (QQ=Quality, SSSS=Status, LL=Limit Flags) 0..255 and Quality Vendor Specific 0..255
.QS/.QL Quality Status 0..15=Bad, 16..31=Uncertain, 48..63=Ok and Quality Limit 0=Ok, 1=Low, 2=High,
3=Constant

.AR/.AX Access Rights Native 0=None, 1=Read, 2=Write, 3=Rd/Wr and Access Rights Vendor Specific 0..65535

For Bit, Nibble and Byte access, use Function Merge or Encoded Write. Data may be read by
triggering the Read Dataset IdxTag or unsolicited if setting the Read Prio OnChange. The read
interval is automatically taken from the Read Interv Ch/Cont (interval after change and/or
continuous). For bidirectional communication, set the Read Update Delay.
Note: For a redundant setup, follow the instructions in “Dataset Exchange in
Redundant System with VRN” on page 171 using VRN.

FactoryLink Device Interfaces - OPC and Other Guide / 167


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Application Translation IOX –>ECI



S AMPLE A PPLICATION TRANSLATION IOX –>ECI
Sample ECI showing the same Table XXX as I/O Translator/Decoder

For Bit, Nibble and Byte access, use Function Merge or Encoded Write. Using Exception
Write to insert Bits to a Word may cause to first read the Word before writing (including the
Bit). If Bit addresses are swapped, you may apply the WrCDE for reversed Bits. Data may be
read by triggering the Read Dataset IdxTag. This can be done automatically by setting a Read
Interv Ch/Cont (interval after change and/or continuous). For bidirectional communication, set
the Read Update Delay.

168 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Sample Application Translation IOX –>ECI

IOX Conversion Code -> ECI Rd/Wr Code


IOX Conv ECI CDE Optional ECI Bit addressing Comments
(independent on external device)
BIT Binary Octal HexaDec Decimal Modicon Bool ** DIGITAL, for <Bit># see “Bit or Length”
Column

<Bit> 0 0/LSB 0C/LSB 0X/LSB n/a n/a Hints and Tips for Translation from IOX to ECI
<Bit> 1 1 1C 1X 1D/LSB 1M ♦ IOX Max MSG column information is not
<Bit> 2 2 2C 2X 2D 2M
required.
<Bit> 3 3 3C 3X 3D 3M
Use ECI Write Interval to prevent queue over-
<Bit> 4 4 4C 4X 4D 4M
flow.
<Bit> 5 5 5C 5X 5D 5M
<Bit> 6 6 6C 6X 6D 6M ♦ IOX enCoded Write is not supported by all driv-
<Bit> 7 7 7C 7X 7D 7M ers.
<Bit> 8 8 10C 8X 8D 8M Use ECI eXception Write and Merge Function
<Bit> 9 9 11C 9X 9D 9M to form Write tags or use ECI Encoded Write.
<Bit> 10 10 12C AX 10D 10M Note that using the driver to insert Bits to a Word
<Bit> 11 11 13C BX 11D 11M may cause the driver to first read the Word
<Bit> 12 12 14C CX 12D 12M before writing (including the Bit). If Bit addresses
<Bit> 13 13 15C DX 13D 13M are swapped, you may apply the ECI WrCDE for
<Bit> 14 14 16C EX 14D 14M reversed Bits.
<Bit> 15 15 17C FX 15D 15M ♦ IOX relative addressing (IOX Abs=N) depends
<Bit> 16 16 20C 10X 16D 16M/LSB on the driver and is supported by other means in
<Bit> 17 17 21C 11X 17D | ECI.
<Bit> 18 18 22C 12X 18D | Use absolute - or ECI indirect addressing.
<Bit> 19 19 23C 13X 19D |
<Bit> 20 20 24C 14X 20D | ♦ IOX Status is supported by other means in ECI.
<Bit> 21 21 25C 15X 21D | Use ECI Functions as desired.
<Bit> 22 22 26C 16X 22D | ♦ Use bidirectional communication and substitute
<Bit> 23 23 27C 17X 23D n/a the Timer by ECI Read Interv Ch/Cont for
<Bit> 24 24 30C 18X 24D | fast/slow transmission (automatic polling or
<Bit> 25 25 31C 19X 25D | cyclic read).
<Bit> 26 26 32C 1AX 26D |
<Bit> 27 27 33C 1BX 27D |
♦ Adjust the ECI Wr Mode to suit the external sys-
<Bit> 28 28 34C 1CX 28D | tems data tag size (Boundary)
<Bit> 29 29 35C 1DX 29D | ♦ note that ECI Read/Write Dataset IdxTags can
<Bit> 30 30 36C 1EX 30D | substitute the IOX Read and Write Triggers, in
<Bit> 31 31 37C 1FX 31D this case, use independent tags for read and
<Bit> 32 n/a n/a n/a 32D write
♦ standardize as much as possible ‡ use OPC
Servers with ODX for external bus systems like
CAN, LON, BacNet, Fieldbus, Interbus, Modbus,
Profibus.
Note that ECI supports many additional functions
including the setup for a
redundant system.

FactoryLink Device Interfaces - OPC and Other Guide / 169


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Sample Application Translation IOX –>ECI


BYTE* B0/I1 Signed Low Byte/Character –128..127


BR* UB0 Byte RIGHT = Unsigned Low Byte 0..255
BL* UB1 Byte LEFT = Unsigned High Byte 0..255
WORD* S0/I2 Word = Signed Short Integer –32768..32767=±215 **ANALOG
IBG (S0/I2) Interbus-S Gain for Analog I/Os – use OPC Server with standard I2 and ODX
IBAU (S0/I2) Interbus-S Ana I/O 12 bit Unsigned – use OPC Server with standard I2 and ODX
IBAS (S0/I2) Interbus-S Ana I/O 12 bit Signed – use OPC Server with standard I2 and ODX
LONG* L0/I4 Signed Long Integer ±2.1*109=±231 **LONGANA
RLNG* L0R Reversed Long (byte swapped)
IEEE* F0 IEEE Single Precision Float ±3.4*1038
RFLT* F0R IEEE Reversed Float (byte swapped)
DBL* D0 IEEE Double Precision Float ±1.7*10308 **FLOAT
SIE* FSIE/G0 Siemens Float/Gleitpunkt ±1.7*1038
FDAM (F0) Valmet Damatic Float ±2.0 ‡ use OPC Server with standard IEEE Float and ODX
BCD2 (UBC3) 2-Digit Unsigned BCD for Byte 0..99 ‡ double lines in ECI: first extract UB0 then convert by
UBC3
BCD/BCD4* UBC4 4-Digit Unsigned BCD for Word 0..9’999
BCD8* UBC8 8-Digit Unsigned BCD for Long 0..99’999’999
MSG* MSG Character String, consider IOX “Bit or Length” column and apply ECI Function LN##,
**MESSAGE
TIME (TIM0) C-Time 1970-01-01 to SecTime 1980-01-01 – use standard Filetime format or OPC Server
and ODX
TIM0..TIM9* TIM1..3 User-defined time, specified of up to 8 bytes by Program Arguments

Legend: * Codes also available in ECI; (..) requires special conversion; ** denotes
FactoryLink equivalent type.

170 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Dataset Exchange in Redundant System with VRN

D ATASET E XCHANGE IN R EDUNDANT S YSTEM WITH VRN


Assign the same VRN Connect Control Table a Tandem and a Local link to exchange
Datasets through mailboxes between redundant system NodeA and NodeB as shown below.
Note that ECI and Driver use separate mailboxes, which are linked according to the actual
Tandem Status. The Tandem Status can be used to start/stop the local Driver if assigned to its
TASKSTART_S[x] tag of the System Configuration:

S7D ECI Object Reference Table for Communication Object *SIM1_OBJ44, which is
transmitted in a redundant system to the Local and/or Partner station through VRN:

If you do not want to control the driver by the VRN Tandem Status, replace above
TASKSTART_S[x] tag by a unique tag. In any case, VRN must be run for data exchange
between ECI and driver while the mailboxes of ECI (EciRmbx/EciWmbx) and driver
(DrvRmbx/DrvWmbx) must be different.

FactoryLink Device Interfaces - OPC and Other Guide / 171


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Data Embedding and Function Merge



This setup is identical for all ECI-based RAPD as SBD, S7D and ODX. For OPC-specific
tables, you can omit the Rd/Wr Ds Idx. However, make sure the ECI/OPC Control tables are
the same on either system.
For other RAPD, such as AB-RSLinx, Modbus or Sinec-H1, rename the Mailboxes in the
driver tables to DrvRmbx/DrvWmbx and make sure the two applications are identical using
FLSAVE FLRESTORE (same tag index for Datasets).

D ATA E MBEDDING AND F UNCTION M ERGE


This sample ECI Information Table illustrates how ECI can be used to assemble or merge
data. Object I/Os having the same specific Read/Input are considered a Composite Object. In
this case, ECI will internally process Object I/Os similar to a PLC where a Bit is part of its
residing Byte or Word, etc. However, this ECI internal I/O processing is done only from lower
towards higher ranking data. For example, a Bit is inserted in its corresponding Nibble, Byte,
Short, etc. or a Byte is inserted in its corresponding Short and Long integer, etc. but the
opposite is not true. In the example below, Bit_0..Bit_7 data will be inserted to Byte_of_Bits.
Because this tag is also fed back to the Composite Object’s input, changed bit information will
be retained. And, as with a PLC, you can read/write any bit as well as its residing byte.

Although no Write/Output has been specified, Bit_0..Bit_7 are automatically watched for
changes to update the Byte_of_Bits. If a Bit will not be inserted in Byte_of_Bits, apply the Link
Function to specify that particular Bit to be Read Only. If you want to send merged data to a
Write/Output, then apply the Merge Function as described below.
In the following example, data of a Merged_Byte is sent through a RAPD Driver to PLC Addr
155 and fed back from there as the Composite Object’s input. In this case, the Merge Function
must be applied to transmit data to the appropriate Write/Output. Note that without the Merge

172 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Data Embedding and Function Merge

Function, a Write/Output would only be released if the Object I/O of the particular line has
been changed by a task other than ECI.

FactoryLink Device Interfaces - OPC and Other Guide / 173


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Write/Output Triggering by Function TRxxx=vvv



W RITE /O UTPUT TRIGGERING BY F UNCTION TR XXX = VVV
This ECI Information table shows four different applications using Trigger Functions:

1 Scaled_IO is extracted from Tag 157 and has an external range of 400..2000 (indicating
4..20mA). The scaled I/O range is not shown. The Link Function keeps the change status for
Read Only values to be used on the next line: ChangTrig is forced ON whenever Scaled_IO
changes.
2 Toggle is extracted from the OnOff feedback and causes, if changed by a task other than ECI,
the triggers Commd_Off or Commd_On for pulse control according to the Toggle’s state. The
commands are conducted to an external device of which OnOff state is fed back. Note that the
circuit may still be considered a Dual Ported RAM, although the read and write addresses are
different.
3 Similar to 2, a selector switch may be configured with a single Analog I/O Tag Select-SW to
provide multiple triggers Commd_Off/1/3/10/30/100 while the State of the selector switch is
fed back to indicate the true state of the plant. Important –set the Wr CDE for a bit, else a
TagArray of 16 Tags corresponding to Rd CDE=S0 would be written.
4 Similar to 3, Select-SW is extracted from Tag 28 and HighByte B1 of Tag 59 is set to binary
values 1,2,4,8,16 or 32 depending on written I/O values Off=0,1,3,10,30 or 100. The circuit
may be used to enumerate particular values, and it can still be considered a Dual Ported RAM
using a single I/O Tag while the Read and Write data is completely different from non-linear
data.

174 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Write/Output Triggering by Function TRxxx=vvv

FactoryLink Device Interfaces - OPC and Other Guide / 175


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Array Handling by Function ARYnnn:x:y:z



A RRAY H ANDLING BY F UNCTION ARY NNN : X : Y : Z
NNN=Nr. of I/O Tags, X=Read Elem increment, Y=I/Os per Read Elem, Z=Write Elem
increment
Sample entry to extract 72 Bits total, 3 Bits 02, 03 and 04 from every Second Tag for Tags
#101,103..147

Sample entry to read 128 scaled HiBytes B1 and write to 128 LoBytes B0 of Tags #100..227

Sample entry to read 64 even Tags HiByte B1 and write to 64 odd Tags Short Integer S0

176 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Statistical Functions XR, XP, XF, XT, XA, XS

Sample entry to read 64 Low Nibbles N0 and if value changes to 15, trigger Bit 00 of every
Second Tag

S TATISTICAL F UNCTIONS XR, XP, XF, XT, XA, XS


This table shows sample entries for an ECI Information table. Note that arbitrary TagNames
are entered to allow for a more comprehensible description. All TagNames may be specified as
required.

Note that scaling is allowed and valid for appropriate outputs. Read/Input information may be
taken from the Alternate Read Tag column or from a Mailbox Dataset by entering the Tag
Address. The Object I/O Tags are used to control or store statistical information. All statistical
results are displayed in the Alternate Write Tag column. Outputs to an Encoded Array or
Mailbox are not valid. Dip and Peak Timestamp Messages are shown for information only
(Copy is not a statistical Function). For conversion of older applications see Program
Argument -TagOnlyStatistics.

FactoryLink Device Interfaces - OPC and Other Guide / 177


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Statistical Functions XR, XP, XF, XT, XA, XS


178 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Summary

S UMMARY

OPC Data Translation => Method: RAPD/EDI and OPC Specific

OPC-Specific Table Overview


OPC-specific tables support the ODX OPC Data eXchange driver shown in “Sample Tables
for OPC Data eXchange with ODX” on page 164. The tables are a subset of the ECI tables
shown below. Some entries of the tables as Rd/Wr DsIdx, Mode and Elem Addr are
automatically created. Other entries, such as Read/Write Dataset IdxTag and Wr Enc Addr, are
not useful for this setup, while the I/O Scale Min/Max are merged to become Tag/Constant
columns:

For the sample ECI/OPC Control table above, data is read at a cycle of 0.7 sec whenever an I/O
has been changed while the appropriate I/O is only updated after 3 seconds if a possible

FactoryLink Device Interfaces - OPC and Other Guide / 179


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Summary



feedback is different from the changed value. Changed values are transmitted at an interval of
0.5 seconds to the ODX driver, and if no I/Os are changed, data is read at a cycle of 12 sec
only. The second table (with an asterisk) is a dummy entry to identify separate Mailboxes for
the ODX driver in a redundant system as discussed in “Dataset Exchange in Redundant System
with VRN” on page 171. For an explanation of the Information table, see the appropriate
column description or the summary below.

Control Table Summary


The following are definitions of the columns in the Control Table:
Object Table Name of the object information table; sole reference for ECI-based RAPD
and ODX (no other references required).
Read Name of mailbox owned by ECI; also called Decoder or I/O Translator
MailboxTag Mailbox referenced by non-ECI-based RAPD.
ReadDs Read Dataset Identifier Tag (D); also called Control Tag. Acts as both Read
IdxTag Dataset Identifier and Dataset Block Read Trigger. This tag is referenced by
non-ECI-based RAPD.
Rd Idx Identifier for Read Dataset; replaces Read IdxTag as identifier for network
transfer (-1=none).
Rd Mode Read Mode for Alternate Read TagArray assembling:
L=low byte/value first (Intel), H=High byte/value first (Motorola)
You may force the tag size (Boundary) for Datasets of RAPD Drivers. For
ODX, an entry L# is required (OPC-specivid talber are fixed L4M): L# or
H# includes Tag Size: #=0 for bit or 1,2,4 for bytes.
Prefix A=Address.
Prefix I=Index Number in first 4 bytes of Dataset (ULong).
Prefix X=Swap Dataset IMX Header.
Suffix M=Mailbox read request; requires (dummy) Write Dataset IdxTag or
Wr Ds Idx.
Interv Read/Input Interval in seconds xxx/yyy.
Ch/Cont xxx=interval after I/O change 0.1...999 seconds (0=instant).
yyy=continuous interval 0.1...999 seconds (option).
Update Delay I/O Read Update Delay 0.1...999 seconds (0=instant) after I/O. Change with
Write Command (at least twice Write Interval).
WriteEncArr Name of mailbox owned by receiving task as for RAPD or ODX. A
MailboxTag TagArray (A) is assigned to process Encoded Write/Outputs by standard
EDI drivers using the Write IdxTag as a Block Write Trigger.
WriteDs Write Dataset Identifier Tag (D); also called Control Tag. Acts as both
IdxTag Dataset Identifier and Block Write Trigger. This tag is referenced by
non-ECI-based RAPD.
Wr Idx Identifier for Write Dataset; replaces IdxTag as identifier for network
transfer (-1=none).

180 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Summary

Wr Mode Write Mode (OPC specific = L4 fixed):


H=High byte first (Motorola).
L=Low byte first (Intel).
Suffix 0=Bit or 1,2,4-Byte Elem Size.
Suffix T=Test/Transfer (Wr=RD Mbx).
Wr Tr Write by Dataset Trigger:
N=No (default).
D=Dataset (entire).
B=Blocks (coherent), not OPC specific.
Wr Ch Write at I/O Change:
N=No. **Not for OPC specific.
X=Exception (default).
D=Dataset (entire).
B=Blocks (coherent).**
E=Encode all data.**
EB=Encode Bytes..Bits.**
EN=Encode Nibble..Bits.**
EE=Encode external method.**
V3=Encode legacy method.**
Enc Addr Encoded Write Addr (-1=none).
Write Command Interval 0.1..999 sec (0=instant).
Interval

Information Table Summary


The following are definitions of the columns in the Information Table:
Read Tag, Read Tag only valid if Read Elem Addr -1(D,A,L,F) or OPC Item if
‘OPC Item preceded by a single quote.
Elem Addr Read/Input Tag Address for DataWord or Register of External Device
(default -1=none).
Rd CDE Read/Input Code ( alternative codes)
Bits=BOOL LSB (default), 0..31 (bin)
1D..32D (dec), 0X..1FX (hex)
OR..15R (bit-reversed address in word),
Nibbles=NO..N7 (four-bit value 0..15)
Bytes=I1 BO..B3,UI1 UB0..UB3
Short=I2 SO, S1, UI2 US0, US1
ShortBCD=BCD3, UBC3, UBC4
Long=I4 L0, UI4 UL0, L0R (swapped)
LongBCD=BCD7, UBC7, UBC8
Float=R4 F0 (IEEE), FOR (swapped)
FSIE G0 (Siemens Gleitpunkt)
FMOT (Motorola Fast Float)
Real/Double=R8 D0 (64Bit IEEE)

FactoryLink Device Interfaces - OPC and Other Guide / 181


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Summary



String=MSG, MSG1/2, MSR (Message, Function LNnnn ECaaa)
SecTime=TIM$ [s] (LongAna)
Thousandth=TIX$ [ms] (LongAna, Ana)
HourTime=TIH$ [ms] (Msg, LNn)
DateTime=TID$ [ms] (Msg, LNn)
UTCNative=UTC$ [0.1us] (Float, dump)
UTCFloat=UTF0 [0.1us] (UTC>Float)
Suffix $: 0=UTC input, F=UTCFloat input, or 1..3=specified by Prog.
Arguments
Quality Native .QA (Ana)
Quality Status .QS, Limit .QL (Ana)
Quality Vendor Specific .QX (Ana)
Access Rights Native .AR (Ana)
Access Vendor Specific .AX (Ana)
Object Bidirectional Object Input/Output Tag (D,A,L,F,M)
I/O Tag
Wr CDE Write/Output Code (default=RdCDE)
Elem Addr Write/Output Tag Addr (default -1=none)
Write Tag, Write Tag (D,A,L,F) or OPC item if preceded by a single quote.
‘OPC Item
R/W Range Read/Input and Write/Output Range = ±3.4*1038Min ; ±3.4*1038Max.
Function No entry=I/O Range equal R/W Range (default), formulas:
Object I/O=Read/Inputextracted * a + b,
Write/Output=(ObjectI/O - b) / a
where a=(I/OScaleMax - I/OScaleMin) / (R/WRangeMax -
R/WRangeMin)
... and b=I/OScaleMin - R/WRangeMin * a
Additional
Functions: Init I/O=Trigger: Initial Mbx Read Completion
IOChg I/O=Trigger: Any I/O Changed/Updated
IOChgRd I/O=Trigger: Any I/O Changed/Updated by
Read/Input
IOChgWr I/O=Trigger: Any I/O Changed for Write/Output
IOUpdHalt I/O=Control: “1”=Object I/O Update Halted
IOUpdAll All I/Os updated unconditionally at Mbx receive
IOUpd I/O updated unconditionally at Mbx receive
RdTrigg I/O=Trigger: Read Request through Write Mbx
RdCompl I/O=Trigger: Read Completion feedback
RdDisabl I/O=Control: “1”=Object I/O Read Disabled

182 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Summary

WrTrigg I/O=Trigger: Block or Dataset Write command


WrCompl I/O=Trigger: Write Completion feedback
WrDisabl I/O=Control: “1”=Object I/O Write Disabled
WrMode=x;y Write Mode x and IMX Version y as well as ...
WrType=z Write Type z in IMX protocol for certain RAPD
drivers
WrX Write output eXceptionally (not replaced in cmd
buffer)
SegmAddr=xx All Encoded commands include Segment Address
xx
Mux=xx I/O=Multiplexer: Enable Read/Write if I/O=xx
Ignore=xx I/O=Configuration: Ignore Table completely if
I/O=xx
Merge Write/Output=Merged Composite Object I/Os
Qual Display OPC Quality infomration by I/O Status Tag
Link I/O linked to other ECI Input or I/O (keep change
status)
Copy Write/Output=Read/Input if Object I/O changed
Enum Write/Output=Enumerated of Read Array,
I/O=ArrayIndex
TRxxx=vvv Write/Output=vvv Trigger if Object I/O = xxx
DBxx.xx Deadband for I/O, xx.xx=absolute value
LNnnn ECaaa I/O=Message of nnn=1..1024 char, aaa=end char
ASCII
HEXn I/O=Message of n char containing Hex Value
ARRYnnn:x:y:z I/O=Array of nnn Elem, x=Rdlncr, y=I/O/RdElem,
z=Wrincr
Alive=xx I/O=Link Supervision, xx=[s], I/O Status ≥
256=Ερρορ
XR I/O=Reset all Statistics of this table
XP, XPA I/O=Enable, WriteTag-Peak/Maximum (A=auto
init)
XD,XDA I/O=Enable, WriteTag=Dip/Minimum (A=auto init)
XFxx,XFAxx I/O=Interval, WriteTag=Filter Attenuation xx
(A=auto init)
XT I/O=SampleTrigg, WriteTag=Totalizer (sum of
samples)
XA I/O=#ofSamples, WriteTag=Average (arithmetic
mean)
XS I/O=xSquare, WriteTag=Sigma (standard deviation)

FactoryLink Device Interfaces - OPC and Other Guide / 183


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Summary



I/O Scale Min Scale lower and Scale upper limit, Constant or Tag (A,L,F), default:
I/O Scale MinTag No entry=0..1000 if R/W Range valid
I/O Scale Max Note that OPC-specific tables use two only Tag/Constant columns.
I/O Scale MaxTag
I/O Status 0=Normal/OK
Tag (D,A,L,F) 1=Transient
4= < Min Scale
8=Low OPC
16=High OPC
32=> Max Scale
64=Uncertain OPC
128=Bad OPC
256=Read Error

184 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Terms

TERMS
Communication Objects are defined as a set of input and/or output data (Alternate Tags or
RAPD Datasets) and are identified by a single line entry in the ECI Control table and its ECI
Information table.
Composite Objects are defined by two or more Object I/O Tags using the same specific
Read/Input (Read Tag, Tag Address or OPC Item) by a coherent block of line entries. In this
case, a particular Object I/O may directly influence adjacent Object I/Os, similar to a PLC
where a changed Bit influences its residing Byte or Word, that is, a Bit is inserted in its
corresponding Nibble, Byte, Short and so forth.
Object I/O Tags represent a Bit, a Nibble, a Byte or a number of Bytes as a bidirectional
interface for data transmitted from/to the external device. Read Cycle Update Delay and
Write Interval are transmission control parameters to specify performance and system load.
See also Tag Array Concept.
Read or Input data is transmitted from an external device through an (Alternate) Read Tag
for EDI, a Read Dataset for RAPD or an OPC Item for ODX. See also Indirect Addressing
with Unsolicited Read.
Write or Output data is transmitted to an external device through an (Alternate) Write Tag
or an Encoded Array for EDI, a Write Dataset for RAPD or an OPC Item for ODX. See also
Read and Write Procedures and Exception Encoded Write.
Datasets or OPC Groups represent logically organized data. For ECI, a Dataset simply is a
number of Tags forming a coherent block (binary dump) of data with contiguous addresses in
the external device. All access to OPC Items is by an OPC Group, which holds attributes for
read/write intervals, on change/polled or block/exception transmission, etc. Read and Write
groups may or may not be identical for a particular ECI Object. They are basically independent
on the external device even if reflected there.
Tags or OPC Items represent a Boolean/Flag, Integer/Word, Real/Float or Message/String,
etc. For OPC, associated with each item is a Value, Quality and Timestamp. Note that OPC
items are not the data source – they are just connections to them. They should be thought of as
symbolic addresses to the data. For ECI, a tag essentially is defined as a 1, 2, or 4-byte binary
value, which can be decoded as desired. All Tags in a particular Dataset have the same size
called Boundary of 1, 2, or 4 bytes.
EDI Drivers use single Tags or Arrays for ordinary Read/Write Tables. Tags are referenced
in Alternate Read and Write columns in the ECI Information table. ECI supports Block Read
(Interval Timer not required), Block Write (ECI provides a trigger whenever Object I/O data
has been changed for a particular table), Exception Write and Encoded Write (ECI supports
triggering).
RAPD Drivers use the IMX Intertask Mail eXchange protocol for the transmission of
Datasets through Mailboxes. ECI supports Block Read, Block Write, Exception and
Encoded Write procedures for the IMX interface as for EDI drivers described above. A
Mailbox is always owned by the receiving task. Thus, the owner of the Read Mailbox (also

FactoryLink Device Interfaces - OPC and Other Guide / 185


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Terms



called Decoder or I/O Translator Mailbox) is ECI, while, the owner of the Write Mailbox (also
called Protocol Driver Mailbox) is the RAPD Driver. A Dataset represents a number of data
Tags forming a coherent block of data in the external device. A Tag of a Dataset is defined as a
discrete bit or a 1, 2, or 4 byte binary value having a dedicated address in the external device.
OPC Server comprises several objects: the server itself (Database), the groups (Datasets) and
the items (Tags). The server is a vendor specific Real-Time Database, which serves as a
container for OPC Group objects. It is configured by vendor specific tools and is accessed by
(D)COM for local or remote data exchange. There are hundreds of OPC Servers available for
almost any PLC make or bus system, such as CAN, LON, BacNet, Fieldbus, Interbus,
Modbus, Profibus, etc.
OPC OLE for Process Control is a set of interfaces based on (D)COM (Distributed)
Component Object Model by Microsoft. (D)COM is used to communicate between ODX
acting as an OPC Client and one or more OPC Servers. COM is used if the server resides on
the local machine, DCOM uses an Ethernet board and TCP/IP to access a remote server. See
also OPC Foundation http://www.opcfoundation.org.
UTC OPC timestamps are Universal Time Coordinated (always increasing and unambiguous).
The native form is FileTime (8 byte Integer) beginning at 1601-01-01 00:00:00 with a
resolution of 0.1μs. If converted to a FactoryLink Float, its precision is 15 digits
(approximately 10μs in year 2001), which should be sufficient.

186 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Program Arguments

P ROGRAM A RGUMENTS
The arguments shown below may be directly entered in the Program Arguments column of the
System Configuration table. You may also reference a file to enter the parameters there. In this
case, the filename must be specified without a dash in the Program Arguments column. You
can apply environment variables using brackets {...} and pathnames as required, for example,
{flapp}\ECI_para.run. Note that a leading entry in the Program Arguments column will
overwrite a possible duplicate entry in the file.

Argument Description
-DRMbx=<#> Log read debug messages.
-DWMbx=<#> Log write debug messages.
-DQMbx=<#> Log query debug messages.
-DERMbx=<#> Log read Error messages. (#=1 to 3, default = 3, most
sensitive)
-LimitType=<A or B> Compute all I/O values without upper/lower limits, X = A
(default) or, limit all I/O values by ScaleMin/Max
boundary, X = B.
-InitUncertain Set the I/O Status Uncertain-Flag (value = 64) and hold the
Object I/Os until they are updated by the first valid Dataset
at initialization. (default=Object I/Os are set zero if
changed and no Dataset is received after the Update Delay.)
-InitWrite Write all Outputs if Object I/O Tag was changed at
initialization. (default=changes cleared without writing)
-DefaultMsgLength=<#> If ECI is the first task that writes to a message tag without a
configured length, it sets the max length to # char. (default
= 80)
-SleepTime=<#> Adjust process speed/CPU load by suspending program
(sleeping) every # scan. (default=100 in ms)
-Throttle=<#> Throttle non critical job processing by multiple # rates of
SleepTime (default=none):
-MaxJobs=<#> Max Number of jobs (1 to nnnn) done at a time at main
data processing (default=all). Note that this may cause a
message output in the FactoryLink system window “ECI
Info: MaxJobs=xxx reached“.

FactoryLink Device Interfaces - OPC and Other Guide / 187


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Program Arguments



A sample file is on the installation media and may look as follows:

# ECI_para.run Program Argument File


#
# This is a sample file showing valid program arguments for ECI. If you want ECI to read
# this file, insert the file's name together with its path to the Program Argument column of
# the System Configuration table. Please note that lines beginning with a number
# sign (#), an asterisk (*) or a space ( ) are considered comments, but arguments must
# begin with a dash (–) and may not have spaces. You can enable the desired arguments
# by removing the characters indicating a comment line.
#
# Dataset Structure and Format for Timestamp Messages
# Structures for RdCDE=TIM/TIH/TID1..3 specified by items Y/M/D/m/h/s/x with Byte
# Offset 0..7 and optional Suffix for format:
# -TIM1=Y0/M1/D2/h3/m4/s5/x6 Default YY/MM/DD/hh/mm/ss/xx, all items Byte Decimal
# -TIM2=x0B/s1B/m2B/h3B/D5B/M6B/Y7B Sample xx/ss/mm/hh/DD/MM/YY, all items 2-Digit
BCD
# -TIM3=Y0/D2M/h4m/s6t Sample YY/DDMM/hhmm/ssxx, using [ms] in byte 6+7
# Item: Date: Suffix to specify size and format of Items as follows:
# Y#+ YY no=Dec 0..99, B=BCD, L=Low byte of YYYY 188..255, M=YYMM 0..9912 (Valid
# years=1980..2047)
# M#+ MM no=Dec 1..12, B=BCD, Y=MMYY 100..1299, D=MMDD 101..1231
# D#+ DD no=Dec 1..31, B=BCD, M=DDMM 101..3112
# h#+ hh no=Dec 0..23 [h], B=BCD, m=hhmm 0..5959
# m#+ mm no=Dec 0..59 [min], B=BCD, s=mmss 0..5959
# s#+ ss no=Dec 0..59 [s], B=BCD, x=ssxx 0..5999 [0.01s], t=thousandth ssxxt 0..59999 [ms]
# x#+ xx no=Dec 0..99 [0.01s], B=BCD, t=thousandth xxt 0..999 [ms]
# ( Byte Offset # and optional Suffix +)
# Default Message outputs are: YYYY-MM-DD hh:mm:ss.xxx [ms], all SecTime outputs are limited
# to 2037 due to ANSI C mktime.
# Date Format in timestamp messages for RdCDE = TID0..TID3 and .TID, default=YYYY-MM-DD
# (ISO 8601):
# –DATE=YY-MM-DD
# Valid year formats are YY or YYYY, delimiters are {-}{/}{.} for example, America: MM/DD/YY,
# Europe: DD.MM.YYYY, and so forth.
#
# Arguments for General Purpose and Debugging
# (Note that Debug switches –D??? reduce performance due to disk access for logging.)
# Debug and log Mailbox Jobs to file {FLAPP}\SHARED\LOG\ECI.LOG for ...
# Read -DRMbx, Write -DWMbx, Query -DQMbx and Read Errors -DERMbx:
# –DRMbx
# –DWMbx
# –DQMbx
# –DERMbx
# Warning level #=1..3 to suppress Read Mailbox Errors, the greater the number, the more
# information is displayed (default=3, most sensitive):
# –WRMbx=3
#
# Compute all I/O values without upper/lower limits (default, -LimitType=A) or, limit all I/O values
# by ScaleMin/Max boundary (see also R/W Range / Function):

188 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Program Arguments

# –LimitType=B
#
# Set the I/O Status Uncertain-Flag (value ≥ 64) and hold the Object I/Os until they are updated by
# the first valid Dataset at initialization (default=Object I/Os are set zero if changed and no Dataset
# is received after the Update Delay):
# –InitUncertain
#
# Write all Outputs if Object I/O Tag was changed at initialization (default=changes cleared without
# writing):
# –InitWrite
#
# If ECI is the first task that writes to a message tag without a configured length, it sets the max
length to 80 char (default):
# –DefaultMsgLength=80
#
# ECI 7.00 and older versions only support Alternate Read Tags (or Read CDE=S0 for Datasets)
# for Statistical Functions. This legacy method can be reinstated by:
# –TagOnlyStatistics
#
# You can set the IMX protocol flags -WrMode=x;y and -WrType=z, required for certain RAPD
# drivers, where:
# x=1 reverse Bit direction, x=2 lowest ElemAddr=1, x=4 lowest BitAddr=1, or sum e.g. 5=1+4,
# y=1..9 IMX version and z=1 More flag, z=2 Host direction flag, z=4 Reserved or sum, for example:
# 3=1+2 (see also R/W
# Function). The default settings are:
# –WrMode=0;1
# –WrType=0
#
# Arguments for Tuning and Performance
# Caution! These arguments – if wrongly adjusted - may cause unpredictable results.
#
# Adjust process speed/CPU load by suspending program (sleeping) every scan
# (default=100 [ms]):
# –SleepTime=300
#
# Throttle non-critical job processing by multiple rates of SleepTime (default=none):
# –Throttle=2
#
# Max Number of jobs (1..nnnn) done simultaneously at main data processing (default=all). Note
# that this may cause a message output in the FactoryLink system window “ECI Info:
# MaxJobs=xxx reached“:
# –MaxJobs=500

FactoryLink Device Interfaces - OPC and Other Guide / 189


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Information and Error Messages



I NFORMATION AND E RROR M ESSAGES
The messages below may be displayed by the RunTime Manager during startup, runtime or
shutdown. Additional messages can be logged to file %flapp%\shared\log\ECI.log (where
%flapp% denotes the FactoryLink application directory). See Program Arguments for
debugging. The numbers preceding messages indicate the type of message: Warnings
(#001..#099), Failures (#100..#199) and Configuration Errors (#200..#299). The format
specifiers (%s, %d, %u, etc.) represent runtime values, %03d:%05d indicates a TagIndex and
Code=%d is an error number returned by the FactoryLink kernel (defined by PAK, file
FLDEFS.H):

Label in file ECI.TXT Information and Warning Messages (#001 – #099)


PROG_INACTIVE ECI normal shutdown
Information when task has been stopped normally.

PROG_RUNNING ECI running with %u Tags, %u Mbx Tags


Normal information when task is running. It indicates the total number of Tags and
Mailbox Tags to be watched in all Information tables.

PROG_STARTING ECI starting


Startup information.
PROG_REC_DAT_PROC Processing all Records for internal use
PROG_FILE_PROC Processing file “%s”
Normal information on startup of the task.

PROG_NO_JOB #001 Nothing to do: Normal shutdown


There is no configuration information to process.
ACE_INV_AUTHORIZATION #002 No Authorization: Shutdown by timeout
ECI is not authorized for unlimited run time.
ACE_DRV_NOT_INSTALLED #003 Driver not installed: Shutdown by timeout
A driver may not be installed; reinstall ECI.

ACE_RESTART_PREVENTED #005 Restart prevented: Shutdown FL first


You cannot restart ECI after a shutdown by timeout – you must stop FactoryLink
first.

FLOAT_VAL_WRONG #010 Invalid Float in assembled Read/Input


The assembled data does not represent a Float value.

ARY_MBX_WRITE_BUF_FULL #011 Object I/O causes Output Buffer overflow


Too many I/O Changes for set Update Delay and Write Interval (see ECI Control).
OBJ_IO_VAL_INV #012 Object I/O invalid user input: %s
You must enter a correct value, for example hexadecimal.

190 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Information and Error Messages

Label in file ECI.TXT Information and Warning Messages (#001 – #099)


SCAL_MIN_MAX_EQ #013 I/O Range zero: ScaleMin=ScaleMax=%lf
Scaled range turned or set to zero.
RCV_MBX_NOT_IN_RANGE #020 Table %s: Rd Mbx data range missmatch l
Data in Mailbox does not match configuration (suppress message with –
WRMbx=2).

RCV_MBX_ERROR #021 Table %s: Message from Driver: %d=0x%04X %s l


A message has been received from a RAPD or ODX driver (suppress message with
–WRMbx=1). For the message #, displayed in %d=decimal and
0x%04X=hexdecimal, refer to the driver guide.
RCV_MBX_NO_DSA_FOUND #022 Rd Dataset Idx %ld not found l

RCV_MBX_NO_DST_FOUND #023 Rd Dataset IdxTag %04hd:%04hd not found l


RAPD Driver may be configured erroneously (suppress messages with –
WRMbx=2).

RCV_MBX_ERR_DATALEN #024 Wrong “ErrorDataLength” in Mailbox %03d:%05d received %d l


Incorrect error message from RAPD Driver (suppress messages with -WRMbx=2).
E_FLCHANGEWAIT #030 FactoryLink Error while ChangeWait Code=%d
E_FLCOUNTMBX #031 FactoryLink Error RdCount Mbx Tag %03d:%05d Code=%d
E_FLS, ETC.HNGF #032 FactoryLink Database ChFlag Set Error Tag %03d:%05d Code=%d
E_FLCLEARCHNGF #033 FactoryLink Database ChFlag Clear Error Tag %03d:%05d Code=%d
E_FLREAD #034 FactoryLink Database Read Error Tag %03d:%05d Code=%d
E_FLREADAPPMBX #035 FactoryLink Database Read Error Mbx Tag %03d:%05d Code=%d
E_FLWRITE #036 FactoryLink Database Write Error Tag %03d:%05d Code=%d
E_FLMBXWRITE #037 FactoryLink Database Write Error Mbx Tag %03d:%05d Code=%d
E_FLQUERYMBX #038 FactoryLink Database Query Error Mbx Tag %03d:%05d Code=%d
An error occurred during accessing the FactoryLink Database. The indicated Tag
may not exist, or a Mailbox is duplicated and has two owners. Check configuration
or reindex the Database.

l These messages depend on the Warning Level #=1..3 (3=default) set by Program Argument –
WRMbx=# for the Read Mailbox to suppress frequently appearing warnings. The higher the message
number, the more information is displayed (see Program Arguments for debugging and tuning). For some
RAPD Drivers, it may be recommended to set –WRMbx=2 after commissioning.

FactoryLink Device Interfaces - OPC and Other Guide / 191


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Information and Error Messages


Label in file ECI.TXT Failure Shutdown Messages (#100 – #199)


NO_AUTHORIZATION #100 Option not installed or License not enabled

ACE_ERR_IN_INSTALLATION #101 Authorization EXE file may be corrupted


ACE_ERR_IN_KEYFILE #102 Authorization Key file may be corrupted

E_CT_GET_HDRLEN #110 Error Header Length File “%s” Len=%d

E_CT_GET_NCTS #111 Error File %s empty


E_CT_GET_NRECS #112 Error No Records in CT File “%s”

E_CT_GET_RECLEN #113 Error Record Length CT File “%s” Len=%d


E_CT_OPEN #114 Error Open CT File %s

E_CT_READ_HDR #115 Error Read Header CT File “%s”


E_CT_READ_INDEX #116 Error Read Index CT File “%s”
E_CT_READ_RECS #117 Error Read Records CT File “%s”
E_FLSETTAGLIST #118 DB Set Taglist Code=%d
PROG_CHILD_LOAD_ERR #120 Error loading child “%s”
PROG_INIT_FAIL #121 Task ID is invalid: %d
PROG_THREAD_START_ERR #122 Error starting thread
SYS_DCREATE_ERR #123 Cannot create Directory “%s”

SYS_FOPEN_ERR #124 File Open Error: File “%s”


An error has occurred during accessing the displayed data. Check the file and disk
on system level, or save the appropriate table again by the Configuration Explorer.
SYS_NO_MEMORY #130 Not enough System Memory.
The system requires more memory.

192 / FactoryLink Device Interfaces - OPC and Other Guide


ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3
Information and Error Messages

Label in file ECI.TXT Configuration Error Shutdown Messages (#200 – #299)


E_FOPEN_ARG #200 Program Argument or FileName “%s” invalid or empty line in file
For proper configuration, see Program Arguments.
ARY_INP/OUT_CDE_OVERFLOW #201 ARY parameter “IOs per Elem” too large
I/Os decoded cannot exceed Tag size.

W_INTERVAL_MISSING #202 Encoded Array requires Write Interval


W_ENC_ADDR_MISSING #203 Encoding requires Encoded Address

OUT_TAG_MISSING #204 Function %s requires Alternate Write Tag


R/F_FCT_VAL_MISSING #205 Function %s: Parameter value missing
R/F_VAL_TOO_BIG #206 Function column value: %d too large
R/F_VAL_TOO_LOW #207 Function column value: %d too small
INP_MISSING #208 Function requires Read/Input
FCT_XA_MISSING #209 Function XA must precede Function XS
FCT_XT_MISSING #210 Function XT must precede Function XA
R_CH_INTERVAL_INV #211 Invalid Value in Change Read Interval %s
R_CONT_INTERVAL_INV #212 Invalid Value in Continuous Rd Interval %s
R_UPDATEVAL_INV #213 Invalid Value in Update Delay %s
W_INTERVAL_INV #214 Invalid Value in Write Interval %s
MERGE_MISSING_IN_OUT #215 Merge Function requires Input and Output
CDE_MSG_LEN_MISSING #216 MSG Length required: Function LN1..LN1024
LINK_SUPPORT_NO_OUT #217 No Output supported for Link Function
OBJ_TAG_OUT_TAG_EQ #218 Object I/O same as Alternate Write Tag

OBJ_TAG_TYPE_WRONG #219 Object I/O Tag Type must be %s


PROG_PARA_UNKNOWN #220 Program parameter %s unknown

R/F_RANGE_MISSING #221 R/W Range required if Scale Tag specified


R/F_RANGE_MIN_MAX_EQ #222 R/W Range zero: RangeMin=RangeMax
R/F_RANGE_MAX_MISSING #223 RangeMax value missing, enter: MIN;MAX
R_CTRLTAG/LANID_MISSING #224 Read Mailbox requires IdxTag or Ds Idx

COMMON_TAG_MISMATCH #225 Read/Input Array address overlapping


OBJ_IO_MISSING #226 Statistics or One-Way requires Object I/O

FactoryLink Device Interfaces - OPC and Other Guide / 193


• 3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)
Information and Error Messages



Label in file ECI.TXT Configuration Error Shutdown Messages (#200 – #299)
R/F_FCT_UNKNOWN #227 Unknown R/W Range Function %s

R_UPDATE_LOWER_W_INTER #228 UpdateDelay must be > 2 WriteInterval


W_BLOCKTRIGTAG_MISSING #229 WrTrigger or WrIdxTag missing for Write by Trigger

W_CTRLTAG/LANID_MISSING #230 Write Mailbox requires IdxTag or Ds Idx

W_MBX_MISSING #231 Read/Write mode requires Mailbox


W_MBX/TAGARRAY_MISSING #232 Write mode requires Mailbox or TagArray
For proper configuration, see ECI Control and Information Tables.

In the table below, text displayed before the messages above indicates the table name and line
number of the erroneous data entry.

Label in file ECI.TXT Common Texts Added to Messages


CTLOAD_HDR_ERR %s Hdr: %s
CTLOAD_REC_ERR %s Line %d: %s
RUNTIM_REC_ERR %s Line %d: %s

194 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 4





FLGEM

O VERVIEW
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and one or more SEMI Host
Communication Standard (SECS) Protocol devices. FLGEM supports the SECS-I and SECS-II
serial RS-232 protocol as well as the HSMS TCP/IP protocol.

FLGEM P ORT D EFINITION TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Port Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Logical Port Represents a particular communication path to a FLGEM X 0 to 999
device. (default = 0)
SECS/HSMS Indicates which protocol to use for communication. X HSMS
SECS
Com Port Indicates COM port for SECS protocol X 1 to 8
Baud Rate Required for SECS X 150, 300,
1200, 2400,
4800, 9600
(default),
19200
T1 Timeout SECS T1 (inter character) timeout value in tenths of a X 1 to 255
0.1 sec second (default = 5)
T2 Timeout SECS T2 (block protocol) timeout value in tenths of a X 1 to 255
0.1 sec second (default = 30)
T3 Timeout 1 SECS T2 Reply timeout value in seconds X 1 to 120
sec (default = 10)

FactoryLink Device Interfaces - OPC and Other Guide / 195


• 4 | FLGEM
FLGEM Port Definition Table



Field Name Description Req. Valid Entry Valid Data Type
T4 Timeout 1 SECS T2 (inter block) timeout value in seconds X 1 to 120
sec (default = 10)
T5 Timeout 1 HSMS T5 Connect Separation Timer in seconds X 1 to 120
sec (default = 10)
T6 Timeout 1 HSMS T6 Control Message Reply timeout value in X 1 to 120
sec seconds (default = 20)
T7 Timeout 1 HSMS T7 Connect timeout value in seconds X 1 to 120
sec (default = 10)
T8 Timeout 1 HSMS T8 Inter Character timeout value in seconds X 1 to 120
sec (default = 10)

Retry Limit SECS retry limit. Required for SECS X 0 - 31


(default = 3)
ACTIVE/ Indicates whether this port is the active (Master) or X ACTIVE
PASSIVE passive (Slave) entity. Required for HSMS PASSIVE
HOST/ Indicates the communication role of this port X HOST
EQUIP EQUIP
Protocol Version of the protocol to be used X
Valid Entry explanation:
HSMS-SS94 for HSMS (default)
HSMS-94 for HSMS
HSMS93 for HSMS
SECS for SECS
Passive IP The IP Address for the Passive Entity on this link. X IP Address
Address Required for HSMS. format
TCP Port TCP Port Number at which the Passive Entity waits for X 0 to 10000
connection. Required for HSMS. (default =
5000)
Connection Time in seconds to wait to establish a connection. X 1 to 120
Estab 1 sec Required for HSMS. (default = 20)
Circuit Frequency in seconds at which control messages will be X 0 to 120
Assurance 1 sent to verify the link is still functional. Required for (default = 15)
sec HSMS.

196 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Port Definition Table

Field Name Description Req. Valid Entry Valid Data Type


TGRACE 1 Time in seconds during which send operations are X 1 to 120
sec accepted while attempting to establish a connection. (default = 10)
Required for HSMS.
Memory Stall Time limit in seconds to allow the other end of the link to X 1 to 120
1 sec attempt to send messages while all buffers are full. (default = 30)
Required for HSMS.
Write Stall 1 Time limit in seconds to wait for TCP/IP to accepts data. X 1 to 120
sec Required for HSMS. (default = 20)
Last Send Tag to which the status for the last send operation is tag name analog
Status Tag written.
Msgs Sent Tag to which the count of messages sent is written. tag name analog
Counter Tag
Msgs Rcvd Tag to which the count of messages received is written. tag name analog
Counter Tag
T3/T4 Tag to which the count of timeout errors is written. tag name analog
Timeout
Errors Tag
Retry Tag to which the count of retries is written. tag name analog
Counter Tag
Status Msg Tag to which status for this logical port is written. tag name message
Tag

Sample Port Definition Table Entries


Column Entry Description
Logical Port 0 Name of the port being defined
SECS/HSMS SECS Using the SECS (RS232)
Com Port 1 Communicating through Com Port 1
Baud Rate 9600 Com port operating at 9600 BAUD
T1 Timeout 0.1 sec 5 0.5 second timeout value
T2 Timeout 0.1 sec 30 3 second timeout value
T3 Timeout 1sec 30 30 second timeout
T4 Timeout 1sec 10 10 second timeout
T5 Timeout 1sec 10 10 second timeout
T6 Timeout 1sec 20 20 second timeout

FactoryLink Device Interfaces - OPC and Other Guide / 197


• 4 | FLGEM
FLGEM Port Definition Table



Column Entry Description
T7 Timeout 1sec 10 10 second timeout
T8 Timeout 1sec 10 10 second timeout
Retry Limit 3 Communications retry count
ACTIVE/PASSIVE PASSIVE Passive will not initiate communication
HOST/EQUIP EQUIP Defined as equipment
Protocol HSMS-94 SECS protocol
Passive IP Not required for SECS (RS232)
Address
TCP Port Not required for SECS (RS232)
Connection Estab 1sec 20 Default - not required for SECS
Circuit Assurance 1sec 15 Default - not required for SECS
TGRACE 1sec 10 Default - not required for SECS
Memory Stall 1sec 30 Default - not required for SECS
Write Stall 1sec 20 Default - not required for SECS
Last Send StatusTag Optional
Msgs Sent Counter Tag Optional
Msgs Rcvd Counter Tag Optional
T3/T4 Timeout Errors Optional
Tag
Status Msg Tag Optional

198 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Device Definition Table

FLGEM D EVICE D EFINITION TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Port Definition > “logical port” >
FLGEM Device Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Error/Status Tag to which any errors for this logical station are tag name analog
Tag Name written.
Device Type Specifies the device X GWGEM

Device ID Identifies the physical device X 0 to 32767


(default = 0)
Device State Indicates the initial state of the link at startup X ON_LINE
at Startup (default)
OFF_LINE
Comment Reference information about this device 1 to 30
characters

Sample Device Definition Table Entries

Column Entry Description


Error/Status Tag Name Optional
Device Type GWGEM Currently the only available choice
Device ID 1 Number used to identify this device
Device State at Startup ON_LINE Device will be on line at startup
Comment Optional

FactoryLink Device Interfaces - OPC and Other Guide / 199


• 4 | FLGEM
FLGEM Variable Definitions Table



FLGEM VARIABLE D EFINITIONS TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Variable Definitions

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Variable ID Number to identify the variable X 100 to analog
999999
Variable Name to identify the variable X 1 to 40
Name characters
Variable Identify the type of variable X
Type
Valid Entry explanation:
SV - Status Variable (default)
DV - Data Variable
EC - Equipment Constant
DSV - Dynamic Status Variable
Variable Tag Tag to hold the value for the variable X tag name digital, analog,
longana, float,
message
Format Code Data type format of the variable X
Valid Entry explanation:

NULL SINT2 L S4
LIST SINT4 B F8
BNARY FLOT8 BN F4
BOOLN FLOT4 A (default) U8
ASCII UINT8 J U1
JIS8 UINT1 S8 U2
SINT8 UINT2 S1 U4
SINT1 UINT4 S2

Units SECS-II standard units of measure 1 to 9


characters

200 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Variable Definitions Table

Field Name Description Req. Valid Entry Valid Data Type


Length Data item array count. For string data types, the number 1 to 65535
of characters. (default = 1)
Lower Limit Minimum boundary value for limits monitoring 1 to 15
(min) characters
Upper Limit Maximum boundary value for limits monitoring 1 to 15
(max) characters
Limit Event Collection Event ID to be signaled when the value of this 0 to 999999
ID variable crosses any Limits Monitoring boundary
Initial Value Value for this Variable at startup 1 to 15
(default) characters
Application For Application Owned variables, GWGEM has to X YES
Owned request the value of the variable whenever it needs to (default), NO
know the value, for Limits Monitoring or Event
Reporting to the host for example. None Application
Owned Variables require the driver to update the
GWGEM maintained value whenever the variable
changes values. For variables with rapidly changing
values, Application Owned is preferred because the value
is reported only when required by GWGEM.
Private Private variables cannot be seen by the host. X YES
(default), NO
Host Tag (for Equipment Constants only) which will be force tag name digital
Changed EC written to one when the variable is changed by the Host
Trigger
Description Reference information about this variable 1 to 80
characters

Sample FLGEM Variable Definition Table Entries

Column Entry Description


Variable ID 100 Number identifying this variable
Variable Var100 Name identifying this variable
Name
Variable Type SV Status Variable
Variable Tag var_100[0] FactoryLink tag holding the value of this variable
Format Code U2 Unsigned 2 byte integer

FactoryLink Device Interfaces - OPC and Other Guide / 201


• 4 | FLGEM
FLGEM Variable Definitions Table



Column Entry Description
Units Optional
Length 1 Variable consists of only one tag value
Lower Limit 0 Lower limit of limit range used by Limits Monitoring
(min)
Upper Limit 900 Upper limit of limit range used by Limits Monitoring
(max)
Limit Event 1000 Event ID which will be sent when Limits Monitoring
ID detects a limit violation
Initial Value Optional
(default)
Application YES The value will be passed tp GWGEM only when
Owned requested by GWGEM
Private NO Variable is visible to the Host
Host Changed Optional
EC Trigger
Description Optional

202 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Limits Monitoring Table

FLGEM L IMITS M ONITORING TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Variable Definitions > “variable
ID” > FLGEM Limits Monitoring

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Limit Lower Value of lower limit deadband for one limit value X 1 to 15
DB numeric
characters
Limit Upper Value of upper limit deadband for one limit value X 1 to 15
DB numeric
characters
Description Reference information about this variable 1 to 80
characters

Sample FLGEM Limits Monitoring Table Entries

Column Entry Description


Limit Lower DB 100 Lower Deadband for this limit
Limit Upper DB 130 Upper Deadband for this limit
Description Optional

FactoryLink Device Interfaces - OPC and Other Guide / 203


• 4 | FLGEM
FLGEM Equipment Control/Status Table



FLGEM E QUIPMENT C ONTROL /S TATUS TABLE
This table allows the assignment of Read/Write tags and initial (default) values to GWGEM
predefined Status Variables and Equipment Constants. Complete a row for each Status Variable
or Equipment Constant which requires a Read or Write tag or a initial value different from the
original GWGEM configuration file.

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Equipment Control/Status

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Variable ID Specifies the predefined GWGEM status variables or X see Table 4-1
equipment constants
Variable Tag containing the data to be written to the Equipment X tag name digital, analog,
Write/Control Constant or Status Variable longana, float,
Tag message
Variable Tag to receive the data to be read from the Equipment X tag name digital, analog,
Read Tag Constant or Status Variable longana, float,
message
Initial Value Value for this Equipment Constant or Status Variable at 1 to 15
(default) startup characters
Host Tag (for Equipment Constants only) which will be force tag name digital
Changed EC written to one when the variable is changed by the Host
Trigger
GWGEM Trigger tag which when force written to one causes the X tag name digital
Status Read equipment constant or status variable data to be read into
Trigger Variable Read tag
Description Reference information about this equipment constant or 1 to 80
status variable characters

204 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Equipment Control/Status Table

Table 4-1 Variable ID Valid Entries


GemAlarmFileName GemASer GemSpoolFullTime
GemConfigAlarms GemClock GemSpoolLoadSubstate
GemConfigConnect GemControlState GemSpoolStartTime
GemConfigEvents GemDataId GemSpoolState
GemConstantFileName GemEventsEnabled GemSpoolUnloadSubstate
GemDeviceName GemLinkState GemEventText
GemEstabCommDelay GemMDLN GemPPKeepSecsHeader
GemHostId GemPPExecName GemLimitsVID
GemInitCommState GemPPExecName GemEventLimit
GemInitControlState GemPreviousCeid GemTransType
GemPollDelay GemPreviousCommand GemLimitsDelay
GemPPExt GemPreviousControlState GemLimitsFileName
GemPPDir GemPreviousProcessState GemOverWriteSpool
GemPPTempFileName GemProcessState GemConfigSpool
GemPPTocName GemSOFTREV GemHostMessageLimit
GemRecipeType GemTime GemSharedMemorySize
GemReportFileName GemPPChangeName GemDynamicDataLimit
GemRpType GemPPChangeStatus GemTermReqSendMax
GemWBitS10 GemOfflineSubstate GemTermReqRecvMax
GemWBitS5 GemOnlineFailed GemPrimaryMessageLimit
GemWBitS6 GemOnlineSubstate Control_GoOnline
GemAbortLevel GemMaxSpoolFileSize Control_GoOffline
GemAlarmId GemMaxSpoolTransmit Control_GoRemote
GemAlarmsEnabled GemSpoolFileName Control_GoLocal
GemAlarmsSet GemSpoolCountActual Control_Enable
GemAlarmState GemSpoolCountTotal Control_Disable

FactoryLink Device Interfaces - OPC and Other Guide / 205


• 4 | FLGEM
FLGEM Equipment Control/Status Table



Sample FLGEM Equipment Control/Status Table Entries

Column Entry Description


Variable ID GemLinkState ID of the Equipment Constant or Status Variable to
be read from or written to
Variable Write/ Not used in this case
Control Tag
Variable Read Tag LinkState Tag to which the value of the variable is written
Initial Value Optional
(default)
Host Changed EC Optional
Trigger
GWGEM Status sec1 The variable will be read every second and its value
Read Trigger stored in the Variable Read Tag
Description Optional

206 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Collection Events Table

FLGEM C OLLECTION E VENTS TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Collection Events

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Event ID Number to identify the Collective Event X 100 to
999999
Event Name Name to identify the Collection Event X 1 to 40
characters
Monitor Tag Tag whose value is to be monitored and which will tag name digital, analog,
generate this collection event when it meets certain longana, float,
conditions. message
Note: If no Monitor Condition is specified, the Event
will be triggered any time the Monitor Tag changes
value or is force written. If the Monitor Condition is
TGL and no Monitor Value is specified, the Event will
be triggered any time the Monitor Value changes from
between FALSE and TRUE or 0 and non 0.
Monitor Condition used to compare the value of the Monitor Tag X
Condition to either the Monitor Value or the value of the Monitor
Value tag. The conditions containing ‘TGL’ will cause the
Collection Event when the Monitor Condition becomes
both true and false.
Valid Entry explanation:

OFF >__TGL
ON >=
TGL >=_TGL
= <
=__TGL >__TGL
<> <=
<>_TGL <=_TGL
>

FactoryLink Device Interfaces - OPC and Other Guide / 207


• 4 | FLGEM
FLGEM Collection Events Table



Field Name Description Req. Valid Entry Valid Data Type
*Monitor Tag or constant value against which the Monitor Tag X tag name or 1 digital, analog
Value value is compared to 16 (default),
characters longana,
message
Event When the value of this tag is equal to one the Monitor X tag name digital
Disable Tag Condition will not be evaluated
Description Reference information about this collection event 1 to 80
characters

Sample FLGEM Collection Event Table Entries

Column Entry Description


Event ID 100 Number to identify this event
Event Name Event_100 Name to identify this event
Monitor Tag event_100 Tag to be monitored
Monitor Condition >-TGL Event will be triggered when the Monitor Value
exceeds the tag value and also when it again
becomes less than the tag value
Monitor Value 120 The value to compare against the Monitor Tag
value
Event Disable Tag Optional
Description Optional

208 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Collection Event Reports Table

FLGEM C OLLECTION E VENT R EPORTS TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Collection Events > “event ID” >
FLGEM Collection Event Reports

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Report ID Number of a report to be sent when the associated X 0 to 999999
Collection Event is triggered
Description Reference information about this report 1 to 80
characters

Sample FLGEM Collection Event Reports Table Entries

Column Entry Description


Report ID 100 Report to send when the collection event is triggered
Description Optional

FactoryLink Device Interfaces - OPC and Other Guide / 209


• 4 | FLGEM
FLGEM Alarms Table



FLGEM A LARMS TABLE

Accessing
Device Interfaces > FLGEM Port & Variable Definition > FLGEM Alarms

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Alarm ID Number to identify the alarm X 0 to 999999
Alarm Name Name to identify the alarm X 1 to 40
characters
Alarm Code A number to indicate the severity of the alarm X 1 to 127
(default = 1)
Alarm Trigger When this tag is force written to one, this alarm will be X tag name digital
Tag sent.
Alarm Tag that disables the sending of this alarm X tag name digital
Disable Tag
*Alarm Tag or text constant to describe the alarm which will be X tag name, message
Text sent with the alarm message 1 to 40
characters
Alarm ON Collection event which will be triggered when this alarm X 0 to 999999
Event ID goes from OFF to ON
Alarm OFF Collection event which will be triggered when this alarm X 0 to 999999
Event ID goes from ON to OFF
Description Reference information about this alarm 1 to 80
characters

210 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Alarms Table

Sample FLGEM Alarms Table Entries

Column Entry Description


Alarm ID 100 Number to identify this alarm
Alarm Name Alarm100 Name to identify this alarm
Alarm Code 1 Alarm priority
(1-127)
Alarm Trigger Tag alarm_trig Tag that when force written to one will cause this
alarm to be sent to the host
Alarm Disable Optional
Tag
*Alarm Text Alarm 100 Alarm text sent to the host
Alarm ON Event 100 Event 100 will be triggered when this alarm goes
ID to the ON state
Alarm OFF Event 110 Event 110 will be triggered when this alarm
ID returns to the OFF state
Description Optional

FactoryLink Device Interfaces - OPC and Other Guide / 211


• 4 | FLGEM
FLGEM Event Reports Table



FLGEM E VENT R EPORTS TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Event Reports

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Report ID Number to identify the report X 0 to 999999
Description Reference information about this report 1 to 80
characters

Sample FLGEM Event Reports Table Entries

Column Entry Description


Report ID 100 Number to identify this report
Description Optional

212 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Report Detail Table

FLGEM R EPORT D ETAIL TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Event Reports > “report ID” > FLGEM
Report Detail

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Variable ID ID number of a variable which will be part of this report X 0 to 999999
Description Reference information about this report 1 to 80
characters

Sample FLGEM Report Detail Table Entries

Column Entry Description


Variable ID 100 The value of variable 100 will be sent as part of this report
Description Optional

FactoryLink Device Interfaces - OPC and Other Guide / 213


• 4 | FLGEM
FLGEM Trace Reports Table



FLGEM TRACE R EPORTS TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Trace Reports

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Trace ID Number to identify the trace report X 0 to 999999
Trace Trigger Tag which when force written to one will cause a Trace to X tag name digital
be initiated by simulating a S2F23 message
Sample Data sample period that defines how often the trace data X 1 to 6
Period is logged numeric
(HHMMSS) characters
Total Number Total number of samples to be taken X 1 to 999999
of Samples (default = 1)
Reporting Specifies how many sets of data should be collected X 1 to 999999
Group Size before sending the S6F1 (Trace Data Send) message (default = 1)
Description Reference information about this trace report 1 to 80
characters

Sample FLGEM Trace Reports Table Entries


Column Entry Description
Trace ID 1 Number to identify this trace report
Trace Trigger trace_trig Tag that when force written to one will initiate this
trace report
Sample Period 000015 Data will be sampled every 15 seconds
(HHMMSS)
Total Number of 2 Takes two samples before the trace operation is
Samples terminated
Reporting Group 1 Trace report is sent after one set of samples has been
Size collected
Description Optional

214 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Trace Detail Table

FLGEM TRACE D ETAIL TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Trace Reports > “trace ID” > FLGEM Trace
Detail

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Variable ID ID number of a variable which will be part of this trace X 0 to 999999
report
Description Reference information about this variable 1 to 80
characters

Sample FLGEM Trace Detail Table Entries

Column Entry Description


Variable ID 1010 Variable 1010 will be sampled for this trace report
Description Optional

FactoryLink Device Interfaces - OPC and Other Guide / 215


• 4 | FLGEM
FLGEM Remote Commands Table



FLGEM R EMOTE C OMMANDS TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Remote Commands

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Remote Name of the remote command X 1 to 30
Command characters
Remote Tag which will be force written to one when the Remote tag name digital
Command Command has been received and validated
Trigger Tag
Command Tag which, if set to one, will prevent the Remote tag name digital
Disable Tag Command from being processed
Description Reference information about this remote command 1 to 80
characters

Sample FLGEM Remote Command Table Entries

Column Entry Description


Remote Command START Name of the remote command
Remote Command start_trig Tag that will be force written to one when this
Trigger Tag command and its parameters are correctly received
Command Disable Optional
Tag
Description Optional

216 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Remote Commands Detail Table

FLGEM R EMOTE C OMMANDS D ETAIL TABLE

Accessing
Device Interfaces > FLGEM Report Definitions > FLGEM Remote Commands > “remote
command” > FLGEM Remote Command Detail

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Parameter Name of the parameter X 1 to 30
Name characters
Parameter Tag into which the parameter value is to be stored tag name analog
Value Tag
Force Determine whether the Parameter Value Tag is to be force X YES
written (default), NO
Parameter Limit to which the parameter value will be compared. If 1 to 8
Min Limit the parameter is less than this value the Remote numeric
Command will not be accepted characters
Parameter Limit to which the parameter value will be compared. If 1 to 8
Max Limit the parameter is greater than this value the Remote numeric
Command will not be accepted. characters

Sample FLGEM Remote Command Table Entries


Column Entry Description
Parameter Name First Name of the parameter is ‘First’
Parameter Value Tag first_value FactoryLink tag into which the value of this parameter
is written
Force YES The parameter Value Tag will be force written
Parameter Min Limit 10 The lower limit of a valid parameter is 10
Parameter Max Limit 100 The upper limit of a valid parameter is 100

FactoryLink Device Interfaces - OPC and Other Guide / 217


• 4 | FLGEM
FLGEM Terminal Messages Table



FLGEM TERMINAL M ESSAGES TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Message Detail

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Terminal ID A number to identify the terminal X 0 to 255
Recv Tag array to hold received terminal text messages tag name message
Message Tag
Number of Number of tags in the Recv Message Tag array X 1 to 255
Lines
Recv Trigger Tag that will be force written to one when a terminal tag name digital
Tag message has been received
Description Reference information about this terminal 1 to 80
characters

Sample FLGEM Terminal Messages Table Entries

Column Entry Description


Terminal ID 1 Number to identify this terminal
Recv Message Tag TermMessages[0] FactoryLink tag array into which the received terminal
messages lines will be written
Number of Lines 25 The above tag array will hold up to 25 message lines
Recv Trigger Tag TermMsgRcvd FactoryLink tag which will be force written to one when a
message has been received for this terminal
Description Optional

218 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Message Detail Table

FLGEM M ESSAGE D ETAIL TABLE

Accessing
Device Interfaces > FLGEM Report Definition > FLGEM Message Detail > “terminal ID” > FLGEM
Message Detail

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Send Tag array which will hold terminal text messages to be X tag name message
Message Tag sent to the host
Send Trigger Tag that when force written to one will cause the Send X tag name digital
Tag Message Tag text to be sent to the host

Sample FLGEM Message Detail Table Entries

Column Entry Description


Send Message Tag SendMessage[0] FactoryLink tag array holding message lines to be
sent to the host
Send Trigger Tag TermSnd FactoryLink tag which when force written to one
will cause the above message lines to be sent to the
host

FactoryLink Device Interfaces - OPC and Other Guide / 219


• 4 | FLGEM
FLGEM SECS-II Message Definition Control Table



FLGEM SECS-II M ESSAGE D EFINITION C ONTROL TABLE

Accessing
Device Interfaces > FLGEM Custom Message Definition > SECS-II Message Definition Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


SECS-II Number to identify this message table X 0 to 32767
Table ID
Comment Reference information about this table 1 to 30
characters

Sample SECS-II Message Definition Control Entries

Column Entry Description


SECS-II Table ID 1 Number to identify this message table
Comment Optional

220 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM SECS-II Message Definition Information Table

FLGEM SECS-II M ESSAGE D EFINITION I NFORMATION TABLE

Accessing
Device Interfaces > FLGEM Custom Message Definition > SECS-II Message Definition Control >
“table ID’ > SECS-II Message Definition Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Tag Name Tag updated as a result of a READ message or used a tag name digital, analog,
source of data for a WRITE message. On WRITE, if no longana, float,
tag is specified the Data Item will be sent with a value of message
0. On READ, if no tag is specified the Data Item will not
be stored.
Read/Write Specify the message type. BOTH defines the message for X READ,
both READ and WRITE activity. INQGN will result in WRITE,
an Inquire/Grant transaction. For INQGN, the value in BOTH,
“Constant” specifies the function number of the data INQGN,
message, the stream and message ID for the data message (Inquire/
will be the same as the Inquire message. Grant)
Required on the first line of a message definition.
Stream Stream number for the message to be sent or received. X 0 to 255
Decimal Required on the line which specifies READ, WRITE,
BOTH, or INQGN.
Function Function number for the message to be sent or received. X 0 to 255
Decimal Required on the line which specifies READ, WRITE,
BOTH, or INQGN.
Message ID Message number for the message to be sent or received. 0 to 999
If used, must be on the line which specifies READ,
WRITE, BOTH, or INQGN.

FactoryLink Device Interfaces - OPC and Other Guide / 221


• 4 | FLGEM
FLGEM SECS-II Message Definition Information Table



Field Name Description Req. Valid Entry Valid Data Type
Item Type Specify the data item. For additional details of FN_XX X
and CONXX item types, see the Technical Notes section.
Valid Entry explanation:
LIST
BNARY
BOOLN
ASCII
JIS8
SINT8
SINT1
SINT2
SINT4
FLOT8
FLOT4
UINT8
UINT1
UINT2
UINT4
FNAME - Filename for READ
NOBDY
FSIZE
FN_B - Filename for WRITE, send data as bytes
FN_A - Filename for WRITE, send data as ASCII
FN_I1 - Filename for WRITE, send data as SINT1
FN_I2 - Filename for WRITE, send data as SINT2
FN_I4 - Filename for WRITE, send data as SINT4
FN_I8 - Filename for WRITE, send data as SINT8
FN_U1 - Filename for WRITE, send data as UINT1
FN_U2 - Filename for WRITE, send data as UINT2
FN_U4 - Filename for WRITE, send data as UINT4
FN_U8 - Filename for WRITE, send data as UINT8
CONI2 - Conditional item type SINT2
CONU2 - Conditional item type UINT2
CONI4 - Conditional item type SINT4
CONU4 - Conditional item type UINT24
CONAS - Conditional item type ASCII
Number Number used as an item count for non-ASCII data item 0 - 32767 for
and a byte count for ASCII data items. For specific usage READ items,
see the Technical Notes section. 0 - 255 for
WRITE
items
Constant Character string used in conjunction with some data 1 to 15
items. For specific usage see the Technical Notes section. characters

222 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM SECS-II Message Definition Information Table

Field Name Description Req. Valid Entry Valid Data Type


Parse Identifies the position of a data item in a message. For 1 to 15
Position specific usage see the Technical Notes section. characters
Reply Specify whether a primary message requires a response NO, YES,
or not. DELIVR can be used on primary or secondary DELIVR,
messages and requires acknowledgment of message WAIT
delivery only.
Auto Read If YES and a Read Disable Tag is specified for this NO, YES
Disable Logical Device, it will be set to ON upon receiving this
message. This will prevent receiving messages for this
Logical Device until the Read Disable Tag is set to OFF.
Parse Specify whether to process all data items or parse out data NO, YES
items to be processed in a READ message. If YES, it
must appear on the same line with the READ.

Sample SECS-II Message Definition Information Table Entries

Column Entry Description


Tag Name Optional (Defining first tag of the message)
Read/Write BOTH Defining a message for both read and write
Stream Decimal 12 Define a stream 12 message
Function Decimal 9 Define a function 9 message
Message ID Optional
Item Type L Item is a List
Number 4 There four items in this List
Constant Optional
Parse Optional

FactoryLink Device Interfaces - OPC and Other Guide / 223


• 4 | FLGEM
FLGEM SECS Read/Write Control Table



FLGEM SECS R EAD /W RITE C ONTROL TABLE

Accessing
Device Interfaces > FLGEM Custom Message Definition > SECS-II Read/Write Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


SECS-II Number of the table defined in the SECS-II Message 0 to 32767
Table ID Definition Control Table

Send Stream Tag that defines the stream number of the message to be tag name analog
Number sent
Send Tag that defines the function number of the message to be tag name analog
Function sent
Number
Send Tag that defines the message ID of the message to be sent tag name analog
Message ID
Send Trigger Tag whose value, when forced to 1, initiates a send of the tag name digital
message defined by the stream, function, and message ID
tags
Send Disable Tag whose value, when 1, disables a triggered send of the tag name digital
device(s) message specified in this table
Send State Tag whose value is 0 when a triggered send of the tags tag name digital
specified in this table is in progress and 1 when the table
is inactive
Send Status Tag to which the status for the last send operation for this tag name analog
table is written
Receive Tag to which the stream number of the last message tag name analog
Stream received is written
Number
Receive Tag to which the function number of the last message tag name analog
Function received is written
Number
Receive Tag to which the message ID number of the last message tag name analog
Message ID received is written

224 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM SECS Read/Write Control Table

Field Name Description Req. Valid Entry Valid Data Type


Receive Tag to which the status for the last receive for this table is tag name analog
Status written
Read Disable Tag whose value, when 1 (ON), prevents the logical tag name digital
device from being polled for received messages

Sample SECS-II Read/Write Control Table Entries

Column Entry Description


SECS-II Table ID 1 Table 1 as defined in the SECS-II Message Definition
Information Table
Send Stream send_stream Tag to hold the stream number of a message to be sent
Number
Send Function send_function Tag to hold the function number of a message to be
Number sent
Send Message ID send_msg_id Tag to hold the message id of a message to be sent
Send Trigger send_trig Tag which when force written to one will cause a
message defined in table 1 which matches the stream,
function and massage ID to be sent to the host
Send Disable Optional
Send State Optional
Send Status Optional
Receive Stream Optional
Number
Receive Function Optional
Number
Receive Message Optional
ID
Receive Status Optional
Read Disable Optional

FactoryLink Device Interfaces - OPC and Other Guide / 225


• 4 | FLGEM
FLGEM Process Programs Table



FLGEM P ROCESS P ROGRAMS TABLE

Accessing
Device Interfaces > FLGEM Process Programs & Data Sets > FLGEM Process Programs

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Upload/Down Holds the PPID of a Process Program to uploaded or 0 to 32767 message
load PPID downloaded by the equipment
Tag
Upload When force to 1 (ON), initiates an upload of the PPID tag name digital
Trigger Tag defined by the Upload/Download PPID tag.
Download When forced to 1 (on), initiates a download of the PPID tag name digital
Trigger Tag defined by the Upload/Download PPID tag.
Upload/Down Tag whose value is force written to 1 when an upload or tag name digital
load download is complete
Complete
PPID Holds the PPID of a Process Program whose download tag name message
Downloaded was initiated by the host
from Host
Host Tag whose value is force written to 1 when a tag name digital
Download host-initiated download is complete
Complete
Currently Holds the PPID of the currently executing Process tag name message
Executing Program
PPID
PPID List Array of tags to hold the PPIDs stored on the equipment tag name message
Tags
# of PPIDs to Number of PPIDs the PPID List Tag array can hold tag name analog
List
Starting PPID Holds the number of the first PPID to store in the PPID tag name analog
List Tag Array
List PPID When forced to 1 (on), initiates a listing of the PPIDs tag name digital
Trigger

226 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Process Programs Table

Field Name Description Req. Valid Entry Valid Data Type


# of PPIDs Number of PPIDs actually read. A number less than the tag name analog
Read number of PPIDs to List indicates that the whole
directory has been read.
Delete PPID Holds the PPID of a Process Program to be deleted from tag name analog
the equipment
Delete PPID When forced to 1 (ON), causes the Process Program tag name digital
Trigger identified in the Delete PPID tag to be deleted
Keep SECS Determines whether the Process Program file will contain YES, NO
Header the SECS-II Data Item Header (default)
Temp File Name (including path) of the file to be used by GWGEM tag name digital
Name for temporary storage of Process Programs during
Uploads and Downloads. If blank, the default is
PPDIR/TMP_BODY
TOC File Name (including path) of the file to be used by GWGEM 1 to 40
Name to maintain a Table of Contents for the Process Program characters
library. If blank, the default is PPTOC
PPID File The file name extension which GWGEM will append to 1 to 8
Extension the file name for each Process Program. If blank, default characters
is BDY.
PPID File Name of a directory in which GWGEM will sort all 1 to 40
Directory Process Program Files. If blank, the default is PPDIR characters
Verify PPID When forced to 1 (ON), causes the CML PPID Verify 1 to 40
Trigger routine to verify the Process Program identified in the characters
Verify PPID tag.
Verify PPID Holds the PPID of the Process Program to be verified tag name message
Verify Tag to be force written by the PPID Verify routine to tag name analog
Complete indicate the completion status of the operation
Status
Create PPID When forced to 1 (ON), causes the Process Program tag name digital
Trigger identified in the Create/Modify PPID tag to be added to
the Process Program Library.
Modify PPID When forced to 1 (ON), causes the Process Program tag name digital
Trigger identified in the Create/Modify PPID tag to be allowed to
be modified.
Create/ Holds the PPID of the Process Program to be created tag name message
Modify PPID (added) or modified (edited)

FactoryLink Device Interfaces - OPC and Other Guide / 227


• 4 | FLGEM
FLGEM Process Programs Table



Field Name Description Req. Valid Entry Valid Data Type
Modify Indicates whether the Process Program identified in the tag name analog, message
Go/NoGo Create/Modify PPID tag may be modified (edited)
Modify Done When forced to 1 (ON), notifies FLGEM that the Process tag name digital
Program identified in the Create/Modify PPID tag has
been modified and can be returned to the Process
Program Library.
Create/ Indicates the completion status of a Create or Modify tag name analog, message
Modify Status operation

Sample FLGEM Process Program Table Entries

Column Entry Description


Upload/Download proc_name Tag holding the ID of the Process Program to be
PPID Tag uploaded or downloaded
Upload Trigger Tag upload_proc Tag which when force written to one will cause the
process program identified by the above PPID tag
to be uploaded to the host
Download Trigger download_proc Tag which when force written to one will cause the
Tag process program identified by the above PPID tag
to be downloaded from the host
Upload/Download pxfer_compl Tag which will be force written to one when the
Complete upload or download is complete
PPID Downloaded host_ppid Tag which will hold the ID of a process program
from Host downloaded through a host initiated download
Host Download host_compl Tag which will be force written to one when the
Complete host initiated download is complete
Currently executing_ppid Tag which contains the ID of the currently
Executing PPID executing process program
PPID List Tags ppid_list[0] Tag array which will hold the IDs of the process
programs currently stored on the equipment
# of PPIDs to List ppids_to_read Tag holding the size of the above tag array
List PPID Trigger list_ppid Tag which when force written to one will cause the
PPIDs to be written to the above tag array
# of PPIDs Read ppids_read Tag which will hold the actual number of PPIDs
read into the above tag array
Delete PPID proc_delete_name Tag to hold the ID of a process program to be
deleted from the equipment

228 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Process Programs Table

Column Entry Description


Delete PPID delete_proc Tag which when force written to one will cause the
Trigger PPID stored in the above tag to be deleted
Keep SECS Header NO Do not store SECS header with the process
programs
Temp File Name ppdir\\temp GWGEM will use the file temp in the ppdir
directory for temporary storage while uploading
and downloading process programs
TOC File Optional
Extension
PPID File Optional
Extension
PPID File Optional
Directory
Verify PPID verify_trigger Tag force written to one by FLGEM when a
Trigger Process Program has been downloaded. Used to
trigger a CML or IML function to verify the
program.
Verify PPID verify_ppid Tag which holds the path and file name of the
downloaded Process Program for use by the
CML/IML verify routine.
Verify Complete verify_compl Tag which will be force written by the CML/IML
Status verify routine to indicate the verify status to
FLGEM.
Create PPID new_ppid_trigger Tag which will be force written to one by the
Trigger application program to notify FLGEM to add the
Process Program identified in the Create/Modify
PPID tag to the Process Program Library.
Modify PPID modify_ppid_trig Tag which will be force written to one by the
Trigger application program to notify FLGEM of the users
desire to modify the Process Program identified in
the Create/Modify PPID tag.
Create/Modify ppid_name Tag which will contain the PPID of the Process
PPID Program to be added or modified.
Modify Go/NoGo modify_ok Tag which will be written to by FLGEM to
indicate to the user whether or not the Process
Program identified in the Create/Modify PPID tag
may be modified.

FactoryLink Device Interfaces - OPC and Other Guide / 229


• 4 | FLGEM
FLGEM Process Programs Table



Column Entry Description
Modify Done modify_done_trig Tag which will be force written to one by the
application program to notify that the modification
of the Process Program identified in the
Create/Modify PPID tag is complete and it may be
returned to the Process Program Library.
Create/Modify ppid_status Tag which will be force written by FLGEM to
Status indicate the status of the Create or Modify
operation.

230 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
FLGEM Data Sets Table

FLGEM D ATA S ETS TABLE

Accessing
Device Interfaces > FLGEM Process Programs & Data Sets > FLGEM Data Sets

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Upload/Down Holds the data set name to be uploaded or downloaded by tag name message
load DS the equipment
Name Tag
Upload/Down Holds a file name to upload or download by the tag name message
load File Equipment
Name Tag
Upload Tag shoe value, when force to 1 (ON), initiates an upload tag name digital
Trigger Tag of the data set or file defined by the Upload/Download
DS Name or File Name tag
Download When forced to 1 (ON), initiates a download of the DS or tag name digital
Trigger Tag File defined by the Download DS Name or File Name
tag.
Upload/Down Tag whose value is force written to 1 when an upload or tag name digital
load download is complete
Complete
DS Holds the name of a data set whose download was tag name message
Downloaded initiated by the host
from Host
File Name for Holds the file name assigned to a data set whose tag name message
DS from Host download was initiated by the host
Tag
Host Tag whose value is force written to one when a Host tag name digital
Download initiated Download is complete
Complete
Reset Trigger When force to 1 (ON), cancels any uploads or downloads tag name digital
Tag in progress.

FactoryLink Device Interfaces - OPC and Other Guide / 231


• 4 | FLGEM
FLGEM Data Sets Table



Sample FLGEM Data Sets Table Entries

Column Entry Description


Upload/Download ds_name Tag holding the name of the data set to be uploaded
DS Name Tag or downloaded
Upload/Download ds_file_name Tag holding the file name of the data set to be
File Name Tag uploaded or downloaded
Upload Trigger Tag upload_ds Tag which when force written to one will cause the
DS identified by the above DS Name or File Name
tag to be uploaded to the host
Download Trigger download_ds Tag which when force written to one will cause the
Tag DS identified by the above DS Name or File Name
tag to be downloaded from the host
Upload/Download xfer_compl Tag which will be force written to one when the
Complete upload or download is complete
DS Downloaded Optional
from Host
File Name for DS Optional
from Host Tag
Host Download Optional
Complete
Reset Trigger Tag reset_ds Tag which when force written to one will cause
active data set transfers to be aborted

232 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

TECHNICAL N OTES

Custom Message Specific

INT8

For UINT8 and SINT8 the data can be stored into 2 longana or 4 analog tags by specifying a
tag array and a count in the 'Constant' column.

Parsing

If the Parse field of a READ Message Definition Line is YES, the incoming message will be
parsed. The parsing term for each tag is entered in the Parse field.
The following example illustrates Parse position terms for a sample message (similar to
S6,F3):
Message Structure Parse Position String
L,3 1
UINT4 1.1:
UINT4 1.2:
L,1 1.3
L,2 1.3.1
UINT4 1.3.1.1:
L,7 1.3.1.2
ASCII,40 1.3.1.2.1:10,20 Start with character 10, store 20
ASCII,40 1.3.1.2.2:,40 Store first 40 characters
ASCII,40 1.3.1.2.3:10 Start at character 10, store rest of string
ASCII,40 1.3.1.2.4: Store whole string
UINT4 1.3.1.2.5:
UINT4 1.3.1.2.6:
UINT4 1.3.1.2.7:

The term after the ':' in the form 'X,Y' is used for strings to determine the start position (X) and
the number of bytes (Y) to be stored. If 'X' is omitted (:,Y) the start position is 0. If 'Y' is
omitted (:X,) the string starting at X to the end of the end of the string is stored. If neither X nor
Y is specified, the whole string is stored. In the case of UINT8 and SINT8 the 'X' value is used
to store into 2 longana or 4 analog tag array.

FactoryLink Device Interfaces - OPC and Other Guide / 233


• 4 | FLGEM
Technical Notes



Repeat Blocks

Repeat Blocks - A list block can be repeated if an entry is made in the 'Constant' field for a
'LIST' entry.
For example:
LIST 3 2
tag1 UINT4
tag2 UINT2
tag3 UINT2

will result in the following message:


LIST 6
tag1 UINT4
tag2 UINT2
tag3 UINT2
tag1+1 UINT4
tag2+1 UINT2
tag3+1 UINT2

For example:
LIST 1 2
LIST 3
tag1 UINT4
tag2 UINT2
tag3 UINT2

will result in the following message:


LIST 2
LIST 3
tag1 UINT4
tag2 UINT2
tag3 UINT2
LIST 3
tag1+1 UINT4
tag2+1 UINT2
tag3+1 UINT2

234 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

Repeat blocks can have embedded repeat blocks.


For example:
LIST 3 2
tag1 UINT2
tag2 UINT2
LIST 2 2
tag3 SINT2
tag4 SINT2

will result in the following message:


LIST 6
tag1 UINT2
tag2 UINT2
LIST 4
tag3 SINT2
tag4 SINT2
tag3+1 SINT2
tag4+1 SINT2
tag1+1 UINT2
tag2+1 UINT2
LIST 4
tag3+2 SINT2
tag4+2 SINT2
tag3+3 SINT2
tag4+3 SINT2

The message structures are expanded at start up to reduce the processing at run time. If logging
(command line 'd' or 'D') is enabled, the message structures will be stored in the file
'sdrv_log.dat’.

Conditionals

Item types are CONI2, CONU2, CONI4, CONU4 and CONAS for SINT2, UINT2, SINT4,
UINT4 and ASCII data types respectively. Entries in the 'Constant' field will be used to match
the incoming data. These item types can be used in normal or parsed READ messages. The
conditional fields may or may not have tags associated with them. If there are any conditionals
in a message definition, the message will first be processed to see if the data received in the
conditional fields matches the 'Constant' data for the conditional field before any data is stored
into tags. For 'CONAS' fields, the ':X,Y' parsing conditions apply to the conditional matching,
but if the conditions are met, and a tag is specified for the field, the whole string will be stored.
If the ‘Constant’ data does not match the data received, none of the message data will be
stored.

FactoryLink Device Interfaces - OPC and Other Guide / 235


• 4 | FLGEM
Technical Notes



File Transfers

FNAME, FN_XX and FSIZE require a message tag containing a file name. FSIZE will send a
SINT4 with the file size.
FNAME will require a message tag containing the file name for READ functions. To WRITE
files, use the following item types: FN_B(BYTE), FN_A(ASCII), FN_I1(SINT1),
FN_U1(UINT1), FN_I2(SINT2), FN_U2(UINT2), FN_I4(SINT4), FN_U4(UINT4),
FN_I8(SINT8) and FN_U8(UINT8). Each of those items requires a message tag containing the
file name of the file to be sent. The particular item type used determines the data type used to
send the file. On a READ the data type is determined from the message.

Multiple Items

A data item consisting of multiple items, can be handled by using a tag array and specifying
the size of the array in 'Number'. The default value will be 1 for non-ASCII item types if no
entry is made in ‘Number’. For ASCII item types the following applies:
WRITE
Number left blank: Data Item byte count will be equal to string length.
String Length >= Number: Data Item byte count will be equal to Number.
String Length < Number: Data Item will be Null filled to Number.
READ
Number left blank: Complete receive string will be stored.
String Length <= Number: Complete receive string will be stored.
String Length > Number: Only Number bytes will be stored.

Miscellaneous

On READ, the 'Item Type' is ignored. The data is processed according to the 'mesg.next' type.

Installation
Windows 2000/XP/2003
1 Install the GWA SDR driver.

2 Install the GWA GWGEM package.

3 Set GWASDRDIRto the SDR directory or use the /s program argument.

4 Set GWAGEMDIRto the GWGEMdirectory or use the /g program argument.

236 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

GWGEM Required Equipment Constants and Status Variables


The following is a list of the GWGEM required variables and their default values:
Note: Changing an Equipment Constant value at run time will cause GWGEM to save
the new value in the file specified by GemConstantFilename. The next time GWGEM
is started, the value will be restored from the Equipment Constant file, thus overriding
the value specified in the GCD file.

constant fixup private GemAlarmFileName = <A "ALARM.LOG">


vid = 0
name = ""
units = ""
writeable = FALSE

constant fixup GemConfigAlarms = <U1 0>


vid = 1
name = "CONFIGALARMS"
units = ""
min = <U1 0>
max = <U1 2>
default = <U1 0>
writeable = FALSE

constant fixup GemConfigConnect = <U1 2>


vid = 2
name = "CONFIGCONNECT"
units = ""
min = <U1 0>
max = <U1 2>
default = <U1 2>
writeable = FALSE

constant fixup GemConfigEvents = <U1 1>


vid = 3
name = "CONFIGEVENTS"
units = ""
min = <U1 0>
max = <U1 1>
default = <U1 1>
writeable = FALSE

constant fixup private GemConstantFileName = <A "CONST.LOG">


vid = 4
name = ""
units = ""
writeable = FALSE

FactoryLink Device Interfaces - OPC and Other Guide / 237


• 4 | FLGEM
Technical Notes



constant fixup GemDeviceName = <A "DeviceName">
vid = 5
name = "DEVICENAME"
units = ""
writeable = FALSE

constant fixup GemEstabCommDelay = <U2 20>


vid = 6
name = "ESTABLISHCOMMUNICATIONSTIMER"
units = "s"
min = <U2 0>
max = <U2 1800>
default = <U2 20>
writeable = TRUE

constant fixup private GemHostId = <U2 0>


vid = 7
name = ""
units = ""
default = <U2 0>
writeable = TRUE

constant fixup GemInitCommState = <U1 1>


vid = 8
name = "INITCOMMSTATE"
units = ""
min = <U1 0>
max = <U1 1>
default = <U1 1>
writeable = TRUE

constant fixup GemInitControlState = <U1 2>


vid = 9
name = "INITCONTROLSTATE"
units = ""
min = <U1 1>
max = <U1 2>
default = <U1 2>
writeable = TRUE

constant fixup GemPollDelay = <U2 30>


id = 10
name = "HEARTBEAT"
units = "s"
min = <U2 0>
max = <U2 1800>
default = <U2 30>
writeable = TRUE

238 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

constant fixup private GemPPExt = <A "BDY">


vid = 11
name = ""
units = ""
writeable = TRUE

constant fixup private GemPPDir = <A "PPDIR">


vid = 12
name = ""
units = ""
writeable = FALSE

constant fixup private GemPPTempFileName = <A "ppdir\\temp">


vid = 13
name = ""
units = ""
writeable = FALSE

constant fixup private GemPPTocName = <A "PPTOC">


vid = 14
name = ""
units = ""
writeable = FALSE

constant fixup private GemRecipeType = <U1 S2_B>


vid = 15
name = ""
units = ""
default = <U1 S2_B>
writeable = FALSE

constant fixup private GemReportFileName = <A "REPORT.LOG">


vid = 16
name = ""
units = ""
writeable = FALSE

constant fixup GemRpType = <BOOLEAN false>


vid = 17
name = "RPTYPE"
units = ""
default = <BOOLEAN false>
writeable = TRUE

constant fixup GemWBitS10 = <U1 0>


vid = 18
name = "WBITS10"
units = ""

FactoryLink Device Interfaces - OPC and Other Guide / 239


• 4 | FLGEM
Technical Notes



min = <U1 0>
max = <U1 1>
default = <U1 0>
writeable = TRUE

constant fixup GemWBitS5 = <U1 1>


vid = 19
name = "WBITS5"
units = ""
min = <U1 0>
max = <U1 1>
default = <U1 1>
writeable = TRUE

constant fixup GemWBitS6 = <U1 1>


vid = 20
name = "WBITS6"
units = ""
min = <U1 0>
max = <U1 1>
default = <U1 1>
writeable = TRUE

status fixup GemAbortLevel = <U1 0>


vid = 21
name = "ABORTLEVEL"
units = ""
writeable = FALSE

status fixup GemAlarmId = <U4 0>


vid = 22
name = "ALARMID"
units = ""
writeable = FALSE

status fixup GemAlarmState = <U1 0>


vid = 25
name = "ALARMSTATE"
units = ""
writeable = FALSE

status fixup GemASer = <U4 0>


vid = 26
name = "ALARMSERIAL"
units = ""
writeable = FALSE

240 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

status fixup GemClock


vid = 27
name = "CLOCK"
units = "cs"
writeable = TRUE

status fixup GemControlState


vid = 28
name = "CONTROLSTATE"
units = ""
writeable = FALSE

status fixup GemDataId = <U4 0>


vid = 29
name = "DATAID"
units = ""
writeable = FALSE

status fixup GemLinkState


vid = 31
name = "LINKSTATE"
units = ""
writeable = FALSE

status fixup GemMDLN = <A "GW APP">


vid = 32
name = "MDLN"
units = ""
writeable = FALSE

status fixup GemPPExecName = <A "PPExecName">


vid = 33
name = "PPEXECNAME"
units = ""
writeable = FALSE

status fixup GemPreviousCeid = <U4 0>


vid = 34
name = "PREVIOUSCEID"
units = ""
writeable = FALSE

status fixup GemPreviousCommand = <A "PreviousCommand">


vid = 35
name = "PREVIOUSCOMMAND"
units = ""
writeable = FALSE

FactoryLink Device Interfaces - OPC and Other Guide / 241


• 4 | FLGEM
Technical Notes



status fixup GemPreviousControlState = <U1 0>
vid = 36
name = "PREVIOUSCONTROLSTATE"
units = ""
writeable = FALSE

status fixup GemPreviousProcessState = <U1 0>


vid = 37
name = "PREVIOUSPROCESSSTATE"
units = ""
writeable = FALSE

status fixup GemProcessState = <U1 0>


vid = 38
name = "PROCESSSTATE"
units = ""
writeable = FALSE

status fixup GemSOFTREV = <A "REV 01">


vid = 39
name = "SOFTREV"
units = ""
writeable = FALSE

status fixup GemTime


vid = 40
name = "TIME"
units = "s"
writeable = TRUE

discrete fixup GemPPChangeName = <A "PPChangeName">


vid = 41
name = "PPCHANGENAME"
units = ""
writeable = FALSE

discrete fixup GemPPChangeStatus = <U1 0>


vid = 42
name = "PPCHANGESTATUS"
units = ""
writeable = FALSE

constant fixup GemOfflineSubstate = <U1 3>


vid = 43
name = "OFFLINESUBSTATE"
units = ""
min = <U1 1>
max = <U1 3>

242 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

default = <U1 3>


writeable = TRUE

constant fixup GemOnlineFailed = <U1 3>


vid = 44
name = "ONLINEFAILED"
units = ""
min = <U1 1>
max = <U1 3>
default = <U1 3>
writeable = TRUE

constant fixup GemOnlineSubstate = <U1 5>


vid = 45
name = "ONLINESUBSTATE"
units = ""
min = <U1 4>
max = <U1 5>
default = <U1 5>
writeable = TRUE

constant fixup private GemMaxSpoolFileSize = <U4 10000>


vid = 46
name = ""
units = ""
default = <U4 10000>
writeable = FALSE

constant fixup GemMaxSpoolTransmit = <U4 0>


vid = 47
name = "MAXSPOOLTRANSMIT"
units = ""
default = <U4 0>
writeable = TRUE

constant fixup private GemSpoolFileName = <A "SPOOL.LOG">


vid = 48
name = ""
units = ""
writeable = FALSE

status fixup GemSpoolCountActual


vid = 49
name = "SPOOLCOUNTACTUAL"
units = ""
writeable = FALSE

FactoryLink Device Interfaces - OPC and Other Guide / 243


• 4 | FLGEM
Technical Notes



status fixup GemSpoolCountTotal
vid = 50
name = "SPOOLCOUNTTOTAL"
units = ""
writeable = FALSE

status fixup GemSpoolFullTime


vid = 51
name = "SPOOLFULLTIME"
units = "cs"
writeable = FALSE

status fixup GemSpoolLoadSubstate


vid = 52
name = "SPOOLLOADSUBSTATE"
units = ""
writeable = FALSE

status fixup GemSpoolStartTime


vid = 53
name = "SPOOLSTARTTIME"
units = "cs"
writeable = FALSE

status fixup GemSpoolState


vid = 54
name = "SPOOLSTATE"
units = ""
writeable = FALSE

status fixup GemSpoolUnloadSubstate


vid = 55
name = "SPOOLUNLOADSUBSTATE"
units = ""
writeable = FALSE

discrete Var_56 = <A " ">


vid = 56
name = "GEMEVENTTEXT"
units = ""
writeable = FALSE

constant fixup private GemPPKeepSecsHeader = <BOOLEAN FALSE>


vid = 57
name = "GEMPPKEEPSECSHEADER"
units = ""
default = <BOOLEAN FALSE>
writeable = FALSE

244 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Technical Notes

discrete fixup GemLimitsVID = <U4 0>


vid = 58
name = "GEMLIMITSVID"
units = ""
writeable = FALSE

discrete fixup GemEventLimit = <B 0>


vid = 59
name = "GEMEVENTLIMIT"
units = ""
writeable = FALSE

discrete fixup GemTransType = <B 0>


vid = 60
name = "GEMTRANSITIONTYPE"
units = ""
writeable = FALSE

constant fixup GemLimitsDelay = <U2 5>


vid = 61
name = "GEMLIMITSDELAY"
units = "s"
default = <U2 5>
writeable = TRUE

constant fixup private GemLimitsFileName = <A "LIMITS.LOG">


vid = 62
name = ""
units = ""
writeable = FALSE

constant fixup GemOverWriteSpool = <BOOLEAN TRUE>


vid = 63
name = "OVERWRITESPOOL"
units = ""
default = <BOOLEAN TRUE>
writeable = TRUE

constant fixup GemConfigSpool = <U1 0>


vid = 64
name = "CONFIGSPOOL"
units = ""
min = <U1 0>
max = <U1 1>
default = <U1 0>
writeable = FALSE

FactoryLink Device Interfaces - OPC and Other Guide / 245


• 4 | FLGEM
Technical Notes



constant fixup private GemHostMessageLimit = <U4 270000>
vid = 65
name = ""
units = ""
min = <U4 16000>
max = <U4 4000000>
default = <U4 270000>
writeable = FALSE

constant fixup private GemSharedMemorySize = <U4 270000>


vid = 66
name = ""
units = ""
min = <U4 16000>
max = <U4 4000000>
default = <U4 270000>
writeable = FALSE

constant fixup private GemDynamicDataLimit = <U4 265000>


vid = 67
name = ""
units = ""
min = <U4 1000>
max = <U4 1995000>
default = <U4 265000>
writeable = FALSE

constant fixup GemTermReqSendMax = <I4 2000>


vid = 68
name = ""
units = ""
min = <I4 0>
max = <I4 60000>
default = <I4 2000>
writeable = FALSE

constant fixup private GemTermReqRecvMax = <I4 160>


vid = 69
name = ""
units = ""
default = <I4 160>
writeable = FALSE

246 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Program Arguments

constant fixup private GemPrimaryMessageLimit = <U4 270000>


vid = 70
name = ""
units = ""
min = <U4 1000>
max = <U4 4000000>
default = <U4 270000>
writeable = FALSE

P ROGRAM A RGUMENTS
Arguments Descriptions
-b<#> or /b<#> The number of buffers allocated by the SDR daemon. Each buffer
represents 256 byes. (# = 10 to 4000, default is 200)
-c or /c Clean start - causes all non volatile storage to be deleted and
reinitialized
-l or /l Writes debug output to FLGEM.LOG
-g or /g Overrides the GWAGEMDIR enviroment variable
-s or /s Overrides the GWASDRDIR enviroment variable
-v<#> or /v<#> Sets the level of debug output. (# = 1 to 3)

FactoryLink Device Interfaces - OPC and Other Guide / 247


• 4 | FLGEM
Run-Time Application Messages



R UN -T IME A PPLICATION M ESSAGES
During run time, FactoryLink generates and displays messages for the FLGEM module on the
Run-Time Manager screen. These messages are stored in FactoryLink database tags. You
define the tag names for these tags in the Port Definition table. See “FLGEM Port Definition
Table” on page 195 for information about configuring a message tag. See “FLGEM Device
Definition Table” on page 199 for information about configuring an analog tag.

Start-Up Errors

Message Cause
Protection Bit Failure (FLGEM) The system does not have the proper protection bit set.
NO_SDR_DEFINE The SDR directory is not defined as an environment variable
(GWASDRDIR) program argument (/s).
NO_GEM_DEFINE The GEM directory has not been defined as an environment
variable (GWAGEMDIR) or program argument (/g).
GCDC_Bad_Status The GCD Compiler returned an error code. See FLGEM window
or Shared Run Manager window for details.
GCDC_Bad_File_Status The FLGMCONF.GCP was not created by the GCD Compiler.
See FLGEM window or Shared Run Manager window for details.
sdr_start - SSS, NNN The SDR driver returned an error code. SSS is the error code
message, NNN is the error code. See the GWA SDR manual for
details.
sdr_configure - SSS, NNN The CFGSDR task returned an error code. SSS is the error code
message, NNN is the error code. See the GWA SDR manual for
details.
gwgem_start - SSS, NNN The GWGEM task returned an error code. SSS is the error code
message, NNN is the error code. See the GWA GWGEM manual
for details.
CREATE_THREAD FLGEM could not create the intertask communications thread.
EXT_SHARED_MEM FLGEM could not find the shared for the intertask
communications with the FLGMEXT task.
MSG_SHARED_MEM FLGEM could not find the shared for the intertask
communications with the FLGMMSG task.
bad_open_FLGEM_PORT_CT FLGEM could not find the FLGMPORT.CT file
bad_open_path_FLGMCONF.CFG FLGEM could not find the path defined by GWASDRDIR or the
/s program argument.

248 / FactoryLink Device Interfaces - OPC and Other Guide


FLGEM | 4
Run-Time Application Messages

Message Cause
FLGEM_insufficient_memory The system does not have enough memory to run FLGEM.
FLGEM_no_eval_value A Collection Event has no Monitor Value or Tag entered.
FLGEM_bad_control_var A Control Variable in the FLGEM Equipment Constant/Control
Table does not have a Control Trigger. See FLGEM window or
Shared Run Manager window for more details.
FLGEM_invalid_limits See FLGEM window or Shared Run Manager window for more
details.
FLGEM_dup_port NN Port NN was defined in the FLGEM Port Definition table more
than once.
FLGEM_dup_deviceID_port NN Port NN has duplicate devices defined.
FLGEM_dup_device More than one device was defined as ‘GWGEM’ in the FLGEM
Device Definition table.
Invalid_Parse_String See Technical Notes for proper use of Parse Strings.
bad_open_FLGEM_REPORT_CT FLGEM could not find the FLGMRPRT.CT file.
FLGEM_traces_bad_time The Trace Sample time must be of the following format:
HHMMSS.
bad_open_FLGEM_PROCESS_CT FLGEM could not find the FLGMPROC.CT file.
too_many_PROC_DS_records There should be only one Process Program row and only one Data
Set row entered.
bad_open_path_FLGMCONF.GCD FLGEM could not find the path defined by GWAGEMDIR or the
/g program argument.
CreateFileMapping() failed, error code = These messages appear in Windows message boxes from either
NN FLGMEXT or FLGMMSG. The source of the message appears in
MapViewOfFile() failed, error code = NN the title bar of the message box.
Mapping already exists...not created. NN is a Windows system error code. Any of these messages
indicate that the corresponding task did not start.
EXT_NO_TASK_ID FLGMEXT task tried to register with FactoryLink but failed.
MSG_NO_TASK_ID FLGMMSG task tried to register with FactoryLink but failed.
bad_open_FLGEM_EXT_PORT_CT FLGMEXT task could not find the FLGMPORT.CT file.
FLGEM_MSG_insufficient_memory The system does not have enough memory.

FactoryLink Device Interfaces - OPC and Other Guide / 249


• 4 | FLGEM
Run-Time Application Messages



Run-Time Messages

Message Cause
msg_def_table_not_found - NN Table NN was triggered by the SECS-II Read/Write Control Table
but there is no table NN defined in the SECS-II Message
Definition Control table.
stream_function_not_found - ss:ff:mm Message SssFffMmm was triggered by the SECS-II Read/Write
Control Table but the message is not defined in the SECS-II
Message Definition Information table.
no_resp_defined - ss,ff Primary message SssFff-1 was received and the response message
SssFff is not defined in the SECS-II Message Definition
Information table.

250 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 5





MECOM

O VERVIEW
The Mitsubishi PLC Driver, MECOM, is a software package that runs under FactoryLink
Software System. The PLC Driver does the task of reading data from Mitsubishi MELSEC
PLC systems into the FactoryLink Real-time database and writing data from the database to
the PLC.
The PLCs supported by MECOM are the A-series, QnA-series, and the FX-series. Both Serial
and Ethernet communication can be used. TCP/IP or UDP/IP can transfer the Ethernet
protocols. The following connections can be used:

• CPU Programming Port, using the CPU protocol.


• AJ71C24 Computer Link Module, called C24 in this document,
A-Series using the C24 protocol.
• AJ71E71 Ethernet Interface Module, called E71, using the E71
protocol.
• AJ71QC24 Computer Link Module, called QC24 in this document,
using the QC24 protocol.
QnA-Series
• AJ71QE71 Ethernet Interface Module, called QE71, using the
QE71 protocol.
• CPU Programming Port, using the CPU protocol.
FX-Series
• Other FX series 485 adapters, using C24 protocol.

MECOM also has support for MAC/MTA terminal multidrop net usage when using Serial
communication. It is possible to communicate through a MAC/MTA/E-series terminal in
transparent mode.
For the A- and QnA-series, MECOM supports the usage of [Q]C24 multidrop net when using
Serial communication. Further, MELSEC NET is supported for the A- and QnA-series when
using either Serial or Ethernet communication.
MECOM also has support for modem usage. Remote stations can be called from the
FactoryLink station and then data may be transferred. MECOM also supports external remote
stations calling up the FactoryLink station and then lets MECOM be master.

FactoryLink Device Interfaces - OPC and Other Guide / 251


• 5 | MECOM
Overview



Data transferred can be converted to and from engineering units using a scaling option, where
gain and offset is specified. Further, MECOM supports the usage of tag arrays and indirect
addressing.
When an A- or QnA-series PLC is used, MECOM supports data transfer to extension file
registers.
MECOM replaces the earlier drivers FLxxx-MEC24 and FLxxx-MEE71. To upgrade an
application using any of those drivers, first convert the application to use MECOM for that
FactoryLink version (see manual for corresponding MECOM version), then the application
can be restored to this version of FactoryLink and MECOM.
Software MECOM can use
• FactoryLink for Windows 2000
Hardware products MECOM can use
• MAC 50 / MTA 250 Version 3.00
• MAC 90 / MTA-G1 Version 1.0
• MAC 50 CM, MAC 10 CM Version 1.3
• E-series operator terminals.
Related products from Beijer Electronics
• MECOMLI COMLI protocol driver.
• MelDDE DDE interface for Mitsubishi PLC communication

252 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Required Hardware and Software

R EQUIRED H ARDWARE AND S OFTWARE

Hardware
The following tools are needed to install, configure and run the Mitsubishi PLC driver
communicating with the PLC(s).
• See the FactoryLink manual for hardware and software requirements.
• At least one free serial communications port if used.
• Ethernet network adapter for Ethernet communication if used.
• 1 Mbyte free fixed disk space.
• Modem, and cable to modem if used.
• [Q]C24 computer link module and cable to this module if used.
• [Q]E71 Ethernet interface module, cables and terminators if used.
• Signal converter if direct CPU communication is used.
• Other special cables if communication is done through a MAC/MTA/E-series terminal in
transparent mode. For more information, see page 285.

Software
If Ethernet communication is used, in PLC there must be program to initialize and maintain the
[Q]E71 module.
Windows 2000 has a built-in TCP/IP communication. By default this communication is
disabled. To activate the TCP/IP communication, open the Control Panel and then select
Network.

FactoryLink Device Interfaces - OPC and Other Guide / 253


• 5 | MECOM
Installing The Mitsubishi PLC-driver



I NSTALLING T HE M ITSUBISHI PLC- DRIVER
Installation must be done using the supplied setup program.
During installation, the logged in user should have write permission to the Registry
(HKEY_LOCAL_MACHINE). The Administrator user account has this permission
Note: This program should be installed on Windows 2000 only.

Enabling Ethernet Communication


During the installation the user must choose if communication to AJ71[Q]E71 will be possible.
If the communication is enabled but no low level TCP/IP software is enabled it will not be
possible to run the MECOM driver even if only Serial communication is used.
If the user at a later occasion wishes to use the Ethernet communication, when it was installed
without this communication enabled, it is possible to enable it by installing the MECOM driver
once more and at this time enabling the Ethernet communication.

Installation
To install the MECOM driver, do as follows:
1. Make sure FactoryLink already is installed.
2. Go to [install directory]\Program Files\Siemens\FactoryLink\mecom.
3. Double-click setup.exe and follow the on-screen instructions.
4. If Ethernet is to be used, click Yes to the “AJ71[Q]E71 access” question.
It is also possible to start a DOS session and type “setup” from the directory where MECOM is
located.

Add Data in System Configuration


The task name, task description and executable file must be added in the System Configuration
Information table in Shared domain.
Each executable file is dedicated for one Serial communication port; MECOM1 used for
COM1 and so on. When Ethernet communication is used, any MECOM task may be used. It is
also possible to combine a task for serial communication and Ethernet communication.
To get correct parameters for the MECOM driver do as follows.
1. First open the System Configuration Information table.
2. Go to the last record. Create a new record. This will be inserted after the last one.

254 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Installing The Mitsubishi PLC-driver

3. Some of the fields are special for the MECOM driver. Change the values of the fields
according to table below and use the row that matches the used communication port.

Flags Task Name Task Description Start Order Executable File


R MECOM1 Mitsubishi PLC interface – COM1 4 bin\mecom1.exe
R MECOM2 Mitsubishi PLC interface – COM2 4 bin\mecom2.exe
R MECOM3 Mitsubishi PLC interface – COM3 4 bin\mecom3.exe
R MECOM4 Mitsubishi PLC interface – COM4 4 bin\mecom4.exe
R MECOM5 Mitsubishi PLC interface – COM5 4 bin\mecom5.exe
R MECOM6 Mitsubishi PLC interface – COM6 4 bin\mecom6.exe
R MECOM7 Mitsubishi PLC interface – COM7 4 bin\mecom7.exe
R MECOM8 Mitsubishi PLC interface – COM8 4 bin\mecom8.exe
R MECOM9 Mitsubishi PLC interface - COM9 4 bin\mecom9.exe

If several MECOM tasks are to be used, repeat this procedure until all tasks are configured.

Upgrading
If you are upgrading the MECOM driver do as follows:
1. Make a multiplatform backup copy of your FactoryLink application.
2. Install MECOM according to installation instructions (See “Installation” on page 254..)
3. Restore your FactoryLink application.

FactoryLink Device Interfaces - OPC and Other Guide / 255


• 5 | MECOM
PLC Configuration



PLC C ONFIGURATION
The Mitsubishi PLC driver has three folders in the Configuration Explorer.

Mitsubishi Definition

There are three tables under the Mitsubishi Definition folder.


• Communication Task Definition
• Remote Station Definition
• PLC Definition.
Definition of tasks, remote stations, and PLCs.

For each setup, you define a name that is used in the Mitsubishi Write and Read Header tables:
• Task Name
• Remote Name
• PLC Name

256 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
PLC Configuration

Using names for these parameters has a great advantage. If a parameter will be changed, this
has to be done one time only. For instance, if the phone number for a remote station is changed,
the number has to be changed only in the Remote Station Definition table. All tables using this
remote station will immediately use the new number.
Note: A special case is if the communication port is changed. In that case the task
name and executable file must be changed as well in the System Configuration table
in Shared domain.

Mitsubishi Read

Information about what data to read from PLCs, and when to do it.

Read and Write Tables - Puts the


pieces together. They define when,
where, and what to be read or
written from / to the PLC.

- When (trigger and condition) -


Where (Task, Remote, PLC) -
What (Tags and I/Os)

Mitsubishi Write

Information about what data to write to PLC, and when to do it.

FactoryLink Device Interfaces - OPC and Other Guide / 257


• 5 | MECOM
Mitsubishi Definition Tables



M ITSUBISHI D EFINITION TABLES
All Task Names, Remote Names, PLC Names and Table names are converted to uppercase
letters. Avoid using local national characters.

Communication Task Definition Table

Accessing

Device Interfaces > Mitsubishi Definition > Communication Task Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Task Name Mnemonic for the task X 1 to 16
characters
Task Number Communication task number X 1 to 128
When 1 is used the exe-file MECOM1.EXE will be used, (default = 1)
when 2 is used MECOM2.EXE will be used and so on.
Only MECOM1 to MECOM9 are installed automatically,
so if higher numbers than 9 are needed, copy
MECOM1.EXE to the required MECOMxxx.EXE
When Serial communication is used, the communication
port number is the same as the task number. Thus COM1
will be handled by MECOM1.EXE and so on.
When Ethernet communication is used, the user is free to
select any task number. To improve performance for the
Ethernet communication it is possible to start several
MECOM tasks and assign different PLCs for the different
tasks.
It is possible, but not recommended, combining a task for
both Ethernet protocol and one Serial protocol.
Baud rate Baud rate for the communication (Serial communication X 300 - 115200
only) (default =
9600)
Parity Parity for the communication (Serial communication X NONE, ODD
only) (default),
EVEN
Data bits Number of data bits (Serial communication only) X 7, 8 (default)
Stop bits Number of stop bits (Serial communication only) X 1 (default), 2

258 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Definition Tables

Field Name Description Req. Valid Entry Valid Data Type


Modem Makes it possible to test an application without using X YES, NO
disable specified modem (Serial communication only) (default)
Ready tag Tag activated when initialization phase is completed
External Tag indicating status for call-ups from an external device tag name analog
callup status
tag
Hangup Trigger for hanging up modem. Used for both internal tag name
trigger tag and external callups. (Serial communication only)
Current Tag where MECOM writes a message about current tag name message
operation (successful) operation.
message tag
Error detect Tag that will be activated when an error for the tag name digital
tag communication task occurred.
Error Tag where information about the latest error will be tag name message, analog
Message tag available. The error message will be preceded by the Task
Name if the tag is a message tag.
Trace Level Tag where operator may change the current trace level tag name analog
tag during operation. The information shown during normal
operation is about triggered tables (remote stations).

FactoryLink Device Interfaces - OPC and Other Guide / 259


• 5 | MECOM
Mitsubishi Definition Tables



Remote Station Definition Table
This table is used for defining modem communication. No parameters in this table are used by
a task dedicated for the Ethernet protocol only.

Accessing

Device Interfaces > Mitsubishi Definition > Remote Station Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Remote Mnemonic for the remote station X 1 to 16
Name characters
Phone Phone number to be dialed when the remote station is X 1 to 32
number accessed. The phone number will be preceded by “atdt” characters
and it is permitted to add special modem command
characters in the phone number as ‘p’ for pulse dial in the
phone number.
Phone Tag containing phone number to be dialed when remote tag name message
number by station is accessed. The tag is evaluated at dial up time. If
tag the tag is empty, it will be assigned the value from Phone
number. If the value changes during an active connection,
it remains active. To connect to a new number, the current
connection must first be terminated. See Hangup delay
and Hangup trigger tag (in the Communication Task
Definition table).
Hangup Delay in minutes after last access to the remote station
Delay that the modem will be automatically hung up.
Modem Tag indicating modem status for the remote station. tag name analog
status During initialization all remote stations are called and this
tag is also updated during the initialization phase.

260 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Definition Tables

PLC Definition Table


This table is used for defining the PLCs available and how to communicate with them.

Accessing

Device Interfaces > Mitsubishi Definition > PLC Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


PLC Name Mnemonic for the PLC. The PLC Name might be used X 1 to 16
for several physical PLCs at different remote stations if characters
modem is used.
Protocol Protocol to use X
Valid Entry explanation:
C24 – C24 Serial communication
CPU – Serial CPU-port communication (default)
E71 – E71 Ethernet communication
QC24 – QC24 Serial communication
QE71 – QE71 Ethernet communication.

When CPU-protocol is used, MECOM detects what kind


of PLC-type is used. Currently all FX-series and all
A-series CPU’s are supported, but not the QnA-series.
MNET10 The PLC MELSEC NET 10 network number to use. 0 (default),
Network 0 means no MNET10 network. This parameter is 1 - 239
ALWAYS used for QnA-series communication protocols.
This parameter tells what network number the PLC is
connected to. This combined with MNET Node, points
out the specific PLC.
MNET Node The PLC MELSEC NET node to use. (always used for A- HOST
and QnA-series communication) This parameter tells (default),
what PLC in the MELSEC NET communication will be MASTER,
established to independent of the protocol. When SLAVE1 - 64
communicating to the connected PLC, use the “HOST”
node.
Note: When MNET10 Network is used (other than
0), HOST and MASTER are NOT permitted. Use the
PLC’s real Node number for that network instead.

FactoryLink Device Interfaces - OPC and Other Guide / 261


• 5 | MECOM
Mitsubishi Definition Tables



Field Name Description Req. Valid Entry Valid Data Type
C24 Node The [Q]C24 multidrop net node ([Q]C24-protocol only) 1 to 31
(default = 0)
MAC Node Multidrop net node for a MAC terminal (Serial 0 to 63
communication only) [default = 0
(not used)]
IP-Address IP-Address for the [Q]E71 Ethernet interface module.
The IP-Address is entered as an 8 digit hexadecimal
value. (Ethernet protocols only)
IP-Port IP-Port to use at the [Q]E71 Ethernet interface module.
The IP-Port number is entered as a hexadecimal value. A
buffer in the [Q]E71 must be assigned for the used
IP-Port number. When using Auto UDP, the default port
number in the module is 1388H. (Ethernet protocols
only)
Local IP-Port Local IP-Port to use at the PC (computer) side. This
parameter should be 0 (or blank) when using TCP or
Auto UDP. This parameter is only used for some special
PLC UDP configurations, where the client’s (the PC) IP
and port addresses are fixed by the PLC code. The Local
IP-Port number is entered as a hexadecimal value.
(Ethernet protocols only)
TCP/UDP Select TCP/IP or UDP/IP communication. UDP has a
number of advantages over TCP. These advantages
include better performance, and better handling of
timeouts on disconnected PLCs. On top of this, an UDP
port on the [Q]E71 allow several clients simultaneously,
and requires less programming of the PLC itself. The
default setting is TCP. (Ethernet protocols only.)
Timeout, Time for timeout in ms. This parameter is used when 0 to 32767
normal communication with PLC already has started. (default =
2000)
Timeout, Time for timeout in ms. Used when communication with 0 to 32767
quick PLC starts. (default =
200)
Optimize Optimization method to minimize transferred data DATA
(DATA) or minimize the number of messages (MES). (default),
When using Ethernet protocols, the MES optimization MES
method normally gives the best performance.

262 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Read Tables

M ITSUBISHI R EAD TABLES


When the Mitsubishi Read folder is opened, all Read Headers already defined are shown. To
each of these Read Headers a is attached. The Read Header table tells when data is to be read
and the Read Table tells what data to read.

Read Header Table


This table defines when groups of data should be read from a PLC.

Accessing

Device Interfaces > Mitsubishi Read > Read Header

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Table Name Mnemonic for the read table X 1 to 16
alphanumeric
characters
Trigger Tag Tag that works as trigger for the table. If Trigger type is tag name digital
set to “CONT”, no tag is needed.
Trigger Type Tells how the trigger is working. X
Valid Entry explanation:
CHANGE – Data is read whenever the trigger has its
change bit set
CONT – (continuous) Data is read as fast as possible at
all times
RISE – Data is read whenever the trigger tag changes
from OFF to ON
FALL – Data is read whenever the trigger tag changes
from ON to OFF
ON – Data in the table is read as fast as possible
whenever the trigger tag is ON
OFF – Data in the table is read as fast as possible
whenever the trigger tag is OFF
Task Name Name for the task to be used when reading data for the X
table. Task name must be defined in the Communication
Task Definition table.

FactoryLink Device Interfaces - OPC and Other Guide / 263


• 5 | MECOM
Mitsubishi Read Tables



Field Name Description Req. Valid Entry Valid Data Type
Remote Name for the remote station to be called when reading
Name data for the table. Remote name must be defined in the
Remote Station Definition table.
PLC Name Name for the PLC to be accessed when reading data for X
the table. The PLC name must be defined in the PLC
Definition table.
If the feature PLC Name by tag is used, this parameter
must contain a PLC name for a PLC using the protocol
that will be used. If both Serial and Ethernet protocol will
be used by the task, a PLC using Serial protocol must be
selected.
PLC Name Tag containing the name of the PLC to be accessed. The tag name message
by tag name in this tag must be defined in the PLC Definition
table.
Read at If “YES” is selected, tag values for the read table will be YES, NO
startup read from PLC at program start-up. This is very useful if
modem is used.
Disable table Tag controlling the table. If the tag is set, the triggering of tag name digital
tag the table is ignored.
File Register Tag selecting extension file register bank tag name analog
Bank In the Mitsubishi A- and QnA-series, there are a number
of extension file register banks available.
When using protocols other than CPU, the following
applies:
If bank 0 is selected, or no bank at all is specified,
the extension file register bank currently being used
by the PLC will be selected.
To use bank 0, independent of what bank currently
being used by the PLC, use bank 1000.
When using CPU-protocol the following applies:
The bank selected will be used independent of the
PLC program.
If no bank is specified, bank 0 will be used.
Otherwise, bank 1 - n may be selected. The maximum
limit depends on the used memory cassette.
Note: The QnA-series PLCs uses 32k register
blocks, while the A-series uses 8k blocks.

264 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Read Tables

Field Name Description Req. Valid Entry Valid Data Type


Completion Tag forced to ON when operation for the table is tag name digital
trigger tag completed or interrupted. Status for the read operation is
available in the Completion status tag.
Completion Tag telling status of the read operation. 0 means no error, tag name analog, message
status tag -1 means “read at startup” is performed successfully and
other any non-zero positive value is an error code.
If a message tag is used, the corresponding error message
displays. See “Troubleshooting” on page 291 for an
explanation of common errors.

Read Table
This table defines what data to be read at a certain time.

Accessing

Device Interfaces > Mitsubishi Read > Read Header > “table name” > Read Table

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Tag Name Name of tag to read in the PLC X tag name digital, analog,
float, message,
longana
I/O Complete name of device in PLC to be read (example: X
D45, X1F, W2FB). No leading zeroes are required but
may be added to increase readability.
Note: When Index tag is used, the address of the
device is calculated as the sum of the original address
and the value of the index tag. When Timers and
Counters are read, the contact status of the I/O is
returned if the tag type is digital; otherwise, the
current value is returned.
Index tag If this parameter is defined, the value of the tag is used as tag name analog
an index for the addressed device.
The binary value of the tag is used and devices are
numbered octal, decimal or hexadecimal. Example: if the
parameter I/O is X40 and the value of the index tag is 200
(decimal), X108 is read.

FactoryLink Device Interfaces - OPC and Other Guide / 265


• 5 | MECOM
Mitsubishi Write Tables



Field Name Description Req. Valid Entry Valid Data Type
Number of This parameter is used when a tag array is read. The
tags parameter specifies the number of tags to be updated with
data from PLC, starting with I/O or the combination of
I/O and Index tag.
PLC data Specifies what type, if other than normal for the I/O, of
type data is stored in PLC.
Valid Entry explanation:
DEFAULT – Normal I/O data type (same as leaving field
blank)
DOUBLE – Two 16-bit registers used as one 32-bit
integer register
FLOAT – Two 16-bit registers used as one 32-bit
precision float register
UNSIGNED – One 16-bit register used as an unsigned
register
BCD – One 16-bit register used as a BCD register
Message Number of 16-bit registers to be read from PLC to 1 to 40
Length MESSAGE string. One 16-bit register in PLC contains 2
characters.
Gain & Offset The value read from PLC is multiplied with Gain and real numbers
then Offset is added to the result and finally the result is like "1.25" or
stored in the tag. If Number of tags is used, these "1.2E-3"
parameters are common for the whole tag array.
Mask The value from the PLC will be bitwise and-operated hexadecimal
with the value specified. Only used when the tag is digital 1 to FFFF
or analog and the PLC device is a 16-bit register.

M ITSUBISHI W RITE TABLES


When the Mitsubishi Write folder is opened, all Write Headers already defined are shown. To
each of these, a Write Headers is attached. The Write Header table tells when data is to be
written and the Write Table tells what data to write.

Write Header Table


This table defines when groups of data should be written to a PLC.

Accessing

Device Interfaces > Mitsubishi Write > Write Header

266 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Write Tables

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Table Name Mnemonic for the write table X 1 to 16
alphanumeric
characters
Trigger Tag Tag that works as trigger for the table. If no trigger is tag name digital
specified all tags in the table will be separately written
when the value of the tag has changed. This is the same as
using the option Write if changed for all tags in the write
table.
Trigger Type Tells how the trigger is working. X
Valid Entry explanation:
CHANGE – Data is written whenever the trigger has its
change bit set (default)
CONT – (continuous) Data is written as fast as possible at
all times
RISE – Data is written whenever the trigger tag changes
from OFF to ON
FALL – Data is written whenever the trigger tag changes
from ON to OFF
ON – Data in the table is written as fast as possible
whenever the trigger tag is ON
OFF – Data in the table is written as fast as possible
whenever the trigger tag is OFF
Task Name Name for the task to be used when writing data for the X
table. Task name must be defined in the Communication
Task Definition table.
Remote Name for the remote station to be called when writing
Name data for the table. Remote name must be defined in the
Remote Station Definition table.
PLC Name Name for the PLC to be accessed when writing data for X
the table. The PLC name must be defined in the PLC
Definition table.
If the feature PLC Name by tag is used, this parameter
must contain a PLC name for a PLC using the protocol
that will be used. If both Serial and Ethernet protocol will
be used by the task, a PLC using Serial protocol must be
selected.

FactoryLink Device Interfaces - OPC and Other Guide / 267


• 5 | MECOM
Mitsubishi Write Tables



Field Name Description Req. Valid Entry Valid Data Type
PLC Name Tag containing the name of the PLC to be accessed. The tag name message
by tag name in this tag must be defined in the PLC Definition
table.
Read at If “YES” is selected, tag values for the write table will be YES, NO
startup read from PLC at program start-up.
Disable table Tag controlling the table. If the tag is set, the triggering of tag name digital
tag the table is ignored.
File Register Tag selecting extension file register bank tag name analog
Bank In the Mitsubishi A- and QnA-series, there are a number
of extension file register banks available.
When using protocols other than CPU, the following
applies:
If bank 0 is selected, or no bank at all is specified,
the extension file register bank currently being used
by the PLC will be selected.
To use bank 0, independent of what bank currently
being used by the PLC, use bank 1000.
When using CPU-protocol the following applies:
The bank selected will be used independent of the
PLC program.
If no bank is specified, bank 0 will be used.
Otherwise, bank 1 - n may be selected. The maximum
limit depends on the used memory cassette.
Note: The QnA-series PLCs uses 32k register
blocks, while the A-series uses 8k blocks.
Completion Tag forced to ON when operation for the table is tag name digital
trigger tag completed or interrupted. Status for the write operation is
available in the Completion status tag.
Completion Tag telling status of the write operation. 0 means no error, tag name analog, message
status tag -1 means “read at startup” is performed successfully and
other any non-zero positive value is an error code.
If a message tag is used, the corresponding error message
displays. See “Troubleshooting” on page 291 for an
explanation of common errors.

268 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Write Tables

Write Table
This table defines what data to be written at a certain time.

Accessing

Device Interfaces > Mitsubishi Write > Write Header > “table name” > Write Table

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Tag Name Name of tag to write to PLC X tag name digital, analog,
float, message,
longana
I/O Complete name of device in PLC to be written (example: X
D45, X1F, W2FB). No leading zeroes are required but
may be added to increase readability.
Note: When Index tag is used, the address of the
device is calculated as the sum of the original address
and the value of the index tag. When Timers and
Counters are written, data is written to the contact
status of the I/O if the tag type is digital; otherwise,
data is written to the current value.
Write if If YES is selected, the value of the tag is written to PLC NO, YES,
changed every time its value changes even if the table itself has NEVER
not been triggered.
Valid Entry explanation:
NO – The value is normally written to the PLC when the
table is triggered (same as leaving field blank).
YES – The value is written to the PLC when the table is
triggered, and each time the tag’s value changes.
NEVER – The value will ONLY be written to the PLC
when the table is triggered. This will also exclude this tag
from the “Match processing.”
Note: NO (or blank) may be overridden (to YES) by
the driver if: 1) No trigger tag is defined and trigger
type is set to CHANGE, or 2) A “Match” is found in
a read table that reads the same tag from the same I/O.
In this case, an internal “read inhibit if changed” is
set for the tag. These two cases will produce a
warning at start up (if warnings are enabled, “-W”).

FactoryLink Device Interfaces - OPC and Other Guide / 269


• 5 | MECOM
Mitsubishi Write Tables



Field Name Description Req. Valid Entry Valid Data Type
Index tag If this parameter is defined, the value of the tag is used as tag name analog
an index for the addressed device.
The binary value of the tag is used and devices are
numbered octal, decimal or hexadecimal. Example: if the
parameter I/O is X40 and the value of the index tag is 200
(decimal), X108 is written.
Number of This parameter is used when a tag array is written. The
tags parameter specifies the number of tags used to update
data in the PLC, starting with I/O or the combination of
I/O and Index tag.
PLC data Specifies what type, if other than normal for the I/O, of
type data is stored in PLC.
Valid Entry explanation:
DEFAULT – Normal I/O data type (same as leaving field
blank)
DOUBLE – Two 16-bit registers used as one 32-bit
integer register
FLOAT – Two 16-bit registers used as one 32-bit
precision float register
UNSIGNED – One 16-bit register used as an unsigned
register
BCD – One 16-bit register used as a BCD register
Message Maximum number of 16-bit registers to be updated in the 1 to 40
Length PLC from Message tag. One 16-bit register in PLC
contains 2 characters.
Gain & Offset First Offset is subtracted from the value of the tag and real numbers
then divided by Gain and finally the result is written to like "1.25" or
PLC. If Number of tags is used, these parameters are "1.2E-3"
common for the whole tag array.
The same values for Gain and Offset should be specified
for a tag that is both read and written in PLC.

270 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Mitsubishi Write Tables

Minimum Configuration Example


Below is an example of what minimum data must be configured to make the MECOM driver
run properly.

Data in Mitsubishi Definition Tables

In the Communication Task Definition table the Task Name must be defined. The default
communication port COM1 will be used and communication parameters will be 9600, O, 8, 1.
If FX-PLC is used, the communication parameters must be changed to 9600, E, 7, 1.
For communication to an AJ71C24 computer link module, use the default setting for switches
(See “C24-Protocol” on page 285.) Further, set the STATION NO-rotary-switches to 0 and the
MODE-rotary-switch to position 1 on the AJ71C24. It is assumed there is only one PLC.
If A-CPU communication is wanted no changes has to be done.

Task Data
Task Name Baud Rate Parity Stop Bits
Number Bits
PCPORT 1 9600 ODD 8 1

(Columns not shown here are left blank.)


No data has to be entered in the Remote Definition table.
In the PLC Definition table the PLC Name must be defined. If A-CPU or FX-CPU
communication is to be used the parameter Protocol must be changed to “CPU”. For the
remaining parameters the default values can be used.

PLC Name Protocol MNET C24 MAC Timeout Timeout Optimize


Node Node Node Normal Quick
TESTPLC C24 HOST 0 0 2000 200 DATA

(Columns not shown here are left blank.)

Data in Mitsubishi Read Tables

Enter data as follows in the Read Header table:

Trigger Remote
Table Name Trigger Type Task Name PLC Name
Tag Name
RTABLE sec1 CHANGE PCPORT TESTPLC

FactoryLink Device Interfaces - OPC and Other Guide / 271


• 5 | MECOM
Function Description



It is assumed that sec1 is a digital tag that will be activated with 1 seconds interval by the
TIMER. Click when this record is in focus in the table. Enter data as follows in the Read
Table table:
Tag Name I/O

Datavalue D25

It is assumed that datavalue is an analog tag. When MECOM is running the tag datavalue will
be updated one time per second with the value from D25 in the PLC.

F UNCTION D ESCRIPTION

Startup
At the start of the FactoryLink application, data for MECOM is validated.
First, there are tests made to verify that all used Task Names, Remote Names and PLC Names
are defined in the appropriate tables. Then all PLCs specified in the Read Header tables and
Write Header tables will be accessed to test that data is correct for the used PLC. To be able to
validate tables with Remote Name defined these remote stations are called.
If an error is detected, MECOM terminates after the data validation phase. The first error found
will be shown in the FactoryLink system picture. All errors are printed on screen and they
might be seen in the FLControlPanel, if the parameter Flags is “FSR” for MECOM in the
System Configuration table.
During this phase the “read at startup” function also is performed. When a table has been read
the completion status tag is set to -1 and the completion trigger is activated. By using this
information the operator knows if the information in the tags are valid.
If modem is used the start-up procedure may take a long time. Therefore there is a Ready tag
available, which will be activated when the start-up procedure is completed.
During start-up phase and normal operation there is information available in the Operation
Message tag telling what MECOM is currently doing. For each remote stations there is
available a modem status tag telling the actual status for the connection to the remote station.

Stand-alone Validation
It is possible to run MECOM without any FactoryLink application active to validate data for
the driver. This might be useful if it takes a long time to start the FactoryLink application.
Before the validation can be done the CT-files must be updated from where data is read by
MECOM.
First execute:

272 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

ctgen
To tell MECOM it is running stand-alone, add the program argument “-V”. It is also possible
to log the printed information into a log file using the program argument “-Lfilename”. E.g.
validating the information for COM2, showing warning messages (”-W”), tracing PLC
accesses (“-T8”), and logging data to C:\FLAPPS\LOG\MECOM2.LOG do as follows.
mecom2 -v -w –t8 -lc:\flapps\log\mecom2.log
If another application directory other than %FLAPP% is used, add the program argument
“-adrive: \directory”. Note, in this case, CTGEN must also be used with this program
argument.

Transfer of Data

General

Data is read or written for a table when its trigger tag is activated according to the trigger type.
When the operation is completed the completion status tag is set and completion trigger tag is
activated.
For write tags the flag write if changed can be set. This means that the tag will be separately
written immediately if tag is changed without the table being triggered. If there is no trigger tag
defined for a write table, all tags in that table will get the write if changed option set.
If the operation fails, several actions may take place. First the error message is written in the
run manager picture and in the window for MECOM, if used with FSR-flags. Then, if it is a
new error status (not the same error status as last time), the error message tag is initialized and
the error trigger tag is activated. The Task Name is available first in the error message. Finally,
if a log file is used, a row is printed in the log file. To the information in the log file a time
stamp and information about what remote station and PLC causing the error will be added.
When an error is detected, it appears in the run manager picture. If the error disappears, the
status changes to “running” but the error message remains in the picture for another 30 seconds
and then it is cleared. If the error does not occur again due to the table not being triggered, the
error status remains for 30 seconds and thereafter the error is ignored. Then the status changes
to “running” and, as described earlier, the error message will remain in the picture for another
30 seconds.

Tag Arrays

Tag arrays are supported by MECOM. The number of tags to read or write is defined in the
field Number of tags. However make sure that FactoryLink limits for the different kinds of tag
arrays are not exceeded.
When multidimensional tag arrays are used, MECOM starts with the specified tag, then
continues until Number of tags are read/written. The rightmost index is the least significant
index. If an array like DataValues[10][10] (array dimension 10,10) is to be read from registers
D0 through D99, use the following table values:

FactoryLink Device Interfaces - OPC and Other Guide / 273


• 5 | MECOM
Function Description


Tag Name I/O ... Number of Tags ...


DataValues[0][0] D0 ... 100 ...

This means:

Data from Register Will be Stored in Tag


D0 DataValues[0][0]
D1 DataValues[0][ 1 ]
... ...
D9 DataValues[0][9]
D10 DataValues[1][0]
... ...
D99 DataValues[9][9]

Message Tags

Message tags are tags containing text. Each character requires one byte, and equals a half
16-bit register in the PLC. The tags can also have a variable text length. The MECOM driver
represents the first character in the first register’s least significant half. The second character in
the most significant half. The third in least significant half of the second register, and so on.
The number of registers that MECOM accesses is defined in the read/write table(s). The value
in the column Message length defines the number of registers (not the number of characters).
The text length can then be up to twice that amount. If a message written to the PLC is shorter
than this, all the remaining register halves will be set to zero. On the other hand, when a
message is read from the PLC, the first register-half equalling zero will mark the end of the
message. The remaining halves will be ignored (not stored in the tag). If a message length is
equal to the defined length (or longer), the read/write operation will stop at the defined length.
No “zero-termination” will be needed. Make sure the tag itself is long enough to hold the
value.
Assuming the following definitions in the read/write table:
Tag Name I/O ... Message Length ...
MyText D0 ... 3 ...

This will allow the tag MyText to exchange up to six characters (three registers) with the PLC,
starting with register D0. If MyText contains the text “abcde”, the following will be written to
the PLC:
Register Characters Values(hex) Stored Value
D0 ”a”and ”b” 61 and 62 6261(hex) = 25185(dec)

274 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

Register Characters Values(hex) Stored Value


D1 ”c”and ”d” 63 and 64 6463(hex) = 25699(dec)
D2 ”e”and zero 65 and 00 0065(hex) = 101(dec)

If register D0 through D2 contains 6261, 6463 and 6500, the following will be read from the
PLC:
Register Read Value (hex) Values (hex) Characters
D0 6261 61 and 62 ”a”and ”b”
D1 6463 63 and 64 ”c”and ”d”
D2 6500 00 and 65 zero (=end) and an ignored ”e”

The tag MyText would contain the text “abcd” after the read operation.

Indirect Addressing

Another feature is indirect addressing. An index tag can be defined for each tag in the read
tables and write tables. If used, the value of that tag is added to the original address for the
device specified in the I/O field. E.g., if the parameter I/O is “M123” in a read table and an
index tag is specified for the device. If the index tag has the value 419 when the table is
triggered, M542 will be read.

Gain and Offset

Further, the usage of Gain and Offset is supported by entering real values, like 1.25 or 2.5E-3
(=2.5*10-3) in the appropriate fields. When reading data the value from the PLC is multiplied
with Gain and Offset is added. When data is written to the PLC, first Offset is subtracted from
the value from the Real Time Database and the remaining value is divided by Gain. In this
manner, the same value can be used for Gain and Offset in both read and write tables.

Data Both Read and Written

Tags may be both read from a PLC and written to the very same PLC and PLC I/O. This is
typically used for PID-loop set values where the value may be changed from another operator
than the FactoryLink operator. This will normally create timing problems.
MECOM handles this problem. If the change flag is set for such a tag (=FactoryLink operator
has changed value) the writing of the value from the PLC to the real time database will be
suppressed. In the next moment the new value in the real time database will be written to the
PLC due to the “write if changed” flag.
To avoid that new values, read from the PLC, will be written back to the PLC automatically,
the change flag is cleared for those tags after their values are stored in the real time database.

FactoryLink Device Interfaces - OPC and Other Guide / 275


• 5 | MECOM
Function Description



Before normal operation it is necessary to determine what data in read and write tables fulfils
these conditions. This is called match test. During the start-up phase, for every PLC, all tags
in all read tables for a PLC are compared to all tags in all write tables for that PLC. If a match
is found an internal flag “suppress read if changed” is set for the tag in the read table and in the
write table the option “write if changed” is added for the tag if it is not already set.
This means that, if “Write if changed” is set to NO or left blank, MECOM may force it to YES,
while generating a warning message (if warnings are enabled). Normally this is the desired
action, so the designer should change to “YES” in the Write Table to avoid the warnings.
However, sometimes the application, or parts of it, should not behave like this. For example, if
there is a graph displaying several values read (by manual control) from the PLC. Then, values
should be updated on the graph first, then on a specific command, be sent back to the PLC. By
default, the driver would send each changed value to the PLC as soon as they are made. To
solve this kind of example, the matching feature must be disabled. The recommended way is to
set the “Write if changed” field to NEVER in the Write Table for the involved tags. These tags
will then only be written to the PLC when the specified trigger activates the Write Table.
Note: “NEVER” is added as a stronger word than “NO”, just to be compatible with
old applications designed with blank (or “NO”) in their Write if changed fields.
MECOM will let “old” applications behave as they did before. “NO” has the same
meaning as in all previous versions, and “NEVER” is a new way to inhibit the matching
feature for specific tags.
All this test and functionality can be disabled by using the program argument “-M” in purpose
e.g. to save time at start-up of MECOM.

PLC Data Type Conversion

Registers are normally read and written in PLC with the default device size, independent of the
type of the FactoryLink tag being connected to the I/O. The device size depends on the
I/O-type and in some cases also of the address being used. For X, Y, M etc. the device size is 1
bit. For D, W etc. 16 bits. E.g. the C (current value) C200 - C255 of the FX-series have a
device size of 32 bits.
It is not permitted to use any data type conversion for the following items:
• PLC Timers
• PLC Counters
• FactoryLink MESSAGE tags
Otherwise it is permitted to mix any PLC device type with any FactoryLink tag type. PLC data
type conversion is used when data is not stored as normal for the PLC device. If PLC data type
conversion is requested the following options are available.
• Two 16-bit registers are used as one DOUBLE 32-bit integer register. The corresponding
FactoryLink tag type is LONGANA.
• Two 16-bit registers are used as one 32 bit precision FLOAT register (according to
IEEE-standard). The corresponding FactoryLink tag type is also FLOAT.

276 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

• One 16-bit register is used as an UNSIGNED register. Thus the values are interpreted to be
in the range 0 - 65535.
• One 16-bit register is used as a BCD register. The values are stored hexadecimal and
interpreted to be decimal. The permitted range is 0 to 9999.
Reading or writing data in PLC using the following combinations of data type conversion and
tag-types will cause a warning message, "Data may be lost in conversion", at the start of
MECOM, if program argument “-W” is used:
• Reading data from 16-bit register to DIGITAL-tag.
• Reading data from DOUBLE-register to ANALOG-tag.
• Reading data from DOUBLE-register to DIGITAL-tag.
• Reading data from FLOAT-register to LONGANA-tag.
• Reading data from FLOAT-register to DIGITAL-tag.
• Reading data from FLOAT-register to ANALOG-tag.
• Reading data from UNSIGNED-register to DIGITAL tag.
• Reading data from BCD-register to DIGITAL tag.
• Writing data from ANALOG-tag to 1-bit devices.
• Writing data from LONGANA-tag to 16-bit register.
• Writing data from LONGANA-tag to 1-bit devices.
• Writing data from FLOAT-tag to DOUBLE-register.
• Writing data from FLOAT-tag to 16-bit register.
• Writing data from FLOAT-tag to 1-bit devices.
• Writing data from FLOAT-tag to UNSIGNED register.
• Writing data from LONGANA to UNSIGNED register.
• Writing data from FLOAT-tag to BCD register.
• Writing data from LONGANA to BCD register.

PLC Name by Tag

This feature allows a configuration where several PLCs may use same table. The value of the
message tag configured in the field PLC Name by tag, available in the Read Header table and
the Write Header table, determines which PLC to use.
When the MECOM driver starts there must be a value in this message tag. It is highly
recommended to use a specific default value for that tag.
However, if the tag is empty at start-up, a default value from the configuration will be used, a
value from the field PLC Name. If several tables use the message tag, there is no protection
against configuring different values in the fields PLC Name. The MECOM driver may select

FactoryLink Device Interfaces - OPC and Other Guide / 277


• 5 | MECOM
Function Description



any of these names as default name. In this case there is no guarantee that the PLC Name
configured for a special table will be used, even if the table is triggered as the very first table.

Trigger Limitations

A task in the FactoryLink environment can only receive one change signal for a tag each time
it is changed. This means that it is impossible for the same MECOM task to:
• Use the same trigger tag for different tables when at least one of the trigger types are
CHANGED, RISE or FALL.
• Use a tag with condition “write if changed” in a table combined with the tag as trigger tag
for any kind of table, or the tag as data in another write table.
• Use a tag both read and written to the same PLC and the same register as trigger tag for any
kind of table.
If this functionality is required, use several MECOM tasks (may not always be possible).

Table Limitations

There are some table limitations to consider, especially when converting a large application
from another communications driver.
• A read / write table can’t contain more than 1000 lines.
• Use tag arrays, or more tables, to avoid this limit.
• One MECOM task can’t have more than 500 read or write headers (tables).
• Use tag arrays, PLC Name by Tag, Wild card tables, or more MECOM tasks, if possible, to
avoid this limit.
• Never assume that tags are read / written in any specific order within any table. The order of
processing may change from time to time, depending on the optimization procedures.
• For synchronization purposes, use the completion trigger to determine that all data is
transferred.

Modem Usage

Modem Connect and Disconnect

A remote station is called when one of the following occurs:


• A read table for the remote station is triggered.
• A write table for the remote station is triggered.
• A tag, in a write table for the remote station, with the “write if changed” option is changed.
The last option, using “write if changed,” should be used with outermost care together with
remote stations. It is not advisable to use the trigger type “CONT” (=every time) for a table

278 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

that is used for a remote station since it performs badly when more than one remote station is
used.
The modem remains open until one of the following occurs:
• Hangup delay time-out expires.
• Hangup trigger tag is activated.
• Remote station disconnects.
• A read or write table for another remote station is triggered.
When using modems, it is very important to define the completion status tags and completion
trigger tags. If they are not defined, it is impossible for a user to find out what has really
happened.
To simplify the usage of modem there is a Disable table tag available for each read and write
table. Thus the table can be triggered frequently by a trigger activated by the timer module and
some simple FactoryLink Math&Logic program may select some remote station by enabling
its tables.
If the modem connection is lost, and it is an outgoing call, the modem connection will be
reestablished if the table is triggered.

Wild Card Tables

When modem is used, there may be read tables and write tables without any Remote Name
defined. When these tables are triggered they uses the current modem connection. While these
tables can be activated for any remote station they are called “wildcard” tables. Each time a
wildcard table is used, it is validated against the current PLC. Therefore, a wildcard table may
be used for both FX-CPU and A-CPU communication. Note that only PLC devices that are
common for both PLC types may be used in this case. A wildcard table may only be used after
the modem connection is established.

Modem Status

for modem communication it is possible to define analog tags to get the communication status.
The following status information is available.
0 – OFFLINE
1 – DIALING
2 – ONLINE
3 – HANGING UP
4 – NO CARRIER
5 – LOST CARRIER

FactoryLink Device Interfaces - OPC and Other Guide / 279


• 5 | MECOM
Function Description



Outgoing Calls

For each remote station, it is possible to define a Modem status tag. This tag shows the current
status for the connection to the remote station. Normally this tag is OFFLINE. When a table for
this remote station is triggered the number will be dialled and the status of the tag will be
DIALING. When the modem at the remote station answers, the status of tag is changed to
ONLINE.
If the connection is to be terminated from the FactoryLink side, the status of the tag will be
HANGING UP. When completed, the status of the tag returns to OFFLINE.
If the connection is terminated from the remote side, the status of the tag will be NO
CARRIER. Then the local modem will be hung up and when completed, the status of the tag
will be LOST CARRIER.
If the status of the tag is LOST CARRIER and the Hangup trigger tag is activated, the status
changes to OFFLINE.

Incoming Calls

This function is enabled only if the External callup status tag is defined in the Communication
Task Definition table. The external stations using this feature does not necessarily have to be
defined as remote stations.
If several remote stations are using this feature, they must be accessible in the very same way.
Thus, it must be possible to use the same PLC Name defined in the PLC Definition table.
To be able to access a station calling up there must be at least one read table or write table that
is a wild-card table. It is not automatically known what is calling, there is just a connection. If
any table with a remote station defined is triggered the current connection will be disconnected
and the new number will be dialed.
When calling up FactoryLink, the external stations must be passive. MECOM sets the value
for External callup status tag to ONLINE and the FactoryLink application has to decide what
to do from now on. For example, the tag can be defined as a FactoryLink Math&Logic-trigger
and if the value is ONLINE, a wild-card read table can be triggered for reading information
from the calling station. Another alternative is that a wild card write table is triggered, and
some information is downloaded to the calling station. However, it is recommended that in
some way identification is made of what remote station calling before any data is transferred.
The identification can be done by keeping an identity value in a PLC register that is used by all
PLCs in all remote stations using the external call-up feature.

280 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

Sharing the Communication


In Windows, the MECOM driver may share the communication with other programs, e.g.
MelDDE, using the Mitsubishi protocol driver MELCOM32.DLL.

Serial Communication without Modem

If the communication port is free, MECOM gets access to the communication port. If the port
is occupied by another program using MELCOM32.DLL, MECOM also gets access to the port
but only if the communication parameters (baud rate, parity, data bits and stop bits) are the
very same.

Serial Communication with Modem

Before using a modem, the same conditions are necessary from serial communication without
a modem. Several cases may occur when modem is used. Below is a description of what
happens in different cases
1. Modem is free (on hook)

The new number is dialled and communication will be established with PLC.
2. Modem is busy (off hook)
2.1 Modem is used by MECOM

The modem is hung up. Then the new number is dialled and communication with PLC will
be established.

2.2 Modem is used by another program via MELCOM32.DLL

2.2.1 Same phone number is used

PLC-communication will be established without redialing.

2.2.2 Another phone number is used

The completion status tag will be set with an error code and the completion trigger tag
will be activated.

Ethernet Communication

If the network adapter is free MECOM gets access to the Ethernet communication. If the
network adapter is occupied by another program using MELCOM32.DLL, MECOM also gets
access to the Ethernet communication.

FactoryLink Device Interfaces - OPC and Other Guide / 281


• 5 | MECOM
Function Description



Optimization Methods
There are two optimization methods available in MECOM. You can either minimize the
number of characters transmitted (DATA) or minimize the number of messages (MESS). When
DATA optimization is used care is taken for the protocol overhead size to determine if data
should be read in one or several messages. When MESS is used, as much data as the protocol
permits is read each time if needed.
Deciding which optimization method to use depends on what data is being read and the PLC
reply time. If the PLC reply time is short it is better to use DATA optimization, as less
unnecessary data is transferred. When the PLC reply time is long it is better to use MESS
optimization, because when data is received it contains as much data as possible.
A long PLC reply time is typical when the PLC program is very big or there is a
MAC/MTA-terminal connected between the PLC and FactoryLink.
To determine which optimization method that gives the best result, a program argument “-C”
can be added for showing driver cycle time when anything triggered. The value is shown in the
system picture when there is no error and updated every 5 seconds. When testing the cycle
time, make sure that only one table is triggered frequently, otherwise it is not known what table
or tables being triggered for the shown cycle time.
To get good performance it is recommended to use contiguous PLC devices. Each read table is
read separately, and there is no optimization done between tables. To get information about
communication statistics an ‘S’ can be added to the program argument above, making it “-CS”.
When this function is enabled, data for the latest executed table is shown. The following
information is shown:
• Total time for executing the table
• Total waiting time
• Number of sent messages
• Number of received messages
• Number of sent bytes
• Number of received bytes
To get really good details on the timing, the above can be combined with tracing (see below).
The trace can be sent to a log file (-L switch) for later inspection. Using this method, each
table’s statistics can easily be found and evaluated.
When using the [Q]C24-protocol, the instruction COM can be used at some places in the PLC
instruction program, which makes it possible for the [Q]C24 module to communicate. This can
be useful if the PLC program is very big.
When using Ethernet protocols the MESS optimization method normally gives the best
performance.

282 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Function Description

Trace
It is possible to get trace information from the MECOM driver. The information shown during
normal operation is about triggered tables, called remote stations etc. The information is shown
if the Trace Level tag in the Communication Task Definition table is defined or the driver is
started with the program argument -Tn where n is the requested trace level. The information is
shown in the task window when the Flags “FSR” are set in the System Configuration table.
The following values may be used:
0 – No Trace
1 – Information about what read tables being triggered.
2 – Information about what write tables being triggered.
4 – Information about what PLCs being accessed.
8 – Information about modem connects and disconnects.
16 – Show communication statistics about time, messages, and
transferred bytes. Must be combined with trace level 1 and/or 2.
32767 – All
If more than one trace option is requested at a time, use the sum of the codes for the requested
options.

Messages
All messages created by MECOM may be translated to any language. However the error
messages from MELCOM32.DLL cannot be translated. The translatable messages are
available in MECOM.TXT in the subdirectory MSG. The keywords on the left side of each
row must not be changed. If there are any formatting characters, such as “%s”, in the text, they
must remain unchanged after translation. During operation a string or a value replaces these
formatting characters.

FactoryLink Device Interfaces - OPC and Other Guide / 283


• 5 | MECOM
Function Description



Program Arguments

Argument Description
-Adrive: \directory Set application directory. Use only when driver is run
stand-alone
-C[S] How the driver cycles time when anything is triggered. The
value is shown in the system picture when there is no error and
is updated every 5 seconds. If S is specified, communication
statistics also display.
-I Ignore Unreachable PLCs. At startup, MECOM normally
validates all configured PLCs. If a PLC cannot be reached, it is
considered a severe error and the task terminates. This option
makes it possible to continue processing all other PLCs.
MECOM retries to validate the “unreachable PLCs” each time
a related table is triggered, which gives considerable impact on
performance, depending on the configuration, when using
Ethernet TCP/IP ([Q]E71) protocols.
-Lfilename Log errors, warnings, and trace messages to specified file.
During normal operation the file is closed between every write
operation, which makes it possible to view the file while
FactoryLink is running.
-M Skip match test
-R Skip remote validation. This feature can be used when several
Remote Stations (via telephone modems) are configured. In
very large systems with hundreds of remote stations, the
remote validation can take hours to perform. This feature
minimizes the startup time when starting the FactoryLink
application. By using this feature, the application and the
remote stations are not validated at startup, so failing
configuration / communication is not automatically found.
-Tn Set trace level n. Show information during normal operation
about triggered tables, called remote stations.
-V Validate only. Used when driver is run stand-alone.
-W Show warning messages during validation. Error messages
automatically display. This feature can be of help, when
tracking down “strange” behaviors due to configuration
mistakes. Preferably combined with -L and -T, or when stand
alone validating with -V.
-? Displays a brief summary of command line options. No
communication or validation is performed at all. This option is
only useful when MECOM is started as a stand-alone program
(in a DOS/Command window)

284 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Communication Guide

C OMMUNICATION G UIDE

Serial Communication without Modem


This section describes switch settings and cables to use when communication is done without
any modem. The cables and settings required depend on what protocol and physical
connection that will be used.
If the communication is done through a MAC/MTA/E-terminal in transparent mode, use the
MAC-PROG-CAB from Beijer Electronics or a compatible cable between the host computer
and the MAC/MTA/E-terminal RS232 connector and not the cable or signal converter
described below. The MAC-PROG-CAB is described in the MAC/MTA/E-manual.

C24-Protocol

The switches on the different C24 computer link modules must match the settings of
communication parameters in the Communication Task Definition table. The default setting of
MECOM is 9600,O,8,1, however we strongly suggest that you use 19200,N,8,1 (or higher, if
possible) for speed reasons.
The STATION NO-rotary-switches should be set to the actual station number, if there is a
multidrop configuration. Use 0 if there is only one PLC.
The MODE rotary-switch should be set to position 1 if there is only one PLC. If multidrop is
used, the mode-switch should be set to A on the station the computer is connected to and to 5
on all other stations.
For multidrop configuration, refer to the Computer-Link Module User’s Manual.
Below are examples for some configurations. Please make sure the same settings are used in
the Communication Task Definition table, which is accessed by selecting Mitsubishi
Definition in the Configuration Explorer. Common for the settings are: RS232 port, Sum
Check ON, Mode setting switch set for Format 1 protocol, and finally Write during RUN ON.
AJ71 C24-S8

Station number 00.Mode 1 or A


9600,O,8,1: Switch 12, 13, 15, 16, 21, and 22 ON, remaining OFF.

9600,N,8,1: Switch 12, 13, 15, 21, and 22 ON, remaining OFF.

19200,N,8,1: Switch 12, 14, 15, 21, and 22 ON, remaining OFF.

If a multidrop configuration is used, the switches 23 and 24 should also be set to ON for the
“end” stations, see page 4-8 in the AJ71 C24-S8 manual.

FactoryLink Device Interfaces - OPC and Other Guide / 285


• 5 | MECOM
Communication Guide



AJ71 UC24

Station number 00. Mode 1 or A


9600,O,8,1: Switch 12, 13, 15, 16, 21, 22, and 23 ON, remaining OFF.

9600,N,8,1: Switch 12, 13, 15, 21, 22, and 23 ON, remaining OFF.

19200,N,8,1: Switch 12, 14, 15, 21, 22, and 23 ON, remaining OFF.

A1SJ71C24-R2 and A1SJ71UC24-R2

Station number 00. Mode 1 or A


9600,O,8,1: Switch 4, 5, 7, 8, 9, and 12 ON, remaining OFF.

9600,N,8,1: Switch 4, 5, 7, 8, and 12 ON, remaining OFF.

19200,N,8,1: Switch 4, 6, 7, 8, and 12 ON, remaining OFF.

AJ71 QC24N and A1 SJ71 QC24-R2

Station number 00. Mode 5


9600,O,8,1: Switch 2, 3, 6, 7, 9, and 11 ON, remaining OFF.

9600,N,8,1: Switch 2, 6, 7, 9, and 11 ON, remaining OFF.

19200,N,8,1: Switch 2, 6, 7, 10, and 11 ON, remaining OFF.

115200,N,8,1: Switch 2, 6, 7, 9, 10, and 12 ON, remaining OFF. (*)


(* ) 115200 is ONLY supported by AJ71 QC24N, and only when using ONE port.
If a MAC/MTA-terminal is used in transparent mode, the cable to use between the
MAC/MTA-terminal RS422 connector and the C24 module is described in the
MAC/MTA-manual. However, if you need a physical link between the host computer and the
PLC(s), use the cable description seen below.

286 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Communication Guide

Note: The cable described in the AJ71C24 Users Manual will not work!

C24 PC C24-R2 PC
25 Pins 9 Pins 9 Pins 9 Pins

2 2 3 3
3 3 2 2
7 5 5 7
4 7 7 4
5 8 8 5
6 1 1 6
8 4 4 8
20 6 6 20

CPU-Protocol

Use the serial converter SC05N from Beijer Electronics when communication is done directly
between the host computer and the CPU. When CPU-protocol is used the communication port
settings must be:

Parameter A-CPU FX-CPU

Baud rate 9600 9600


Parity Odd Even
Data bits 8 7
Stop bits 1 1

The default setting is the same as for the A-CPU protocol. If the setting is different, please
enter the same changes in the Communication Task Definition table, which is accessed by
selecting Mitsubishi Definition in the Configuration Explorer.
If the communication is done through a MAC/MTA/E-terminal in transparent mode, use the
MAC-CAB from Beijer Electronics between the terminal and the CPU. In this case, the
communication parameters may be any values supported by both MECOM and the
MAC/MTA/E-terminal.

FactoryLink Device Interfaces - OPC and Other Guide / 287


• 5 | MECOM
Communication Guide



Serial Communication with Modem
Most commands for modems are standard commands. However there are some modems that
require special commands. In this manual the commands are verbally described as well as with
commands valid for US Robotics and Powerbit.

Modem Settings

Minimum required settings for the modem parameters at the host side:
• Ignore DTR signal (AT&D0).
• AutoAnswer must be enabled if call-up from external remote station is used (ATS0=1).
• Flow control must be disabled (AT &K0 for Powerbit and AT &H0 for US Robotics).
• CD must follow hook state (AT&C1).
• English Result codes must be used (ATV1).
• Modem timeout for connect must be at about 45 seconds. (The modem timeout must be
shorter than the timeout for MECOM.) (ATS7=45)
Minimum required settings for the modem parameters at the PLC side:
• Ignore DTR signal (AT&D0).
• Command echo off (ATE0).
• Flow control must be disabled (AT &K0 for Powerbit and AT &H0 for US Robotics).
• Modem reply off (ATQ1).
• Number of signals before answer must be at least 1 (ATS0=1).
To increase flexibility on the host side try to isolate line speed (telephone side) from
DTE-speed (PLC side) in the modem at the remote station. This means that it is not needed to
use the same communication parameters (speed etc.) at the host side as at the remote side.

Communication with MAC CM

Beijer Electronics offers three terminals that support data logging and modem communication.
They are called MAC 10 CM, MAC 50 CM and CM10. The MAC CM terminals have the
same operator functionality as MAC/MTA/E-terminals. The CM10 is a device without any
operator functionality.
When using a MAC CM terminal the parameter Optimize should be set to “MESS” and the
parameter Timeout, quick should be set to 2000 in the PLC Definition table. The modem must
be initialized to use English result codes and after the modem has sent “CONNECT” at
connect it must be silent.

288 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Communication Guide

Cables for Modem Communication

The cable between the host computer and the local modem should be a straight cable with all
signals connected. Below, there are descriptions of how to configure cables for different
purposes.

AJ71 C24

The communication cable between modem and AJ71C24 must be as follows.

C24 Modem C24-R2 Modem


25 Pins Male 25 Pins Male 9 Pins Male 25 Pins Male

2 2 3 2
3 3 2 3
7 7 5 7
4 4 7 4
5 5 8 5
6 6 6 6
8 20 1 20
20 4

A-CPU

When CPU-protocol is used, there must be a MAC/MTA/E-terminal in transparent mode


connected between modem and PLC. The cable between modem and MAC/MTA/E-terminal
should be as follows (a MAC-CAB from Beijer Electronics is used.).

MAC/RS232 Modem
9 Pins Female 25 Pins Male

2 2
3 3
5 7
4
5
6
20

FactoryLink Device Interfaces - OPC and Other Guide / 289


• 5 | MECOM
Communication Guide



FX

For FX PLC, use the SC05N signal converter from Beijer Electronics. The cable between
modem and SC05N should be as follows:

Modem SC05N
25 Pins Male 9 Pins Male

2 2
3 3
5 7
7 5
4 8

Ethernet Communication
The switches on the E71 modules should be set as follows. This means Binary
communication (preferred), and Write during run allowed.
The MODE rotary-switches should be set to 0 (OnLine) and the Ethernet/Cheapernet switch (if
any) should be set according to actual cabling.
AJ71E71 (-S3), AJ71QE71, and A1SJ71QE71-B2

Mode 0 (Online)
Switch 7 ON, remaining OFF.
A1 SJ71 E71 (-S3)

Mode 0 (Online)
Switch 3 ON, remaining OFF.
In the PLC there must be PLC-program for initializing and maintaining the AJ71[Q]E71.
Example program / function block for initializing and maintaining the AJ71[Q]E71 can be
downloaded from www.beijer.se.

290 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Troubleshooting

TROUBLESHOOTING

PLC Errors

Errors Cause and/or Action


Receives NAK from PLCs when Slave PLC has been reset. The master PLC must be reset
communicating through MELSEC NET before the MELSEC NET will work again
Can’t read devices M9000 – M9007 and This is known bugs for AJ71 C24-S3 and AJ71 E71
M9248 - M9255

Error Messages from MECOM


A lot of detailed error messages are available from MECOM. Most of the error messages are
self-explanatory but for some of the error messages it might be useful to give some hints for
how to solve the problems.

Errors Cause and/or Action


Errors when reading CT-files Configuration may have been done in the wrong domain.
It must be done in Shared domain. If the configuration is
tested you may have forgotten to run CTGEN
Errors when reading and writing tags There are general problems with the application. Check
the application by using the programs below with
specified arguments. From a command window, Run:
dbchk -w –i –d
ctgen –c
ctgen –r
Problems might be due to tag arrays exceeding maximum
permitted FactoryLink limits.
Port definition errors There must be one and only one definition for a port.
There must exist at least one table using the port.
Errors due to missing Remote Name or Used Remote Name or PLC Name does not exist in the
PLC Name corresponding tables in the Mitsubishi Definition tables
Various errors in tables The I/O must be a valid I/O for the used PLC. Timers and
counters may not use the facility PLC data type. Gain and
Offset must be valid real values

FactoryLink Device Interfaces - OPC and Other Guide / 291


• 5 | MECOM
Troubleshooting



Error Messages from MELCOM32.DLL
Detailed, explanatory error messages are available from MELCOM32.DLL. The following
information explains some basic errors.

Errors Cause and/or Action


Error DLL (Protocol, No PLC response) Check connection to PLC and communication parameters,
including the Timeouts. Check IP and Port address (if
Ethernet is used)
Error DLL (Protocol, Invalid PLC Check communication parameters
response)
Error DLL (PC Port, Open - in use) Another program is using the (Serial) port. Another client
to MELCOM32.DLL is using the port with different
communication parameters. Do not set up a Local IP-Port
when using TCP/IP.
Error DLL (PC Port, Open - no port) The selected Serial port does not exist in the computer. The
TCP/IP software is not enabled. Reinstall MECOM, and
select support for AJ71 [Q]E71. (Ethernet communication.)
Error DLL (PC Port, Open – no response) Check IP and Port address Make sure Timeout Quick is
longer than PLC scan time.
Error DLL (PC Port, Open – refused) Check IP and Port address Make sure Timeout Quick is
longer than PLC scan time. The Port may be opened
already (the corresponding BUF LED is on). In this case, it
may be another client using it, or by network failures
causing the connection to be lost without successful closing
of it. Some network errors may require the PLC to be reset.

Modem Error Guide


It is highly recommendable that all modems involved are of the same brand and model and of
high quality (well-known manufacturer etc.).
Make sure all modems are first reset to factory settings by typing "AT&F" and clicking Enter,
then save settings by typing "AT&W" and clicking Enter. If there are several factory settings,
try first one that emulates a simple modem (no compression, fancy handshakes etc.).
When possible, try a complete test set-up in the same room in order to supervise the total
sequence of events.
Before using automated calling/answering programs in both ends, connect a terminal in each
end. By manually dialling and viewing output on the terminals you make sure that data gets
through OK. Then reconnect the automated calling program and view remaining terminal. If
everything seems OK, then finally reconnect the automated answering program.

292 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Troubleshooting

Below is a list of some general problems and how to solve them.

Errors Cause and/or Action


The modem does not respond to Check hardware (cable/connectors etc.). Make sure that at least RxD
commands (Receive Data), TxD (Transmit Data) and SG (Signal Ground) are
connected. The cable between computer and modem must be
completely straight, i.e. do not cross RxD and TxD signals.
Type "+++" (enter command mode) and wait for response "OK" or
"0". If the modem responds to your typing, but still doesn't respond
to a program, you probably have a modem with timing problems
(baudrate autodetect etc.) Replace modem.
The modem responds to The modem is set for numeric result codes. Reset to factory settings
commands with a "0" instead of by typing "AT&F" and clicking Enter. If the response is still "0",
"OK" then type "ATV1" and click Enter (set English result codes)
Modem doesn't answer Make sure AutoAnswer is enabled by typing "ATS0=1" and clicking
incoming calls, or answers first Enter (# ring signals before answer). Check hardware and make sure
but then immediately puts hook that DTR (Data Terminal Ready) is connected. Another way is to
back on and disconnects type "AT&D0" and clicking Enter (ignore DTR signal).
If all this fails, you might have a modem that cannot be called up
from a modem with a higher initial baudrate. Replace modem
Modem answers incoming calls, Make sure flow control (RTS/CTS, XonXoff) is disabled by typing
but no data gets through to "AT&K0"(Powerbit) or ”AT&H0”(US Robotics) and clicking Enter
target system
Modem answers incoming calls, Make sure the modem is set for the correct communication
but data gets garbled to target parameters (speed, parity, stop bits etc.) against target system by
system connecting a terminal with the right parameters set and then type
"AT" and click Enter. When the modem replies "OK", it has saved
those parameters and you can reconnect target system
Program doesn't detect off-hook Check hardware and make sure that CD (Carrier Detect) is
state (incoming call) connected. If that doesn't help, type "AT&C1" and click Enter (make
CD follow hook state)
Calling program doesn't detect Some modems must be driven at a high baudrate from the calling
successful connect (the program, even if the answering modem is low speed. Try a higher
answering modem indicates baudrate in the calling program
success)
Calling program timeouts before Make sure that modem wait time for connect is around 45s by typing
modem (modem does not reply "ATS7=45" and clicking Enter. Verify the timeout by dialling
"NO CARRIER" in time and is manually, the clock in some modems are not very accurate
therefore still pending). This can
be a problem when several calls
in sequence must be made

FactoryLink Device Interfaces - OPC and Other Guide / 293


• 5 | MECOM
Troubleshooting



Ethernet Guide
TCP/IP or UDP/IP transports the Ethernet protocols (E71 and QE71) mentioned in this
manual. UDP is normally supported by operating systems supporting TCP. So, if TCP is
installed and enabled, then UDP can also be used. The term UDP is not very well known, since
it is often called TCP, even though it’s not exactly the same.
UDP is like TCP, but with less built-in safety, and therefore, less overhead. Much of this
“missing” safety must be taken care of by the [Q]E71 protocols anyway, which means that
TCP adds features that are already there. Therefore, UDP has shown to be a very suitable
transportation method for these protocols. In short; UDP has only shown advantages over TCP.
The advantages of using UDP include better performance, and better handling of timeouts on
disconnected PLCs. On top of this, one UDP port on the [Q]E71 allow several clients
simultaneously, and requires less programming of the PLC itself.

Speed

Adhere to the following tips to get good communication performance:


• Use MESS optimization for the PLCs accessed through Ethernet.
• Use UDP. (Requires some changes in the PLC program, compared to TCP).
• To improve performance further, start more than one MECOM task for Ethernet
communication, and divide the workload among these MECOM tasks. The tasks can then
read and write data in parallel.
• Avoid addressing a PLC through MELSEC NET. If you do, you will get a performance that
is about the same as for serial communication. Use the MELSEC NET link registers and
access them through the MELSEC NET Host, or install Ethernet modules on all PLCs that
are to be accessed.
• However, if it is necessary to address several PLCs through one Ethernet module (thus using
MELSEC NET), avoid using the same IP-Port address for the PLCs.

Stability

The software is as resistant as the TCP/IP socket implementation permits against cable
disconnections, and PLC stops/resets.
However, if cables are disconnected at a certain moment (very rare indeed) the TCP/IP
communication can not be re-established through the [Q]E71. When this happens the [Q]E71
must be re initialized by the PLC program. This is not needed for UDP.
When TCP/IP is used, a solution is to use a “heart beat” signal. This is a tag that is set by the
FactoryLink Interval timer module at a rate of your choice and is written to the PLC on the
condition “Write if changed” to a device in the PLC. This device can be used in the PLC
program for resetting at timer and itself when set. If the timer is activated (e.g. after 30 sec.) the
communication connection is lost and the [Q]E71 must be re initialized by the PLC program.
Again, this is not needed when using UDP.

294 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Troubleshooting

Timeouts

MECOM will automatically try to re-establish the connection to the PLC if a TCP/IP
connection is lost. However, if reestablishment is not possible (e.g. cable is disconnected),
MECOM may be stopped for at about 30 - 40 seconds in a TCP/IP socket interface until a
message about failure returns. When UDP is used, it is only the (normal) user defined
time-outs delaying the driver cycle. So, to minimize the impacts from unreachable PLC
systems, use UDP.

Design Recommendations

In systems with many PLCs, it may sometimes be necessary to disconnect a PLC. This can
decrease performance severely, especially in large systems where TCP/IP are used. In fact, the
MECOM driver will normally not start, if a PLC is “unreachable”. Use these techniques to
make the system handle these cases:
• Use the -I switch (as Program Argument), to let MECOM ignore unreachable PLCs at
start-up. The driver will then try to establish a connection each time a related table is
triggered.
• Avoid having tables triggered more often than necessary. (Sometimes the data from a certain
table isn’t needed at all.)
• Consider using more MECOM tasks. If one task tries to access an unreachable PLC, via
TCP/IP, it will be locked in a 30-40 seconds time-out (compare to UDP below). Other tasks
will continue to run during this period. Consider switching over from TCP to UDP.
• When using UDP/IP, the timeouts can be set at a reasonable low limit, so the impact on
other (reachable) PLC’s throughput is not too big.
• Create a function in the FactoryLink application, where authorized operators can disable
those tables that reads or writes data to or from each PLC. Use the “Disable” feature in the
Read / Write Header. The tags used for disabling the tables should preferably be used also to
make the operators aware, when trying to access the PLC’s data, that it is disabled. Also, the
tags should be configured for persistence, so the system will remember the state of each
disable tag if FactoryLink is restarted.

FactoryLink Device Interfaces - OPC and Other Guide / 295


• 5 | MECOM
Uninstallation



U NINSTALLATION

Files
The following list identifies the installed directories and files. Files marked with (-) are only
used by this product and may safely be deleted without side effects for any other product. Files
marked with (?) may be used by other products from Beijer Electronics, but may safely be
deleted without side effects for products from other vendors.
%FLINK%\AC
• MECOMDEF.AC
• MECOMRD.AC
• MECOMRD.ACR
• MECOMRD.H
• MECOMWR.AC
• MECOMWR.ACR
• MECOMWR.H
%FLINK%\BIN
• MECOM32.DLL
• MECOM*.EXE
%FLINK%\CTGEN
• MECOM.RTM
• MEPLC.CTG
• MEPORT.CTG
• MEREMOTE.CTG
• MECOMRD.CTG
• MECOMWR.CTG
%FLINK%\HELP\EN (Language-specific)
• MERDWR.HLP
• MESERDEF.HLP
• MEREAD.AHS
• MEWRITE.AHS
%FLINK%\KEY\EN (Language-specific)
• ME_BAUD.KEY

296 / FactoryLink Device Interfaces - OPC and Other Guide


MECOM | 5
Uninstallation

• ME_BITS.KEY
• ME_MNET.KEY
• ME_OPT.KEY
• ME_PARI.KEY
• ME_PORT.KEY
• ME_PROT.KEY
• ME_STOP.KEY
• ME_SUBP.KEY
• ME_TRIG.KEY
• ME_TYPE.KEY
• ME_WCHG.KEY
%FLINK%\MSG\EN (Language-specific)
• MECOM.TXT
• MEDXLT.TXT
• MERXLT.TXT
• MEWXLT.TXT
(Language-specific) means that these files may be copied to other language-specific
directories, to support usage with other languages than English. For example, the KEY files
may be copied to %FLINK%\KEY\DE, and the HLP & AHS files copied to
%FLINK%\HELP\DE, and the TXT files to %FLINK%\MSG\DE to support the German
language.
The following files reside in the Windows System directory:
C:\WINNT\SYSTEM32 (NT4)
? BEGEN32.DLL Beijer Electronics General Library
? MELCOM32.DLL Communication library for MELSEC PLC
? MSOCK32.DLL TCP/IP interface for MELCOM32.

FactoryLink Device Interfaces - OPC and Other Guide / 297


• 5 | MECOM
Uninstallation



Contents of Some Special Files
Further, some lines have been added to three files. Lines marked with (-) are only used by this
product and may safely be deleted without side effects for any other product.
Note: These characters (-) does not exist in the files. %FLINK%\AC\TITLES
• mecomdef.ac
• mecomrd.ac
• mecomwr.ac
%FLINK%\AC\AC2CT.MAP
When the lines in the file %FLINK%\AC\TITLES are removed, the file
%FLINK%\AC\AC2CT.MAP can be updated by using the acctmgr -c -d command.
%FLINK %\ CTGEN\ CTLIST
• meplc: meplc
• meremote: meremote
• meport: meport
• mecomrd: merdhdr meread
• mecomwr: mewrhdr mewrite

Registry Modifications
If the string value named "Task Group Device Interfaces" was found for the key
"HKEY_LOCAL_MACHINE\ SOFTWARE\Siemens\FactoryLink\ Configuration
Explorer\Menus\Node Classes\NC_TASKGROUP" during installation, the substring
",mecomdef,mecomrd,mecomwr" was added to the end of its contents.
This substring can be removed with REGEDIT.

298 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 6





OPC Client

O VERVIEW
OLE for Process Control (OPC) is a standard method of interfacing between computer
applications and process control devices. Using standard interfaces established by the OPC
Foundation, vendors of process control hardware and software can use a single method of
communication. With the OPC components installed, FactoryLink can function as an OPC
server or an OPC client.
The OPC Server task enables a FactoryLink application to provide data to other OPC client
applications. The OPC Server task is designed to perform in both a local and network
environment. For information about the OPC Server task, see the External Connectivity Guide.
The OPC Client task enables a FactoryLink application to obtain data from other OPC servers
like a PLC. During configuration, you designate which registered OPC servers to attach to and
then link FactoryLink tags with groups of specific data items within the server.

Upon application startup, the OPC Client task attempts to connect to the appropriate OPC
servers. The task typically starts any OPC servers that are not already active. Once the servers
are running, the task subscribes to each group defined in the configuration tables. The task then
receives OPC items (data) from the servers and writes the data to the appropriate tags.

FactoryLink Device Interfaces - OPC and Other Guide / 299


• 6 | OPC CLIENT
Performance Considerations



P ERFORMANCE C ONSIDERATIONS
There are factors to consider when using OPC with FactoryLink applications. Performance and
functionality can be affected by the use of OPC to communicate with data sources.

Tag Groups
Under OPC conventions, data is organized into groups. In FactoryLink, these groups are
defined using either the OPC Browser in the OPC Explorer or using the OPC configuration
tables in Configuration Explorer. You can organize your tag groups in any way.
To achieve the best performance, use these guidelines when creating tag groups:

Group According • It is more efficient to group together tags that have approximately
to Update Rates equal update rates.
• Having tags with update rates of 1 second grouped with tags
requiring only a 3 minute update is not efficient.
Use Fewer • The nature of OPC makes it faster to transmit a large group of data
Groups items rather than many small groups. To take advantage of this
efficiency, try to minimize the number of groups you create.
• Groups should be well defined. Avoid duplicate tag definitions and
duplicate OPC items. This will enable you to reduce the number of
groups defined and the number of update events that occur.

Performance
The OPC server sends group data whenever an item in the group changes, but never any faster
than the defined update rate. For that reason, performance is faster locally than it is over the
network.

300 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Configuring the OPC Client

C ONFIGURING THE OPC C LIENT


You can configure the OPC Client task by using the OPC Explorer or by entering the necessary
information in the OPC configuration tables in Configuration Explorer.
The primary way to configure the OPC client is using the OPC Explorer. The information
defined using this tool gets filled into the appropriate fields in the configuration tables in
Configuration Explorer.

OPC E XPLORER
The OPC Explorer provides a user-friendly way to configure the OPC Client task. It allows
you to view OPC items defined in servers and map those items to FactoryLink tags. Typically,
OPC servers allow clients to browse their items. If supported, the OPC Explorer will enable
you to navigate through the servers items and select those you want to bring in to your
FactoryLink application. Once you have selected an item to map, OPC Explorer will allow you
to create a tag to hold the value of that item.
Under OPC conventions, tags are organized in groups. OPC Explorer allows you to define
these groups (each of which must be unique). For example, if you need a group of tags to hold
temperature values, you can use OPC Explorer to create a group named TEMP. Then you can
define the tags that make up this group. Finally, you would use the OPC Explorer to map the
appropriate OPC items to the tags. If the server supports browsing, you can use drag and drop
in the OPC Explorer. If the server does not support browsing, you must manually enter the
OPC item names.
In the context of the OPC Explorer, all tags must be contained within a Tag Group. Once the
group is connected, server items can be attached or changed through the Tag Properties dialog
box. For information about using the OPC Explorer, see the OPC Explorer Help.
You can start the OPC Explorer from Configuration Explorer or from a command line.
• From Configuration Explorer:
In your server application, open Device Interfaces > OPC Explorer.
• From a command line:
opcexplorer \a [drivename]: {flapp}
where:
{flapp} is the path to your FactoryLink application directory.

FactoryLink Device Interfaces - OPC and Other Guide / 301


• 6 | OPC CLIENT
Configuration Tables



C ONFIGURATION TABLES

OPC Server Definition Table


This table identifies specific OPC data groups to map to the tags. You must define information
about the specific OPC server where the groups reside, trigger tags associated with the group,
and information about the communication with the server.

Accessing

Device Interfaces > FactoryLink OPC Client > OPC Server Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


OPC Server Name of the OPC server to which you are connecting. X 1 to 255
Name The name must match the registered server name. alphanumeric
Example: MyOPC.Server characters
Node Name of the workstation where the OPC server is 1 to 24
(Workstation) executing. The name must match the network node name. alphanumeric
characters
OPC Server Tag that holds the server status of one of the following tag name analog
Status Tag values:
OPC_STATUS_RUNNING
OPC_STATUS_FAILED
OPC_STATUS_NOCONFIG
OPC_STATUS_SUSPENDED
OPC_STATUS_TEST
Read OPC Tag that controls polling for the server’s status. When set tag name digital
Server’s or forced to ON, the client requests status information
Status from the server.
Trigger Tag
Group Name of a local group (local to the station running the X 1 to 24
FactoryLink application) that contains all OPC items alphanumeric
being subscribed to in an OPC server. characters
Update Rate The fastest rate (in milliseconds) at which a server X
updates the local client for any changes in the OPC items
the client subscribed to. A server cannot update the client
any faster than the client’s requested update rate. The
server can, however, update the client at a slower rate
than the client requested.

302 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Configuration Tables

Field Name Description Req. Valid Entry Valid Data Type


Deadband Sets the percentage deadband sent to the server. The 0 - 100
Percent server applies the deadband only to analog-type items in
the group. The EU Low and EU High values (set in the
server) for the item can be used to calculate the range for
the item. This range is multiplied with the deadband to
generate an exception limit.
*Asynch(0)/ Tag that controls the type of I/O connection the client will tag name or digital
Sync(1) Read expect from the server when making a read or write ASYNC,
Mode request. The modes are asynchronous or synchronous. SYNC
*Device(0)/ Defines whether the data is to get transfer from the tag name or digital
Cache(1) server’s cache or directly from the device. DEVICE,
Read Mode CACHE
Group Read Tag that controls a read request on a complete group. tag name digital
Trigger Tag When set to ON, a read request for the entire group is sent
to the server.
Group Write Tag that controls a write request on a complete group. tag name digital
Trigger Tag When set to ON, a write request for the entire group is
sent to the server.
Exception Defines whether exception writes are allowed at run time. YES, Y, NO, digital
Write N
Allowed?
Update Tag that enables or disables updates from a server. ON = tag name digital
Disable Tag updates are disabled. OFF = updates are enabled.
Group Read Tag that enables or disables the read trigger. ON = group tag name digital
Disable Tag reads are disabled. OFF = group reads are enabled.
Group Write Tag that enables or disables write operations to a server. tag name digital
Disable Tag ON = group writes are disabled. OFF = group writes are
enabled.
Exception Tag that disables the exception writes operation. The tag name digital
Write Exception Write Allowed? field must be set to YES for this
Disable Tag disable tag to be useful. Exception writes are disabled
when the value of a tag name is set to ON.
Group Read Tag that is forced to 1 when a block read operation for tag name digital
Complete this group is completed. (This tag does not apply to
Tag Updates.)
Group Write Tag that is forced to 1 when a block write operation for tag name digital
Complete this group is completed. (This tag does not apply to
Tag Exception writes.)

FactoryLink Device Interfaces - OPC and Other Guide / 303


• 6 | OPC CLIENT
Configuration Tables



Tag Definition Table
This table is used to map specific OPC data items to the tags. You must know the exact name
of the data item in the OPC server, and the OPC type the server will convert the data to before
transmitting it to the OPC Client task.

Accessing

Device Interfaces > FactoryLink OPC Client > OPC Server Definition > “OPC Server name” > Tag
Definition

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Data Tag Tag that stores the data from the OPC server. X tag name
Tags can only be referenced once in the OPC Client even
if they are entered in different groups. If a tag appears
more than once, subsequent entries are ignored.
OPC Item Tag that holds the name of the OPC item subscribed to in X
the OPC Server.
OPC Type The OPC type that the OPC server must convert the data X
to on behalf of the client.
Valid Entry explanation:
BOOL – Boolean
SHORT – Short integer
LONG – Long integer
DOUBLE – Double
STRING – Character string
NATIVE
Time Stamp Tag that stores the timestamp information associated with tag name longana
SECTIME the OPC item. The tag holds the timestamp provided by
the OPC server that corresponds to when a data value
changed in the server. The client task stores this value as
SECTIME.
Time Stamp Tag that stores the timestamp information associated with tag name
the OPC item. The tag holds the timestamp provided by
the OPC server that corresponds with the time a data
value changed in the server. The client task stores this
value as absolute seconds.

304 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Configuration Tables

Field Name Description Req. Valid Entry Valid Data Type


Quality Tag that stores the quality code associated with the data tag name
value. Table 6-1 lists the quality codes and associated
words.

Quality words are received from the OPC Server and represent the quality state for a item’s
data value. When the OPC Server updates an item registered by the OPC Client, it passes the
client a value, timestamp, and quality flag for that item. The lower 8 bits of the quality word
are defined by the OPC Foundation standard. The upper 8 bits are reserved for vendor use.
Because the FactoryLink OPC Server cannot run without being connected to the real-time
database, the quality value returned is always 0x00C0 or GOOD. The Standard Quality Codes
are defined in the OPC Foundation Specification.

Table 6-1 OPC Quality Words and Codes

Word Code Comments


OPC_QUALITY_BAD 0x00 Non-specific
OPC_QUALITY_UNCERTAIN 0x40
OPC_QUALITY_GOOD 0xC0
OPC_QUALITY_CONFIG_ERROR 0x04
OPC_QUALITY_NOT_CONNECTED 0x08
OPC_QUALITY_DEVICE_FAILURE 0x0C
OPC_QUALITY_SENSOR_FAILURE 0x10
OPC_QUALITY_LAST_KNOWN 0x14
OPC_QUALITY_COMM_FAILURE 0x18
OPC_QUALITY_OUT_OF_SERVICE 0x1C
OPC_QUALITY_LAST_USABLE 0x44
OPC_QUALITY_SENSOR_CAL 0x50 Sensor not accurate
OPC_QUALITY_EGU_EXCEEDED 0x54 Engineering Units exceeded
OPC_QUALITY_SUB_NORMAL 0x58
OPC_QUALITY_LOCAL_OVERRIDE 0xD8 Typically means “forced”

FactoryLink Device Interfaces - OPC and Other Guide / 305


• 6 | OPC CLIENT
Using VT_ARRAY Data with OPC Client



U SING VT_ARRAY D ATA WITH OPC C LIENT

Differences in OPC VT_Arrays and FactoryLink Tag Arrays


While both are arrays, array-typed OPC items and FactoryLink tag arrays are very different in
their implementation and usage.

Boundaries of an Array-typed OPC Item

The value of an OPC item is contained within a Microsoft data construct known as a variant.
The variant can contain a value of a variety of data types. Furthermore, the variant can contain
an array of values of these data types.
The OPC specification explicitly supports variants and arrays of the following data types:
Boolean (VT_BOOL), unsigned character (VT_U1), signed short (VT_I2), signed long
(VT_I4), float (VT_R4), double (VT_R8).
When an OPC item’s value is an array, the array is held by another Microsoft data construct
known as a SAFEARRAY. The SAFEARRAY has the following properties:
• 65535 maximum dimensions (x[0][0] is an array of 2 dimensions)
• Indices per dimension can range from -2147483647 to 2147483647. As such, the maximum
number of tags per dimension is 4294967295.
• The lower bound is unique per each dimension. For example, one dimension might have
lower bound of 0, while another dimension might have a lower bound of -1.
Given the above properties, array-typed OPC item values are potentially very large and could
be quite uniquely organized.

Boundaries of a FactoryLink Tag Array

A tag is a single value of type Digital (Boolean), Analog (signed short), Longana (signed
long), or Message (string). (The Mailbox type tag is not applicable to the OPC Client task.) A
tag array is a collection of one of the supported tag types. The properties of a tag array are:
• 5 maximum dimensions. The dimension string must be less than or equal to 16 characters in
length ([0][0] has a length of 6 characters).
• Indices per dimension can range from 0 to 65534, but the total count of tags across all
dimensions cannot exceed 65534 tags.
• The lower bound of a dimension is always 0.

306 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Using VT_ARRAY Data with OPC Client

Transferring Values Between Arrays


The individual tags of a FactoryLink array and tags of an OPC item array are mapped
according to indices.

Mapping Equivalently Dimensioned Arrays

It is simple to map items where a tag array definition is equivalent to the array-typed OPC item
value contents. As seen in the figures below, each value of the array is mapped to a tag with
matching indices.
Figure 6-1 Single Dimensional Array Mapping
Tag Array OPC
A[0] — A[4] Item A

[0] [0]

[1] [1]

[2] [2]

[3] [3]

[4] [4]

Tag Definition OPC Item’s Value


# of Dimensions = 1 # of Dimensions = 1
Dim.1: Length = 5 Dim.1: Length = 5, Lower Bound = 0

Figure 6-2 Two Dimensional Array Mapping


Tag Array OPC
A[0][0] — A[2][1] Item A

[0][0] [0][0]

[0][1] [0][1]

[1][0] [1][0]

[1][1] [1][1]

[2][0] [2][0]

[2][1] [2][1]

Tag Definition OPC Item’s Value


# of Dimensions = 1 # of Dimensions = 1
Dim.1: Length = 3 Dim.1: Length = 3, Lower Bound = 0
Dim.2: Length = 2 Dim.2: Length = 2, Lower Bound = 0

For the above cases, the mapping is intuitive. For best results, users should always configure
their FactoryLink application such that the tag definition matches the organization of the
associated array-typed OPC item.

FactoryLink Device Interfaces - OPC and Other Guide / 307


• 6 | OPC CLIENT
Using VT_ARRAY Data with OPC Client



Mapping Mismatched Arrays

Some cases where the array-typed OPC item’s value will not be written to a tag array are as
follows:
• Different number of dimensions.
• Different length of one or more dimensions.
• Non-zero dimension lower bound for any of the dimensions.
If any of these parameters differ between the received array-typed OPC item’s value and the
FactoryLink tag array definition, the value is not written to the real-time database and an error
is sent to the status tag and the log file (if enabled).
Tag arrays are always written to an array-typed OPC item as an array organized according to
its tag definition. The OPC server determines how to manage mismatched array writes to its
array tags. Nevertheless, write errors to OPC items, for this array case or any other, will
continue to be recorded in the status tag/log files.

Differences in Access Atomicity


An array-typed OPC item is accessed as an atomic item. Its value is read or written as an array.
The OPC Client cannot just read or write a particular tag within the array (example: the fifth
tag of a ten tag array). Instead, the OPC Client must read the entire array of the OPC item and
send an entire value array when writing to that item.
Conversely, tag arrays exist as separate tags bound together by a naming convention and some
configuration rules at design time. At run time, tasks read and write to individual members of
the tag array just as if writing to another tag that is not a member of a tag array. The tasks can
treat a tag array as a block, but this is code specific to the task.
To add OPC array-item support to the OPC Client task, the OPC Client task must:
1. Write the array of values received from the OPC Server into the values to one or more
individual tags.

2. Read one or more individual tags as a single the array of values to send on to the OPC
Server’s OPC item.
This treatment of the tag array as an atomic set of values significantly affects how the OPC
Client operates, especially when write on exceptions functionality is enabled.

308 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Using VT_ARRAY Data with OPC Client

Configuration of Tag-to-Item Array Mappings


Configuring the OPC Client to read or write VT_ARRAYS is not much different than
configuring the client to read individual items. To configure the mapping of an array-typed
OPC item to a FactoryLink tag array, enter a record associating the name of the OPC item
name with a reference to any instance of the receiving FactoryLink tag array.
Figure 6-3 OPC Client Tag Definition

The NATIVE OPC Type must be used when addressing a VT_ARRAY type. (Selecting a
individual data type such as digital or analog will cause the add item to fail.)
Given the configuration shown in Figure 6-3, the following run-time behavior occurs:

Row Analysis
1 Given singular tag lana_tag1 and singular OPC item i4_item1, single values are
transferred across the association.
2 Given singular tag lana_tag2 and array-typed OPC item i4_array_item1, single
values are likely a configuration error. The OPC client will be unable to write the
OPC item’s array of values to a single tag. It is undefined as to how the OPC
server would react to receiving a single value written to its array-typed OPC item.
3 Given array-member tag lana_tag2 and singular OPC item i4_item2, single values
(at the explicitly configured tag array index, in this case "[0]"), are transferred
across the association.
4 Given array-member tag lana_tag2 and array-typed OPC item i4_arra_item2, an
array of values is transferred across the association. The particular tag indices
referenced do not matter for this case, as the entire array will be mapped.

FactoryLink Device Interfaces - OPC and Other Guide / 309


• 6 | OPC CLIENT
Program Arguments



The OPC Type field can influence the behavior of the above table, as this sets the data type
requested by the OPC Client task for the associated OPC item. Legal OPC Type field entries
are a specific, individual-value data type (BOOL, SHORT, LONG, STRING) or a general,
as-server-defined type (NATIVE). When transferring array values (case 4), always enter
"NATIVE" in the OPC Type field because the OPC Client task needs to receive the value as an
array and not as an individual value type.

P ROGRAM A RGUMENTS

Argument Description
-d Prints debug information of all levels in Shared domain
-l<#> Logs a specific level of debug information to the
OPC_Client log file (# = 1 to 9)
-x<#> Logs a specific level of debug information to the log
file (# = 1 to 9)

310 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Troubleshooting

TROUBLESHOOTING

Configuration Issues
Errors associated with the OPC Client task are often caused by problems with the OPC server
configuration. In general, ensure that the OPC server you are attempting to attach to is
operating properly.

Message Cause and Action


Data Not Updating Cause: OPC server is not running or not configured correctly.
Action: Ensure that the OPC server is running correctly and is
configured properly.
Cause: OPC items are not validated.
Action: Typically this occurs when configuration is done offline
(not connected to the server) and item names are entered
incorrectly. Ensure the OPC item names match the names
on the server.
Cause: A disable tag (Update Disable, Read Disable, Write
Disable) is set to ON.
Action: Ensure that your application is not setting the tag
controlling the disable tag (Update Disable, Read
Disable, Write Disable) for the tag group to ON.
Cause: Update rate is different than expected.
Action: Although the OPC Explorer enables you to specify an
update rate for OPC items, the true update rate is
ultimately defined by the OPC server. If you set a tag to
update with the value of an OPC item every 100
milliseconds, and the server dictates that the item is
updated every 5 seconds, it might seem that the data is
not updating properly. Ensure that the server
configuration specifies an acceptable update rate.
Note: Update rates can have an impact on server performance.
Invalid or Corrupt Data Cause: OPC server error
Action: Check the OPC server and ensure it is operating properly.
Enable error logging to help resolve the issue. You might
need to reinstall this task.

FactoryLink Device Interfaces - OPC and Other Guide / 311


• 6 | OPC CLIENT
Troubleshooting



Message Cause and Action
Unable To Create a FactoryLink Tag Cause: OPC Explorer is not installed properly.
Group Action: Reinstall the OPC client components.
Cause: Bad or missing .AC file in the FactoryLink application.
Action: Reinstall the OPC client components.
Unable To Locate an OPC Item Cause: Browsing of OPC items is not supported by the server.
Action: Not all servers support item browsing. To configure the
Client task, you need to enter the exact names of the OPC
items manually.
Unable to Locate Specific Node on Cause: Node is not configured correctly or is unavailable.
Network Action: This error typically occurs when using the Browse Node
function in OPC Explorer, and the node name is entered
incorrectly.

312 / FactoryLink Device Interfaces - OPC and Other Guide


OPC CLIENT | 6
Troubleshooting

Error Messages

Message Cause and Action


Abnormal Stop Cause: OPC Client task terminated abnormally due to a fatal
error.
Action: Check other error messages for details.
CT structure size of <filename> is Cause: The specified CT file’s structure does not correspond to
incorrect the CT definition file.
Action: Verify that the correct opcclnt.ctg file is in the
{flink}\ctgen\ directory or reinstall the OPC components.
Failed to open CT file: <filename> Cause: The specified CT file could not be opened. Usually this is
because it is missing.
Action: From the command line, enter the command ctgen
opcclnt to regenerate the CT file.
Failed to process the OPC enable tag: Cause: The client task did not process the specified tag properly,
<tagname> usually because it expects a digital tag and the tag
specified is another type.
Action: Ensure that the specified tag is digital.
OPC Client task initialization failed Cause: A general initialization failure.
Action: See other error messages to determine specific problems.
OPC server failed to add OPC item. Cause: The specified OPC item may not be defined or
Node: <nodename>, configured correctly in the server.
Server:<servername>, Action: Verify that the item exists in the server and reconfigure
Group:<groupname>, OPC Item:
<itemname>, ret code= <return code> the client task.
Out of memory Cause: Not enough memory is available to run the program.
Action: Free system resources to ensure enough memory exists.
You may need to add physical memory to your system.
Tag has a bad data type. Seg: Cause: In processing a tag, it was detected that the tag’s data
<segment>, Offset: <offset> type was unsupported. The tag database may not have
been properly generated or is incomplete.
Action: Verify the tag is legal and properly defined in your
application.
Task not authorized to run Cause: The OPC client task is not authorized to run due to an
invalid configuration sequence.
Action: Contact your sales representative to authorize the OPC
Client task.

FactoryLink Device Interfaces - OPC and Other Guide / 313


• 6 | OPC CLIENT
Troubleshooting


314 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 7





OPC Data eXchange (ODX)

O VERVIEW
The OPC Data eXchange (ODX) driver supports communication between the FactoryLink
database and one or multiple OPC Servers. The idea is to mirror PLC data by intelligible OPC
items reflecting, for example, the PLC address in its names in order to be decoded and
conditioned, for any RAPD driver. There are hundreds of OPC Servers available for any PLC
make or bus system as CAN, LON, BacNet, Fieldbus, Interbus, Modbus, Profibus and so forth.
And, together with VRN you can set up a Redundant System. Data is conducted to and from
Enhanced Communication Interface (ECI) by using the Intertask Mail eXchange (IMX)
interface.

Ø ECI/OPC Dataset Converter


Object I/O Tags OPC Item / Attributes
Update Delay Action=Reaction
Decoder / Encoder
ECI Object Information Scale / Normalize
RdElem(1) | I/O_Tag(1) | WrElem(1)
RdElem(2) | I/O_Tag(2) | WrElem(2) Statistical Data
RdElem(3) | I/O_Tag(3) | WrElem(3) Indirect Addressing
RdElem(x) | I/O_Tag(X) | WrElem(x)

Read Cycle Write Interval

Ø IMX Interface Read/Write Dataset


Read ECI Object Control Write
Mailbox Dataset Exchange Mailbox

Ø ODX OPC Data eXchange


ECI Object Reference OPC Group / Dataset Definition
Dataset Definition
OPC Server Name(s)
OPC Connections
Network Server/Station Names

Ø OPC Server(s)
External Device(s), PLC(s)
COM/DCOM Network

FactoryLink Device Interfaces - OPC and Other Guide / 315


• 7 | OPC DATA EXCHANGE (ODX)
OPC Server Connection



The ECI task is used to convert Object I/O data from and to the datasets that are transmitted
through the IMX interface. Consider a dataset being a number of words or bytes (tags) in a
particular PLC. Then, object I/O data is represented by words, bytes, or bits in the PLC and by
individual database tags in FactoryLink. Objects may be specified for Read-only, Write-only,
Read/Write from and to the same or different datasets. For a simple system, the following
items are required:
• FactoryLink system with ECI Converter Task
• ODX OPC Data eXchange Driver
• OPC Server(s) for External Device(s) supporting OPC Data Access Ver1.0A or Ver2.0

OPC S ERVER C ONNECTION

ODX OPC Server Connection Table

Accessing

Device Interfaces > ODX OPC Data eXchange > ODX OPC Server Connection

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Connect Name to identify a particular OPC Server connection. X 1 to 15
Table Name Each connection is associated with an ECI Object characters
Reference table to link OPC Groups of Items as
Read/Write Datasets with the ECI Converter for further
processing.
OPC Server Name of the OPC Server. Must match the registered X 1 to 32
Name name of the server to be accessed. characters
To connect an OPC server at a particular node, enter the
name of the node or workstation as a prefix to the server
name separated by a colon.
Example: NodeName:ServerName
The node name must match exactly the network node of
the host where the OPC Server resides.
Function and Options to be applied on each particular connect.
Arguments Separate multiple functions with a space. See “Program
Arguments” on page 335 for information.

316 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
OPC Server Connection

Field Name Description Req. Valid Entry Valid Data Type


Link Control Tag to enable, disable or disconnect the link, depending tag name digital, analog,
Tag on the Functions Mux= and/or DisConn= specified. The longana
tag, if forced written to Mux=, can be used as a trigger to
refresh (update) data that is read OnChange. If Mux and
DisConn are not defined, a value of zero or no specified
tag enables normal operation.
Error Status Tag that contains the error/status number of this link. tag name analog, longana
Tag Use ECI to decode a value where:
Bit0 = Active (starting, running, or disabled without
error)
Bit1 = Starting
Bit2 = Running
Bit3 = Disabled
Bit6 = No Job
Bit7 = Terminated
Bit8 = Error
For more details, see “Information and Error Messages”
on page 339.
Error Status Tag that contains the error/status information of this tag name message
Message Tag device/connection. See “Information and Error
Messages” on page 339.

FactoryLink Device Interfaces - OPC and Other Guide / 317


• 7 | OPC DATA EXCHANGE (ODX)
ECI Object Reference



ECI O BJECT R EFERENCE
The ECI Object Reference table identifies one or several ECI objects for a particular server
connection. You can substitute or expand an ECI Object Reference table by an ASCII file if
you enter File=filename to the Function/Arguments column (see also ODX_ObjRefSample.txt
on the installation media).

Type of configuration:

1) Emulation of RAPD
and EDI Drivers: use
ECI Decimal Converter
2) OPC Specific
Configuration: use
ECI/OPC Item Converter

An ECI object is defined by addressing read/write datasets of Tags as a number of logically


organized OPC items (called OPC groups). It is assumed that the OPC Server configuration is
studied and planned prior to FactoryLink configuration. This especially applies for OPC item
names (127 char max) referenced. Note that items are not the data source – they are just
connections to them. They should be thought of as symbolic addresses to the data. Tags or
OPC items essentially represent data values as boolean/flag, integer/word, real/float,
message/string or an array, thereof which can be decoded as desired. Associated with each
value is a quality and a timestamp that are, however, only accessible in ECI/OPC specific
tables.
ODX supports the these methods of OPC item configuration:
• Emulation of RAPD and EDI drivers
• OPC-specific configuration

Emulation of RAPD and EDI Drivers


OPC items are specified in ODX and referenced in ECI standard tables by an address in the
Elem Addr columns as for any RAPD driver. A dataset is composed of one or multiple OPC
items and may be specified by a single line entry if using an OPC Item Array, or if multiple
OPC Items include the Elem Addr in its name, for example, Reg120, Reg121, Reg122. In
Reg{}, {} is the Elem Addr, and “Reg” is any text. You can also enter a list of items or combine
the methods to form a dataset. To correspond with the addressing of the PLC, you must adjust
the ECI Read and Write Mode.
Note: This method keeps PLC or external device addressing transparent throughout
communication, and with ECI, virtually no configuration changes are required when
replacing an existing RAPD driver.

318 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
ECI Object Reference

OPC-Specific Configuration
OPC Items are specified in ECI/OPC-specific tables, while datasets are automatically created.
This method accepts any OPC item naming and supports these standard OPC attributes. For
detailed information, refere to your ECI guide.

Rd CDE ECI Conversion Codes for Standard OPC Attributes


.UTC Timestamp Native, Universal Time Coordinated, FileTime format not for display unconverted to
Double
.TIM/.TIX FactoryLink SecTime [s] as from 1980-01-01 and/or Milliseconds [ms] decoded to LongAna or
Analog for [ms]
.TIH/.TID
HourTime "hh:mm:ss.xxx" or DateTime ISO 8601 "YYYY-MM-DD hh:mm:ss.xxx" [ms] decoded to
Message
.QA/.QX Quality Native (QQ=Quality, SSSS=Status, LL=Limit Flags) 0..255 and Quality Vendor Specific
0..255
.QS/.QL Quality Status 0..15=Bad, 16..31=Uncertain, 48..63=Ok and Quality Limit 0=OK, 1=Low, 2=High,
3=Constant
.AR/.AX Access Rights Native 0=None, 1=Read, 2=Write, 3=Rd/Wr and Access Rights Vendor Specific
0..65535

Note: This method supports a variety of OPC functions as Vendor- Specific


information, Timestamp/Quality for ItemArrays or merging OPC Quality and ECI I/O
Status information and so forth.

ECI Object Reference Table

Accessing

Device Interfaces > ODX OPC Data eXchange > ODX OPC Server Connection > “table name” >
ODX ECI Object Reference

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


ECI Object Must be identical to the ECI or ECI/OPC Object X 1 to 15
Table Name Information table, where the specified OPC items are characters
converted and scaled to/from individual database tags.
Because ECI can handle partial datasets as well as
independent read and write datasets for a particular
Object, the Reference Table accepts multiple entries for
the same ECI object.

FactoryLink Device Interfaces - OPC and Other Guide / 319


• 7 | OPC DATA EXCHANGE (ODX)
ECI Object Reference



Field Name Description Req. Valid Entry Valid Data Type
Rd/Wr Type of read and/or write access from/to the same or
Access different datasets or OPC groups. (The OPC Server may
prevent access independently per OPC item.)
Valid Entry explanation:
Read = Read-Only (Polling or OnChange)
Rd/Wr = Read and/or Write (any type)
Write = Write-Only (Exception, Block or Dataset)
ReadE# = Read-Only with Error Substitute Value
RdE#/Wr = Read with Error Substitute Value and/or Write
For Emulation of RAPD and EDI drivers, you can
read data with an Error Substitute Value (E#, where
the OPC item is set to a predefined value in the
Function/Arguments field) if the item’s quality is
Bad or Uncertain.
E0 = substitutes the value by 0
E1-E9 = substitues the specified value
Examples: E3=-1, E8=200, E1=24.5
A missing or an invalid definition will execute the
R/W Access as normal (without substitution).
SRD = Statistics Read of this Device/Connection
SRDC = Statistics Read of this Device and Clear
SRS = Statistics Read Sum of all Devices/Connections
SRSC = Statistics Read Sum of all Devices and Clear
Statistics functions provide performance
information on one or all connections. Data must be
polled as described for Read Prio. (You may dump
the information to an array using the ARYn:x:y:z
ECI function.) SRD and SRS use counters that are
cleared only at a system shutdown. SRDC and
SRSC clear the counters after each poll request (the
values indicates a poll interval). This can be used to
display the number of bytes transmitted every 10
seconds. The number of bytes indicated represent
data values only and do not include the 10 bytes per
item timestamp/quality. It shows data transmitted by
(D)COM without any overhead or any data sent
through IMX.
Any number allowed per table: Read, Rd/Wr, Write
Emulation of RAPD and EDI only: ReadE#, RdE#/Wr
One of each type allowed per table: SRD, SRDC
One of each type allowed for all tables: SRS, SRSC

320 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
ECI Object Reference

Field Name Description Req. Valid Entry Valid Data Type


OPC Item OPC Item to be read and/or written for this ECI Object.
Name and
optional Addr Valid Entry explanation:
{##:i} For Emulation of RAPD and EDI drivers, you must
specify this field to identify one or multiple OPC items as
a dataset (or part of it):

NNNN = a single OPC Item or Item Array


(examples: “Int_W20”, “Mot77set,10”)
NNN{##:i}N = multiple OPC Items
(examples: “Int_W{20}”, “Mot{77:3}set,10”)
where,
NNNN = OPC item name of any character except
braces { }
## = First item address number 0 - 65500 in OPC
Server (default = 0); required for multiple items.
i = Item address increment 1 - 9999 (default=1)
example: 0:4 to create =0,4,8,12.
N = Name extension for multiple items
Note, {##:i} also defines “First Elem Addr” setting when
using an equal sign (default) in the corresponding
column. The idea is to specify intelligible item names that
correspond with both, PLC and ECI addressing. For
either case, you must define the tag size (boundary) in
ECI’s Rd/Wr Mode column to correspond with the tag
size of data accessed in the external device. Valid entries
for ODX: H1, L1, H2, L2, H4, L4 (default).

You can enter a list of OPC items to form a dataset using


the same table name and combining entries. OPC Item
Arrays are recommended in Read Datasets due to little
configuration work and the performance of data
transmission. For writing Item Arrays, you must however
apply procedures D=Dataset, B=Block, or E=Encoded in
ECI columns "Wr by Tr" or "Wr at Ch", because OPC
does not support write access to individual Array Tags.
When assembling tags in ECI to create, for example, a
4-byte float of 4 OPC items of bytes, make sure that the
items are being updated consistently (at the same time) by
the PLC driver connected to the OPC Server.

FactoryLink Device Interfaces - OPC and Other Guide / 321


• 7 | OPC DATA EXCHANGE (ODX)
ECI Object Reference



Field Name Description Req. Valid Entry Valid Data Type
OPC Item For ECI/OPC-specific tables, you can apply this field as
Name and a template extension for all items specified in the
optional Addr corresponding ECI/OPC Information table. The length of
{##:i} any (assembled) item name is 127 characters maximum
(continued) for ODX.

Examples:
[PLC] – specifies items [PLC]Item1...[PLC]ItemX.
This syntax is useful because you do not need to enter full
names.
PLCName+Area+WordAddr+Length.
Allen-Bradley typical item name = [PLCName]N15:3,L2
Siemens S7 typical item name =
S7:[ConnName|VFDName|AccessPoint]DB15,B3,2
First Elem (Required when emulating RAPD or EDI drivers by a
Addr ##:i standard ECI Object table) Specifies the first tag address
of the dataset for this ECI Object.

Valid entries and syntax are:


Equal sign = (default) sets OPC Item Name value {:i} for
multiple items or for item arrays {##:i}
##:i = specifies dedicated address (example: “20”, “77:3”)
where,
## is the ECI First tag (start) Address 0 - 65500
(default = 0) and i is the ECI Address Increment 1 -
9999 (default = 1); example: 1:3 to create =1,4,7.

You must set the Tag Size (Boundary) in the Rd/Wr Mode
column of the ECI Control table to H1, L1, H2, L2, H4,
or L4.
ArrayElem or (For emulating RAPD or EDI drivers only) Number of 1 to 65500
{Items} tag arrays of a single item or array item, or the number of
items if multiple items shall represent a dataset or part of
it.

The size of an tag array or {Item} is specified by the ECI


tag size (boundary) times the Addr Increment ( i ) of the
First Elem Addr ##:i field. A dataset is limited to
64 KB (number of tags times boundary).

322 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
ECI Object Reference

Field Name Description Req. Valid Entry Valid Data Type


Read Prio Priority for Polled read or enable read OnChange requests
at the rates entered to the ECI Read Interv Ch/Cont
column. Write priority is always 1.

OnChg – Read on change is initiated by subscription to


the server in order to transmit changed data (events)
unsolicited at the rate(s) specified. At start-up, data is
automatically updated (synchronized). You can also use
the Link Control Tag to refresh (update) data that is read
OnChange.

1Poll - 9Poll – Data Polling may be compared to triggered


block read, which transmits entire datasets. This method
is less performant but it is useful for block transfer.
(Statistics Read Functions require polling.)

ArrayElem or {Items} Samples

FactoryLink Device Interfaces - OPC and Other Guide / 323


• 7 | OPC DATA EXCHANGE (ODX)
ECI Object Reference



Read Priority Functions
Valid functions for the OnChange option:

ECI Read Interval ECI Read Trigger or ODX Control Tag Used ODX Auto Refresh at
Change/Continuous Function RDTRIGG as Refresh Trigger Startup or Link Enable
Fast/Slow Update Rates Auto Fast Update Yes, if forced to when Yes
for OPC Servers selection at fast polling using Function Mux=

Valid functions for the Polling option.

ECI Read Interval ECI Read Trigger or ODX Control Tag Used ODX Auto Refresh at
Change/Continuous Function RDTRIGG as Refresh Trigger Startup or Link Enable
Automatic Fast/Slow Standard Poll Trigger No No
Polling Interval

Normally, polled or refresh data is read from an (external) device unless Function RdCache is
applied. For either case, data is transmitted asynchronously at the rate(s) entered to the ECI
Read Interv Ch/Cont column, or when triggering the ECI Read Dataset IdxTag or any other tag
if ECI Function RDTRIGG is applied.
ECI allows data to be updated slowly in order to unburden communication. At an Object I/O
change it may be updated more quickly for fast reaction. Therefore, ECI accepts two intervals
separated by a slash, for example, 0.7/12 [s] for FastUpdate=Read Interval after Change and
SlowUpdate=Read Interval Continuous. The FastUpdate rate 0.7 [s] is activated whenever an
Object I/O has been changed. It shall be adjusted to approximately the time required to send
data to the external device. The SlowUpdate rate 12 [s] is used for continuous updating.
Note: A Read Interval Continuous must be entered to ECI (SlowUpdate rate) for the
read OnChange method, or it can be used to replace the continuous Polling by the
Interval Timer task.

324 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Sample Configuration of Communication Objects

S AMPLE C ONFIGURATION OF C OMMUNICATION O BJECTS

Emulation of RAPD and EDI Drivers

FactoryLink Device Interfaces - OPC and Other Guide / 325


• 7 | OPC DATA EXCHANGE (ODX)
Sample Configuration of Communication Objects



The ECI Object TAB1 is assembled of items
ItemX+Reg120..128+ArrayY+DWrd40/42/44/46, all specified in the ODX/ECI Object
Reference table. Except for ArrayY, all items are accessed for read and write. ItemX uses
address 0 (default), it is an integer, split into two bytes that can also be written (Merge).
Reg120..128 use addresses 1 - 9 and are decoded to FactoryLink array Reg12[0..8] as unsigned
integers. ArrayY uses addresses 10 - 39 and is decoded to FactoryLink message ArrayY[0..4]
with 12 bytes (6 Elem). DWrd40..46 use addresses 40 - 47 corresponding to the item names,
the double words contain different types of data and are decoded to different tag types.
The ECI tag size (boundary) is two bytes Intel format (Rd/Wr Mode L2). While one part of the
read dataset is polled, the other is read OnChange. Data is read every 8 seconds from the OPC
Server. In case of writing the particular data is however fed back at a rate of 0.7 seconds (ECI
Read Interv) while previous data would be restored after 3 seconds (ECI Read Update Delay)
if no feedback is received. Writing is performed at exception X or by block B if released by
trigger TAB1_W. The OPC Server is the same as described on the next page.
Note: The example above illustrates various methods of addressing OPC items and
ECI tags for a single table. The intention is to show the flexibility of ODX and not to
highlight a specific method. The most efficient configuration would be a single OPC
ItemArray that reflects the entire dataset. However, you cannot use Exception Write to
access individual tag arrays, because this is not supported by OPC.

326 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Sample Configuration of Communication Objects

OPC-Specific Configuration Tables

The ECI/OPC Object TAB2 is assembled of items


9kLong+9kFloat+9kMotor47+9kValve33+9kArray1/2+9kMsgArray, all specified in the
ECI/OPC Information table. Note that the optional extension "9k" is entered once only to the
ODX/ECI table. Except for 9kValve33, all items are accessed for read and write. Note that the
equal sign (´=) specifies WriteItem=ReadItem. 9kLong is decoded to 32 digital array tags that
can be written individually (Merge). 9kFloat is decoded with its timestamp of [ms] resolution.
For 9kMotor47, access rights and timestamp [SecTime] as well as bit 15 (indicating reversed

FactoryLink Device Interfaces - OPC and Other Guide / 327


• 7 | OPC DATA EXCHANGE (ODX)
Sample Configuration of Communication Objects



speed) are decoded, and the quality information is moved to the I/O Status Tag's value (column
hidden). 9kValve33 uses the Enum function to display its position on message tag Valve33_Txt
in clear text copied from ValvesText[0] array. 9kArray1 is decoded with its quality status, it
consists of two ItemArray tags, displayed by tags Array1_Elem0_Byte3 and
Array1_Elem1_Short (the OPC ItemArray tags can be addressed by entering the tag offset in
braces). If writing to Array1_Elem1_Short, this will write to 9kShort1 in the OPC Server.
Finally, 9kMsgArray consists of 20 tags decoded to Msg[0] with 30 bytes each. Note that the
ARY Elem increment is 8 to allow for 30 bytes within the fixed Boundary of 4 bytes (Rd/Wr
Mode L4M, fixed).
Data is read OnChange at a rate of 12 [s] from the OPC Server. In case of writing, data is fed
back at a rate of 0.8 [s] (ECI Read Interv) while previous data would be restored after 3.5 [s]
(ECI Read Update Delay) if no feedback is received. Writing is performed at change for the
entire Dataset D (required for arrays) at an interval of 0.5 [s]. The OPC Server is the same as
on the previous page.

ECI Object for ODX Statistics Read


Sample ECI Information Table for Object S1_STAT displays statistical data by 27 LongAna
tags. Note that the first tag address is set to zero and addressing is defined for double words
(Rd Mode=L4).
Data for the following table is updated when the Dataset IdxTag S1_Rd is forced ON (Read
Trigger). Note that the number of bytes indicated represents data values only and does not
include the timestamp/quality of 10 bytes per item. It shows data transmitted by (D)COM
without any overhead nor data sent through IMX.

328 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Sample Configuration of Communication Objects

FactoryLink Device Interfaces - OPC and Other Guide / 329


• 7 | OPC DATA EXCHANGE (ODX)
Sample Configuration of Communication Objects



Dataset Exchange in a Redundant System Using VRN
Assign the same VRN Connect Control Table a Tandem and a Local link to exchange
datasets through mailboxes between redundant system Node A and Node B as shown below.
Note that ECI and ODX drivers use separate mailboxes that are linked according to the actual
Tandem Status. The Tandem Status can be used to start and stop the ODX driver if assigned to
its TASKSTART_S[x] tag of the system configuration:

330 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Sample Configuration of Communication Objects

ODX ECI Object Reference Table for Communication Object *TAB1 that is transmitted in a
redundant system to the local and/or partner station through VRN:

This setup is applied for any ECI-based RAPD driver. For ECI/OPC specific tables simply
omit the Rd/Wr Ds Idx. However, ensure that the ECI/OPC Control tables are the same on
either system.
If you do not want to control the ODX driver by the VRN Tandem Status, replace above
TASKSTART_S[x] tag by a unique tag. In any case, VRN must run for data exchange between
ECI and ODX while the mailboxes of ECI (EciRmbx/EciWmbx) and ODX
(OdxRmbx/OdxWmbx) must be different.

FactoryLink Device Interfaces - OPC and Other Guide / 331


• 7 | OPC DATA EXCHANGE (ODX)
OPC Server, DCOM, and Windows Setup



OPC S ERVER, DCOM, AND W INDOWS S ETUP
Note: The OPC Server software must be installed and set up according to the
instructions of the supplier. Carefully read all instructions and product information prior
starting with any installation. Ensure that you have the latest version of the OPC
Server(s) and Service Pack(s) from your supplier.
• DCOM Configuration – ODX uses Microsoft’s (Distributed) Component Object Model
(D)COM to communicate with OPC Server(s). DCOM is a network layer that is added by
the operating system for communication over a network. Windows contains a tool for
configuration of security for DCOM servers called DCOM Configuration (dcomcnfg.exe).
It may be necessary to configure the default security for DCOM. Contact your network
administrator for additional network assistance.
• Windows Accounts – For one Windows computer to interact with another, both computers
need to be set up with similar security accounts. If both the Server and the Client are on the
same Windows Server domain and the logged in user has an account on the domain, security
should be satisfactory. If there is no Windows Server on the network, then both computers
(server and client) must contain the same user account. They do not need to be logged on as
the same account, but must contain the same account. The following table defines the
minimum requirements of default security for both server and client computers:
Registry Value Names
DefaultAccessPermission Everyone Interactive System Network
DefaultLaunchPermission Everyone Interactive System

Performance Considerations
Note that ODX supports OPC ItemArrays representing, for example, a complete PLC
DataBlock by a single item that provides best transmission performance at very little
configuration.
The Read OnChange method may be described as unsolicited read of changed items (events) at
a specified rate (interval), initiated by subscription to the server. Therefore, if you wish to
measure performance, you must set the ECI Read Interval as short as possible and constantly
change the OPC items to be read. Note that an OPC Server might take an undesirable high load
when setting the ECI read interval to zero.
However, ODX allows for polling that may be compared to triggered block read. This method
is generally less productive. It uses the ECI’s read dataset IdxTag as a trigger that may be
forced constantly ON and set the Read Prio = Poll1 in order to read data as fast as possible.
The above conditions should be considered when testing the performance by the number of
telegrams and bytes transmitted using statistics read as shown for the Sample Configuration
above. Note that the number of bytes indicated represents data values only and does not
include the timestamp/quality that is 10 bytes per item. It shows data transmitted by (D)COM
without any overhead nor any data sent through IMX.

332 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
OPC Server, DCOM, and Windows Setup

Troubleshooting
The idea of employing OPC Server(s) is not only for standardization, but also to keep PLC
communication within the domain of the PLC driver experts. Often, the add-on board and the
OPC Server, including the device driver and configuration tool, are supplied by the same
manufacturer, which should minimize possible bottlenecks. However, the OPC interface is
standardized, and the IMX interface to FactoryLink is well tested and runs in many
applications. A great deal of set-up communication is therefore related to the OPC Server
instructions by the supplier, which, if strictly followed, will provide a successful installation. If
the OPC Server, the underlying network, and the PLCs are properly installed and set up, ODX
should work without a problem. Check the following items before calling for support on ODX:

Message Cause and Action


Ensure that you apply the latest Action: Check Customer Support on the Internet or consult the
version of the OPC server from the supplier.
supplier.
ODX cannot communicate with an OPC Action: Check the running OPC server and its items, using test
server. tools from your supplier.
No data is read from the OPC server. Action: Verify ECI Rd Mode, Dataset IdxTag (trigger), Read
Interv Ch/Cont, and Read Prio.
Note that connection/reconnection Cause: (D)COM might be slow to connect.
takes time.
PLC memory access might be slow Action: Use ECI’s Action/Reaction method for commands sent to
because it is synchronized with the and read back from the PLC. Use multiple connections to
CPU cycle. split fast and slow jobs.
Numerous connections to an OPC Cause: This depends on the OPC server.
server might drop data throughput for a
connect. Action: Use ECI Read Interv and Read Prio of ODX to tune your
system.
Check Debug and Log Information in Action: Begin with Verbose Mode 7 for the suspected link. See
file {FLAPP}\SHARED\LOG\ODX*.log Function/Arguments and Program Argument.
Caution: A Verbose Mode greater than 15 might
rapidly overflow your hard disk.
A link frequently is down and being Action: Check the network load. It might be high due to other
reconnected. actions like a file transfer.
A Dataset from/to an OPC server is not Action: Ensure that all data accessed in the OPC server has been
transmitted or is partially transmitted. created.

FactoryLink Device Interfaces - OPC and Other Guide / 333


• 7 | OPC DATA EXCHANGE (ODX)
OPC Server, DCOM, and Windows Setup



Message Cause and Action
Some OPC server parameters may be Action: Do not adjust these parameters unless clearly advised by
adjusted in the Registry using the supplier.
REGEDIT.
Data in FactoryLink and the PLC or Action: When assembling tags in ECI to create, for example, a
external device is inconsistent. 4-byte float of four OPC items of bytes, ensure the OPC
items are being updated consistently (at the same time)
by the PLC driver connected to the OPC server. Also,
consider data truncated by the methods below; then,
check the boundary set by ECI Rd/Wr Mode.

Data translation methods: Emulation of RAPD and EDI drivers and OPC-Specific
Configuration.

334 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Program Arguments

P ROGRAM A RGUMENTS
The parameters below can be entered directly with a leading dash in the Program Arguments
column of the System Configuration table. Argument names are not case sensitive. You may
reference a file in order to enter the desired parameters there. In this case the file name must be
specified without a dash in the Program Arguments column. Use brackets {...} for environment
variables and/or pathnames as required, for example, {flapp}\ODX_para.run.

Argument Description
-VMode=<#> Verbose Mode level (0 to 1023) for debugging and logging
information to file {FLAPP}\SHARED\LOG\ODX.LOG for the
main task and to an individual file
{FLAPP}\SHARED\LOG\ODX?_[NodeName]ServerName.LO
G for each connect (thread).

The wildcard ?=1..x in the file name identifies the line number in
the ODX Server Connection table. The level is identified as the
sum of binary values, each enabling a log action to display.

0 = No logging (default)
1 = ODX Server state changes
2 = ODX Status messages
4 = OPC Connection, Group and Item handling errors
8 = Configuration Table Read information (ODX.LOG only)
16 = Database Change_Read information
32 = Memory management information
64 = All internal Function calls
128 = Read Mailbox information ODX_ECI (–DRMbx in ECI)
256 = Write Mailbox information ECI_ODX (–DWMbx in ECI)
512 = Additional OPC Connection debugging
1023 = Enables all actions. Note: Entering this value may overfill
the hard disk.
-Alive=<#> Alive check timeout in seconds to supervise connections
(watchdog) if no data is transmitted. (default = 10)
-SimReq=<#> Maximum number # of simultaneous (asynchronous) read
requests processed per connect. (default = 5)
-Mux=<#> Multiplexer: the number specifies the value to which a possible
Link Control Tag must be set to enable the link. (default = 0)
A non-matching value stops transmissions while the link
remains active (standby).

FactoryLink Device Interfaces - OPC and Other Guide / 335


• 7 | OPC DATA EXCHANGE (ODX)
Program Arguments



Argument Description
-DisConn=<#> Disconnect link: specifies a value to which the Link Control Tag
can be set to inactivate the link (default = -1). A non-matching
value keeps the link active (standby), even if disabled by Mux.
-ReConn=<#> Time delay in seconds to reconnect a link after failure (default =
10)
-InitDelay=<#> Time delay in seconds to initialize data transfer through a link.
This may unburden the OPC Server or ECI at (re)connection.
(default = 10)
-RdCache Read refresh data from Server Cache. By default, data is always
read from device.
-FastUpd=<#> The FastUpdate rate # for read OnChange is defined by ECI
"Read Interval after Change". It is automatically enabled and
maintained as long as two or more read requests appear within
the “Read Interval after Change” times the number specified for
this argument (default = 3). You can suppress FastUpdate by
setting -FastUpd = 0, recommended value.
-SlowUpd=<#> The SlowUpdate rate for read OnChange is defined by ECI
"Read Interval Continuous". It is selected if no FastUpdate
request appears within the "Read Interval after Change" times
the number specified for this argument (default = 10) The value
represents a delay to return from FastUpdate to SlowUpdate.
-LimUpd=<#> Limits the slowest update rate in seconds (default = 86400) since
some OPC servers do not allow for the 4’294’967 maximum.
-SleepTime=<#> Adjust process speed/CPU load by suspending program
(sleeping) in milliseconds every scan, valid for main task only.
(default = 70)
E1=xxx..E9=xxx Read data with Error Substitute Value xxx for R/W Access
ReadE or RdE/Wr, where =1..9 (for Emulation of RAPD and
EDI Drivers only).
E0 is reserved for Substitute Value = 0. The functions will set the
OPC item value to xxx for the corresponding R/W Access if the
item’s quality is Bad or Uncertain. Value xxx must be of type
Integer I4 or Real R4 (indicated by decimal point or exponential
notation)
Examples: E3=-1, E8=200, E1=24.5, E4=1.37E2. A missing or
an invalid definition will execute the R/W Access as normal
(without Error Substitute Value).
File=filename Substitutes or expands the ECI Object Reference table by an
ASCII file. All lines in the file must be plain text with column
entries, separated by a Tab.

336 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Program Arguments

A sample file is on the installation media and may look like the following:

# ODX_para.run Program Argument File


# This is a sample file showing valid program arguments for ODX. If you want ODX to read this
# file, insert the file name together with its path to the Program Argument column of the System
# Configuration table.
# Note that lines beginning with a number sign (), an asterisk (*), or a space ( ) are considered
# comments, while some arguments must begin with a dash (–) and may not have spaces. You
# can enable the desired arguments by removing the characters indicating a comment line.
# Program Arguments for Debugging
# Verbose Mode level 0..511 for debugging and logging information to file
# {FLAPP}\SHARED\LOG\ODX.LOG for the main task and to an individual file
# {FLAPP}\SHARED\LOG\ODX?_[NodeName]ServerName.LOG for each connect (thread).
# Note that the wildcard ?=1..x in the file name identifies the line number in the ODX Server
# Connection table. The level is identified as the sum of binary values, each enabling a log
# action to display
# 0=No logging
# 1=ODX Server state changes
# 2=ODX Status messages
# 4=OPC Connection, Group and Item handling errors
# 8=Configuration Table Read Information (ODX.LOG only)
# 16=Database Change_Read information
# 32=Memory management information
# 64=All internal FUNCTION calls
# 128=Read Mailbox information ODX ECI (–DRMbx in ECI)
# 256=Write Mailbox information ECI ODX (–DWMbx in ECI)
# Enter 511 (= 1+2+4+8+16+32+64+128+256) to enable all actions. Note that this may overfill the
# hard disk! (default=0), try first:
# –VMode=7
# Arguments for Tuning and Performance
# Caution! These arguments, if not adjusted correctly, might cause unpredictable results.
# Alive check timeout [s] to supervise connections (watchdog) if no data is transmitted
# (default=10 [s]):
# –Alive=10
# Maximum number of simultaneous (asynchronous) read requests processed per connect
# (default=5):
# –SimReq=5
# Multiplexer: the number specifies the value to which a possible Link Control Tag must be set to
# enable the link (default=0):
# -Mux=0
# Disconnect link: specifies a value to which the Link Control Tag can be set in order to inactivate
# the link (default= -1). A non matching value will keep the link active (standby), even if disabled by
# Mux.
# -m080
# Sets the maximum string length that opc_server can send to clients.
# Defaults to value of 80.
# –DisConn=-1
# Time delay to reconnect a link after failure (default=10 [s]):
# –ReConn=10
# Time delay to initialize data transfer through a link. This may unburden the OPC Server or ECI at

FactoryLink Device Interfaces - OPC and Other Guide / 337


• 7 | OPC DATA EXCHANGE (ODX)
Program Arguments



# (re)connection, default=10 [s]:
# –InitDelay=10
# Read refresh data from Server Cache. By default, data is always read from device.
# –RdCache
# The FastUpdate rate for read OnChange is defined by ECI "Read Interval after Change".
# It is automatically enabled and maintained, as long as two or more read requests appear within
# the "Read Interval after Change“ times the number specified for this argument (default=3).
# You can suppress FastUpdate by setting -FastUpd=0, recommended value:
# –FastUpd=3
# The SlowUpdate rate for read OnChange is defined by ECI "Read Interval Continuous".
# It is selected if no FastUpdate request appears within the "Read Interval after Change" times the
# number specified for this argument (default=10). The value represents a delay to return from
# FastUpdate to SlowUpdate:
# –SlowUpd=10
# You can limit the slowest update rate (default=86400 [s]) since some servers do not allow for
# the OPC max of 4‘294‘967 [s]:
# –LimUpd=86400
# Adjust process speed/CPU load by suspending program (sleeping) every scan, valid for main
# task only (default=70 [ms]):
# –SleepTime=70
Note: At FactoryLink startup, the ODX_init.exe is executed to prepare new or changed
configuration data prior to running. You can manually start ODX_init with arguments
–aFLAPP –pFLINK -c -v where FLAPP and FLINK denote the application and program
directories. -c is used to recreate all data by requesting for a complete initialization at
startup, and -v specifies the ODX_init verbose level =1 - 4.

338 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Information and Error Messages

I NFORMATION AND E RROR M ESSAGES


The messages below may be displayed by the Run-Time Manager. These and others can also
be logged to file %FLAPP%\SHARED\LOG\ODX*.LOG as specified for Program Argument
-VMode. The numbers indicate Information and Warnings 0xx or 4xx, Failures 1xx or 5xx and
Configuration Errors 2xx. The specifies %s, %d, %u, etc. represent run-time values, %d:%d
indicates a TagIndex, and code=%d is an error returned by FactoryLink (defined by PAK, file
FLDEFS.H):
Label in ODX.TXT 0xx Information and Warning Messages
PROG_STARTING ODX starting
PROG_FILE_PROC ODX processing file "%s"
PROG_REC_DAT_PROC ODX processing all records for internal use
PROG_STOPPING ODX stopping
PROG_RUNNING ODX running
PROG_INACTIVE ODX normal shutdown
PROG_NO_JOB 000 Nothing to do: Normal shutdown
There is no configuration information to process.
ACE_INV_AUTHORIZATION 001 No authorization: shutdown by timeout
ACE_RESTART_PREVENTED 002 Restart prevented: shut down FactoryLink first
E_FLCHANGEREAD 020 Error FL_Change_Read code=%d, %s
E_FLCLEARCHANGEFLAG 021 Error Clear ChFlag Tag "%s" (%d:%d) code=%d (%s)
E_FLREAD 022 Error Read Tag "%s" (%d:%d) code=%d (%s)
E_FLSETCHANGEFLAG 023 Error Set ChFlag Tag "%s" (%d:%d) code=%d (%s)
E_FLWRITE 024 Error Write Tag "%s" (%d:%d) code=%d (%s)
E_FLCOUNTMBX 025 Error Count Mbx Tag "%s" (%d:%d) code=%d (%s)
E_FLQUERYMBX 026 Error Query Mbx Tag "%s" (%d:%d) code=%d (%s)
E_FLREADAPPMBX 027 Error Read Mbx Tag "%s" (%d:%d) code=%d (%s)
E_FLWRITEAPPMBX 028 Error Write Mbx Tag "%s" (%d:%d) code=%d (%s)
An error occured while accessing the FactoryLink Database. The indicated
Tag may not exist or a Mailbox is duplicated and has two owners !! check
configuration or re-index the Database
E_MSGTOOLONG 029 Error Msg "%s" longer than '%d' incl.'\0'; truncated
E_UNKNOWN_TRIGGER_TYPE 041 Error internal input type '%d' unknown
E_UNKNOWN_VAL_TYPE 042 Error value type function "%s" unknown

FactoryLink Device Interfaces - OPC and Other Guide / 339


• 7 | OPC DATA EXCHANGE (ODX)
Information and Error Messages


Label in ODX.TXT 1xx Failure Shutdown Messages


NO_AUTHORIZATION 100 Option not installed or License not enabled
ACE_ERR_IN_INSTALLATION 101 Authorization EXE file may be corrupted
ACE_ERR_IN_KEYFILE 102 Authorization Key file may be corrupted
PROG_INIT_FAIL 103 Error Register ODX to kernel, code=%d (%s)
E_ATEXIT 104 Error Register Exit procedure, code=%d
E_CT_GET_HDRLEN 110 Error Header Length "%s", CT File "%s" len=%d
E_CT_GET_NCTS 111 Error Empty CT File "%s"
E_CT_GET_NRECS 112 Error No Records, CT File "%s"
E_CT_GET_RECLEN 113 Error Record Length "%s", CT File "%s" len=%d
E_CT_OPEN 114 Error Open CT File "%s"
E_CT_READ_HDR 115 Error Read Header "%s", CT File "%s"
E_CT_READ_INDEX 116 Error Read Index, CT File "%s"
E_CT_READ_RECS 117 Error Read "%s" Records, CT File "%s"
E_CT_TYPE 118 Error Unknown CT Type '%d', CT File "%s"
E_CT_INFO 119 Error ODX_init information, File "%s": %s
SYS_NO_MEMORY 130 Error Getting Memory
SYS_FOPEN_ERR 131 Error Open File "%s"
PROG_THREAD_START_ERR 132 Error Starting Thread "%s", OPC server "%s": %s
E_MKDIR 133 Error Creating Directory "%s"
E_NPATH 134 Error Getting Memory for NPATH
SYS_CREATE_SEMAPHORE 135 Error Creating Semaphore for "%s"
An error occured during accessing the displayed data. Check the system and
storage media.

Label in ODX.TXT 2xx Configuration Error Shutdown Messages


E_FOPENARG 200 Error Open Program Argument File "%s"
PROG_ARG_UNKNOWN 201 Program Argument "%s" unknown
E_PROGENVVAR 202 Environment Variable "%s" unknown

340 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Information and Error Messages

The following information can be logged for each connection to file(s)


%FLAPP%\SHARED\LOG\ODX*.LOG as defined for the Program Argument -VMode. The
values are displayed by the Error Status Message Tag and/or Error Status Tag specified for the
appropriate of the ODX Connection table.
4xx/5xx Link Error/Status reported to Message Tag or
Label in ODX.TXT Analog Bit ON
value
OPC_INACTIVE 400 Inactive (0x00040000 text as available or Err 0 all OFF
6xx/7xx)
OPC_STARTING 401 Active/Starting (0x00040000 text as available or Err 3 Bit 0+1
6xx/7xx)
OPC_RUNNING 402 (0x00040000 text as available or Err 5+ST Bit 0+2
Active/Running 6xx/7xx)
OPC_DISABLED 403 (0x00040000 text as available or Err 9+ST Bit 0+3
Active/Disabled 6xx/7xx)
OPC_NO_JOB 406 Nothing to do (No ODX configuration for this Connect 0 all OFF
Inactive)
OPC_TERMINATED 407 Terminated (0x00040000 text as available or Err 128 Bit 7
6xx/7xx)
OPC_ERROR 501 Error/Enabled (0xD0040001 text as available or Err 256+ST Bit 8
6xx/7xx)
OPC_DISABLEDAN 503 Error/Disabled (0xC004000B text as available or Err 264+ST Bit 8+3
DERROR 6xx/7xx)

Note, OPC Status Codes OPC Status ST=Server Status


are samples only, for Code: | | 0000..01FFhex Microsoft specific
detailed information | | Apply ECI to decode
0200..7FFFhex OPC standard
Bit or Nibble values
see OPC Interface | | 8000..FFFFhex Vendor specific as shown below.
Specification OPCError.h
OPC Facility | 000..FFFhex Program or location
Code:
OPC Severity 0..3hex Success message
Code:
4..7hex Informational message
8..Bhex Warning message (A..B
Vendor specific)
C..Fhex Error message (E..F Vendor
specific)

FactoryLink Device Interfaces - OPC and Other Guide / 341


• 7 | OPC DATA EXCHANGE (ODX)
Information and Error Messages


Error Bit Server Connect Status Nibble N1 ODX Connect Status Nibble N0

Bit8 (256) Bit7 (128) Bit6 (64) Bit5 (32) Bit4 (16) Bit3 (8) Bit2 (4) Bit1 (2) Bit0 (1)
Error Status Ana
Tag Val Connect Dis- Server Server Server Connect Connect Connect Connect
Error Connect Status 4 Status 2 Status 1 Disabled Running Starting Active
Inactive 0 0 0 0 0 0 0 0 0 0
Active/Starting 3 0 0 0 0 0 0 0 1 1
Active/Running 21 0 0 0 0 1 0 1 0 1
Active/Test 85 0 0 1 0 1 0 1 0 1
Active/Disabled 25 0 0 0 0 1 1 0 0 1
/Run
Active/Disabled 89 0 0 1 0 1 1 0 0 1
/Test
Link Terminated 128 0 1 0 0 0 0 0 0 0
Error/Enabled 256 1 0 0 0 0 0 0 0 0
/Lost
Error/Enabled 288 1 0 0 1 0 0 0 0 0
/Failed
Error/Ena 304 1 0 0 1 1 0 0 0 0
/NoConfig
Error/Ena 320 1 0 1 0 0 0 0 0 0
/Suspended
Error/Disabled/ 264 1 0 0 0 0 1 0 0 0
Lost
Error/Disabled/ 296 1 0 0 1 0 1 0 0 0
Failed
Error/Dis/ 312 1 0 0 1 1 1 0 0 0
NoConfig
Error/Dis/ 328 1 0 1 0 0 1 0 0 0
Suspended

342 / FactoryLink Device Interfaces - OPC and Other Guide


OPC DATA EXCHANGE (ODX) | 7
Information and Error Messages

Nibble Error Bit Connect Connect Connect Connect


Connect Status Nibble N0
Value (Bit8) Disabled Running Starting Active

Connect Inactive or Unavailable 0 0 or 1 0 0 0 0

Connect Active/Starting 3 0 0 0 1 1

Connect Active/Running 5 0 0 1 0 1

Connect Error/Disabled 8 1 1 0 0 0

ConnectActive/Disabled 9 0 1 0 0 1
(Hot-Standby)

Nibble Error Dis- Server Server Server


Server Status Nibble N1 Value Bit Connec Status Status Status
(Bit8) t 4 2 1

Server Inactive or Unavailable 0 0 or 1 0 0 0 0

Server RunningOPC_SERVER_RUNNING 1 0 0 0 0 1

Server FailedOPC_SERVER_FAILED 2 1 0 0 1 0

Server NoConfigOPC_SERVER_NOCONFIG 3 1 0 0 1 1

Server 4 1 0 1 0 0
SuspendedOPC_SERVER_SUSPENDED

Server TestOPC_SERVER_TEST 5 0 0 1 0 1

Server Link Terminated/Disconnected 8 0 1 0 0 0

FactoryLink Device Interfaces - OPC and Other Guide / 343


• 7 | OPC DATA EXCHANGE (ODX)
Information and Error Messages



The errors below may be displayed by ECI 021 Table %s: RAPD Error 6xx/7xx=0xhhh info
only if an ECI Read Mailbox is assigned. They also display in the Error Status/Message or the
ODX*.LOG file defined by Program Argument –VMode.

Label in ODX.TXT 6xx/7xx Transmission Errors reported to ECI Task Message Tag (info)
(hhh)

E_XMIT_RD_0258 600 No Read Response, Timeout OPC Group/Item configuration errors or general
communication errors as for example link not
E_XMIT_RD_0259 601 Invalid Read Dataset/Group
completely established
E_XMIT_RD_025A 602 Empty Read Dataset/Group
E_XMIT_RD_025B 603 No Read Connection

E_XMIT_WR_02BC 700 No Write Acknowledge, Timeout


E_XMIT_WR_02BD 701 Invalid Write Dataset/Group
E_XMIT_WR_02BE 702 Empty Write Dataset/Group

E_XMIT_WR_02BF 703 No Write Connection

E_XMIT_WR_02C6 710 Writing Item "%s" OPC data type may not be supported by ODX
E_XMIT_WR_02C7 711 Writing ItemArray "%s" System errors, please notify error to Siemens
E_XMIT_WR_02C8 712 Writing Dataset/Group

E_XMIT_WR_02C9 713 Writing ItemArray Offset>0 "%s" OPC cannot write to specific Array Tag
E_XMIT_WR_02CA 714 Writing Unknown Item ECI Tag Address may be out of range

E_XMIT_WR_02D0 720 Write AcknErr 0x%08.8lX, Errors transmitted with acknowledge, for code.
Dataset/Group See OPC interface specification OPCError.h
E_XMIT_WR_02D1 721 Write AcknErr 0x%08.8lX, Item "%s"

If you receive the following error message when running ODX_INIT, you need to break the
dataset referenced in the error into two or more tables. The ODX/ECI OPC Reference table is
limited to 64K maximum data size:
FATAL: Dataset “OPC_TABLE1” size of 900200 bytes exceeds maximum (65535) ODX_INIT: 1
ERRORS

344 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 8





SECS/HSMS (SDRV)
Communications

O VERVIEW
This chapter contains information needed to set up and configure bidirectional
communications between the FactoryLink real-time database and one or more SECS (SEMI
Equipment Communication Standard) Protocol devices. SECS Communications support the
SECS-I and SECS-II serial RS-232 protocol as well as the HSMS TCP/IP protocol. This SECS
driver makes use of a low level library from GW Associates, specialists in SECS
communications.
Note: This presentation assumes you are knowledgeable of the SECS protocol as
defined in the SEMI Specification, the SECS equipment the driver communicates with,
and FactoryLink configuration.

Installation
Set the environment variable GWASDRDIR equal to:
<FLINK>/bin/sdr-140 for serial communications
<FLINK>/bin/sdr-170 for HSMS communications
For Windows, also include this in your path.

Add Driver to System Configuration


Add a task entry in the System Configuration table. Be sure the entry is in the Shared domain.
Set the Executable File field to specify SDRV in the Task Name field.
sdrv_eth.exe for HSMS communications
sdrv_232.exe for serial communications
The program arguments for SDRV are on page 377.

FactoryLink Device Interfaces - OPC and Other Guide / 345


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



SECS C OMMUNICATIONS C ONFIGURATION TABLES

Logical Device Control Table


The SECS Logical Device Control Table is used to define a physical communication path to
another piece of equipment. This connection is assigned a logical port to be used as a
reference. A logical port can be a COM port in the case of an RS-232 SECS connection, or a
TCP/IP port in the case of an HSMS connection. Some fields in this table may not be used,
depending on the type of connection specified.

Accessing

Device Interfaces > SECS/HSMS Communications > SECS Logical Device Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Logical Port Number that represents a particular communications 0 to 999
path.
SECS/HSMS Indicates whether to use the SECS (RS-232) or HSMS SECS,
(Ethernet) protocol for communication. HSMS
Com Port Specifies which COM port to use for the SECS protocol. 1 to 8
Baud Rate (Required for SECS) Indicates the speed at which the task 150, 300,
communicates. 1200, 2400,
4800, 9600
(default),
19200
T1 Timeout SECS T1 (inter character) time-out value in tenths of a 1 to 255
0.1 sec second (default = 5)
T2 Timeout SECS T2 (block protocol) time-out value in tenths of a 1 to 255
0.1 sec second (default = 30)
T3 Timeout 1 (Required for SECS and HSMS) The T3 Reply time-out 1 to 120
sec value in seconds (default = 10)
T4 Timeout 1 SECS T4 (inter block) time-out value in seconds 1 to 120
sec (default = 10)
T5 Timeout 1 HSMS T5 Connect Separation Timer in seconds 1 to 120
sec (default = 10)
T6 Timeout 1 HSMS T6 Control Message Reply time-out value in 1 to 120
sec seconds (default = 20)

346 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

Field Name Description Req. Valid Entry Valid Data Type


T7 Timeout 1 HSMS T7 Connect time-out value in seconds 1 to 120
sec (default = 10)
T8 Timeout 1 HSMS T8 Inter Character time-out value in seconds 1 to 120
sec (default = 10)
Retry Limit SECS message retry limit 0 to 31
(default = 3)
ACTIVE/ (Required for HSMS) Specifies whether this port is the ACTIVE,
PASSIVE Active (master) or Passive (slave) entity. An Active entity PASSIVE
establishes the TCP/IP connection and a Passive entity
waits for the Active entity to initiate the connection. On
any given HSMS link, one end must be Active and the
other must be Passive. By convention, the host is usually
configured as the Active entity with the equipment
configured as Passive.
HOST/ Communication role of this port HOST,
EQUIP EQUIP
Protocol Version of the protocol to be used
Valid Entry explanation:
HSMS-SS94 for HSMS
HSMS-94 for HSMS
HSMS-93 for HSMS
SECS for SECS
GEM for BOTH
Passive IP (Required for HSMS) IP Address for the Passive entity IP Address
Address on this link format
TCP Port (Required for HSMS) The TCP Port Number the Passive 0 to 10000
Entity waits at for connection (default =
5000)
Note: Ensure no service is using this port by
checking the system host file.
Connection (Required for HSMS) The time to wait in seconds to 1 to 120
Estab 1 sec establish a connection (default = 20)
Circuit (Required for HSMS) The frequency in seconds that the 0 to 120
Assurance 1 control messages will be sent at to verify the link is still (default = 15)
sec functional
TGRACE 1 (Required for HSMS) The time in seconds during which 1 to 120
sec the send operations will be accepted while attempting to (default = 10)
establish a connection

FactoryLink Device Interfaces - OPC and Other Guide / 347


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



Field Name Description Req. Valid Entry Valid Data Type
Memory Stall (Required for HSMS) The time limit in seconds to allow 1 to 120
1 sec the other end of the link to attempt to send messages (default = 30)
while all buffers are full
Write Stall (Required for HSMS) Time limit in seconds to wait for 1 to 120
1sec TCP/IP to accept data (default = 20)
Last Send Tag where the status for the last send operation is written tag name analog
Status Tag
Msgs Sent Tag where the count of messages sent is written tag name analog
Counter Tag
Msgs Rcvd Tag where the count of messages received is written tag name analog
Counter Tag
T3/T4 Tag where the count of time-out errors is written tag name analog
Timeout
Errors Tag
Retry Tag where the count of retries is written tag name analog
Counter Tag
Status Msg Tag where the status for this logical port is written tag name message
Tag

348 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

Logical Device Information Table


This table defines other pieces of equipment using each communication path. Each piece of
equipment is assigned a logical device number for reference. For an RS-232 connection, there
can be only one logical device per logical port. For an HSMS connection, there can be several
pieces of equipment per port, but only one of those can be PASSIVE.

Accessing

Device Interfaces > SECS/HSMS Communications > SECS Logical Device Control > “logical port”
> SECS Logical Device Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Error/Status (Not used) Tag where any errors for this logical station tag name analog
Tag Name are written
Logical Number to represent the combination of a logical port and X 0 to 63
Device physical station. A logical station number can be used (default = 0)
Number only once.
Device ID Number to identify a physical device X 0 to 32767
(default = 0)
Device State Initial state of the link at startup X ON_LINE,
at Startup OFF_LINE
Comment Reference information about this logical station 1 to 30
characters

FactoryLink Device Interfaces - OPC and Other Guide / 349


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



Read/Write Control Table
This table sets up the tags that trigger messages to be sent to individual devices, to signify what
messages were received from each device, and to link these tags to the logical device and
message structure stored in the SECS-II Message Definition Information Table. Every device
should have at least one entry in this table.

Accessing

Device Interfaces > SECS/HSMS Communications > SECS Read/Write Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Logical Number, originally specified in the SECS Logical Device 0 to 63
Device Information Table, that represents a particular device (default = 0)
Number
SECS-II Number of the table defined in the SECS-II Message 0 to 32767
Table ID Definition Control Table to be processed for this logical (default =0)
device
Send Stream Tag that defines the stream number of the message to be tag name analog
Number sent
Send Tag that defines the function number of the message to be tag name analog
Function
Number
Send Tag that defines the message ID of the message to be tag name analog
Message ID sent. This tag is used to identify a specific message from
multiple definitions of the same stream/function number.
Send Trigger Tag whose value, when forced to 1, initiates a send of the tag name digital
message defined by the stream, function, and message ID
tags
Send Disable Tag whose value, when 1, disables a triggered send of the tag name digital
device(s) message specified in this table
Send State Tag whose value is 0 when a triggered send of the tags tag name digital
specified in this table is in progress and 1 (ON) when the
table is inactive
Send Status Tag where the status for the last send operation for this tag name analog
table is written. These are GW & Associates level status
codes. See “Status Return Codes” on page 380

350 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

Field Name Description Req. Valid Entry Valid Data Type


Receive Tag where the stream number of the last message tag name analog
Stream received is written
Number
Receive Tag where the function number of the last message tag name analog
Function received is written
Number
Receive Tag where the message ID of the last message received is tag name analog
Message ID written
Receive Tag where the status for the last receive for this table is tag name analog
Status written. These are GW & Associates level status codes.
See “Status Return Codes” on page 380.
Read Disable Tag whose value, when 1 (ON), prevents the logical tag name digital
device from being polled for received messages
Command Tag whose value, when force written, sends a predefined tag name analog
Trigger command to the SECS task. Currently, the only command
available is the On Line/Off Line state of Logical Device.
Command: ON/OFF Line State Value: 1
Command Tag whose value is used in conjunction with the tag name analog
Value Command Trigger to build the command sent to the
SECS task
Command action: OFF Line Value: 0
Command action: ON Line Value: 1
Command (Not used) Tag where the status for the last command for tag name analog
Status this table is written

FactoryLink Device Interfaces - OPC and Other Guide / 351


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



SECS-II Message Definition Control Table
This table is used as an index into the SECS-II Message Definition Information Table, and for
linking the sets of message definitions to the SECS Read/Write Control Table.

Accessing

Device Interfaces > SECS/HSMS Communications > SECS-II Message Definition Control

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


SECS-II (Required for SECS and HSMS) The number for the 0 to 32767
Table ID SECS-II Message Definition Information Table to modify (default = 0)
Comment Reference information about this table 1 to 30
characters

Message Definition Information Table


The SECS Logical Device Information table is used to define the SECS messages used in your
application. Each SECS message you define in this table occupies one or more rows. The first
row identifies the message (Stream/Function/Message ID) and whether it is for reading,
writing, or both. The structure of the message is specified like a flat SML (SECS Messaging
Language) file. Each SECS message item occupies a row in the message table where the item
data type in the configured SECS message is defined in the Item Type Field. Each item defined
can have a FactoryLink tag associated with it. This allows the user to tie specific FactoryLink
tags to specific items within SECS messages.
There are a few considerations when configuring messages to be read in or written out of the
interface. Often, these situations are to accommodate variable data types or message structures
in a message. These situations are explained briefly below, with several examples at the end of
this section.
Note: In these descriptions, and in the examples later in this section, actual message
structures are used. If you are not familiar with these structures or their symbology,
please refer to the SEMI SECS-II Messaging Standard, and your equipment manual.
• Process Program and File Transfers: When transferring files using the SECS-II messages,
(typically S7Fx), it is necessary to specify the file size, path and filename, and type. When
reading a file (S7F6, for example) through the driver, it is necessary to provide the
filename/path to store the file locally. The driver will look at the message structure, and
determine what data type is being used. When writing a file, the driver must send the file
size (in S7F1, for example), specify the file to send, and specify what type of file it is. The
SECS driver provides a simple method of doing this.

352 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

• When reading a file, specify FNAME as the ITEM TYPE for the body of the file. In the
TAG field on this line, put a message tag that contains the path and filename where you
want the file to be stored.
• When writing a file, specify FN_xx as the ITEM TYPE for the body of the file, where xx
refers to the type of data the file is made up of. For example, for an ASCII file, specify
the ITEM TYPE as FN_A, or a binary file stored as 4 byte unsigned integers would be
specified as FN_U4. A complete list of supported file types is listed later in this section.
In the TAG field on this line, put a message tag that contains the path and filename where
the file is stored. In the case where it is necessary to send the size of a file (S7F1, for
example), specify the ITEM TYPE as FSIZE. In the tag field on this line, put a message
tag that contains the path and filename where the file is stored and the driver will
determine the size of the file.
• Secondary messages: When the driver receives a primary message, it will automatically
attempt to send the corresponding reply, or secondary message, if it is configured in the
message table. For example, if an S1F1 is received, the driver automatically sends the S1F2
reply, assuming it is correctly configured in the message table. This is true for all primary
messages received. An error message will be return if the corresponding secondary message
does not exist in the table.
• Parsing: In some cases, the driver will receive a message, and the application will require
only a few pieces of data from it. In this case, it is possible to specify exactly which data
tags, or even parts of a specific data tag, are to be stored by specifying exactly where in the
message the data is. A special syntax is used to specify where in the structure each piece of
data is. If parsing is used on any one tag on the message, it must be used on all tags in that
message.
• The syntax specifies the item in the list to store. In the case of a nested list, a period ‘.’ is
used to separate the two digits. Typically, there will be several of these strung together.
For example: 1.3.1.2.4 would specify the 4th item in a multiply nested list. The first item
is a list header (1), the third item in that list is another list header (1.3), the first item in
that list is yet another list header (1.3.1), the second item in that list is another list header
(1.3.1.2), and the driver is to retrieve the fourth item in that list (1.3.1.2.4). This example,
if used on the S6F11 message listed below, would return a value of 246.
• Also, if the desired field is an ASCII string, it is possible to only retrieve part or all of the
string by adding a ‘:X,Y’ to the end of the parse string. In this syntax, X refers to the
starting position and Y refers to the number of bytes to be stored. For example:
1.3.1.2.3:6,5 on the S6F11 below would return “speed”. If the X is omitted, then the
starting position is 0 (1.3.1.2.3:,4 on the message below would return “High”). If the Y is
omitted, then the remainder of the string starting at X will be stored (1.3.1.2.3:11, on the
example message below would return “SECS”). If neither are specified, the entire tag
will be stored (1.3.1.2.3: would return “High speed SECS”).

FactoryLink Device Interfaces - OPC and Other Guide / 353


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



For example, in a S6F11 message, you may only want to look at the first report ID and the first
two data tags in that report, but not any of the other data.
If the message looks like this:
S6F11 W
<L [ 3]
<U2 0>/* DATAID */
<U2 1>/* CEID */
<L
<L [ 2]
<U2 1>/* RPTID */
<L
<I2 135>/* Data * /
<U1 357>/* Data * /
<A “High speed SECS”> /* Data */
<U4 246>/* Data * /
<U4 468>/* Data * /
<U4 802>/* Data * /
>
>
<L [2]
<U2 2>/* RPTID */
<L
<I2 -7>/* Data */
<U1 4>/* Data */
<U4 321>/* Data */
<U4 123>/* Data */
<U4 99>/* Data * /
<U4 100>/* Data * /
>
>
• The first report ID would be found at 1.3.1.1: and stored as 1.
• The first data tag in the first report would be found at 1.3.1.2.1: and stored as 135.
• The second data tag in the second report would be found at 1.3.2.2.2: and stored as 4.
This takes some getting used to, so look at the listing again with the parse position of every line
specified on the right margin. Keep in mind that the list headers themselves contain no data,
and are therefore invalid parse locations. These fields are shaded to show they are not valid to
use as parse locations, but are included here merely to illustrate the structure completely.

S6F11
<L [ 3] 1
<U2 0> <U2 0> 1.1:
<U2 1> /* CEID * / 1.2:
<L 1.3

354 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

<L [ 2] 1.3.1
<U2 1> /* RPTID * / 1.3.1.1:
<L 1.3.1.2
<I2 135> /* Data * / 1.3.1.2.1:
<U1 357> /* Data * / 1.3.1.2.2:
<A “High speed SECS”> 1.3.1.2.3:
<U4 246> /* Data * / 1.3.1.2.4:
<U4 468> /* Data * / 1.3.1.2.5:
<U4 802> /* Data * / 1.3.1.2.6:
>
>
< L [ 2] 1.3.2
<U2 2> /* RPTID * / 1.3.2.1:
<L 1.3.2.2
<I2 -7> /* Data * / 1.3.2.2.1:
<U1 4> /* Data * / 1.3.2.2.2:
<U4 321> /* Data * / 1.3.2.2.3:
<U4 123> /* Data * / 1.3.2.2.4:
<U4 99> /* Data * / 1.3.2.2.5:
<U4 100> /* Data * / 1.3.2.2.6:
>

SECS DRIVER Configuring the SECS-II Message Definition Information Table


• The third data item in the first report is a text field. If only part of that string was desired,
the word “speed” for example, the parse string would be 1.3.1.2.3:6,5. This begins at the
6th character, and stores the next 5.
• Conditional Parsing: There are cases where the same stream and function (SxFy) received
by the driver may have varying structures. One common example of this is S6F 11 where
different collection events will have different reports attached to them, therefore making the
structures variable. This driver allows the application to evaluate different structures based
on an tag within the structure. Conditional item types (entries in the ITEM TYPE field are of
the form CONxx, where xx specifies the data type; for example CONAS would be ASCII,
CONU4 would be a 4 byte unsigned integer) are used in conjunction with the parsing syntax
to point to the tag are compare it to a value. If this comparison is true, then this message
structure is used, if not, the driver goes on to the next. If none of the conditional tags match,
the message is dropped. A complete list of supported conditional data types appears later in
this section.
• In conditional comparisons on an ASCII data type (CONAS), the :X,Y parsing conditions
• apply to conditional matching; but if the conditions are met and a tag is specified to store

FactoryLink Device Interfaces - OPC and Other Guide / 355


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



• the data tag, the entire string will be stored.
• NOTE: Only one conditional entry is allowed per message.
• Message ID: Just as there are cases where the driver will receive the same SxFy with
different structures, there are also cases where the driver will need to send the same SxFy
with different structures. To accomplish this, the message ID field can be used to
differentiate between the different structures.
Take the following messages, for example. Although they are the same S2F33, they perform
different functions, and both are likely to be needed. The first message deletes all defined
reports, the second defines a specific report.
/* Delete all reports * /
S2F33 W
<L [ 2]
<U2 1234>/* DATAID * /
<L
>
/* Define Report */
S2F33 W
<L [ 2] <
U2 1235>/* DATAID * /
<L
<L [2]
<U2 1>/* RPTID */
<L
<U2 12>/* VID */
<U2 13>/* VID */
>
>
The first message could be designated S2F33M1 (messages are typically referred to by stream
and function as SxFy where x is the message stream, and y is the message function;
FactoryLink adds the message ID field to designate which actual configured message is being
referred to: SxFyMz where x = stream, y = function, and z = FLINK Message ID), and the
other S2F33M2, thereby differentiating two very different message structures.
• Repeat Blocks: Numerous messages contain a list of n items, where n is a variable number,
and not known until the message is received. In order to accommodate these variable length
messages, this driver allows repeat blocks to be setup. A repeat block is a structure that can
be defined, and will be repeated some number of times.
• To configure this for a received message, define the structure as usual, then put the
maximum number of repeats allowed. For each stored tag in the repeated structure, use a
tag array to store the data in the RTDB. The maximum number allowed is required to
keep from overrunning the array bounds on the tags used to store the data, so be sure that
the number is less than or equal to the size of the array.
• On sending messages, this feature simplifies configuration. To configure this for a
message to be sent, define the structure as usual, then put the exact number of repeats to

356 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

be sent. For each stored tag in the repeated structure, use a tag array to store the data in
the RTDB. The maximum number allowed is required to keep from overrunning the
array bounds on the tags used to store the data, so be sure that the number is less than or
equal to the size of the array.
• Complex, nested repeat blocks can also be used. Several examples are provided at the end
of this section.
• Inquire/Grant: For large, out-going messages using the inquire/grant message scheme (for
example, S7F1, S7F2, S7F3 sequence), it is possible to configure the SECS driver such that
triggering the inquire (S7F1) followed by receipt of the grant message (S7F2 with grant
code = 0) automatically sends the primary message (S7F3).
• Specify INQGN in the Read/Write field for the inquire message and indicate the main
messages primary function number in the INQGN/CONxx or Repeat Data field. The
main message is sent automatically on successful grant without processing necessary at
the application level. If the grant code > 0, the main message will not be sent.

Accessing

Device Interfaces > SECS/HSMS Communications > SECS-II Message Definition Control > “table
ID” > SECS-II Message Definition Information

Field Descriptions

Field Name Description Req. Valid Entry Valid Data Type


Tag Name Tag updated as a result of a READ message or used as a tag name digital, analog,
source of data for a WRITE message or a constant value longana, float,
to be used as the source of data for a WRITE message. message
On WRITE, the Data Item is sent with a value of 0 if no
tag is specified. On READ, the Data Item is not stored if
no tag is specified.
Read/Write The message type. For INQGN, the value in the INQGN,
CONXX or Repeat Data field specifies the function
number of the data message. The stream and message ID
for the data message are the same as the Inquire message.
Valid Entry explanation:
required on the first line of a message definition
READ
WRITE
BOTH (Read and Write activity)
INQGN (Inquire/Grant transaction)
Stream Stream number for the message to be sent or received. 0 to 255
Decimal This entry is required on the line that specifies READ,
WRITE, BOTH or INQGN.

FactoryLink Device Interfaces - OPC and Other Guide / 357


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



Field Name Description Req. Valid Entry Valid Data Type
Function Function number for the message to be sent or received. 0 to 255
Decimal This entry is required on the line that specifies READ,
WRITE, BOTH or INQGN.
Message ID Message number for the message to be sent or received. 0 to 999
If used, this entry must be on the line that specifies
READ, WRITE, BOTH or INQGN.
Item Type The data item. See “Technical Notes” on page 377 for
additional details.
Valid Entry explanation:
LIST - Number of data items in a message
BNARY - Binary data
BOOLN - Boolean data
ASCII - ASCII data
JIS8 - Japanese
SINT8 - 8 byte signed integer
SINT1 - 1 byte signed integer
SINT2 - 2 byte signed integer
SINT4 - 4 byte signed integer
FLOT8 - 8 byte float
FLOT4 - 4 byte float
UINT1 - 1 byte unsigned integer
UINT2 - 2 byte unsigned integer
UINT4 - 4 byte unsigned integer
UINT8 - 8 byte unsigned integer
FNAME- File Name for READ
NOBDY - For header only messages
FSIZE - File size
FN_B - File Name for WRITE, send data as bytes
FN_A - File Name for WRITE, send data as ASCII
FN_I1 - File Name for WRITE, send data as SINT1
FN_I2 - File Name for WRITE, send data as SINT2
FN_I4 - File Name for WRITE, send data as SINT4
FN_I8 - File Name for WRITE, send data as SINT8
FN_U1 - File Name for WRITE, send data as UINT1
FN_U2 - File Name for WRITE, send data as UINT2
FN_U4 - File Name for WRITE, send data as UINT4
FN_U8 - File Name for WRITE, send data as UINT8
CONI2- Conditional item type SINT2
CONU2- Conditional item type UINT2
CONI4- Conditional item type SINT4
CONU4- Conditional item type UINT4
CONAS- Conditional item type ASCII

358 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
SECS Communications Configuration Tables

Field Name Description Req. Valid Entry Valid Data Type


* Item Length Number or a tag containing the number, used as an item tag name or digital, analog,
count for non-ASCII data items, such as a list, and a byte constant longana, float,
count for ASCII data items. The following applies for message
ASCII item types:
WRITE Item Length = 0: Data Item byte count
dynamically adjusts to the length of the string stored in
the message tag.
String Length >= Item Length: Data Item byte count is
equal to Item Length.
String Length <= Item Length: Data Item byte count is
Null filled to Item Length.
READ Item Length = 0: Complete receive string is stored
in the respective message tag. This assumes the message
tag size is adequate to store the ASCII item being read.
String Length <= Item Length: Complete receive string is
stored.
String Length <= Item Length: Only Item Length bytes
are stored.
INQGN, Number or tag for use with advanced features, such as tag name digital, analog,
CONXX or conditional parsing, repeat blocks, inquire/grant message longana, float,
Repeat Data sequencing, and SECS 8 byte data item handling. message
The SECS protocol defines several 8-byte data types. The
largest storage within FactoryLink is 4 bytes. The driver
provides the capability of storing the 8-byte data types in
contiguous database tags to prevent possible loss of data
in an 8-byte to 4-byte conversion. The data for UNIT8
and SINT8 can be stored into 2 Longana or Analog tags
by specifying a tag array and a count in this field. It is up
to the user o devise methods within the FactoryLink
application to correctly interpret the 8-byte tag array data.
Valid Entry explanation:
READ items (0 to 32767)
WRITE items (0 to 255_
Parse Identifies the position of a data item in a message. See 1 to 15
Position “Technical Notes” on page 377 for specific usage. characters

FactoryLink Device Interfaces - OPC and Other Guide / 359


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
SECS Communications Configuration Tables



Field Name Description Req. Valid Entry Valid Data Type
Reply (W-bit) Specifies whether a primary message requires a response NO
or not. DELIVR can be used on primary or secondary YES
messages and requires acknowledgment of message DELIVR
delivery only. WAIT
If a primary message requires a response and WAIT is not
specified on the first line of the READ primary message,
the driver will automatically send the corresponding
secondary message. If WAIT is specified, the driver will
not automatically respond. It will be the responsibility of
the application to trigger the secondary message. This
allows the application to examine the primary message
and format a secondary message.
Entry is required on the first line of a WRITE primary
message definition.
* Logical (Required for SECS and HSMS) Number or a tag tag name, analog
Device containing the number, originally specified in the SECS 0 to 63
Logical Device Number Information Table that (default = 0)
represents a particular device.
Auto Read If YES and a Read Disable Tag is specified for this NO, YES
Disable Logical Device, it is set to ON upon receiving this
message. This prevents FactoryLink tags from being
overwritten by halting the reading of new messages from
the incoming SECS message pool for this Logical Device
until the Read Disable Tag is set to OFF. This feature
enables a system to assure each message is processed
appropriately within FactoryLink.
Positional Specifies whether to process all data items or parse out NO, YES
Parse Enable specific data items to be processed in a READ message.
Note: For messages where parse strings are used to
identify location of data in SECS messages, all items
in the message must use parse strings and have YES
in the Positional Parse Enable field.

360 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

E XAMPLES
1. Simple messages: The following are two common and simple message transactions. After
each message is the corresponding SECS-II Message Definition Information Table entries.
In both cases, the tables are filled out from a HOST-configuration point of view.
Host Initiated S1F13 (Establish Communications Request):
S1F13 W
< L> .
Equipment Response S1F14:
S1F14
<L [ 2]
<B 0>
<L
<A 'ABC123'>
<A '020100'> >
>
>

FactoryLink Device Interfaces - OPC and Other Guide / 361


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



Equipment Initiated S5F1 (Equipment Alarm):
S5F1 W
<L [ 3]
<B 0x06>
<U2 1002>
<A "Machine on Fire">
>
Host Response S5F2:
S5F2
<B 0x00> .

362 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

2. Complex and Parsed Messages: The following example illustrates a common message
that uses the parsing functionality. The first configuration shows the entire message entered
into the configuration table, this illustrate a more complex message configuration. In the
second configuration, the same message is being read, but this time, only the necessary tags
are configured in the table, and the parsing string specifies the exact location on the tag.

Equipment Initiated S6F11 (Event report):


S6F11 W
<L [ 3]
<U2 1234> /* DATAID */
<U2 1> /* CEID */
<L
<L [2]
<U2 1> /* RPTID */
<L
<A “High speed SECS”>
<U4 246> /* Data */
<U4 468> /* Data */
>
>
<L [2]
<U2 2> /* RPTID */
<L
<I2 -7> /* Data */
<U1 4> /* Data */
>
>
>
>

Host Response S6F12


S6F12
<B [1] 00> . /* ACKC6 */

FactoryLink Device Interfaces - OPC and Other Guide / 363


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples


364 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

Same message using parsing functionality:

FactoryLink Device Interfaces - OPC and Other Guide / 365


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



3. Conditional Parsing: In the above message, the collection event ID (CEID) equals 1. The
message for CEID 2 may be entirely different, or the data may need to go into different
tags. This can be true for numerous collection events. Conditional parsing allows the
application to accommodate these varying messages. The following is an example message
for CEID 2. The tables below show how conditional parsing can be set up for both of these
messages. In some cases, the application may require most of the data from a few of the
messages in the set, but just one or two pieces from all the rest of the messages. To do this,
configure the conditionals first, then put the general case (with no conditionals) after. If one
of the conditions are met, that structure will be used. If not the general case will be used.
This is illustrated below.
Equipment Initiated S6F11 (Event report):
S6F11 W
<L [3]
<U2 1235> /* DATAID */
<U2 2> /* CEID */
<L
<L [2]
<U2 3> /* RPTID */
<L
<U4 5678> /* Data */
<U4 5432> /* Data */
>
>
>
>
Host Response S6F12:
S6F12
<B [1] 00> /* ACKC6 */

366 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

• In this configuration, if the incoming S6F11 is from CEID 1, the data will be collected in
the first structure. If the incoming S6F11 is from CEID 2, the data will be collected in the
second structure. For any other incoming S6F11, only the CEID will be collected, as
shown in the third S6F11 configured in the table. Note that for all these cases, only one
S6F12 response is required.

FactoryLink Device Interfaces - OPC and Other Guide / 367


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



4. Message ID: In the case where it is necessary to send the same SxFy with different
structures, the MESSAGE ID field is used to differentiate between the two messages. An
example is shown below. In the first message, an S2F33 is sent with a null list to delete all
reports, this message is distinguished by setting its MESSAGE ID to 1. The second S2F33
creates a report, and is identified by setting the MESSAGE ID field to 2.

Host Initiated S2F33 (Define report):

S2F33 W
<L [2]
<U2 1234> /* DATAID */
<L
>
>
Equipment Response S2F34:
S2F34
<B [1] 00> /* DRACK */
<L
<L [2]
<U2 1> /* RPTID */
<L
<U2 12> /* VID */
<U2 13> /* VID */
>
>
>
Equipment Response S2F34:
S2F34
<B [1] 00> /* DRACK */

368 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

• Note that for each primary S2F33 configured using differing message ID’s, a
corresponding secondary message is configured with the same message ID. This must be
true, even though the secondary message is the same in this case.

FactoryLink Device Interfaces - OPC and Other Guide / 369


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



5. Repeat Blocks: Repeat blocks can be used on both READ and WRITE messages. On read
messages, a repeat block allows for a variable length message. In the first example below, a
request for a list of all available process programs is made, this illustrates a repeat block to
accommodate a variable length list of single tags.. To configure the repeat block on a read,
enter a number equal to or greater than the number of repeats in the I NQGN, CONXX, or
Repeat Data field for the list header as shown below. In the example, it is not possible to
know how many there are, a repeat block is used with a maximum of 10 entries
Host Initiated S7F19 (Current Equipment Process Program Directory Request):
S7F19 W
Equipment Response S7F20:
S7F20
<L
<A “Program1”> /* PPID */
<A “Program2”> /* PPID */
<A “Program3”> /* PPID */
<A “Program4”> /* PPID */
<A “Program5”> /* PPID */
<A “Program6”> /* PPID */
>

370 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

Only looking at the fields involved in the repeat block, it is easier to illustrate how the syntax
would be expanded. The following example

INQGN, CONXX, or
Tag Name Item Name Item Length Repeat Data
List 1 10
EqPPID[0] UINT4

would result in the following table if expanded:

INQGN, CONXX, or
Tag Name Item Name Item Length Repeat Data
List 1 10
EqPPID[0] UINT4
EqPPID[1] UINT4
EqPPID[2] UINT4
EqPPID[3] UINT4
EqPPID[4] UINT4
EqPPID[5] UINT4
EqPPID[6] UINT4
EqPPID[6] UINT4
EqPPID[7] UINT4
EqPPID[8] UINT4
EqPPID[9] UINT4

• Note that the data is stored in an array, with the index into the array being incremented by
the driver. MAKE SURE THE ARRAY IS LARGE ENOUGH TO HANDLE THE
REPEAT BLOCK.

FactoryLink Device Interfaces - OPC and Other Guide / 371


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



Using a repeat block for writing messages allows for easier configuration. Configuration for a
write is identical as for a read, with the exception that the EXACT number of tags to be
repeated must be entered into the INQGN, CONXX, or Repeat Data field for the list header as
shown below. Another repeat block is used to read the data into FactoryLink, but this time the
example illustrates a variable length list made up of a list of three tags.
Host Initiated S1F11 (Status Variable Namelist Request):
S1F11 W
<L
<U2 101> /* SVID */
<U2 102> /* SVID */
<U2 109> /* SVID */
<U2 311> /* SVID */
<U2 417> /* SVID */
>
Equipment Response S1F12:
S1F12
<L
<L [3]
<U2 101> /* SVID */
<A “Vision Errors”> /* SVNAME */
<A ““> /* UNITS */
>
<L [3]
<U2 102> /* SVID */
<A “Feeder Errors”> /* SVID */
<A ““> /* UNITS */
>
<L [3]
<U2 109> /* SVID */
<A “Time in Alarm”> /* SVNAME */
<A “SEC”> /* UNITS */
>
<L [3]
<U2 311> /* SVID */
<A “Boards Lost”> /* SVNAME */
<A ““> /* UNITS */
>
<L [3]
<U2 417> /* SVID */
<A “Fire Suppressant”> /* SVNAME */
<A “PSI”> /* UNITS */
>
>

372 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

Only looking at the fields involved in the repeat block for the read of the secondary message, it
is easier to illustrate how the syntax would be expanded. The following example
INQGN, CONXX, or
Tag Name Item Type Item Length Repeat Data
LIST 1 5
LIST 3
EqSVID[0] UINT2
EqSVName[0] ASCII
EqSVUnits[0] ASCII

would result in the following table if expanded:


INQGN, CONXX, or
Tag Name Item Type Item Length Repeat Data
LIST 1 5
LIST 3
EqSVID[0] UINT2
EqSVName[0] ASCII
EqSVUnits[0] ASCII
LIST 5
LIST 3
EqSVID[1] UINT2
EqSVName[1] ASCII
EqSVUnits[1] ASCII
LIST 3

FactoryLink Device Interfaces - OPC and Other Guide / 373


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



INQGN, CONXX, or
Tag Name Item Type Item Length Repeat Data
EqSVID[2] UINT2
EqSVName[2] ASCII
EqSVUnits[2] ASCII
LIST 3
EqSVID[3] UINT2
EqSVName[3] ASCII
EqSVUnits[3] ASCII
LIST 3
EqSVID[4] UINT2
EqSVName[4] ASCII
EqSVUnits[4] ASCII

There will occasions where a nested repeat block will be necessary. In the next example, the
reply message contains a variable list of process programs. One tag in that list is another
variable list containing all the material ID’s to be processed using that process program. Note
how the repeat blocks are nested in the configuration table, but be sure to read the warning
note below the table!
Host Initiated S7F9 (Process Program/Material Matrix Request):
S7F9 W
Equipment Response S7F10
S7F10
<L
<L [2]
<A “Program1”> /* PPID */
<L
<A “LOT00001”> /* MID */
<A “LOT00002”> /* MID */
<A “LOT00003”> /* MID */
>
>
<L [2]
<A “Program2”> /* PPID */
<L
<A “LOT00099”> /* MID */
>
>
<L [2]
<A “Program3”> /* PPID */
<L
<A “LOT00601”> /* MID */
<A “LOT00602”> /* MID */
>
>
>

374 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Examples

• WARNING! The above example illustrates how a nested repeat block can be entered into
the driver, but also illustrates a common mistake that can be made when using nested
repeat blocks in this driver! By looking at the expansion for this configuration, note that the
first index in the EqMID array IS NOT INCREMENTED! The driver has no way of
knowing when to increment the first index, so it keeps incrementing the second index.
Only looking at the fields involved in the repeat block for the read of the secondary message, it
is easier to illustrate how the syntax would be expanded. The following example

INQGN, CONXX, or
Tag Name Item Type Item Length Repeat Data
LIST 1 4
LIST 2
EqPPID[0] ASCII 0
LIST 1 5
EqMID[0][0] ASCII 0

FactoryLink Device Interfaces - OPC and Other Guide / 375


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Examples



would result in the following table if expanded. Because of the variable nature of the message,
there is no real way of knowing which material ID’s belong to which process programs.

INQGN, CONXX, or
Tag Name Item Type Item Length Repeat Data
LIST 3
LIST 2
EqPPID[0] ASCII 0
LIST 5
EqMID[0][0] ASCII 0
EqMID[0][1] ASCII 0
EqMID[0][2] ASCII 0
EqMID[0][3] ASCII 0
EqMID[0][4] ASCII 0
LIST 2
EqPPID[1] ASCII 0
LIST 5
EqMID[0][5] ASCII 0
EqMID[0][6] ASCII 0
EqMID[0][7] ASCII 0
EqMID[0][8] ASCII 0
EqMID[0][9] ASCII 0
LIST 2
EqPPID[2] ASCII 0
LIST 5
EqMID[0][10] ASCII 0
EqMID[0][11] ASCII 0
EqMID[0][12] ASCII 0
EqMID[0][13] ASCII 0
EqMID[0][14] ASCII 0
LIST 2
EqPPID[3] ASCII 0
LIST 5
EqMID[0][15] ASCII 0
EqMID[0][16] ASCII 0
EqMID[0][17] ASCII 0
EqMID[0][18] ASCII 0
EqMID[0][19] ASCII 0

376 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Program Arguments

P ROGRAM A RGUMENTS
Argument Description
-B<#> The number of buffers allocated by the SDR daemon. Each buffer
represents 256 bytes.
The # is the number (maximum of 4000) of low-level buffers
allocated by the SDR daemon. If missing or less than 10, 200 buffers
are allocated.
-D SDR Library API calls displayed on the screen. SDR Library API
calls are written to FLAPP/sdrv-log.dat (default).
-D:F<#> The # indicates the file where the SDR Library API calls are written.
-L Additional data for repeat blocks and parsing is displayed on the
screen or written to the file specified by D:F.

TECHNICAL N OTES

Application Specific

Commands

Command Trigger and Command Value are analog tags. The Command Trigger defines the
Command Type and the Command Value contains an optional argument for the Command. At
present, the only Command Trigger value defined is 1, which sets the On Line/Off Line status.
The desired affect is stored in Command Value: 1 for On Line and 0 for Off Line. Additional
features may be added in the future.

Message Overrun Protection

In some situations, a piece of SECS equipment may send bursts of messages to FactoryLink.
To ensure individual processing of each message (avoiding database tag information from
being overwritten before processed), a message overrun feature is available. For messages
where this may be a problem, enter YES in the Auto Read Disable field of the SECS II
Message Definition Information table and specify a control tag in the appropriate Read Disable
Field of the SECS Read/Write Control table. When a message is read in with this feature
enabled, the FactoryLink database tags are updated and any further message processing by the
driver on that logical device halts until the Read Disable Control tag is set back to 0. When the
driver is in a halt mode, the SECS interface is still operational, buffering up any messages sent
to FactoryLink.

FactoryLink Device Interfaces - OPC and Other Guide / 377


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Technical Notes



Message Sequences

The driver handles the following six sequences:


Send Trigger – Send Primary SxFyMz, No Reply
Send Trigger – Send Primary SxFyMz, Reply
Poll for Secondary SxF(y+1)Mz
Drop Ticket
Send Trigger – Send Primary, Verify Delivery
Poll for Verification
Drop Ticket
Poll – Receive Primary SxFyMz, No Reply
Drop Ticket
Poll – Receive Primary SxFyMz, Reply
Respond with Secondary SxF(y+1)Mz
Poll – Receive Primary SxFyMz, Reply
Respond with Secondary SxF(y=1)Mz, Verify Delivery
Poll for Verification
Drop Ticket
SxFyMz meaning:
Sx = Stream X
Fy = Function Y
Mz = Message ID z

378 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Error Messages

E RROR M ESSAGES

Startup Messages

Message Cause
sdrv_insufficient_memory System has insufficient memory to create run time tables.
sdrv_port_enable XX - YY XX is the Device ID and YY is the error code.
sdrv_device_enable XX- YY XX is the Device ID and YY is the error code.
bad_open_sdrv_CTs Invalid or missing configuration tables.
bad_open_path_SDRCONF1.CFG Default path or path specified is invalid.
wrong_sdrv_task Use sdrv_eth.exe for HSMS and sdrv_232.exe for SECS.
sdrv_dup_port XX Duplicate definition for port number XX.
sdrv_dup_deviceID_port XX A duplicate device ID was entered for port XX.
sdrv_dup_device XX Duplicate definition for logical device XX.
msg_def_table_not_found - XX The specified entry in the Message Definition Control table was
not found in the Message Definition Information table.
Invalid_Parse_String See Technical Notes for Parse string formats.
sdrv_start_invalid error code - 17 Previous sdrshmid file exists (delete and restart).
sdrv_configure GWAS directory has to be included in the path.

Run-Time Messages

Message Cause
stream_function_not_found - XX S:F:M A message was triggered that is not defined in the Message
Definition Information table.
XX - device ID, S - stream, F - function, M - message ID.
no_resp_defined - XX S:F:M A received message had a conditional that was not met.
XX - device ID, S - stream, F - function, M - message ID.
stream_function_not_found - response A message was received that required a response but the response
- S:F:M message is not defined in the Information table.
S - stream, F - function, M - message ID
fname_not_valid Message tag contained a zero length string or the file open failed.

FactoryLink Device Interfaces - OPC and Other Guide / 379


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Error Messages



Message Cause
error_fl_write XX, TT:NN Error XX reading a FactoryLink tag type TT, number NN.
mesgbuf_no_memory Insufficient memory to allocate a buffer large enough receive a
message on a READ.
item_count_gt_255 The item count in Number was too large on a WRITE.
error_fl_read XX Error XX reading a FactoryLink tag.
filebuf_no_memory Insufficient memory to allocate a buffer large enough to read the
file for a WRITE.
fname_not_msg_tag The tag on the FNAME or FN_XX line is not a message tag.
msg_def_table_not_found - XX The table XX for a grant response message cannot be found.
stream_function_not_found - grant - An inquire message does not have a grant response message
XX S:F:M defined in any Message Definition Information table.
XX - device ID, S - stream, F - function, M - message ID.

Status Return Codes


The following table lists the Status Return Codes. Some Status Codes do not have associated
error messages returned from the SDRV Driver.

Status SDRV Error String Description


Code
7 Inquire message rejected Inquire/Grant failure. A conversation started has
sent the Inquire, and received a refusal Grant.
Possible failures are:
1. Grant message contained non-zero Data Item
value
2. Grant message had incorrect format.
6 Timer expired SdrTimerSet() Timer Expired. Time-out occurred.
5 Message Delivery OK Good Delivery Notification. The event is the
successful delivery of a transaction message to
the other end of the link.
4 Retry Count Exceeded Delivery Failure. Event failed to deliver a
transaction message successfully to the other end
of the link due to a RTY Retry Limit condition.

380 / FactoryLink Device Interfaces - OPC and Other Guide


SECS/HSMS (SDRV) COMMUNICATIONS | 8
Error Messages

Status SDRV Error String Description


Code
3 T3 or T4 Timeout Transaction Timeout. Event transaction timeout
(T3 or T4) occurred before the Reply message
was received. If the application is configured as
EQUIPMENT, an S9F9 message will have
automatically been sent to the Host.
2 Transaction Aborted (SxF0 or Abort Reply. The event is the receipt of either an
S9Fx) F0 Reply (same Stream, Function 0), or a Stream
9 System Error message aborting the transaction.
1 Activity detected on port Message Received. The event is the receipt of a
message, either an incoming Primary or an
expected Reply. An odd Function indicates an
incoming Primary, and an even Function
indicates an expected Reply.
0 Status OK or no activity on port Status Good. The function was successful.
-1 Device ID error ID error. The connection ID was not configured.
-2 ID state error ID State error. The connection ID was not
enabled.
-3 Port error Port error. The port was not configured.
-4 Port state error Port State error. The port was not enabled.
-5 Message header error The SDRMSG structure contains an invalid
parameter. For example, SdrRequest would
return this code if the Function field of the
message structure is even, since the message
would not then be a Primary
-6 SDR memory depleted Buffer Allocation error. The memory resources
of SDR are depleted to the extent that the current
operation cannot be started. Typical causes are:
1. Insufficient allocation of buffers when SDR
was initiated. Perhaps the message sent is
larger than the buffer pool, or perhaps SECS
message traffic was too heavy for the
allocation specified.
2. Application is failing to process the received
incoming messages, and all SDR buffers are
full.
-7 Ticket error Ticket error. The state of the thicket is incorrect
for the current operation. There is probably an
incorrect sequence of commands.
-8 Ticket originated locally Ticket Originated Locally

FactoryLink Device Interfaces - OPC and Other Guide / 381


• 8 | SECS/HSMS (SDRV) COMMUNICATIONS
Error Messages



Status SDRV Error String Description
Code
-9 Ticket busy Ticket Busy.
-10 Port not activated The Port cannot be enabled. This status can occur
only with a SIB, and probably indicates that the
shared SIB memory has been over-written.
-11 GEM port is connect interlocked The communication port is temporarily
interlocked in order to create a noticeable failure
at the Host. The link will then be in a known
state, and the two systems can re-establish
communications according to the GEM standard
(E30). This will occur with the Protocol option in
the SDR configuration set to GEM.
-12 Operation system rule violation Operating System Rule Violation. An incorrect
startup sequence or parameter caused the
operating system to generate an error while
starting processes or accessing system resources.
-13 Forced T_TOED (GEM Connection Failure).
-14 The SdrStart failed because the SDR Daemon is
already running.
-15 The SdrStart calls failed to initialize the
executable program and has timed out.
-16 The SDR Daemon process has terminated
abnormally.
-17 The SDR Daemon did not initialize correctly.
-18 The configuration program failed.
-19 Error on config file open.
-20 Memory allocation failure.
-21 TCP/IP kernel not found.

382 / FactoryLink Device Interfaces - OPC and Other Guide


Chapter 9





Unity Pro Browser

The Unity Pro Browser is a configuration tool that gives the user an easy way of configuring
FactoryLink tags based on the Schneider Electric Unity Pro variables. This is done by directly
connecting to a Unity Pro project or by importing a Data Exchange export file.

The Unity Pro Browser has filters to help you manage the variables. You can view any of the
following filters or a combination of them:
• Variables added since the last synchronization with Unity Pro
• Variables with definitions in FactoryLink that were modified in Unity Pro since the last
synchronization
• Variables deleted since the last synchronization
• All variables configured in FactoryLink
• Variables previously marked as not needed by FactoryLink

O PERATING P RINCIPLES
A developer uses Unity Pro to develop the PLC application and uses the Unity Pro Browser to
configure the SCADA-related operations. The following illustration shows the two methods
you can use to create FactoryLink tags from Unity Pro. In one method, you can connect to a
Unity Pro project (.STU file) to add variables and to create FactoryLink tags. In another
method, you can import the variables from a data exchange file (.XSY file). In this case, you
cannot add new variables or modify the Unity Pro project.

FactoryLink Device Interfaces - OPC and Other Guide / 383


• 9 | UNITY PRO BROWSER
Linking to Unity Pro


(static)
Importing
Variables
.XSY
.XSY

Unity Pro XL Unity Pro


Connecting Browser
Program
to Project .STU
.STU
Server (dynamic) ODX/ECI FactoryLink
Configuration Server
.XVM

ODX Client
OFS
Configuration
Tool

OFS Server

L INKING TO U NITY P RO
There are two ways to configure FactoryLink tags based on the Unity Pro variables. You can
either add Unity Pro variables into a FactoryLink application from an STU project or import
them from an XSY file.

1 In your server application in Configuration Explorer, open Device Interfaces > Unity Pro
Browser.

2 Click the appropriate icon either to add a Unity Pro project from an STU file or to import a
project from an XSY file.

3 In the Project Properties dialog box, set the information used to connect to Unity Pro and load
the project.

384 / FactoryLink Device Interfaces - OPC and Other Guide


UNITY PRO BROWSER | 9
Linking to Unity Pro

Unique name to identify Path were STU or XSY


the Unity Pro project file resides

Alias name for the OPC server


name used for the OPC
connection to the OFS server

Computer name of the Unity Pro


server (This field is not available
if importing XSY file.)

Same name as the Unity Pro server


if using OPC to communicate to
OFS. Otherwise, leave blank.

Select this check box to add all tags


pre-configured into the project for a
selected group (configured in the
ODX/ECI configuration tables).
Abridged prefix to use in tag name Keyword to restrict items to
rather than default project name add to the project

When the project is loaded, the Unity Pro variables appear in the tree.
Filters FactoryLink tag configuration
Opens
STU file

Imports
XSY file

Unity Pro
project

Unity Pro
variables

FactoryLink Device Interfaces - OPC and Other Guide / 385


• 9 | UNITY PRO BROWSER
Creating Tags and Variables



C REATING TAGS AND VARIABLES
The tree in the left pane displays the Unity Pro variables in the project. When you select a
variable, the associated FactoryLink tag information displays in the right pane “the
workspace.” The tabs in the workspace contain the properties you can configure and modify.

For detailed information about configuring tags, adding variables, and understanding the user
interface, see the Help in the Unity Pro Browser.

P ROGRAM A RGUMENTS
The Unity Pro Browser can run from a command line. The FLINK and FLAPP environment
variables must be set or the values must be specified in the command.

upbrowser [args]

Argument Description
/A{FLAPP} Identifies the drive and directory for the application
/P{FLINK} Identifies the FactoryLink software directory

386 / FactoryLink Device Interfaces - OPC and Other Guide

You might also like