device interfaces using op can dot her technologies

470
FactoryLink Version 7.5 Device Interfaces Using OPC and Other Technology

Upload: sch-atten

Post on 13-Mar-2015

696 views

Category:

Documents


20 download

TRANSCRIPT

Page 1: Device Interfaces Using Op Can Dot Her Technologies

FactoryLinkVersion 7.5

• • • • • • • • • • • • • • • • • • • • • • • • • • • •

Device Interfaces Using OPC and Other Technology

Page 2: Device Interfaces Using Op Can Dot Her Technologies

Document Version: 2005-0323

© Copyright 2005 Tecnomatix group of companies. All rights reserved.

NOTICE:

The information contained in this document (and other media provided herewith) constitutes confidential information of Tecnomatix group of companies (“Tecnomatix”) 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 Tecnomatix.

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 Tecnomatix. Except for warranties, if any, set forth in the separate license or other agreement relating to the applicable software product, Tecnomatix makes no warranty, express or implied, with respect to such information or such software product.

Tecnomatix, Tecnomatix Logo, FactoryLink, Knowledge Puts You In Control, Open Software Bus, and Xfactory are trademarks or registered trademarks of Tecnomatix in the United States and/or other countries. All other brand or product names are trademarks or registered trademarks of their respective holders.

Page 3: Device Interfaces Using Op Can Dot Her Technologies

Contents

Chapter 1 Device Interface Overview ........................................................................... 1Supported Drivers ................................................................................................................. 1Guidelines for Driver Technology Selection ........................................................................ 5

Chapter 2 KTDTL and NetDTL .................................................................................... 7Overview .............................................................................................................................. 7Offlink Addressing ............................................................................................................... 9KTDTL Topology ............................................................................................................... 12NetDTL Topology .............................................................................................................. 15Setting Up FactoryLink ...................................................................................................... 18Configuring the System Configuration Table ..................................................................... 18Optimizing Task Performance ............................................................................................ 22Configuring Communication Paths .................................................................................... 22

Logical Station Concepts ........................................................................................... 22Field Configuration ............................................................................................................ 25

Allen-Bradley NetDTL Driver .................................................................................... 25KTDTL Driver ............................................................................................................ 32Sample Logical Station Table Entries ........................................................................ 37Logical Station Entries ............................................................................................... 47Reading and Writing Data ......................................................................................... 51Reading Data from a Device ...................................................................................... 52Writing Data to a Device ........................................................................................... 54Configuration Tips and Techniques ........................................................................... 58Configuring Triggered Read, Block Write, or Exception Write ................................. 64Configuring an Unsolicited Read .............................................................................. 73Sample Read and Write Table Entries ........................................................................ 82Techniques for Improving Communication Performance .......................................... 91

Allen-Bradley Data Types and Addresses .......................................................................... 97Supported Data Types ......................................................................................................... 98

Address Specification Formats ................................................................................ 100PLC-3 File Type Reference ...................................................................................... 102PLC-5 File Type Reference ...................................................................................... 104PLC-5/250 File Type Reference ............................................................................... 111

FactoryLink Device Interfaces Using OPC and Other Technology / iii

Page 4: Device Interfaces Using Op Can Dot Her Technologies

SLC 500 File Type Reference ................................................................................... 116Program Arguments .......................................................................................................... 119Messages and Codes ......................................................................................................... 120

Status Messages ....................................................................................................... 120Error Messages ........................................................................................................ 121Allen-Bradley Return Codes .................................................................................... 124

Chapter 3 Enhanced Communication Interface (ECI/OPC).................................. 125Overview .......................................................................................................................... 125Basic Concepts ................................................................................................................. 127

Read and Write Procedures ..................................................................................... 129Action=Reaction ...................................................................................................... 132EDI Drivers, RAPD, and OPC Data eXchange ...................................................... 133TagArray Concept .................................................................................................... 139Exception <=> Encoded Write ................................................................................ 141Indirect Addressing with Unsolicited Read ............................................................. 143General Rules .......................................................................................................... 145

Configuration Tables ........................................................................................................ 147ECI/OPC Object Control ......................................................................................... 147ECI/OPC Object Information .................................................................................. 155

Tag/Item Addressing and Conversion Code ..................................................................... 170Hexadecimal and Octal Tag Addressing .................................................................. 170

Intel <=> Motorola Format and Composite Object .......................................................... 174Dataset Layout for Timestamps ........................................................................................ 176Dataset or OPC Group Write Procedures ......................................................................... 178Dataflow PLC <=> RAPD/OPC <=> ECI <=> Database ................................................ 179Sample Tables for Standard Drivers ................................................................................. 180

Allen-Bradley RSLinx Driver ................................................................................... 181Modbus Ethernet Driver .......................................................................................... 182Saia S-BUS Driver ................................................................................................... 184Siemens Sinec-H1 Driver ......................................................................................... 185Siemens SIMATIC S7-Protocol Driver .................................................................... 187

Sample Tables for OPC Data eXchange with ODX ......................................................... 189Emulation of RAPD and EDI Drivers ..................................................................... 189OPC-Specific Configuration Tables ........................................................................ 191

Sample Application Translation IOX –>ECI ................................................................... 193IOX Conversion Code -> ECI Rd/Wr Code ............................................................. 195

iv / FactoryLink Device Interfaces Using OPC and Other Technology

Page 5: Device Interfaces Using Op Can Dot Her Technologies

Dataset Exchange in Redundant System with VRN ........................................................ 197Data Embedding and Function Merge .............................................................................. 199Write/Output Triggering by Function TRxxx=vvv .......................................................... 201Array Handling by Function ARYnnn:x:y:z .................................................................... 203Statistical Functions XR, XP, XF, XT, XA, XS ................................................................ 205Summary .......................................................................................................................... 207

OPC Data Translation => Method: RAPD/EDI and OPC Specific ....................... 207OPC-Specific Table Overview ................................................................................. 207Control Table Summary ........................................................................................... 208Information Table Summary .................................................................................... 210

Terms ................................................................................................................................ 214Program Arguments .......................................................................................................... 216Information and Error Messages ...................................................................................... 219

Chapter 4 FLGEM .................................................................................................... 225Overview .......................................................................................................................... 225FLGEM Port Definition Table .......................................................................................... 225

Accessing ................................................................................................................. 225Field Descriptions ................................................................................................... 225

FLGEM Device Definition Table ..................................................................................... 230Accessing ................................................................................................................. 230Field Descriptions ................................................................................................... 230

FLGEM Variable Definitions Table ................................................................................. 231Accessing ................................................................................................................. 231Field Descriptions ................................................................................................... 231

FLGEM Limits Monitoring Table .................................................................................... 235Accessing ................................................................................................................. 235Field Descriptions ................................................................................................... 235

FLGEM Equipment Control/Status Table ........................................................................ 236Accessing ................................................................................................................. 236Field Descriptions ................................................................................................... 236

FLGEM Collection Events Table ..................................................................................... 240Accessing ................................................................................................................. 240Field Descriptions ................................................................................................... 240

FLGEM Collection Event Reports Table ......................................................................... 242Accessing ................................................................................................................. 242Field Descriptions ................................................................................................... 242

FLGEM Alarms Table ...................................................................................................... 243

FactoryLink Device Interfaces Using OPC and Other Technology / v

Page 6: Device Interfaces Using Op Can Dot Her Technologies

Accessing ................................................................................................................. 243Field Descriptions ................................................................................................... 243

FLGEM Event Reports Table ........................................................................................... 245Accessing ................................................................................................................. 245Field Descriptions ................................................................................................... 245

FLGEM Report Detail Table ............................................................................................ 246Accessing ................................................................................................................. 246Field Descriptions ................................................................................................... 246

FLGEM Trace Reports Table ........................................................................................... 247Accessing ................................................................................................................. 247Field Descriptions ................................................................................................... 247

FLGEM Trace Detail Table .............................................................................................. 248Accessing ................................................................................................................. 248Field Descriptions ................................................................................................... 248

FLGEM Remote Commands Table .................................................................................. 249Accessing ................................................................................................................. 249Field Descriptions ................................................................................................... 249

FLGEM Remote Commands Detail Table ....................................................................... 250Accessing ................................................................................................................. 250Field Descriptions ................................................................................................... 250

FLGEM Terminal Messages Table ................................................................................... 251Accessing ................................................................................................................. 251Field Descriptions ................................................................................................... 251

FLGEM Message Detail Table ......................................................................................... 252Accessing ................................................................................................................. 252Field Descriptions ................................................................................................... 252

FLGEM SECS-II Message Definition Control Table ...................................................... 253Accessing ................................................................................................................. 253Field Descriptions ................................................................................................... 253

FLGEM SECS-II Message Definition Information Table ................................................ 254Accessing ................................................................................................................. 254Field Descriptions ................................................................................................... 254

FLGEM SECS Read/Write Control Table ........................................................................ 258Accessing ................................................................................................................. 258Field Descriptions ................................................................................................... 258

FLGEM Process Programs Table ..................................................................................... 261Accessing ................................................................................................................. 261Field Descriptions ................................................................................................... 261

vi / FactoryLink Device Interfaces Using OPC and Other Technology

Page 7: Device Interfaces Using Op Can Dot Her Technologies

FLGEM Data Sets Table .................................................................................................. 267Accessing ................................................................................................................. 267Field Descriptions ................................................................................................... 267

Technical Notes ................................................................................................................ 270Custom Message Specific ........................................................................................ 270System Specific ......................................................................................................... 274GWGEM Required Equipment Constants and Status Variables .............................. 274

Program Arguments .......................................................................................................... 286Run-Time Application Messages ..................................................................................... 287

Start-Up Errors ........................................................................................................ 287Run-Time Messages ................................................................................................. 290

Chapter 5 MECOM................................................................................................... 291Overview .......................................................................................................................... 291

A-Series .................................................................................................................... 291QnA-Series ............................................................................................................... 291FX-Series ................................................................................................................. 291

Required Hardware and Software .................................................................................... 293Hardware ................................................................................................................. 293Software ................................................................................................................... 293

Installing The Mitsubishi Plc-driver ................................................................................. 294Enabling Ethernet Communication ......................................................................... 294Installation ............................................................................................................... 294Add Data in System Configuration .......................................................................... 294Upgrading ................................................................................................................ 295

PLC configuration Tables ................................................................................................. 296Overview .................................................................................................................. 296Mitsubishi Definitions .............................................................................................. 298Mitsubishi Read ....................................................................................................... 304Mitsubishi Write ....................................................................................................... 309Minimum Configuration Example ........................................................................... 314

Function Description ........................................................................................................ 316Startup ...................................................................................................................... 316Stand-alone Validation ............................................................................................. 316Transfer of Data ....................................................................................................... 317Modem Usage .......................................................................................................... 324Sharing the Communication .................................................................................... 326

FactoryLink Device Interfaces Using OPC and Other Technology / vii

Page 8: Device Interfaces Using Op Can Dot Her Technologies

Optimization Methods .............................................................................................. 327Trace ........................................................................................................................ 328Messages .................................................................................................................. 329Program Arguments ................................................................................................. 329

Communication guide ...................................................................................................... 331Serial Communication without Modem ................................................................... 331Serial Communication with Modem ........................................................................ 334Ethernet Communication ......................................................................................... 336

Troubleshooting ................................................................................................................ 338PLC Errors .............................................................................................................. 338Error Messages from MECOM ................................................................................ 338Error Messages from MELCOM32.DLL ................................................................. 339Modem Error Guide ................................................................................................. 339Ethernet Guide ......................................................................................................... 341

Uninstallation ................................................................................................................... 344Files ......................................................................................................................... 344Contents of Some Special Files ................................................................................ 346Registry Modifications ............................................................................................. 346

Chapter 6 OLE for Process Control (OPC) ............................................................. 347Overview .......................................................................................................................... 347OPC Server Task .............................................................................................................. 347OPC Client Task ............................................................................................................... 348OPC Explorer ................................................................................................................... 348OPC Client/Server Operation ........................................................................................... 348

FactoryLink as an OPC Server ................................................................................ 348FactoryLink as an OPC Client ................................................................................ 349FactoryLink as Both Client and Server ................................................................... 351

OPC Explorer ................................................................................................................... 352Starting OPC Explorer ............................................................................................. 352OPC Explorer Interface ........................................................................................... 353Using OPC Explorer ................................................................................................ 356

Configuring the OPC Client ............................................................................................. 362OPC Server Definition Table ................................................................................... 362Tag Definition Table ................................................................................................. 365

Using VT_ARRAY Data with OPC Client ...................................................................... 366Differences in OPC VT_Arrays and FactoryLink Tag Arrays ................................. 366

viii / FactoryLink Device Interfaces Using OPC and Other Technology

Page 9: Device Interfaces Using Op Can Dot Her Technologies

Transferring Values Between Arrays ....................................................................... 367Differences in Access Atomicity ............................................................................... 368Configuration of Tag-to-Item Array Mappings ........................................................ 369

OPC and FactoryLink Applications ................................................................................. 371Tag Groups ............................................................................................................... 371Performance ............................................................................................................ 371

Program Arguments .......................................................................................................... 372Troubleshooting ................................................................................................................ 373

Configuration Troubleshooting ................................................................................ 373Run-Time Troubleshooting ....................................................................................... 375Error Logging .......................................................................................................... 376Error Messages ........................................................................................................ 377

Chapter 7 OPC Data eXchange (ODX).................................................................... 383Overview .......................................................................................................................... 383Configuration .................................................................................................................... 385

OPC Server Connection .......................................................................................... 385ECI Object Reference ....................................................................................................... 387

Emulation of RAPD and EDI Drivers ..................................................................... 388OPC Specific Configuration .................................................................................... 388

Sample Configuration of Communication Objects .......................................................... 394Emulation of RAPD and EDI Drivers ..................................................................... 394OPC-Specific Configuration Tables ........................................................................ 396ECI Object for ODX Statistics Read ........................................................................ 397Dataset Exchange in a Redundant System Using VRN ........................................... 399

OPC Server, DCOM and Windows Setup ........................................................................ 401Performance Considerations ................................................................................... 401Troubleshooting ....................................................................................................... 402

Program Arguments .......................................................................................................... 405Information and Error Messages ...................................................................................... 409

Chapter 8 SECS/HSMS (SDRV) Communications ................................................. 415Overview .......................................................................................................................... 415

Installation ............................................................................................................... 415Add Driver to System Configuration ....................................................................... 415

Editing the SECS Communications Configuration Tables ............................................... 416

FactoryLink Device Interfaces Using OPC and Other Technology / ix

Page 10: Device Interfaces Using Op Can Dot Her Technologies

Configuring the SECS Logical Device Control Table ............................................. 416Configuring the SECS Logical Device Information Table ....................................... 419Configuring the SECS Read/Write Control Table .................................................... 420Configuring the SECS-II Message Definition Control Table ................................... 423Configuring the SECS-II Message Definition Information Table ............................ 424

Examples .......................................................................................................................... 435Program Arguments .......................................................................................................... 452Technical Notes ................................................................................................................ 452

Application Specific ................................................................................................. 452Startup Messages ..................................................................................................... 453Run-Time Messages ................................................................................................. 455Status Return Codes ................................................................................................. 456

x / FactoryLink Device Interfaces Using OPC and Other Technology

Page 11: Device Interfaces Using Op Can Dot Her Technologies

• • • •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.

SUPPORTED DRIVERS

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.

The following table lists the drivers that are available in FactoryLink.

FactoryLink Device Interfaces Using OPC and Other Technology / 1

Page 12: Device Interfaces Using Op Can Dot Her Technologies

1 | DEVICE INTERFACE OVERVIEWSupported Drivers

2

Driver PLC Protocol Technology Windows OS Requires

Allen-Bradley Async PLC-2, PLC-3, PLC-4, PLC-5, PLC-250, PLC-1774

RS232 EDI 2000, XP, 2003

Allen-Bradley Device Interface

PLC-2, PLC-3, PLC-5, PLC-5/250, PLC-5/xxE, PLC-5/xx ControlNet, SLC-500 (series 03, 04, 05), Soft 5 or 500 PLC, PLC 5 or 500 Emulation, and ControlLogix

Ethernet, Data Highway Plus, RS232

RAPD 2000, XP, 2003 RSLinx v2.42: optional Allen-Bradley PKTX card, optional Allen Bradley PKTC card, optional Allen Bradley Soft PLC, optional Allen Bradley PLC Emulation Software

Allen-Bradley KTDTL

PLC-2, PLC-3, PLC-5, PLC-5/250, PLC-5/xxE, PLC-5/xx ControlNet, SLC-500 (series 03, 04)

Data Highway Plus, Data Highway-485

KTDTL 2000, XP, 2003 RSLinx v2.42: Allen-Bradley PKTX card or PKTC ControlNet card

Allen-Bradley NetDTL

PLC-2, PLC-3, PLC-5, PLC-5/250, PLC-5/xxE, SLC-500 (series 05 ethernet) and (series 03, 04, and 05 by remote bridging)

Ethernet, Data Highway Plus

NetDTL 2000, XP, 2003 RSLinx v2.42

FLGEM Semiconductor Interface

SEMI Host Communication Standard (SECS) devices

RS232, Ethernet GW 2000, XP, 2003

General Electric Fanuc

GE Devices RS232 EDI 2000, XP, 2003

General Purpose Interface

Non-specific RS232 EDI 2000, XP, 2003

Mitsubishi MECOM Serial

Mitsubishi A-series, QnA-series, FX-series

RS232 Beijer 2000 AJ71C24 Computer Link Module (optional)

Mitsubishi MECOM Serial and Ethernet

Mitsubishi A-series, QnA-series, FX-series

RS232, Ethernet Beijer 2000, XP AJ71C24 Computer Link Module or AJ71E71 Ethernet Interface Module (optional)

Modbus Plus Modicon 984, Quantum, and Momentum

ModBus Plus EDI 2000, XP SA85 or PC85 card with low-level protocol specific driver

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 13: Device Interfaces Using Op Can Dot Her Technologies

DEVICE INTERFACE OVERVIEW | 1Supported Drivers

Modbus Plus RAPD Modicon 984, Quantum, and Momentum

ModBus Plus RAPD 2000, XP SA85 or PC85 card with low-level protocol specific driver

Modbus Serial Modicon 184, 384, 484, 584, 884, 984, M84, Quantum, and Momentum

RS232 EDI 2000, XP, 2003

Modbus TCP/IP Ethernet

Modicon 984 (using Modicon TCP/IP - MBP+ Bridge), Quantum, and Momentum

Ethernet RAPD 2000, XP, 2003

Omron Host Link C120, C200H, C500, C1000, C2000

RS232 EDI 2000, XP, 2003

Opto 22 Optomux Opto 22 Optomux devices

RS232 EDI 2000, XP, 2003

Schneider ETHWAY April Line Ethernet EDI/Custom

2000 Telemecanique Low-level drivers with special Ethway card

Schneider KS Function

A120/A250 RS232 EDI/Custom

2000, XP

Schneider Modnet 1 SFB

A120/A250, A350/A500

Ethernet EDI/Custom

2000, XP Bit Bus card Wnt-bik003-Treiber with v.12 Low-level driver

Schneider TE COM TSX-37, TSX-57, PCX57

Telemecanique XWAY communication protocols(XIPWAY, ISAWAY FIPWAY, UNI-TELWAY)

EDI/Custom

2000, XP Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57

Schneider TE DRQ TSX-37, TSX-57, PCX57

Telemecanique Direct Requests

Custom 2000, XP Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57

Schneider TE Load TSX-37, TSX-57, PCX57

Telemecanique File Transfer

Custom 2000, XP Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57

Driver PLC Protocol Technology Windows OS Requires

FactoryLink Device Interfaces Using OPC and Other Technology / 3

Page 14: Device Interfaces Using Op Can Dot Her Technologies

1 | DEVICE INTERFACE OVERVIEWSupported Drivers

4

SECS with GW Libraries HSMS/Ethernet

SEMI Host Communication Standard (SECS) devices

Ethernet GW 2000, XP, 2003

SECS with GW Libraries RS 232/Serial

SEMI Host Communication Standard (SECS) devices

RS232 GW 2000, XP, 2003

Siemens CP525 S5, S7 RS232 EDI 2000, XP, 2003

Siemens H1 S5 Ethernet EDI 2000 DLC Protocol only

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

Siemens S7 Driver S7 Ethernet ECI 2000, XP Siemens Softnet; not supported on 2003 yet

Siemens 3964R S5, S7 RS232 RAPD 2000, XP, 2003

Square D Serial/Ethernet Symax

Square D SY/MAX Ethernet, RS232 EDI 2000, XP, 2003 SQRD RS232

2000 SQRD Ethernet REQ DLC Protocol Stack

Driver PLC Protocol Technology Windows OS Requires

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 15: Device Interfaces Using Op Can Dot Her Technologies

DEVICE INTERFACE OVERVIEW | 1Guidelines for Driver Technology Selection

GUIDELINES FOR DRIVER TECHNOLOGY SELECTION

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 over triggering 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 5

Page 16: Device Interfaces Using Op Can Dot Her Technologies

1 | DEVICE INTERFACE OVERVIEWGuidelines for Driver Technology Selection

6

• 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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 17: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 2

KTDTL and NetDTL

OVERVIEW

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

FactoryLink Device Interfaces Using OPC and Other Technology / 7

Page 18: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLOverview

8

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.

Server with Multiple Clients

Client with Multiple Servers

Allen-Bradley RSLinx or INTERCHANGE FactoryLink

Real-Time Database

NetDTL Task

PLC 5/250 with Ethernet InterfaceAllen-Bradley

RSLinx or INTERCHANGE FactoryLink

Real-Time Database

NetDTL Task

Allen-Bradley RSLinx or INTERCHANGE FactoryLink

Real-Time Database

NetDTL Task

PLC 5/250 with Ethernet Interface

PLC 5/250 with Ethernet Interface

PLC 5/250 with Ethernet Interface

Allen-Bradley RSLinx or INTERCHANGE FactoryLink

Real-Time Database

NetDTL Task

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 19: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Offlink Addressing

OFFLINK ADDRESSING

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 Using OPC and Other Technology / 9

Page 20: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLOfflink Addressing

10

KTDTL Offlink Addressing Example

1785-KA

5

SLC 5/02

1785-KA

Data Highway

Data Highway 485

Data Highway Plus

SLC 5/03

PLC-2 1785-KA3

1775-KAPLC-3

1771-KA2PLC-2

1785-KA

5

Data Highway Plus

PLC 5/40

1785-KA

3

PLC-2

26

22

46

42

48

11

13

57

Devices on each network are indicated by “road signs” that display the device node addresses.

To the right of the main Data Highway Plus, a 1785-KA5 interface module connects to a DH-485, which connects to another 1785-KA5 interface module and a Data Highway Plus.

To the left of the main Data Highway Plus, a 1785-KA interface module connects to a Data Highway.

FactoryLink Station

Main Data Highway Plus to FactoryLink PC

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 21: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Offlink Addressing

NetDTL Offlink Addressing Example

1785-KA

5

SLC 5/02

1785-KA

Data Highway

Data Highway 485

Data Highway Plus

SLC 5/03

PLC-2 1785-KA3

Data Highway Plus

1775-KAPLC-3

1771-KA2PLC-2

1785-KA

5

Data Highway Plus

PLC 5/40

1785-KA

3

PLC-2

Ethernet TCP/IP

48

26

22

57

46

13

11

To the right of the main Data Highway Plus, a 1785-KA5 interface module connects to a DH-485, which connects to another 1785-KA5 interface module and a Data Highway Plus.

Devices on each network are indicated by “road signs” that display the device node addresses.

To the left of the main Data Highway Plus, a 1785-KA interface module connects to a Data Highway.

A Pyramid Integrator with an Ethernet interface connects the FactoryLink station to a Data Highway Plus network.

PLC 5/250

FactoryLink Station

FactoryLink Device Interfaces Using OPC and Other Technology / 11

Page 22: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLKTDTL Topology

12

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

PLC-2

SLC 5/04

DH+

Data

Hig

hway

Plu

s

PLC-5

PLC-5/250

SLC-5/03

SLC-5/02

SLC-5/01 Data

Highw

ay 4

85

Communications through two KT cards directly connected to DH+ networks.

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

Allen-Bradley RSLinx FactoryLink

Real-Time Database

KTDTL Task

PLC-5 with 1785-KA5

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 23: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2KTDTL 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

PLC 5

1785-KA5DH-485

SLC 5/03

DH+

SLC 5/04

1747-AIC

1747-C11

1747-AIC

SLC 5/02

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.

1784-KTX Card

1784-KT Card

FactoryLink Station

FactoryLink Device Interfaces Using OPC and Other Technology / 13

Page 24: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLKTDTL Topology

14

Typical Link Between the FactoryLink Station and Various Devices

PLC-2 PLC-5/250KT Card

1785-KA5

SLC 5/02

SLC 5/03

1785-KA

1771-KA2

Data Highway

PLC-2

1775-KA

PLC-3

Data Highway 485

Data Highway Plus

SLC 5/04

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, and PLC-5 families residing at offlink addresses can communicate with the computer running the device interface software using appropriate interface modules (1771-KA2 and 1775-KA, for example).

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

The Data Highway Plus links the PLCs to the computer running the device interface software through a KT card.

Data Highway Offlink

Data Highway 485 Offlink

Data Highway Plus Local Link

1785-KA3

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 25: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2NetDTL Topology

NETDTL 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

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

Ethernet Card

DH+ Link Ethernet Link

PLC-5

PLC-3

PLC-5/xxE

PLC-5/xxE

PLC 5/250 with Ethernet Interface

FactoryLink Station

FactoryLink Device Interfaces Using OPC and Other Technology / 15

Page 26: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLNetDTL Topology

16

Typical Physical Link to Offlink Addresses

PLC-5/xxE

PI

1785-KA5

SLC 5/02

SLC 5/03

1785-KA

1771-KA2

Data Highway

PLC-2

1775-KA

PLC-3

Data Highway 485

Data Highway Plus

Ethernet

Data Highway Plus

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, and PLC-5 families residing at offlink addresses can communicate with the computer running the device interface software using appropriate interface modules (1771-KA2 and 1775-KA, for example).

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

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.

The NetDTL task can communicate directly to a device in the PLC-5/xxE family over TCP/IP.

Data Highway Offlink

Data Highway 485 Offlink

Ethernet Communications

Data Highway Plus Ethernet Link

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 27: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2NetDTL 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/xxE

PLC-5

PLC-5/250

SLC-5/03

SLC-5/02

SLC-5/01

Dat

a Hig

hway

485

Dat

a Hi

ghw

ay P

lus SLC-5/04

TCP/

IP

Point-to-point Ethernet communications with a PLC-5/xxE

PLC-5/250 with anEthernet interface

module provides the linkfrom Ethernet to DH+

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

Communications through an Ethernet card

Allen-Bradley RSLinx or INTERCHANGE FactoryLink

Real-Time Database

NetDTL Task

PLC-5 with 1785-KA5

PLC 5/250with Ethernet Interface

FactoryLink Device Interfaces Using OPC and Other Technology / 17

Page 28: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSetting Up FactoryLink

18

SETTING UP FACTORYLINK

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 FactoryLink System Configuration table.

CONFIGURING THE SYSTEM CONFIGURATION TABLE

To configure the System Configuration table, perform the following steps:

1 In the Configuration Explorer, ensure the current domain selected is Shared.

2 In your server application, open System > System Configuration > System Configuration Information in form view.

3 Create a new task using .

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 29: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Configuring the System Configuration Table

4 In the Task Name box, type KTDTL or NetDTL to identify the task to the system.

5 In the Description box, type Allen-Bradley KTDTL or Allen-Bradley NetDTL to describe the task.

6 Under Task Flags, select the Task Flags you want to use:

• 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.

7 In the Start Order box, enter 1 to ensure the task starts up appropriately at run time.

8 In the Executable File box, type bin/ktdtl or bin/netdtl to specify the location of the executable file.

9 In the Program Arguments box, enter the program parameter for the specific override, followed by the override value, using the list of IDs in Table 2-1.

Use the following format when entering a program parameter:

–argumentvalue

where

– is the required prefix for any program parameter.

argument is the parameter ID chosen from the table below.

value is the override value for the parameter.

Example: -F12 where F is the ID of the major program control loop, and 12 indicates the number of times the task passes through the loop before sleeping.

Note: Either enter all parameters in upper-case alphabetical characters or enter them all in lower case.

10 Click Apply and then Yes to insert the task.

FactoryLink Device Interfaces Using OPC and Other Technology / 19

Page 30: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLConfiguring the System Configuration Table

20

Table 2-1 Program Parameters and Override Values

ID Override Value Description

-A pathname To specify a new FactoryLink application directory to override the default 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 1 through 40(Default is 5)

To specify a value for the unsolicited message backlog queue in the Allen-Bradley interface, enter the ID followed by the appropriate value. For inputs less than 1, enter 1. For inputs greater than 40, enter 40.Example: -B1

-C 0 through 32767(Default is 30)

To specify 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.Example: -C30

-F 1 through 32767(Default is 10)

To specify the number of times the task is to pass through its major program 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. For more information, see “Optimizing Task Performance” on page 22.Example: -F12

-L pathname(Default is stdout)

To specify a directory and path for an error log file, enter the ID followed by the full path name that identifies the location of the file.Example:-LC:\FLECS\ERRLOG or -L/usr/users/errlog.txt

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 31: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Configuring the System Configuration Table

-N 1 through 39(Default is 39)

To specify 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.Example: -N4

-P pathname To specify a new FactoryLink program directory to override the default program directory, enter the ID followed by the full path name that identifies the location of the new directory.Example:-PC:\FLECS\FLINK or -P/usr/users/flink

-R 0 through 32767(Default is 10)

To specify 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.Example: -R300

-S 0 through 32767(Default is 10)

To specify 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.Example: -S1000

-U 1 through 32767(Default is 1)

To specify 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.Example: -U30

-Z Leave blank To clear the change status indicators in the FactoryLink tags written to the FactoryLink database for the KTDTL or NetDTL task, enter the ID only.Example: -Z

Table 2-1 Program Parameters and Override Values (continued)

ID Override Value Description

FactoryLink Device Interfaces Using OPC and Other Technology / 21

Page 32: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLOptimizing Task Performance

22

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.

or

• Increase the number of control loop passes and decrease the sleep period until task performance reaches an acceptable level.

CONFIGURING COMMUNICATION PATHS

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 33: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Configuring Communication Paths

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

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. See “Field Configuration” on page 25 for more information.

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.

Device connected to FactoryLink station through an Allen-Bradley card or an Ethernet card

FactoryLink Device Interfaces Using OPC and Other Technology / 23

Page 34: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLConfiguring Communication Paths

24

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

DH+

DH-485

Logical Station 2 consists of Logical Port 1and a PLC-5 at DH+ address #4.

Logical Station 3 consists of Logical Port 1and a SLC 5/03 at DH-485 address #10.

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

NetDTL—Ethernet interfacemodule in a PLC-5/250 I/Orack provides the DH+ link

Logical Port 1

1785-KA5 Module in a PLC-5I/O Rack atAddress #4

PLC-5/250 at Address #10

SLC 5/03 at Address #10

KT or Ethernet Card Port

FactoryLink Station

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 35: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

FIELD CONFIGURATION

Allen-Bradley NetDTL Driver

Station Control

1 In the Configuration Explorer, ensure the current domain selected is Shared.

2 In your server application, open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Logical Station Control.

3 Sample entries are provided in “Sample Logical Station Table Entries” on page 37.

Logical Port Enter a number to represent the communications path. Since the task uses only one logical port, define only one port in this table.

Valid Entry: numeric value from 0 - 999

ResponseTimeout0.1 Sec

Enter the length of time, in tenths of a second, the task will wait to receive a response to a read or write command before timing out. Be sure to enter a value greater than zero; otherwise, the task immediately times out without waiting for a response. The default is 55, or 5.5 seconds.

Valid Entry: numeric value from 0 - 99999

StatusMsg Tag

Optionally, enter a tag name for a message tag to which a text string will be written to indicate a communications error associated with this logical port.

Valid Entry: tag nameValid Data Type: message

4 Click the Save icon to validate the data when the Logical Station Control table is complete.

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears.

FactoryLink Device Interfaces Using OPC and Other Technology / 25

Page 36: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

26

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 37: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Ethernet Address Information

1 In your server application, open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Logical Station Control > “your port number” > Allen-Bradley NetDTL Ethernet Address Information.

2 Using the following field descriptions, 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).

TCP/IP AddressEthernet Interface

(ASCII)

Enter each Ethernet TCP/IP address of a Pyramid Integrator or PLC-5/xxE that will process read or write requests.

Valid Entry: numeric string of up to 21 numbers and decimal points in the format xxx.xxx.xxx.xxx

Note: To keep network traffic manageable, do not connect to more than eight Pyramid Integrators serving as routers.

Ethernet InterfaceNumber

Enter the station number to which the Pyramid Integrator or PLC-5/xxE is mapped in the RSLinx Ethernet-to-AB communications configuration. For example, if the IP address of a Pyramid Integrator has been mapped to station number 7, then the Ethernet interface number for that station will be 7.

Valid Entry: numeric value.

Comment (Optional) Enter reference information about this Ethernet device.

Valid Entry: alphanumeric string of up to 21 characters.

Note: 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 procedures:

Perform the following steps 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 27

Page 38: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

28

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.

Station Information

1 In your server application, open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Logical Station Control > “your port number” > Allen-Bradley NetDTL Ethernet Address Information > “your ip address” > Allen-Bradley NetDTL Logical Station Information.

2 Using the following field descriptions, complete a row in the table for each device that will communicate through this logical port. Sample entries are provided in “Sample Logical Station Table Entries” on page 37.

Err/Status TagName:

Optionally, enter a tag name for a long analog tag to receive communication error codes associated 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

Valid Entry: tag nameValid Data Type: longana

Logical Station(Decimal):

Enter a number to identify the logical station to which the information in this row pertains. A logical station represents the combination of a Logical Port, and TCP/IP Address with a physical

Tip

To display the codes stored in an Err/Status Tag Name tag for an operator running the application to view, use the Client Builder to animate an output-text object associated with the tag name and display this object on a graphic screen.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 39: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

station. Assign a unique number to each device communicating through this logical port. 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 will identify the device to or from which data is to be sent or received.

Valid Entry: unique numeric value from 0 - 999

PYRAMIDCHANNEL ID

(ASCII):

NetDTL – define the communications port in the Pyramid Integrator module providing the Ethernet link to 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.

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

FactoryLink Device Interfaces Using OPC and Other Technology / 29

Page 40: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

30

The following diagram illustrates some typical port entries:

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.

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

0RM:3

0RM:2

1KA:2

1KA:3 2KA:3

2KA:2

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 41: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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 37 for other examples of offlink address entries and diagrams of corresponding sample network configuration.

StationAddress

(Octal)

Enter the physical DH+, DH, or DH-485 network address of the Allen-Bradley device. For each device address you enter, 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 40 for examples of how this address corresponds to the path entry for this logical station when you are configuring an offlink address.

The following valid entries are octal values:

DH+: numeric value from 0 - 77

DH: numeric value from 0 - 377

DH-485: numeric value from 0 - 37

StationType

Enter the type of Allen-Bradley device from which data is to be read or to which data is to be written. Descriptions of the valid entries are:

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 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

FactoryLink Device Interfaces Using OPC and Other Technology / 31

Page 42: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

32

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

Valid Entry: To display valid entry, use the Ctrl+K keys.

Comment (Optional) Enter reference information about this logical station.

Valid Entry: alphanumeric string of up to 21 characters

3 Click the Save icon to validate the data.

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears.

4 Choose LONGANA for Type and accept the default of Shared for domain for each tag name.

See “Reading and Writing Data” on page 51 when you are ready to define the read and write operations expected to occur between this logical port and the devices configured as logical stations.

KTDTL Driver

Station Control

1 Ensure the current domain selected is Shared in the Configuration Explorer.

2 In your server application, open Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Logical Station Control.

3 Using the following field descriptions, complete a row in the table for each device to communicate through this logical port. Sample entries are provided in “Sample Logical Station Table Entries” on page 37.

Logical Port Enter a number to represent the communications path. Because the task uses only one logical port, define only one port in this table.

Valid Entry: numeric value from 0 - 999

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 43: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

ResponseTimeout

(0.1 Sec)

Enter the length of time, in tenths of a second, the task will wait to receive a response to a read or write command before timing out. Enter a value greater than zero; otherwise, the task immediately times out without waiting for a response. The default is 55, or 5.5 seconds.

Valid Entry: numeric value from 0 - 99999

StatusMsg Tag

Optionally, enter a tag name for a message tag to which a text string will be written to indicate a communications error associated with this logical port.

Valid Entry: tag nameValid Data Type: message

4 Click the Save icon to validate the data when the Logical Station Control table is complete.

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears.

Station Information

1 In your server application, open Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Logical Station Control > “your port number” > Allen-Bradley KTDTL Logical Station Information.

2 Using the following field descriptions, complete a row in the table for each device that will communicate through this logical port. Sample entries are provided in “Sample Logical Station Table Entries” on page 37.

Err/StatusTag Name

Optionally, enter a tag name for a long analog tag to receive communication error codes associated 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 KTDTL return code

1 Internal RSLinx code

2 Operating system error code

Valid Entry: tag name

FactoryLink Device Interfaces Using OPC and Other Technology / 33

Page 44: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

34

Valid Data Type: longana

LogicalStation

(Decimal)

Enter a number to identify the logical station to which the information in this row pertains. A logical station represents the combination of a logical port with a physical station. Assign a unique number to each device communicating through this logical port.

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 to be sent or received.

Valid Entry: unique numeric value from 0 - 999

A-B KTCard ID(ASCII)

Define the communications port in the Allen-Bradley card to which this logical station is connected, and for offlink addresses, define 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 from 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.

Tip

To display the codes stored in an Err/Status Tag Name tag for an operator running the application to view, use the Client Builder to animate an output-text object associated with the tag name and display this object on a graphics screen.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 45: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

The following diagram illustrates some typical port entries.

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 37 for other examples of offlink address entries and diagrams of corresponding sample network configurations.

KT

Card 1

KT

Card 4

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

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

FactoryLink Station

FactoryLink Device Interfaces Using OPC and Other Technology / 35

Page 46: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

36

StationAddress(Octal)

Enter the physical DH+, DH, or DH-485 network address of the Allen-Bradley device. For each device address you enter, make a corresponding entry identifying the path to the device; otherwise, the task ignores this address entry.

Note: This path is entered in the A-B KT Card ID (ASCII) field. See “Path and Address Entries” on page 40 for examples of how this address corresponds to the path entry for this logical station when you are configuring an offlink address.

The following valid entries are octal values:

DH+: numeric value from 0 - 77

DH: numeric value from 0 - 377

DH-485: numeric value from 0 - 37

StationType

Enter the type of Allen-Bradley device from which data is to be read or to which data is to be written. Descriptions of the valid entries are:

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 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

Valid Entry: Ctrl+K

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 47: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Comment (Optional) Enter reference information about this logical station.

Valid Entry: alphanumeric string of up to 21 characters

3 Click the Save icon to validate the data.

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears.

4 Choose LONGANA for Type and accept the default of Shared for domain for each tag name.

5 Return to the Logical Station Control table and configure another logical port.

See “Reading and Writing Data” on page 51 when you are ready to define the read and write operations expected to occur between this logical port and the devices configured as logical stations.

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 has been specified, the table resembles one of the sample tables shown in the following graphic.

FactoryLink Device Interfaces Using OPC and Other Technology / 37

Page 48: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

38

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 Using OPC and Other Technology

Page 49: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Logical Station Information Table

When all information on the Logical Station Information table has been specified, the table resembles the sample table shown in the following graphic.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 39

Page 50: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

40

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 following examples.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 51: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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 B, you would make the following field entries:A-B KT Card ID (ASCII)

Station Address (Octal)

To communicate with DeviceA, you would make thefollowing field entries:

A-B KT Card ID(ASCII)

StationAddress

(Octal)

To communicate with Device C,depending upon the type of

operation to be performed, youwould make the following field

entries:

A-B KT Card ID(ASCII)

StationAddress

(Octal)

To communicate with Device D, you would make the following field entries:

To communicate with Device F, you would make the following field entries:

A-B KT Card ID (ASCII)

Station Address (Octal)

To communicate with Device E,you would make the following

field entries:A-B KT Card ID

(ASCII)

StationAddress

(Octal)

A-B KT Card ID (ASCII)

Station Address (Octal)

FactoryLink Station

Device A Device B

Device C Device D

Device E Device F

Link 1

Link 2

Link 3

1KT:0

43

1KT:0

56

1KT:0/B:42/L:2(triggered or unsolicited)

1KT:0/G:42/L:1(triggered only)

18

1KT:0/G:42/L:1(triggered only)

14

1KT:0/B:42/L:31KT:0/B:42/L:3

4136

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

FactoryLink Device Interfaces Using OPC and Other Technology / 41

Page 52: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

42

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

Device A Device B

Device C Device D

Device E Device F

Link 1

Link 2

Link 3

To communicate with Device B, you would make the following field entries:A-B KT Card ID (ASCII)

Station Address (Octal)

To communicate with Device A,you would make the following

field entries:A-B KT Card ID

(ASCII)

StationAddress

(Octal)

1KT:0

43

1KT:0

56

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

Station Address (Octal)

To communicate with Device C,you would make the following

field entries:A-B KT Card ID

(ASCII)

StationAddress

(Octal)

1KT:0/B:42/L:2

34

1KT:0/B:42/L:2

26

To communicate with Device F, you would make the following field entries:A-B KT Card ID (ASCII)

Station Address (Octal)

To communicate with Device E,you would make the following

field entries:A-B KT Card ID

(ASCII)

StationAddress

(Octal)

1KT:0/B:42/L:3

36

1KT:0/B:42/L:3

41

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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 53: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

KTDTL Network Topology 3

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

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

Device A Device B

Device C Device D

Link 1

Link 2

To communicate with Device B, you would make the following field entries:A-B KT Card ID (ASCII)

Station Address (Octal)

To communicate with Device A,you would make the following

field entries:A-B KT Card ID

(ASCII)

StationAddress

(Octal)

1KT:0

43

1KT:0

56

To communicate with Device D, you would make the following field entries:

A-B KT Card ID (ASCII)

Station Address (Octal)

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

41

To communicate with Device C,you would make the following

field entries:

A-B KT Card ID(ASCII)

StationAddress

(Octal)

36

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

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

FactoryLink Device Interfaces Using OPC and Other Technology / 43

Page 54: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

44

NetDTL Network Topology 1

DH+

0RM:2

PLC PLC

DH-485

KA5

DH+

KA5

PLC PLC

13

43 56

42

29

18 14

22

25

36 41

SLC 5/01,5/02

SLC5/03

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.

FactoryLink Station

Device A Device B

Device C Device D

Device E Device F

Link 1

Link 2

Link 3

To communicate with Device B, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device A,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2

43

0RM:2

56

To communicate withDevice C, depending uponthe type of operation to be

performed, you would makethe following field entries:

PYRAMIDCHANNEL ID

StationAddress

(Octal)

0RM:2/B:42/L:2(triggered or unsolicited)

0RM:2/G:42/L:1(triggered only)

18

To communicate with Device D, you would make the following field entries:

PYRAMID CHANNEL ID

Station Address (Octal)

0RM:2/G:42/L:1(triggered only)

14

To communicate with Device F, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device E,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2/B:42/L:3

36

0RM:2/B:42/L:3

41

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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 55: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

NetDTL Network Topology 2

DH+

0RM:2

PLC PLC

DH+

PLC5/250

PLC

DH+

PLC5/250

PLC PLC

13

43 56

42

52

34 26

47

25

36 41

PLC

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

Device A Device B

Device C Device D

Device E Device F

Link 1

Link 2

Link 3

To communicate with Device B, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device A,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2

43

0RM:2

56

To communicate with Device D, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device C,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2/B:42/L:2

34

0RM:2/B:42/L:2

26

To communicate with Device F, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device E,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2/B:42/L:3

36

0RM:2/B:42/L:3

41

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

FactoryLink Device Interfaces Using OPC and Other Technology / 45

Page 56: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

46

NetDTL Network Topology 3

DH+

0RM:2

PLC PLC

KA

DHPLC PLC

13

43 56

42

36 41

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

Device A Device B

Device C Device D

Link 1

Link 2

To communicate with Device B, you would make the following field entries:PYRAMID CHANNEL ID

Station Address (Octal)

To communicate with Device A,you would make the following

field entries:PYRAMID

CHANNEL ID

StationAddress

(Octal)

0RM:2

43

0RM:2

56

To communicate with Device D, you would make the following field entries:

PYRAMID CHANNEL ID

Station Address (Octal)

0RM:2/B:42/KA(triggered only)

41

To communicate with Device C,you would make the following

field entries:

PYRAMIDCHANNEL ID

StationAddress

(Octal)

36

0RM:2/B:42/KA(triggered only)

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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 57: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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

FactoryLinkStation1KT:0DH+ 036

DH+ 010Log. Sta. 0PLC-5

DH+ 013Log. Sta. 1PLC-3

DH+ 023KA5DH-485 002

DH+ 035Log. Sta. 2PLC-5/250

DH+ 045Log. Sta. 3PLC-5

DH-485 003Log. Sta. 4SLC-5/03

DH-485 011Log. Sta. 5SLC-5/03

DH-485 012KA5DH+ 056

DH-485 022Log. Sta. 6SLC-5/02

DH-485 031Log. Sta. 7SLC-5/03

DH+ 011Log. Sta. 8

DH+ 034Log. Sta. 9

DH+ 046Log. Sta. 10

PLC-5

DH+ 057Log. Sta. 11PLC-5

Data Highway + Link 1

DH-485 Link 2

Data Highway + Link 3

FactoryLink Device Interfaces Using OPC and Other Technology / 47

Page 58: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

48

KTDTL Configuration 2

FactoryLinkStation1KT:0DH+ 036

DH+ 010Log. Sta. 0PLC-5

DH+ 013Log. Sta. 1PLC-3

DH+ 023KA

DH+ 035Log. Sta. 2PLC-5/250

DH+ 045Log. Sta. 3PLC-5

DH 011Log. Sta. 4

DH 013Log. Sta. 5PLC-3

Data Highway + Link 1

Data Highway

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 59: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

NetDTL Configuration 1

FactoryLinkStation

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

TCP/IP: abplc2PLC-5/40ELog. Sta. 1

DH+ 010Log. Sta. 2PLC-5

DH+ 013Log. Sta. 3PLC-3

DH+ 023KA5DH-485 002

DH+ 035Log. Sta. 4PLC-5/250

DH+ 045Log. Sta. 5PLC-5

DH-485 003Log. Sta. 6SLC-5/03

DH-485 011Log. Sta. 7SLC-5/03

DH-485 012KA5DH+ 056

DH-485 022Log. Sta. 8SLC-5/02

DH-485 031Log. Sta. 9SLC-5/03

DH+ 011Log. Sta. 10

DH+ 034Log. Sta. 11

DH+ 046Log. Sta. 12

DH+ 057Log. Sta. 13PLC-5

Data Highway + Link 1

DH-485 Link 2

Data Highway + Link 3

Ethernet TCP/IP

FactoryLink Device Interfaces Using OPC and Other Technology / 49

Page 60: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

50

NetDTL Configuration 2

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

DH+ 010Log. Sta. 1PLC-5

DH+ 013Log. Sta. 2PLC-3

DH+ 023KA

DH+ 035Log. Sta. 3PLC-5/250

DH+ 045Log. Sta. 4PLC-5

DH 011Log. Sta. 5PLC-3

DH 013Log. Sta. 6PLC-3

Data Highway + Link 1

Data Highway

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 61: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Reading and Writing Data

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.

Note: 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 Using OPC and Other Technology / 51

Page 62: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

52

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 as database tags.

Triggered Read Operation

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.

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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 63: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Unsolicited Read Operation

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.

Triggered Read Request – in a triggered read request table, a digital tag you configure in the Read/Write Control table as a trigger to initiate a block read operation 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, floating-point, or message).

How a Triggered Read Operation Works

The device sends data to FactoryLink.

FactoryLink stores the data in the real-time database.

FactoryLink ensures the incoming data matches configuration parameters.

FactoryLink Station

When the block read trigger is forced on,...

...FactoryLink reads each defined address...

...then stores the value read in the tag specified to receive the value.

FactoryLink Device Interfaces Using OPC and Other Technology / 53

Page 64: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

54

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 tag names for tags (digital, analog, long analog, floating-point, or message) in which the data will be stored when FactoryLink receives data that matches the specified criteria.

How an Unsolicited Read Operation Works

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

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.

When you configure an Unsolicited Read table, FactoryLink is prepared to recognize 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 reads database tags and sends their values to a device.

The device stores the values.

FactoryLink Station

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 65: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

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).

FactoryLink Device Interfaces Using OPC and Other Technology / 55

Page 66: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

56

How a Block Write Operation Works

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.

When the block writetrigger is forced on,...

...FactoryLink writes the value of eachtag defined for this table...

...into the specified address.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 67: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

How an Exception Write Operation Works

When the Exception Write field is YES,FactoryLink writes the values of thetags associated with this table only

when they change.

When the value of each defined tagchanges, FactoryLink writes it...

...to the specified device address.

A disable trigger allows you to disableand re-enable an exception write table.

Once a table is re-enabled, you can usea block write trigger to update any

values in the device that changed whilethe table was disabled. Neither trigger isrequired unless you plan to periodicallydisable the table, but both are required if

you do plan to disable the table.

FactoryLink Device Interfaces Using OPC and Other Technology / 57

Page 68: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

58

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 69: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

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.

When you force the read trigger 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.

...its value in the watch list changes from 0 to 1.

FactoryLink Device Interfaces Using OPC and Other Technology / 59

Page 70: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

60

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 71: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

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 60:

• 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 93.

FactoryLink Device Interfaces Using OPC and Other Technology / 61

Page 72: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

62

For detailed descriptions of specific techniques you can use to enhance the performance of your application, see “Techniques for Improving Communication Performance” on page 91.

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 73.

• 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.

• 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.)

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 73: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Read Table Containing Two Different Allen-Bradley Data Types

• 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

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 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

FactoryLink would need to generate two messages to process this table: one to read INT2 data and another to read INT4 data.

FactoryLink will still generate two messages to process this revised table. All addresses in the range of 32 to 41 will be read.

FactoryLink Device Interfaces Using OPC and Other Technology / 63

Page 74: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

64

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.

Configuring Triggered Read, Block Write, or Exception Write

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

Filling Out the Read/Write Control Table

The following steps describe how to fill out the Read/Write Control table.

1 Ensure the current domain selected is Shared in the Configuration Explorer.

Choose the appropriate option.

• KTDTL – Open Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Read/Write Control.

• NetDTL – Open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Read/Write Control.

2 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

Triggered Read

The following steps describe how to fill out a Read/Write Control table for a triggered read table.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 75: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Using the following field descriptions, add a table entry for each triggered read request you want to define. Leave all other fields blank. Sample entries are provided in the section “Sample Triggered Read Request.”

Table Name Give this read request table a name. Define one table per line and do not include spaces in the name. Define as many request tables as available memory allows. Try to make the table name reflective of the operation it represents.

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.

Valid Entry: alphanumeric string of up to 16 characters

Exception Write Accept the default of NO to indicate this is not an exception write.

Valid Entry: no

Block ReadPriority

Enter a number to indicate the priority of this table, relative to other read operations. The highest priority is 1. This number 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.

Valid Entry: 1, 2, 3, 4 (default=1)

Block ReadTrigger

Enter a tag name for a digital tag to initiate a block read of the addresses specified in the associated Read/Write Information table. When this tag’s value is forced to 1 (ON), the addresses are read.

The tag you use for the Block Read Trigger 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,

Note

A Block Read Trigger is required to prompt FactoryLink to process a table for a triggered read operation.

FactoryLink Device Interfaces Using OPC and Other Technology / 65

Page 76: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

66

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.

For additional information about triggers and using tags as triggers, see “Choosing Effective Triggering Schemes” on page 61.

Valid Entry: tag nameValid Data Type: digital

Block ReadDisable

(Optional) Enter a tag name for a digital tag to disable a block read of the tags specified in this table. 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 (OFF) to re-enable a block read table that has been disabled.

Valid Entry: tag nameValid Data Type: digital

Tip

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 “Techniques for Improving Communication Performance” on page 91 for a description and examples of how to create a self-triggered table or a cascaded loop.

Tip

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 91.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 77: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Block ReadComplete

(Optional) Enter a tag name for a digital tag to indicate when this operation is complete. This tag is 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.

Valid Entry: tag nameValid Data Type: digital

Block ReadState

(Optional) Enter a tag name for a digital tag to indicate the state of this operation: in progress or 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.

Valid Entry: tag nameValid Data Type: digital

Click the Save icon when you finish filling out the information in this table.

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears. Choose DIGITAL for Type and accept the default of Shared for domain for each tag name.

Define the data to be read and the target addresses in the Read/Write Information table. See “Filling Out the Read/Write Information Table” on page 71 for details.

Block Write

The following steps describe how to fill out a Read/Write Control table for a block write table.

1 Add a table entry using the following field descriptions for each block write request you want to define. Leave all other fields blank. Sample entries are provided in “Sample Block Write Request” on page 86.

Table Name Give this write request table a name. Define one table per line and do not include spaces in the name. Define as many request tables as available memory allows. Try to make the table name reflective of the operation it represents.

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.

Valid Entry: alphanumeric string of up to 16 characters

FactoryLink Device Interfaces Using OPC and Other Technology / 67

Page 78: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

68

Exception Write Accept the default of NO to indicate this is not an exception write.

Valid Entry: no

Block WritePriority

Enter a number to indicate the priority of this table, relative to other write operations. The highest priority is 1. This number 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.

Valid Entry: 1, 2, 3, 4 (default=1)

Block Write Trigger Enter a tag name for a digital tag to initiate a block write of the tag values specified in 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 (ON).

The tag you use for the Block Write Trigger 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 write operation.

Note

A Block Write Trigger is required to prompt FactoryLink to process this table for a write operation.

Tip

For efficient performance, you can define a Block Write Trigger tag as a Block Write State tag in one table, creating a self-triggered table; or you can 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 write operation triggers the start of another. See “Techniques for Improving Communication Performance” on page 91 for a description and examples of how to create a self-triggered table or a cascaded loop.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 79: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

See triggering data effectively in “Choosing Effective Triggering Schemes” on page 61 for additional information about triggers and using tags as triggers.

Valid Entry: tag nameValid Data Type: digital

Block WriteDisable

(Optional) Enter a tag name for a digital tag to disable a block write to the addresses specified in this table. When this tag’s value is forced to 1, the write operation is not executed, even when the block write trigger is set. To re-enable a block write table that has been disabled, set this tag back to 0 (OFF).

Valid Entry: tag nameValid Data Type: digital

Block WriteComplete

(Optional) Enter a tag name for a digital tag to indicate when this operation is complete. This tag is forced to 1 at startup. After the data defined in this Read/Write Information table is written to the device, the complete tag is forced to 1 again.

Valid Entry: tag nameValid Data Type: digital

Block WriteState

(Optional) Enter a tag name for a digital tag to indicate the state of this operation: in progress or complete. This tag is forced to 1 at startup. While the table is being processed, the tag is set to 0. After the data defined in this Read/Write Information table is written to the device, the state tag is forced back to 1.

Valid Entry: tag nameValid Data Type: digital

2 Click the Save icon when you have finished filling out the information on this table.

Tip

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. For details, see “Techniques for Improving Communication Performance” on page 91.

FactoryLink Device Interfaces Using OPC and Other Technology / 69

Page 80: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

70

If the tag names you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each tag appears.

3 Choose DIGITAL for Type and accept the default of Shared for domain for each tag name.

4 Define the data to be written and the target addresses in the Read/Write Information table. See “Filling Out the Read/Write Information Table” on page 71 for details.

Exception Write

The following steps describe how to fill out a Read/Write Control table for an exception write table.

1 Add a table entry using the following field descriptions for each exception write request you want to define. Leave all other fields blank. Sample entries are provided in “Sample Exception Write Request” on page 89.

Table Name Give this write request table a name. Define one table per line and do not include spaces in the name. Define as many request tables as available memory allows. Try to make the table name reflective of the operation it represents.

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.

Valid Entry: alphanumeric string of up to 16 characters

ExceptionWrite

Enter YES for the task to write tag values only when those values change.

Valid Entry: Ctrl+K

Tip

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 81: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Block WritePriority

Enter a number to indicate the priority of this table, relative to other write operations. The highest priority is 1. This number 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.

Valid Entry: 1, 2, 3, 4 (default=1)

Block WriteTrigger

If this is an exception write table, ignore this field.

Block WriteDisable

If this is an exception write table, ignore this field.

2 Click the Save icon when you have finished filling out the information on this table.

If the tag names for the tags you defined on this table are not defined elsewhere in FactoryLink, a dialog box for defining each one appears.

3 Choose DIGITAL for Type and accept the default of Shared for domain for each tag name.

4 Define the data to be written and the target addresses in the Read/Write Information table. See “Filling Out the Read/Write Information Table” on page 71 for details.

Filling Out the Read/Write Information Table

The following steps describe how to fill out the Read/Write Information table.

1 Ensure the current domain selected is Shared in the Configuration Explorer.

Choose the appropriate option.

• KTDTL – Open Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Read/Write Control > “your table name” > Allen-Bradley KTDTL Read/Write Information.

• NetDTL – Open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Read/Write Control > “your table name” > Allen-Bradley NetDTL Read/Write Information.

2 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 database 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 71

Page 82: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

72

Sample entries are provided in “Sample Read and Write Table Entries” on page 82.

Tag Name For a Read Table – specify a tag name for a tag in which FactoryLink will store the data read from the device.For a Write Table – specify a tag name for a tag containing a value to be written 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).

Valid Entry: tag nameValid Data Type: digital, analog, float, message, longana

Logical Station Enter the number representing the device from which the data is to 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.

Valid Entry: previously defined logical station number

Address For a Read Table – enter the address in the device’s memory where the value to be stored in this tag is located.For a Write Table – enter 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 97.

Valid Entry: numeric value from 1 - 65535

Data Type Specify the 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 97.

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.

Valid Entry: Ctrl+K

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 83: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

3 For a Read Table – Click Save to validate the data after you finish defining all the addresses to be read and all the tags to which the data is to be written.

4 For a Write Table – Click Save to validate the data after you finish defining all the tag names for FactoryLink database tags and the addresses to which their contents are to be written.

If the tag names for the tags you defined are not defined elsewhere in FactoryLink, a dialog box for defining each one appears.

5 Choose the type of data to be stored in the tag for Type and accept the default of Shared for domain for each tag name. See the tag’s field description for the valid data types.

6 Return to the Read/Write Control table and configure another read or write request table.

Configuring an Unsolicited Read

This section provides information you should understand before configuring a request for an unsolicited read operation and provides procedures for configuring an unsolicited read request table.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 73

Page 84: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

74

Before configuring the Unsolicited Read table, you should 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.

If you are not sure of when to use an unsolicited read operation, see “Choosing Operation Type” on page 60.

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 more information about the MSG instruction.

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 “Pyramid Integrator as Data Concentrator” on page 75.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 85: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 75

Page 86: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

76

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,ASC

Add the length specifier (value of the Address field in the Unsolicited Read 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 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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 87: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

criteria described in “Data Packet Processing” on page 76. 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.

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,

FactoryLink Device Interfaces Using OPC and Other Technology / 77

Page 88: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

78

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.

• 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:

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 89: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

MessageLength

The Message Length determines the total word length of FactoryLink tags 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.

• 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.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 79

Page 90: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

80

Filling Out the Unsolicited Read Control Table

The following steps describe how to fill out the Unsolicited Read Control table.

1 Ensure the current domain selected is Shared in the Configuration Explorer.

2 Choose the appropriate option.

KTDTL – In your server application, open Allen-Bradley KTDTL > Allen-Bradley KTDTL Unsolicited Read Control.

NetDTL – In your server application, open Allen-Bradley NetDTL > Allen-Bradley NetDTL Unsolicited Read Control.

3 Display the Unsolicited Read Control table by clicking its title bar.

4 Add a table entry using the following field descriptions, for each unsolicited read request you want to define. Sample entries are provided in “Sample Unsolicited Read Request” on page 85.

Table Name Give this unsolicited read request table a name. Define one table per line and do not include spaces in the name. You can define as many tables as available memory allows. Try to make the table name reflective of the operation it represents.

Valid Entry: alphanumeric string of up to 16 characters

UnsolicitedType

Enter YES or FORCE. The task will interpret this operation as an unsolicited read and emulate the device’s addressing structure based on 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.

If you enter 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 (ON).

If you enter 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.

Valid Entry: Ctrl+K

5 Click Save after you finish filling out the information on this table.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 91: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

6 Define the data to be read and the target addresses in the Unsolicited Read Information table. See “Filling Out the Unsolicited Read Information Table” on page 81.

Filling Out the Unsolicited Read Information Table

The following steps describe how to fill out the Unsolicited Read Information table.

1 Ensure the current domain selected is Shared in the Configuration Explorer.

Choose the appropriate option.

• KTDTL – Open Device Interfaces > Allen-Bradley KTDTL > Allen-Bradley KTDTL Unsolicited Read Control > “your table name” > Allen-Bradley KTDTL Unsolicited Read Information.

• NetDTL – Open Device Interfaces > Allen-Bradley NetDTL > Allen-Bradley NetDTL Unsolicited Read Control > “your table name” > Allen-Bradley NetDTL Unsolicited Read Information.

2 Using the following field descriptions, add a table entry for each FactoryLink database tag in which data read from the device will be stored when FactoryLink receives the data. Sample entries are provided in “Sample Unsolicited Read Request” on page 85.

Tag Name Specify a tag name for a tag in which FactoryLink will store the data read from the device. Be sure the message length defined in the PLC or SLC MSG instruction is sufficient to handle the number and types of tags you define in this table. See “SLC 5/03 and 5/04 MSG Instruction Considerations” on page 78.

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.

Valid Entry: tag nameValid Data Type: digital, analog, float, message, longana

Logical Station Enter the number representing the device from which the expected 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.

Valid Entry: previously defined logical station number

Address Enter the address in the device’s memory where the value to be 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 97.

FactoryLink Device Interfaces Using OPC and Other Technology / 81

Page 92: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

82

For special addressing requirements pertinent to unsolicited reads, see “Unsolicited Read Operation Concepts” on page 73. 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 78.

Valid Entry: numeric value from 1 - 65535

Data Type Specify the 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 97.

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.

Valid Entry: Ctrl+K

3 Click the Save icon to validate the data when you have finished defining all the addresses from which the expected data is to be read and all the tags to which the data will be written.

If the tag names for the tags you defined are not defined elsewhere in FactoryLink, a dialog box for defining each one appears.

4 Choose the type of data to be stored in the tag for Type and accept the default of Shared for domain for each tag name. See the tag’s field description for the valid data types.

5 Return to the Unsolicited Read Control table and configure another unsolicited read request table.

Sample Read and Write Table Entries

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 93: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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

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

READ isillustrated in

this example.

FactoryLink Device Interfaces Using OPC and Other Technology / 83

Page 94: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

84

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 WorksWhen 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 Using OPC and Other Technology

Page 95: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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

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

UNSOL_READ is illustrated in this example.

FactoryLink Device Interfaces Using OPC and Other Technology / 85

Page 96: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

86

The following graphic illustrates how this unsolicited read operation works.

How Unsolicited Read Operation Works

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.

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 97: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Read/Write Control Table for a Block Write

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.

WRITE isillustrated in

this example.

FactoryLink Device Interfaces Using OPC and Other Technology / 87

Page 98: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

88

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 ofKTDTL_WRITE_TRIGGER is1, FactoryLink processes the

table, WRITE.

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

FactoryLink writes thevalue of P240000...

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 99: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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

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.

EXCEPTION isillustrated in

this example.

FactoryLink Device Interfaces Using OPC and Other Technology / 89

Page 100: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

90

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 ofP240000 changes,

FactoryLink writes itsvalue into bit 12 of filetype B, file number 3,

tag 1.

Because this is an exception write table,...

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 101: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

Techniques for Improving Communication Performance

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 91

Page 102: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

92

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.

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 103: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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.

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 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.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 93

Page 104: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

94

Cascaded Read Tables

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.

When the READ1 tablehas been processed, its

state tag, r1_state, isforced back to 1.

Since r1_state is defined asthe read trigger for the

READ2 table, READ2 is thenext table triggered.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 105: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Field Configuration

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 Using OPC and Other Technology / 95

Page 106: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLField Configuration

96

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.

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.

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.

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 107: Device Interfaces Using Op Can Dot Her Technologies

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

ALLEN-BRADLEY DATA TYPES AND ADDRESSES

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 98 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 100.

For information about valid file types and subtags for specific device types, see the appropriate section:

• “PLC-3 File Type Reference” on page 102

• “PLC-5 File Type Reference” on page 104

• “PLC-5/250 File Type Reference” on page 111

• “SLC 500 File Type Reference” on page 116

FactoryLink Device Interfaces Using OPC and Other Technology / 97

Page 108: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

98

SUPPORTED DATA TYPES

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

Data Type Cross Reference

FactoryLinkData Type

Allen-BradleyData Type Description/Conversion

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

/ FactoryLink Device Interfaces Using OPC and Other Technology

Page 109: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

Long analog 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

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

Data Type Cross Reference (continued)

FactoryLinkData Type

Allen-BradleyData Type Description/Conversion

FactoryLink Device Interfaces Using OPC and Other Technology / 99

Page 110: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

10

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.

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

Data Type Cross Reference (continued)

FactoryLinkData Type

Allen-BradleyData Type Description/Conversion

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 111: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 101

Page 112: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

10

,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.

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

File Type Description Allen-BradleyData Type

TagLength

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 113: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

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

FactoryLink Device Interfaces Using OPC and Other Technology / 103

Page 114: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

10

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

File Type Description Allen-BradleyData Type

DefaultFile Number

Tag Lengthin 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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 115: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported 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

FactoryLink Device Interfaces Using OPC and Other Technology / 105

Page 116: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

10

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

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 117: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

PVLA PV low alarm DIG No

PVHA PV high alarm DIG No

SP Set point FLT Yes

FactoryLink Device Interfaces Using OPC and Other Technology / 107

Page 118: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

10

KP Proportional gain FLT Yes

KI Integral gain FLT Yes

KD Derivative time FLT Yes

BIAS Output bias% FLT Yes

MAXS Setpoint maximum (scaled value)

FLT Yes

MINS Setpoint minimum (scaled value)

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 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

File Type PD (continued)

Subtag Description Data Type Writable

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 119: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

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 PD (continued)

Subtag Description Data Type Writable

FactoryLink Device Interfaces Using OPC and Other Technology / 109

Page 120: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

11

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

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 121: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

File Types Description Allen-BradleyData Type

Tag Lengthin 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

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

FactoryLink Device Interfaces Using OPC and Other Technology / 111

Page 122: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

11

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

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 123: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

File Type MSG (continued)

Subtag Description Data Type Writable

FactoryLink Device Interfaces Using OPC and Other Technology / 113

Page 124: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

11

EWD Error within deadband

DIG No

DVNA Deviation high alarm

DIG No

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

File Type PD (continued)

Subtag Description Data Type Writable

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 125: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

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 PD (continued)

Subtag Description Data Type Writable

FactoryLink Device Interfaces Using OPC and Other Technology / 115

Page 126: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

11

SLC 500 File Type Reference

This section provides a list of the valid file types for SLC 500 addresses and the valid subtags for file types C, R, and T.

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.

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

Valid File Types for SLC-500 Addresses

File Type Description Allen-BradleyData Type

DefaultFile Number

TagLength

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 127: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Supported Data Types

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

FactoryLink Device Interfaces Using OPC and Other Technology / 117

Page 128: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLSupported Data Types

11

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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 129: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Program Arguments

PROGRAM ARGUMENTS

Argument Description

-A<pathname> Specifies a new FactoryLink application directory-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 is 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 is 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 is 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.

-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 is 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.

-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 is 10)

FactoryLink Device Interfaces Using OPC and Other Technology / 119

Page 130: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLMessages and Codes

12

MESSAGES AND CODES

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 also be written to a real-time database message tag for display on a custom graphics screen. See “Configuring Communication Paths” on page 22.

Also, 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 124.

Status Messages

Status messages for the KTDTL and NetDTL tasks can be generated and displayed by FactoryLink at task startup and at shutdown. These messages do not require any action; they are displayed for information only.

Startup

The following status messages appear in the order they are listed every time the task is started by the Run-Time Manager.

Allen-Bradley (KTDTL/NetDTL) Interface Startup

Cause: The task is starting up normally.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 131: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Messages and Codes

Processing (DCT Filename)

Cause: 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 (#) unsol (#)

Cause: The task is displaying the total number of communication transactions configured for each type of operation defined in the DCT files.

Tot 0 Allen-Bradley (KTDTL/NetDTL) Interface Started

Cause: The task has started up normally.

Shutdown

The following message appears at task shutdown:

Normal Termination

Cause: The task has shut down normally.

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.

Startup

The following messages can be generated and displayed by FactoryLink if errors occur at task startup:

no reads, no writes >>> nothing to do

This message is generated for various reasons:

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 121

Page 132: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLMessages and Codes

12

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 fileInternal:Out of memory tag arrayInternal:...

Cause: The task did not initialize properly. An internal message can appear for a variety of reasons, including an incorrect 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.

Communications

The following messages can be generated and displayed during a communications attempt by the KTDTL or NetDTL task:

Connect (A-B KT card #/EI #): (A-B return-code message)

Cause: After the task has started up and is attempting to establish 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 State: Reduce Trigger Rate

Cause: The timed trigger tag is changing too rapidly.

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 91.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 133: Device Interfaces Using Op Can Dot Her Technologies

KTDTL AND NETDTL | 2Messages and Codes

Tot (# of errors since startup) (Table Name) Lsta: (Logical Station #) (A-B return-code message)

Cause: This message indicates the total number of communication errors that have occurred for the 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

When the KTDTL or NetDTL task is terminated by the Run-Time Manager, the following messages appear in the order they are listed:

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. Contact Customer Support for assistance if you cannot determine the source of the error based on the subsequent message.

Disconnect (A-B KT card #/EI #): (A-B return-code message)

Cause: The task is displaying the status of the disconnection 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 Not Connected

Cause: This message appears only if the task was 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. Contact Customer Support for assistance if you cannot determine the source of the error based on the displayed return code in the connect message.

FactoryLink Device Interfaces Using OPC and Other Technology / 123

Page 134: Device Interfaces Using Op Can Dot Her Technologies

2 | KTDTL AND NETDTLMessages and Codes

12

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.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 135: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 3

Enhanced Communication Interface (ECI/OPC)

OVERVIEW

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).

FactoryLink Device Interfaces Using OPC and Other Technology / 125

Page 136: Device Interfaces Using Op Can Dot Her Technologies

3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)Overview

12

• 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 interface, ECI can run as a Stand-Alone Converter using Database Tags for any of above functions.

Graph

ECI

GPI OMR TXI SQD

SerialPort DigiBoard Ethernet

EDI

FactoryLink Database

Tags/Arrays

Scale/Converter

Tag Interface

Tables using

Device InterfaceBase Module Tables

Board ServiceTables

External Device Interface EDI Driver Tables

ECI withEDI Drivers

Graph

ECI

A-B MOD SIE OPC

FactoryLink Database

Tags/Arrays

Scale/Converter

IMX Interface

Tables using

Intertask Mail eXchange IMX / RADP and OPC Driver Tables

ECI withRAPD and OPC

• Common Data Format (binary dump)• Standardized Datasets

• Indirect Addressing and Bit Access• ECI Output Queue Management• Simple/Fast Independent Drivers

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 137: Device Interfaces Using Op Can Dot Her Technologies

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

BASIC CONCEPTS

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 Using OPC and Other Technology / 127

Page 138: Device Interfaces Using Op Can Dot Her Technologies

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

12

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.

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

Read Cycle Write Interval

Update Delay

Alternate Read Tagsand/or

Read Dataset

Alternate Write Tagsand/or

Write Dataset

ObjectI/O Tags

External Device / PLC / OPC Server

Driver InterfaceEDI / RAPD / OPC

ReadTable / Mbx

WriteTable / Mbx

ECI Object InformationRdElem(1) | I/O_Tag(1) | WrElem(1) RdElem(2) | I/O_Tag(2) | WrElem(2) RdElem(3) | I/O_Tag(3) | WrElem(3) RdElem(x) | I/O_Tag(X) | WrElem(x)

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 139: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Basic 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 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).

Changed datareceived atRead Cycle

OnlyRead

External Device

Driver InterfaceEDI / RAPD / OPC

Read Tags / DatasetRdElem(1), Value(a)RdElem(2), Value(b)RdElem(3), Value(c)

ECI Object Information RdElem(1) | I/O_Tag(1) | RdElem(2) | I/O_Tag(2) | RdElem(3) | I/O_Tag(3) | RdElem(x) | I/O_Tag(X) |

ReadTable / Mbx

FactoryLink Device Interfaces Using OPC and Other Technology / 129

Page 140: Device Interfaces Using Op Can Dot Her Technologies

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

13

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

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.

Write Only

External Device

Changed datatransmitted atWrite Interval

Driver InterfaceEDI / RAPD / OPC

Write Tags / DatasetWrElem(1), Value(x)WrElem(2), Value(y)WrElem(3), Value(z)

ECI Object Information | I/O_Tag(1) | WrElem(1) | I/O_Tag(2) | WrElem(2) | I/O_Tag(3) | WrElem(3) | I/O_Tag(X) | WrElem(x)

WriteTable / Mbx

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 141: Device Interfaces Using Op Can Dot Her Technologies

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

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 145.

Changed datacorrected afterUpdate Delay

Read Write

External Device

Driver InterfaceEDI / RAPD / OPC

Read Tags / DatasetRdElem(1), Value(a)RdElem(2), Value(b)RdElem(3), Value(c)

Write Tags / DatasetWrElem(1), Value(x)WrElem(2), Value(y)WrElem(3), Value(z)

ECI Object InformationRdElem(1) | I/O_Tag(1) | WrElem(1) RdElem(2) | I/O_Tag(2) | WrElem(2) RdElem(3) | I/O_Tag(3) | WrElem(3) RdElem(x) | I/O_Tag(X) | WrElem(x)

ReadTable / Mbx

WriteTable / Mbx

FactoryLink Device Interfaces Using OPC and Other Technology / 131

Page 142: Device Interfaces Using Op Can Dot Her Technologies

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

13

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 PumpA 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 = RUNNING2 = STOPPING3 = STARTINGTo 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.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 143: Device Interfaces Using Op Can Dot Her Technologies

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

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).

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 133

Page 144: Device Interfaces Using Op Can Dot Her Technologies

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

13

• 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.

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.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 145: Device Interfaces Using Op Can Dot Her Technologies

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

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).

• 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 135

Page 146: Device Interfaces Using Op Can Dot Her Technologies

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

13

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.

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.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 147: Device Interfaces Using Op Can Dot Her Technologies

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

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 137

Page 148: Device Interfaces Using Op Can Dot Her Technologies

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

13

The sample OPC-specific information table below shows a setup as described previously for EDI and RAPD above.

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.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 149: Device Interfaces Using Op Can Dot Her Technologies

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

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 174). 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 Using OPC and Other Technology / 139

Page 150: Device Interfaces Using Op Can Dot Her Technologies

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

14

ECI/OPC Object Information - Shared

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.

Read Tag, Addr or OPC Item

RdCDE

ObjectI/O Tag

WrCDE

Write Tag, Addr or OPC Item

R/W Range

FunctionComment:

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

ReadElem[b] ReadElem[c] ReadElem[..]

WriteElem[B] WriteElem[C] WriteElem[..]

assumed hiddentags

Array offsets [a,b,c..], and [A,B,C..] 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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 151: Device Interfaces Using Op Can Dot Her Technologies

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

ECI/OPC Object Information – Shared

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

Read Tag, Addr or OPC Item

RdCDE

ObjectI/O Tag

WrCDE

Write Tag, Addr or OPC Item

R/W RangeFunction Comment:

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

ReadElem[b] ReadElem[c] ReadElem[d] ReadElem[..]

I/O_Tag[1] I/O_Tag[2] I/O_Tag[..] I/O_Tag[n-1]

WriteElem[B] WriteElem[C] WriteElem[D] WriteElem[..]

assumed hiddentags

Array offsets [a,b,c..], and [A,B,C..] specified

by Array Function, Read/Write Elem size

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

FactoryLink Device Interfaces Using OPC and Other Technology / 141

Page 152: Device Interfaces Using Op Can Dot Her Technologies

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

14

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 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 170.

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.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 153: Device Interfaces Using Op Can Dot Her Technologies

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

Indirect Addressing with Unsolicited Read

Read Mode “A” allows access to any Dataset Address by an external device or PLC. In this case, specify prefix “A” in the Read Mode column of the ECI Control table. The Tag Start Address must appear as a long integer in the first four bytes of the data block transmitted. In the example shown below, a single DataSetX with Tag Addresses 150..970 is assigned to multiple ECI Objects A..C. Read data may be transmitted on change and with block sizes as desired by the external device.

These methods are applicable only for Tags addressed by Read Elem Addr column.

Read Mode “I” allows access to any Dataset Index by an external device or PLC. In this case, specify prefix “I” in the Read Mode column of the ECI Control table as well as an index number Ds Idx to identify the desired Dataset(s). The Ds Idx number must be transmitted as a long integer in the first four bytes of the data block. In the example shown below, three Datasets with Index 751..753 are assigned to corresponding ECI Objects. Read data may be transmitted on change as desired by the external device.

FactoryLink Device Interfaces Using OPC and Other Technology / 143

Page 154: Device Interfaces Using Op Can Dot Her Technologies

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

14

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...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.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 155: Device Interfaces Using Op Can Dot Her Technologies

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

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 145

Page 156: Device Interfaces Using Op Can Dot Her Technologies

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

14

• 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:

• 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.

Alternate Read Tag own created Object I/O.

Use Merge Function if a Write/Output is required.

Alternate Read Tag other Object I/O.

Use Link Function were Object I/O is created.

Alternate Read Tag Alternate Write Tag.

No restrictions.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 157: Device Interfaces Using Op Can Dot Her Technologies

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

CONFIGURATION 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 170.

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 Namereferencedby RAPD

Read Control Write/Output Write ControlRead/Input

FactoryLink Device Interfaces Using OPC and Other Technology / 147

Page 158: Device Interfaces Using Op Can Dot Her Technologies

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

14

Object Table Name

A user-specified name of up to 15 characters for the ECI Information table 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 197).

Read Mailbox Tag

A Mailbox Tag is 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 entries are:

TagName of a Mailbox (normally one only for each RAPD driver) default = none

If numerous Datasets will be processed, multiple Read Mailboxes may be applied to group data from different drivers or stations.

Read Dataset IdxTag

This is the Database Tag used for Read Dataset Identification and/or Read 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):

TagName for Tag of Type Digital, default = none

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.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 159: Device Interfaces Using Op Can Dot Her Technologies

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

Read Dataset Index > Rd Ds Idx

Data in this column is considered a user specified unique identifier, which 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):

-1..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 174) 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.

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 174).

FactoryLink Device Interfaces Using OPC and Other Technology / 149

Page 160: Device Interfaces Using Op Can Dot Her Technologies

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

15

Read Interval After Change or Continuous > Interv Ch/Cont

Separate Read Interval after changing an Object I/O (fast update) and Continuous Read Interval (slow update) for normal transmission by a slash or a semicolon (for example, 1.6/25). Note that these values are also used as update rates for ODX OPC Data eXchange. Valid entries are:

0=default (never, inactive), 0.1..10000/0.1..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 Delay

This is the time delay to refresh each particular Object I/O after it has been changed (or forced written) by a task other than ECI and caused a possible Write/Output. Valid entries are:

0=default (immediate up-date), 0.1..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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 161: Device Interfaces Using Op Can Dot Her Technologies

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

Write Encoded Array or Mailbox Tag

An Encoded Array may be assigned to transmit Encoded Write data to an EDI driver. A Write Mailbox (also-called Protocol Driver Mailbox) must be assigned to transmit any type of output data (Exception, Encoded, Block or Dataset Write) to RAPD, ODX or a network. Valid entries are:

TagName for Array of Type Analog or Mailbox (normally one only for each RAPD driver), default = none

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 151

Page 162: Device Interfaces Using Op Can Dot Her Technologies

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

15

Write Dataset IdxTag

This database tag is used for both Write Dataset Identification and 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 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):

TagName for Tag of Type Digital, default = none

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 Index > Wr Ds Idx

Data in this column is considered a user-specified unique identifier, which 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):

-1..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 174). 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, that is, the commands can be written to a Read Mailbox for further processing.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 163: Device Interfaces Using Op Can Dot Her Technologies

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

Write by Trigger > Wr by Tr

This column identifies the type of data to be transmitted to the Write 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 178). Valid entries are:

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.

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 > Wr at Ch

This column identifies the type of data to be transmitted to the Write 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 178). 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**

FactoryLink Device Interfaces Using OPC and Other Technology / 153

Page 164: Device Interfaces Using Op Can Dot Her Technologies

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

15

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 Address > Enc Addr

This column contains the address in the particular Dataset to which the Encoded data will be written. If a Write Mailbox is assigned, an entry is required for codes E, EB and EN in the Write at Change column Valid entries are (not applicable for OPC-specific tables):

0..65500 or -1=none (default)

Write Interval Time > Write Interv

This is the Time to delay data output if multiple outputs are written sequentially to the target system. The time adjusted represents the transmission time required to smoothly write data to the target system. Valid entries are:

0=every scan (default), 0.1..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 will be 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 autorepeat 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.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 165: Device Interfaces Using Op Can Dot Her Technologies

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

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:

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

• 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 Tag or OPC Item

Read/Input information is extracted from the Tag or Array specified in this column. In this case, a possible Read Elem Addr cannot be used. Valid entries are:

TagName or Array of Type Digital, Analog, LongAna, Float, or Message,

or ...

OPCItemName (preceded by a single quote) for OPC specific tables, default = none

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

FactoryLink Device Interfaces Using OPC and Other Technology / 155

Page 166: Device Interfaces Using Op Can Dot Her Technologies

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

15

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 > Elem Addr

A Read Tag Address is required if data will be taken from a Dataset. In this case, no Alternate Read Tag must be entered in this line. Valid entries are (for OPC-specific tables created internally):

0..65500 or -1=none (default)

A Tag of a Dataset is a memory portion having an address in the external device (see RAPD Driver).

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 167: Device Interfaces Using Op Can Dot Her Technologies

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

Read Code > Rd CDE

This column contains Code defining the convert function for Read/Input data. Unless 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 170 and “Intel <=> Motorola Format and Composite Object” on page 174. Valid entries are:

Boolean,Bits:

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

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 157

Page 168: Device Interfaces Using Op Can Dot Her Technologies

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

15

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 176.

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

QualityLimit:

.QL Flags LL 0=Ok/NotLimited, 1=LoLimit, 2=HiLimit, 3=ConstantValue, I/O=Analog

QualityStatus:

.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=OutOfSevice16=Uncertain, 17=LastUsableVal, 20=SensorNotAccurate, 21=EngUnitsExceeded, 22=SubNormal48=Ok/Good, 54=LocalOverride/Forced. Note that all other numbers are not specified.

AccessRights:

.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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 169: Device Interfaces Using Op Can Dot Her Technologies

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

Object I/O Tag

The Object I/O 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 entries are:

TagName for Tag or Array of Type Digital, Analog, LongAna, Float, or Message, default = none

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 CDE

This column contains a code defining how data will be converted and encoded for the Write/Output (see “Tag/Item Addressing and Conversion Code” on page 170). 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 Using OPC and Other Technology / 159

Page 170: Device Interfaces Using Op Can Dot Her Technologies

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

16

Write Tag Address > Elem Addr

A Write Tag Address is required if data will be sent to a Dataset or to an Encoded Array for entries E, EB or EN in the Write at Change column. Valid entries are (for OPC specific tables created internally):

0..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 Tag or OPC Item

Individual output information is transmitted to the Tag or Array identified in this column regardless whether a Write Encoded Array or a Mailbox is specified (parallel operation). Valid entries are:

TagName or Array of Type Digital, Analog, LongAna, Float, or 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 Function

This column contains the Read/Write Range of normalized data transmitted from/to the 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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 171: Device Interfaces Using Op Can Dot Her Technologies

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

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:

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.

• 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

FactoryLink Device Interfaces Using OPC and Other Technology / 161

Page 172: Device Interfaces Using Op Can Dot Her Technologies

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

16

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.

• 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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 173: Device Interfaces Using Op Can Dot Her Technologies

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

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 199). 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).

• 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 205).

Note: Although Copy and Enum (below) are similar, they are only valid for (Alternate) Read/Write Tags.

FactoryLink Device Interfaces Using OPC and Other Technology / 163

Page 174: Device Interfaces Using Op Can Dot Her Technologies

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

16

• 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

• 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 201). 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).

Read Tag, Addr or OPC Item

RdCDE

ObjectI/O Tag

WrCDE

Write Tag, Addr or OPC Item

R/W RangeFunction

Sample description:

EnumArray[0] EnumArrayIdx EnumOutput Enum0;4 Enum Output Principle

EnumArray[1] EnumArray[2] EnumArray[3] EnumArray[4]

assumed hiddentags

`EnumItem`EnumItemEnumText[0]

N0N0

MSG

EnumValueEnumArrayIdxEnumArrayIdx

N0-

MSG

`EnumItem

EnumTextOutLinkLN9 Enum0;7

OPC Bidirectional EnumComposite Object to Link

EnumArrayIdx=EnumValue

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 175: Device Interfaces Using Op Can Dot Her Technologies

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

• 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.

• 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 203). 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 205). 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:

FactoryLink Device Interfaces Using OPC and Other Technology / 165

Page 176: Device Interfaces Using Op Can Dot Her Technologies

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

16

• 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.

• 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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 177: Device Interfaces Using Op Can Dot Her Technologies

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

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.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 167

Page 178: Device Interfaces Using Op Can Dot Her Technologies

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

16

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:

Scale / Normalize Formulas

Scaled Object I/O = Read/Inputextracted * a + b

NormalizedRead/Input or Write/Output = (ObjectI/O - b) / a

I/OScaleMax - I/OScaleMin

where ...a = R/WRangeMax - R/WRangeMin

... and b = I/OScaleMin - R/WRangeMin * a

Default values if ...

R/W Range not specified a = 1, b = 0R/W Range specified only Scaled I/O Range = 0..100 [%]

Status>=4

Status=0

Min

I/O Scale

Max

Min Max R/W Range

(a)

(b)

Status>=32

LimitType=AInfinite (default)

LimitType=BBoundary

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)

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 179: Device Interfaces Using Op Can Dot Her Technologies

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

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.

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)

FactoryLink Device Interfaces Using OPC and Other Technology / 169

Page 180: Device Interfaces Using Op Can Dot Her Technologies

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

17

x

0

0

1

2

0

TAG/ITEM ADDRESSING AND CONVERSION CODE

Hexadecimal and Octal Tag Addressing

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) He

BOOL LSB = Boolean/Least Significant Bit (default)

100 Any code identified by Function ARYnnn:x:y:z where

C0

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 C8

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

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

C8

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

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 ...

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 181: Device Interfaces Using Op Can Dot Her Technologies

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

0

x

F

0

F

0

x

F

0

x

F

0

F

0

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

UI1 UB0 (.QA), UB1 (.QX) = Unsign. Char/Byte 0..255

50x at 1st char found 0 ASCII (NULL terminated 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 ANALOG

600 TIM0 (.TIM) = SecTime [s] of UTC LNGANA D0

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

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

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

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

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

D2

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

D2

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

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

D3

I4 L0 = Signed Int4/Long ±2.1*109=±231 l LONGANA

800 TID1..3 = Y-M-D hh:mm:ss.xxx of user specified bytes

D3

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

UI4 UL0 = Unsigned Int4/Long

0..4.3*109=0..232-1

900 UTC0 (.UTC) = UTC native (binary dump) FLT D4

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

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

D5

FactoryLink Device Interfaces Using OPC and Other Technology / 171

Page 182: Device Interfaces Using Op Can Dot Her Technologies

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

17

=.3

-Byte

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

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

x1.

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 193

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 183: Device Interfaces Using Op Can Dot Her Technologies

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

B

W

2

2

2

2

2

2

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.

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.

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

eight Decimal Decimal HexaDec Octal Reversed Modicon (4-Bit) (8-Bit) (16-Bit) (32-Bit)

20..23 00..03 1D..4D 0X..3X 0C..3C 15R..12R 16M..13M N0/300 B0/400UB0/500 S0/600

US0/700

L0/800UL0/900

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

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

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

16..219 16..19 17D..20D 10X..13X 20C..23C N4/310 B2/410UB2/510 S1/610

US1/710

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

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

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

FactoryLink Device Interfaces Using OPC and Other Technology / 173

Page 184: Device Interfaces Using Op Can Dot Her Technologies

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

17

BBy

B ig

1

B

INTEL <=> MOTOROLA FORMAT AND COMPOSITE OBJECT

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 MemoryTag Address

INTEL FormatLow value on first Address

MOTOROLA FormatHigh value on first Address

#te

S#Short

L#Long

Byte(Byte)

Short(Word)

Long Integer(DoubleWord)

Byte(Byte)

Short(Word)

Long Integer(DoubleWord)

0 S0 L0 0 0 0 low 0 8 24 h

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 S

1 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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 185: Device Interfaces Using Op Can Dot Her Technologies

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

B2 w

0

B3

B4

7 15 15 7 7 23

S1 0 0 16 hig 0 8 8 lo

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 S

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

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 Using OPC and Other Technology / 175

Page 186: Device Interfaces Using Op Can Dot Her Technologies

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

17

DATASET LAYOUT FOR TIMESTAMPS

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 187: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Dataset 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 Using OPC and Other Technology / 177

Page 188: Device Interfaces Using Op Can Dot Her Technologies

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

17

DATASET OR OPC GROUP WRITE PROCEDURES

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:

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 189: Device Interfaces Using Op Can Dot Her Technologies

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

DATAFLOW PLC <=> RAPD/OPC <=> ECI <=> DATABASE

FactoryLink Device Interfaces Using OPC and Other Technology / 179

Page 190: Device Interfaces Using Op Can Dot Her Technologies

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

18

SAMPLE TABLES FOR STANDARD DRIVERS

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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 191: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Sample 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 Using OPC and Other Technology / 181

Page 192: Device Interfaces Using Op Can Dot Her Technologies

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

18

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 197.

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:

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 193: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Sample 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 197.

FactoryLink Device Interfaces Using OPC and Other Technology / 183

Page 194: Device Interfaces Using Op Can Dot Her Technologies

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

18

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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 195: Device Interfaces Using Op Can Dot Her Technologies

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

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 197 using VRN.

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:

FactoryLink Device Interfaces Using OPC and Other Technology / 185

Page 196: Device Interfaces Using Op Can Dot Her Technologies

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

18

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 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 197.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 197: Device Interfaces Using Op Can Dot Her Technologies

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

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 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 187

Page 198: Device Interfaces Using Op Can Dot Her Technologies

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

18

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 197, using VRN.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 199: Device Interfaces Using Op Can Dot Her Technologies

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

SAMPLE TABLES FOR OPC DATA EXCHANGE 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 189

Page 200: Device Interfaces Using Op Can Dot Her Technologies

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

19

Note: This method keeps PLC addressing transparent throughout communication and, with ECI virtually no configuration changes are required when replacing an existing RAPD Driver.

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 197 using VRN.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 201: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Sample 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:

FactoryLink Device Interfaces Using OPC and Other Technology / 191

Page 202: Device Interfaces Using Op Can Dot Her Technologies

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

19

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 197 using VRN.

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

.UTC

.TIM/.TIX

.TIH/.TID

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

.QA/.QX

.QS/.QLQuality Native (QQ=Quality, SSSS=Status, LL=Limit Flags) 0..255 and Quality Vendor Specific 0..255 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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 203: Device Interfaces Using Op Can Dot Her Technologies

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

SAMPLE APPLICATION TRANSLATION IOX –>ECI

Sample ECI showing the same Table XXX as I/O Translator/Decoder. Also, see the Hints and Tips below:

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 193

Page 204: Device Interfaces Using Op Can Dot Her Technologies

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

19

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 205: Device Interfaces Using Op Can Dot Her Technologies

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

IOX Conversion Code -> ECI Rd/Wr CodeIOX Conv ECI CDE Optional ECI Bit addressing

(independent on external device)Comments

BIT Binary Octal HexaDec Decimal Modicon Bool ** DIGITAL, for <Bit># see “Bit or Length” Column

<Bit> 0<Bit> 1<Bit> 2<Bit> 3<Bit> 4<Bit> 5<Bit> 6<Bit> 7<Bit> 8<Bit> 9<Bit> 10<Bit> 11<Bit> 12<Bit> 13<Bit> 14<Bit> 15<Bit> 16<Bit> 17<Bit> 18<Bit> 19<Bit> 20<Bit> 21<Bit> 22<Bit> 23<Bit> 24<Bit> 25<Bit> 26<Bit> 27<Bit> 28<Bit> 29<Bit> 30<Bit> 31<Bit> 32

0/LSB12345678910111213141516171819202122232425262728293031n/a

0C/LSB1C2C3C4C5C6C7C

10C11C12C13C14C15C16C17C20C21C22C23C24C25C26C27C30C31C32C33C34C35C36C37Cn/a

0X/LSB1X2X3X4X5X6X7X8X9XAXBXCXDXEXFX10X11X12X13X14X15X16X17X18X19X1AX1BX1CX1DX1EX1FXn/a

n/a1D/LSB

2D3D4D5D6D7D8D9D

10D11D12D13D14D15D16D17D18D19D20D21D22D23D24D25D26D27D28D29D30D31D32D

n/a1M2M3M4M5M6M7M8M9M10M11M12M13M14M15M

16M/LSB||||||

n/a|||||||

Hints and Tips for Translation from IOX to ECI

♦ IOX Max MSG column information is not required. Use ECI Write Interval to prevent queue over-flow.

♦ IOX enCoded Write is not supported by all driv-ers. Use ECI eXception Write and Merge Function to form Write tags or use ECI Encoded Write. Note that using the driver to insert Bits to a Word may cause the driver to first read the Word before writing (including the Bit). If Bit addresses are swapped, you may apply the ECI WrCDE for reversed Bits.

♦ IOX relative addressing (IOX Abs=N) depends on the driver and is supported by other means in ECI. Use absolute - or ECI indirect addressing.

♦ IOX Status is supported by other means in ECI. Use ECI Functions as desired.

♦ Use bidirectional communication and substitute the Timer by ECI Read Interv Ch/Cont for fast/slow transmission (automatic polling or cyclic read).

♦ Adjust the ECI Wr Mode to suit the external sys-tems data tag size (Boundary)

♦ note that ECI Read/Write Dataset IdxTags can substitute the IOX Read and Write Triggers, in this case, use independent tags for read and 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 Using OPC and Other Technology / 195

Page 206: Device Interfaces Using Op Can Dot Her Technologies

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

19

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

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 207: Device Interfaces Using Op Can Dot Her Technologies

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

DATASET EXCHANGE IN REDUNDANT SYSTEM 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 Using OPC and Other Technology / 197

Page 208: Device Interfaces Using Op Can Dot Her Technologies

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

19

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).

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 209: Device Interfaces Using Op Can Dot Her Technologies

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

DATA EMBEDDING AND FUNCTION MERGE

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 199

Page 210: Device Interfaces Using Op Can Dot Her Technologies

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

20

Note that without the 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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 211: Device Interfaces Using Op Can Dot Her Technologies

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

WRITE/OUTPUT TRIGGERING BY FUNCTION TRXXX=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.

FactoryLink Device Interfaces Using OPC and Other Technology / 201

Page 212: Device Interfaces Using Op Can Dot Her Technologies

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

20

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 213: Device Interfaces Using Op Can Dot Her Technologies

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

ARRAY HANDLING BY FUNCTION ARYNNN: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

FactoryLink Device Interfaces Using OPC and Other Technology / 203

Page 214: Device Interfaces Using Op Can Dot Her Technologies

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

20

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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 215: Device Interfaces Using Op Can Dot Her Technologies

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

STATISTICAL FUNCTIONS 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 Using OPC and Other Technology / 205

Page 216: Device Interfaces Using Op Can Dot Her Technologies

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

20

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 217: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Summary

SUMMARY

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 189. 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:

FactoryLink Device Interfaces Using OPC and Other Technology / 207

Page 218: Device Interfaces Using Op Can Dot Her Technologies

3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)Summary

20

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 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 197. 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).

ReadMailboxTag

Name of mailbox owned by ECI; also called Decoder or I/O Translator Mailbox referenced by non-ECI-based RAPD.

ReadDsIdxTag

Read Dataset Identifier Tag (D); also called Control Tag. Acts as both Read 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.

IntervCh/Cont

Read/Input Interval in seconds xxx/yyy.xxx=interval after I/O change 0.1...999 seconds (0=instant).yyy=continuous interval 0.1...999 seconds (option).

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 219: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Summary

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).

WriteEncArrMailboxTag

Name of mailbox owned by receiving task as for RAPD or ODX. A TagArray (A) is assigned to process Encoded Write/Outputs by standard EDI drivers using the Write IdxTag as a Block Write Trigger.

WriteDsIdxTag

Write Dataset Identifier Tag (D); also called Control Tag. Acts as both 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).

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).

WriteInterval

Command Interval 0.1..999 sec (0=instant).

FactoryLink Device Interfaces Using OPC and Other Technology / 209

Page 220: Device Interfaces Using Op Can Dot Her Technologies

3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)Summary

21

Information Table Summary

The following are definitions of the columns in the Information Table:

Read Tag,‘OPC Item

Read Tag only valid if Read Elem Addr -1(D,A,L,F) or OPC Item if 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..UB3Short=I2 SO, S1, UI2 US0, US1ShortBCD=BCD3, UBC3, UBC4Long=I4 L0, UI4 UL0, L0R (swapped)LongBCD=BCD7, UBC7, UBC8Float=R4 F0 (IEEE), FOR (swapped)FSIE G0 (Siemens Gleitpunkt)FMOT (Motorola Fast Float)Real/Double=R8 D0 (64Bit IEEE)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. ArgumentsQuality Native .QA (Ana)Quality Status .QS, Limit .QL (Ana)Quality Vendor Specific .QX (Ana)Access Rights Native .AR (Ana)Access Vendor Specific .AX (Ana)

ObjectI/O Tag

Bidirectional Object Input/Output Tag (D,A,L,F,M)

Wr CDE Write/Output Code (default=RdCDE)

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 221: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Summary

Elem Addr Write/Output Tag Addr (default -1=none)

Write Tag,‘OPC Item

Write Tag (D,A,L,F) or OPC item if preceded by a single quote.

R/W RangeFunction

Read/Input and Write/Output Range = ±3.4*1038Min ; ±3.4*1038

Max.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

AdditionalFunctions: Init I/O=Trigger: Initial Mbx Read Completion

IOChg I/O=Trigger: Any I/O Changed/UpdatedIOChgRd I/O=Trigger: Any I/O Changed/Updated by

Read/InputIOChgWr I/O=Trigger: Any I/O Changed for

Write/OutputIOUpdHalt I/O=Control: “1”=Object I/O Update HaltedIOUpdAll All I/Os updated unconditionally at Mbx

receiveIOUpd I/O updated unconditionally at Mbx receiveRdTrigg I/O=Trigger: Read Request through Write MbxRdCompl I/O=Trigger: Read Completion feedbackRdDisabl I/O=Control: “1”=Object I/O Read DisabledWrTrigg I/O=Trigger: Block or Dataset Write commandWrCompl I/O=Trigger: Write Completion feedbackWrDisabl I/O=Control: “1”=Object I/O Write DisabledWrMode=x;y Write Mode x and IMX Version y as well as ...WrType=z Write Type z in IMX protocol for certain

RAPD driversWrX Write output eXceptionally (not replaced in

cmd buffer)SegmAddr=xx All Encoded commands include Segment

Address xxMux=xx I/O=Multiplexer: Enable Read/Write if I/O=xx

FactoryLink Device Interfaces Using OPC and Other Technology / 211

Page 222: Device Interfaces Using Op Can Dot Her Technologies

3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)Summary

21

Ignore=xx I/O=Configuration: Ignore Table completely if I/O=xx

Merge Write/Output=Merged Composite Object I/OsQual Display OPC Quality infomration by I/O Status

TagLink I/O linked to other ECI Input or I/O (keep

change status)Copy Write/Output=Read/Input if Object I/O

changedEnum Write/Output=Enumerated of Read Array,

I/O=ArrayIndexTRxxx=vvv Write/Output=vvv Trigger if Object I/O = xxxDBxx.xx Deadband for I/O, xx.xx=absolute valueLNnnn ECaaa I/O=Message of nnn=1..1024 char, aaa=end

char ASCIIHEXn I/O=Message of n char containing Hex ValueARRYnnn:x:y:z I/O=Array of nnn Elem, x=Rdlncr,

y=I/O/RdElem, z=WrincrAlive=xx I/O=Link Supervision, xx=[s], I/O Status ≥

256=ΕρρορXR I/O=Reset all Statistics of this tableXP, 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)

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 223: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Summary

I/O Scale MinI/O Scale MinTag

I/O Scale MaxI/O Scale MaxTag

Scale lower and Scale upper limit, Constant or Tag (A,L,F), default:No entry=0..1000 if R/W Range validNote that OPC-specific tables use two only Tag/Constant columns.

I/O StatusTag (D,A,L,F)

0=Normal/OK1=Transient4= < Min Scale8=Low OPC16=High OPC32=> Max Scale64=Uncertain OPC128=Bad OPC256=Read Error

FactoryLink Device Interfaces Using OPC and Other Technology / 213

Page 224: Device Interfaces Using Op Can Dot Her Technologies

3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC)Terms

21

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.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 225: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Terms

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-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.

FactoryLink Device Interfaces Using OPC and Other Technology / 215

Page 226: Device Interfaces Using Op Can Dot Her Technologies

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

21

PROGRAM ARGUMENTS

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):

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 227: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Program 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

-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“.

Argument Description

FactoryLink Device Interfaces Using OPC and Other Technology / 217

Page 228: Device Interfaces Using Op Can Dot Her Technologies

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

21

# –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):# –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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 229: Device Interfaces Using Op Can Dot Her Technologies

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

INFORMATION AND ERROR MESSAGES

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 shutdownInformation when task has been stopped normally.

PROG_RUNNING ECI running with %u Tags, %u Mbx TagsNormal 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 startingStartup 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 shutdownThere is no configuration information to process.

ACE_INV_AUTHORIZATION #002 No Authorization: Shutdown by timeoutECI is not authorized for unlimited run time.

ACE_DRV_NOT_INSTALLED #003 Driver not installed: Shutdown by timeoutA driver may not be installed; reinstall ECI.

ACE_RESTART_PREVENTED #005 Restart prevented: Shutdown FL firstYou cannot restart ECI after a shutdown by timeout – you must stop FactoryLink first.

FLOAT_VAL_WRONG #010 Invalid Float in assembled Read/InputThe assembled data does not represent a Float value.

ARY_MBX_WRITE_BUF_FULL #011 Object I/O causes Output Buffer overflowToo 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: %sYou must enter a correct value, for example hexadecimal.

FactoryLink Device Interfaces Using OPC and Other Technology / 219

Page 230: Device Interfaces Using Op Can Dot Her Technologies

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

22

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.

SCAL_MIN_MAX_EQ #013 I/O Range zero: ScaleMin=ScaleMax=%lfScaled range turned or set to zero.

RCV_MBX_NOT_IN_RANGE #020 Table %s: Rd Mbx data range missmatch lData in Mailbox does not match configuration (suppress message with –WRMbx=2).

RCV_MBX_ERROR #021 Table %s: Message from Driver: %d=0x%04X %s lA 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 lRAPD Driver may be configured erroneously (suppress messages with –WRMbx=2).

RCV_MBX_ERR_DATALEN #024 Wrong “ErrorDataLength” in Mailbox %03d:%05d received %d lIncorrect 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=%dAn 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.

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 231: Device Interfaces Using Op Can Dot Her Technologies

ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3Information 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 221

Page 232: Device Interfaces Using Op Can Dot Her Technologies

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

22

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 fileFor proper configuration, see Program Arguments.

ARY_INP/OUT_CDE_OVERFLOW #201 ARY parameter “IOs per Elem” too largeI/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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 233: Device Interfaces Using Op Can Dot Her Technologies

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

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

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 TagArrayFor proper configuration, see ECI Control and Information Tables.

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

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

FactoryLink Device Interfaces Using OPC and Other Technology / 223

Page 234: Device Interfaces Using Op Can Dot Her Technologies

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

22

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 235: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 4

FLGEM

OVERVIEW

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 PORT DEFINITION TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Port Definition.

Field Descriptions

Logical Port Enter a number to represent a particular communication path to a FLGEM device.

Valid Entry: 0 - 999 (default = 0)

SECS/HSMS Specify whether to use the SECS RS232 or HSMS protocol for communication.

Valid Entry: HSMSSECS

Com Port Specify COM port for SECS protocol. Required for SECS.

Valid Entry: 1 - 8

FactoryLink Device Interfaces Using OPC and Other Technology / 225

Page 236: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Port Definition Table

22

Baud Rate Required for SECS.

Valid Entry: 1503001200240048009600 (default)19200

T1 Timeout 0.1 sec SECS T1 (inter character) timeout value. Required for SECS.

Valid Entry: 1 - 255 tenths of a second (default = 5)

T2 Timeout 0.1 sec SECS T2 (block protocol) timeout value. Required for SECS.

Valid Entry: 1 - 255 tenths of a second (default = 30)

T3 Timeout 1 sec SECS T2 Reply timeout value.

Valid Entry: 1 - 120 seconds (default = 10)

T4 Timeout 1 sec SECS T2 (inter block) timeout value. Required for SECS.

Valid Entry: 1 - 120 seconds (default = 10)

T5 Timeout 1 sec HSMS T5 Connect Separation Timer. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 10)

T6 Timeout 1 sec HSMS T6 Control Message Reply timeout value. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 20)

T7 Timeout 1 sec HSMS T7 Connect timeout value. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 10)

T8 Timeout 1 sec HSMS T8 Inter Character timeout value. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 10)

Retry Limit SECS retry limit. Required for SECS.

Valid Entry: 0 - 31 (default = 3)

ACTIVE/PASSIVE Specify whether this port is the active or passive entity. Required for HSMS.

Valid Entry: ACTIVE (MASTER)PASSIVE (SLAVE)

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 237: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Port Definition Table

HOST/EQUIP Specifies the communication role of this port.

Valid Entry: HOSTEQUIP

Protocol Specify the version of the protocol to be used.

Valid Entry: HSMS-SS94 for HSMSHSMS-94 for HSMSHSMS93 for HSMSSECS for SECS

Passive IP Address Specify the IP Address for the Passive Entity on this link. Required for HSMS.

Valid Entry: IP Address format

TCP Port Specify the TCP Port Number at which the Passive Entity waits for connection. Required for HSMS.

Valid Entry: 0 - 10000 (default = 5000)

Connection Estab 1 sec Time to wait to establish a connection. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 20)

Circuit Assurance 1 sec Specify the frequency at which control messages will be sent to verify the link is still functional. Required for HSMS.

Valid Entry: 0 - 120 seconds (default = 15)

TGRACE 1 sec Specify the time during which send operations will be accepted while attempting to establish a connection. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 10)

Memory Stall 1 sec Specify time limit to allow the other end of the link to attempt to send messages while all buffers are full. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 30)

Write Stall 1 sec Specify the time limit to wait for TCP/IP to accepts data. Required for HSMS.

Valid Entry: 1 - 120 seconds (default = 20)

Last Send Status Tag Optional tag name of a FactoryLink real-time database analog tag to which the status for the last send operation is written.

Valid Entry: tag nameValid Data Type: analog

FactoryLink Device Interfaces Using OPC and Other Technology / 227

Page 238: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Port Definition Table

22

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog.

Sample Port Definition Table Entries

Msgs Sent Counter Tag Optional tag name of a FactoryLink real-time database analog tag to which the count of messages sent is written.

Valid Entry: tag nameValid Data Type: analog

Msgs Rcvd Counter Tag Optional tag name of a FactoryLink real-time database analog tag to which the count of messages received is written.

Valid Entry: tag nameValid Data Type: analog

T3/T4 Timeout Errors Tag Optional tag name of a FactoryLink real-time database analog tag to which the count of timeout errors is written.

Valid Entry: tag nameValid Data Type: analog

Retry Counter Tag Optional tag name of a FactoryLink real-time database analog tag to which the count of retries is written.

Valid Entry: tag nameValid Data Type: analog

Status Msg Tag Optional tag name of a FactoryLink real-time database message tag to which status for this logical port is written.

Valid Entry: tag nameValid Data Type: message

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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 239: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Port Definition Table

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

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 IPAddress

Not required for SECS (RS232)

TCP Port Not required for SECS (RS232)

Connection Estab 1sec

20 Default - not required for SECS

CircuitAssurance 1sec

15 Default - not required for SECS

TGRACE 1sec 10 Default - not required for SECS

Memory Stall1sec

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 Tag

Optional

Status Msg Tag Optional

Column Entry Description

FactoryLink Device Interfaces Using OPC and Other Technology / 229

Page 240: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Device Definition Table

23

FLGEM DEVICE DEFINITION TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Port Definition > “your logical port” > FLGEM Device Definition.

Field Descriptions

When the table is complete, click the Save icon to validate the information. Define the data type (analog) for any tag names displayed in the Tag Definition dialog.

Sample Device Definition Table Entries

Error/Status Tag Name Optional tag name of a FactoryLink real-time database analog tag to which any errors for this logical station are written.

Valid Entry: tag nameValid Data Type: analog

Device Type Valid Entry: GWGEM

Device ID Number to identify the physical device.

Valid Entry: 0-32767 (default = 0)

Device State at Startup Specify the initial state of the link at startup.

Valid Entry: ON_LINE (default)OFF_LINE

Comment Optional reference information about this device.

Valid Entry: Alphanumeric string of up to 30 characters

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 241: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Variable Definitions Table

FLGEM VARIABLE DEFINITIONS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Variable Definitions.

Field Descriptions

Variable ID Number to identify the Variable

Valid Entry: 100-999999Valid Data Type: analog

Variable Name Name to identify the Variable

Valid Entry: alphanumeric string of up to 40 characters

Variable Type Identify the type of Variable.

Valid Entry: SV - Status VariableDV - Data VariableEC - Equipment ConstantDSV - Dynamic Status Variable

Variable Tag Tag to hold the value for the Variable.

Valid Entry: tag nameValid Data Type: digital

analoglong analogfloatmessage

FactoryLink Device Interfaces Using OPC and Other Technology / 231

Page 242: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Variable Definitions Table

23

Format Code Data type format of the Variable

Valid Entry: LISTBNARYBOOLNASCIIJIS8SINT8SINT1SINT2SINT4FLOT8FLOT4UINT8UINT1UINT2UINT4LBBNA (default)JS8S1S2S4F8F4U8U1U2U4

Units Optional SECS-II standard units of measure.

Valid Entry: Alphanumeric string of up to 9 characters

Length Optional data item array count. For string data types, the number of characters.

Valid Entry: 1-65535 (default = 1)

Lower Limit (min) Optional minimum boundary value for limits monitoring.

Valid Entry: Alphanumeric string of up to 15 characters

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 243: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Variable Definitions Table

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog.

Upper Limit (max) Optional maximum boundary value for limits monitoring

Valid Entry: Alphanumeric string of up to 15 characters

Limit Event ID Optional Collection Event ID to be signaled when the value of this variable crosses any Limits Monitoring boundary.

Valid Entry: 0-999999

Initial Value (default) Optional value for this Variable at startup.

Valid Entry: Alphanumeric string of up to 15 characters

Application Owned For Application Owned variables, GWGEM has to request the value of the Variable whenever it needs to 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.

Valid Entry: YES (default)NO

Private Private variables cannot be seen by the host.

Valid Entry: YES (default)NO

Host Changed EC Trigger Optional tag, for Equipment Constants only, which will be force written to one when the Variable is changed by the Host.

Valid Entry: tag nameValid Data Type: Digital

Description Optional reference information about this Variable

Valid Entry: Alphanumeric string of up to 80 characters

FactoryLink Device Interfaces Using OPC and Other Technology / 233

Page 244: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Variable Definitions Table

23

Sample FLGEM Variable Definition Table Entries

Column Entry Description

Variable ID 100 Number identifying this variable

Variable Name Var100 Name identifying this variable

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

Units Optional

Length 1 Variable consists of only one tag value

Lower Limit (min)

0 Lower limit of limit range used by Limits Monitoring

Upper Limit (max)

900 Upper limit of limit range used by Limits Monitoring

Limit Event ID 1000 Event ID which will be sent when Limits Monitoring detects a limit violation

Initial Value (default)

Optional

Application Owned

YES The value will be passed tp GWGEM only when requested by GWGEM

Private NO Variable is visible to the Host

Host Changed EC Trigger

Optional

Description Optional

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 245: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Limits Monitoring Table

FLGEM LIMITS MONITORING TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Variable Definitions > “your variable ID” > FLGEM Limits Monitoring.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Limits Monitoring Table Entries

Limit Lower DB Value of lower limit Dead Band for one limit value.

Valid Entry: Numeric string of up to 15 characters

Limit Upper DB Value of upper limit Dead Band for one limit value.

Valid Entry: Numeric string of up to 15 characters

Description Optional reference information about this Variable.

Valid Entry: Numeric string of up to 80 characters

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 Using OPC and Other Technology / 235

Page 246: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Equipment Control/Status Table

23

FLGEM EQUIPMENT CONTROL/STATUS 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

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Equipment Control/Status.

Field Descriptions

Variable ID Select one of the predefined GWGEM Status Variables or Equipment Constants.

Valid Entry: GemAlarmFileNameGemConfigAlarmsGemConfigConnectGemConfigEventsGemConstantFileNameGemDeviceNameGemEstabCommDelayGemHostIdGemInitCommStateGemInitControlStateGemPollDelayGemPPExtGemPPDirGemPPTempFileNameGemPPTocNameGemRecipeTypeGemReportFileNameGemRpTypeGemWBitS10GemWBitS5GemWBitS6GemAbortLevelGemAlarmIdGemAlarmsEnabledGemAlarmsSet

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 247: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Equipment Control/Status Table

Variable ID (cont.) Valid Entry: GemAlarmStateGemASerGemClockGemControlStateGemDataIdGemEventsEnabledGemLinkStateGemMDLNGemPPExecNameGemPPExecNameGemPreviousCeidGemPreviousCommandGemPreviousControlStateGemPreviousProcessStateGemProcessStateGemSOFTREVGemTimeGemPPChangeNameGemPPChangeStatusGemOfflineSubstateGemOnlineFailedGemOnlineSubstateGemMaxSpoolFileSizeGemMaxSpoolTransmitGemSpoolFileNameGemSpoolCountActualGemSpoolCountTotalGemSpoolFullTimeGemSpoolLoadSubstateGemSpoolStartTimeGemSpoolStateGemSpoolUnloadSubstateGemEventTextGemPPKeepSecsHeaderGemLimitsVIDGemEventLimitGemTransTypeGemLimitsDelayGemLimitsFileNameGemOverWriteSpoolGemConfigSpoolGemHostMessageLimit

FactoryLink Device Interfaces Using OPC and Other Technology / 237

Page 248: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Equipment Control/Status Table

23

Variable ID (cont.) Valid Entry: GemSharedMemorySizeGemDynamicDataLimitGemTermReqSendMaxGemTermReqRecvMaxGemPrimaryMessageLimitControl_GoOnlineControl_GoOfflineControl_GoRemoteControl_GoLocal Control_EnableControl_Disable

Variable Write/Control Tag Tag containing the data to be written to the Equipment Constant or Status Variable.

Valid Entry: tag nameValid Data Type: Digital

AnalogLong AnalogFloatMessage

Variable Read Tag Tag to receive the data to be read from the Equipment Constant or Status Variable.

Valid Entry: tag nameValid Data Type: Digital

AnalogLong AnalogFloatMessage

Initial Value (default) Optional value for this Equipment Constant or Status Variable at startup.

Valid Entry: Alphanumeric string of up to 15 characters

Host Changed EC Trigger Optional tag, for Equipment Constants only, which will be force written to one when the Variable is changed by the Host.

Valid Entry: tag nameValid Data Type: Digital

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 249: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Equipment Control/Status Table

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Equipment Control/Status Table Entries

GWGEM Status ReadTrigger

Trigger tag which when force written to one will cause the Equipment Constant or Status Variable data to be read into Variable Read tag.

Valid Entry: tag nameValid Data Type: Digital

Description (optional) reference information about this Equipment Constant or Status Variable.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

Variable ID GemLinkState ID of the Equipment Constant or Status Variable to be read from or written to

Variable Write/ Control Tag

Not used in this case

Variable Read Tag LinkState Name of the FactoryLink tag into which the value of the Variable is written

Initial Value (default)

Optional

Host Changed EC Trigger

Optional

GWGEM Status Read Trigger

sec1 The variable will be read every second and its value stored in the Variable Read Tag

Description Optional

FactoryLink Device Interfaces Using OPC and Other Technology / 239

Page 250: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Collection Events Table

24

FLGEM COLLECTION EVENTS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Collection Events.

Field Descriptions

Event ID Number to identify the Collective Event

Valid Entry: 100-999999

Event Name Name to identify the Collection Event.

Valid Entry: Alphanumeric string of up to 40 characters

Monitor Tag Optional Tag whose value is to be monitored and which will generate this collection event when it meets certain conditions.

Valid Entry: tag nameValid Data Type: Digital

AnalogLong AnalogFloatMessage

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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 251: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Collection Events Table

When the table is complete, click on the Save icon to validate the information.

Monitor Condition Condition used to compare the value of the Monitor Tag 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: OFFONTGL==__TGL<><>_TGL>>__TGL>=>=_TGL<>__TGL<=<=_TGL

*Monitor Value The tag or constant value against which the Monitor Tag value is compared.

Valid Entry: tag name or alphanumeric string of up to 16 characters

Valid Data Type: DigitalAnalog (Default)Long AnalogMessage

Event Disable Tag When the value of this tag is equal to one the Monitor Condition will not be evaluated.

Valid Entry: tag name

Valid Entry: Digital

Description Optional reference information about this Collection Event.

Valid Entry: Alphanumeric string of up to 80 characters

FactoryLink Device Interfaces Using OPC and Other Technology / 241

Page 252: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Collection Event Reports Table

24

Sample FLGEM Collection Event Table Entries

FLGEM COLLECTION EVENT REPORTS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Collection Events > “event ID” > FLGEM Collection Event Reports.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Collection Event Reports 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 FactoryLink tag which will 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

Report ID Number of a report to be sent when the associated Collection Event is triggered.

Valid Entry: 0 - 999999

Description Optional reference information about this Report.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

Report ID 100 Report to send when the Collection Event is triggered

Description Optional

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 253: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Alarms Table

FLGEM ALARMS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Port & Variable Definition > FLGEM Alarms.

Field Descriptions

Alarm ID Number to identify the Alarm.

Valid Entry: 0 - 999999

Alarm Name Name to identify the Alarm.

Valid Entry: Alphanumeric string of up to 40 characters

Alarm Code (1 -127) A number to indicate the severity of the alarm.

Valid Entry: 1 - 127 (default = 1)

Alarm Trigger Tag When this tag is force written to one this alarm will be sent.

Valid Entry: tag name Valid Data Type: Digital

Alarm Disable Tag Optional tag that disables the sending of this alarm.

Valid Entry: tag name Valid Data Type: Digital

*Alarm Text Tag or text constant to describe the alarm which will be sent with the alarm message.

Valid Entry: tag name or alphanumeric string of up to 40 characters

Valid Data Type: Message

Alarm ON Event ID Collection Event which will be triggered when this alarm goes from OFF to ON.

Valid Entry: 0 - 999999

Alarm OFF Event ID Collection Event which will be triggered when this alarm goes from ON to OFF.

Valid Entry: 0 - 999999

Description Optional reference information about this Alarm.

Valid Entry: Alphanumeric string of up to 80 characters

FactoryLink Device Interfaces Using OPC and Other Technology / 243

Page 254: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Alarms Table

24

When the table is complete, click on the Save icon to validate the information.

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-127) 1 Alarm priority

Alarm Trigger Tag alarm_trig FactoryLink tag which when force written to one will cause this alarm to be sent to the Host

Alarm Disable Tag Optional

*Alarm Text Alarm 100 Alarm text sent to the Host

Alarm ON Event ID 100 Event 100 will be triggered when this alarm goes to the ON state

Alarm OFF Event ID

110 Event 110 will be triggered when this alarm returns to the OFF state

Description Optional

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 255: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Event Reports Table

FLGEM EVENT REPORTS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Event Reports.

Field Descriptions

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog.

Sample FLGEM Event Reports Table Entries

Report ID Number to identify the Report

Valid Entry: 0 - 999999

Description Optional reference information about this Report.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

Report ID 100 Number to identify this report

Description Optional

FactoryLink Device Interfaces Using OPC and Other Technology / 245

Page 256: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Report Detail Table

24

FLGEM REPORT DETAIL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Event Reports > “our report ID” > FLGEM Report Detail.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Report Detail Table Entries

Variable ID ID number of a Variable which will be part of this Report.

Valid Entry: 0 - 999999

Description Optional reference information about this Variable.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

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

Description Optional

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 257: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Trace Reports Table

FLGEM TRACE REPORTS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Trace Reports.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Trace Reports Table Entries

Trace ID Number to identify the Trace Report

Valid Entry: 0 - 999999

Trace Trigger Tag which when force written to one will cause a Trace to be initiated by simulating a S2F23 message.

Valid Entry: tag nameValid Data Type: Digital

Sample Period (HHMMSS) Data Sample Period which defines how often the trace data is logged.

Valid Entry: Numeric string of up to 6 charactersValid Data Type: HHMMSS

Total Number of Samples Total number of samples to be taken.

Valid Entry: 1 - 999999 (default = 1)

Reporting Group Size Specifies how many sets of data should be collected before sending the S6F1 (Trace Data Send) message.

Valid Entry: 1 - 999999 (default = 1)

Description Optional reference information about this Trace Report.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

Trace ID 1 Number to identify this trace report

Trace Trigger trace_trig FactoryLink tag which when force written to one will initiate this trace report

FactoryLink Device Interfaces Using OPC and Other Technology / 247

Page 258: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Trace Detail Table

24

FLGEM TRACE DETAIL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Trace Reports > “your traceID” > FLGEM Trace Detail.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Trace Detail Table Entries

Sample Period (HHMMSS)

000015 Data will be sampled every 15 seconds

Total Number of Samples

2 Two samples will be taken before the trace operation is terminated

Reporting Group Size

1 Trace report is sent after one set of samples has been collected

Description Optional

Column Entry Description

Variable ID ID number of a Variable which will be part of this Trace Report.

Valid Entry: 0 - 999999

Description Optional reference information about this Variable.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

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

Description Optional

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 259: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Remote Commands Table

FLGEM REMOTE COMMANDS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Remote Commands.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Remote Command Table Entries

Remote Command Name of the Remote Command.

Valid Entry: Alphanumeric string of up to 30 characters

Remote Command TriggerTag

Optional Tag which will be force written to one when the Remote Command has been received and validated.

Valid Entry: tag nameValid Data Type: Digital

Command Disable Tag Optional Tag which, if set to one, will prevent the Remote Command from being processed.

Valid Entry: tag nameValid Data Type: Digital

Description Optional reference information about this Remote Command.

Valid Entry: Alphanumeric string of up to 80 characters

Column Entry Description

Remote Command START Name of the remote command

Remote Command Trigger Tag

start_trig FactoryLink tag which will be force written to one when this command and its parameters are correctly received

Command Disable Tag

Optional

Description Optional

FactoryLink Device Interfaces Using OPC and Other Technology / 249

Page 260: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Remote Commands Detail Table

25

FLGEM REMOTE COMMANDS DETAIL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definitions > FLGEM Remote Commands > “your remote command” > FLGEM Remote Command Detail.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Remote Command Table Entries

Parameter Name Name of the parameter.

Valid Entry: Alphanumeric string of up to 30 characters

Parameter Value Tag Optional Tag into which the parameter value is to be stored.

Valid Entry: tag nameValid Data Type: Analog

Force Determine whether the Parameter Value Tag is to be force written.

Valid Entry: YES (default)NO

Parameter Min Limit Optional numeric limit to which the parameter value will be compared. If the parameter is less than this value the Remote Command will not be accepted.

Valid Entry: Alphanumeric string of up to 8 characters

Parameter Max Limit Optional numeric limit to which the parameter value will be compared. If the parameter is greater than this value the Remote Command will not be accepted.

Valid Entry: Alphanumeric string of up to 8 characters

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 261: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Terminal Messages Table

FLGEM TERMINAL MESSAGES TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Message Detail.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Terminal Messages Table Entries

Terminal ID Enter a number to identify the Terminal.

Valid Entry: 0 - 255

Recv Message Tag Optional message tag array which will hold received terminal text messages.

Valid Entry: tag nameValid Data Type: Message

Number of Lines Number of tags in the Recv Message Tag array.

Valid Entry: 1 - 255

Recv Trigger Tag Optional Tag which will be force written to one when a terminal message has been received.

Valid Entry: tag nameValid Data Type: Digital

Description Optional reference information about this Terminal.

Valid Entry: Alphanumeric string of up to 80 characters

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

FactoryLink Device Interfaces Using OPC and Other Technology / 251

Page 262: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Message Detail Table

25

FLGEM MESSAGE DETAIL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Report Definition > FLGEM Message Detail > “your terminal ID” > FLGEM Message Detail.

Field Descriptions

When the table is complete, click the Save icon to validate the information.

Sample FLGEM Message Detail Table Entries

Send Message Tag Message tag array which will hold terminal text messages to be sent to the host.

Valid Entry: tag nameValid Data Type: Message

Send Trigger Tag Tag which when force written to one will cause the Send Message Tag text to be sent to the host.

Valid Entry: tag nameValid Data Type: Digital

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 263: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM SECS-II Message Definition Control Table

FLGEM SECS-II MESSAGE DEFINITION CONTROL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Custom Message Definition > SECS-II Message Definition Control.

Field Descriptions

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog.

Sample SECS-II Message Definition Control Entries

SECS-II Table ID Number to identify the Message Definition Table

Valid Entry: 0 - 32767

Comment Optional reference information about this Message Definition Table.

Valid Entry: Alphanumeric string of up to 30 characters

Column Entry Description

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

Comment Optional

FactoryLink Device Interfaces Using OPC and Other Technology / 253

Page 264: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM SECS-II Message Definition Information Table

25

FLGEM SECS-II MESSAGE DEFINITION INFORMATION TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Custom Message Definition > SECS-II Message Definition Control > “your SECS-II table ID’ > SECS-II Message Definition Information.

Field Descriptions

Tag Name Tag updated as a result of a READ message or used a source of data for a WRITE message. On WRITE, if no tag is specified the Data Item will be sent with a value of 0. On READ, if no tag is specified the Data Item will not be stored.

Valid Entry: tag nameValid Data Type: Digital

AnalogLong AnalogFloatMessage

Read/Write Specify the message type. BOTH defines the message for both READ and WRITE activity. INQGN will result in an Inquire/Grant transaction. For INQGN, the value in “Constant” specifies the function number of the data message, the stream and message ID for the data message will be the same as the Inquire message.

Required on the first line of a message definition.

Valid Entry: READWRITEBOTHINQGN (Inquire/Grant)

Stream Decimal Stream number for the message to be sent or received. Required on the line which specifies READ, WRITE, BOTH or INQGN.

Valid Entry: 0 - 255

Function Decimal Function number for the message to be sent or received. Required on the line which specifies READ , WRITE, BOTH or INQGN.

Valid Entry: 0 - 255

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 265: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM SECS-II Message Definition Information Table

Message ID Message number for the message to be sent or received. If used, must be on the line which specifies READ, WRITE, BOTH or INQGN.

Valid Entry: 0 - 999

Item Type Specify the data item. For additional details of FN_XX and CONXX item types see the Technical Notes section.

Valid Entry: LISTBNARYBOOLNASCIIJIS8SINT8SINT1SINT2SINT4FLOT8FLOT4UINT8UINT1UINT2UINT4FNAME - File Name for READNOBDYFSIZEFN_B - File Name for WRITE, send data as bytesFN_A - File Name for WRITE, send data as ASCIIFN_I1 - File Name for WRITE, send data as SINT1FN_I2 - File Name for WRITE, send data as SINT2FN_I4 - File Name for WRITE, send data as SINT4FN_I8 - File Name for WRITE, send data as SINT8FN_U1 - File Name for WRITE, send data as UINT1FN_U2 - File Name for WRITE, send data as UINT2FN_U4 - File Name for WRITE, send data as UINT4

FactoryLink Device Interfaces Using OPC and Other Technology / 255

Page 266: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM SECS-II Message Definition Information Table

25

Item Type (Cont.) Valid Entry: FN_U8 - File Name for WRITE, send data as UINT8CONI2 - Conditional item type SINT2CONU2 - Conditional item type UINT2CONI4 - Conditional item type SINT4CONU4 - Conditional item type UINT24CONAS - Conditional item type ASCII

Number Optional number used as an item count for non-ASCII data item and a byte count for ASCII data items. For specific usage see the Technical Notes section.

Valid Entry: 0 - 32767 for READ items0 - 255 for WRITE items

Constant Optional character string used in conjunction with some data items. For specific usage see the Technical Notes section.

Valid Entry: Alphanumeric string of up to 15 characters

Parse Position Optional character string used to identify the position of a data item in a message. For specific usage see the Technical Notes section.

Valid Entry: Alphanumeric string of up to 15 characters

Reply Optional. Specify whether a primary message requires a response or not. DELIVR can be used on primary or secondary messages and requires acknowledgment of message delivery only.

Valid Entry: NOYESDELIVRWAIT

Auto Read Disable Optional. If ‘YES’ and a Read Disable Tag is specified for this 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’.

Valid Entry: NOYES

Parse Optional. Specify whether to process all data items or parse out data items to be processed in a READ message. If ‘YES’, it must appear on the same line with the READ.

Valid Entry: NOYES

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 267: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM SECS-II Message Definition Information Table

When the table is complete, click the Save icon to validate the information.

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 Position Optional

FactoryLink Device Interfaces Using OPC and Other Technology / 257

Page 268: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM SECS Read/Write Control Table

25

FLGEM SECS READ/WRITE CONTROL TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Custom Message Definition > SECS-II Read/Write Control.

Field Descriptions

SECS-II Table ID Number of the table defined in the SECS-II Message Definition Control Table.

Valid Entry: 0 - 32767

Send Stream Number Tag name of a FactoryLink real-time database analog tag which defines the stream number of the message to be sent.

Valid Entry: tag nameValid Data Type: analog

Send Function Number Tag name of a FactoryLink real-time database analog tag which defines the function number of the message to be sent.

Valid Entry: tag nameValid Data Type: analog

Send Message ID Tag name of a FactoryLink real-time database analog tag which defines the message ID of the message to be sent.

Valid Entry: tag nameValid Data Type: analog

Send Trigger Digital tag whose value, when forced to 1 (ON), initiates a send of the message defined by the stream, function and message ID tags.

Valid Entry: tag nameValid Data Type: digital

Send Disable Digital tag whose value, when 1 (ON), disables a triggered send of the device(s) message specified in this table.

Valid Entry: tag nameValid Data Type: digital

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 269: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM SECS Read/Write Control Table

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog

Send State Tag name of a FactoryLink real-time database digital tag whose value is 0 (OFF) when a triggered send of the tags specified in this table is in progress and 1 (ON) when the table is inactive.

Valid Entry: tag nameValid Data Type: digital

Send Status Tag name of a FactoryLink real-time database analog tag to which the status for the last send operation for this table is written.

Valid Entry: tag nameValid Data Type: analog

Receive Stream Number Tag name of a FactoryLink real-time database analog tag to which the stream number of the last message received is written.

Valid Entry: tag nameValid Data Type: analog

Receive Function Number Tag name of a FactoryLink real-time database analog tag to which the function number of the last message received is written.

Valid Entry: tag nameValid Data Type: analog

Receive Message ID Tag name of a FactoryLink real-time database analog tag to which the message ID number of the last message received is written.

Valid Entry: tag name

Valid Entry: analog

Receive Status Tag name of a FactoryLink real-time database analog tag to which the status for the last receive for this table is written.

Valid Entry: tag nameValid Data Type: analog

Read Disable Digital tag whose value, when 1 (ON), prevents the logical device from being polled for received messages.

Valid Entry: tag nameValid Data Type: digital

FactoryLink Device Interfaces Using OPC and Other Technology / 259

Page 270: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM SECS Read/Write Control Table

26

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 Number

send_stream FactoryLink tag to hold the stream number of a message to be sent

Send Function Number

send_function FactoryLink tag to hold the function number of a message to be sent

Send Message ID send_msg_id FactoryLink tag to hold the message id of a message to be sent

Send Trigger send_trig FactoryLink 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 Number

Optional

Receive Function Number

Optional

Receive Message ID

Optional

Receive Status Optional

Read Disable Optional

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 271: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Process Programs Table

FLGEM PROCESS PROGRAMS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Process Programs & Data Sets > FLGEM Process Programs.

Field Descriptions

Upload/Download PPID Tag Tag to hold the PPID of a Process Program to uploaded or downloaded by the Equipment.

Valid Entry: 0 - 32767Valid Data Type: message

Upload Trigger Tag Digital tag whose value, when force to 1 (ON), initiates an upload of the PPID defined by the Upload/Download PPID tag.

Valid Entry: tag nameValid Data Type: digital

Download Trigger Tag Digital tag whose value, when forced to 1 (on), initiates a download of the PPID defined by the Upload/Download PPID tag.

Valid Entry: tag nameValid Data Type: digital

Upload/Download Complete Tag name of a FactoryLink real-time database digital tag whose value is force written to one when an Upload or Download is complete.

Valid Entry: tag nameValid Data Type: digital

PPID Downloaded fromHost

Tag which will hold the PPID of a Process Program whose download was initiated by the Host.

Valid Entry: tag nameValid Data Type: message

FactoryLink Device Interfaces Using OPC and Other Technology / 261

Page 272: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Process Programs Table

26

Host Download Complete Tag name of a FactoryLink real-time database digital tag whose value is force written to one when a Host initiated Download is complete.

Valid Entry: tag nameValid Data Type: digital

Currently Executing PPID Tag to hold the PPID of the currently executing Process Program.

Valid Entry: tag nameValid Data Type: message

PPID List Tags Array of Message tags to hold the PPIDs stored on the equipment.

Valid Entry: tag nameValid Data Type: message

# of PPIDs to List Tag to specify the number of PPIDs the PPID List Tag array can hold.

Valid Entry: tag nameValid Data Type: analog

Starting PPID Tag to hold the number of the first PPID to store in the PPID List Tag Array.

Valid Entry: tag nameValid Data Type: analog

List PPID Trigger Digital tag whose value, when forced to 1 (on), initiates a listing of the PPIDs

Valid Entry: tag nameValid Data Type: digital

# of PPIDs Read Tag to specify the number of PPIDs actually read. A number less than the number of PPIDs to List indicates that the whole directory has been read.

Valid Entry: tag nameValid Data Type: analog

Delete PPID Tag to hold the PPID of a Process Program to be deleted from the equipment.

Valid Entry: tag nameValid Data Type: analog

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 273: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Process Programs Table

Delete PPID Trigger Digital tag whose value, when forced to 1 (ON), causes the Process Program identified in the Delete PPID tag to be deleted.

Valid Entry: tag nameValid Data Type: digital

Keep SECS Header Determines whether the Process Program file will contain the SECS-II Data Item Header.

Valid Entry: YESNO (default)

Temp File Name Name (including path) of the file to be used by GWGEM for temporary storage of Process Programs during Uploads and Downloads. If lank, the default will be PPDIR/TMP_BODY

Valid Entry: tag nameValid Data Type: digital

TOC File Name Name (including path) of the file to be used by GWGEM to maintain a Table of Contents for the Process Program library. If blank, the default will be PPTOC.

Valid Entry: alphanumeric string of up to 40 characters

PPID File Extension The file name extension which GWGEM will append to the file name for each Process Program. If blank, default will be BDY.

Valid Entry: alphanumeric string of up to 8 characters

PPID File Directory The name of a directory in which GWGEM will sort all Process Program Files. If blank, the default will be PPDIR.

Valid Entry: alphanumeric string of up to 40 characters

Verify PPID Trigger Digital tag whose value, when forced to 1 (ON), causes the CML PPID Verify routine to verify the Process Program identified in the Verify PPID tag.

Valid Entry: alphanumeric string of up to 40 characters

Verify PPID Tag to hold the PPID of the Process Program to be verified

Valid Entry: tag nameValid Data Type: message

Verify Complete Status Tag to be force written by the PPID Verify routine to indicate

Valid Entry: tag nameValid Data Type: analog

FactoryLink Device Interfaces Using OPC and Other Technology / 263

Page 274: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Process Programs Table

26

When the table is complete, click the Save icon to validate the information. Define the data type for any tag names displayed in the Tag Definition dialog.

Create PPID Trigger Digital tag whose value, when forced to 1 (ON), causes the Process Program identified in the Create/Modify PPID tag to be added to the Process Program Library.

Valid Entry: tag nameValid Data Type: digital

Modify PPID Trigger Digital tag whose value, when forced to 1 (ON), causes the Process Program identified in the Create/Modify PPID tag to be allowed to be modified.

Valid Entry: tag nameValid Data Type: digital

Create/Modify PPID Tag to hold the PPID of the Process Program to be created (added) or modified (edited).

Valid Entry: tag nameValid Data Type: message

Modify Go/NoGo Tag to indicate whether the Process Program identified in the Create/Modify PPID tag may be modified (edited).

Valid Entry: tag nameValid Data Type: analog

message

Modify Done Digital tags whose value, when forced to 1 (ON), notifies FLGEM that the Process Program identified in the Create/Modify PPID tag has been modified and can be returned to the Process Program Library.

Valid Entry: tag nameValid Data Type: digital

Create/Modify Status Tag to indicate the completion status of a Create or Modify operation.

Valid Entry: tag nameValid Data Type: analog

message

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 275: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Process Programs Table

Sample FLGEM Process Program Table Entries

Column Entry Description

Upload/Download PPID Tag

proc_name FactoryLink tag holding the ID of the Process Program to be uploaded or downloaded

Upload Trigger Tag upload_proc FactoryLink 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 Tag

download_proc FactoryLink tag which when force written to one will cause the process program identified by the above PPID tag to be downloaded from the host

Upload/Download Complete

pxfer_compl FactoryLink tag which will be force written to one when the upload or download is complete

PPID Downloaded from Host

host_ppid FactoryLink tag which will hold the ID of a process program downloaded through a host initiated download

Host Download Complete

host_compl FactoryLink tag which will be force written to one when the host initiated download is complete

Currently Executing PPID

executing_ppid FactoryLink tag which contains the ID of the currently executing process program

PPID List Tags ppid_list[0] FactoryLink tag array which will hold the IDs of the process programs currently stored on the equipment

# of PPIDs to List ppids_to_read FactoryLink tag holding the size of the above tag array

List PPID Trigger list_ppid FactoryLink tag which when force written to one will cause the PPIDs to be written to the above tag array

# of PPIDs Read ppids_read FactoryLink tag which will hold the actual number of PPIDs read into the above tag array

Delete PPID proc_delete_name FactoryLink tag to hold the ID of a process program to be deleted from the equipment

Delete PPID Trigger delete_proc FactoryLink tag which when force written to one will cause the PPID stored in the above tag to be deleted

FactoryLink Device Interfaces Using OPC and Other Technology / 265

Page 276: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Process Programs Table

26

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 Extension Optional

PPID File Extension Optional

PPID File Directory Optional

Verify PPID Trigger verify_trigger FactoryLink tag force written to one by FLGEM when a Process Program has been downloaded. Used to trigger a CML or IML function to verify the program.

Verify PPID verify_ppid FactoryLink tag which holds the path and file name of the downloaded Process Program for use by the CML/IML verify routine.

Verify Complete Status

verify_compl FactoryLink tag which will be force written by the CML/IML verify routine to indicate the verify status to FLGEM.

Create PPID Trigger new_ppid_trigger FactoryLink tag which will be force written to one by the application program to notify FLGEM to add the Process Program identified in the Create/Modify PPID tag to the Process Program Library.

Modify PPID Trigger modify_ppid_trig FactoryLink tag which will be force written to one by the application program to notify FLGEM of the users desire to modify the Process Program identified in the Create/Modify PPID tag.

Create/Modify PPID ppid_name FactoryLink tag which will contain the PPID of the Process Program to be added or modified.

Modify Go/NoGo modify_ok FactoryLink 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.

Column Entry Description

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 277: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Data Sets Table

FLGEM DATA SETS TABLE

Accessing

In your server application, open Device Interfaces > FLGEM Process Programs & Data Sets > FLGEM Data Sets.

Field Descriptions

Modify Done modify_done_trig FactoryLink 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 Status ppid_status FactoryLink tag which will be force written by FLGEM to indicate the status of the Create or Modify operation.

Upload/Download DS NameTag

Tag to hold the DS Name to uploaded or downloaded by the Equipment.

Valid Entry: tag nameValid Data Type: message

Upload/Download FileName Tag

Tag to hold a File Name to uploaded or downloaded by the Equipment.

Valid Entry: tag nameValid Data Type: message

Upload Trigger Tag Digital tag shoe value, when force to 1 (ON), initiates an upload of the DS or File defined by the Upload/Download DS Name or File Name tag.

Valid Entry: tag nameValid Data Type: digital

Column Entry Description

FactoryLink Device Interfaces Using OPC and Other Technology / 267

Page 278: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMFLGEM Data Sets Table

26

When the table is complete, click the Save icon to validate the information, Define the data type for any tag names displayed in the Tag Definition dialog.

Download Trigger Tag Digital tag whose value, when forced to 1 (ON), initiates a download of the DS or File defined by the Download DS Name or File Name tag.

Valid Entry: tag nameValid Data Type: digital

Upload/Download Complete Tag name of a FactoryLink real-time database digital tag whose value is force written to one when an Upload or Download is complete.

Valid Entry: tag nameValid Data Type: digital

DS Downloaded from Host Tag which will hold the Name of a Data Set whose download was initiated by the Host

Valid Entry: tag nameValid Data Type: message

File Name for DS from HostTag

Tag which will hold the File Name assigned to a Data Set whose download was initiated by the Host.

Valid Entry: tag nameValid Data Type: message

Host Download Complete Tag name of a FactoryLink real-time database digital tag whose value is force written to one when a Host initiated Download is complete.

Valid Entry: tag nameValid Data Type: digital

Reset Trigger Tag Digital tag whose value, when force to 1 (ON), cancels any Uploads or Downloads in progress.

Valid Entry: tag nameValid Data Type: digital

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 279: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4FLGEM Data Sets Table

Sample FLGEM Data Sets Table Entries

Column Entry Description

Upload/Download DS Name Tag

ds_name FactoryLink tag holding the name of the Data Set to be uploaded or downloaded

Upload/Download File Name Tag

ds_file_name FactoryLink tag holding the file name of the Data Set to be uploaded or downloaded

Upload Trigger Tag upload_ds FactoryLink 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 Tag

download_ds FactoryLink tag which when force written to one will cause the DS identified by the above DS Name or File Name tag to be downloaded from the host

Upload/Download Complete

xfer_compl FactoryLink tag which will be force written to one when the upload or download is complete

DS Downloaded from Host

Optional

File Name for DS from Host Tag

Optional

Host Download Complete

Optional

Reset Trigger Tag reset_ds FactoryLink tag which when force written to one will cause active DS transfers to be aborted

FactoryLink Device Interfaces Using OPC and Other Technology / 269

Page 280: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

27

TECHNICAL NOTES

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 Position' field.

The following example illustrates ‘Parse Position’ terms for a sample message (similar to S6,F3):

Message Structure Parse Position String

L, 3 1UINT4 1.1:UINT4 1.2:L, 1 1.3

L, 2 1.3.1UINT4 1.3.1.1:L, 7 1.3.1.2

ASCII, 40 1.3.1.2.1:10,20 Start with character 10, store 20ASCII, 40 1.3.1.2.2:,40 Store first 40 charactersASCII, 40 1.3.1.2.3:10 Start at character 10, store rest of stringASCII, 40 1.3.1.2.4: Store whole stringUINT4 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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 281: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical 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

Repeat blocks can have embedded repeat blocks.

FactoryLink Device Interfaces Using OPC and Other Technology / 271

Page 282: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

27

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 283: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

‘Constant’ data does not match the data received, none of the message data will be stored.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 273

Page 284: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

27

System Specific

Installation

WINDOWS 2000/XP/2003

Install the GWA SDR driver

Install the GWA GWGEMpackage

Set GWASDRDIRto the SDR directory or use the /s command line argument

Set GWAGEMDIRto the GWGEMdirectory or use the /g command line argument

Command Line Arguments

/v1, /v2, /v3 - various levels of debug output

/l - writes debug output to FLGEM.LOG

/s - overrides the GWASDRDIR environment variable

/g - overrides the GWAGEMDIR environment variable

/c - clean start - causes all non volatile storage to be deleted and re initialized

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 = 0name = ""units = ""writeable = FALSE

constant fixup GemConfigAlarms = <U1 0>vid = 1name = "CONFIGALARMS"

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 285: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

units = ""min = <U1 0>max = <U1 2>default = <U1 0>writeable = FALSE

constant fixup GemConfigConnect = <U1 2>vid = 2name = "CONFIGCONNECT"units = ""min = <U1 0>max = <U1 2>default = <U1 2>writeable = FALSE

constant fixup GemConfigEvents = <U1 1>vid = 3name = "CONFIGEVENTS"units = ""min = <U1 0>max = <U1 1>default = <U1 1>writeable = FALSE

constant fixup private GemConstantFileName = <A "CONST.LOG">vid = 4name = ""units = ""writeable = FALSE

constant fixup GemDeviceName = <A "DeviceName">vid = 5name = "DEVICENAME"units = ""writeable = FALSE

constant fixup GemEstabCommDelay = <U2 20>vid = 6name = "ESTABLISHCOMMUNICATIONSTIMER"units = "s"min = <U2 0>

FactoryLink Device Interfaces Using OPC and Other Technology / 275

Page 286: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

27

max = <U2 1800>default = <U2 20>writeable = TRUE

constant fixup private GemHostId = <U2 0>vid = 7name = ""units = ""default = <U2 0>writeable = TRUE

constant fixup GemInitCommState = <U1 1>vid = 8name = "INITCOMMSTATE"units = ""min = <U1 0>max = <U1 1>default = <U1 1>writeable = TRUE

constant fixup GemInitControlState = <U1 2>vid = 9name = "INITCONTROLSTATE"units = ""min = <U1 1>max = <U1 2>default = <U1 2>writeable = TRUE

constant fixup GemPollDelay = <U2 30>id = 10name = "HEARTBEAT"units = "s"min = <U2 0>max = <U2 1800>default = <U2 30>writeable = TRUE

constant fixup private GemPPExt = <A "BDY">vid = 11

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 287: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

name = ""units = ""writeable = TRUE

constant fixup private GemPPDir = <A "PPDIR">vid = 12name = ""units = ""writeable = FALSE

constant fixup private GemPPTempFileName = <A "ppdir\\temp">vid = 13name = ""units = ""writeable = FALSE

constant fixup private GemPPTocName = <A "PPTOC">vid = 14name = ""units = ""writeable = FALSE

constant fixup private GemRecipeType = <U1 S2_B>vid = 15name = ""units = ""default = <U1 S2_B>writeable = FALSE

constant fixup private GemReportFileName = <A "REPORT.LOG">vid = 16name = ""units = ""writeable = FALSE

constant fixup GemRpType = <BOOLEAN false>vid = 17name = "RPTYPE"units = ""default = <BOOLEAN false>

FactoryLink Device Interfaces Using OPC and Other Technology / 277

Page 288: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

27

writeable = TRUE

constant fixup GemWBitS10 = <U1 0>vid = 18name = "WBITS10"units = ""min = <U1 0>max = <U1 1>default = <U1 0>writeable = TRUE

constant fixup GemWBitS5 = <U1 1>vid = 19name = "WBITS5"units = ""min = <U1 0>max = <U1 1>default = <U1 1>writeable = TRUE

constant fixup GemWBitS6 = <U1 1>vid = 20name = "WBITS6"units = ""min = <U1 0>max = <U1 1>default = <U1 1>writeable = TRUE

status fixup GemAbortLevel = <U1 0>vid = 21name = "ABORTLEVEL"units = ""writeable = FALSE

status fixup GemAlarmId = <U4 0>vid = 22name = "ALARMID"units = ""writeable = FALSE

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 289: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

status fixup GemAlarmState = <U1 0>vid = 25name = "ALARMSTATE"units = ""writeable = FALSE

status fixup GemASer = <U4 0>vid = 26name = "ALARMSERIAL"units = ""writeable = FALSE

status fixup GemClock vid = 27name = "CLOCK"units = "cs"writeable = TRUE

status fixup GemControlState vid = 28name = "CONTROLSTATE"units = ""writeable = FALSE

status fixup GemDataId = <U4 0>vid = 29name = "DATAID"units = ""writeable = FALSE

status fixup GemLinkState vid = 31name = "LINKSTATE"units = ""writeable = FALSE

status fixup GemMDLN = <A "GW APP">vid = 32name = "MDLN"units = ""

FactoryLink Device Interfaces Using OPC and Other Technology / 279

Page 290: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

28

writeable = FALSE

status fixup GemPPExecName = <A "PPExecName">vid = 33name = "PPEXECNAME"units = ""writeable = FALSE

status fixup GemPreviousCeid = <U4 0>vid = 34name = "PREVIOUSCEID"units = ""writeable = FALSE

status fixup GemPreviousCommand = <A "PreviousCommand">vid = 35name = "PREVIOUSCOMMAND"units = ""writeable = FALSE

status fixup GemPreviousControlState = <U1 0>vid = 36name = "PREVIOUSCONTROLSTATE"units = ""writeable = FALSE

status fixup GemPreviousProcessState = <U1 0>vid = 37name = "PREVIOUSPROCESSSTATE"units = ""writeable = FALSE

status fixup GemProcessState = <U1 0>vid = 38name = "PROCESSSTATE"units = ""writeable = FALSE

status fixup GemSOFTREV = <A "REV 01">vid = 39

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 291: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

name = "SOFTREV"units = ""writeable = FALSE

status fixup GemTime vid = 40name = "TIME"units = "s"writeable = TRUE

discrete fixup GemPPChangeName = <A "PPChangeName">vid = 41name = "PPCHANGENAME"units = ""writeable = FALSE

discrete fixup GemPPChangeStatus = <U1 0>vid = 42name = "PPCHANGESTATUS"units = ""writeable = FALSE

constant fixup GemOfflineSubstate = <U1 3>vid = 43name = "OFFLINESUBSTATE"units = ""min = <U1 1>max = <U1 3>default = <U1 3>writeable = TRUE

constant fixup GemOnlineFailed = <U1 3>vid = 44name = "ONLINEFAILED"units = ""min = <U1 1>max = <U1 3>default = <U1 3>writeable = TRUE

FactoryLink Device Interfaces Using OPC and Other Technology / 281

Page 292: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

28

constant fixup GemOnlineSubstate = <U1 5>

vid = 45name = "ONLINESUBSTATE"units = ""min = <U1 4>max = <U1 5>default = <U1 5>writeable = TRUE

constant fixup private GemMaxSpoolFileSize = <U4 10000>vid = 46name = ""units = ""default = <U4 10000>writeable = FALSE

constant fixup GemMaxSpoolTransmit = <U4 0>vid = 47name = "MAXSPOOLTRANSMIT"units = ""default = <U4 0>writeable = TRUE

constant fixup private GemSpoolFileName = <A "SPOOL.LOG">vid = 48name = ""units = ""writeable = FALSE

status fixup GemSpoolCountActual vid = 49name = "SPOOLCOUNTACTUAL"units = ""writeable = FALSE

status fixup GemSpoolCountTotal vid = 50name = "SPOOLCOUNTTOTAL"units = ""writeable = FALSE

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 293: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

status fixup GemSpoolFullTime vid = 51name = "SPOOLFULLTIME"units = "cs"writeable = FALSE

status fixup GemSpoolLoadSubstate vid = 52name = "SPOOLLOADSUBSTATE"units = ""writeable = FALSE

status fixup GemSpoolStartTime vid = 53name = "SPOOLSTARTTIME"units = "cs"writeable = FALSE

status fixup GemSpoolState vid = 54name = "SPOOLSTATE"units = ""writeable = FALSE

status fixup GemSpoolUnloadSubstate vid = 55name = "SPOOLUNLOADSUBSTATE"units = ""writeable = FALSE

discrete Var_56 = <A " ">vid = 56name = "GEMEVENTTEXT"units = ""writeable = FALSE

constant fixup private GemPPKeepSecsHeader = <BOOLEAN FALSE>vid = 57name = "GEMPPKEEPSECSHEADER"units = ""

FactoryLink Device Interfaces Using OPC and Other Technology / 283

Page 294: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMTechnical Notes

28

default = <BOOLEAN FALSE>writeable = FALSE

discrete fixup GemLimitsVID = <U4 0>vid = 58name = "GEMLIMITSVID"units = ""writeable = FALSE

discrete fixup GemEventLimit = <B 0>vid = 59name = "GEMEVENTLIMIT"units = ""writeable = FALSE

discrete fixup GemTransType = <B 0>vid = 60name = "GEMTRANSITIONTYPE"units = ""writeable = FALSE

constant fixup GemLimitsDelay = <U2 5>vid = 61name = "GEMLIMITSDELAY"units = "s"default = <U2 5>writeable = TRUE

constant fixup private GemLimitsFileName = <A "LIMITS.LOG">vid = 62name = ""units = ""writeable = FALSE

constant fixup GemOverWriteSpool = <BOOLEAN TRUE>vid = 63name = "OVERWRITESPOOL"units = ""default = <BOOLEAN TRUE>writeable = TRUE

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 295: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Technical Notes

constant fixup GemConfigSpool = <U1 0>vid = 64name = "CONFIGSPOOL"units = ""min = <U1 0>max = <U1 1>default = <U1 0>writeable = FALSE

constant fixup private GemHostMessageLimit = <U4 270000>vid = 65name = ""units = ""min = <U4 16000>max = <U4 4000000>default = <U4 270000>writeable = FALSE

constant fixup private GemSharedMemorySize = <U4 270000>vid = 66name = ""units = ""min = <U4 16000>max = <U4 4000000>default = <U4 270000>writeable = FALSE

constant fixup private GemDynamicDataLimit = <U4 265000>vid = 67name = ""units = ""min = <U4 1000>max = <U4 1995000>default = <U4 265000>writeable = FALSE

constant fixup GemTermReqSendMax = <I4 2000>vid = 68name = ""

FactoryLink Device Interfaces Using OPC and Other Technology / 285

Page 296: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMProgram Arguments

28

units = ""min = <I4 0>max = <I4 60000>default = <I4 2000>writeable = FALSE

constant fixup private GemTermReqRecvMax = <I4 160>vid = 69name = ""units = ""default = <I4 160>writeable = FALSE

constant fixup private GemPrimaryMessageLimit = <U4 270000>vid = 70name = ""units = ""min = <U4 1000>max = <U4 4000000>default = <U4 270000>writeable = FALSE

PROGRAM ARGUMENTS

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)

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 297: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Run-Time Application Messages

RUN-TIME APPLICATION MESSAGES

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 225 for information about configuring a message tag. See “FLGEM Device Definition Table” on page 230 for information about configuring an analog tag.

Start-Up Errors

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) or command line argument (/s).

NO_GEM_DEFINE

The GEM directory has not been defined as an environment variable (GWAGEMDIR) or command line 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

FactoryLink Device Interfaces Using OPC and Other Technology / 287

Page 298: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMRun-Time Application Messages

28

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 command line argument.

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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 299: Device Interfaces Using Op Can Dot Her Technologies

FLGEM | 4Run-Time Application Messages

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 above 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 command line argument.

The following three messages will appear in Windows message boxes from either FLGMEXT or FLGMMSG. The source of the message will appear in the title bar of the message box.

CreateFileMapping() failed, error code = NNMapViewOfFile() failed, error code = NNMapping 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

The FLGMEXT task tried to register with FactoryLink and failed.

MSG_NO_TASK_ID

The FLGMMSG task tried to register with FactoryLink and failed.

FactoryLink Device Interfaces Using OPC and Other Technology / 289

Page 300: Device Interfaces Using Op Can Dot Her Technologies

4 | FLGEMRun-Time Application Messages

29

bad_open_FLGEM_EXT_PORT_CT

The FLGMEXT task could not find the FLGMPORT.CT file.

FLGEM_MSG_insufficient_memory

The system does not have enough memory.

Run-Time Messages

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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 301: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 5

MECOM

OVERVIEW

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:

A-Series

• CPU Programming Port, using the CPU protocol.

• AJ71C24 Computer Link Module, called C24 in this document, using the C24 protocol.

• AJ71E71 Ethernet Interface Module, called E71, using the E71 protocol.

QnA-Series

• AJ71QC24 Computer Link Module, called QC24 in this document, using the QC24 protocol.

• AJ71QE71 Ethernet Interface Module, called QE71, using the QE71 protocol.

FX-Series

• CPU Programming Port, using the CPU protocol.

• 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 also possible to communicate through a MAC/MTA/E-series terminal in transparent mode.

FactoryLink Device Interfaces Using OPC and Other Technology / 291

Page 302: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMOverview

29

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.

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

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 303: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Required Hardware and Software

REQUIRED HARDWARE AND SOFTWARE

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 331.

Software

If Ethernet communication is used the following additional software is required.

• 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, activate the Control Panel and then select Network.

FactoryLink Device Interfaces Using OPC and Other Technology / 293

Page 304: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMInstalling The Mitsubishi Plc-driver

29

INSTALLING THE MITSUBISHI 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

This program should only be installed on Windows 2000.

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. Locate the MECOM subdirectory at [install dir]\Program Files\FactoryLink\

3. Double-click “setup.exe”.

4. If Ethernet is to be used, answer 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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 305: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Installing The Mitsubishi Plc-driver

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.

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.

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 294..)

3. Restore your FactoryLink application.

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

FactoryLink Device Interfaces Using OPC and Other Technology / 295

Page 306: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

29

PLC CONFIGURATION TABLES

This section describes the configuration tables for the Mitsubishi PLC-driver, MECOM.

Overview

The Mitsubishi PLC driver has three entries in the Configuration Explorer.

Mitsubishi Definition

Definition of tasks, remote stations, and PLCs.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 307: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Mitsubishi Read

Information about what data to read from PLCs, and when to do it.

Mitsubishi Write

Information about what data to write to PLC, and when to do it.

To access the configuration tables start the Configuration Explorer and open the appropriate FactoryLink server configuration. Open the Device Interfaces folder, and locate the three Mitsubishi subfolders.

The data is entered into the tables as described in the FactoryLink users manual. For those parameters where there are a fixed number of alternatives available, there are choice lists.

Note: All Task Names, Remote Names, PLC Names and Table names are converted to uppercase letters. Avoid using local national characters.

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)

FactoryLink Device Interfaces Using OPC and Other Technology / 297

Page 308: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

29

Mitsubishi Definitions

There are three tables under the Mitsubishi Definition.

• Communication Task Definition

• Remote Station Definition

• PLC Definition.

For each setup there will be a name defined:

• Task Name

• Remote Name

• PLC Name

These names will later be used in the Mitsubishi Write Header table and the Mitsubishi Read Header table.

By using names for these parameters a great advantage is achieved. 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.

Communication Task Definition

Accessing

In your server application, open Device Interfaces > Mitsubishi Definition > Communication Task Definition.

Field Descriptions

Task Name

Mnemonic for the task. The user is free to select a name consisting of up to 16 characters.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 309: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Task Number

Communication task number. Valid entries are 1 through 128. The default value is 1. When 1 is used the exe-file MECOM1.EXE will be used, when 2 is used MECOM2.EXE will be used and so on. Note that 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. Valid entries are 300 - 115200 bps. The default value is 9600 bps.

(Serial communication only.)

Parity

Parity for the communication. Valid entries are “NONE”, “ODD” or “EVEN”. The default value is “ODD”.

(Serial communication only.)

Data bits

Number of data bits. Valid entries are 7 or 8. The default value is 8.

(Serial communication only.)

Stop bits

Number of stop bits. Valid entries are 1 or 2. The default value is 1.

(Serial communication only.)

FactoryLink Device Interfaces Using OPC and Other Technology / 299

Page 310: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

30

Modem disable

Makes it possible to test an application without using specified modem. Valid entries are “YES” and “NO”. The default value is “NO”.

(Serial communication only.)

Ready tag

(Optional.) Tag activated when initialization phase is completed.

External callup status tag

(Optional.) Analog tag indicating status for call-ups from an external device.

Hangup trigger tag

(Optional.) Trigger for hanging up modem. May be used for both internal and external callups.

(Serial communication only.)

Current operation message tag

(Optional.) Name of a message tag where MECOM writes a message about current (successful) operation.

Error detect tag

(Optional.) Name of digital tag, which will be activated when there is any error for the communication task.

Error Message tag

(Optional.) Name of message tag or analog tag where information about latest error will be available. The error message will be preceded by the Task Name if the tag is a message tag.

Trace Level tag

(Optional.) Name of analog tag where operator may change the current trace level during operation. The information shown during normal operation is about triggered tables, called remote stations etc.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 311: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Remote Station Definition

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

In your server application, open Device Interfaces > Mitsubishi Definition > Remote Station Definition.

Field Descriptions

Remote Name

Mnemonic for the remote station. The user is free to select a name consisting of up to 16 characters.

Phone number

Phone number to be dialled when the remote station is accessed. The phone number may consist of up to 32 characters. The phone number will be preceded by “atdt” and it is permitted to add special modem command characters in the phone number as ‘p’ for pulse dial in the phone number.

Phone number by tag

(Optional.) Message tag containing phone number to be dialled when remote station is accessed. The tag will be evaluated at dial up time. If the tag is empty, it will be assigned the value from "Phone number". If the value is changed during an active connection, it will still remain active. To connect to a new number, the current connection must first be terminated. See Hangup delay and Hangup trigger tag (the latter is found in the Communication Task Definition table).

Hangup Delay

(Optional.) Delay in minutes after last access to the remote station that the modem will be automatically hung up.

Modem status

(Optional.) Analog tag indicating modem status for the remote station.

During initialization all remote stations are called and this tag is also updated during the initialization phase.

FactoryLink Device Interfaces Using OPC and Other Technology / 301

Page 312: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

30

PLC Definition

This table is used for defining the PLCs available and how to communicate with them.

Accessing

In your server application, open Device Interfaces > Mitsubishi Definition > Remote Station Definition.

Field Descriptions

PLC Name

Mnemonic for the PLC. The user is free to select a name consisting of up to 16 characters. The PLC Name might be used for several physical PLCs at different remote stations if modem is used.

Protocol

Protocol to use. Valid entries are:

“C24” For C24 Serial communication.

“CPU” For Serial CPU-port communication.

“E71” For E71 Ethernet communication.

“QC24” For QC24 Serial communication.

“QE71” For QE71 Ethernet communication.

When CPU-protocol is used MECOM detects what kind of PLC-type being used. Currently all FX-series and all A-series CPU’s are supported, but not the QnA-series. The default value is “CPU”.

MNET10 Network

The PLC MELSEC NET 10 network number to use. Permitted values are 0 and 1 - 239. 0 means no MNET10 network. This parameter is 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. The default value is 0.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 313: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

MNET Node

The PLC MELSEC NET node to use. Permitted values are “HOST”, “MASTER” and “SLAVE1” through “SLAVE64”. This parameter is always used for A- and QnA-series communication. This parameter tells what PLC in the MELSEC NET communication will be established to independent of the protocol. When communication is done to the connected PLC, use the “HOST” node. The default value is “HOST”.

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.

C24 Node

The [Q]C24 multidrop net node. Valid entries are 0 - 31. The default value is 0. ([Q]C24-protocol only.)

MAC Node

MAC multidrop net node. Valid entries are 0 - 63. 0 means not used, else it is the net node for a MAC-terminal. The default value is 0. (Serial communication only.)

IP-Address

(Optional.) 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

(Optional.) 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

(Optional.) 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.)

FactoryLink Device Interfaces Using OPC and Other Technology / 303

Page 314: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

30

TCP/UDP

(Optional.) 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, normal

Time for timeout in ms. This parameter is used when communication with PLC already has started. Valid entries are 0 - 32767. The default value is 2000.

Timeout, quick

Time for timeout in ms. This parameter is used when communication with PLC starts. Valid entries are 0 - 32767. The default value is 200.

Optimize

Select optimization method.

“DATA”Minimize transferred data.

“MESS”Minimize number of messages.

The default value is “DATA”. When using Ethernet protocols the MESS optimization method normally gives the best performance.

Mitsubishi Read

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 are to be read and the Read Table tells what data to read.

Read Header

This table defines when groups of data should be read from a PLC.

Accessing

In your server application, open Device Interfaces > Mitsubishi Read > Read Header.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 315: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Field Descriptions

Table Name

Mnemonic for the read table. The user is free to select a name consisting of up to 16 characters.

Trigger Tag

(Optional.) A digital tag that works as trigger for the table. If Trigger type is set to “CONT”, no tag is needed.

Trigger Type

This field tells how the trigger is working. Valid entries are:

CHANGE In this case the data is read whenever the trigger has its change bitset.

CONT This stands for CONTINUOUS. The data is read as fast as possibleat all times.

RISE In this case the data is read whenever the trigger-tag changes fromOFF to ON.

FALL In this case the data is read whenever the trigger-tag changes fromON to OFF.

ON In this case the data in the table is read as fast as possible wheneverthe trigger-tag is ON.

OFF In this case the data in the table is read as fast as possible wheneverthe trigger-tag is OFF.

Name for the task to be used when reading data for the table. The task name must be defined in the Communication Task Definition table.

Remote Name

(Optional.) Name for the remote station to be called when reading data for the table. The remote name must be defined in the Remote Station Definition table.

FactoryLink Device Interfaces Using OPC and Other Technology / 305

Page 316: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

30

PLC Name

Name for the PLC to be accessed when reading data for 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 by tag

(Optional.) Message tag containing the name of the PLC to be accessed. The name in the message tag must be defined in the PLC Definition table.

Read at startup

(Optional) If “YES” is selected, tag values for the read table will be read from PLC at program start-up. This is very useful if modem is used.

Disable table tag

(Optional) A digital tag controlling the table. If the tag is set the triggering of the table is ignored.

File Register Bank

(Optional) An analog tag selecting extension file register 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.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 317: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

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 trigger tag

(Optional) A digital tag forced to ON when operation for the table is completed or interrupted. Status for the read operation is available in the Completion status tag.

Completion status tag

(Optional) An analog or message tag telling status of the read operation. 0 means no error, -1 means no error when “read at startup” was performed successfully and any non-zero positive value is an error code.

If a message tag is used the corresponding error message will be shown. Some of the most common errors are explained and what actions to take when they occur in “Troubleshooting” on page 338.

Read Table

This table defines what data to be read at a certain time.

Accessing

In your server application, open Device Interfaces > Mitsubishi Read > Read Header > “your table name” > Read Table.

Field Descriptions

Tag Name

A tag name. You can read DIGITAL, ANALOG, FLOAT, MESSAGE or LONGANA tags from PLC.

I/O

Complete name of device in PLC to be read. E.g. 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 307

Page 318: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

30

When Timers and Counters are read the contact status of the I/O is returned if the tag type is digital, else the current value is returned.

Index tag

(Optional.) An analog tag. If this parameter is defined the value of the tag is used as an index for the addressed device.

Please note that the binary value of the tag is used and that devices are numbered octal, decimal or hexadecimal. E.g. if the is parameter I/O is X40 and the value of the index tag is 200 (decimal), X108 is read.

Number of tags

(Optional.) This parameter is used when a tag array is read. The 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 type

(Optional) Specifies as what kind of type, if other than normal for the I/O, data is stored in PLC. Valid entries are:

“DEFAULT” The normal data type, that this "I/O" type denotes, is used. (Same as leaving this field blank.)

“DOUBLE” Two 16-bit registers are used as one 32-bit integer register.

“FLOAT” Two 16-bit registers are used as one 32-bit precision float register. “UNSIGNED” One 16-bit register is used as an unsigned register.

“BCD” One 16-bit register is used as a BCD register.

Message Length

(Optional.) Number of 16-bit registers to be read from PLC to MESSAGE string. Note that one 16-bit register in PLC contains 2 characters. Valid entries are 1 - 40.

Gain & Offset

(Optional) The value read from PLC is multiplied with Gain and then Offset is added to the result and finally the result is stored in the tag. Valid entries are any real numbers like "1.25" or "1.2E-3"

If Number of tags is used, these parameters are common for the whole tag array.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 319: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Mask

(Optional.) The value from the PLC will be bitwise and-operated with the value specified. The value is entered as a hexadecimal value. Valid entries are 1 - FFFF.

This is only used when the tag is a DIGITAL tag or an ANALOG tag and the PLC device is a 16-bit register.

Mitsubishi Write

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 are to be written and the Write Table tells what data to write.

Write Header

This table defines when groups of data should be written to a PLC.

Accessing

In your server application, open Device Interfaces > Mitsubishi Write > Write Header.

Field Descriptions

Table Name

Mnemonic for the write table. The user is free to select a name consisting of up to 16 characters.

Trigger Tag

(Optional.) A digital tag that works as trigger for the table.

If no trigger is 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

This field tells how the trigger is working. Valid entries are:

CHANGE In this case the data is written whenever the trigger has itschange bit set. (This is the default value)

FactoryLink Device Interfaces Using OPC and Other Technology / 309

Page 320: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

31

CONT This stands for CONTINUOUS. The data is written as fast

as possible at all times.

RISE In this case the data is written whenever the trigger-tag changesfrom OFF to ON.

FALL In this case the data is written whenever the trigger-tag changesfrom ON to OFF.

ON In this case the data in the table is written as fast as possiblewhenever the trigger-tag is ON.

OFF In this case the data in the table is written as fast as possiblewhenever the trigger-tag is OFF.

Task Name

Name for the task to be used when writing data for the table. The task name must be defined in the Communication Task Definition table.

Remote Name

(Optional.) Name for the remote station to be called when writing data for the table. The remote name must be defined in the Remote Station Definition table.

PLC Name

Name for the PLC to be accessed when writing data for 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 by tag

(Optional) Message tag containing the name of the PLC to be accessed. The name in the message tag must be defined in the PLC Definition table.

Read at startup

(Optional) If YES is selected, tag values for the write table will be read from PLC at program start-up.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 321: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

Disable table tag

(Optional.) A digital tag controlling the table. If the tag is set the triggering of the table is ignored.

File Register Bank

(Optional) An analog tag selecting extension file register 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 trigger tag

(Optional) A digital tag forced to ON when operation for the table is completed or interrupted. Status for the write operation is available in the Completion status tag below.

Completion status tag

(Optional) An analog or message tag telling status of the write operation. 0 means no error, -1 means “read at startup” is performed successfully and other any non-zero positive value is an error code.

Note: If a message tag is used the corresponding error message will be shown.

FactoryLink Device Interfaces Using OPC and Other Technology / 311

Page 322: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

31

Some of the most common errors are explained and what actions to take when they occur in “Troubleshooting” on page 338.

If trigger tag is not defined all tags in the write table is written on CHANGE condition.

Write Table

This table defines what data to be written at a certain time.

Accessing

In your server application, open Device Interfaces > Mitsubishi Write > Write Header > “your table name” > Write Table.

Field Descriptions

Tag Name

A tag name. You can write DIGITAL, ANALOG, FLOAT, MESSAGE or LONGANA tags to PLC.

I/O

Complete name of device in PLC to be written. E.g. 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 contact status of the I/O if the tag type is digital, else data is written to the current value.

Write if changed

(Optional.) If “YES” is selected then the value of the tag will be written to PLC every time its value changes even if the table itself not has been triggered. Valid entries are:

NO The value will normally (se below) only be written to the PLC whenthe table is triggered. (Same as leaving this field blank.)

YES The value will be written to the PLC when the table is triggered, andeach time the tag's value changes.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 323: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

NEVER The value will ONLY be written to the PLC when the table istriggered. This will also exclude this tag from the "Matchprocessing".

Note: NO (or blank) may be overridden (to YES) by the driver in case of: 1) There is no trigger tag 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 latter case, there will also be an internal "read inhibit if changed" set for the tag. These two cases will produce a warning at start up (if warnings are enabled, "-W").

Index tag

(Optional) An analog tag. If this parameter is defined the value of the tag is used as an index for the addressed device.

Please note that the binary value of the tag is used and that devices are numbered octal, decimal or hexadecimal. E.g. if the is parameter

I/O is Y40 and the value of the index tag is 200 (decimal), Y108 is written.

Number of tags

(Optional) This parameter is used when a tag array is written. The parameter specifies the number of tags to be used to update data in PLC, starting with I/O or the combination of I/O and Index tag.

PLC data type

(Optional) Specifies as what kind of type, if other than normal for the I/O, data is stored in PLC. Valid entries are:

DEFAULT The normal data type, that this "I/O" type denotes, is used. (Sameas leaving this field blank.)

DOUBLE Two 16-bit registers are used as one 32-bit integer register.

FLOAT Two 16-bit registers are used as one 32-bit precision float register.

UNSIGNED One 16-bit register is used as an unsigned register.

BCD One 16-bit register is used as a BCD register.

FactoryLink Device Interfaces Using OPC and Other Technology / 313

Page 324: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMPLC configuration Tables

31

Message length

(Optional) Maximum number of 16 bit registers to be updated in PLC from MESSAGE tag. Please note that one 16-bit register in PLC contains 2 characters. Valid entries are 1 - 40.

Gain & Offset

(Optional) First Offset is subtracted from the value of the tag and then divided by Gain and finally the result is written to PLC. Valid entries are any real numbers like "1.25" or "1.2E-3"

If Number of tags is used, these parameters are common for the whole tag array.

Note: The same values for Gain and Offset should be specified for a tag that is both read and written in PLC.

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 331.) 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 Name Task Number

Baud Rate Parity Data

BitsStop Bits

PCPORT 1 9600 ODD 8 1

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 325: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5PLC configuration Tables

(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.

(Columns not shown here are left blank.)

Data in Mitsubishi Read Tables

Enter data as follows in the Read Header table:

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:

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.

PLC Name Protocol MNET Node

C24 Node

MAC Node

Timeout Normal

Timeout Quick Optimize

TESTPLC C24 HOST 0 0 2000 200 DATA

Table Name Trigger Tag

Trigger Type Task Name Remote

Name PLC Name

RTABLE sec1 CHANGE PCPORT TESTPLC

Tag Name I/O

Datavalue D25

FactoryLink Device Interfaces Using OPC and Other Technology / 315

Page 326: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

31

FUNCTION DESCRIPTION

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: ctgen

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 327: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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 will be 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 has been detected, it is shown in the run manager picture. If the error disappears, the status is changed to “running” but the error message will remain in the picture for another 30 seconds and then it will be cleared. If the error does not occur again due to the table not being triggered, the error status will remain for 30 seconds and thereafter the error will be ignored. Then the status will be changed to “running” and, as described earlier, the error message will remain in the picture for another 30 seconds.

FactoryLink Device Interfaces Using OPC and Other Technology / 317

Page 328: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

31

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:

This means:

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

Tag Name I/O ... Number of Tags ...

DataValues[0][0] D0 ... 100 ...

Data from Register Will be Stored in Tag

D0 DataValues[0][0]

D 1 DataValues[0][ 1 ]

... ...

D9 DataValues[0][9]

D10 DataValues[1][0]

... ...

D99 DataValues[9][9]

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 329: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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:

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:

If register D0 through D2 contains 6261, 6463 and 6500, the following will be read from the PLC:

The tag MyText would contain the text “abcd” after the read operation.

Tag Name I/O ... Message Length ...

MyText D0 ... 3 ...

Register Characters Values(hex) Stored Value

D0 ”a”and ”b” 61 and 62 6261(hex) = 25185(dec)

D1 ”c”and ”d” 63 and 64 6463(hex) = 25699(dec)

D2 ”e”and zero 65 and 00 0065(hex) = 101(dec)

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”

FactoryLink Device Interfaces Using OPC and Other Technology / 319

Page 330: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

32

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.

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 331: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 321

Page 332: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

32

• 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.

• 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 - 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.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 333: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 323

Page 334: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

32

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 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 timeout 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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 335: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 325

Page 336: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

32

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.

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)

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 337: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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 tagwill 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.

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

FactoryLink Device Interfaces Using OPC and Other Technology / 327

Page 338: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

32

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.

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.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 339: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Function Description

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, andtransferred 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.

Program Arguments

For debug and help purposes, MECOM supports the following program arguments (specified in the System Configuration table). The program arguments are not case-sensitive.

-Adrive: \directory Set application directory. Use only when driver is run stand-alone.

-C[S]S

how driver cycle time when anything has been triggered. The value is shown in the system picture when there is no error and is updated every 5 seconds. If the ‘S’ is specified, communication statistics is shown as well.

Function description#

FactoryLink Device Interfaces Using OPC and Other Technology / 329

Page 340: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMFunction Description

33

-I Ignore “Unreachable PLCs”. At start-up, MECOM normally

validates all configured PLCs. If a PLC can’t be reached, it is considered being a severe error, and the task will terminate. This option makes it possible to continue processing all other PLCs. MECOM will retry to validate the “unreachable PLCs” each time a related table is triggered. This can give considerable impact on performance, depending on the configuration. This is the case when using Ethernet TCP/IP ([Q]E71) protocols.

-Lfilename Log errors, warnings and trace messages to specified file. During normal operation the file will be closed between every write operation, which makes it possible to view the file while FactoryLink still 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 valida-tion can take hours to perform. This feature will minimize the start-up time when starting the FactoryLink application. Observe that by using this feature, the application and the remote stations will not be validated at start-up, so failing configuration / communication will not be automatically found.

-Tn Set trace level n. Show information during normal operation about triggered tables, called remote stations etc.

-V Validate only. Used when driver is run stand-alone.

-W Show warning messages during validation. Error messages will automatically be shown. 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.

-? Summary of Command line options. Displays a brief summary of these 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).

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 341: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Communication guide

COMMUNICATION GUIDE

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, please 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 331

Page 342: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMCommunication guide

33

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.

AJ71 UC24

Station number 00. Mode 1 or A

A1SJ71C24-R2 and A1SJ71UC24-R2

Station number 00. Mode 1 or A

AJ71 QC24N and A1 SJ71 QC24-R2

Station number 00. Mode 5

(* ) 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

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.

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.

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.

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. (*)

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 343: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Communication guide

MAC/MTA-manual. However, if you need a physical link between the host computer and the PLC(s), use the cable description seen below.

Note: The cable described in the AJ71C24 Users Manual will not work!

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:

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.

Parameter A-CPU FX-CPU

Baud rate 9600 9600

Parity Odd Even

Data bits 8 7

Stop bits 1 1

C2425 Pins

PC 9 Pins

C24-R29 Pins

PC9 Pins

237456820

327456820

32578146

23578146

FactoryLink Device Interfaces Using OPC and Other Technology / 333

Page 344: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMCommunication guide

33

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

Below is a list of the 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)

Below is a list of the 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

There are three different terminals available from Beijer Electronics supporting data logging and modem communication. They are called MAC 10 CM, MAC 50 CM and

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 345: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Communication guide

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.

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 below.

C2425 Pins Male

Modem25 Pins Male

C24-R29 Pins Male

Modem25 Pins Male

237456820

23745620

32578614

23745620

FactoryLink Device Interfaces Using OPC and Other Technology / 335

Page 346: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMCommunication guide

33

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.

Between the MAC/MTA/E RS422 connector and the PLC a MAC-CAB from Beijer Electronics is used.

FX

For FX PLC use the SC05N signal converter from Beijer Electronics. The cable between modem and SC05N should be as follows:

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.

MAC/RS2329 Pins Female

Modem25 Pins Male

235

23745620

Modem25 Pins Male

SC05N9 Pins Male

23574

23758

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 347: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Communication guide

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 337

Page 348: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMTroubleshooting

33

TROUBLESHOOTING

PLC Errors

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

Receives NAK from PLCs when communi-cating through MELSEC NET

Slave PLC has been reset. The master PLC must be reset before the MELSEC NET will work again

Can’t read devices M9000 – M9007 and M9248 - M9255

This is known bugs for AJ71 C24-S3 and AJ71 E71

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 –dctgen –cctgen –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 PLC Name

Used Remote Name or PLC Name does not exist in the 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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 349: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Troubleshooting

Error Messages from MELCOM32.DLL

A lot of detailed error messages are available from MELCOM32.DLL. Most of the error messages are self-explanatory but for some basic errors it might be useful to give some hints for how to solve the problems.

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.).

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 response)

Check communication parameters

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 communi-cation 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 caus-ing the connection to be lost without successful closing of it. Some network errors may require the PLC to be reset.

FactoryLink Device Interfaces Using OPC and Other Technology / 339

Page 350: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMTroubleshooting

34

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.

Below is a list of some general problems and how to solve them.

Errors Cause and/or Action

The modem does not respond to commands

Check hardware (cable/connectors etc.). Make sure that at least RxD (Receive Data), TxD (Transmit Data) and SG (Signal Ground) are connected. The cable between computer and modem must be com-pletely 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 com-mands with a "0" instead of "OK"

The modem is set for numeric result codes. Reset to factory settings by typing "AT&F" and clicking Enter. If the response is still "0", then type "ATV1" and click Enter (set English result codes)

Modem doesn't answer incom-ing calls, or answers first but then immediately puts hook back on and disconnects

Make sure AutoAnswer is enabled by typing "ATS0=1" and clicking Enter (# ring signals before answer). Check hardware and make sure that DTR (Data Terminal Ready) is connected. Another way is to 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, but no data gets through to target system

Make sure flow control (RTS/CTS, XonXoff) is disabled by typing "AT&K0"(Powerbit) or ”AT&H0”(US Robotics) and clicking Enter

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 351: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Troubleshooting

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.

Modem answers incoming calls, but data gets garbled to target system

Make sure the modem is set for the correct communication parame-ters (speed, parity, stop bits etc.) against target system by 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 state (incoming call)

Check hardware and make sure that CD (Carrier Detect) is con-nected. If that doesn't help, type "AT&C1" and click Enter (make CD follow hook state)

Calling program doesn't detect successful connect (the answering modem indicates success)

Some modems must be driven at a high baudrate from the calling program, even if the answering modem is low speed. Try a higher baudrate in the calling program

Calling program timeouts before modem (modem does not reply "NO CARRIER" in time and is therefore still pend-ing). This can be a problem when several calls in sequence must be made

Make sure that modem wait time for connect is around 45s by typing "ATS7=45" and clicking Enter. Verify the timeout by dialling manu-ally, the clock in some modems are not very accurate

Errors Cause and/or Action

FactoryLink Device Interfaces Using OPC and Other Technology / 341

Page 352: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMTroubleshooting

34

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.

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.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 353: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Troubleshooting

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 Using OPC and Other Technology / 343

Page 354: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMUninstallation

34

UNINSTALLATION

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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 355: Device Interfaces Using Op Can Dot Her Technologies

MECOM | 5Uninstallation

• MEWRITE.AHS

%FLINK%\KEY\EN (Language-specific)

• ME_BAUD.KEY

• 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 Using OPC and Other Technology / 345

Page 356: Device Interfaces Using Op Can Dot Her Technologies

5 | MECOMUninstallation

34

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\ Tecnomatix\ 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.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 357: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 6

OLE for Process Control (OPC)

OVERVIEW

The MMI/SCADA environment has a wide variety of client applications and data source devices. Client applications develop numerous proprietary device drivers to communicate with incompatible hardware devices. As hardware products evolved, it has become an ongoing task to develop, test, and maintain these drivers. This situation exists industry-wide, and has led to the following:

• Duplication of effort because software vendors must write a unique driver for each vendor’s hardware.

• Inconsistencies between vendor drivers, because hardware features are implemented in any standard fashion.

• Ongoing support for hardware feature changes; a change in the hardware capabilities might break some drivers.

• Access conflicts as two applications, each with independent drivers, cannot access the same device simultaneously.

OLE for Process Control (OPC) is an industry movement to establish 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.

Use the OPC Server Task, and the OPC Client Task to achieve this functionality in FactoryLink.

OPC SERVER TASK

The FactoryLink OPC Server Task is a new task which enables your FactoryLink application to provide data to other applications via the OPC interface. These applications, acting as OPC clients, can be FactoryLink applications or any other OPC client applications. The OPC Server task operates in the background with no configuration required and no user interface. The FactoryLink OPC Server Task is designed to perform in both a local and network environment. The Server Task is an out-of-process server and runs in its own FactoryLink task space.

FactoryLink Device Interfaces Using OPC and Other Technology / 347

Page 358: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Client Task

34

OPC CLIENT TASK

The OPC Client Task enables your FactoryLink application to obtain data from other OPC servers like a PLC. The OPC Client task must be configured in one of two ways. The primary way to configure OPC Client is using the OPC Explorer, described below. Alternately, the OPC Client can be configured using the traditional tables in Configuration Explorer.

OPC EXPLORER

The OPC Explorer is a separate application provided with all FactoryLink OPC installations. The browser provides a user-friendly way to configure the FactoryLink OPC Client task.

The OPC Explorer provides a graphical user interface which allows you to easily access OPC servers connected to the network and select data items to be monitored by the FactoryLink OPC Client task.

The OPC Explorer also allows you to establish groups of data items, allowing you to organize them in meaningful ways.

OPC CLIENT/SERVER OPERATION

With the OPC components installed, FactoryLink can function as an OPC server, an OPC client, or both. This chapter provides a description of the FactoryLink OPC tasks and how they can be used to exchange data using OPC functionality.

FactoryLink as an OPC Server

The OPC Server Task operates with other FactoryLink tasks, running in the Shared domain. The Server Task responds to requests from external OPC clients and retrieves

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 359: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Client/Server Operation

data from the real-time database, converts it to the appropriate data type, and transmits it to the client using the OPC-compliant protocol.

The FactoryLink application must be running and the Server Task must have completed its initialization before a client can attach to it. An OPC client cannot initialize the Server Task. This is different from the typical OPC server operation.

FactoryLink as an OPC Client

The FactoryLink Client Task can be used in a FactoryLink application to extract data from other OPC servers that are registered. The Client Task must be configured properly prior to operation. During configuration, you designate which registered

FactoryLink Device Interfaces Using OPC and Other Technology / 349

Page 360: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Client/Server Operation

35

OPC servers to attach to and then link FactoryLink tags with groups of specific data items within the server.

Upon application start-up, the OPC Client Task will attempt to connect to the appropriate OPC servers. In accordance with OPC specifications, the Client Task will start any OPC servers which are not already active. Once the servers are running, the Client Task will subscribe to each group defined in the configuration tables. The Client Task will then receive OPC items (data) from the servers and save the data to the appropriate FactoryLink tags.

The OPC Client task can be configured like a traditional FactoryLink task, using the Configuration Explorer, or by using the OPC Browser. The OPC Browser is a separate Windows program that provides a graphical user interface for viewing servers registered on the system and, when supported by the specific server, selecting specific items to be placed into FactoryLink tags. See “OPC Explorer” on page 352 for more information about using the OPC Browser. See “Configuring the OPC Client” on page 362 for information about configuring the Client Task in Configuration Explorer.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 361: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Client/Server Operation

FactoryLink as Both Client and Server

The OPC connectivity tasks can be used to communicate between FactoryLink applications. Using both the Client Task and the Server Task, data in the real-time databases can be exchanged using standard OPC interfaces.

FactoryLink Device Interfaces Using OPC and Other Technology / 351

Page 362: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Explorer

35

OPC EXPLORER

OPC Explorer is a tool you can use to configure the FactoryLink 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 wish to bring in to your FactoryLink application.

Once you have selected an item to map, OPC Explorer will allow you to create a FactoryLink 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 FactoryLink tags that make up this group. Finally, you would use the OPC Explorer to map the appropriate OPC items to the FactoryLink tags. If the server supports browsing, this can be done by drag and drop within the OPC Explorer. Otherwise, you will be required to manually enter the OPC item names.

In the context of the OPC Explorer, all FactoryLink 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.

This section provides instructions for using the OPC Explorer to configure the Client Task.

Starting OPC Explorer

You can start the OPC Explorer from Configuration Explorer.

In your server application, open Device Interfaces > OPC Explorer.

You can also launch OPC Explorer from a command line, using the following text:

opcexplorer \a [drivename]: {flapp}

where:

{flapp} is the path to your FactoryLink application directory.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 363: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Explorer

OPC Explorer Interface

The OPC Browser user interface is similar to Windows Explorer. The window is divided into two areas, or panes, under the toolbar. The left side is the browse pane. The right side is the detail pane, which displays the details of the selected item.

Browse Pane

The browse pane displays two separate branches: OPC servers and FactoryLink Tags. Remote OPC servers are displayed under the Network Computers branch, and local servers are listed under the FL.OPCServer branch. As each OPC server is opened, different levels under the server are displayed. At the lowest level, server data items are exposed. These server data items can be connected to FactoryLink tags. All FactoryLink Tag Groups are displayed under the FactoryLink Tags branch. As each Tag Group is opened, FactoryLink tags contained in that group are displayed. This grouping of tags has no meaning outside OPC Explorer.

Detail Pane

The detail pane is shown on the right. When the root OPC Servers branch is selected in the left pane, the right pane displays all registered OPC servers on the system. In the illustration above, the only column displayed in the right pane contains the OPC server names.

FactoryLink Device Interfaces Using OPC and Other Technology / 353

Page 364: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Explorer

35

Toolbar

The toolbar provides quick access to commonly used functions of the OPC Browser. The following items are located on the toolbar:

Menu Reference

The OPC Browser menu commands fall under the following menu areas:

Browser

OPCConnect

Connects to the selected OPC server. When you are browsing OPC servers from the browse view, an OPC connection must be made before server items are exposed under each OPC server.

Once a connection is established, you can see the OPC Disconnect icon is enabled. If the server supports item browsing, available items appear under the server icon. When expanded, all server items that can be connected to FactoryLink tags are displayed.

OPCDisconnect

Disconnects from the selected OPC server. If no other OPC clients are connected to the server, the server shuts down.

Exit Exits the application.

Groups

Add Group Adds a new Tag Group, which displays the New Group dialog box.Enter the name of the new group and click OK to create it, or click Cancel to exit the dialog box.

Connect OPC Server Connects to the selected OPC server.

Disconnect OPC Server Disconnects from the selected OPC server.

Add Group Adds a new Tag Group.

Create Tag Creates a new FactoryLink Tag under the selected group.

Help Opens the Configuration Explorer Help.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 365: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Explorer

Rename Group Renames the selected Tag Group by displaying the Rename Group dialog box.

Enter the new name for the Tag Group and click OK to change it; or click Cancel to exit the dialog box.

Delete Group Deletes the selected Tag Group. A confirmation dialog box displays. Click OK to delete the group or click Cancel to abort the deletion.

Connect Group Connects to the selected Tag Group. Connecting to FactoryLink Tag Groups is necessary before changing any tag properties. Once the group is connected, server items can be attached or changed through the Tag Properties dialog box.

DisconnectGroup

Disconnects from the selected Tag Group.

GroupProperties

Displays the Group Properties dialog box, where you can modify properties of the selected Tag Group.

Tags

Tag Properties Displays the Tag Properties dialog box, where you can modify properties of the selected tag.

Add Tag Adds a new tag to the selected FactoryLink Tag Group.

Delete Tag Deletes the selected tag from the FactoryLink Tag Group.

Cut Tag Cuts the selected tag from the FactoryLink Tag group.

Copy Tag Copies the selected tag so that you can paste it into another group.

Paste Tag Pastes a previously copied or cut tag into the selected FactoryLink Tag Group.

View

Toolbar Shows/hides the toolbar.

Filter Shows/hides the filter list in the toolbar.

Status Bar Shows/hides the status bar.

Help

Contents Displays the OPC Explorer help file.

About OPCExplorer

Displays application version information.

FactoryLink Device Interfaces Using OPC and Other Technology / 355

Page 366: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Explorer

35

Using OPC Explorer

The OPC Explorer is used to map data items in an OPC server to FactoryLink tags in the following ways:

• By defining the FactoryLink tags and then link them to the OPC data items.

• By using OPC Explorer to locate OPC data items and creating corresponding FactoryLink tags to hold that data.

The following procedures will focus on the second method. The concepts and use of OPC Explorer are the same for either method. The following procedures assume you have the OPC components installed and your DCOM and TCP/IP setup is correct.

The Browse Pane displays two separate branches: OPC Servers and FactoryLink Tags. There are two main branches under the OPC Servers root folder. The FL.OPCServer is the local FactoryLink OPC Server task. Remote servers connected to the network are contained in the Network Computers folder.

Browsing OPC Items

Typically, you use the OPC Explorer to browse OPC servers and locate data items you want to map to FactoryLink tags. Perform the following steps to browse available OPC items.

1 Right-click to select the Network Computers folder.

Note: If you have a large number of computers connected to the network, there may be some delay as OPC Explorer populates the browse tree.

2 From the shortcut menu, select Browse Network.

The OPC Explorer then locates all computers on the network.

3 Locate the node name of the computer where the OPC server application resides.

Note: If you know the exact node name, you can select Browse Node from the menu and enter it in the Add Node dialog box.

4 Right-click the node name and select Browse OPC Servers.

The OPC Explorer locates all OPC server applications currently registered on the selected node.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 367: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Explorer

5 Right-click the appropriate OPC server name and select Connect, or you can click the Connect button on the toolbar.

Once the connection is established, the Disconnect OPC Server toolbar button will be enabled, and a + symbol will appear beside the OPC server icon.

6 Click the + symbol beside the OPC server icon to expand the groups contained in the server, or you can double-click the OPC server name to expand the tree.

The OPC Explorer displays all available OPC data item groups defined in the server.

7 Click the + symbol beside the appropriate group icon to open the folder and display the available data, or you can double-click the icon to open the folder.

The OPC Explorer displays all available OPC data items in the detail pane, under the Server Items heading.

Disconnecting from an OPC Server

Select the server in the Browse Pane and perform one of the following actions to disconnect from an OPC server:

• Click on the Browser menu and click OPC Disconnect.

• Click the Disconnect OPC Server toolbar button.

• Right-click on the server icon in the Browse Pane and click Disconnect.

Browsing FactoryLink Tags

All FactoryLink tag groups are displayed under the FactoryLink Tags branch. Within OPC Explorer, all FactoryLink tags must be contained within user-defined groups. These Tag Groups have no meaning outside the OPC Explorer.

Perform the following steps to locate FactoryLink tags in the OPC Explorer.

1 If necessary, expand the FactoryLink Groups folder by clicking the + symbol in the browse tree or by double-clicking the icon. (All Tag Groups defined for the FactoryLink application display.)

2 Click the Group Name you want to browse.

All FactoryLink tags defined for that group display in the detail pane, which shows the tag name, corresponding OPC server item, and its associated server and node name.

FactoryLink Device Interfaces Using OPC and Other Technology / 357

Page 368: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Explorer

35

Working with FactoryLink Tag Groups

Creating a Tag Group

1 To create a new FactoryLink tag group, do one of the following:

• In OPC Explorer, click the Groups menu and then click Add Group.

• Click the Add Group toolbar button in OPC Explorer.

• In the OPC Explorer browse pane, right-click on the FactoryLink Tags folder and select Add Group.

2 In the New Group dialog, enter a name in the Group Name field.

3 (Optional) In the Control Tags for Group Read/Write section, enter the names of the FactoryLink control tags to be used for group reads and writes. For each field, you can click the ellipsis button to display the FactoryLink Tag List dialog box, where you can browse the tags in your FactoryLink application

4 Click OK to create the group.

Modifying a Tag Group

1 To modify an existing FactoryLink tag group, click on the group name in the browse pane and do one of the following:

• Click on the Groups menu and then click Group Properties.

• Right-click on the group name and click Properties.

2 In the Group Properties dialog, make the needed changes and then click Accept Changes.

Deleting a Tag Group

Note: You cannot delete a FactoryLink tag group unless the group is empty. Delete the tags within the group and then delete the group.

To delete a FactoryLink tag group, click on the group name in the browse pane and do one of the following:

• Click on the Groups menu and then click Delete Group.

• Right-click on the group name and click Delete Group.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 369: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Explorer

Working with FactoryLink Tags in OPC Explorer

In OPC Explorer you can create, modify, or delete FactoryLink tags and map tags to OPC items on remote servers. The OPC Explorer directly modifies the FactoryLink configuration files, eliminating the need to use the Configuration Explorer to set up OPC connectivity.

Creating a Tag

As you create the tag, you will also map it to the appropriate OPC item.

1 If necessary, create a FactoryLink tag group to contain the tag. See “Creating a Tag Group” on page 358 for details.

2 Click on the group name in the Browse Pane and do one of the following:

• Click the Tags menu and then click Add Tag.

• Click the Add Tag toolbar button.

• Right-click on the group name and click Add Tag from the shortcut menu.

3 In the Add Tag dialog box, enter a name in the Data Tag Name field.

4 Select the appropriate Requested Type.

5 Optionally, you can select the Time Tag and the Quality Tag check boxes.

Note: FactoryLink tags do not natively support the timestamp and quality properties defined by the OPC standard. To implement these features, you can create additional tags to contain this information. The Time Tag and Quality Tag check boxes are the mechanism for enabling this functionality in FactoryLink.

6 Click the ellipsis button under OPC Item ID to display the OPC Items dialog box, where you can map the tag to the appropriate OPC item.

7 If known, you can enter the Access Path and Item Name of the OPC item you want to map to the tag. Alternately, use the Browse Items pane to locate the OPC item.

Note: The Access Path is an OPC feature that is not supported by all OPC servers. Refer to the specific server documentation for details.

8 If the server has a large number of items to browse, you can use the Filter field to limit the items displayed. Wildcards like * and ? are supported in the filter.

FactoryLink Device Interfaces Using OPC and Other Technology / 359

Page 370: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)OPC Explorer

36

9 Select the Data Type from the choices. This is the data type the server converts the

item to before transmitting the value to FactoryLink.

10 Click OK to close the Tag Properties dialog box.

11 Click OK to close the FactoryLink Add Tag dialog box.

Modifying Tag Properties

1 To modify an existing tag’s properties, click on the tag name in the browse pane and do one of the following:

• Click the Tags menu and then click Properties.

• Right-click on the tag name in either the browse pane or the detail pane and then click Properties from the shortcut menu.

The FactoryLink Add Tag dialog box appears.

2 Make the needed changes to the tag properties that display in this dialog box.

3 If necessary, click on the OPC Link button to display the Tag Properties dialog box.

4 Make any necessary changes to the OPC mapping and then click OK to close the Tag Properties dialog box.

5 Click OK to save your changes and close the FactoryLink Add Tag dialog box.

Deleting a FactoryLink Tag

To delete a FactoryLink tag, click on the tag name in the browse pane and then do one of the following:

• Click on the Tags menu and then click Delete Tag.

• Right-click on the tag name in either the browse pane or the detail pane and then click Delete from the shortcut menu.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 371: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC Explorer

Mapping OPC Items to FactoryLink Tags

An alternate means of making connections between FactoryLink Tags and OPC server items is to use the drag-and-drop capabilities of the OPC Explorer. You can drag items from the OPC server tree and drop them into FactoryLink tag groups. The OPC Explorer will create the necessary FactoryLink tags dynamically.

Perform the following steps to map directly from OPC items to FactoryLink tags.

1 Create one or more FactoryLink tag groups. See “Creating a Tag Group” on page 358.

2 Use the browse pane to locate the OPC items to map to FactoryLink tags. See “Browsing OPC Items” on page 356.

3 Select one or more server items and drag the items onto a tag group in the browse pane. You can use the Shift or Ctrl key to select multiple items, as well as using all the standard Windows cut, copy, and paste operations.

4 Drop the items on the tag group.

You can create a new FactoryLink tag group by dropping the selected items on the root FactoryLink Tags folder. The New Group dialog box displays, where you can enter the appropriate group information to create the group.

The Create Link OPC Tags dialog box displays, where you can create the necessary FactoryLink tags.

Note: If you selected multiple OPC items in a previous step, the number of items displays in the OPC Items Available box. You can create individual FactoryLink tags for each OPC item or click the Create Array Tag to create a FactoryLink array tag to hold the items.

5 Enter a name for the tag in the Tag Name field.

6 Select the appropriate Tag Type from the choices.

7 (Optional) Select the Create Time Tag, SecTime Tag, or Create Quality Tag check boxes.

8 If the tag is a message tag, you must enter the Message Length.

9 Click OK to create the tag and close the Create Link OPC Tags dialog box.

If multiple OPC items were selected, the dialog box reappears until all necessary tags are created.

FactoryLink Device Interfaces Using OPC and Other Technology / 361

Page 372: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Configuring the OPC Client

36

CONFIGURING THE OPC CLIENT

The OPC Client Task must be configured properly to access data items on OPC servers. This can be accomplished by using the OPC Explorer or by directly entering the necessary information in the OPC configuration tables in Configuration Explorer.

This section provides instructions for completing the tables in Configuration Explorer.

OPC Server Definition Table

The OPC Server Definition table identifies specific OPC data groups to map to FactoryLink tags. You are be required to supply information about the specific OPC server where the groups reside, trigger tags associated with the group, and other information about the communication with the server.

Perform the following steps to configure the OPC Server Definition table:

1 In your server application, open Device Interfaces > FactoryLink OPC Client > OPC Server Definition.

2 Specify the following:

OPC ServerName

Name of the OPC server to connect to. The name you enter must match the network node name exactly.

Node(Workstation)

Name of the workstation where the OPC server is executing. Then name you enter must match the network node name exactly.

OPC ServerStatus Tag

Tag to hold the server status, which can be one of the following values:

Read OPCServer’s Status

Trigger Tag

A digital tag that controls polling for server status. When set or forced to ON, the client will request status information from the server.

1 OPC_STATUS_RUNNING

2 OPC_STATUS_FAILED

3 OPC_STATUS_NOCONFIG

4 OPC_STATUS_SUSPENDED

5 OPC_STATUS_TEST

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 373: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Configuring the OPC Client

Group Name of a local group that contains all OPC items being subscribed to in an OPC server.

Note: In this context, local means local to the station running the FactoryLink application.

Update Rate The fastest rate, in milliseconds, at which a server 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.

Deadband Percent This numeric value sets the percentage deadband sent to the server. The server will only apply the deadband to items in the group that have type of analog. The EU Low and EU High values (these are 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)/Sync(1) Read

Mode

This tag controls the type of I/O connection the client will expect from the server when making a read or write request. The modes are synchronous or asynchronous.

*Device(0)/Cache(1) Read

Mode

This tag constant field defines whether the data is going to be read/written from/to the server's cache or directly from the device.

Group ReadTrigger Tag

A tag that controls a read request on a complete group. When set to ON, a read request for the entire group is sent to the server.

Group WriteTrigger Tag

A tag that controls a write request on complete group. When set to ON, a write request for the entire group is sent to the server.

ON Synchronous

OFF Asynchronous

ON Device

OFF Cache

FactoryLink Device Interfaces Using OPC and Other Technology / 363

Page 374: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Configuring the OPC Client

36

Exception

Write Allowed?A digital key constant that defines whether or not exception writes are allowed at run time.

UpdateDisable Tag

A digital tag used to enable/disable updates from a server.

Group ReadDisable Tag

A digital tag that enables/disables the READ trigger.

Group WriteDisable Tag

A digital tag that enables/disables WRITE operations to a server.

Exception WriteDisable Tag

A digital tag that enables/disables exception writes. The Exception Write Allowed? key must be set to ON (see description above) for this disable tag to be useful.

Group ReadComplete Tag

A digital tag that is forced to 1 (ON) when a block read operation for this group is complete.

Group WriteComplete Tag

A digital tag that is forced to 1 (ON) when a block write operation for this group is complete.

ON Exception writes allowed

OFF Exception writes not allowed

ON Updates from server disabled

OFF Updates from server enabled

ON Group reads disabled

OFF Group reads enabled

ON Group writes disabled

OFF Group writes enabled

ON Exception writes disabled

OFF Exception writes enabled

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 375: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Configuring the OPC Client

Tag Definition Table

The Tag Definition table is used to map specific OPC data items to FactoryLink tags. You must know the exact name of the data item within the OPC server, and the OPC type the server will convert the data to before transmitting it to the FactoryLink Client Task.

Perform the following steps to configure the OPC Server Definition table:

1 In your server application, open Device Interfaces > FactoryLink OPC Client > OPC Server Definition > “your OPC Server name” > Tag Definition.

2 Specify the following information:

Data Tag A tag in which to store the data from the server.

OPC Item A tag that holds the name of the OPC item that is subscribed to.

OPC Type The OPC type that the OPC server must convert the data to on behalf of the client. The following are valid types:

Time StampSECTIME

Tag to store the timestamp information associated with the OPC item. The data type for this tag is Longana. The tag will hold the timestamp provided by the OPC server corresponding to when a data value changed in the server. The client task stores this value as SECTIME.

Time Stamp A FactoryLink tag to store the timestamp information associated with the OPC item. The tag will hold 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.

Quality A FactoryLink tag that stores the quality code associated with the data value.

BOOL Boolean

SHORT Short integer

LONG Long integer

DOUBLE Double

STRING Character string

NATIVE

FactoryLink Device Interfaces Using OPC and Other Technology / 365

Page 376: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Using VT_ARRAY Data with OPC Client

36

USING VT_ARRAY DATA WITH OPC CLIENT

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 elements 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 FactoryLink tag is a single value of type DIGITAL (Boolean), ANALOG (signed short), LANALOG (signed long), or MESSAGE (string). (The MAILBOX type tag is not applicable to the FactoryLink OPC Client task.) A FactoryLink 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.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 377: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Using VT_ARRAY Data with OPC Client

Transferring Values Between Arrays

The individual tags of a FactoryLink array and elements 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

Figure 6-2 Two Dimensional Array Mapping

[0] [0]

[1] [1]

[2] [2]

[3] [3]

[4] [4]

Tag ArrayA[0] — A[4]

OPC Item A

Tag Definition# of Dimensions = 1Dim.1: Length = 5

OPC Item’s Value# of Dimensions = 1Dim.1: Length = 5, Lower Bound = 0

[0][0] [0][0]

[0][1] [0][1]

[1][0] [1][0]

[1][1] [1][1]

[2][0] [2][0]

Tag ArrayA[0][0] — A[2][1]

OPC Item A

Tag Definition# of Dimensions = 1Dim.1: Length = 3

OPC Item’s Value# of Dimensions = 1Dim.1: Length = 3, Lower Bound = 0

[2][1] [2][1]

Dim.2: Length = 2 Dim.2: Length = 2, Lower Bound = 0

FactoryLink Device Interfaces Using OPC and Other Technology / 367

Page 378: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Using VT_ARRAY Data with OPC Client

36

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.

Mapping Mismatched Arrays

There are several cases where the array-typed OPC item's value will not be written to a FactoryLink tag array. These cases are:

• 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).

FactoryLink 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. In other words, its value is read or written as an array. The OPC Client cannot just read or write a particular element within the array (i.e. the fifth element of a ten element 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, FactoryLink 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 FactoryLink 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 FactoryLink tags.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 379: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Using VT_ARRAY Data with OPC Client

2. Read one or more individual FactoryLink 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.

Configuration of Tag-to-Item Array Mappings

The OPC Client task can be configured by directly editing its configuration tables via Configuration Explorer. It can also be configured through the OPC Explorer. 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:

FactoryLink Device Interfaces Using OPC and Other Technology / 369

Page 380: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Using VT_ARRAY Data with OPC Client

37

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" within the OPC Type field, as the OPC client task needs to receive the value as an array and not as an individual value type..

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 is likely a configuration error. The OPC Client will be unable to write the OPC item's array of values to a single, FactoryLink 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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 381: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6OPC and FactoryLink Applications

OPC AND FACTORYLINK APPLICATIONS

There are a number of factors to consider when using OLE for Process Control with FactoryLink applications. Performance and functionality can be affected by the use of OPC to communicate with data sources.

This section provides an overview of some of the issues related to using OPC with FactoryLink.

Tag Groups

Under OPC conventions, data is organized into groups. In FactoryLink, these groups are defined using either the OPC Browser (see the section “OPC Explorer” or using the OPC configuration tables in Configuration Explorer (see “Configuring the OPC Client” on page 362). You can organize your tag groups in any way. However, to achieve the best performance, there are some basic guidelines you should follow when creating tag groups.

Group According to Update Rates

It is more efficient to group together tags which have update rates that are approximately equal. Having tags with update rates of 1 second grouped with tags requiring only a 3 minute update is not efficient.

Use Fewer Groups

The nature of OPC makes it faster to transmit a large group of data 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 371

Page 382: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Program Arguments

37

PROGRAM ARGUMENTS

The following program arguments are valid for the current revision of FactoryLink at the time of publishing. Not all listed arguments and their parameters may be implemented in earlier versions of FactoryLink.

FactoryLink Task Argument Description

OPC Client -d Print debug information of all levels in Shared domain.

-l Log debug information of all levels to the OPC_Client log file.

-x<#> Log specific level of debug information to the log file. (# = 1 to 9)

OPC Server -f All tag writes are forced writes.

-m<#> Sets the maximum length for message tag reads and writes.(default = 80)

-d Display the debug information on all levels in the Shared domain.

-l Log the debug information on all levels in the Shared domain.

-x<#> Log debug information of a specific level in the log file.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 383: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Troubleshooting

TROUBLESHOOTING

This section describes FactoryLink OPC functions. Most problems encountered will be related to system configuration, specifically network permissions, DCOM configuration, and server registration.

The troubleshooting procedures that follow are divided into two main sections.

• Configuration Troubleshooting addresses issues you may encounter when configuring the OPC Client Task.

• Run-Time Troubleshooting covers problems with data updates or invalid/corrupt data.

Configuration Troubleshooting

The following paragraphs provide guidance for troubleshooting the problems most commonly encountered when configuring the FactoryLink OPC Server Task using the OPC Explorer.

No Computers Listed on Network

Cause: Network access is unavailable or configured incorrectly.

Action: Verify that the network is available. Verify that the network domain and privileges are configured correctly.

Unable to Locate Specific Node on Network

Cause: Node not configured correctly or unavailable.

Action: Verify that the node is running. Verify that the node is configured correctly. This error typically occurs when using the Browse Node function in OPC Explorer, and the node name is entered incorrectly.

Node Not Identified as OPC Server

Cause: OPC server application not registered.

Action: Ensure that the OPC server application is registered on the node. Refer to the documentation for the server application for specific instructions on registering the server.

FactoryLink Device Interfaces Using OPC and Other Technology / 373

Page 384: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Troubleshooting

37

Unable To Connect To OPC Server

Cause: OPC server application not registered properly. This can occur if the application is moved after being registered or installed.

Action: Ensure that the OPC server application is registered on the node. Refer to the documentation for the server application for specific instructions on registering the server.

Unable To Locate an OPC Item

Cause: Browsing of OPC items not supported by server.

Action: Not all servers support item browsing. To configure the Client Task, you will need to enter the exact names of the OPC items manually.

Cause: Server not configured properly.

Action: Ensure the OPC server application is properly configured.

Unable To Create a FactoryLink Tag Group

Cause: OPC Explorer not installed properly.

Action: Reinstall the OPC client components.

Cause: Bad or missing .AC file in the FactoryLink application.

Action: Reinstall the OPC client components.

Cause: FactoryLink flapp environment variable set improperly.

Action: Ensure flapp environment variable is set to the correct directory.

Cause: FactoryLink application is corrupted or is the wrong version.

Action: The FactoryLink OPC extensions will only work with applications created for version 6.5 or later. If your application was created with an earlier version, convert it to 6.5. If it is the correct version, restore the application from a known good backup.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 385: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Troubleshooting

Creating a FactoryLink Tag

Cause: Illegal tag name, typically using invalid characters.

Action: Ensure the tag name conforms to FactoryLink requirements. See the Fundamentals Guide for more information on valid tag names.

Cause: Tag limit exceeded in the FL Lite version.

Action: Upgrade to a version of FactoryLink that will support the required number of tags. Contact your sales representative for availability.

Run-Time Troubleshooting

The following paragraphs provide guidance for troubleshooting problems commonly encountered at run time.

Client Task Troubleshooting

Errors associated with the FactoryLink 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.

Data Not Updating

Cause: OPC server not running.

Action: Ensure that the OPC server is running correctly.

Cause: OPC server configured incorrectly.

Action: Ensure that the server is configured properly. Refer to the documentation for the server.

Cause: OPC items 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 exactly match the names on the server.

Cause: Update Disable tag set to ON.

Action: Ensure that your application is not setting the tag controlling Update Disable for the FactoryLink tag group to ON.

FactoryLink Device Interfaces Using OPC and Other Technology / 375

Page 386: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Troubleshooting

37

Cause: Update rate 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 up a FactoryLink tag to be updated 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.

Cause: Read Disable tag set to ON.

Action: Ensure that your application is not setting the tag controlling Read Disable for the FactoryLink tag group to ON.

Cause: Write Disable tag set to ON.

Action: Ensure that your application is not setting the tag controlling Write Disable for the FactoryLink tag group to ON.

Invalid or Corrupt Data

Cause: OPC server error.

Action: Check the OPC server and ensure it is operating properly. If the server seems to be operating properly, see “Error Logging” on page 376.

Server Task Troubleshooting

Typically problems with the FactoryLink OPC Server Task are a result of an invalid or corrupt installation. You might need to reinstall the Server Task. If this fails to correct the problem, see “Error Logging” on page 376.

Error Logging

To assist in troubleshooting certain problems with OPC connections, both the Client Task and the Server Task support error logging. To enable error logging, open Configuration Explorer and then open the System Configuration Information table. Click on the appropriate Task Name and press the Tab key to access the Program Arguments column of the table. The applicable arguments are listed below.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 387: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Troubleshooting

There are two logging arguments associated with the OPC tasks. You can specify different levels of error logging:

-d<n> Enables debug error logging to the screen. The <n> parameter specifies the level of error logging, ranging from 1 (least verbose) to 9 (most verbose). It is recommended that you use level 1 for most situations.

-l<n> Enables debug error logging to a file. The <n> parameter specifies the level of error logging, ranging from 1 (least verbose) to 9 (most verbose). It is recommended that you use level 1 for most situations.

Note: Use caution when selecting the level of error logging. In most situations, it recommended that you use only level 1. Using higher levels of detail, particularly levels 5 and higher, can degrade system performance.

Error Messages

FactoryLink will display error messages in the Run-time Manager screen in the event of a malfunction. Additional detail may be obtained by activating the error logging functions (as described in the “Error Logging” section) and specifying a level greater than 1.

Client Task Error Messages

Abnormal Stop

Cause: The FactoryLink client task terminated abnormally due to a fatal error.

Action: Check other error messages for details.

Failed to create the Trigger Manager during start up

Cause: The Trigger Manager is used to detect tag changes. It did not initialize properly. This message typically appears when another, more serious error exists. Contact customer support.

Failed to open CT file: <filename>

Cause: The specified CT file could not be opened. Usually this is because it is missing.

FactoryLink Device Interfaces Using OPC and Other Technology / 377

Page 388: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Troubleshooting

37

Action: From the command line, enter the command ctgen opcclnt to

regenerate the CT file.

CT structure size of <filename> is incorrect.

Cause: The specified CT file’s structure does not correspond to 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 process the OPC enable tag: <tagname>

Cause: The client task did not process the specified tag properly, usually because it expects a digital tag and the tag specified is another type.

Action: Ensure that the specified tag is digital.

OPC server failed to add OPC item.Node: <nodename>, Server:<servername>,Group:<groupname>, OPC Item: <itemname>, ret code= <return code>.

Cause: The specified OPC item may not be defined or configured correctly in the server.

Action: Verify that the item exists in the server and reconfigure the client task.

Tag has a bad data type. Seg: <segment>, Offset: <offset>.

Cause: In processing a FactoryLink tag, it was detected that the tag’s data 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 FactoryLink 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.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 389: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Troubleshooting

Out of memory.

Cause: There is insufficient memory available to run the program.

Action: Check memory size and close any unnecessary programs to free up memory resources. You may need to add physical memory to your system.

OPC Client task initialization failed.

Cause: A general initialization failure.

Action: See other error messages to determine specific problems.

fl_get_tag_info failed for tag with Seg: <segment>, Offset: <offset>.

Cause: An error was encountered while processing a FactoryLink tag.

Action: Ensure the CT file is current. It may be necessary to regenerate the CT file by running ctgen opcclnt from the command line.

Write tag to OPC failed, Tag Seg <segment>, Offset <offset>.

Cause: An OPC write event failed for a specific FactoryLink tag.

Action: Contact customer support.

fl_get_tag_info failed on a block of tags.

Cause: An error was encountered while processing a FactoryLink tag. Make sure the CT file is current & has been generated.

Action: Ensure the CT file is current. It may be necessary to regenerate the CT file by running ctgen opcclnt from the command line.

fl_write failed.

Cause: A write attempt of a value into a FactoryLink tag failed.

Action: Contact customer support.

fldtp_insert failed. Tag Seg %d, Offset %d.

Cause: An attempt to insert an FL tag into a watch list failed.

Action: Contact customer support.

FactoryLink Device Interfaces Using OPC and Other Technology / 379

Page 390: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Troubleshooting

38

fl_read failed.

Cause: A read operation of a FL tag failed.

Action: Contact customer support.

Server Error Messages

Abnormal Stop

Cause: Server task has stopped due to a fatal error encountered by the server.

Action: Check for other error messages to identify the specific problem (for example, out of memory).

OPC Server task is not authorized to run

Cause: You do not have the proper configuration sequence to run the server task.

Action: Contact your sales representative to authorize the OPC client task.

Failed to access all system tags.

Cause: FactoryLink accesses to system tags have failed.

Action: Verify that your {FLAPP} environment variable is set correctly. It may be necessary to regenerate the CT file by running ctgen -r from the command line.

Failed to open the database file.

Cause: The object CT file could not be opened.

Action: Regenerate it by invoking ctgen -r.

Bad tag data type. Tag Seg: <segment>, Offset: <offset>.

Cause: While processing the specified FactoryLink tag, an illegal tag type was detected.

Action: The object CT may need to be regenerated. It may be necessary to regenerate the CT file by running ctgen -r from the command line. If the problem persists, call customer support.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 391: Device Interfaces Using Op Can Dot Her Technologies

OLE FOR PROCESS CONTROL (OPC) | 6Troubleshooting

Failed to add tag <tagname>, to the watch list. Tag Seg: <segment>, Offset:<offset>.

Cause: The server failed to add the FactoryLink tag (OPC item) to the watch list of tags as requested by an OPC client. You may have a bad tag defined (for example, an illegal tag) in your application.

Action: Verify that the tag is legal and properly defined in your FactoryLink application.

OPC Server task failed to initialize.

Cause: A general initialization failure.

Action: See other error messages to determine specific problems.

Out of memory.

Cause: There is insufficient memory available to run the program.

Action: Check memory size and close any unnecessary programs to free up memory resources. It may be necessary to add physical memory to your system.

Failed to create the Trigger Manager.

Cause: The Trigger Manager is used to detect tag changes. It did not initialize properly.

Action: This message typically appears when another, more serious error exists. Contact customer support.

fl_get_tag_info failed. Tag Seg <segment>, Offset <offset>.

Cause: Failed to obtain tag information.

Action: Verify the validity of the tag segment & offset.

fl_get_tag_info failed on a block of tags.

Cause: Failed to obtain tag block information.

Action: Verify the validity of the tag block.

FactoryLink Device Interfaces Using OPC and Other Technology / 381

Page 392: Device Interfaces Using Op Can Dot Her Technologies

6 | OLE FOR PROCESS CONTROL (OPC)Troubleshooting

38

fl_read failed

Cause: An FL read failed.

Action: Contact customer support.

Permission was denied on a Write attempt.

Cause: An OPC client has attempted a write on the FactoryLink OPC server which was refused.

Action: Check the installation bits for the server to determine if FULL-CONTROL is available.

Attempt to write to a tag not entered in the watch list.

Cause: A tag is not insertable into the watch list.

Action: Check for other specific messages to pin point the problem.

Data type mismatched. Conversion failed - Tag Seg <segment>, offset <offset>.

Cause: An attempt to convert from a variant to a FactoryLink tag has failed.

Action: Verify that the tag segment and offset are valid.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 393: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 7

OPC Data eXchange (ODX)

OVERVIEW

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 383

Page 394: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Overview

38

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® Foundation System, including ECI Converter Task

• ODX OPC Data eXchange Driver

• OPC Server(s) for External Device(s) supporting OPC Data Access Ver1.0A or Ver2.0

Ø ECI/OPC Dataset ConverterOPC Item / AttributesAction=ReactionDecoder / EncoderScale / NormalizeStatistical DataIndirect Addressing

Ø IMX Interface Read/Write Dataset

Ø ODX OPC Data eXchangeOPC Group / Dataset DefinitionOPC Server Name(s)

Ø OPC Server(s)External Device(s), PLC(s)

Read Cycle Write Interval

Update Delay

Object I/O Tags

ECI Object ControlDataset Exchange

ReadMailbox

WriteMailbox

COM/DCOM Network

ECI Object InformationRdElem(1) | I/O_Tag(1) | WrElem(1)RdElem(2) | I/O_Tag(2) | WrElem(2)RdElem(3) | I/O_Tag(3) | WrElem(3)RdElem(x) | I/O_Tag(X) | WrElem(x)

ECI Object Reference Dataset Definition

OPC ConnectionsNetwork Server/Station Names

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 395: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Configuration

CONFIGURATION

OPC Server Connection

In your server application, open Enhanced Communication > ODX OPC Data eXchange > ODX OPC Server Connection.

Connect Table Name of up to 15 characters to identify a particular OPC Server connection. Each connection is associated with an ECI Object Reference table in order to link OPC Groups of Items as Read/Write Datasets with the ECI Converter for further processing.

OPC Server Name of up to 255 characters must match the registered name of the server accessed. If you want to connect a server at a particular node, then enter the name of the node or workstation and use a colon before the Server name, for example, NodeName:ServerName. Note that the node name must match exactly the network node of the host where the OPC Server resides.

Function and Arguments (option) to be applied on each particular connect, for more information and global settings see Program Arguments. Multiple Functions must be separated by a space:

VMode=0 Verbose Mode to log information for the particular server connection to an individual file named: {FLAPP}\SHARED\LOG\ODX_[NodeName]ServerName.LOG, where is the line number of the Server Connection table. Valid levels are 0..511; start trouble hooting with VMode=7 to prevent a possible harddisk overflow, default=0 (no logging).

Alive=10 Alive check timeout [s] to supervise this connect (watchdog) if no data is transmitted, default=10 [s].

SimReq=5 Max number of simultaneous read requests (asynchronous) processed for this link, default=5.

FastUpd=3 FastUpdate for read OnChange only is defined by ECI "Read Interval after Change". It is enabled as long as two or more read requests appear within the “Read Interval after Change” times the number specified for this argument, default=3 (recommended). You can suppress FastUpdate by setting FastUpd=0.

FactoryLink Device Interfaces Using OPC and Other Technology / 385

Page 396: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Configuration

38

SlowUpd=10 SlowUpdate for read OnChange only is defined by ECI "Read

Interval Continuous". It is enabled 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.

Mux=0 Multiplexer: specifies a value to which the Link Control Tag must be set to enable the link, default=0. A non matching value will stop transmission while the link remains active (standby).

DisConn= -1 Disconnect: 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.

ReConn=10 Time delay to reconnect a link after failure, default=10 [s].

InitDelay=10 Time to initialize data transfer. This may unburden the system at (re)connection, default=10 [s].

RdCache Read refresh data from Server Cache. By default, data is always read from device.

LimUpd=86400 Limit the slowest update rate default=86400 [s]; some OPC servers do not allow for the max of 4’294’967 [s].

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). Note, 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) as for example E3=-1, E8=200, E1=24.5, E4=1.37E2 etc. A missing or an invalid definition will execute the R/W Access as normal (without Error Substitute Value).

File=filename Substitute or expand the ECI Object Reference table by an ASCII file. All lines in the file must be plain text with column entries as described below, separated by a TAB and terminated with ENTER.

Link Control Tag (option) of type Digital, Analog or LongAna to enable, disable or disconnect the link, depending on the Functions Mux= and/or DisConn= specified. The tag, if forced written to Mux=, can be used as a trigger to refresh (update) data that is read OnChange. If Functions Mux and DisConn are not defined, then a value of zero or no specified tag enables normal operation.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 397: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7ECI Object Reference

Error/Status Tag and/or Error/Status Message Tag (option) of type Analog, LongAna or Message respectively, used for information on the particular link. Apply ECI to decode a value where: Bit0=Active (starting, running or disabled without error), Bit1=Starting, Bit2=Running, Bit3=Disabled, Bit6=NoJob, Bit7=Terminated, Bit8=Error. For more details, see INFORMATION and ERROR MESSAGES.

ECI OBJECT REFERENCE

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).

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

1) Emulation of RAPDand EDI Drivers: useECI Decimal Converter

2) OPC SpecificConfiguration: useECI/OPC Item Converter

Type of configuration:

FactoryLink Device Interfaces Using OPC and Other Technology / 387

Page 398: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)ECI Object Reference

38

Emulation of RAPD and EDI Drivers

In this case, 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. Note that you must adjust the ECI Read and Write Mode in order to correspond with the addressing of the PLC.

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.

OPC Specific Configuration

In this case, OPC Items are specified in ECI/OPC-specific tables, while datasets are automatically created. This method accepts any OPC item naming and additionally supports the following standard OPC attributes:

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.

Rd CDE ECI Conversion Codes for Standard OPC Attributes (for detailed info see ECI Guide)

.UTC

.TIM/.TIX

.TIH/.TID

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

.QA/.QX

.QS/.QL

Quality Native (QQ=Quality, SSSS=Status, LL=Limit Flags) 0..255 and Quality Vendor Specific 0..255 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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 399: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7ECI Object Reference

ECI Object Table Name must be identical to the ECI or ECI/OPC Object Information table, where the specified OPC items are converted and scaled to/from individual FactoryLink 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 (see examples below).

Rd/Wr Access may be defined for read and/or write from/to the same - as well as from/to different datasets or OPC groups. Note that the OPC Server may prevent read and/or write access independently per OPC item. Move the cursor to the appropriate column and enter a name from the list as follows:

For Emulation of RAPD and EDI Drivers, you can read data with an Error Substitute Value E=E0..E9 that is, the OPC item is set to a predefined value, if the item's quality is Bad or Uncertain. While E0 will substitute the value by 0 (zero), the Substitute Value for E1..E9 can be specified in the Function and Arguments column, for example: E3=-1, E8=200, E1=24.5, E4=1.37E2 etc. A missing or an invalid definition will execute the R/W Access as normal (without substitution).

Statistics functions provide performance information on a particular or on all connections. Data must be polled as described for Read Prio. It is decoded as shown in the configuration example 3) below (you may dump the information to an array using the ARYn:x:y:z Function of ECI). Access codes SRD and SRS use counters that are cleared only at shutdown of the system. Codes SRDC and SRSC clear the counters after each poll request, that is, the values indicate a poll interval. This can be used to display for example the number of bytes transmitted every 10 sec. Note, the number of

OPC Read/Write Access Read Read Only (Polled or OnChange)

Any number allowed per table Rd/Wr Read and/or Write (any type as above)

Write Write Only (Exception, Block or Dataset)

Emulation of RAPD and EDI only ReadE Read Only with Error Substitute Value E=E0..E9

RdE/Wr Read with Error Substitute Value E=E0..E9 and/or Write

Statistics Read Functions SRD Statistics Read of this Device/Connection

One of each type allowed per table SRDC Statistics Read of this Device/Connection and Clear

One of each type allowed for all tables

SRS Statistics Read Sum of all Devices/Connections

SRSC Statistics Read Sum of all Devices/Connections and Clear

FactoryLink Device Interfaces Using OPC and Other Technology / 389

Page 400: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)ECI Object Reference

39

bytes indicated represent data values only and do not include the timestamp/quality which are 10 bytes per item. It shows data transmitted by (D)COM without any overhead nor any data sent through IMX.

OPC Item Name and optional Addr {:i} is applied as follows:

Emulation of RAPD and EDI Drivers

Requires an entry in order to identify one or multiple OPC items as a dataset (or part of it) by the following syntax:NNNN addresses a single OPC Item or ItemArray e.g., "Int_W20", "Mot77set,10" orNNN{:i}N addresses multiple OPC Items e.g., "Int_W{20}", "Mot{77:3}set,10," where ...NNNN is the name of OPC item(s); any char except braces { }; required for this method is the first item address number – 0..65500 (start) in OPC Server; required for multiple itemsi is the item address increment – 1..1000; example: 0:4 to create =0,4,8,12 option; default=1N is the name extension for multiple items; any chars except braces { }, optionNote that {:i} also defines the "First Elem Addr" setting (default) unless specified in that 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 so as to correspond with the tag size of data accessed in the external device. Valid entries for ODX are H1, L1, H2, L2, H4 or L4 =default.You can enter a list of OPC items in order to form a dataset using the same table name and combining entries with syntax shown above as desired. Note that OPC ItemArrays are recommended in Read Datasets due to little configuration work and the performance of data transmission. For writing ItemArrays, 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 ArrayTags. 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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 401: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7ECI Object Reference

ad

First Elem Addr :i is used for the method Emulation of RAPD and EDI Drivers. In this case, specify the ECI First Tag Address of the Dataset (or part of it) by the following syntax:

ArrayElem or {Items} is used only for the method Emulation of RAPD and EDI Drivers. Enter the number of ArrayTags of a single item or ItemArray, or the number of Items if multiple Items shall be identified as a dataset or part of it. Note that the size of an ArrayTag or {Item} is specified by the ECI tag size (boundary) times the Addr Increment (i), an ECI dataset is limited to 64 kbytes (number of tags times boundary). Valid entries are: 1..65500 or none for the method OPC-Specific Configuration.

OPC-Specific Tables

You may apply this field (option) as a template extension for all items specified in the corresponding ECI/OPC Information table. Enter, for example, [PLC] to specify items [PLC]Item1...[PLC]ItemX. This is useful because you do not need to enter full names PLCName+Area+WordAddr+Length, for example, required for...Allen-Bradley typical item name = [PLCName]N15:3,L2Siemens S7 typical item name = S7:[ConnName|VFDName|AccessPoint]DB15,B3,2Note that the length of any (assembled) item name is limited to 127 characters for ODX.

= (default) set value equal {:i} of "OPC Item Name" for multiple Items or 0:1 for ItemArrays:i specifies a dedicated address, for example, "20", "77:3", where ... is the ECI First Tag (start) Addr 0..65500; default=0i is the ECI Addr increment 1..1000; example: 1:3 for =1,4,7 specifies OPC Item size re(option); default=1

FactoryLink Device Interfaces Using OPC and Other Technology / 391

Page 402: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)ECI Object Reference

39

Read Priority specifies how data is being read and at what priority.

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. Valid functions are:

ECI Read IntervalChange/Continuous

ECI Read Trigger orFunction RDTRIGG

ODX Control Tag Used as Refresh Trigger

ODX Auto Refresh at Startup or Link Enable

Fast/Slow Update Rates for OPC Servers

Auto Fast Update selection at fast polling

Yes, if forced to when using Function Mux=

Yes

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 403: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7ECI Object Reference

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.

1Poll...9Poll Data polling may be compared to triggered block read which transmits entire datasets. This method may be less productive, but it is useful for block transfer. Use 1Poll...9Poll if polling is desired. Note that 1Poll provides nine times faster polling than 9Poll if read jobs are being queued. Write priority is, however, always set to 1. Note that Statistics Read Functions require polling. Valid functions are:

ECI Read IntervalChange/Continuous

ECI Read Trigger orFunction RDTRIGG

ODX Control Tag Used as Refresh Trigger

ODX Auto Refresh at Startup or Link Enable

Automatic Fast/Slow Polling Interval

Standard Poll Trigger No No

FactoryLink Device Interfaces Using OPC and Other Technology / 393

Page 404: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Sample Configuration of Communication Objects

39

SAMPLE CONFIGURATION OF COMMUNICATION OBJECTS

Emulation of RAPD and EDI Drivers

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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 405: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Sample Configuration of Communication Objects

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 [s] from the OPC Server. In case of writing the particular data is however fed back at a rate of 0.7 [s] (ECI Read Interv) while previous data would be restored after 3 [s] (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 ArrayTags, because this is not supported by OPC.

FactoryLink Device Interfaces Using OPC and Other Technology / 395

Page 406: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Sample Configuration of Communication Objects

39

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 407: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Sample Configuration of Communication Objects

with its timestamp of [ms] resolution. For 9kMotor47, access rights and timestamp [SecTime] as well as bit 15 (indicating reversed 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).

FactoryLink Device Interfaces Using OPC and Other Technology / 397

Page 408: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Sample Configuration of Communication Objects

39

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 409: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Sample Configuration of Communication Objects

Data for the above 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.

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:

FactoryLink Device Interfaces Using OPC and Other Technology / 399

Page 410: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Sample Configuration of Communication Objects

40

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.

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 411: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7OPC Server, DCOM and Windows Setup

OPC SERVER, DCOM AND WINDOWS SETUP

Note: Important! 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:

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.

Registry Value Names

DefaultAccessPermission Everyone Interactive System Network

DefaultLaunchPermission Everyone Interactive System

FactoryLink Device Interfaces Using OPC and Other Technology / 401

Page 412: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)OPC Server, DCOM and Windows Setup

40

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.

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:

Ensure that you apply the latest version of the OPC server from the supplier.

Action: Check Customer Support on the Internet or consult the supplier.

ODX cannot communicate with an OPC server.

Action: Check the running OPC server and its items, using test 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 takes time.

Cause: (D)COM might be slow to connect.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 413: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7OPC Server, DCOM and Windows Setup

PLC memory access might be slow because it is synchronized with the CPU cycle.

Action: Use ECI’s Action/Reaction method for commands sent to and read back from the PLC.

Action: Use multiple connections to split fast and slow jobs.

Numerous connections to an OPC server might drop data throughput for a connect.

Cause: This depends on the OPC server.

Action: Use ECI Read Interv and Read Prio of ODX to tune your system.

Check Debug and Log Information in file {FLAPP}\SHARED\LOG\ODX*.log

Action: Begin with Verbose Mode 7 for the suspected link. See 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 reconnected.

Action: Check the network load. It might be high due to other actions like a file transfer.

A Dataset from/to an OPC server is not transmitted or is partially transmitted.

Action: Ensure that all data accessed in the OPC server has been created.

Some OPC server parameters may be adjusted in the Registry using REGEDIT.

Action: Do not adjust these parameters unless clearly advised by the supplier.

Data in FactoryLink and the PLC or external device is inconsistent.

Action: When assembling tags in ECI to create, for example, a 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 403

Page 414: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)OPC Server, DCOM and Windows Setup

40

Data translation methods: Emulation of RAPD and EDI drivers and OPC-Specific Configuration.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 415: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Program Arguments

PROGRAM ARGUMENTS

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 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 of enabling a log action in order to display...

# 0 = No logging 16 = Database Change_Read information# 1 = ODX Server state changes 32 = Memory management information# 2 = ODX Status messages 64 = All internal FUNCTION calls# 4 = OPC Connection, Group and Item handling errors 128 = Read Mailbox information ODX_ECI (–DRMbx in ECI)# 8 = Configuration Table Read information (ODX.LOG only) 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)

FactoryLink Device Interfaces Using OPC and Other Technology / 405

Page 416: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Program Arguments

40

-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)

-DisConn=<#> 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.

-ReConn=<#> Time delay # in seconds to reconnect a link after failure (default = 10)

-InitDelay=<#> Time delay # 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.

Argument Description

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 417: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Program 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 of enabling a log# action in order 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

-LimUpd=<#> You can limit the slowest update rate in seconds (default = 86400) since some servers do not allow for the OPC max of 4‘294‘967.

-SleepTime=<#> Adjust process speed/CPU load by suspending program (sleeping) in milliseconds every scan, valid for main task only. (default = 70)

Argument Description

FactoryLink Device Interfaces Using OPC and Other Technology / 407

Page 418: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Program Arguments

40

# 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# (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 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.

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 419: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Information and Error Messages

INFORMATION AND ERROR MESSAGES

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 the 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 Using OPC and Other Technology / 409

Page 420: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Information and Error Messages

41

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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 421: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Information 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:

Label in ODX.TXT 4xx/5xx Link Error/Status reported to Message Tag or value ...

Analog Bit ON

OPC_INACTIVE 400 Inactive (0x00040000 text as available or Err

6xx/7xx)

0 all OFF

OPC_STARTING 401 Active/Starting (0x00040000 text as available or Err

6xx/7xx)

3 Bit 0+1

OPC_RUNNING 402 Active/Running

(0x00040000 text as available or Err

6xx/7xx)

5+ST Bit 0+2

OPC_DISABLED 403 Active/Disabled

(0x00040000 text as available or Err

6xx/7xx)

9+ST Bit 0+3

OPC_NO_JOB 406 Nothing to do (No ODX configuration for this Connect Inactive)

0 all OFF

OPC_TERMINATED 407 Terminated (0x00040000 text as available or Err

6xx/7xx)

128 Bit 7

OPC_ERROR 501 Error/Enabled (0xD0040001 text as available or Err

6xx/7xx)

256+ST Bit 8

OPC_DISABLEDANDERROR

503 Error/Disabled (0xC004000B text as available or Err

6xx/7xx)

264+ST Bit 8+3

Note, OPC Status Codes are samples only, for detailed information see OPC Interface Specification OPCError.h

OPC Status Code: |

||

|||

0000..01FFhex Microsoft specific

0200..7FFFhex OPC standard

8000..FFFFhex Vendor specific

ST=Server Status

Apply ECI to decode Bit or Nibble values as shown below.

OPC Facility Code:

| 000..FFFhex Program or location

OPC Severity Code:

0..3hex Success message

4..7hex Informational message

8..Bhex Warning message (A..B

Vendor specific)C..Fhex Error message (E..F Vendor

specific)

FactoryLink Device Interfaces Using OPC and Other Technology / 411

Page 422: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Information and Error Messages

41

t

Error Bit Server Connect Status Nibble N1 ODX Connect Status Nibble N0

Error StatusTag

AnaVal

Bit8 (256)Connect

Error

Bit7 (128)Dis-

Connect

Bit6 (64)Server

Status 4

Bit5 (32)Server

Status 2

Bit4 (16)Server

Status 1

Bit3 (8)ConnectDisabled

Bit2 (4)ConnectRunning

Bit1 (2)ConnectStarting

Bit0 (1)ConnecActive

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/Run

25 0 0 0 0 1 1 0 0 1

Active/Disabled/Test

89 0 0 1 0 1 1 0 0 1

Link Terminated 128 0 1 0 0 0 0 0 0 0

Error/Enabled/Lost

256 1 0 0 0 0 0 0 0 0

Error/Enabled/Failed

288 1 0 0 1 0 0 0 0 0

Error/Ena/NoConfig

304 1 0 0 1 1 0 0 0 0

Error/Ena/Suspended

320 1 0 1 0 0 0 0 0 0

Error/Disabled/Lost

264 1 0 0 0 0 1 0 0 0

Error/Disabled/Failed

296 1 0 0 1 0 1 0 0 0

Error/Dis/NoConfig

312 1 0 0 1 1 1 0 0 0

Error/Dis/Suspended

328 1 0 1 0 0 1 0 0 0

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 423: Device Interfaces Using Op Can Dot Her Technologies

OPC DATA EXCHANGE (ODX) | 7Information and Error Messages

Connect Status Nibble N0 NibbleValue

Error Bit(Bit8)

ConnectDisabled

ConnectRunning

ConnectStarting

ConnectActive

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(Hot-Standby)

9 0 1 0 0 1

Server Status Nibble N1 NibbleValue

Error Bit

(Bit8)

Dis-Connec

t

ServerStatus

4

ServerStatus

2

ServerStatus

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 SuspendedOPC_SERVER_SUSPENDED

4 1 0 1 0 0

Server TestOPC_SERVER_TEST 5 0 0 1 0 1

Server Link Terminated/Disconnected 8 0 1 0 0 0

FactoryLink Device Interfaces Using OPC and Other Technology / 413

Page 424: Device Interfaces Using Op Can Dot Her Technologies

7 | OPC DATA EXCHANGE (ODX)Information and Error Messages

41

The errors below may be displayed by ECI 021 Table %s: RAPD Error 6xx/7xx=0xhhh info, however, only if an ECI Read Mailbox has been assigned. They also are displayed on the Error Status/Message above or the ODX*.LOG file defined by Program Argument –VMode:

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

Label in ODX.TXT

(hhh)6xx/7xx Transmission Errors reported to ECI Task Message Tag (info)

E_XMIT_RD_0258 600 No Read Response, Timeout OPC Group/Item configuration errors or general communication errors as for example link not completely established

E_XMIT_RD_0259 601 Invalid Read Dataset/Group

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 Tecnomatix

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, Dataset/Group

Errors transmitted with acknowledge, for code. See OPC interface specification OPCError.h

E_XMIT_WR_02D1 721 Write AcknErr 0x%08.8lX, Item "%s"

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 425: Device Interfaces Using Op Can Dot Her Technologies

• • • •Chapter 8

SECS/HSMS (SDRV) Communications

OVERVIEW

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 communicationssdrv_232.exe for serial communications

The program arguments for SDRV are on page 452.

FactoryLink Device Interfaces Using OPC and Other Technology / 415

Page 426: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

41

EDITING THE SECS COMMUNICATIONS CONFIGURATION TABLES

Configuring the SECS 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

In your server application, open Device Interfaces > SECS/HSMS Communications > SECS Logical Device Control.

Field Descriptions

Logical Port The number that represents a particular communications path.

Valid Entry: 0 - 999

SECS/HSMS Indicates whether to use the SECS RS-232 or HSMS protocol for communication.

Valid Entry: SECS = RS-232HSMS = Ethernet

Com Port Specifies which COM port to use for the SECS protocol.

Valid Entry: 1 - 8

Baud Rate (required for SECS) Indicates the speed at which the task communicates.

Valid Entry: 150 4800300 9600 (default)1200 192002400

T1 Timeout 0.1 sec The SECS T1 (inter character) time-out value.

Valid Entry: 1 - 255 tenths of a second (default = 5)

T2 Timeout 0.1 sec The SECS T2 (block protocol) time-out value.

Valid Entry: 1 - 255 tenths of a second (default = 30)

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 427: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

T3 Timeout 1 sec (required for SECS and HSMS) The T3 Reply time-out value.

Valid Entry: 1 - 120 seconds (default = 10)

T4 Timeout 1 sec The SECS T4 (inter block) time-out value.

Valid Entry: 1 - 120 seconds (default = 10)

T5 Timeout 1 sec The HSMS T5 Connect Separation Timer.

Valid Entry: 1 - 120 seconds (default = 10)

T6 Timeout 1 sec The HSMS T6 Control Message Reply time-out value.

Valid Entry: 1 - 120 seconds (default = 20)

T7 Timeout 1 sec The HSMS T7 Connect time-out value.

Valid Entry: 1 - 120 seconds (default = 10)

T8 Timeout 1 sec The HSMS T8 Inter Character time-out value.

Valid Entry: 1 - 120 seconds (default = 10)

Retry Limit The SECS message retry limit.

Valid Entry: 0 - 31 (default = 3)

ACTIVE/PASSIVE (required for HSMS) Specify whether this port is the Active Entity or Passive Entity. An Active Entity 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.

Valid Entry: ACTIVE (master)PASSIVE (slave)

HOST/EQUIP The communication role of this port.

Valid Entry: HOSTEQUIP

Protocol The version of the protocol to be used.

Valid Entry: HSMS-SS94 for HSMSHSMS-94 for HSMSHSMS-93 for HSMSSECS for SECSGEM for BOTH

FactoryLink Device Interfaces Using OPC and Other Technology / 417

Page 428: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

41

Passive IP

Address(required for HSMS) The IP Address for the Passive Entity on this link.

Valid Entry: IP Address format

TCP Port (required for HSMS) The TCP Port Number the Passive Entity waits at for connection.

Valid Entry: 0 - 10000 (default = 5000)

Note: Ensure no service is using this port by checking the system host file.

Connection Estab1 sec

(required for HSMS) Enter the time to wait to establish a connection.

Valid Entry: 1 - 120 seconds (fefault = 20)

Circuit Assurance1 sec

(required for HSMS) The frequency the control messages will be sent at to verify the link is still functional.

Valid Entry: 0 - 120 seconds (default = 15)

TGRACE 1 sec (required for HSMS) The time during which the send operations will be accepted while attempting to establish a connection.

Valid Entry: 1 - 120 seconds (default = 10)

Memory Stall 1 sec (required for HSMS) The time limit to allow the other end of the link to attempt to send messages while all buffers are full.

Valid Entry: 1 - 120 seconds (default = 30)

Write Stall 1sec (required for HSMS) The time limit to wait for TCP/IP to accept data.

Valid Entry: 1 - 120 seconds (default = 20)

Last Send StatusTag

Tag name where the status for the last send operation is written.

Valid Entry: tag nameValid Data Type: analog

Msgs Sent CounterTag

Tag name where the count of messages sent is written.

Valid Entry: tag nameValid Data Type: analog

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 429: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

Msgs RcvdCounter Tag

Tag name where the count of messages received is written.

Valid Entry: tag nameValid Data Type: analog

T3/T4 TimeoutErrors Tag

Tag name where the count of time-out errors is written.

Valid Entry: tag nameValid Data Type: analog

Retry Counter Tag Tag name where the count of retries is written.

Valid Entry: tag nameValid Data Type: analog

Status Msg Tag Tag name where the status for this logical port is written.

Valid Entry: tag nameValid Data Type: message

Save the information and define the data type for any tag names displayed in the Tag Definition dialog box.

Configuring the SECS Logical Device Information Table

The SECS Logical Device Information Table is used to define 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

In your server application, open Device Interfaces > SECS/HSMS Communications > SECS Logical Device Control > “your logical port” > SECS Logical Device Information.

Field Descriptions

Error/Status TagName

(currently not implemented) Tag name where any errors for this logical station are written.

Valid Entry: tag nameValid Data Type: analog

FactoryLink Device Interfaces Using OPC and Other Technology / 419

Page 430: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

42

Logical Device

NumberThe number you assign to represent the combination of a logical port and physical station. A logical station number can be used only once.

Valid Entry: 0 - 63 (default = 0)

Device ID The number to identify a physical device.

Valid Entry: 0 - 32767 (default = 0)

Device State atStartup

The initial state of the link at startup.

Valid Entry: ON_LINEOFF_LINE

Comment (optional) The reference information about this logical station.

Valid Entry: alphanumeric string of up to 30 characters

Save the information and define the data type for any tag names displayed in the Tag Definition dialog box.

Configuring the SECS Read/Write Control Table

The SECS Read/Write Control Table is used to set 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. There should be at least one entry in this table for every device.

Accessing

In your server application, open Device Interfaces > SECS/HSMS Communications > SECS Read/Write Control.

Field Descriptions

Logical DeviceNumber

The number, originally specified in the SECS Logical Device Information Table, that represents a particular device.

Valid Entry: 0 - 63 (default = 0)

SECS-II Table ID The number of the table defined in the SECS-II Message Definition Control Table to be processed for this logical device.

Valid Entry: 0 - 32767 (default =0 )

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 431: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

Send StreamNumber

Tag name that defines the stream number of the message to be sent.

Valid Entry: tag nameValid Data Type: analog

Send FunctionNumber

Tag name that defines the function number of the message to be sent.

Valid Entry: tag nameValid Data Type: analog

Send Message ID Tag name that defines the message ID of the message to be sent. This tag is used to identify a specific message from multiple definitions of the same stream/function number.

Valid Entry: tag nameValid Data Type: analog

Send Trigger The digital tag whose value, when forced to 1 (ON), initiates a send of the message defined by the stream, function, and message ID tags.

Valid Entry: tag nameValid Data Type: digital

Send Disable The digital tag whose value, when 1 (ON), disables a triggered send of the device(s) message specified in this table.

Valid Entry: optionaltag name

Valid Data Type: digital

Send State Tag name whose value is 0 (OFF) when a triggered send of the tags specified in this table is in progress and 1 (ON) when the table is inactive.

Valid Entry: tag nameValid Data Type: digital

Send Status Tag name where the status for the last send operation for this table is written. These are GW & Associates level status codes. See “Status Return Codes” on page 456.

Valid Entry: tag nameValid Data Type: analog

FactoryLink Device Interfaces Using OPC and Other Technology / 421

Page 432: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

42

Receive Stream

NumberTag name where the stream number of the last message received is written.

Valid Entry: tag nameValid Data Type: analog

Receive FunctionNumber

Tag name where the function number of the last message received is written.

Valid Entry: tag nameValid Data Type: analog

Receive MessageID

Tag name where the message ID number of the last message received is written.

Valid Entry: tag nameValid Data Type: analog

Receive Status Tag name where the status for the last receive for this table is written. These are GW & Associates level status codes. See “Status Return Codes” on page 456.

Valid Entry: tag nameValid Data Type: analog

Read Disable The digital tag whose value, when 1 (ON), prevents the logical device from being polled for received messages.

Valid Entry: tag nameValid Data Type: digital

Command Trigger The analog tag whose value, when force written, sends a predefined command to the SECS task. Currently, the only command available is the On Line/Off Line state of Logical Device. Additional commands may be added in the future.

Command: ON/OFF Line StateValue: 1

Valid Entry: tag nameValid Data Type: analog

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 433: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

Command Value Enter the analog tag whose value is used in conjunction with the Command Trigger to build the command sent to the SECS task.

Command action: OFF LineValue: 0

Command action: ON LineValue: 1

Valid Entry: tag nameValid Data Type: analog

Command Status Currently not implemented. Enter the tag name of a FactoryLink Real-Time Database analog tag that the status for the last command for this table is written to.

Valid Entry: tag nameValid Data Type: analog

Save the information and define the data type for any tag names displayed in the Tag Definition dialog box.

Configuring the SECS-II Message Definition Control Table

The SECS-II Message Definition Control 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

In your server application, open Device Interfaces > SECS/HSMS Communications > SECS-II Message Definition Control.

Field Descriptions

SECS-II Table ID (required for SECS and HSMS) The number for the SECS-II Message Definition Information Table to modify.

Valid Entry: 0 - 32767 (default = 0)

Comment (optional) Reference information about the Message Definition Table.

Valid Entry: string of up to 30 characters

FactoryLink Device Interfaces Using OPC and Other Technology / 423

Page 434: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

42

Configuring the SECS-II 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 database tag associated with it. This allows the user to tie specific FactoryLink database 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.

• 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

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 435: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

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”).

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 425

Page 436: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

42

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 would be stored as 1.

• The first data tag in the first report would be found at 1.3.1.2.1: and would be stored as 135.

• The second data tag in the second report would be found at 1.3.2.2.2: and would be 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:

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 437: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

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.

<U2 1> /* CEID * / 1.2:

<L 1.3

<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:

>

FactoryLink Device Interfaces Using OPC and Other Technology / 427

Page 438: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

42

• 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

• 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

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 439: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

<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 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

FactoryLink Device Interfaces Using OPC and Other Technology / 429

Page 440: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

43

field. The main primary message will be 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

In your server application, open Device Interfaces > SECS/HSMS Communications > SECS-II Message Definition Control > “your table ID” > SECS-II Message Definition Information.

Field Descriptions

Tag Name The tag updated as a result of a READ message or used as a source of data for a WRITE message or a constant value to be used as the source of data for a WRITE 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.

Valid Entry: tag nameValid Data Type: digital

analoglonganafloatmessage

Read/Write The message type. BOTH defines the message for both READ and WRITE activity. INQGN results in an Inquire/Grant transaction. 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: required on the first line of a message definitionreadwritebothinqgn (Inquire/Grant)

Stream Decimal The stream number for the message to be sent or received. This entry is required on the line that specifies READ, WRITE, BOTH or INQGN.

Valid Entry: optional0 - 255

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 441: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

Function Decimal The function number for the message to be sent or received. This entry is required on the line that specifies READ, WRITE, BOTH or INQGN.

Valid Entry: 0 - 255

Message ID The message number for the message to be sent or received. If used, this entry must be on the line that specifies READ, WRITE, BOTH or INQGN.

Valid Entry: 0 - 999

Item Type The data item. See “Technical Notes” on page 452 for additional details.LIST - Number of data items in a message BNARY - Binary data BOOLN - Boolean dataASCII - ASCII dataJIS8 - 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 floatUINT1 - 1 byte unsigned integerUINT2 - 2 byte unsigned integerUINT4 - 4 byte unsigned integer UINT8 - 8 byte unsigned integer FNAME- File Name for READNOBDY - For header only messages FSIZE - File sizeFN_B - File Name for WRITE, send data as bytesFN_A - File Name for WRITE, send data as ASCII FN_I1 - File Name for WRITE, send data as SINT1FN_I2 - File Name for WRITE, send data as SINT2FN_I4 - File Name for WRITE, send data as SINT4FN_I8 - File Name for WRITE, send data as SINT8FN_U1 - File Name for WRITE, send data as UINT1FN_U2 - File Name for WRITE, send data as UINT2FN_U4 - File Name for WRITE, send data as UINT4FN_U8 - File Name for WRITE, send data as UINT8CONI2- Conditional item type SINT2CONU2- Conditional item type UINT2CONI4- Conditional item type SINT4CONU4- Conditional item type UINT4CONAS- Conditional item type ASCII

FactoryLink Device Interfaces Using OPC and Other Technology / 431

Page 442: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

43

Item Length The number or a tag containing the number, used as an item count for

non-ASCII data items, such as a list, and a byte count for ASCII data items. The following applies for 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.

Valid Entry: tag name or constant valueValid Data Type: digital

analoglonganafloatmessage

INQGN, CONXX orRepeat Data

The numeric value or a tag containing the numeric value for use with advanced features, such as conditional parsing, repeat blocks, inquire/grant message sequencing, and SECS 8 byte data item handling.

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: tag name0 - 32767 for READ items0 - 255 for WRITE items

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 443: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Editing the SECS Communications Configuration Tables

Valid Data Type: digitalanaloglonganafloatmessage

Parse Position The character string used to identify the position of a data item in a message. See “Technical Notes” on page 452 for specific usage.

Valid Entry: alphanumeric string of up to 15 characters

Reply (W-bit) Specifies whether a primary message requires a response or not. DELIVR can be used on primary or secondary messages and requires acknowledgment of message delivery only.

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.

Valid Entry: required on the first line of a WRITE primary message definitionNOYESDELIVRWAIT

Logical Device (required for SECS and HSMS) The number or a tag containing the number, originally specified in the SECS Logical Device Number Information Table that represents a particular device.

Valid Entry: tag name or constant 0-63 (default = 0)Valid Data Type: analog

FactoryLink Device Interfaces Using OPC and Other Technology / 433

Page 444: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSEditing the SECS Communications Configuration Tables

43

Auto Read Disable If YES and a Read Disable Tag is specified for this Logical Device,

it is set to ON upon receiving this message. This prevents FactoryLink database 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.

Valid Entry: NOYES

Positional ParseEnable

Specifies whether to process all data items or parse out 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.

Valid Entry: NOYES

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 445: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

EXAMPLES

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 Using OPC and Other Technology / 435

Page 446: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

43

Equipment Initiated S5F1 (Equipment Alarm):

S5F1 W<L [ 3]

<B 0x06><U2 1002><A "Machine on Fire">

>Host Response S5F2:

S5F2<B 0x00> .

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

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 447: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

<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 S6F12S6F12<B [1] 00> . /* ACKC6 */

FactoryLink Device Interfaces Using OPC and Other Technology / 437

Page 448: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

43

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 449: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

Same message using parsing functionality:

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,

FactoryLink Device Interfaces Using OPC and Other Technology / 439

Page 450: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

44

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 */

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 451: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

• 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.

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

FactoryLink Device Interfaces Using OPC and Other Technology / 441

Page 452: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

44

<L [2]

<U2 1> /* RPTID */<L

<U2 12> /* VID */<U2 13> /* VID */

>>

>Equipment Response S2F34:

S2F34<B [1] 00> /* DRACK */

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 453: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

• 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.

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 */

>

FactoryLink Device Interfaces Using OPC and Other Technology / 443

Page 454: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

44

Only looking at the fields involved in the repeat block, it is easier to illustrate how the syntax would be expanded. The following example

would result in the following table if expanded:

Tag Name Item Name Item Length INQGN, CONXX, or Repeat Data

List 1 10

EqPPID[0] UINT4

Tag Name Item Name Item Length INQGN, CONXX, or Repeat Data

List 1 10

EqPPID[0] UINT4

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 455: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

• 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.

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]

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

Tag Name Item Name Item Length INQGN, CONXX, or Repeat Data

FactoryLink Device Interfaces Using OPC and Other Technology / 445

Page 456: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

44

<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 */

>

>

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 457: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

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

would result in the following table if expanded:

Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data

LIST 1 5

LIST 3

EqSVID[0] UINT2

EqSVName[0] ASCII

EqSVUnits[0] ASCII

Tag Name Item Type Item Length INQGN, CONXX, or 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

EqSVID[2] UINT2

EqSVName[2] ASCII

EqSVUnits[2] ASCII

LIST 3

EqSVID[3] UINT2

FactoryLink Device Interfaces Using OPC and Other Technology / 447

Page 458: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

44

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 S7F10S7F10<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 */

>>

>

EqSVName[3] ASCII

EqSVUnits[3] ASCII

LIST 3

EqSVID[4] UINT2

EqSVName[4] ASCII

EqSVUnits[4] ASCII

Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 459: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

• 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.

FactoryLink Device Interfaces Using OPC and Other Technology / 449

Page 460: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSExamples

45

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

would result in the following table if expanded:

Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data

LIST 1 4

LIST 2

EqPPID[0] ASCII 0

LIST 1 5

EqMID[0][0] ASCII 0

Tag Name Item Type Item Length INQGN, CONXX, or 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

0 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 461: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Examples

As a result, because of the variable nature of the message, there is no real way of knowing which material ID’s belong to which process programs.

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

Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data

FactoryLink Device Interfaces Using OPC and Other Technology / 451

Page 462: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSProgram Arguments

45

PROGRAM ARGUMENTS

TECHNICAL NOTES

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.

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.

2 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 463: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Technical 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, ReplyRespond with Secondary SxF(y=1)Mz, Verify Delivery Poll for VerificationDrop Ticket

SxFyMz meaning:Sx = Stream XFy = Function YMz = Message ID z

Run-Time Application Messages

During tun time, FactoryLink generates and displays messages for the SECS Communications protocol module on the Run-Time Manager screen. These messages are stored in FactoryLink database tags. Define the tag names in the Logical Device table.

Startup Messages

sdrv_insufficient_memory

System has insufficient memory to create run time tables.

FactoryLink Device Interfaces Using OPC and Other Technology / 453

Page 464: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSTechnical Notes

45

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

sdrv_eth.exe for HSMS.

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

An entry for Message Definition Information table XX was entered in the Message Definition Control table but the Information table was not found.

Invalid_Parse_String

See Technical Notes for Parse string formats.

4 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 465: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Technical Notes

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

stream_function_not_found - XX S:F:M

A message was triggered that is not defined in any 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 - S:F:M

A message was received that required a response but the response message is not defined in any Message Definition Information table.

S - stream, F - function, M - message ID

fname_not_valid

The message tag contained a zero length string or the file open failed.

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.

FactoryLink Device Interfaces Using OPC and Other Technology / 455

Page 466: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSTechnical Notes

45

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 - XX S:F:M

An inquire message does not have a grant response message 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 Code SDRV Error String Description

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 value2. Grant message had incorrect format.

6 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 467: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Technical Notes

6 Timer expired SdrTimerSet() Timer Expired. The event is an application timeout.

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. The event is a failure to deliver a transaction message successfully to the other end of the link, due to a RTY Retry Limit condition.

3 T3 or T4 Timeout Transaction Timeout. The event is a transaction timeout (T3 or T4) that 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 S9Fx)

Abort Reply. The event is the receipt of either an 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.

Status Code SDRV Error String Description

FactoryLink Device Interfaces Using OPC and Other Technology / 457

Page 468: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSTechnical Notes

45

-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

-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.

Status Code SDRV Error String Description

8 / FactoryLink Device Interfaces Using OPC and Other Technology

Page 469: Device Interfaces Using Op Can Dot Her Technologies

SECS/HSMS (SDRV) COMMUNICATIONS | 8Technical Notes

-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.

Status Code SDRV Error String Description

FactoryLink Device Interfaces Using OPC and Other Technology / 459

Page 470: Device Interfaces Using Op Can Dot Her Technologies

8 | SECS/HSMS (SDRV) COMMUNICATIONSTechnical Notes

46

0 / FactoryLink Device Interfaces Using OPC and Other Technology