Documente Academic
Documente Profesional
Documente Cultură
Version 7.5
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.
Contents
Chapter 1 Device Interface Overview ........................................................................... 1
Supported Drivers ................................................................................................................. 1 Guidelines for Driver Technology Selection ........................................................................ 5
Chapter 2
SLC 500 File Type Reference ................................................................................... Program Arguments .......................................................................................................... Messages and Codes ......................................................................................................... Status Messages ....................................................................................................... Error Messages ........................................................................................................ Allen-Bradley Return Codes .................................................................................... 116 119 120 120 121 124
Chapter 3
Dataset Exchange in Redundant System with VRN ........................................................ Data Embedding and Function Merge .............................................................................. Write/Output Triggering by Function TRxxx=vvv .......................................................... Array Handling by Function ARYnnn:x:y:z .................................................................... Statistical Functions XR, XP, XF, XT, XA, XS ................................................................ Summary .......................................................................................................................... OPC Data Translation => Method: RAPD/EDI and OPC Specific ....................... OPC-Specific Table Overview ................................................................................. Control Table Summary ........................................................................................... Information Table Summary .................................................................................... Terms ................................................................................................................................ Program Arguments .......................................................................................................... Information and Error Messages ......................................................................................
197 199 201 203 205 207 207 207 208 210 214 216 219
Chapter 4
Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Event Reports Table ........................................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Report Detail Table ............................................................................................ Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Trace Reports Table ........................................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Trace Detail Table .............................................................................................. Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Remote Commands Table .................................................................................. Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Remote Commands Detail Table ....................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Terminal Messages Table ................................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Message Detail Table ......................................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM SECS-II Message Definition Control Table ...................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM SECS-II Message Definition Information Table ................................................ Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM SECS Read/Write Control Table ........................................................................ Accessing ................................................................................................................. Field Descriptions ................................................................................................... FLGEM Process Programs Table ..................................................................................... Accessing ................................................................................................................. Field Descriptions ................................................................................................... 243 243 245 245 245 246 246 246 247 247 247 248 248 248 249 249 249 250 250 250 251 251 251 252 252 252 253 253 253 254 254 254 258 258 258 261 261 261
FLGEM Data Sets Table .................................................................................................. Accessing ................................................................................................................. Field Descriptions ................................................................................................... Technical Notes ................................................................................................................ Custom Message Specific ........................................................................................ System Specific ......................................................................................................... GWGEM Required Equipment Constants and Status Variables .............................. Program Arguments .......................................................................................................... Run-Time Application Messages ..................................................................................... Start-Up Errors ........................................................................................................ Run-Time Messages .................................................................................................
267 267 267 270 270 274 274 286 287 287 290
Chapter 5
MECOM................................................................................................... 291
Overview .......................................................................................................................... A-Series .................................................................................................................... QnA-Series ............................................................................................................... FX-Series ................................................................................................................. Required Hardware and Software .................................................................................... Hardware ................................................................................................................. Software ................................................................................................................... Installing The Mitsubishi Plc-driver ................................................................................. Enabling Ethernet Communication ......................................................................... Installation ............................................................................................................... Add Data in System Configuration .......................................................................... Upgrading ................................................................................................................ PLC configuration Tables ................................................................................................. Overview .................................................................................................................. Mitsubishi Definitions .............................................................................................. Mitsubishi Read ....................................................................................................... Mitsubishi Write ....................................................................................................... Minimum Configuration Example ........................................................................... Function Description ........................................................................................................ Startup ...................................................................................................................... Stand-alone Validation ............................................................................................. Transfer of Data ....................................................................................................... Modem Usage .......................................................................................................... Sharing the Communication .................................................................................... 291 291 291 291 293 293 293 294 294 294 294 295 296 296 298 304 309 314 316 316 316 317 324 326
Optimization Methods .............................................................................................. Trace ........................................................................................................................ Messages .................................................................................................................. Program Arguments ................................................................................................. Communication guide ...................................................................................................... Serial Communication without Modem ................................................................... Serial Communication with Modem ........................................................................ Ethernet Communication ......................................................................................... Troubleshooting ................................................................................................................ PLC Errors .............................................................................................................. Error Messages from MECOM ................................................................................ Error Messages from MELCOM32.DLL ................................................................. Modem Error Guide ................................................................................................. Ethernet Guide ......................................................................................................... Uninstallation ................................................................................................................... Files ......................................................................................................................... Contents of Some Special Files ................................................................................ Registry Modifications ............................................................................................. 327 328 329 329 331 331 334 336 338 338 338 339 339 341 344 344 346 346
Chapter 6
Transferring Values Between Arrays ....................................................................... Differences in Access Atomicity ............................................................................... Configuration of Tag-to-Item Array Mappings ........................................................ OPC and FactoryLink Applications ................................................................................. Tag Groups ............................................................................................................... Performance ............................................................................................................ Program Arguments .......................................................................................................... Troubleshooting ................................................................................................................ Configuration Troubleshooting ................................................................................ Run-Time Troubleshooting ....................................................................................... Error Logging .......................................................................................................... Error Messages ........................................................................................................
367 368 369 371 371 371 372 373 373 375 376 377
Chapter 7
Chapter 8
Configuring the SECS Logical Device Control Table ............................................. Configuring the SECS Logical Device Information Table ....................................... Configuring the SECS Read/Write Control Table .................................................... Configuring the SECS-II Message Definition Control Table ................................... Configuring the SECS-II Message Definition Information Table ............................ Examples .......................................................................................................................... Program Arguments .......................................................................................................... Technical Notes ................................................................................................................ Application Specific ................................................................................................. Startup Messages ..................................................................................................... Run-Time Messages ................................................................................................. Status Return Codes ................................................................................................. 416 419 420 423 424 435 452 452 452 453 455 456
Chapter 1
FactoryLink provides a number of device drivers that allow you to communicate with remote devices that monitor and control processes. These devices include Programmable Logic Controllers (PLCs), Remote Terminal Units (RTUs), or custom devices. Virtually all industries, from the production of goods at a factory to the movement of liquid or gas down a pipeline, use these devices. By sending messages between FactoryLink and these devices, you can automate tasks associated with processes, such as when valves are opened/closed, when machines are turned on/off, or when data like temperature or pressure is collected. Each device uses a specific communication protocol.
S UPPORTED D RIVERS
FactoryLink supplies a set of protocol-specific drivers for communicating with these devices. Each protocol driver translates messages sent from FactoryLink into a format understood by the device and translates messages sent from the device to a format understood by FactoryLink. FactoryLink provides several technologies that work with these drivers. These technologies aid in providing a consistent, easy-to-use interface into the FactoryLink Real-time Database. These technologies include External Device Interface (EDI), Rapid Application Protocol Driver (RAPD), OLE for Process Control (OPC), and others. The FactoryLink documentation set is centered around these technologies, so you will find the documentation for your driver in the manual with its associated driver technology. The following table lists the drivers that are available in FactoryLink.
Protocol RS232
Technology EDI
Requires
Ethernet, Data Allen-Bradley Device PLC-2, PLC-3, Highway Plus, Interface PLC-5, PLC-5/250, PLC-5/xxE, PLC-5/xx RS232 ControlNet, SLC-500 (series 03, 04, 05), Soft 5 or 500 PLC, PLC 5 or 500 Emulation, and ControlLogix
RAPD
RSLinx v2.42: optional Allen-Bradley PKTX card, optional Allen Bradley PKTC card, optional Allen Bradley Soft PLC, optional Allen Bradley PLC Emulation Software RSLinx v2.42: Allen-Bradley PKTX card or PKTC ControlNet card RSLinx v2.42
Allen-Bradley KTDTL
PLC-2, PLC-3, Data Highway Plus, KTDTL PLC-5, PLC-5/250, Data Highway-485 PLC-5/xxE, PLC-5/xx ControlNet, SLC-500 (series 03, 04) PLC-2, PLC-3, Ethernet, Data PLC-5, PLC-5/250, Highway Plus PLC-5/xxE, SLC-500 (series 05 ethernet) and (series 03, 04, and 05 by remote bridging) SEMI Host Communication Standard (SECS) devices GE Devices Non-specific Mitsubishi A-series, QnA-series, FX-series Mitsubishi A-series, QnA-series, FX-series RS232, Ethernet NetDTL
Allen-Bradley NetDTL
FLGEM Semiconductor Interface General Electric Fanuc General Purpose Interface Mitsubishi MECOM Serial Mitsubishi MECOM Serial and Ethernet
GW
2000, XP, 2003 2000, XP, 2003 2000 AJ71C24 Computer Link Module (optional) AJ71C24 Computer Link Module or AJ71E71 Ethernet Interface Module (optional) SA85 or PC85 card with low-level protocol specific driver
RS232, Ethernet
Beijer
2000, XP
Modbus Plus
ModBus Plus
EDI
2000, XP
PLC Modicon 984, Quantum, and Momentum Modicon 184, 384, 484, 584, 884, 984, M84, Quantum, and Momentum Modicon 984 (using Modicon TCP/IP MBP+ Bridge), Quantum, and Momentum
Technology RAPD
Windows OS 2000, XP
Modbus Serial
RS232
EDI
Ethernet
RAPD
C120, C200H, C500, RS232 C1000, C2000 Opto 22 Optomux devices RS232 Ethernet
2000, XP, 2003 2000, XP, 2003 2000 Telemecanique Low-level drivers with special Ethway card
RS232 Ethernet
2000, XP 2000, XP Bit Bus card Wnt-bik003Treiber with v.12 Low-level driver Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57 Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57 Telemecanique UNITE-XWAY Low-level drivers with special Fipway card, or PC mounted PLC/PCX57
Schneider TE COM
EDI/ Telemecanique Custom XWAY communication protocols (XIPWAY, ISAWAY FIPWAY, UNI-TELWAY) Telemecanique Direct Requests Custom
2000, XP
Schneider TE DRQ
2000, XP
Schneider TE Load
2000, XP
Driver SECS with GW Libraries HSMS/Ethernet SECS with GW Libraries RS 232/Serial Siemens CP525 Siemens H1 Siemens Sinec H1 Siemens S7 Driver
PLC SEMI Host Communication Standard (SECS) devices SEMI Host Communication Standard (SECS) devices S5, S7 S5 S5, S7 S7
Protocol Ethernet
Technology GW
Requires
RS232
GW
2000, XP, 2003 2000 2000, XP, 2003 2000, XP DLC Protocol only ISO TP2000 Protocol Siemens Softnet; not supported on 2003 yet SQRD RS232 SQRD Ethernet REQ DLC Protocol Stack
RAPD EDI
G UIDELINES
FOR
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.
continue using the same technology. If you are using Modicon hardware, use: Serial EDI driver Modbus Plus EDI driver Ethernet RAPD driver
Chapter 2
O VERVIEW
The FactoryLink Allen-Bradley RSLinx and INTERCHANGE tasks, KTDTL and NetDTL, provide a device interface for programmable logic controller (PLC) and small logic controller (SLC) communications with FactoryLink across one or more Allen-Bradley proprietary networks.
Note: The KTDTL task and the Windows versions of the NetDTL task use Allen-Bradleys RSLinx communications software. Other operating system versions of NetDTL use INTERCHANGE.
The KTDTL and NetDTL tasks can communicate with the following types of Allen-Bradley devices: PLC-2, PLC-3, PLC-5, PLC-5/250 (Pyramid Integrator), PLC-5/xxE (NetDTL direct Ethernet link only), and SLC-500 series 01, 02, 03, and 04 processors. (SLC-5/01, SLC-5/02, and SLC-5/03 processors require an interface module. SLC-5/04 processors connect directly to a Data Highway Plus). Additionally, tasks can run concurrently with software other than FactoryLink that is also using INTERCHANGE or RSLinx.
KTDTL Data Highway Plus (DH+) communications can be established through an
Allen-Bradley KT, KTX, 1784-KT, 1784-KT2, or 1784-PCMK card port. The DH+ can link with other networks, including another DH+, a Data Highway 485 (DH-485), or a Data Highway (DH) via a compatible Allen-Bradley network interface module.
NetDTL NetDTL communicates through an Ethernet card port using the TCP/IP network protocol. Communications with Allen-Bradley devices occurs through either a PLC-5/250 with an Ethernet interface module providing a bridge to a DH+ network, or through a direct Ethernet link to a device from the PLC-5/xxE family. Through the Pyramid Integrator, the NetDTL task can communicate with stations on the local DH+ link as well as with stations on other networks, including DH-485, DH, and DH+.
A Pyramid Integrator with an Ethernet interface module serving other devices can have multiple clients (FactoryLink NetDTL tasks). In the same way, a FactoryLink
NetDTL task can connect to multiple servers. To prevent excessive network traffic, do not use more than eight Pyramid Integrators as DH+ gateways in your application.
Server with Multiple Clients
PLC 5/250 with Ethernet Interface FactoryLink Real-Time Database
NetDTL Task
NetDTL Task
NetDTL Task
O FFLINK A DDRESSING
The KTDTL and NetDTL tasks can communicate with devices off the local network link (offlink) across one, two, or several Allen-Bradley networks. Networks can be split for various reasons, including physical media limitations and functional splits. For example, all the devices for a particular conveyor might be connected to one network while the devices for another conveyor are connected to a different network. Consult the appropriate Allen-Bradley documentation to verify you are using the correct media for connecting with networks and devices. The diagrams illustrate offlink connections by comparing them to a physical highway system. The Data Highway Plus directly connected to the FactoryLink station or, for NetDTL, to the Ethernet interface, is the main thoroughfare. Using an appropriate Allen-Bradley interface module, you can exit to other networks, or highways. An offlink address node you specify in the configuration tables identifies the route from the FactoryLink station to the offlink device. In the diagrams, this address is depicted as a road sign alongside a highway giving directions to a destination. An interface module that links networks together (such as 1785-KA5 or 1785-KA) is shown as an interchange on a highway between different types of roads. An interface module that links devices to a network (such as 1775-KA or 1785-KA3) is shown as an exit to a highways access road.
H ig
hw
ay
Pl
us
PLC-2 57
5-K 178
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.
D D at a
at a
A3
A 5-K 178
H ig hw
ig hw
ay
46
PLC 5/40
ay
Pl us
13 PLC-2
177 1-K A 178 5 2 -KA
5 178 5 -KA
22
11 PLC-3
177 5-K
SLC 5/02
26
D
SLC 5/03
at a
To the left of the main Data Highway Plus, a 1785-KA interface module connects to a Data Highway.
48 PLC-2
178
5-K A
M n ai
3
H ig hw ay
D at a H h ig w ay Pl us
48 5
to Fa
Devices on each network are indicated by road signs that display the device node addresses.
o ct L ry in k
42
FactoryLink Station
PC
ig hw
ay
Pl
PLC-2
us
57
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.
5 178 3 -KA
D at a D at a H ig h
5 178
H ig
hw
46 PLC 5/40
5 -KA
ay
w ay
Pl
us
13 PLC-2
177 1-K
178 A2
5-K A
Devices on each network are indicated by road signs that display the device node addresses.
22
178 A5 5-K
SLC 5/02 26
D at a
11 PLC-3
177 5-K A
SLC 5/03
H
To the left of the main Data Highway Plus, a 1785-KA interface module connects to a Data Highway.
PLC-2
at a
48
178 5-K A
H ig hw ay
ig h
w ay
Pl us
48 5
A Pyramid Integrator with an Ethernet interface connects the FactoryLink station to a Data Highway Plus network.
PLC 5/250
Et he rn et
TC P/
IP
FactoryLink Station
KTDTL TOPOLOGY
The diagrams provide examples of possible topologies for a KTDTL task configuration. The following diagram illustrates simultaneous communications through two Allen-Bradley KT card ports.
Example of KTDTL Communications
Allen-Bradley FactoryLink RSLinx Real-Time Database Communications through two KT cards directly connected to DH+ networks.
KTDTL Task
DH +
SLC 5/04
PLC-2
aH ig hw ay
Pl us
PLC-5
Da t
PLC-5/250
PLC-5 with 1785-KA5 1785-KA5 module in a PLC-5 I/O rack provides the link from DH+ to DH-485
48 5 Hi gh Da ta wa y
SLC-5/03
SLC-5/02
SLC-5/01
The following diagrams illustrate ways communications can occur between the FactoryLink station and various types of Allen-Bradley devices through an Allen-Bradley card port.
KTDTL Communications Options
Using a KTX card, a direct link to a DH+ or a DH-485 network can be achieved. Using a KT card, a direct link to a DH+ can be achieved.
DH+
PLC 5
1747-AIC
1747-AIC
ig h
ay
1771-KA2
With the 1785-KA module serving as a bridge between a Data PLC-2 Highway Plus and a Data Highway, controllers in the PLC-2, PLC-3, 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). PLC-3
1775-KA
1785-KA
D
at a
SLC 5/04
ig hw
SLC 5/03
ay Pl us
1785-KA5
D at a H
ig h
ay
48 5
N ET DTL TOPOLOGY
The diagrams provide examples of possible topologies for a NetDTL task configuration. The following diagram shows a basic physical link between the FactoryLink station and devices on the Ethernet and DH+ networks communicating through a Pyramid Integrator with an Ethernet interface module.
Typical Physical Link to Local Addresses
PLC 5/250 with Ethernet Interface DH+ Link PLC-3 PLC-5/xxE Ethernet Link
PLC-5
PLC-5/xxE
Ethernet Card
FactoryLink Station
The following diagram shows a typical physical link between the FactoryLink station and devices at offlink addresses.
ig hw
1771-KA2
ay
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). PLC-3
1775-KA 1785-KA
D at
ig h
ay
Pl
SLC 5/03
us
1785-KA5
D at a
H ig
hw
ay
48 5
Ethernet Communications
D
at a
PLC-5/xxE
H ig h w ay
The NetDTL task can communicate directly to a device in the PLC-5/xxE family over TCP/IP.
Pl us
PI
Et h
er n
et
To further illustrate NetDTL communications, the diagram below shows: point-to-point Ethernet TCP/IP communications, DH+ network communications via an Ethernet interface module, and DH-485 network communications via a 1785-KA5 module.
Example of NetDTL Communications
PLC-5 with 1785-KA5 1785-KA5 module in a PLC-5 I/O rack provides the link from DH+ to DH-485
lus
SLC-5/04
Da ta
Da
ta Hi g
PLC-5/250
PLC-5 NetDTL Task Communications through an Ethernet card PLC-5/250 with an Ethernet interface module provides the link from Ethernet to DH+
hw a
yP
P/ TC
IP
C ONFIGURING
THE
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
argument value
is the required prefix for any program parameter. is the parameter ID chosen from the table below. 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
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
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
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 To specify a directory and path for an error log file, enter (Default is stdout) 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
ID
Override Value
Description
-N
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
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
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
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
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
KTDTL the card is a KT card. A 1785-KA5 module in a PLC-5/250 I/O rack is located at address #4. Two devices are located at address #10: one is a PLC-5/250 on a DH+ network and the other is a SLC 5/03 on a DH-485 network. To enable the KTDTL or NetDTL task to differentiate between the two devices that have an address of 10, give each device its own logical station number. Consequently, when an application is being run and the task receives a request to write a value to a register in a device at address #10, the logical station number provides the unique communication path that tells the task to which address #10 the value should be written.
Logical Port and Logical Station
KT or Ethernet Card Port Logical Port 1
FactoryLink Station NetDTLEthernet interface module in a PLC-5/250 I/O rack provides the DH+ link
1785-KA5 Module in a PLC-5 I/O Rack at DH-485 Address #4 DH+ SLC 5/03 at Address #10
PLC-5/250 at Address #10 Logical Station 1 consists of Logical Port 1 and a PLC-5/250 at DH+address #10. Logical Station 2 consists of Logical Port 1 and a PLC-5 at DH+ address #4. Logical Station 3 consists of Logical Port 1 and a SLC 5/03 at DH-485 address #10.
F IELD C ONFIGURATION
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
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
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
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 name Valid 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.
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 Address Ethernet 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
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
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:
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 Tag 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 NetDTL return code 1 Internal RSLinx code 2 Operating system error code
Valid Entry: tag name Valid Data Type: longana
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.
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
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 PYRAMID CHANNEL 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.
ORM:n
where
0 is the RM pushwheel number
pKA:n
where
p is a pushwheel number from 1-4
0RM:3 0RM:2
1KA:2 1KA:3
2KA:2 2KA:3
/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. 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. 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. 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.
/G:g
/L:l
/KA
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.
Station Address (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.
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: To display valid entry, use the Ctrl+K keys. Comment
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
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
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
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 name Valid 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/Status Tag 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
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.
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 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
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-Bradleys RSLinx documentation.
KT: is the module type. 0 is the channel number.
Example: Enter 5KT:0 if the InterChange port is mapped to port
/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. 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. 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. 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
KT Card 4
/G:g
/L:l
/KA
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.
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.
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
Comment
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.
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.
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.
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.
To communicate with Device F, you would make the following field entries: A-B KT Card ID (ASCII) 1KT:0/B:42/L:3 Station Address (Octal) 41
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
To communicate with Device C, you would make the following field entries: A-B KT Card ID (ASCII) 1KT:0/B:42/L:2 Station Address (Octal) 34 To communicate with Device E, you would make the following field entries: A-B KT Card ID (ASCII) 1KT:0/B:42/L:3 Station Address (Octal) 36 Link 3 Device E Device F Link 2 Device C Device D
To communicate with Device D, you would make the following field entries: A-B KT Card ID (ASCII) 1KT:0/B:42/L:2 Station Address (Octal) 26 To communicate with Device F, you would make the following field entries: A-B KT Card ID (ASCII) 1KT:0/B:42/L:3 Station Address (Octal) 41
All of these entries can be used for triggered and unsolicited operations.
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
For practical purposes, the initial entry in the PYRAMID CHANNEL ID (ASCII) field is 0RM:2 throughout the following examples.
FactoryLink Station
0RM:2 13
To communicate with Device B, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2 Station Address (Octal) 56 To communicate with Device D, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/G:42/L:1 (triggered only)
PLC
43
DH+
Link 1
56
PLC
Device A
42 KA5 29
Device B
SLC 5/03
18
DH-485
Link 2
14
Station (Octal) 14
Device C
22 KA5 25
Device D
DH+
To communicate with Device F, you would make the following field entries: PYRAMID CHANNEL ID
41 PLC
Link 3
Device E
Device F
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
To communicate with Device B, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2 Station Address (Octal) 56
PLC
43
DH+
Link 1
56
PLC
Device A
42
Device B
To communicate with Device C, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/B:42/L:2 Station Address (Octal) 34
PLC 5/250 52
To communicate with Device D, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/B:42/L:2 Station 26 PLC Address Device D (Octal) 26 To communicate with Device F, you would make the following field entries: PYRAMID CHANNEL ID
41
PLC
34
DH+
Link 2
Device C
47
To communicate with Device E, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/B:42/L:3 Station Address (Octal) 36
PLC 36
PLC 5/250 25
DH+
Link 3
Device E
All of these entries can be used for triggered and unsolicited operations.
PLC
43
Link 1
DH+
56
PLC
To communicate with Device B, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2 Station Address (Octal) 56 To communicate with Device D, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/B:42/KA (triggered only)
Device A
42 KA
Device B
To communicate with Device C, you would make the following field entries: PYRAMID CHANNEL ID 0RM:2/B:42/KA (triggered only) Station Address (Octal) 36
PLC 36
Link 2
DH
41
Device C
PLC
Unless otherwise indicated, all entries can be used for triggered and unsolicited operations.
Logical Station Entries The configurations represented in the following topology flowcharts are defined in a Logical Station table that appears after each chart.
KTDTL Configuration 1
FactoryLink Station 1KT:0 DH+ 036 Data Highway + Link 1 DH+ 010 Log. Sta. 0 PLC-5 DH+ 013 Log. Sta. 1 PLC-3 DH+ 023 DH+ 035 KA5 Log. Sta. 2 DH-485 002 PLC-5/250 DH-485 Link 2 DH-485 012 KA5 DH+ 056 DH-485 022 Log. Sta. 6 SLC-5/02 DH+ 045 Log. Sta. 3 PLC-5
Data Highway + Link 3 DH+ 011 Log. Sta. 8 DH+ 034 Log. Sta. 9 DH+ 046 Log. Sta. 10 PLC-5 DH+ 057 Log. Sta. 11 PLC-5
KTDTL Configuration 2
FactoryLink Station 1KT:0 DH+ 036 Data Highway + Link 1 DH+ 010 Log. Sta. 0 PLC-5 DH+ 013 Log. Sta. 1 PLC-3 DH+ 023 KA DH+ 035 Log. Sta. 2 PLC-5/250 Data Highway DH 013 Log. Sta. 5 PLC-3 DH+ 045 Log. Sta. 3 PLC-5
NetDTL Configuration 1
FactoryLink Station Ethernet TCP/IP TCP/IP: abplc1 PLC 5/250 Log. Sta. 0 ORM:2 DH+ 015/016 TCP/IP: abplc2 PLC-5/40E Log. Sta. 1
Data Highway + Link 1 DH+ 010 Log. Sta. 2 PLC-5 DH+ 013 Log. Sta. 3 PLC-3 DH+ 035 DH+ 023 Log. Sta. 4 KA5 PLC-5/250 DH-485 002 DH-485 Link 2 DH-485 012 DH-485 022 KA5 Log. Sta. 8 DH+ 056 SLC-5/02 Data Highway + Link 3 DH+ 046 Log. Sta. 12 DH+ 045 Log. Sta. 5 PLC-5
NetDTL Configuration 2
TCP/IP: abplc3 PLC 5/250 Log. Sta. 0 ORM:2 DH+ 015/016 Data Highway + Link 1 DH+ 010 Log. Sta. 1 PLC-5 DH+ 013 Log. Sta. 2 PLC-3 DH+ 023 KA DH+ 035 Log. Sta. 3 PLC-5/250 DH+ 045 Log. Sta. 4 PLC-5
Data Highway DH 011 Log. Sta. 5 PLC-3 DH 013 Log. Sta. 6 PLC-3
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.
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
FactoryLink requests data from a device. The device returns the requested data to FactoryLink. FactoryLink stores the data as tags in the real-time database. FactoryLink Station
Triggered read operations occur based on either timed intervals or events. In both types of operations, a change in value of a trigger tag prompts FactoryLink to read data in specific locations in a device. Timed-Interval Reads a read operation based on a timed interval instructs FactoryLink to collect data at defined intervals, such as several times a minute or at a given time each day. Event-Driven Reads a read operation based on an event instructs FactoryLink to collect data only when a defined event occurs, such as when an operator selects a new graphic window or when an alarm condition occurs.
Unsolicited in an unsolicited read operation, FactoryLink does not initiate the
reading of data. Instead, it accepts certain types of data from specified locations in a device, then stores the data in the real-time database. FactoryLink recognizes the device data because its starting address and length match an identical address and expected data length configured in FactoryLink.
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
...FactoryLink reads each defined address... ...then stores the value read in the tag specified to receive the value.
Unsolicited Read Request in an unsolicited read request table, configure FactoryLink to recognize and accept data of a particular structure. In the Unsolicited Read Control table, give the request a name and indicate this is an unsolicited read request. In the Unsolicited Read Information table, specify the addresses from which data is expected, the type of data expected, and 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
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.
Writing Data to a Device In a write operation, data is retrieved from the real-time database and transferred to a device. FactoryLink reads the values of tags then writes them to specific locations in a device.
Write Operation
FactoryLink reads database tags and sends their values to a device. The device stores the values. FactoryLink Station
You can define two types of write operations: block and exception.
Block in a block write operation, a change in value of a trigger tag prompts
FactoryLink to write one or more database tag values to specific device locations.
FactoryLink to write that value to a specific device location. When a tags 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 tags 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 writes the value of each tag defined for this table... ...into the specified address.
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 Exception Write field is YES, FactoryLink writes the values of the tags associated with this table only when they change.
A disable trigger allows you to disable and re-enable an exception write table. Once a table is re-enabled, you can use a block write trigger to update any values in the device that changed while the table was disabled. Neither trigger is required unless you plan to periodically disable the table, but both are required if you do plan to disable the table.
When the value of each defined tag changes, FactoryLink writes it... ...to the specified device address.
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 tags value in RTMON to prompt the processing of this table.
Note: The next steps in the procedure involve the use of the FactoryLink Real-Time Monitor. For detailed instructions on using RTMON, see the Utilities Guide.
Create a watch list in RTMON containing the tags defined in the two tables. Use the Watch option on the RTMON Options menu to create a watch list.
Prompt the processing of the triggered read table by forcing a 1 to the read trigger using the Tag Input option on the RTMON Options menu. You can watch the value of the trigger change in the watch list.
When you force the read trigger to 1,... ...its value in the watch list changes from 0 to 1. When the read table is triggered, the value of value1 is updated. If the value read differs from the tags current value, you will see it change in the watch list.
When the triggered read table is processed, the tag defined to hold the value read (value1 in the sample table) is updated with the current value of the specified register address. Use RTMON to prompt FactoryLink to process the exception write table. Change the value of the tag to be written (value2 in the sample table) using the same option you used to trigger the read table, Tag Input. When you change the tags value in this way, the exception write table is processed and the value is written to the specified register address.
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 FactoryLinks 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 FactoryLinks 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. 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.
Event
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). 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.
Exception
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.
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 datas type. (This example is for a read table but could also apply to a table for a write operation.)
processes data being read differently than it processes data being written. All addresses defined in a read table are read based on the specified range. Using the table above as an example, you could get the same result (reading addresses 32 through 41) by defining only four rows as shown in the following table.
Table Defined to Read a Range of Addresses
FactoryLink will still generate two messages to process this revised table. All addresses in the range of 32 to 41 will be read.
If you define a write table as shown in the table above, however, each row will generate a separate message and data will only be written to the four addresses specified. To send a single message to write to addresses 32 through 41, you would need to define each address separately as shown in the Table Defined to Read a Range of Addresses shown previously. Only contiguous groups of data (up to the maximum allowed by the device) would be put in one message for a write operation. Define Multiple Operations in a Single Table Because the KTDTL and NetDTL tasks can process multiple messages destined for a single device simultaneously, you can define several read or write operations (within reason and based on the architecture of the application) in a single table for maximum throughput. Each
additional table you define results in more messages the task must generate thus reducing the efficiency of your application. Keep Disabled Messages Together put entries that might need to be disabled periodically in their own table, separate from entries that will not be disabled. Prioritize Read and Write Operations the priority of read and write operations can affect the speed and performance of an application. Assign a priority to give preference to the most critical data to be read or written should FactoryLink receive more than one request to execute a read or write operation at a time. 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.
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
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)
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 tags value is forced to 1 (ON), the addresses are read.
Note
A Block Read Trigger is required to prompt FactoryLink to process a table for a triggered read operation. 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,
and assign the same tag name to a Block Read Trigger tag. When the tags value changes to 1 (as the result of a math operation or a defined event taking place, for example), it prompts a read operation.
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. For additional information about triggers and using tags as triggers, see Choosing Effective Triggering Schemes on page 61.
Valid Entry: tag name Valid Data Type: digital Block Read Disable
(Optional) Enter a tag name for a digital tag to disable a block read of the tags specified in this table. When this tags 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.
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.
Valid Entry: tag name Valid Data Type: digital
(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 name Valid Data Type: digital
(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 name Valid 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
Exception Write
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)
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 tags value is forced to 1 (ON).
Note
A Block Write Trigger is required to prompt FactoryLink to process this table for a write operation. 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 tags value changes to 1 (as the result of a math operation or a defined event taking place, for example), it prompts 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.
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 name Valid Data Type: digital Block Write Disable
(Optional) Enter a tag name for a digital tag to disable a block write to the addresses specified in this table. When this tags 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).
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.
Valid Entry: tag name Valid Data Type: digital Block Write Complete
(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 name Valid Data Type: digital
(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 name Valid Data Type: digital
2 Click the Save icon when you have finished filling out the information on 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.
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
Exception Write
Enter YES for the task to write tag values only when those values change.
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.
Valid Entry: Ctrl+K
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)
If this is an exception write table, ignore this field. 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.
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 name Valid 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 tags 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
For a Read Table enter the address in the devices memory where the value to be stored in this tag is located. For a Write Table enter the address in the devices memory to which the tag value will be written.
Address
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
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 tags 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.
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.
Note
NetDTLThe 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.
Data Flow
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.
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.
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 INT4, FLT STRUC, ASC
Add 0. Add 1. Add the length specifier (value of the Address field in the Unsolicited Read Information table) minus one.
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
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
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,
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 PIs 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:
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. 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. 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.
Target Offset
Message Length
Note
If the entries in the Unsolicited Read Information table do not exactly match the values for these functions in the MSG instruction, the SLC 5/03 or 5/04 processor displays an error.
The entry fields for the SLC 5/03 and 5/04 MSG instruction only accept data in
decimal notation. Be sure to enter their octal equivalents into an unsolicited read table. For the SLC 5/03 processor, when the target node is a DH+ network address connected to the NetDTL task through a 1785-KA5 module, configure the processor for remote communications. If the target node is another DH-485 network address, configure the processor for local communications. For the SLC 5/04 processor, when the target node is another DH+ network address, configure the processor for local communications. Refer to the Allen-Bradleys reference manual for SLC 500 advanced programming software for more information on SLC 5/03 and 5/04 MSG instructions.
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
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
Unsolicited Type
Enter YES or FORCE. The task will interpret this operation as an unsolicited read and emulate the devices 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 tags 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 tags value has changed since the last write.
Valid Entry: Ctrl+K
5 Click Save after you finish filling out the information on this table.
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 name Valid 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 devices 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.
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 tags 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.
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
number 3, tag 1 in the device configured as logical station 0 and stores the value in a digital FactoryLink tag, P240000.
Read/Write Information Table for a Triggered Read
The following graphic illustrates how this triggered read operation works.
How Triggered Read Operation Works
When the value of KTDTL_READ_TRIGGER is 1, FactoryLink processes the table, READ.
FactoryLink reads the value of bit 12 in file type B, file number 3, tag 1... ...then stores the value read in P240000.
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
The following graphic illustrates how this unsolicited read operation works.
How Unsolicited Read Operation Works
When FactoryLink receives INT2 data from address 34, it processes the table, UNSOL_READ.
FactoryLink reads the data then stores it in the analog tag, ANA_15.
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.
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.
The graphic below illustrates how this block write operation works.
How Block Write Operation Works
FactoryLink writes the value of P240000... ...into bit 12 in file type B, file number 3, tag 1.
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 tags 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.
The next graphic illustrates how this exception write operation works.
How Exception Write Operation Works
When the value of NDTL_EXCEPTION_DISABLE is 1, FactoryLink does not process the table, EXEPTION.
When the value of NDTL_EXCEPTION_TRIGGER is 1 and the table has been disabled, FactoryLink writes the value of P240000 if it has changed since the table was disabled.
...when the value of P240000 changes, FactoryLink writes its value into bit 12 of file type B, file number 3, tag 1.
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.
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 queues burden of handling all the pending I/O requests), you could assign priority 1 or 2 to tables containing more important data and priority 3 or 4 to tables containing less important data. Using this logic, you would assign a high priority to an exception write table for an operation that acknowledges a loud annoying alarm and a low priority to a block write table that downloads a batch recipe once a day.
Efficient Triggering
This section discusses triggering techniques to consider for optimum performance of your application.
Timed
The easiest and most basic way to trigger a block read or write operation is with a timed tag. To define a timed trigger tag, enter a tag name for a Block Read Trigger or Block Write Trigger tag in the Read/Write Control table that matches the tag name of an interval timer tag (defined in the Interval Timer Information table). If you define this tag to change once per second, the table is placed in its assigned queue once every second. Using timed tags as triggers is acceptable in most cases. An overtriggering situation can occur, however, if the trigger rate causes tables to be placed into a queue faster than the INTERCHANGE or RSLinx software can process them.
A situation in which triggers overlap can occur as well. To illustrate, suppose a 5-second, a 15-second, and a 30-second timed tag are used to trigger various tables. Each table is placed in its designated queue every 30 seconds when the various triggers line up. The use of prime numbers quickly solves this problem, but a more effective method follows.
Note
The next two triggering methods, cascaded and self-triggered, can solve potential overtriggering situations in many cases. These methods, however, might not be appropriate for every read or write table you define. For instance, the timed method works best for tables that do not need to be updated at the highest possible rate.
Cascaded
The cascading of tables is an alternative to using timed triggers. As mentioned previously, the Block Read State or Block Write State tag is reset to 1 after a table is placed into a priority queue. Similarly, the Block Read Complete or Block Write Complete tag is reset to 1 after the INTERCHANGE or RSLinx software processes the table. In the Read/Write Control table, if either the complete or state tag is defined as the trigger tag for the table in the row below the current table, that table will not be triggered and placed into a queue until the preceding table is either successfully placed in a queue or processed. If the table defined in the final row of the Read/Write Control table contains a tag name for a 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.
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 methods 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.
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.
The following graphic illustrates the methodology of a self-triggered read table that uses the state tag to self trigger.
Self-Triggered Read Table
At FactoryLink startup, selftrig (as a state tag) is set to 1. As a trigger tag, selftrig also places the R_AGAIN table into queue 1 at startup. During processing of the R_AGAIN table, selftrig (as a state tag) is set to 0. If the table completes successfully (the data is read then stored in the tags defined in the Read/Write Information table), selftrig (as a state tag) is set to 1. When the state tag, selftrig, is set to 1, the table is placed into its queue again because selftrig is also the trigger tag. If selftrig (as a state tag) remains 0 because the table does not complete successfully, selftrig (as a trigger tag) never gets set for queuing the table again.
AND
A DDRESSES
This section provides information about: the conversion of Allen-Bradley data types to FactoryLink data types, formats for entering addresses, and valid device-specific file types and subtags you can specify in addresses.
Data Types the KTDTL and NetDTL tasks can convert numerous Allen-Bradley
data types into compatible FactoryLink data types. Supported Data Types on page 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
Description/Conversion
Digital
BIN DIG
Automatic conversion to DIG Individual bit in a PLC file tag Automatic conversion to INT2 16-bit signed integer 32-bit signed integer 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 16-bit binary-coded decimal 4 digits 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 32-bit floating-point value; the specific format depends on the PLC type
Analog
Description/Conversion
Long analog
Automatic conversion to INT4 16-bit signed integer 32-bit signed integer 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 16-bit binary-coded decimal 4 digits 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 32-bit floating-point value; the specific format depends on the PLC type Automatic conversion to FLT 16-bit signed integer 32-bit signed integer 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 16-bit binary-coded decimal 4 digits 16-bit binary-coded decimal 3 digits; most-significant nibble zeroed/ignored 32-bit floating-point value; the specific format depends on the PLC type
Floating-point
Description/Conversion
Message
BIN STRUCT
Automatic conversion to STRUCT Raw file contents as transmitted over the Data Highway; length in tags based on native tag size of the PLC file STRUCT valid only in PLC files with one word per tag; high and low order bytes swapped from Data Highway packet contents Special PLC type specification for the ST PLC file types; one tag per FactoryLink message tag
ASC
ST
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.
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.
/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. (Optional) After the address, enter a comma (,) then the decimal number of words to be written to FactoryLink message tags.
Sample Address Entries
,length
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.) (Required) Specify the PLC file type. For valid entries for a specific PLC type, see the appropriate PLC file types and subtags table. (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 (;). (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. (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.
filetype filenumber
:;
tag
/bit
,length .subtag
(Enter for message tags) Enter a comma (,) then specify the length, in file tags, to be read or written. The default is 1. (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
File Type
Description
O I T C N F D B A H S
Outputs Inputs Timers Counters Integers Floating-point Decimal BCD4 Binary ASCII Long integer Status table
DIG/INT2 DIG/INT2 STRUCT STRUCT DIG/INT2 FLT BCD4 DIG/INT2 ASC INT4 DIG/INT2
1 1 3 3 1 2 1 1 1 2 1
Subtags
The following subtags are valid for the specified file types in PLC-3 address specifications:
File Type C
Subtag
Description
Data Type
Writable
Up enable Down enable Done Overflow Underflow Control word Preset value Accumulated value
No No No No No No Yes Yes
File Type T
Subtag
Description
Data Type
Writable
No No No No Yes Yes
PLC-5 File Type Reference This section provides a list of the valid file types for PLC-5 addresses and the valid subtags for files types BT, C, MG, PD, R, SC, T, and TD.
File Types
The following file types are valid for PLC-5 address specifications. Note that some file types are valid only on new generation PLC-5 devices.
Valid File Types for PLC-5 Addresses
File Type
Description
O I S B T C N F R BT MG PD SC ST TD
Output image Input image Status Binary Timers Counters Integer Floating-point Control Block-transfer Message control PID SFC status ASCII string Token data
DIG/INT2 DIG/INT2 INT2 INT2 STRUCT STRUCT INT2 FLT STRUCT STRUCT STRUCT STRUCT STRUCT ST STRUCT
1 1 1 1 3 3 1 2 3 6 61 82 3 42 2
Subtags
The following subtags are valid for the specified file types in PLC-5 address specifications:
File Type BT
Subtag
Description
Data Type
Writable
Enable Start Done Error Continue Enable waiting No response Time out Read/write Requested word count Transmitted word count File-type number Word number Rack/group/set
DIG DIG DIG DIG DIG DIG DIG DIG DIG INT2 INT2 INT2 INT2 INT2
File Type C
Subtag
Description
Data Type
Writable
Up enable Down enable Done Overflow Underflow Control word Preset value Accumulated value
No No No No No No Yes Yes
Subtag
Description
Data Type
Writable
No response Time out Enable Start transmission Done Error Continuous Enabled waiting Error code Request length Done length
DIG DIG DIG DIG DIG DIG DIG DIG INT2 INT2 INT2
File Type PD
Subtag
Description
Data Type
Writable
EN CT CL PVT DO SWM CA MO PE INI SPOR OLL OLH EWD DVNA DVPA PVLA PVHA SP
Enable Cascaded type Cascaded loop PV tracking Derivative of Software A/M mode Control action
Station A/M mode DIG PID equation type DIG PID initialized SP out of range Output limit low Output limit high Error within deadband Deviation high alarm Deviation low alarm PV low alarm PV high alarm Set point DIG DIG DIG DIG DIG DIG DIG DIG DIG FLT
Subtag
Description
Data Type
Writable
KP KI KD BIAS MAXS
Proportional gain Integral gain Derivative time Output bias% Setpoint maximum (scaled value)
MINS DB SO MAXO MINO UPD PV ERR OUT PVH PVL DVP DVN
Setpoint minimum FLT (scaled value) Deadband Set output% Output limit high% FLT FLT FLT
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Output limit low% FLT Update time Process variable Error Output% PV alarm high PV alarm low FLT FLT FLT FLT FLT FLT
Subtag
Description
Data Type
Writable
PV alarm deadband Deviation alarm deadband Input range maximum Input range minimum Tieback%
Subtag
Description
Data Type
Writable
Enable Enable unloading Done Empty Error Unload Inhibit comparisons Found Control word Length Position
DIG DIG DIG DIG DIG DIG DIG DIG INT2 INT2 INT2
No No No No No No No No No Yes Yes
File Type SC
Subtag
Description
Data Type
Writable
SA FS LS OV ER DN PRE TIM
File Type T
Scan active First scan Last scan Timer overflow Step errored Done Preset value Active time
No No No No No No Yes Yes
Subtag
Description
Data Type
Writable
No No No No Yes Yes
File Type TD
Subtag
Description
Data Type
Writable
HI LO
INT2 INT2
Yes Yes
PLC-5/250 File Type Reference This section provides a list of the valid file types for PLC-5/250 addresses and the valid subtags for files types AS, C, MSG, PD, R, and T.
File Types
The following file types can be used for PLC-5/250 address specifications:
Valid File Types for PLC-5/250 Addresses
File Types
Description
O I L SD ST PD MSG AS IS S B T C R N F
Outputs Inputs Long integer CVIM shared memory String PID Message control Adapter status Forced internal storage Binary Timer Counter Control Integer Floating-point
1 1 2 1 42 82 56 2 1 1 1 6 3 3 1 2
System public status DIG/INT2 DIG/INT2 STRUCT STRUCT STRUCT DIG/INT2 FLT
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 CF RC
File Type C
No No Yes
Subtag
Description
Data Type
Writable
CU CD DN OV UN
PRE ACC
File Type MSG
No No No No No
Yes Yes
Subtag
Description
Data Type
Writable
EN ST AD AE
No No No No
Subtag
Description
Data Type
Writable
Continuous Enabled waiting Done Error Error code Request length Done length
Subtag
Description
Data Type
Writable
Enable Cascaded type Cascade loop PV tracking Derivative of Software A/M mode Control action Mode PID equation PID initialized SP out of range Output limit low Output limit high
DIG DIG DIG DIG DIG DIG DIG DIG DIG DIG DIG DIG DIG
No No No No No No No No No No No No No
Subtag
Description
Data Type
Writable
EWD DVNA DVPA PVLA PVHA SP KP KI KD BIAS MAXS MINS DB SO MAXO MINO UPD PV ERR OUT PVH
Error within deadband Deviation high alarm Deviation low alarm PV low alarm PV high alarm Setpoint Proportional gain Integral gain Derivative gain Output bias% Setpoint maximum Deadband Set output% Output limit high% Update time Process variable Error code Output PV alarm high
DIG DIG DIG DIG DIG FLT FLT FLT FLT FLT FLT
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Subtag
Description
Data Type
Writable
PV alarm low Deviation alarm PV alarm deadband Deviation alarm deadband Input range maximum Input range minimum Tieback%
Subtag
Description
Data Type
Writable
EN WU DN EM ER UL IN FD LEN POS
Enable Enable unloading Done Empty Error Unload Inhibit comparisons Found Length Position
DIG DIG DIG DIG DIG DIG DIG DIG INT2 INT2
No No No No No No No No Yes Yes
File Type T
Subtag
Description
Data Type
Writable
EN TT DN PRE ACC
No No No Yes Yes
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.
Valid File Types for SLC-500 Addresses
File Type
Description
O I S B T C R N F
Output Input Status Bit (binary) Timers Counters Control Integer Floating-point
0 1 2 3 4 5 6 7 8
1 1 1 1 3 3 3 1 2
Subtags
The following subtags are valid for the specified file types in SLC-500 address specifications:
File Type C
Subtag
Description
Data Type
Writable
CU CD DN OV UN UA PRE ACC
No No No No No No Yes Yes
Update DIG accumulated value Preset value Accumulated value INT2 INT2
File Type R
Subtag
Description
Data Type
Writable
EN EU DN EM ER UL IN FD LEN POS
Enable Unload enable Done Stack empty Error Unload Inhibit Found Length Position
DIG DIG DIG DIG DIG DIG DIG DIG INT2 INT2
No No No No No No No No Yes Yes
File Type T
Subtag
Description
Data Type
Writable
EN TT DN PRE ACC
No No No Yes Yes
P ROGRAM A RGUMENTS
Argument Description
-A<pathname> -B<#>
-C<#>
-F<#>
-L<pathname>
-N<#>
-P<pathname>
-R<#>
Specifies a new FactoryLink application directory 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) 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) 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) 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. 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) 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. 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)
M ESSAGES
AND
C ODES
This section contains information about deciphering run-time status and error messages that appear on the Run-Time Manager screen and about how Allen-Bradley INTERCHANGE and RSLinx return codes function with the KTDTL and NetDTL tasks. Messages and error codes appear at run time on the Run-Time Manager screen opposite the Shared Task description for the KTDTL or NetDTL task in the message area under Last Message. These messages can 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 reading the internal, preconfigured binary configuration table files and packetizing information from the specified internal device configuration table (DCT) file.
The task is displaying the total number of communication transactions configured for each type of operation defined in the DCT files.
Shutdown
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
No read or write operations are defined for the task. Open the KTDTL or NetDTL configuration tables and define a read or a write operation in the Read/Write Control and Information tables.
Cause: Action:
The device configuration table files were not properly built, possibly because the tables contain incorrect entries. 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. The task does not recognize any read or write operations because it is unable to read the FLAPP\DCT directory. Verify the FLAPP\DCT directory has read and write privileges. Grant these privileges if necessary.
Cause: Action:
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.
Cause:
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. Take the appropriate action indicated in the message to correct the error.
Action:
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.
Cause:
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. Take the appropriate action indicated in the message to correct the error.
Action:
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: Action:
The termination procedure was started because of either an internal run-time error or a normal FactoryLink termination request. 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.
The task is displaying the status of the disconnection from the specified card or Ethernet interface. Take the specified action (if any) to correct the error.
This message appears only if the task was not connected with the specified card or Ethernet interface at shutdown. 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.
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-Bradleys documentation for further information.
Chapter 3
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
Graph
ECI
Tag Interface
Common Data Format (binary dump) Standardized Datasets Indirect Addressing and Bit Access ECI Output Queue Management Simple/Fast Independent Drivers
EDI
ECI
SerialPort DigiBoard Ethernet Board Service Tables IMX Interface
GPI
OMR
TXI
SQD
A-B
MOD
SIE
OPC
B ASIC C ONCEPTS
An ECI Communication Object is defined as a set of Object I/O Tags having individual or common inputs and/or outputs (Alternate Tags, Datasets or OPC Groups of Items). It is specified by a single ECI Information table, which is identified by a line entry in the ECI Control table. An ECI Composite Object is defined by two or more Object I/O Tags using the same specific Read/Input (Alternate Read Tag, Tag Address or OPC Item) by a coherent block of line entries in the ECI Information table. In this case, a particular Object I/O may directly influence adjacent Object I/Os, similar to a PLC where a changed Bit influences its residing Byte or Word, etc. This ECI internal I/O processing is done only from lower towards higher ranking data within Composite Objects, that is, a Bit is inserted in its corresponding Nibble, Byte, Short, etc., or a Byte is inserted in its corresponding Short and Long integer, etc. but the opposite is not true. Note that scattered Read/Inputs or Write/Outputs are considered to be separate objects. An ECI Object I/O Tag represents a Bit, a Nibble, a Byte or a number of Bytes corresponding to a data memory in the external device or any tag of the FactoryLink database. Object I/O data (input/output) is transmitted bidirectionally from any type of Read and/or to any type of Write tags. Thus, ECI provides an Interface, which suits any type of communication. The system may be compared to a Dual Ported RAM (Random Access Memory) as it mirrors process I/O data, which can be changed in real-time by both external device and FactoryLink.
Update Delay
ECI Object Information RdElem(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)
Read Cycle Alternate Read Tags and/or Read Dataset Write Interval Alternate Write Tags and/or Write Dataset
Read
Table / Mbx
Write
Driver Interface
EDI / RAPD / OPC
Table / Mbx
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.
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 and Write Procedures Any I/O Tag may be set up either for one-way or bidirectional communication by simple configuration.
Read
Only
Changed data received at Read Cycle
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) |
Read
Table / Mbx
Driver Interface
EDI / RAPD / OPC
External Device
Read Only data is specified by simply addressing a Read Tag (Tag, Address or OPC Item) in the ECI Information table. A Read Tag is a portion - normally a dataword or register - read from the external device or, it may be a database tag if data is read from an EDI driver. Data from the external device is read in packages (Datasets or Blocks) at an adjustable Read Cycle (event or change driven and/or continuous or unsolicited).
Note that Read refers to data read by ECI or sent by the external device, respectively.
Write
ECI | | | |
Only
Changed data transmitted at Write Interval
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)
Driver Interface
EDI / RAPD / OPC
Write
Table / Mbx
External Device
Write Only data is specified by simply addressing a Write Tag (Tag, Address or OPC Item) in the ECI Information table. A Write Tag is a portion normally a dataword or register written to the external device or, it may be a database tag if data is written to an EDI driver. Data changed at the ECI is sent in packages (Datasets or Blocks) or individually at an adjustable Write Interval (event or trigger driven). Note that Write refers to data written to the external device or sent by ECI, respectively.
Read
Write
Changed data corrected after Update Delay
ECI Object Information RdElem(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)
Read
Table / Mbx
Driver Interface
EDI / RAPD / OPC
Write
Table / Mbx
External Device
Read/Write data is specified by simply addressing both a Read and a Write Tag (Tag, Address or OPC Item) in the ECI Information table. Data changed at either side is transmitted accordingly while updating at the ECI side is delayed by an adjustable Update Delay to allow for a feedback from an external device before the Object I/O is newly updated (data consistency).
Note: For ECI Startup Procedures and Data Initialization, see the General Rules on page 145.
Action=Reaction Read and Write tags may or may not be identical. The fact that individual Read/Write data can be combined in a single I/O Tag at ECI provides powerful methods for visualization as shown in the following example.
Visualizing a Pump
A motor command sent through the Write channel may be interlocked by hardware and software before it is returned as a contactor feedback signal through the corresponding Read channel. However, the I/O Tag in the ECI Information table may be identical for both command and feedback. Consider an I/O Tag, which is used for animation of a pump using the values: 0 = OFF1 = RUNNING 2 = STOPPING3 = STARTING To start the pump, you would set the I/O Tags 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.
Visualizing a Setpoint
A setpoint value may be transmitted to and from the very same address in the external device, for example a PLC emulating a Dual Ported RAM through individual Read and Write channels. In this case, it is obvious, that the ECI's I/O Tag is linked with Read and Write tags, which both represent the very same Setpoint address in the PLC. On the other hand, it is not obvious that the setpoint may be changed at any time on either side, ECI or PLC the last action accepted at the PLC will win. If a changed value is not accepted by the PLC, the setpoint returns to the actual feedback value after the Update Delay. Thus, the system automatically takes care of data consistency. And, because of the Write Interval, data transmission may at any time run at moderate speed still providing fast Action=Reaction virtually in real-time for the operator. This unburdens communication even if the setpoint is changed frequently, for example, due to keyboard auto repeating. All this is included for each single I/O tag with ECI. EDI Drivers, RAPD, and OPC Data eXchange External Device Interface EDI Drivers using Tags or Arrays in ordinary Read and Write Tables. Tags are referenced in Alternate Read and Write columns in the ECI Information table. Block Read data may be received unsolicited or polled by the Read Dataset IdxTag trigger, which can be specified for each ECI Information table (Interval Timer not required). Block Write data can be sent using a trigger as desired. Additionally, ECI provides a trigger whenever Object I/O data has been changed for a particular table (see Function IOChgWr).
Exception Write can be applied since Alternate Write Tags are forced written
whenever the corresponding Object I/O data is changed. Encoded Write is additionally supported for any driver. This method transmits an Address, a Code and the Tags Value to a Encoded Array, which is sent by a Block Write command to the PLC. A simple routine is required to decode the information in the PLC. ECI supports triggering by the appropriate Write Dataset IdxTag. The method allows for writing any data as Bits, Nibbles and Bytes, etc., which is normally not accessible for the driver. The ECI Information table has been designed to reflect the dataflow Read > Object I/O >
Write as shown below.
In the example above, the EDI driver reads Word 73 and puts the information to Analog Tag AnaX. Then, ECI examines Bit 12 to be displayed by I/O Tag MotorXY_ST. On the other hand, whenever MotorXY_ST is changed by a task other than ECI, the information is put to Digital Tag DigY to be written by the EDI driver to Bit 0 of Word 109 in the PLC. In this case, the EDI driver requires bit access for single commands, unless Encoded Write or Function Merge is applied. There are no restrictions with regard to the source and/or target of Alternate Read/Write data. For example, the output information could be sent through LAN to another FactoryLink station or, it can be written back to its source (Bit 12 of Word 73) to emulate a Dual Ported RAM for the particular Object I/O. Note that the Elem Addr columns are used to access Datasets of RAPD Drivers or to address Encoded Write data.
Note: If you want to apply Encoded Write with an EDI driver, specify an Encoded Array with a Write Interval in the ECI Control table and send the array as a standard block information to the PLC using the ECI Write IdxTag as the EDI Block Write Trigger.
Rapid Application Protocol Drivers RAPD use the IMX Intertask Mail eXchange protocol for the transmission of Datasets through Mailboxes. ECI supports Block Read, Block Write, Exception and Encoded Write procedures for the IMX interface as for EDI drivers described above. A Mailbox (Mbx) is always owned by the receiving task. Thus, the owner of the Read Mailbox (also-called Decoder or I/O Translator Mailbox) is ECI while the owner of the Write Mailbox (also-called Protocol Driver Mailbox) is the RAPD Driver. Mailbox Tags are referenced in either task together with individual Dataset identifiers called Index (Idx). A Dataset (Ds) represents a number of data Tags forming a coherent block of data with contiguous addresses in the external device. It is specified in the RAPD Driver Dataset Definition table and identified by a unique Tag (Dataset IdxTag) or a Constant (Ds Idx). Read and Write Datasets may or may not be identical for a particular ECI Object. Datasets are standardized, independently of the external device and may be transmitted in portions or entirely. All Tags within a particular Dataset have the same size. A Tag (Elem) of a Dataset is defined as one discrete bit or a 1, 2 or 4 byte binary value having a dedicated tag address in the external device, such as an Allen-Bradley or Telemecanique WORD, a Modicon COIL or REGISTER, or a Siemens FLAG or BYTE. Thus, an ECI Object I/O always represents a Sub-Tag (example: a bit) a tag (example: a byte) or a number of Tags (example: a float) of a Dataset in the external device.
The sample ECI Information table below shows the same setup as described for the EDI driver above.
For example, the RAPD Driver reads for example all Words 71..74 (Tags) and sends them as a Read Dataset to ECI, which then examines Bit 12 of Word 73 to be displayed by I/O Tag MotorXY_ST. On the other hand, whenever MotorXY_ST is changed by a task other than ECI, the information is sent to a Write Dataset for the RAPD Driver to be written to Bit 0 of Word 109 in the PLC. In this case, the RAPD Driver requires bit access for single commands, unless Encoded Write or Function Merge is applied. PLC source and target data Tags always belong to a particular Dataset assigned to the RAPD Driver. If you wish to emulate a Dual Ported RAM for a particular Object I/O, then both Read and Write Dataset must cover the same Tag in the PLC. Note that Alternate Read/Write Tags may additionally be used in any ECI Information table.
Note: The same setup can be used with ODX when replacing a RAPD by an OPC Server for the particular PLCs. In this case, the only rule refers to the OPC Item names, which must carry the Tag Address as follows: ItemName{ElemAddr}. For standard OPC setup see the next section.
ODX OPC Data eXchange uses the IMX Intertask Mail eXchange protocol to transmit OPC Group and OPC Item information from/to any OPC Server using (D)COM for local or remote access. ECI supports Block Read, Block Write and Exception Write as described for EDI drivers above. An OPC Server (OLE for Process Control by Microsoft) comprises several objects: the server itself (Database), the groups (Datasets) and the items (Tags). The OPC Server essentially is a Vendor Specific Real-Time Database, which serves as a container for OPC Group objects. It is configured by vendor specific tools and is accessed by (D)COM for local or remote data exchange. There are hundreds of OPC Servers available for almost any PLC make or bus system. An OPC Group represents a Dataset of logically organized OPC Items. All access to OPC Items is by an OPC Group, which holds attributes for read/write intervals on change/polled or block/exception transmission. Read and Write groups may or may not be identical for a particular ECI Object. They are basically independent from the external device even if reflected there. An OPC Item represents a tag of an external device as a Boolean/Flag, Integer/Word, Real/Float or Message/String, etc. Associated with each item is a Value, Quality and Timestamp. Note, the items are not the data source they are just connections to them. They should be thought of as symbolic addresses to the data. Microsofts (D)COM (Distributed) Component Object Model is used to communicate between ODX acting as an OPC Client and the OPC Server. COM is used if the server resides on the local machine. DCOM uses TCP/IP to access a remote server.
The sample OPC-specific information table below shows a setup as described previously for EDI and RAPD above.
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
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:
Rd CD E
Wr CDE
Comment:
I/O_Tag
single line entry Array offsets [a,b,c..], and [A,B,C..] specified by Read/Write Elem size and Conversion Codes CDE example LongAnalog example Analog
DigElem[0..31]
L0
LongAnaTag
L0
AnaElem[0..1]
Byte[0..1]
S0
AnaTag
B0
DigElem[0..7]
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.
Rd CDE
Wr CDE
Comment:
single line entry Array offsets [a,b,c..], and [A,B,C..] specified by Array Function, Read/Write Elem size and Conversion Codes CDE example Analog Array example Digital Array
ByteElem[0..199]
S0
AnaTag[0..99]
S0
DigElem[0..1599]
ARY100:2:1:16
AnaElem[0..31]
00
DigTag[0..511]
00
ByteElem[0..63]
ARY512:1:16:2
Array Function: nnn=Number of I/O Tags, x=Read Elem increm, y=I/Os per Read Elem, z=Write Elem increm. For OPC specific tables, ReadElem[a] and WriteElem[A] must be of type OPC Item Array in the OPC Server. Exception <=> Encoded Write Exception Write transmits individual data for each output to a PLC. Whenever an Object I/O is changed or forced written, data is immediately sent unless a Write Interval has been adjusted. Many communication protocols do not allow writing Bits, Nibbles, etc. in a tag (use Function Merge to assemble Write data). Note that some drivers may read a Word, insert a Bit and send the entire Word (including the inserted Bit) back to the PLC. Caution this may cause unpredictable reactions if data on the same Word is changed in the PLC during a write procedure. For example, data, which was previously read, could erroneously be reinstated. Encoded Write transmits an Address and a Code together with a Value as a Encoded Array by a Block Write command to the PLC. An internal routine is required in the PLC to decode the information and transfer the value to the desired
location. This method substitutes Exception Write commands and is very powerful regarding to safety and possible access to Bits, Nibbles, Bytes, etc., in a system. It should be applied with a Write Interval and can be used with any 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.
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. 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.
These methods are applicable only for Tags addressed by Read Elem Addr column.
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.
General Rules
Startup Procedure ECI initially clears all Read Mailboxes while the
corresponding Object I/Os are updated after receiving a Dataset or after the Update Delay if an I/O has been changed. This should be considered for synchronizing unsolicited read information. You can prevent reading uncertain (not updated) mailbox data at initialization by Program Argument InitUncertain. In this case, all I/O Status Tags will display a value 64 (Uncertain flag). All Object I/Os will only be updated after receiving a first valid Dataset. This may be used to prevent overwriting of persistent bidirectional Object I/O data at initialization. On the other hand, ECI normally prevents sending Write/Output information at initialization and thus inadvertently transmitting data to an external device. This is achieved by clearing all I/O change flags at startup unless Program Argument InitWrite is set to send persistent information to an external device. Caution: In this case, any changed or forced written I/O data may be written at startup or restart of ECI. Read/Inputs are specified either by an Alternate Read Tag, a Read Tag Address or an OPC Item name while a possible Tag has priority. To prevent hunting (that is, a race-around condition), Read/Input data is never directly conducted to a Write/Output. For Write-only communication, a Read/Input may be omitted. At startup, Read Mailboxes are emptied (cleared). This should be considered when reading unsolicited data. An init-flag can be set when the first valid Dataset has been read (see Init Function). Write/Outputs are specified by an Alternate Write Tag, Write Tag Address or OPC Item name. To prevent hunting, Read/Input data is never directly conducted to a Write/Output. For Read-only communication, a Write/Output may be omitted. At startup, no Write/Output is written (I/O change flags are cleared) unless enabled by Program Argument InitWrite. Object I/Os must always be specified and not be linked to its own created Write/Output. Object I/Os are only updated if the corresponding Read/Input has changed or if Function IOUpd or IOUpdAll is applied. At startup, the behavior may be specified by Program Argument InitUncertain. The valid range of the FactoryLink Tag Type must be considered for conversion: when for example extracting an Unsigned Long value (Rd CDE=UL0), it should be assigned to a Float since a LongAna cannot take its possible maximum of 4.29*109. Characters in Object I/O Messages must be 1..255 ASCII equivalent. Extracted message text (Rd CDE=MSG) is truncated at the location of the first character found 0 ASCII equivalent.
Object I/Os or Alternate Read/Write Tags may be connected to other ECI Tags to
provide an encoder function. The following connections are allowed: Alternate Read Tag Object I/O. Alternate Read Tag I/O. Alternate Read Tag Tag. own created other Object Alternate Write Use Merge Function if a Write/Output is required. Use Link Function were Object I/O is created. No restrictions.
Multiple Object I/Os may be decoded of a particular Read/Input. Object I/O data
assembling, merging, statistics, etc. must form a coherent block of line entries identified as a Composite Object using the same Read/Input. If a Read/Input is decoded at scattered locations, the entries are considered independent and may not provide the desired results. TagArrays are automatically assumed. Caution this especially applies for Alternate Read/Write Tags and may cause unpredictable reactions if a TagArray is not properly assigned (see TagArray Concept). Analog Arrays containing a Long Integer or Float must be pairs of consecutive 16-bit binary values. For TagArrays, the High/Low value order must be considered. However, an Object I/O TagArray is only assumed when specifying an ARYnnn:x:y:z Function. Multiple Functions may be applied with certain restrictions only. While some combinations, such as scaling and deadbanding, make sense, others, such as statistics and data merging, are useless. Because of the variety of possible combinations, it is recommended that you test the desired combination prior to implementation.
C ONFIGURATION TABLES
In Configuration Explorer, select the desired option in the Shared folder/domain. Then, select the appropriate table(s) to configure the ECI Communication Objects: ECI Dataset Converter (default for EDI, RAPD and Emulation by ODX driver) ECI OPC Item Converter (requires ODX OPC Data eXchange driver) ECI may be set up for hexadecimal and octal addressing if required; see Tag/Item Addressing and Conversion Code on page 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.
Read/Input
Read Control
Write/Output
Write Control
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.
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).
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.
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.
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.
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**
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.
ECI/OPC Object Information The ECI Information table identifies individual Object I/Os, which are extracted, converted, scaled or calculated from the Read/Input and which may be encoded, converted, normalized, and transmitted to the Write/Output. The table virtually reflects the dataflow Read/Input > Object I/O > Write/Output as follows:
Read/Input
Object I/O
Write/Output
Quality Info
An ECI Information table may be used for Read-only, Write-only and/or Bidirectional communication by simply filling in the desired fields. The following functions are included: Extraction from Bit, Nibble, Byte, Short, Long, Float, BCD, HEX, Message, and Array values 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
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).
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) 20..231,
(Modicon) reflects Bit Weight
0R..15R (reversed), 1D..32D (decimal), 0X..1FX (hexa), 0C..37C (octal), 16M..1M Nibble: Byte, Char: Integer: BCD: Float, Real: Message: N0..N3 (Half a byte, four bits of low word), N4..N7 (of high word)
word) value 0..15
I1 B0, UI1 UB0, B1, UB1 (Byte of low word), B2, UB2, B3, UB3 (of high I2 S0, UI2 US0 (16bit Short), S1, US1 (of high word), I4 L0, L0R, UI4 UL0 (32bit Long) BCD3, UBC3, UBC4 (3 or 4 digit BCD), BCD7, UBC7, UBC8 (7 or 8 digit BCD) R4 F0, F0R (32bit IEEE), FSIE G0 (Siemens), FMOT (Motorola), R8 D0 (64bit
IEEE Double)
MSG, MSG1..2, MSR (byte swapped) string identified by Function LNnnn ECaaa,
where:
Length nnn=1..1024 char and optional Ending fill Character aaa=0..255 ASCII equivalent. MSG and MSR are decoded as NULL terminated strings i.e. they are truncated at the first character found ASCII 0. MSG1 contains the actual string length in the first byte (that is the number of characters to be displayed), MSG2 contains the max length (nnn-2) in the first byte and the actual string length in the second byte.
Timestamp:
.UTC or UTC0 Universal Time Coordinated, FileTime binary dump, not for display,
I/O=Float .UTF or UTF0 UTC Float conversion (15 digits max) or UTCF Float UTC FileTime dump, I/O=Float .TIM, TIM0..3 or TIMF SecTime [s], .TIX, TIX0 or TIXF 0..999 [ms], I/O=LongAna, Analog .TIH, TIH0..3 or TIHF HourTime hh:mm:ss.xxx [ms], use Function LNnn to truncate I/O=Msg .TID, TID0..3 or TIDF DateTime YYYY-MM-DD hh:mm:ss.xxx [ms], use LNnn, I/O=Msg
Codes TI?0 require an 8 byte UTC FileTime input, codes TI?F require a UTC to Float converted input. Codes TI?1..3 require Dataset structures specified by Program Argument TIM1..3=Y/M/D/h/m/s/x. Use Program Argument DATE=... to modify the ISO 8601 format YYYY-MM-DD for example, DATE=MM/DD/YY, etc. SecTime outputs are limited to year 2037 due to ANSI C mktime. For more info see Dataset Layout for Timestamps on page 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 .QL Flags LL I/O=Analog
I/O=Analog
0=Bad, 1=ConfigError, 2=NoConnect, 3=DeviceFail, 4=SensorFail, 5=LastKnownVal, 6=CommFail, 7=OutOfSevice 16=Uncertain, 17=LastUsableVal, 20=SensorNotAccurate, 21=EngUnitsExceeded, 22=SubNormal 48=Ok/Good, 54=LocalOverride/Forced. Note that all other numbers are not specified. Access Rights: .AR Native 0=NoAccess, 1=Readable, 2=Writeable, 3=Read/Write,
I/O=Analog .AX Vendor Specific Value (high word of long integer), I/O=Analog
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.
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
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
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
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.
EnumX;Y > Enumerated Output taken from Read TagArray Index X..Y if the
Object I/O is changed or forced written to integer x..y where x=0..255 lowest and y=1..255 highest ArrayIndex. For example, this may be used to select a text as Open, Close, In Transit, and so on, corresponding to a value of 0, 1, 2, and so on. Make sure the array dimension is properly assigned (see also TagArray Concept). For bidirectional Enum values, create a Composite Object and use Function Link for ArrayIndex:
ECI/OPC Object Information - Shared
Read Tag, Addr or OPC Item EnumArray[0] EnumArray[1] EnumArray[2] EnumArray[3] EnumArray[4] `EnumItem `EnumItem EnumText[0] N0 N0 MSG EnumValue EnumArrayIdx EnumArrayIdx N0 MSG `EnumItem EnumTextOut Link LN9 Enum0;7 Rd CDE Object I/O Tag EnumArrayIdx Wr CDE Write Tag, Addr or OPC Item EnumOutput R/W Range Function Enum0;4 Sample description: Enum Output Principle assumed hidden tags OPC Bidirectional Enum Composite Object to Link EnumArrayIdx=EnumValue
TRxxx=vvv > Trigger Write/Output to Value vvv if the Object I/O is changed or
forced to xxx, where xxx, vvv = integer (see Write/Output Triggering by Function TRxxx=vvv on page 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).
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.
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:
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
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.
Status=0
) (a
Min
LimitType=B Boundary
I/OScaleMax - I/OScaleMin where ...a = R/WRangeMax - R/WRangeMin ... and b = I/OScaleMin - R/WRangeMin * a Default values if ...
Status>=4
(b)
Min
Max
R/W Range
a = 1, b = 0
Scaled I/O Range = 0..100
This column specifies a Status Indication Tag, which provides the information below. Valid entries are: TagName for Tag of Type Digital, Analog, LongAna or Float (default = none). Tag values are:
Value
0 or OFF 1 or ON 4 8
Bit Number
All OFF 0=ON 2=ON 3=ON
Status Indication
I/O Value Status Normal/Ok (independent on Read/Write interface) I/O Value in Transition = CHANGED (Data Transmission Active) I/O Value < ScaleMin = Out of Range (independent on Read/Write interface) I/O Value Low, OPC Quality Limit = 1 (OPC)
16 32 64 128 256
I/O Value High, OPC Quality Limit = 2 (OPC) I/O Value > ScaleMax = Out of Range (independent on Read/Write interface) I/O Value Uncertain, OPC Quality Status = 16..31 (OPC) I/O Value Bad, OPC Quality Status = 0..15 (OPC) Read/Input or Transmission ERROR (IMX based drivers or Alive function)
The I/O Status Tag may be applied in the graphics to inform the operator of a command transmission, which is still transient, and, it may be used to indicate an Out-of-Range Status. Transmission Errors are only indicated for IMX based drivers supporting this feature. The OPC Quality information (shaded) is only available in OPC-specific tables when entering the Qual Function but not in conjunction with an ARYnnn:x:y:z Function on the same line. The Uncertain flag (value 64) can also be enabled at startup when applying Program Argument InitUncertain. In this case, the I/O Status Tag will display uncertain until the Object I/O is updated by the first valid Dataset.
AND
C ONVERSION C ODE
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 BOOL LSB = Boolean/Least Significant Bit (default) 0..31 = Bit (decimal, 0=least significant) 0X..1FX = Bit (hexadecimal, 0X=least) 0C..37C = Bit (octal, 0C=least) 1D..32D = Bit (decimal, 1D=least) 0R..15R = Bit (reversed addr in Word, 15R=least) 16M..1M = Bit (Modicon decimal, 16M=least) Hex 100 TagArray or Block (1..nnn Bytes) Any code identified by Function ARYnnn:x:y:z where nnn = Nbr of I/O Tags, x=Read Elem increm, y=I/Os per Read Elem, z=Write Elem increm Message Text (1..1024 Bytes) MSG = String l MESSAGE Length + End fill Char MSG1 = ditto with actual lenght in 1st byte MSG2 = ditto max len (nnn-2) in 1st, act len in 2nd byte MSR = String reversed (byte swapped) 30x 31x Length + Ending fill Character are identified by Function LNnnn ECaaa where ... C80 C81 C82 Hex C00
Nibble (4-Bit) N0 (.AR) ..N3 = Nibble value 0..15 N4 (.QL) ..N7 = Nibble in upper value (Bit 16..31) Byte (8-Bit)
CC0
I1
nnn = 1..1024 and aaa = 0..255 ASCII equivalent. Input text for codes MSG and MSR is truncated at 1st char found 0 ASCII (NULL terminated strings)
B2, B3 = Signed Byte in upper value (Bit 16..31) UI1 UB0 (.QA), UB1 (.QX) = Unsign. Char/Byte 0..255 UB2, UB3 (.QS)= Unsigned Byte in upper value Short Integer or Word (16-Bit) I2 S0 = Int2/Short 32768..32767=215 l ANALOG S1 = Signed Short in upper value (Bit 16..31) UI2 US0 = Unsigned Int2/Short 0..65535=0..216-1
51x Timestamps (UTC or User specified) 600 TIM0 (.TIM) = SecTime [s] of UTC LNGANA D00
TIM1..3 = SecTime [s] of user specified bytes TIMF = SecTime [s] of UTCFloat TIX0 (.TIX) = 0..999 [ms] of UTC TIXF = 0..999 [ms] of UTCFloat LNGANA, ANA
US1 (.AX) = Unsigned Short in upper value Binary Coded Decimal (16-Bit) BCD3 = Signed BCD 999 (MSB=sign) UBC3 = Unsigned BCD 0..999 (3-digit)
680
MSG,
D20
780
TIH1..3 = hh:mm:ss.xxx [ms] of user specified bytes TIHF = hh:mm:ss.xxx [ms] of UTCFloat TID0 (.TID) = Y-M-D hh:mm:ss.xxx of UTC LNn MSG,
D2x
7C0
D2F D30
I4 L0 = Signed Int4/Long 2.1*109=231 l LONGANA L0R = Reversed Signed Long (byte swapped) UI4 UL0 = Unsigned Int4/Long
800
TID1..3 = Y-M-D hh:mm:ss.xxx of user specified bytes TIDF = Y-M-D hh:mm:ss.xxx of UTCFloat UTC0 (.UTC) = UTC native (binary dump) FLT
D3x
840 900
D3F D40
0..4.3*109=0..232-1 UL0R = Reversed Unsigned Long (byte swapped) Binary Coded Decimal (32-Bit) 940 UTF0 (.UTF) = UTC native to UTCFloat FLT D4F D50
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. x= 1..3
UBC7 = Unsigned BCD 0..9999999 (7-digit) UBC8 = Unsigned BCD 0..99999999 (8-digit) Floating Point/Real (32-Bit) FSIE G0 = Siemens Gleitpunkt 1.7*1038
980 9C0
F0R = Reversed IEEE Float (byte swapped) Double Precision Floating Point/Real (64-Bit) R8 D0 = Real8/IEEE Double 1.7*10308 l FLOAT
B00
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-Byte
The Hex Code transmitted by Encoded Array offset [3] has been designed to make decoding easy. The first hex number indicates the type and size of data 1=Bit, 3=Nibble, 4/5=Byte, 6/7=Short, 8/9=Long to be decoded, whereas odd=unsigned and even=signed values. The last two numbers indicate the position by bit shift 00..1Fhex in the Tag to be accessed, for example, 107 identifies a Bit shifted by 07hex bits in the Tag or, 418 identifies a signed Byte shifted by 18hex bits in the Tag, and so on.
Bit Pos Boolean (1-Bit) Nibble Byte Short Long
Weight 2 ..2
0 3
Decimal 00..03
Decimal 1D..4D
HexaDec 0X..3X
Octal 0C..3C
Reversed 15R..12R
Modicon 16M..13M
(4-Bit) N0/300
(16-Bit)
(32-Bit)
S1/610 US1/710
not applicable
not applicable
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.
3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC) Intel <=> Motorola Format and Composite Object
AND
C OMPOSITE O BJECT
Two or more Object I/O Tags using the same specific Read/Input (Alternate Read Tag or Elem Addr) are considered a Composite Object if entered as a coherent block of lines. In this case, a particular I/O Tag may directly influence its adjacent Object I/Os, similar to a PLC where a changed Bit influences its residing Byte or Word, etc. However, this ECI internal I/O processing is done only from lower towards higher ranking data in Composite Objects. For example, a Bit is inserted in its corresponding Nibble, Byte, Short, etc. or a Byte is inserted in its corresponding Short and Long integer, and so on, but the opposite is not true. This can be used to assemble data.
PLC Memory Tag Address
B# S# L#
Long
Short
(Word)
Long Integer
(DoubleWord)
Short
(Word)
Long Integer
(DoubleWord)
Byte Short
B0
S0
L0
0 1 2 3 4 5 6 7 N1 N0
0 1 2 3 4 5 6 7 8 N0 9 10 11 12 N1 13 14 N3 B1 N2 N1 B0 N0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 N3 B1 N2 N1 B0 N0
0 1 2 3 4 5 6 N1 N0
8 9 10 11 12 13 14 15 0 N0 1 2 3 4 N1 5 6 N1 B0 N0 N3 B1 N2
24 25 26 27 28 29 30 31 16 17 18 19 20 21 22 N5 B2 N4 N7 B3 N6
hig
S0
7 0 1 2 3 4 5 6
S1
B1
0 1 2 3 4 5 6
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Intel <=> Motorola Format and Composite Object
7 B2 S1 0 1 2 3 4 5 6 7 B3 0 1 2 3 4 5 6 7 B4 S2 L1 N1 N0 N1 N0
15 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 N3 B1 N2 N1 B0 N0
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 N7 B3 N6 S1 N5 B2 N4
hig
7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 N1 N0 N1 N0
7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 N1 B0 N0 N3 B1 N2
23 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 N1 B0 N0 S0 N3 B1 N2
low
0 # N# B# S# L#
= = = = = =
Least Significant Bit (LSB, Weight=20) l DIGITAL Bit #=1..31 (Weight=21..231) l DIGITAL Nibble #=0..3 of low word, #=4..7 of high word (4-Bit) l ANALOG Byte #=0..1 of low word, #=2..3 of high word (8-Bit) l ANALOG Short #=0 low word, #=1 high word (16-Bit) l ANALOG Long (32-Bit) l LONGANA l Corresponding FactoryLink Data Type
D ATASET L AYOUT
FOR
T IMESTAMPS
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
Note: Use Program Argument -DATE=... to modify the ISO 8601 standard output
D ATASET
OR
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:
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Dataflow PLC <=> RAPD/OPC <=> ECI <=> Database
S AMPLE TABLES
FOR
STANDARD D RIVERS
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.
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:
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:
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.
Saia S-BUS Driver The ECI Information Table for Object STAT3_OBJ5 below uses 32-Bit Registers 2140..2200 as a Read and/or Write Dataset specified in the SBD Saia S-BUS Driver tables. All data is converted by 5 line entries. Register 2140 is considered a Composite Object. Registers 2141..2200 represent a Float array of 60 tags with Read/Write access:
The following are sample Saia S-BUS Driver tables showing object STAT1_OBJ5 to Read/Write Registers as from address 2140 for 61 registers with Read Priority 3:
Note that the Saia S-BUS Driver is supplied with the SAIA PCD Communication Library, which handles both the S-BUS and/or the P800 Protocol. For Bit, Nibble and Byte access use Function Merge or Encoded Write. Using Exception Write to insert Bits to a Register may cause to first read the Register before writing (including the Bit). If Bit addresses are swapped, you may apply the WrCDE for reversed Bits. Data may be read by triggering the Read Dataset IdxTag. This can
be done automatically by setting a Read Interv Ch/Cont (interval after change and/or continuous). For bidirectional communication, set the Read Update Delay.
Note: For a redundant setup, follow the instructions in Dataset Exchange in Redundant System with VRN on page 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:
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.
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.
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.
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Sample Tables for OPC Data eXchange with ODX
S AMPLE TABLES
FOR
WITH
ODX
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.
3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC) Sample Tables for OPC Data eXchange with ODX
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.
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Sample Tables for OPC Data eXchange with ODX
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:
3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC) Sample Tables for OPC Data eXchange with ODX
Rd CDE
.UTC .TIM/.TIX .TIH/.TID .QA/.QX .QS/.QL
Conversion Codes for Standard OPC Attributes (for detailed info see Read Code CDE)
Timestamp Native, Universal Time Coordinated, FileTime format not for display unconverted to Double FactoryLink SecTime [s] as from 1980-01-01 and/or Milliseconds [ms] decoded to LongAna or Analog for [ms] HourTime hh:mm:ss.xxx or DateTime ISO 8601 YYYY-MM-DD hh:mm:ss.xxx [ms] decoded to Message 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 Access Rights Native 0=None, 1=Read, 2=Write, 3=Rd/Wr and Access Rights Vendor Specific 0..65535
.AR/.AX
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.
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.
IOX Max MSG column information is not required. Use ECI Write Interval to prevent queue overflow. IOX enCoded Write is not supported by all drivers. 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 systems 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.
BYTE* BR* BL* WORD* IBG IBAU IBAS LONG* RLNG* IEEE* RFLT* DBL* SIE* FDAM BCD2 BCD/BCD4* BCD8* MSG* TIME TIM0..TIM9*
B0/I1 UB0 UB1 S0/I2 (S0/I2) (S0/I2) (S0/I2) L0/I4 L0R F0 F0R D0 FSIE/G0 (F0) (UBC3) UBC4 UBC8 MSG (TIM0) TIM1..3
Signed Low Byte/Character 128..127 Byte RIGHT = Unsigned Low Byte 0..255 Byte LEFT = Unsigned High Byte 0..255 Word = Signed Short Integer 32768..32767=215 **ANALOG Interbus-S Gain for Analog I/Os use OPC Server with standard I2 and ODX Interbus-S Ana I/O 12 bit Unsigned use OPC Server with standard I2 and ODX Interbus-S Ana I/O 12 bit Signed use OPC Server with standard I2 and ODX Signed Long Integer 2.1*109=231 **LONGANA Reversed Long (byte swapped) IEEE Single Precision Float 3.4*1038 IEEE Reversed Float (byte swapped) IEEE Double Precision Float 1.7*10308 **FLOAT Siemens Float/Gleitpunkt 1.7*1038 Valmet Damatic Float 2.0 use OPC Server with standard IEEE Float and ODX 2-Digit Unsigned BCD for Byte 0..99 double lines in ECI: first extract UB0 then convert by UBC3 4-Digit Unsigned BCD for Word 0..9999 8-Digit Unsigned BCD for Long 0..99999999 Character String, consider IOX Bit or Length column and apply ECI Function LN##, **MESSAGE C-Time 1970-01-01 to SecTime 1980-01-01 use standard Filetime format or OPC Server and ODX User-defined time, specified of up to 8 bytes by Program Arguments
Legend: * Codes also available in ECI; (..) requires special conversion; ** denotes FactoryLink equivalent type.
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Dataset Exchange in Redundant System with VRN
D ATASET E XCHANGE
IN
R EDUNDANT S YSTEM
WITH
VRN
Assign the same VRN Connect Control Table a Tandem and a Local link to exchange Datasets through mailboxes between redundant system NodeA and NodeB as shown below. Note that ECI and Driver use separate mailboxes, which are linked according to the actual Tandem Status. The Tandem Status can be used to start/stop the local Driver if assigned to its TASKSTART_S[x] tag of the System Configuration:
S7D ECI Object Reference Table for Communication Object *SIM1_OBJ44, which is transmitted in a redundant system to the Local and/or Partner station through VRN:
If you do not want to control the driver by the VRN Tandem Status, replace above TASKSTART_S[x] tag by a unique tag. In any case, VRN must be run for data exchange between ECI and driver while the mailboxes of ECI (EciRmbx/EciWmbx) and driver (DrvRmbx/DrvWmbx) must be different.
3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC) Dataset Exchange in Redundant System with VRN
This setup is identical for all ECI-based RAPD as SBD, S7D and ODX. For OPC-specific tables, you can omit the Rd/Wr Ds Idx. However, make sure the ECI/OPC Control tables are the same on either system. For other RAPD, such as AB-RSLinx, Modbus or Sinec-H1, rename the Mailboxes in the driver tables to DrvRmbx/DrvWmbx and make sure the two applications are identical using FLSAVE FLRESTORE (same tag index for Datasets).
D ATA E MBEDDING
AND
F UNCTION M ERGE
This sample ECI Information Table illustrates how ECI can be used to assemble or merge data. Object I/Os having the same specific Read/Input are considered a Composite Object. In this case, ECI will internally process Object I/Os similar to a PLC where a Bit is part of its residing Byte or Word, etc. However, this ECI internal I/O processing is done only from lower towards higher ranking data. For example, a Bit is inserted in its corresponding Nibble, Byte, Short, etc. or a Byte is inserted in its corresponding Short and Long integer, etc. but the opposite is not true. In the example below, Bit_0..Bit_7 data will be inserted to Byte_of_Bits. Because this tag is also fed back to the Composite Objects 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 Objects input. In this case, the Merge Function must be applied to transmit data to the appropriate Write/Output.
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.
BY
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 Toggles 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.
A RRAY H ANDLING
BY
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
Sample entry to read 64 Low Nibbles N0 and if value changes to 15, trigger Bit 00 of every Second Tag
ENHANCED COMMUNICATION INTERFACE (ECI/OPC) | 3 Statistical Functions XR, XP, XF, XT, XA, XS
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.
3 | ENHANCED COMMUNICATION INTERFACE (ECI/OPC) Statistical Functions XR, XP, XF, XT, XA, XS
S UMMARY
OPC Data Translation => Method: RAPD/EDI and OPC Specific
OPC-Specific Table Overview OPC-specific tables support the ODX OPC Data eXchange driver shown in Sample Tables for OPC Data eXchange with ODX on page 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:
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 Read MailboxTag ReadDs IdxTag Rd Idx Rd Mode
Name of the object information table; sole reference for ECI-based RAPD and ODX (no other references required). Name of mailbox owned by ECI; also called Decoder or I/O Translator Mailbox referenced by non-ECI-based RAPD. 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. Identifier for Read Dataset; replaces Read IdxTag as identifier for network transfer (-1=none). 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. 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).
Interv Ch/Cont
I/O Read Update Delay 0.1...999 seconds (0=instant) after I/O. Change with Write Command (at least twice Write Interval). 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. 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. Identifier for Write Dataset; replaces IdxTag as identifier for network transfer (-1=none). 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). Write by Dataset Trigger: N=No (default). D=Dataset (entire). B=Blocks (coherent), not OPC specific. 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.** Encoded Write Addr (-1=none). Command Interval 0.1..999 sec (0=instant).
Wr Tr
Wr Ch
Information Table Summary The following are definitions of the columns in the Information Table:
Read Tag, OPC Item Elem Addr Rd CDE
Read Tag only valid if Read Elem Addr -1(D,A,L,F) or OPC Item if preceded by a single quote. Read/Input Tag Address for DataWord or Register of External Device (default -1=none). Read/Input Code ( alternative codes) Bits=BOOL LSB (default), 0..31 (bin) 1D..32D (dec), 0X..1FX (hex) OR..15R (bit-reversed address in word), Nibbles=NO..N7 (four-bit value 0..15) Bytes=I1 BO..B3,UI1 UB0..UB3 Short=I2 SO, S1, UI2 US0, US1 ShortBCD=BCD3, UBC3, UBC4 Long=I4 L0, UI4 UL0, L0R (swapped) LongBCD=BCD7, UBC7, UBC8 Float=R4 F0 (IEEE), FOR (swapped) FSIE G0 (Siemens Gleitpunkt) FMOT (Motorola Fast Float) Real/Double=R8 D0 (64Bit IEEE) String=MSG, MSG1/2, MSR (Message, Function LNnnn ECaaa) SecTime=TIM$ [s] (LongAna) Thousandth=TIX$ [ms] (LongAna, Ana) HourTime=TIH$ [ms] (Msg, LNn) DateTime=TID$ [ms] (Msg, LNn) UTCNative=UTC$ [0.1us] (Float, dump) UTCFloat=UTF0 [0.1us] (UTC>Float) Suffix $: 0=UTC input, F=UTCFloat input, or 1..3=specified by Prog. Arguments Quality Native .QA (Ana) Quality Status .QS, Limit .QL (Ana) Quality Vendor Specific .QX (Ana) Access Rights Native .AR (Ana) Access Vendor Specific .AX (Ana) Bidirectional Object Input/Output Tag (D,A,L,F,M) Write/Output Code (default=RdCDE)
Write/Output Tag Addr (default -1=none) Write Tag (D,A,L,F) or OPC item if preceded by a single quote. Read/Input and Write/Output Range = 3.4*1038Min ; 3.4*1038Max. No entry=I/O Range equal R/W Range (default), formulas: Object I/O=Read/Inputextracted * a + b, Write/Output=(ObjectI/O - b) / a where a=(I/OScaleMax - I/OScaleMin) / (R/WRangeMax R/WRangeMin) ... and b=I/OScaleMin - R/WRangeMin * a
Additional Functions:
Init IOChg IOChgRd IOChgWr IOUpdHalt IOUpdAll IOUpd RdTrigg RdCompl RdDisabl WrTrigg WrCompl WrDisabl WrMode=x;y WrType=z WrX SegmAddr=xx Mux=xx
I/O=Trigger: Initial Mbx Read Completion I/O=Trigger: Any I/O Changed/Updated I/O=Trigger: Any I/O Changed/Updated by Read/Input I/O=Trigger: Any I/O Changed for Write/Output I/O=Control: 1=Object I/O Update Halted All I/Os updated unconditionally at Mbx receive I/O updated unconditionally at Mbx receive I/O=Trigger: Read Request through Write Mbx I/O=Trigger: Read Completion feedback I/O=Control: 1=Object I/O Read Disabled I/O=Trigger: Block or Dataset Write command I/O=Trigger: Write Completion feedback I/O=Control: 1=Object I/O Write Disabled Write Mode x and IMX Version y as well as ... Write Type z in IMX protocol for certain RAPD drivers Write output eXceptionally (not replaced in cmd buffer) All Encoded commands include Segment Address xx I/O=Multiplexer: Enable Read/Write if I/O=xx
Ignore=xx Merge Qual Link Copy Enum TRxxx=vvv DBxx.xx LNnnn ECaaa HEXn ARRYnnn:x:y:z Alive=xx XR XP, XPA XD,XDA XFxx,XFAxx XT XA XS
I/O=Configuration: Ignore Table completely if I/O=xx Write/Output=Merged Composite Object I/Os Display OPC Quality infomration by I/O Status Tag I/O linked to other ECI Input or I/O (keep change status) Write/Output=Read/Input if Object I/O changed Write/Output=Enumerated of Read Array, I/O=ArrayIndex Write/Output=vvv Trigger if Object I/O = xxx Deadband for I/O, xx.xx=absolute value I/O=Message of nnn=1..1024 char, aaa=end char ASCII I/O=Message of n char containing Hex Value I/O=Array of nnn Elem, x=Rdlncr, y=I/O/RdElem, z=Wrincr I/O=Link Supervision, xx=[s], I/O Status
256=
I/O=Reset all Statistics of this table I/O=Enable, WriteTag-Peak/Maximum (A=auto init) I/O=Enable, WriteTag=Dip/Minimum (A=auto init) I/O=Interval, WriteTag=Filter Attenuation xx (A=auto init) I/O=SampleTrigg, WriteTag=Totalizer (sum of samples) I/O=#ofSamples, WriteTag=Average (arithmetic mean) I/O=xSquare, WriteTag=Sigma (standard deviation)
I/O Scale Min I/O Scale MinTag I/O Scale Max I/O Scale MaxTag I/O Status Tag (D,A,L,F)
Scale lower and Scale upper limit, Constant or Tag (A,L,F), default: No entry=0..1000 if R/W Range valid Note that OPC-specific tables use two only Tag/Constant columns. 0=Normal/OK 1=Transient 4= < Min Scale 8=Low OPC 16=High OPC 32=> Max Scale 64=Uncertain OPC 128=Bad OPC 256=Read Error
TERMS
Communication Objects are defined as a set of input and/or output data (Alternate Tags or RAPD Datasets) and are identified by a single line entry in the ECI Control table and its ECI Information table. Composite Objects are defined by two or more Object I/O Tags using the same specific Read/Input (Read Tag, Tag Address or OPC Item) by a coherent block of line entries. In this case, a particular Object I/O may directly influence adjacent Object I/Os, similar to a PLC where a changed Bit influences its residing Byte or Word, that is, a Bit is inserted in its corresponding Nibble, Byte, Short and so forth. Object I/O Tags represent a Bit, a Nibble, a Byte or a number of Bytes as a bidirectional interface for data transmitted from/to the external device. Read Cycle, Update Delay and Write Interval are transmission control parameters to specify performance and system load. See also Tag Array Concept. Read or Input data is transmitted from an external device through an (Alternate) Read Tag for EDI, a Read Dataset for RAPD or an OPC Item for ODX. See also Indirect Addressing with Unsolicited Read. Write or Output data is transmitted to an external device through an (Alternate) Write Tag or an Encoded Array for EDI, a Write Dataset for RAPD or an OPC Item for ODX. See also Read and Write Procedures and Exception Encoded Write. Datasets or OPC Groups represent logically organized data. For ECI, a Dataset simply is a number of Tags forming a coherent block (binary dump) of data with contiguous addresses in the external device. All access to OPC Items is by an OPC Group, which holds attributes for read/write intervals, on change/polled or block/exception transmission, etc. Read and Write groups may or may not be identical for a particular ECI Object. They are basically independent on the external device even if reflected there. Tags or OPC Items represent a Boolean/Flag, Integer/Word, Real/Float or Message/String, etc. For OPC, associated with each item is a Value, Quality and Timestamp. Note that OPC items are not the data source they are just connections to them. They should be thought of as symbolic addresses to the data. For ECI, a tag essentially is defined as a 1, 2, or 4-byte binary value, which can be decoded as desired. All Tags in a particular Dataset have the same size called Boundary of 1, 2, or 4 bytes.
EDI Drivers use single Tags or Arrays for ordinary Read/Write Tables. Tags are referenced in Alternate Read and Write columns in the ECI Information table. ECI supports Block Read (Interval Timer not required), Block Write (ECI provides a trigger whenever Object I/O data has been changed for a particular table), Exception Write and Encoded Write (ECI supports triggering). RAPD Drivers use the IMX Intertask Mail eXchange protocol for the transmission of Datasets through Mailboxes. ECI supports Block Read, Block Write, Exception and Encoded Write procedures for the IMX interface as for EDI drivers described above. A Mailbox is always owned by the receiving task. Thus, the owner of the Read Mailbox (also-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.1s. If converted to a FactoryLink Float, its precision is 15 digits (approximately 10s in year 2001), which should be sufficient.
P ROGRAM A RGUMENTS
The arguments shown below may be directly entered in the Program Arguments column of the System Configuration table. You may also reference a file to enter the parameters there. In this case, the filename must be specified without a dash in the Program Arguments column. You can apply environment variables using brackets {...} and pathnames as required, for example, {flapp}\ECI_para.run. Note that a leading entry in the Program Arguments column will overwrite a possible duplicate entry in the file.
Argument Description
-DRMbx=<#>
Log read debug messages. -DWMbx=<#> Log write debug messages. -DQMbx=<#> Log query debug messages. -DERMbx=<#> Log read Error messages. (#=1 to 3, default = 3, most sensitive) -LimitType=<A or B> Compute all I/O values without upper/lower limits, X = A (default) or, limit all I/O values by ScaleMin/Max boundary, X = B. -InitUncertain Set the I/O Status Uncertain-Flag (value = 64) and hold the Object I/Os until they are updated by the first valid Dataset at initialization. (default=Object I/Os are set zero if changed and no Dataset is received after the Update Delay.) -InitWrite Write all Outputs if Object I/O Tag was changed at initialization. (default=changes cleared without writing) -DefaultMsgLength=<#> If ECI is the first task that writes to a message tag without a configured length, it sets the max length to # char. (default = 80) -SleepTime=<#> Adjust process speed/CPU load by suspending program (sleeping) every # scan. (default=100 in ms) -Throttle=<#> Throttle non critical job processing by multiple # rates of SleepTime (default=none):
Argument
Description
-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.
# -TIM3=Y0/D2M/h4m/s6t Sample YY/DDMM/hhmm/ssxx, using [ms] in byte 6+7 # Item: Date: Suffix to specify size and format of Items as follows: # Y#+ YY no=Dec 0..99, B=BCD, L=Low byte of YYYY 188..255, M=YYMM 0..9912 (Valid # years=1980..2047) # M#+ MM no=Dec 1..12, B=BCD, Y=MMYY 100..1299, D=MMDD 101..1231 # D#+ DD no=Dec 1..31, B=BCD, M=DDMM 101..3112 # h#+ hh no=Dec 0..23 [h], B=BCD, m=hhmm 0..5959 # m#+ mm no=Dec 0..59 [min], B=BCD, s=mmss 0..5959 # s#+ ss no=Dec 0..59 [s], B=BCD, x=ssxx 0..5999 [0.01s], t=thousandth ssxxt 0..59999 [ms] # x#+ xx no=Dec 0..99 [0.01s], B=BCD, t=thousandth xxt 0..999 [ms] # ( Byte Offset # and optional Suffix +) # Default Message outputs are: YYYY-MM-DD hh:mm:ss.xxx [ms], all SecTime outputs are limited # to 2037 due to ANSI C mktime. # Date Format in timestamp messages for RdCDE = TID0..TID3 and .TID, default=YYYY-MM-DD # (ISO 8601): # DATE=YY-MM-DD # Valid year formats are YY or YYYY, delimiters are {-}{/}{.} for example, America: MM/DD/YY, # Europe: DD.MM.YYYY, and so forth. # # Arguments for General Purpose and Debugging # (Note that Debug switches D??? reduce performance due to disk access for logging.) # Debug and log Mailbox Jobs to file {FLAPP}\SHARED\LOG\ECI.LOG for ... # Read -DRMbx, Write -DWMbx, Query -DQMbx and Read Errors -DERMbx: # DRMbx
# DWMbx # DQMbx # DERMbx # Warning level #=1..3 to suppress Read Mailbox Errors, the greater the number, the more # information is displayed (default=3, most sensitive): # WRMbx=3 # # Compute all I/O values without upper/lower limits (default, -LimitType=A) or, limit all I/O values # by ScaleMin/Max boundary (see also R/W Range / Function): # 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
I NFORMATION
AND
E RROR M ESSAGES
The messages below may be displayed by the RunTime Manager during startup, runtime or shutdown. Additional messages can be logged to file %flapp%\shared\log\ECI.log (where %flapp% denotes the FactoryLink application directory). See Program Arguments for debugging. The numbers preceding messages indicate the type of message: Warnings (#001..#099), Failures (#100..#199) and Configuration Errors (#200..#299). The format specifiers (%s, %d, %u, etc.) represent runtime values, %03d:%05d indicates a TagIndex and Code=%d is an error number returned by the FactoryLink kernel (defined by PAK, file FLDEFS.H):
Label in file ECI.TXT
PROG_INACTIVE PROG_RUNNING
RCV_MBX_ERROR
RCV_MBX_NO_DSA_FOUND RCV_MBX_NO_DST_FOUND
RCV_MBX_ERR_DATALEN E_FLCHANGEWAIT E_FLCOUNTMBX E_FLS, ETC.HNGF E_FLCLEARCHNGF E_FLREAD E_FLREADAPPMBX E_FLWRITE E_FLMBXWRITE E_FLQUERYMBX
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.
SYS_NO_MEMORY
In the table below, text displayed before the messages above indicates the table name and line number of the erroneous data entry.
Label in file ECI.TXT
CTLOAD_HDR_ERR CTLOAD_REC_ERR RUNTIM_REC_ERR %s Hdr: %s %s Line %d: %s %s Line %d: %s
Chapter 4
FLGEM
O VERVIEW
This chapter contains information needed to set up and configure bidirectional communications between the FactoryLink real-time database and one or more SEMI Host Communication Standard (SECS) Protocol devices. FLGEM supports the SECS-I and SECS-II serial RS-232 protocol as well as the HSMS TCP/IP protocol.
Logical Port
SECS/HSMS
Specify whether to use the SECS RS232 or HSMS protocol for communication.
Valid Entry: HSMS
SECS
Com Port
Baud Rate
T3 Timeout 1 sec
T4 Timeout 1 sec
T5 Timeout 1 sec
T6 Timeout 1 sec
T7 Timeout 1 sec
T8 Timeout 1 sec
Retry Limit
ACTIVE/PASSIVE
Specify whether this port is the active or passive entity. Required for HSMS.
Valid Entry: ACTIVE (MASTER)
PASSIVE (SLAVE)
HOST/EQUIP
EQUIP
Protocol
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)
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)
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)
Specify the time limit to wait for TCP/IP to accepts data. Required for HSMS.
Valid Entry: 1 - 120 seconds (default = 20)
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 name Valid Data Type: analog
Optional tag name of a FactoryLink real-time database analog tag to which the count of messages sent is written.
Valid Entry: tag name Valid Data Type: analog
Optional tag name of a FactoryLink real-time database analog tag to which the count of messages received is written.
Valid Entry: tag name Valid Data Type: analog
Optional tag name of a FactoryLink real-time database analog tag to which the count of timeout errors is written.
Valid Entry: tag name Valid Data Type: analog
Optional tag name of a FactoryLink real-time database analog tag to which the count of retries is written.
Valid Entry: tag name Valid Data Type: analog
Optional tag name of a FactoryLink real-time database message tag to which status for this logical port is written.
Valid Entry: tag name Valid Data Type: message
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
Column
Logical Port SECS/HSMS Com Port Baud Rate T1 Timeout 0.1 sec T2 Timeout 0.1 sec
Description Name of the port being defined Using the SECS (RS232) Communicating through Com Port 1 Com port operating at 9600 BAUD 0.5 second timeout value 3 second timeout value
Column
T3 Timeout 1sec T4 Timeout 1sec T5 Timeout 1sec T6 Timeout 1sec T7 Timeout 1sec T8 Timeout 1sec Retry Limit ACTIVE/ PASSIVE HOST/EQUIP Protocol Passive IP Address TCP Port Connection Estab 1sec Circuit Assurance 1sec TGRACE 1sec Memory Stall 1sec Write Stall 1sec Last Send StatusTag Msgs Sent Counter Tag Msgs Rcvd Counter Tag T3/T4 Timeout Errors Tag Status Msg Tag
Entry 30 10 10 20 10 10 3 PASSIVE EQUIP HSMS-94 30 second timeout 10 second timeout 10 second timeout 20 second timeout 10 second timeout 10 second timeout
Description
Communications retry count Passive will not initiate communication Defined as equipment SECS protocol Not required for SECS (RS232) Not required for SECS (RS232)
20 15 10 30 20
Default - not required for SECS Default - not required for SECS Default - not required for SECS Default - not required for SECS Default - not required for SECS Optional Optional Optional Optional Optional
Optional tag name of a FactoryLink real-time database analog tag to which any errors for this logical station are written.
Valid Entry: tag name Valid Data Type: analog
OFF_LINE
Comment
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
Column
Error/Status Tag Name Device Type Device ID Device State at Startup Comment
Description
Currently the only available choice Number used to identify this device Device will be on line at startup Optional
Variable ID
Variable Name
Variable Type
Format Code
BNARY BOOLN ASCII JIS8 SINT8 SINT1 SINT2 SINT4 FLOT8 FLOT4 UINT8 UINT1 UINT2 UINT4 L B BN A (default) J S8 S1 S2 S4 F8 F4 U8 U1 U2 U4
Units
Length
Optional data item array count. For string data types, the number of characters.
Valid Entry: 1-65535 (default = 1)
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
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
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 name Valid Data Type: Digital
Description
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.
Description Number identifying this variable Name identifying this variable Status Variable FactoryLink tag holding the value of this variable Unsigned 2 byte integer Optional Variable consists of only one tag value Lower limit of limit range used by Limits Monitoring Upper limit of limit range used by Limits Monitoring Event ID which will be sent when Limits Monitoring detects a limit violation Optional
Limit Event ID 1000 Initial Value (default) Application Owned Private Host Changed EC Trigger Description
YES NO
The value will be passed tp GWGEM only when requested by GWGEM Variable is visible to the Host Optional Optional
Limit Lower DB
Limit Upper DB
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Limits Monitoring Table Entries
Column
Limit Lower DB Limit Upper DB Description
Description Lower Deadband for this limit Upper Deadband for this limit Optional
GemConfigAlarms GemConfigConnect GemConfigEvents GemConstantFileName GemDeviceName GemEstabCommDelay GemHostId GemInitCommState GemInitControlState GemPollDelay GemPPExt GemPPDir GemPPTempFileName GemPPTocName GemRecipeType GemReportFileName GemRpType GemWBitS10 GemWBitS5 GemWBitS6 GemAbortLevel GemAlarmId GemAlarmsEnabled GemAlarmsSet
Variable ID (cont.)
GemASer GemClock GemControlState GemDataId GemEventsEnabled GemLinkState GemMDLN GemPPExecName GemPPExecName GemPreviousCeid GemPreviousCommand GemPreviousControlState GemPreviousProcessState GemProcessState GemSOFTREV GemTime GemPPChangeName GemPPChangeStatus GemOfflineSubstate GemOnlineFailed GemOnlineSubstate GemMaxSpoolFileSize GemMaxSpoolTransmit GemSpoolFileName GemSpoolCountActual GemSpoolCountTotal GemSpoolFullTime GemSpoolLoadSubstate GemSpoolStartTime GemSpoolState GemSpoolUnloadSubstate GemEventText GemPPKeepSecsHeader GemLimitsVID GemEventLimit GemTransType GemLimitsDelay GemLimitsFileName GemOverWriteSpool GemConfigSpool GemHostMessageLimit
Variable ID (cont.)
GemDynamicDataLimit GemTermReqSendMax GemTermReqRecvMax GemPrimaryMessageLimit Control_GoOnline Control_GoOffline Control_GoRemote Control_GoLocal Control_Enable Control_Disable
Variable Write/Control Tag
Tag containing the data to be written to the Equipment Constant or Status Variable.
Valid Entry: tag name Valid Data Type: Digital
Tag to receive the data to be read from the Equipment Constant or Status Variable.
Valid Entry: tag name Valid Data Type: Digital
Optional tag, for Equipment Constants only, which will be force written to one when the Variable is changed by the Host.
Valid Entry: tag name Valid Data Type: Digital
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 name Valid Data Type: Digital
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Equipment Control/Status Table Entries
Column
Variable ID Variable Write/ Control Tag Variable Read Tag Initial Value (default) Host Changed EC Trigger GWGEM Status Read Trigger Description
Entry GemLinkState
Description ID of the Equipment Constant or Status Variable to be read from or written to Not used in this case
LinkState
Name of the FactoryLink tag into which the value of the Variable is written Optional Optional
sec1
The variable will be read every second and its value stored in the Variable Read Tag Optional
Event Name
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 name Valid Data Type: Digital
any time the Monitor Tag changes value or is force written. If the Monitor Condition is TGL and no Monitor Value is specified, the Event will be triggered any time the Monitor Value changes from between FALSE and TRUE or 0 and non 0.
Monitor Condition
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: OFF
ON TGL = =__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: Digital
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
When the table is complete, click on the Save icon to validate the information.
Description Number to identify this event Name to identify this event FactoryLink tag which will be monitored Event will be triggered when the Monitor Value exceeds the tag value and also when it again becomes less than the tag value The value to compare against the Monitor Tag value Optional Optional
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Collection Event Reports Table Entries
Column
Report ID Description
Alarm Name
When this tag is force written to one this alarm will be sent.
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
Collection Event which will be triggered when this alarm goes from OFF to ON.
Valid Entry: 0 - 999999
Collection Event which will be triggered when this alarm goes from ON to OFF.
Valid Entry: 0 - 999999
Description
When the table is complete, click on the Save icon to validate the information. Sample FLGEM Alarms Table Entries
Column
Alarm ID Alarm Name
Description Number to identify this alarm Name to identify this alarm Alarm priority FactoryLink tag which when force written to one will cause this alarm to be sent to the Host Optional Alarm text sent to the Host Event 100 will be triggered when this alarm goes to the ON state Event 110 will be triggered when this alarm returns to the OFF state Optional
Alarm Code (1-127) 1 Alarm Trigger Tag Alarm Disable Tag *Alarm Text
Alarm 100
110
Description
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
Column
Report ID Description
Entry 100
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Report Detail Table Entries
Column
Variable ID Description
Entry 100
Description The value of variable 100 will be sent as part of this report Optional
Field Descriptions
Trace ID
Trace Trigger
Tag which when force written to one will cause a Trace to be initiated by simulating a S2F23 message.
Valid Entry: tag name Valid Data Type: Digital
Data Sample Period which defines how often the trace data is logged.
Valid Entry: Numeric string of up to 6 characters Valid Data Type: HHMMSS
Specifies how many sets of data should be collected before sending the S6F1 (Trace Data Send) message.
Valid Entry: 1 - 999999 (default = 1)
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Trace Reports Table Entries
Column
Trace ID Trace Trigger
Entry 1 trace_trig
Description Number to identify this trace report FactoryLink tag which when force written to one will initiate this trace report
Column
Sample Period (HHMMSS) Total Number of Samples Reporting Group Size Description
Entry 000015 2 1
Description Data will be sampled every 15 seconds Two samples will be taken before the trace operation is terminated Trace report is sent after one set of samples has been collected Optional
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Trace Detail Table Entries
Column
Variable ID Description
Entry 1010
Description Variable 1010 will be sampled for this trace report Optional
Optional Tag which will be force written to one when the Remote Command has been received and validated.
Valid Entry: tag name Valid Data Type: Digital
Optional Tag which, if set to one, will prevent the Remote Command from being processed.
Valid Entry: tag name Valid Data Type: Digital
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Remote Command Table Entries
Column
Remote Command Remote Command Trigger Tag Command Disable Tag Description
Description Name of the remote command FactoryLink tag which will be force written to one when this command and its parameters are correctly received Optional Optional
Force
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
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
When the table is complete, click the Save icon to validate the information. Sample FLGEM Remote Command Table Entries
Column
Parameter Name Parameter Value Tag Force Parameter Min Limit Parameter Max Limit
Description Name of the parameter is First FactoryLink tag into which the value of this parameter is written The parameter Value Tag will be force written The lower limit of a valid parameter is 10 The upper limit of a valid parameter is 100
Field Descriptions
Terminal ID
Optional message tag array which will hold received terminal text messages.
Valid Entry: tag name Valid Data Type: Message
Number of Lines
Optional Tag which will be force written to one when a terminal message has been received.
Valid Entry: tag name Valid Data Type: Digital
Description
When the table is complete, click the Save icon to validate the information. Sample FLGEM Terminal Messages Table Entries
Column
Terminal ID Recv Message Tag Number of Lines Recv Trigger Tag Description
Description Number to identify this terminal FactoryLink tag array into which the received terminal messages lines will be written The above tag array will hold up to 25 message lines FactoryLink tag which will be force written to one when a message has been received for this terminal Optional
Message tag array which will hold terminal text messages to be sent to the host.
Valid Entry: tag name Valid Data Type: Message
Tag which when force written to one will cause the Send Message Tag text to be sent to the host.
Valid Entry: tag name Valid Data Type: Digital
When the table is complete, click the Save icon to validate the information. Sample FLGEM Message Detail Table Entries
Column
Send Message Tag Send Trigger Tag
Description FactoryLink tag array holding message lines to be sent to the host FactoryLink tag which when force written to one will cause the above message lines to be sent to the host
Comment
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
Column
SECS-II Table ID Comment
Entry 1 Optional
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 name Valid Data Type: Digital
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: READ
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
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: LIST
BNARY BOOLN ASCII JIS8 SINT8 SINT1 SINT2 SINT4 FLOT8 FLOT4 UINT8 UINT1 UINT2 UINT4 FNAME - File Name for READ NOBDY FSIZE FN_B - File Name for WRITE, send data as bytes FN_A - File Name for WRITE, send data as ASCII FN_I1 - File Name for WRITE, send data as SINT1 FN_I2 - File Name for WRITE, send data as SINT2 FN_I4 - File Name for WRITE, send data as SINT4 FN_I8 - File Name for WRITE, send data as SINT8 FN_U1 - File Name for WRITE, send data as UINT1 FN_U2 - File Name for WRITE, send data as UINT2 FN_U4 - File Name for WRITE, send data as UINT4
UINT8 CONI2 - Conditional item type SINT2 CONU2 - Conditional item type UINT2 CONI4 - Conditional item type SINT4 CONU4 - Conditional item type UINT24 CONAS - Conditional item type ASCII
Number
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 items
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: NO
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: NO
YES
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: NO
YES
When the table is complete, click the Save icon to validate the information. Sample SECS-II Message Definition Information Table Entries
Column
Tag Name Read/Write Stream Decimal Function Decimal Message ID Item Type Number Constant Parse Position
Entry
BOTH 12 9 L 4
Defining a message for both read and write Define a stream 12 message Define a function 9 message Optional Item is a List There four items in this List Optional Optional
SECS-II Table ID
Number of the table defined in the SECS-II Message Definition Control Table.
Valid Entry: 0 - 32767
Tag name of a FactoryLink real-time database analog tag which defines the stream number of the message to be sent.
Valid Entry: tag name Valid Data Type: analog
Tag name of a FactoryLink real-time database analog tag which defines the function number of the message to be sent.
Valid Entry: tag name Valid 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 name Valid 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 name Valid 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 name Valid Data Type: digital
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 name Valid 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 name Valid Data Type: analog
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 name Valid Data Type: analog
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 name Valid 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 name Valid 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 name Valid Data Type: digital
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
Description Table 1 as defined in the SECS-II Message Definition Information Table FactoryLink tag to hold the stream number of a message to be sent FactoryLink tag to hold the function number of a message to be sent FactoryLink tag to hold the message id of a message to be sent 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 Optional Optional Optional Optional Optional Optional Optional Optional
Send Disable Send State Send Status Receive Stream Number Receive Function Number Receive Message ID Receive Status Read Disable
Field Descriptions
Tag to hold the PPID of a Process Program to uploaded or downloaded by the Equipment.
Valid Entry: 0 - 32767 Valid Data Type: message
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 name Valid Data Type: digital
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 name Valid 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 name Valid Data Type: digital
Tag which will hold the PPID of a Process Program whose download was initiated by the Host.
Valid Entry: tag name Valid Data Type: message
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 name Valid Data Type: digital
# of PPIDs to List
Tag to specify the number of PPIDs the PPID List Tag array can hold.
Valid Entry: tag name Valid 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 name Valid Data Type: analog
Digital tag whose value, when forced to 1 (on), initiates a listing of the PPIDs
Valid Entry: tag name Valid 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 name Valid Data Type: analog
Delete PPID
Tag to hold the PPID of a Process Program to be deleted from the equipment.
Valid Entry: tag name Valid Data Type: analog
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 name Valid Data Type: digital
Determines whether the Process Program file will contain the SECS-II Data Item Header.
Valid Entry: YES
NO (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 name Valid Data Type: digital
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
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
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
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
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 name Valid Data Type: digital
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 name Valid 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 name Valid 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 name Valid 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 name Valid Data Type: digital
Create/Modify Status
message
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.
Description FactoryLink tag holding the ID of the Process Program to be uploaded or downloaded 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 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 FactoryLink tag which will be force written to one when the upload or download is complete FactoryLink tag which will hold the ID of a process program downloaded through a host initiated download FactoryLink tag which will be force written to one when the host initiated download is complete FactoryLink tag which contains the ID of the currently executing process program FactoryLink tag array which will hold the IDs of the process programs currently stored on the equipment FactoryLink tag holding the size of the above tag array FactoryLink tag which when force written to one will cause the PPIDs to be written to the above tag array FactoryLink tag which will hold the actual number of PPIDs read into the above tag array FactoryLink tag to hold the ID of a process program to be deleted from the equipment FactoryLink tag which when force written to one will cause the PPID stored in the above tag to be deleted
Download Trigger Tag Upload/Download Complete PPID Downloaded from Host Host Download Complete Currently Executing PPID PPID List Tags
download_proc
pxfer_compl host_ppid
ppids_to_read list_ppid
Column
Keep SECS Header Temp File Name
Entry NO ppdir\\temp
Description Do not store SECS header with the process programs GWGEM will use the file temp in the ppdir directory for temporary storage while uploading and downloading process programs Optional Optional Optional
TOC File Extension PPID File Extension PPID File Directory 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. FactoryLink tag which holds the path and file name of the downloaded Process Program for use by the CML/IML verify routine. FactoryLink tag which will be force written by the CML/IML verify routine to indicate the verify status to FLGEM. 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. 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. FactoryLink tag which will contain the PPID of the Process Program to be added or modified. 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.
Verify PPID
verify_ppid
verify_compl
new_ppid_trigger
ppid_name modify_ok
Column
Modify Done
Entry modify_done_trig
Description 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. FactoryLink tag which will be force written by FLGEM to indicate the status of the Create or Modify operation.
Field Descriptions
Upload/Download DS Name 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 name Valid Data Type: digital
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 name Valid 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 name Valid Data Type: digital
Tag which will hold the Name of a Data Set whose download was initiated by the Host
Valid Entry: tag name Valid Data Type: message
Tag which will hold the File Name assigned to a Data Set whose download was initiated by the Host.
Valid Entry: tag name Valid Data Type: message
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 name Valid Data Type: digital
Digital tag whose value, when force to 1 (ON), cancels any Uploads or Downloads in progress.
Valid Entry: tag name Valid Data Type: digital
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.
Description FactoryLink tag holding the name of the Data Set to be uploaded or downloaded FactoryLink tag holding the file name of the Data Set to be uploaded or downloaded 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 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 FactoryLink tag which will be force written to one when the upload or download is complete Optional Optional Optional FactoryLink tag which when force written to one will cause active DS transfers to be aborted
download_ds
Upload/Download Complete DS Downloaded from Host File Name for DS from Host Tag Host Download Complete Reset Trigger Tag
xfer_compl
reset_ds
TECHNICAL N OTES
Custom Message Specific
INT8
For UINT8 and SINT8 the data can be stored into 2 LONGANA or 4 ANALOG tags by specifying a tag array and a count in the 'Constant' column.
Parsing
If the 'Parse' field of a 'READ' Message Definition Line is 'Yes', the incoming message will be parsed. The parsing term for each tag is entered in the 'Parse Position' field. The following example illustrates Parse Position terms for a sample message (similar to S6,F3): Message Structure L, 3 UINT4 UINT4 L, 1 L, 2 UINT4 L, 7 ASCII, 40 ASCII, 40 ASCII, 40 ASCII, 40 UINT4 UINT4 UINT4 Parse Position String 1 1.1: 1.2: 1.3 1.3.1 1.3.1.1: 1.3.1.2 1.3.1.2.1:10,20 Start with character 10, store 20 1.3.1.2.2:,40 Store first 40 characters 1.3.1.2.3:10 Start at character 10, store rest of string 1.3.1.2.4: Store whole string 1.3.1.2.5: 1.3.1.2.6: 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.
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.
For example: LIST 3 2 tag1 UINT2 tag2 UINT2 LIST 2 2 tag3 SINT2 tag4 SINT2 will result in the following message: LIST 6 tag1 UINT2 tag2 UINT2 LIST 4 tag3 SINT2 tag4 SINT2 tag3+1 SINT2 tag4+1 SINT2 tag1+1 UINT2 tag2+1 UINT2 LIST 4 tag3+2 SINT2 tag4+2 SINT2 tag3+3 SINT2 tag4+3 SINT2 The message structures are expanded at start up to reduce the processing at run time. If logging (command line 'd' or 'D') is enabled, the message structures will be stored in the file 'sdrv_log.dat.
Conditionals
Item types are CONI2, CONU2, CONI4, CONU4 and CONAS for SINT2, UINT2, SINT4, UINT4 and ASCII data types respectively. Entries in the 'Constant' field will be used to match the incoming data. These item types can be used in normal or parsed READ messages. The conditional fields may or may not have tags associated with them. If there are any conditionals in a message definition, the message will first be processed to see if the data received in the conditional fields matches the 'Constant' data for the conditional field before any data is stored into tags. For 'CONAS' fields, the ':X,Y' parsing conditions apply to the conditional matching, but if the conditions are met, and a tag is specified for the field, the whole string will be stored. If the
Constant data does not match the data received, none of the message data will be stored.
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.
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 = 0 name = "" units = "" writeable = FALSE constant fixup GemConfigAlarms = <U1 0> vid = 1 name = "CONFIGALARMS"
units = "" min = <U1 0> max = <U1 2> default = <U1 0> writeable = FALSE constant fixup GemConfigConnect = <U1 2> vid = 2 name = "CONFIGCONNECT" units = "" min = <U1 0> max = <U1 2> default = <U1 2> writeable = FALSE constant fixup GemConfigEvents = <U1 1> vid = 3 name = "CONFIGEVENTS" units = "" min = <U1 0> max = <U1 1> default = <U1 1> writeable = FALSE constant fixup private GemConstantFileName = <A "CONST.LOG"> vid = 4 name = "" units = "" writeable = FALSE constant fixup GemDeviceName = <A "DeviceName"> vid = 5 name = "DEVICENAME" units = "" writeable = FALSE constant fixup GemEstabCommDelay = <U2 20> vid = 6 name = "ESTABLISHCOMMUNICATIONSTIMER" units = "s" min = <U2 0>
max = <U2 1800> default = <U2 20> writeable = TRUE constant fixup private GemHostId = <U2 0> vid = 7 name = "" units = "" default = <U2 0> writeable = TRUE constant fixup GemInitCommState = <U1 1> vid = 8 name = "INITCOMMSTATE" units = "" min = <U1 0> max = <U1 1> default = <U1 1> writeable = TRUE constant fixup GemInitControlState = <U1 2> vid = 9 name = "INITCONTROLSTATE" units = "" min = <U1 1> max = <U1 2> default = <U1 2> writeable = TRUE constant fixup GemPollDelay = <U2 30> id = 10 name = "HEARTBEAT" units = "s" min = <U2 0> max = <U2 1800> default = <U2 30> writeable = TRUE constant fixup private GemPPExt = <A "BDY"> vid = 11
name = "" units = "" writeable = TRUE constant fixup private GemPPDir = <A "PPDIR"> vid = 12 name = "" units = "" writeable = FALSE constant fixup private GemPPTempFileName = <A "ppdir\\temp"> vid = 13 name = "" units = "" writeable = FALSE constant fixup private GemPPTocName = <A "PPTOC"> vid = 14 name = "" units = "" writeable = FALSE constant fixup private GemRecipeType = <U1 S2_B> vid = 15 name = "" units = "" default = <U1 S2_B> writeable = FALSE constant fixup private GemReportFileName = <A "REPORT.LOG"> vid = 16 name = "" units = "" writeable = FALSE constant fixup GemRpType = <BOOLEAN false> vid = 17 name = "RPTYPE" units = "" default = <BOOLEAN false>
writeable = TRUE constant fixup GemWBitS10 = <U1 0> vid = 18 name = "WBITS10" units = "" min = <U1 0> max = <U1 1> default = <U1 0> writeable = TRUE constant fixup GemWBitS5 = <U1 1> vid = 19 name = "WBITS5" units = "" min = <U1 0> max = <U1 1> default = <U1 1> writeable = TRUE constant fixup GemWBitS6 = <U1 1> vid = 20 name = "WBITS6" units = "" min = <U1 0> max = <U1 1> default = <U1 1> writeable = TRUE status fixup GemAbortLevel = <U1 0> vid = 21 name = "ABORTLEVEL" units = "" writeable = FALSE status fixup GemAlarmId = <U4 0> vid = 22 name = "ALARMID" units = "" writeable = FALSE
status fixup GemAlarmState = <U1 0> vid = 25 name = "ALARMSTATE" units = "" writeable = FALSE status fixup GemASer = <U4 0> vid = 26 name = "ALARMSERIAL" units = "" writeable = FALSE status fixup GemClock vid = 27 name = "CLOCK" units = "cs" writeable = TRUE status fixup GemControlState vid = 28 name = "CONTROLSTATE" units = "" writeable = FALSE status fixup GemDataId = <U4 0> vid = 29 name = "DATAID" units = "" writeable = FALSE status fixup GemLinkState vid = 31 name = "LINKSTATE" units = "" writeable = FALSE status fixup GemMDLN = <A "GW APP"> vid = 32 name = "MDLN" units = ""
writeable = FALSE status fixup GemPPExecName = <A "PPExecName"> vid = 33 name = "PPEXECNAME" units = "" writeable = FALSE status fixup GemPreviousCeid = <U4 0> vid = 34 name = "PREVIOUSCEID" units = "" writeable = FALSE status fixup GemPreviousCommand = <A "PreviousCommand"> vid = 35 name = "PREVIOUSCOMMAND" units = "" writeable = FALSE status fixup GemPreviousControlState = <U1 0> vid = 36 name = "PREVIOUSCONTROLSTATE" units = "" writeable = FALSE status fixup GemPreviousProcessState = <U1 0> vid = 37 name = "PREVIOUSPROCESSSTATE" units = "" writeable = FALSE status fixup GemProcessState = <U1 0> vid = 38 name = "PROCESSSTATE" units = "" writeable = FALSE status fixup GemSOFTREV = <A "REV 01"> vid = 39
name = "SOFTREV" units = "" writeable = FALSE status fixup GemTime vid = 40 name = "TIME" units = "s" writeable = TRUE discrete fixup GemPPChangeName = <A "PPChangeName"> vid = 41 name = "PPCHANGENAME" units = "" writeable = FALSE discrete fixup GemPPChangeStatus = <U1 0> vid = 42 name = "PPCHANGESTATUS" units = "" writeable = FALSE constant fixup GemOfflineSubstate = <U1 3> vid = 43 name = "OFFLINESUBSTATE" units = "" min = <U1 1> max = <U1 3> default = <U1 3> writeable = TRUE constant fixup GemOnlineFailed = <U1 3> vid = 44 name = "ONLINEFAILED" units = "" min = <U1 1> max = <U1 3> default = <U1 3> writeable = TRUE
constant fixup GemOnlineSubstate = <U1 5> vid = 45 name = "ONLINESUBSTATE" units = "" min = <U1 4> max = <U1 5> default = <U1 5> writeable = TRUE constant fixup private GemMaxSpoolFileSize = <U4 10000> vid = 46 name = "" units = "" default = <U4 10000> writeable = FALSE constant fixup GemMaxSpoolTransmit = <U4 0> vid = 47 name = "MAXSPOOLTRANSMIT" units = "" default = <U4 0> writeable = TRUE constant fixup private GemSpoolFileName = <A "SPOOL.LOG"> vid = 48 name = "" units = "" writeable = FALSE status fixup GemSpoolCountActual vid = 49 name = "SPOOLCOUNTACTUAL" units = "" writeable = FALSE status fixup GemSpoolCountTotal vid = 50 name = "SPOOLCOUNTTOTAL" units = "" writeable = FALSE
status fixup GemSpoolFullTime vid = 51 name = "SPOOLFULLTIME" units = "cs" writeable = FALSE status fixup GemSpoolLoadSubstate vid = 52 name = "SPOOLLOADSUBSTATE" units = "" writeable = FALSE status fixup GemSpoolStartTime vid = 53 name = "SPOOLSTARTTIME" units = "cs" writeable = FALSE status fixup GemSpoolState vid = 54 name = "SPOOLSTATE" units = "" writeable = FALSE status fixup GemSpoolUnloadSubstate vid = 55 name = "SPOOLUNLOADSUBSTATE" units = "" writeable = FALSE discrete Var_56 = <A " "> vid = 56 name = "GEMEVENTTEXT" units = "" writeable = FALSE constant fixup private GemPPKeepSecsHeader = <BOOLEAN FALSE> vid = 57 name = "GEMPPKEEPSECSHEADER" units = ""
default = <BOOLEAN FALSE> writeable = FALSE discrete fixup GemLimitsVID = <U4 0> vid = 58 name = "GEMLIMITSVID" units = "" writeable = FALSE discrete fixup GemEventLimit = <B 0> vid = 59 name = "GEMEVENTLIMIT" units = "" writeable = FALSE discrete fixup GemTransType = <B 0> vid = 60 name = "GEMTRANSITIONTYPE" units = "" writeable = FALSE constant fixup GemLimitsDelay = <U2 5> vid = 61 name = "GEMLIMITSDELAY" units = "s" default = <U2 5> writeable = TRUE constant fixup private GemLimitsFileName = <A "LIMITS.LOG"> vid = 62 name = "" units = "" writeable = FALSE constant fixup GemOverWriteSpool = <BOOLEAN TRUE> vid = 63 name = "OVERWRITESPOOL" units = "" default = <BOOLEAN TRUE> writeable = TRUE
constant fixup GemConfigSpool = <U1 0> vid = 64 name = "CONFIGSPOOL" units = "" min = <U1 0> max = <U1 1> default = <U1 0> writeable = FALSE constant fixup private GemHostMessageLimit = <U4 270000> vid = 65 name = "" units = "" min = <U4 16000> max = <U4 4000000> default = <U4 270000> writeable = FALSE constant fixup private GemSharedMemorySize = <U4 270000> vid = 66 name = "" units = "" min = <U4 16000> max = <U4 4000000> default = <U4 270000> writeable = FALSE constant fixup private GemDynamicDataLimit = <U4 265000> vid = 67 name = "" units = "" min = <U4 1000> max = <U4 1995000> default = <U4 265000> writeable = FALSE constant fixup GemTermReqSendMax = <I4 2000> vid = 68 name = ""
units = "" min = <I4 0> max = <I4 60000> default = <I4 2000> writeable = FALSE constant fixup private GemTermReqRecvMax = <I4 160> vid = 69 name = "" units = "" default = <I4 160> writeable = FALSE constant fixup private GemPrimaryMessageLimit = <U4 270000> vid = 70 name = "" units = "" min = <U4 1000> max = <U4 4000000> default = <U4 270000> writeable = FALSE
P ROGRAM A RGUMENTS
Arguments -b<#> or /b<#> -c or /c -l or /l -g or /g -s or /s -v<#> or /v<#> Descriptions The number of buffers allocated by the SDR daemon. Each buffer represents 256 byes. (# = 10 to 4000, default is 200) Clean start - causes all non volatile storage to be deleted and reinitialized Writes debug output to FLGEM.LOG Overrides the GWAGEMDIR enviroment variable Overrides the GWASDRDIR enviroment variable Sets the level of debug output. (# = 1 to 3)
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
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 = NN MapViewOfFile() failed, error code = NN Mapping already exists...not created. NN is a Windows system error code. Any of these messages indicate that the corresponding task did not start. EXT_NO_TASK_ID The FLGMEXT task tried to register with FactoryLink and failed. MSG_NO_TASK_ID The FLGMMSG task tried to register with FactoryLink and failed.
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.
Chapter 5
MECOM
O VERVIEW
The Mitsubishi PLC Driver, MECOM, is a software package that runs under FactoryLink Software System. The PLC Driver does the task of reading data from Mitsubishi MELSEC PLC systems into the FactoryLink Real-time database and writing data from the database to the PLC. The PLCs supported by MECOM are the A-series, QnA-series, and the FX-series. Both Serial and Ethernet communication can be used. TCP/IP or UDP/IP can transfer the Ethernet protocols. The following connections can be used: 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.
5 | MECOM Overview
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
R EQUIRED H ARDWARE
Hardware
AND
S OFTWARE
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.
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.
Flags
R R R R R R R R R
Task Name
MECOM1 MECOM2 MECOM3 MECOM4 MECOM5 MECOM6 MECOM7 MECOM8 MECOM9
Task Description
Mitsubishi PLC interface COM1 Mitsubishi PLC interface COM2 Mitsubishi PLC interface COM3 Mitsubishi PLC interface COM4 Mitsubishi PLC interface COM5 Mitsubishi PLC interface COM6 Mitsubishi PLC interface COM7 Mitsubishi PLC interface COM8 Mitsubishi PLC interface - COM9
Start Order
4 4 4 4 4 4 4 4 4
Executable File
bin\mecom1.exe bin\mecom2.exe bin\mecom3.exe bin\mecom4.exe bin\mecom5.exe bin\mecom6.exe bin\mecom7.exe bin\mecom8.exe bin\mecom9.exe
If several MECOM tasks are to be used, repeat this procedure until all tasks are configured. Upgrading If you are upgrading the MECOM driver do as follows:
1. Make a multiplatform backup copy of your FactoryLink application. 2. Install MECOM according to installation instructions (See Installation on page 294..) 3. Restore your FactoryLink application.
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
Mitsubishi Read
Information about what data to read from PLCs, and when to do it.
Read and Write Tables - Puts the pieces together. They define when, where, and what to be read or written from / to the PLC. - When (trigger and condition) Where (Task, Remote, PLC) What (Tags and I/Os)
Mitsubishi Write
Information about what data to write to PLC, and when to do it. 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.
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.
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.)
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.
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.
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 CPUs 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.
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 clients (the PC) IP and port addresses are fixed by the PLC code. The Local IP-Port number is entered as a hexadecimal value. (Ethernet protocols only.)
TCP/UDP (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. DATAMinimize transferred data. MESSMinimize 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.
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 CONT RISE FALL ON OFF In this case the data is read whenever the trigger has its change bit set. This stands for CONTINUOUS. The data is read as fast as possible at all times. In this case the data is read whenever the trigger-tag changes from OFF to ON. In this case the data is read whenever the trigger-tag changes from ON to OFF. In this case the data in the table is read as fast as possible whenever the trigger-tag is ON. In this case the data in the table is read as fast as possible whenever the 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.
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.
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
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
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.
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
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 its change bit set. (This is the default value)
This stands for CONTINUOUS. The data is written as fast as possible at all times. In this case the data is written whenever the trigger-tag changes from OFF to ON. In this case the data is written whenever the trigger-tag changes from ON to OFF. In this case the data in the table is written as fast as possible whenever the trigger-tag is ON. In this case the data in the table is written as fast as possible whenever the trigger-tag is OFF.
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.
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.
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
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 YES The value will normally (se below) only be written to the PLC when the table is triggered. (Same as leaving this field blank.) The value will be written to the PLC when the table is triggered, and each time the tag's value changes.
NEVER
The value will ONLY be written to the PLC when the table is triggered. This will also exclude this tag from the "Match processing".
Note: NO (or blank) may be overridden (to YES) by the driver 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 DOUBLE FLOAT UNSIGNED BCD The normal data type, that this "I/O" type denotes, is used. (Same as leaving this field blank.) Two 16-bit registers are used as one 32-bit integer register. Two 16-bit registers are used as one 32-bit precision float register. One 16-bit register is used as an unsigned register. One 16-bit register is used as a BCD register.
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
PCPORT
Task Number
1
Baud Rate
9600
Parity
ODD
Data Bits
8
Stop Bits
1
(Columns not shown here are left blank.) No data has to be entered in the Remote Definition table. In the PLC Definition table the PLC Name must be defined. If A-CPU or FX-CPU communication is to be used the parameter Protocol must be changed to CPU. For the remaining parameters the default values can be used.
PLC Name
TESTPLC
Protocol
C24
MNET Node
HOST
C24 Node
0
MAC Node
0
Table Name
RTABLE
Trigger Tag
sec1
Trigger Type
CHANGE
Task Name
PCPORT
Remote Name
PLC Name
TESTPLC
It is assumed that sec1 is a digital tag that will be activated with 1 seconds interval by the TIMER. Click when this record is in focus in the table. Enter data as follows in the Read Table table:
Tag Name
Datavalue
I/O
D25
It is assumed that datavalue is an analog tag. When MECOM is running the tag datavalue will be updated one time per second with the value from D25 in the PLC.
F UNCTION D ESCRIPTION
Startup At the start of the FactoryLink application, data for MECOM is validated. First, there are tests made to verify that all used Task Names, Remote Names and PLC Names are defined in the appropriate tables. Then all PLCs specified in the Read Header tables and Write Header tables will be accessed to test that data is correct for the used PLC. To be able to validate tables with Remote Name defined these remote stations are called. If an error is detected, MECOM terminates after the data validation phase. The first error found will be shown in the FactoryLink system picture. All errors are printed on screen and they might be seen in the FLControlPanel, if the parameter Flags is FSR for MECOM in the System Configuration table. During this phase the read at startup function also is performed. When a table has been read the completion status tag is set to -1 and the completion trigger is activated. By using this information the operator knows if the information in the tags are valid. If modem is used the start-up procedure may take a long time. Therefore there is a Ready tag available, which will be activated when the start-up procedure is completed. During start-up phase and normal operation there is information available in the Operation Message tag telling what MECOM is currently doing. For each remote stations there is available a modem status tag telling the actual status for the connection to the remote station. Stand-alone Validation It is possible to run MECOM without any FactoryLink application active to validate data for the driver. This might be useful if it takes a long time to start the FactoryLink application. Before the validation can be done the CT-files must be updated from where data is read by MECOM. First execute:
ctgen
To tell MECOM it is running stand-alone, add the program argument -V. It is also possible to log the printed information into a log file using the program argument -Lfilename. E.g. validating the information for COM2, showing warning messages (-W), tracing PLC accesses (-T8), and logging data to C:\FLAPPS\LOG\MECOM2.LOG do as follows.
mecom2 -v -w t8 -lc:\flapps\log\mecom2.log
If another application directory other than %FLAPP% is used, add the program argument -adrive: \directory. Note, in this case, CTGEN must also be used with this program argument. Transfer of Data
General
Data is read or written for a table when its trigger tag is activated according to the trigger type. When the operation is completed the completion status tag is set and completion trigger tag is activated. For write tags the flag write if changed can be set. This means that the tag will be separately written immediately if tag is changed without the table being triggered. If there is no trigger tag defined for a write table, all tags in that table will get the write if changed option set. If the operation fails several actions may take place. First the error message is written in the run manager picture and in the window for MECOM, if used with FSR-flags. Then, if it is a new error status (not the same error status as last time), the error message tag is initialized and the error trigger tag is activated. The Task Name is available first in the error message. Finally, if a log file is used, a row 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.
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:
Tag Name
DataValues[0][0]
I/O
D0
...
...
Number of Tags
100
...
...
This means:
Data from Register
D0 D1 ... D9
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 registers least significant half. The second character in the most significant half. The third in least significant half of the second register, and so on. The number of registers that MECOM accesses is defined in the read/write table(s). The value in the column Message length defines the number of registers (not the number of characters). The text length can then be up to twice that amount. If a message written to the PLC is shorter than this, all the
remaining register halves will be set to zero. On the other hand, when a message is read from the PLC, the first register-half equalling zero will mark the end of the message. The remaining halves will be ignored (not stored in the tag). If a message length is equal to the defined length (or longer), the read/write operation will stop at the defined length. No zero-termination will be needed. Make sure the tag itself is long enough to hold the value. Assuming the following definitions in the read/write table:
Tag Name
MyText
I/O
D0
...
...
Message Length
3
...
...
This will allow the tag MyText to exchange up to six characters (three registers) with the PLC, starting with register D0. If MyText contains the text abcde, the following will be written to the PLC:
Register
D0 D1 D2
Characters
aand b cand d eand zero
Values(hex)
61 and 62 63 and 64 65 and 00
Stored Value
6261(hex) = 25185(dec) 6463(hex) = 25699(dec) 0065(hex) = 101(dec)
If register D0 through D2 contains 6261, 6463 and 6500, the following will be read from the PLC:
Register
D0 D1 D2
Values (hex)
61 and 62 63 and 64 00 and 65
Characters
aand b cand d zero (=end) and an ignored e
The tag MyText would contain the text abcd after the read operation.
Indirect Addressing
Another feature is indirect addressing. An index tag can be defined for each tag in the read tables and write tables. If used, the value of that tag is added to the original address for the device specified in the I/O field. E.g., if the parameter I/O is M123 in a read table and an index tag is specified for the device. If the index tag has the value 419 when the table is triggered, M542 will be read.
Gain and Offset
Further, the usage of Gain and Offset is supported by entering real values, like 1.25 or 2.5E-3 (=2.5*10-3) in the appropriate fields. When reading data the value from the PLC is multiplied with Gain and Offset is added. When data is written to the PLC, first Offset is subtracted from the value from the Real Time Database and the remaining value is divided by Gain. In this manner, the same value can be used for Gain and Offset in both read and write tables.
Data Both Read and Written
Tags may be both read from a PLC and written to the very same PLC and PLC I/O. This is typically used for PID-loop set values where the value may be changed from another operator than the FactoryLink operator. This will normally create timing problems. MECOM handles this problem. If the change flag is set for such a tag (=FactoryLink operator has changed value) the writing of the value from the PLC to the real time database will be suppressed. In the next moment the new value in the real time database will be written to the PLC due to the write if changed flag. To avoid that new values, read from the PLC, will be written back to the PLC automatically, the change flag is cleared for those tags after their values are stored in the real time database. Before normal operation it is necessary to determine what data in read and write tables fulfils these conditions. This is called match test. During the start-up phase, for every PLC, all tags in all read tables for a PLC are compared to all tags in all write tables for that PLC. If a match is found an internal flag suppress read if changed is set for the tag in the read table and in the write table the option write if changed is added for the tag if it is not already set. This means that, if Write if changed is set to NO or left blank, MECOM may force it to YES, while generating a warning message (if warnings are enabled). Normally
this is the desired action, so the designer should change to YES in the Write Table to avoid the warnings. However, sometimes the application, or parts of it, should not behave like this. For example, if there is a graph displaying several values read (by manual control) from the PLC. Then, values should be updated on the graph first, then on a specific command, be sent back to the PLC. By default, the driver would send each changed value to the PLC as soon as they are made. To solve this kind of example, the matching feature must be disabled. The recommended way is to set the Write if changed field to NEVER in the Write Table for the involved tags. These tags will then only be written to the PLC when the specified trigger activates the Write Table.
Note: NEVER is added as a stronger word than NO, just to be compatible with old applications designed with blank (or NO) in their Write if changed fields. MECOM will let old applications behave as they did before. NO has the same meaning as in all previous versions, and NEVER is a new way to inhibit the matching feature for specific tags.
All this test and functionality can be disabled by using the program argument -M in purpose e.g. to save time at start-up of MECOM.
PLC Data Type Conversion
Registers are normally read and written in PLC with the default device size, independent of the type of the FactoryLink tag being connected to the I/O. The device size depends on the I/O-type and in some cases also of the address being used. For X, Y, M etc. the device size is 1 bit. For D, W etc. 16 bits. E.g. the C (current value) C200 - C255 of the FX-series have a device size of 32 bits. It is not permitted to use any data type conversion for the following items: PLC Timers PLC Counters FactoryLink MESSAGE tags Otherwise it is permitted to mix any PLC device type with any FactoryLink tag type. PLC data type conversion is used when data is not stored as normal for the PLC device. If PLC data type conversion is requested the following options are available. Two 16-bit registers are used as one DOUBLE 32-bit integer register. The corresponding FactoryLink tag type is LONGANA.
Two 16-bit registers are used as one 32 bit precision FLOAT register (according to
IEEE-standard). The corresponding FactoryLink tag type is also FLOAT. 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.
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 cant contain more than 1000 lines. Use tag arrays, or more tables, to avoid this limit. One MECOM task cant have more than 500 read or write headers (tables). Use tag arrays, PLC Name by Tag, Wild card tables, or more MECOM tasks, if possible, to avoid this limit. Never assume that tags are read / written in any specific order within any table. The order of processing may change from time to time, depending on the optimization procedures. For synchronization purposes, use the completion trigger to determine that all data is transferred.
Modem Usage
Modem Connect and Disconnect
A remote station is called when one of the following occurs: A read table for the remote station is triggered. A write table for the remote station is triggered. A tag, in a write table for the remote station, with the write if changed option is changed. The last option, using write if changed, should be used with outermost care together with remote stations. It is not advisable to use the trigger type CONT (=every time) for a table 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
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 1 2 3 4 5
Outgoing Calls
For each remote station, it is possible to define a Modem status tag. This tag shows the current status for the connection to the remote station. Normally this tag is OFFLINE. When a table for this remote station is triggered the number will be dialled and the status of the tag will be DIALING. When the modem at the remote station answers, the status of tag is changed to ONLINE. If the connection is to be terminated from the FactoryLink side, the status of the tag will be HANGING UP. When completed, the status of the tag returns to OFFLINE. If the connection is terminated from the remote side, the status of the tag will be NO CARRIER. Then the local modem will be hung up and when completed, the status of the tag will be LOST CARRIER. If the status of the tag is LOST CARRIER and the Hangup trigger tag is activated, the status changes to OFFLINE.
Incoming Calls
This function is enabled only if the External callup status tag is defined in the Communication Task Definition table. The external stations using this feature does not necessarily have to be defined as remote stations.
If several remote stations are using this feature, they must be accessible in the very same way. Thus, it must be possible to use the same PLC Name defined in the PLC Definition table. To be able to access a station calling up there must be at least one read table or write table that is a wild-card table. It is not automatically known what is calling, there is just a connection. If any table with a remote station defined is triggered the current connection will be disconnected and the new number will be dialed. When calling up FactoryLink, the external stations must be passive. MECOM sets the value for External callup status tag to ONLINE and the FactoryLink application has to decide what to do from now on. For example, the tag can be defined as a FactoryLink Math&Logic-trigger and if the value is ONLINE, a wild-card read table can be triggered for reading information from the calling station. Another alternative is that a wild card write table is triggered, and some information is downloaded to the calling station. However, it is recommended that in some way identification is made of what remote station calling before any data is transferred. The identification can be done by keeping an identity value in a PLC register that is used by all PLCs in all remote stations using the external call-up feature. Sharing the Communication In Windows, the MECOM driver may share the communication with other programs, e.g. MelDDE, using the Mitsubishi protocol driver MELCOM32.DLL.
Serial Communication without Modem
If the communication port is free, MECOM gets access to the communication port. If the port is occupied by another program using MELCOM32.DLL, MECOM also gets access to the port but only if the communication parameters (baud rate, parity, data bits and stop bits) are the very same.
Serial Communication with Modem
Before using a modem, the same conditions are necessary from serial communication without a modem. Several cases may occur when modem is used. Below is a description of what happens in different cases
1. Modem is free (on hook) The new number is dialled and communication will be established with PLC. 2. Modem is busy (off hook)
2.1 Modem is used by MECOM The modem is hung up. Then the new number is dialled and communication with PLC will be established. 2.2 Modem is used by another program via MELCOM32.DLL 2.2.1 Same phone number is used PLC-communication will be established without redialing. 2.2.2 Another phone number is used The completion status tag will be set with an error code and the completion trigger tag will be activated. Ethernet Communication
If the network adapter is free MECOM gets access to the Ethernet communication. If the network adapter is occupied by another program using MELCOM32.DLL, MECOM also gets access to the Ethernet communication. Optimization Methods There are two optimization methods available in MECOM. You can either minimize the number of characters transmitted (DATA) or minimize the number of messages (MESS). When DATA optimization is used care is taken for the protocol overhead size to determine if data should be read in one or several messages. When MESS is used, as much data as the protocol permits is read each time if needed. Deciding which optimization method to use depends on what data is being read and the PLC reply time. If the PLC reply time is short it is better to use DATA optimization, as less unnecessary data is transferred. When the PLC reply time is long it is better to use MESS optimization, because when data is received it contains as much data as possible. A long PLC reply time is typical when the PLC program is very big or there is a MAC/MTA-terminal connected between the PLC and FactoryLink. To determine which optimization method that gives the best result, a program argument -C can be added for showing driver cycle time when anything triggered. The value is shown in the system picture when there is no error and updated every 5 seconds. When testing the cycle time, make sure that only one table is triggered
frequently, otherwise it is not known what table or tables being triggered for the shown cycle time. To get good performance it is recommended to use contiguous PLC devices. Each read table is read separately, and there is no optimization done between tables. To get information about communication statistics an S can be added to the program argument above, making it -CS. When this function is enabled, data for the latest executed table is shown. The following information is shown: Total time for executing the table Total waiting time Number of sent messages Number of received messages Number of sent bytes Number of received bytes To get really good details on the timing, the above can be combined with tracing (see below). The trace can be sent to a log file (-L switch) for later inspection. Using this method, each tables 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 1 No Trace. Information about what read tables being triggered.
2 4 8 16 32767
Information about what write tables being triggered. Information about what PLCs being accessed. Information about modem connects and disconnects. Show communication statistics about time, messages, and transferred bytes. Must be combined with trace level 1 and/or 2. 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. 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.
-I Ignore Unreachable PLCs. At start-up, MECOM normally validates all configured PLCs. If a PLC cant 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 validation 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).
C OMMUNICATION
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 Users Manual. Below are examples for some configurations. Please make sure the same settings are used in the Communication Task Definition table, which is accessed by selecting Mitsubishi Definition in the Configuration Explorer. Common for the settings are: RS232 port, Sum Check ON, Mode setting switch set for Format 1 protocol, and finally Write during RUN ON.
AJ71 C24-S8
Station number 00.Mode 1 or A 9600,O,8,1: Switch 12, 13, 15, 16, 21, and 22 ON, remaining OFF.
9600,N,8,1: 19200,N,8,1:
Switch 12, 13, 15, 21, and 22 ON, remaining OFF. Switch 12, 14, 15, 21, and 22 ON, remaining OFF.
If a multidrop configuration is used, the switches 23 and 24 should also be set to ON for the end stations, see page 4-8 in the AJ71 C24-S8 manual.
AJ71 UC24
Station number 00. Mode 1 or A 9600,O,8,1: 9600,N,8,1: 19200,N,8,1: Switch 12, 13, 15, 16, 21, 22, and 23 ON, remaining OFF. Switch 12, 13, 15, 21, 22, and 23 ON, remaining OFF. Switch 12, 14, 15, 21, 22, and 23 ON, remaining OFF.
Station number 00. Mode 1 or A 9600,O,8,1: 9600,N,8,1: 19200,N,8,1: Switch 4, 5, 7, 8, 9, and 12 ON, remaining OFF. Switch 4, 5, 7, 8, and 12 ON, remaining OFF. Switch 4, 6, 7, 8, and 12 ON, remaining OFF.
Station number 00. Mode 5 9600,O,8,1: 9600,N,8,1: 19200,N,8,1: 115200,N,8,1: Switch 2, 3, 6, 7, 9, and 11 ON, remaining OFF. Switch 2, 6, 7, 9, and 11 ON, remaining OFF. Switch 2, 6, 7, 10, and 11 ON, remaining OFF. Switch 2, 6, 7, 9, 10, and 12 ON, remaining OFF. (*)
(* ) 115200 is ONLY supported by AJ71 QC24N, and only when using ONE port.
If a MAC/MTA-terminal is used in transparent mode, the cable to use between the MAC/MTA-terminal RS422 connector and the C24 module is described in the
MAC/MTA-manual. However, if you need a physical link between the host computer and the PLC(s), use the cable description seen below.
Note: The cable described in the AJ71C24 Users Manual will not work!
C24 25 Pins PC 9 Pins C24-R2 9 Pins PC 9 Pins
2 3 7 4 5 6 8 20
2 3 5 7 8 1 4 6
3 2 5 7 8 1 4 6
3 2 7 4 5 6 8 20
CPU-Protocol
Use the serial converter SC05N from Beijer Electronics when communication is done directly between the host computer and the CPU. When CPU-protocol is used the communication port settings must be:
Parameter
Baud rate Parity Data bits Stop bits
A-CPU
9600 Odd 8 1
FX-CPU
9600 Even 7 1
The default setting is the same as for the A-CPU protocol. If the setting is different, please enter the same changes in the Communication Task Definition table, which is accessed by selecting Mitsubishi Definition in the Configuration Explorer. If the communication is done through a MAC/MTA/E-terminal in transparent mode, use the MAC-CAB from Beijer Electronics between the terminal and the CPU. In this case, the communication parameters may be any values supported by both MECOM and the MAC/MTA/E-terminal.
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
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
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.
MAC/RS232 9 Pins Female 2 3 5 Modem 25 Pins Male 2 3 7 4 5 6 20
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:
Modem 25 Pins Male 2 3 5 7 4 SC05N 9 Pins Male 2 3 7 5 8
Ethernet Communication The switches on the E71 modules should be set as follows. This means Binary
communication (preferred), and Write during run allowed.
The MODE rotary-switches should be set to 0 (OnLine) and the Ethernet/Cheapernet switch (if any) should be set according to actual cabling.
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.
5 | MECOM Troubleshooting
TROUBLESHOOTING
PLC Errors
Errors
Receives NAK from PLCs when communicating through MELSEC NET Cant read devices M9000 M9007 and M9248 - M9255
Error Messages from MECOM A lot of detailed error messages are available from MECOM. Most of the error messages are self-explanatory but for some of the error messages it might be useful to give some hints for how to solve the problems.
Errors
Errors when reading CT-files
MECOM | 5 Troubleshooting
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.
Errors
Error DLL (Protocol, No PLC response)
Error DLL (Protocol, Invalid PLC response) Error DLL (PC Port, Open - in use)
Error DLL (PC Port, Open no response) Error DLL (PC Port, Open refused)
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.).
5 | MECOM Troubleshooting
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
The modem does not respond to commands
The modem responds to commands with a "0" instead of "OK" Modem doesn't answer incoming calls, or answers first but then immediately puts hook back on and disconnects
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) 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
MECOM | 5 Troubleshooting
Errors
Modem answers incoming calls, but data gets garbled to target system
Program doesn't detect off-hook state (incoming call) Calling program doesn't detect successful connect (the answering modem indicates success) Calling program timeouts before modem (modem does not reply "NO CARRIER" in time and is therefore still pending). This can be a problem when several calls in sequence must be made
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 its 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.
5 | MECOM Troubleshooting
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.
MECOM | 5 Troubleshooting
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 isnt 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) PLCs 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 PLCs 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.
5 | MECOM Uninstallation
U NINSTALLATION
Files The following list identifies the installed directories and files. Files marked with (-) are only used by this product and may safely be deleted without side effects for any other product. Files marked with (?) may be used by other products from Beijer Electronics, but may safely be deleted without side effects for products from other vendors. %FLINK%\AC MECOMDEF.AC MECOMRD.AC MECOMRD.ACR MECOMRD.H MECOMWR.AC MECOMWR.ACR MECOMWR.H %FLINK%\BIN MECOM32.DLL MECOM*.EXE %FLINK%\CTGEN MECOM.RTM MEPLC.CTG MEPORT.CTG MEREMOTE.CTG MECOMRD.CTG MECOMWR.CTG %FLINK%\HELP\EN (Language-specific) MERDWR.HLP MESERDEF.HLP MEREAD.AHS
MECOM | 5 Uninstallation
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.
5 | MECOM Uninstallation
Contents of Some Special Files Further, some lines have been added to three files. Lines marked with (-) are only used by this product and may safely be deleted without side effects for any other product.
Note: These characters (-) does not exist in the files. %FLINK%\AC\TITLES mecomdef.ac mecomrd.ac mecomwr.ac
%FLINK%\AC\AC2CT.MAP When the lines in the file %FLINK%\AC\TITLES are removed, the file %FLINK%\AC\AC2CT.MAP can be updated by using the acctmgr -c -d command. %FLINK %\ CTGEN\ CTLIST meplc: meplc meremote: meremote meport: meport mecomrd: merdhdr meread mecomwr: mewrhdr mewrite Registry Modifications If the string value named "Task Group Device Interfaces" was found for the key "HKEY_LOCAL_MACHINE\ SOFTWARE\ 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.
Chapter 6
OPC E XPLORER
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.
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
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.
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.
OPC E XPLORER
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.
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.
Toolbar
The toolbar provides quick access to commonly used functions of the OPC Browser. The following items are located on the toolbar:
Connect OPC Server Disconnect OPC Server
Connects to the selected OPC server. Disconnects from the selected OPC server. Adds a new Tag Group. Creates a new FactoryLink Tag under the selected group. Opens the Configuration Explorer Help.
Add Group
Menu Reference
The OPC Browser menu commands fall under the following menu areas:
Browser
OPC Connect
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.
Disconnects from the selected OPC server. If no other OPC clients are connected to the server, the server shuts down. Exits the application. 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.
Add Group
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.
Deletes the selected Tag Group. A confirmation dialog box displays. Click OK to delete the group or click Cancel to abort the deletion. 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. Disconnects from the selected Tag Group. Displays the Group Properties dialog box, where you can modify properties of the selected Tag Group. Displays the Tag Properties dialog box, where you can modify properties of the selected tag. Adds a new tag to the selected FactoryLink Tag Group. Deletes the selected tag from the FactoryLink Tag Group. Cuts the selected tag from the FactoryLink Tag group. Copies the selected tag so that you can paste it into another group. Pastes a previously copied or cut tag into the selected FactoryLink Tag Group. Shows/hides the toolbar. Shows/hides the filter list in the toolbar. Shows/hides the status bar. Displays the OPC Explorer help file. Displays application version information.
Tag Properties Add Tag Delete Tag Cut Tag Copy Tag Paste Tag
View
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
The OPC Explorer locates all OPC server applications currently registered on the selected node.
5 Right-click the appropriate OPC server name and select Connect, or you can click the
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.
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
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.
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
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.
9 Select the Data Type from the choices. This is the data type the server converts the
1 To modify an existing tags 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
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.
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
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.
C ONFIGURING
THE
OPC C LIENT
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 Server Name Node (Workstation) OPC Server Status Tag
Name of the OPC server to connect to. The name you enter must match the network node name exactly. Name of the workstation where the OPC server is executing. Then name you enter must match the network node name exactly. Tag to hold the server status, which can be one of the following values:
1 2 3 4 5 OPC_STATUS_RUNNING OPC_STATUS_FAILED OPC_STATUS_NOCONFIG OPC_STATUS_SUSPENDED OPC_STATUS_TEST
A digital tag that controls polling for server status. When set or forced to ON, the client will request status information from the server.
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 clients requested update rate. The server can, however, update the client at a slower rate than the client requested. 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. 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. ON OFF Synchronous Asynchronous
Deadband Percent
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.
ON OFF Device Cache
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. 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.
A digital key constant that defines whether or not exception writes are allowed at run time.
ON OFF Exception writes allowed Exception writes not allowed
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.
ON OFF Exception writes disabled Exception writes enabled
A digital tag that is forced to 1 (ON) when a block read operation for this group is complete. A digital tag that is forced to 1 (ON) when a block write operation for this group is complete.
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
A tag in which to store the data from the server. A tag that holds the name of the OPC item that is subscribed to. The OPC type that the OPC server must convert the data to on behalf of the client. The following are valid types:
BOOL SHORT LONG DOUBLE STRING
NATIVE
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. 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. A FactoryLink tag that stores the quality code associated with the data value.
Time Stamp
Quality
6 | OLE FOR PROCESS CONTROL (OPC) Using VT_ARRAY Data with OPC Client
WITH
OPC C LIENT
Differences in OPC VT_Arrays and FactoryLink Tag Arrays While both are arrays, array-typed OPC items and FactoryLink tag arrays are very different in their implementation and usage.
Boundaries of an Array-typed OPC Item
The value of an OPC Item is contained within a Microsoft data construct known as a variant. The variant can contain a value of a variety of data types. Furthermore, the variant can contain an array of values of these data types. The OPC specification explicitly supports variants and arrays of the following data types: Boolean (VT_BOOL), unsigned character (VT_U1), signed short (VT_I2), signed long (VT_I4), float (VT_R4), double (VT_R8). When an OPC item's value is an array, the array is held by another Microsoft data construct known as a SAFEARRAY. The SAFEARRAY has the following properties: 65535 maximum dimensions (x[0][0] is an array of 2 dimensions) Indices per dimension can range from -2147483647 to 2147483647. As such, the maximum number of 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.
OLE FOR PROCESS CONTROL (OPC) | 6 Using 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
Tag Array A[0] A[4] [0] [1] [2] [3] [4] Tag Definition # of Dimensions = 1 Dim.1: Length = 5 OPC Item A [0] [1] [2] [3] [4] OPC Items Value # of Dimensions = 1 Dim.1: Length = 5, Lower Bound = 0
6 | OLE FOR PROCESS CONTROL (OPC) Using VT_ARRAY Data with OPC Client
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.
OLE FOR PROCESS CONTROL (OPC) | 6 Using 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:
6 | OLE FOR PROCESS CONTROL (OPC) Using VT_ARRAY Data with OPC Client
Row
Analysis
1 2
Given singular tag lana_tag1 and singular OPC item i4_item1, single values are transferred across the association. 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. 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.
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.
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..
OPC
AND
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.
P ROGRAM A RGUMENTS
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 -l -x<#>
OPC Server
-f -m<#>
-d -l -x<#>
Print debug information of all levels in Shared domain. Log debug information of all levels to the OPC_Client log file. Log specific level of debug information to the log file. (# = 1 to 9) All tag writes are forced writes. Sets the maximum length for message tag reads and writes. (default = 80) Display the debug information on all levels in the Shared domain. Log the debug information on all levels in the Shared domain. Log debug information of a specific level in the log file.
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: Action:
Network access is unavailable or configured incorrectly. Verify that the network is available. Verify that the network domain and privileges are configured correctly.
Node not configured correctly or unavailable. 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.
OPC server application not registered. 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.
OPC server application not registered properly. This can occur if the application is moved after being registered or installed. 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.
Browsing of OPC items not supported by server. Not all servers support item browsing. To configure the Client Task, you will need to enter the exact names of the OPC items manually. Server not configured properly. Ensure the OPC server application is properly configured.
Cause: Action:
OPC Explorer not installed properly. Reinstall the OPC client components. Bad or missing .AC file in the FactoryLink application. Reinstall the OPC client components. FactoryLink flapp environment variable set improperly. Ensure flapp environment variable is set to the correct directory. FactoryLink application is corrupted or is the wrong version. 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.
Illegal tag name, typically using invalid characters. Ensure the tag name conforms to FactoryLink requirements. See the Fundamentals Guide for more information on valid tag names. Tag limit exceeded in the FL Lite version. Upgrade to a version of FactoryLink that will support the required number of tags. Contact your sales representative for availability.
Cause: Action:
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: Action: Cause: Action:
OPC server not running. Ensure that the OPC server is running correctly. OPC server configured incorrectly. Ensure that the server is configured properly. Refer to the documentation for the server. OPC items not validated. 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.
Update Disable tag set to ON.
Cause: Action:
Cause: Action:
Ensure that your application is not setting the tag controlling Update
Disable for the FactoryLink tag group to ON.
Cause: Action:
Update rate different than expected. 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: Action:
Ensure that your application is not setting the tag controlling Read Disable for the FactoryLink tag group to ON.
Write Disable tag set to ON.
Cause: Action:
Ensure that your application is not setting the tag controlling Write Disable for the FactoryLink tag group to ON.
OPC server error. Check the OPC server and ensure it is operating properly. If the server seems to be operating properly, see Error Logging on page 376.
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.
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: Action:
The FactoryLink client task terminated abnormally due to a fatal error. Check other error messages for details.
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.
The specified CT file could not be opened. Usually this is because it is missing.
Action:
From the command line, enter the command ctgen opcclnt to regenerate the CT file.
The specified CT files structure does not correspond to the CT definition file. Verify that the correct opcclnt.ctg file is in the {flink}\ctgen\ directory or reinstall the OPC components.
The client task did not process the specified tag properly, usually because it expects a digital tag and the tag specified is another type. 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: Action:
The specified OPC item may not be defined or configured correctly in the server. Verify that the item exists in the server and reconfigure the client task.
In processing a FactoryLink tag, it was detected that the tags data type was unsupported. The tag database may not have been properly generated or is incomplete. Verify the tag is legal and properly defined in your FactoryLink application.
Action:
The OPC client task is not authorized to run due to an invalid configuration sequence. Contact your sales representative to authorize the OPC client task.
Out of memory.
Cause: Action:
There is insufficient memory available to run the program. Check memory size and close any unnecessary programs to free up memory resources. You may need to add physical memory to your system.
A general initialization failure. See other error messages to determine specific problems.
An error was encountered while processing a FactoryLink tag. Ensure the CT file is current. It may be necessary to regenerate the CT file by running ctgen opcclnt from the command line.
An OPC write event failed for a specific FactoryLink tag. Contact customer support.
An error was encountered while processing a FactoryLink tag. Make sure the CT file is current & has been generated. 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: Action:
A write attempt of a value into a FactoryLink tag failed. Contact customer support.
An attempt to insert an FL tag into a watch list failed. Contact customer support.
fl_read failed.
Cause: Action:
Server task has stopped due to a fatal error encountered by the server. Check for other error messages to identify the specific problem (for example, out of memory).
You do not have the proper configuration sequence to run the server task. Contact your sales representative to authorize the OPC client task.
FactoryLink accesses to system tags have failed. 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.
The object CT file could not be opened. Regenerate it by invoking ctgen -r.
While processing the specified FactoryLink tag, an illegal tag type was detected. 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.
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. Verify that the tag is legal and properly defined in your FactoryLink application.
Action:
A general initialization failure. See other error messages to determine specific problems.
Out of memory.
Cause: Action:
There is insufficient memory available to run the program. Check memory size and close any unnecessary programs to free up memory resources. It may be necessary to add physical memory to your system.
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 obtain tag information. Verify the validity of the tag segment & offset.
Failed to obtain tag block information. Verify the validity of the tag block.
fl_read failed
Cause: Action:
An OPC client has attempted a write on the FactoryLink OPC server which was refused. Check the installation bits for the server to determine if FULL-CONTROL is available.
A tag is not insertable into the watch list. Check for other specific messages to pin point the problem.
Data type mismatched. Conversion failed - Tag Seg <segment>, offset <offset>.
Cause: Action:
An attempt to convert from a variant to a FactoryLink tag has failed. Verify that the tag segment and offset are valid.
Chapter 7
O VERVIEW
The OPC Data eXchange (ODX) driver supports communication between the FactoryLink database and one or multiple OPC Servers. The idea is to mirror PLC data by intelligible OPC items reflecting, for example, the PLC address in its names in order to be decoded and conditioned, for any RAPD driver. There are hundreds of OPC Servers available for any PLC make or bus system as CAN, LON, BacNet, Fieldbus, Interbus, Modbus, Profibus and so forth. And, together with VRN you can set up a Redundant System. Data is conducted to and from Enhanced Communication Interface (ECI) by using the Intertask Mail eXchange (IMX) interface.
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)
Write Interval
Read Cycle
Read Mailbox
Write Mailbox
COM/DCOM Network
OPC Server(s)
External Device(s), PLC(s)
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
C ONFIGURATION
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 check timeout [s] to supervise this connect (watchdog) if no data is transmitted, default=10 [s]. Max number of simultaneous read requests (asynchronous) processed for this link, default=5. 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.
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. 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). 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. Time delay to reconnect a link after failure, default=10 [s]. Time to initialize data transfer. This may unburden the system at (re)connection, default=10 [s]. Read refresh data from Server Cache. By default, data is always read from device. Limit the slowest update rate default=86400 [s]; some OPC servers do not allow for the max of 4294967 [s]. 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). 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.
Mux=0
DisConn= -1
File=filename
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.
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.
Type of configuration: 1) Emulation of RAPD and EDI Drivers: use ECI Decimal Converter 2) OPC Specific Configuration: use ECI/OPC Item Converter
An ECI object is defined by addressing read/write datasets of Tags as a number of logically organized OPC items (called OPC groups). It is assumed that the OPC Server configuration is studied and planned prior to FactoryLink configuration. This especially applies for OPC item names (127 char max) referenced. Note that items are not the data source they are just connections to them. They should be thought of as symbolic addresses to the data. Tags or OPC items essentially represent data values as boolean/flag, integer/word, real/float, message/string or an array, thereof which can be decoded as desired. Associated with each value is a quality and a timestamp that are, however, only accessible in ECI/OPC specific tables. ODX supports the these methods of OPC item configuration: Emulation of RAPD and EDI drivers OPC-specific configuration
Emulation of RAPD and EDI Drivers 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:
Rd CDE
.UTC .TIM/.TIX .TIH/.TID
ECI Conversion Codes for Standard OPC Attributes (for detailed info see ECI Guide) Timestamp Native, Universal Time Coordinated, FileTime format not for display unconverted to Double FactoryLink SecTime [s] as from 1980-01-01 and/or Milliseconds [ms] decoded to LongAna or Analog for [ms] HourTime "hh:mm:ss.xxx" or DateTime ISO 8601 "YYYY-MM-DD hh:mm:ss.xxx" [ms] decoded to Message 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 Access Rights Native 0..65535 0=None, 1=Read, 2=Write, 3=Rd/Wr and Access Rights Vendor Specific
.QA/.QX .QS/.QL
.AR/.AX
Note: This method supports a variety of OPC functions as Vendor Specific information, Timestamp/Quality for ItemArrays or merging OPC Quality and ECI I/O Status information and so forth.
ECI Object 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:
OPC Read/Write Access Any number allowed per table Read Rd/Wr Write Emulation of RAPD and EDI only ReadE RdE/Wr Statistics Read Functions One of each type allowed per table One of each type allowed for all tables SRD SRDC SRS SRSC Read Only (Polled or OnChange) Read and/or Write (any type as above) Write Only (Exception, Block or Dataset) Read Only with Error Substitute Value E=E0..E9 Read with Error Substitute Value E=E0..E9 and/or Write Statistics Read of this Device/Connection Statistics Read of this Device/Connection and Clear Statistics Read Sum of all Devices/Connections Statistics Read Sum of all Devices/Connections and Clear
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
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" or NNN{: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 items i is the item address increment 1..1000; example: 0:4 to create =0,4,8,12 option; default=1 N is the name extension for multiple items; any chars except braces { }, option Note 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 ECIs 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.
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,L2 Siemens S7 typical item name = S7:[ConnName|VFDName|AccessPoint]DB15,B3,2 Note that the length of any (assembled) item name is limited to 127 characters for ODX.
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: = (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=0 i is the ECI Addr increment 1..1000; example: 1:3 for =1,4,7 specifies OPC Item size read (option); default=1 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.
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 Trigger or Function RDTRIGG ODX Control Tag Used as Refresh Trigger ODX Auto Refresh at Startup or Link Enable
Yes
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 Trigger or Function RDTRIGG ODX Control Tag Used as Refresh Trigger ODX Auto Refresh at Startup or Link Enable
No
No
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.
S AMPLE C ONFIGURATION
OF
C OMMUNICATION O BJECTS
The ECI Object TAB1 is assembled of items ItemX+Reg120..128+ArrayY+DWrd40/42/44/46, all specified in the ODX/ECI Object Reference table. Except for ArrayY, all items are accessed for read and write. ItemX uses address 0 (default), it is an integer, split into two bytes that can also be written (Merge). Reg120..128 use addresses 1..9 and are decoded to FactoryLink array Reg12[0..8] as unsigned integers. ArrayY uses addresses 10..39 and is decoded to
FactoryLink message ArrayY[0..4] with 12 bytes (6 Elem). DWrd40..46 use addresses 40..47 corresponding to the item names, the double words contain different types of data and are decoded to different tag types. The ECI tag size (boundary) is two bytes Intel format (Rd/Wr Mode L2). While one part of the read dataset is polled, the other is read OnChange. Data is read every 8 [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.
The ECI/OPC Object TAB2 is assembled of items 9kLong+9kFloat+9kMotor47+9kValve33+9kArray1/2+9kMsgArray, all specified in the ECI/OPC Information table. Note that the optional extension "9k" is entered once only to the ODX/ECI table. Except for 9kValve33, all items are accessed for read and write. Note that the equal sign (=) specifies WriteItem=ReadItem. 9kLong is decoded to 32 digital array tags that can be written individually (Merge). 9kFloat is decoded
with its timestamp of [ms] resolution. For 9kMotor47, access rights and timestamp [SecTime] as well as bit 15 (indicating reversed speed) are decoded, and the quality information is moved to the I/O Status Tag's value (column hidden). 9kValve33 uses the Enum function to display its position on message tag Valve33_Txt in clear text copied from ValvesText[0] array. 9kArray1 is decoded with its quality status, it consists of two ItemArray tags, displayed by tags Array1_Elem0_Byte3 and Array1_Elem1_Short (the OPC ItemArray tags can be addressed by entering the tag offset in braces). If writing to Array1_Elem1_Short, this will write to 9kShort1 in the OPC Server. Finally, 9kMsgArray consists of 20 tags decoded to Msg[0] with 30 bytes each. Note that the ARY Elem increment is 8 to allow for 30 bytes within the fixed Boundary of 4 bytes (Rd/Wr Mode L4M, fixed). Data is read OnChange at a rate of 12 [s] from the OPC Server. In case of writing, data is fed back at a rate of 0.8 [s] (ECI Read Interv) while previous data would be restored after 3.5 [s] (ECI Read Update Delay) if no feedback is received. Writing is performed at change for the entire Dataset D (required for arrays) at an interval of 0.5 [s]. The OPC Server is the same as on the previous page. ECI Object for ODX Statistics Read Sample ECI Information Table for Object S1_STAT displays statistical data by 27 LongAna tags. Note that the first tag address is set to zero and addressing is defined for double words (Rd Mode=L4).
Data for the 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:
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.
OPC DATA EXCHANGE (ODX) | 7 OPC Server, DCOM and Windows Setup
AND
W INDOWS S ETUP
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 Microsofts (Distributed) Component Object Model (D)COM to communicate with OPC Server(s). DCOM is a network layer that is added by the operating system for communication over a network. Windows contains a tool for configuration of security for DCOM servers called DCOM Configuration (dcomcnfg.exe). It may be necessary to configure the default security for DCOM. Contact your network administrator for additional network assistance. Windows Accounts For one Windows computer to interact with another, both computers need to be set up with similar security accounts. If both the Server and the Client are on the same Windows Server domain and the logged in user has an account on the domain, security should be satisfactory. If there is no Windows Server on the network, then both computers (server and client) must contain the same user account. They do not need to be logged on as the same account, but must contain the same account. The following table defines the minimum requirements of default security for both server and client computers:
Registry Value Names
Everyone Everyone
Interactive Interactive
System System
Network
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.
7 | OPC DATA EXCHANGE (ODX) OPC Server, DCOM and Windows Setup
However, ODX allows for polling that may be compared to triggered block read. This method is generally less productive. It uses the ECIs 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 the running OPC server and its items, using test tools from your supplier.
Verify ECI Rd Mode, Dataset IdxTag (trigger), Read Interv Ch/Cont, and Read Prio. (D)COM might be slow to connect.
OPC DATA EXCHANGE (ODX) | 7 OPC Server, DCOM and Windows Setup
PLC memory access might be slow because it is synchronized with the CPU cycle.
Action: Action:
Use ECIs Action/Reaction method for commands sent to and read back from the PLC. Use multiple connections to split fast and slow jobs.
Numerous connections to an OPC server might drop data throughput for a connect.
Cause: Action:
This depends on the OPC server. Use ECI Read Interv and Read Prio of ODX to tune your system.
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.
Check the network load. It might be high due to other actions like a file transfer.
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:
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.
7 | OPC DATA EXCHANGE (ODX) OPC Server, DCOM and Windows Setup
Data translation methods: Emulation of RAPD and EDI drivers and OPC-Specific Configuration.
P ROGRAM A RGUMENTS
The parameters below can be entered directly with a leading dash in the Program Arguments column of the System Configuration table. Argument names are not case sensitive. You may reference a file in order to enter the desired parameters there. In this case the file name must be specified without a dash in the Program Arguments column. Use brackets {...} for environment variables and/or pathnames as required, for example, {flapp}\ODX_para.run.
Argument Description
-VMode=<#>
Verbose Mode level (#0 to 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]S erverName.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)
Argument
Description
-Alive=<#>
-SimReq=<#>
-Mux=<#>
-DisConn=<#>
-ReConn=<#> -InitDelay=<#>
-RdCache -FastUpd=<#>
-SlowUpd=<#>
Alive check timeout # in seconds to supervise connections (watchdog) if no data is transmitted. (default = 10) Maximum number # of simultaneous (asynchronous) read requests processed per connect. (default = 5) Multiplexer: the number specifies the value # to which a possible Link Control Tag must be set to enable the link. (default = 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. Time delay # in seconds to reconnect a link after failure (default = 10) Time delay # to initialize data transfer through a link. This may unburden the OPC Server or ECI at (re)connection. (default = 10) Read refresh data from Server Cache. By default, data is always read from device. 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. 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
-LimUpd=<#>
-SleepTime=<#>
You can limit the slowest update rate in seconds (default = 86400) since some servers do not allow for the OPC max of 4294967. Adjust process speed/CPU load by suspending program (sleeping) in milliseconds every scan, valid for main task only. (default = 70)
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
# 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 4294967 [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.
I NFORMATION
AND
E RROR M ESSAGES
The messages below may be displayed by the Run-Time Manager. These and others can also be logged to file %FLAPP%\SHARED\LOG\ODX*.LOG as specified for Program Argument -VMode. The numbers indicate Information and Warnings 0xx or 4xx, Failures 1xx or 5xx and Configuration Errors 2xx. The specifies %s, %d, %u, etc. represent run-time values, %d:%d indicates a TagIndex, and code=%d is an error returned by the FactoryLink (defined by PAK, file FLDEFS.H):
Label in ODX.TXT
PROG_STARTING PROG_FILE_PROC PROG_REC_DAT_PROC PROG_STOPPING PROG_RUNNING PROG_INACTIVE PROG_NO_JOB ACE_INV_AUTHORIZATION ACE_RESTART_PREVENTED E_FLCHANGEREAD E_FLCLEARCHANGEFLAG E_FLREAD E_FLSETCHANGEFLAG E_FLWRITE E_FLCOUNTMBX E_FLQUERYMBX E_FLREADAPPMBX E_FLWRITEAPPMBX
Label in ODX.TXT
NO_AUTHORIZATION ACE_ERR_IN_INSTALLATION ACE_ERR_IN_KEYFILE PROG_INIT_FAIL E_ATEXIT E_CT_GET_HDRLEN E_CT_GET_NCTS E_CT_GET_NRECS E_CT_GET_RECLEN E_CT_OPEN E_CT_READ_HDR E_CT_READ_INDEX E_CT_READ_RECS E_CT_TYPE E_CT_INFO SYS_NO_MEMORY SYS_FOPEN_ERR PROG_THREAD_START_ERR E_MKDIR E_NPATH SYS_CREATE_SEMAPHORE
Label in ODX.TXT
E_FOPENARG PROG_ARG_UNKNOWN E_PROGENVVAR
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
Analog
0
Bit ON
all OFF
OPC_INACTIVE
OPC_STARTING
401 Active/Starting
Bit 0+1
OPC_RUNNING
(0x00040000 text as available or Err 6xx/7xx) (0x00040000 text as available or Err 6xx/7xx) (No ODX configuration for this Connect Inactive) (0x00040000 text as available or Err 6xx/7xx)
5+ST
Bit 0+2
OPC_DISABLED
9+ST
Bit 0+3
OPC_NO_JOB OPC_TERMINATED
0 128
OPC_ERROR
501 Error/Enabled
256+ST
Bit 8
OPC_DISABLEDAN DERROR
503 Error/Disabled
264+ST
Bit 8+3
Note, OPC Status Codes are samples only, for detailed information see OPC Interface Specification OPCError.h
ST=Server Status | | | | | | | 0000..01FFhex Microsoft specific 0200..7FFFhex OPC standard 8000..FFFFhex Vendor specific Apply ECI to decode Bit or Nibble values as shown below.
000..FFFhex Program or location 0..3hex Success message 4..7hex Informational message 8..Bhex Warning message (A..B Vendor specific) C..Fhex Error message (E..F Vendor specific)
Error Bit
Server Connect Status Nibble N1 Bit5 (32) Server Status 2 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 Bit4 (16) Server Status 1 0 0 1 1 1 1 0 0 0 1 0 0 0 1 0
ODX Connect Status Nibble N0 Bit3 (8) Connect Disabled 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 Bit2 (4) Connect Running 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 Bit1 (2) Connect Starting 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit0 (1) Connect Active 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0
Error Status Ana Bit8 (256) Bit7 (128) Bit6 (64) DisServer Tag Val Connect
Error Inactive Active/Starting Active/Running Active/Test Active/Disabled /Run Active/Disabled /Test Link Terminated Error/Enabled /Lost Error/Enabled /Failed Error/Ena /NoConfig Error/Ena /Suspended Error/Disabled/ Lost Error/Disabled/ Failed Error/Dis/ NoConfig Error/Dis/ Suspended 0 3 21 85 25 89 128 256 288 304 320 264 296 312 328 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Connect 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 Status 4 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1
Nibble Value 0 3 5 8 9
Connect Disabled 0 0 0 1 1
Connect Running 0 0 1 0 0
Connect Starting 0 1 0 0 0
Connect Active 0 1 1 0 1
Nibble Value
DisConnec t 0 0 0 0 0
Server Status 4 0 0 0 0 1
Server Status 2 0 0 1 1 0
Server Status 1 0 1 0 1 0
Server Inactive or Unavailable Server RunningOPC_SERVER_RUNNING Server FailedOPC_SERVER_FAILED Server NoConfigOPC_SERVER_NOCONFIG Server SuspendedOPC_SERVER_SUSPENDED Server TestOPC_SERVER_TEST Server Link Terminated/Disconnected
0 1 2 3 4
5 8
0 0
0 1
1 0
0 0
1 0
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:
Label in ODX.TXT (hhh) E_XMIT_RD_0258 E_XMIT_RD_0259 E_XMIT_RD_025A E_XMIT_RD_025B E_XMIT_WR_02BC E_XMIT_WR_02BD E_XMIT_WR_02BE E_XMIT_WR_02BF E_XMIT_WR_02C6 E_XMIT_WR_02C7 E_XMIT_WR_02C8 E_XMIT_WR_02C9 E_XMIT_WR_02CA E_XMIT_WR_02D0 E_XMIT_WR_02D1
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
Chapter 8
Installation Set the environment variable GWASDRDIR equal to: <FLINK>/bin/sdr-140 for serial communications <FLINK>/bin/sdr-170 for HSMS communications For Windows, also include this in your path. Add Driver to System Configuration Add a task entry in the System Configuration table. Be sure the entry is in the Shared domain. Set the Executable File field to specify SDRV in the Task Name field. sdrv_eth.exe for HSMS communications sdrv_232.exe for serial communications The program arguments for SDRV are on page 452.
E DITING
THE
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
SECS/HSMS
Indicates whether to use the SECS RS-232 or HSMS protocol for communication.
Valid Entry: SECS = RS-232
HSMS = Ethernet
Com Port
Baud Rate
(required for SECS) Indicates the speed at which the task communicates.
Valid Entry: 150
T3 Timeout 1 sec
T4 Timeout 1 sec
T5 Timeout 1 sec
T6 Timeout 1 sec
T7 Timeout 1 sec
T8 Timeout 1 sec
Retry Limit
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
EQUIP
Protocol
HSMS-94 for HSMS HSMS-93 for HSMS SECS for SECS GEM for BOTH
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 Estab 1 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)
(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)
(required for HSMS) The time limit to wait for TCP/IP to accept data.
Valid Entry: 1 - 120 seconds (default = 20)
Tag name where the status for the last send operation is written.
Valid Entry: tag name Valid Data Type: analog
Tag name where the status for this logical port is written.
Valid Entry: tag name Valid 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 Tag Name
(currently not implemented) Tag name where any errors for this logical station are written.
Valid Entry: tag name Valid Data Type: analog
The 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
OFF_LINE
Comment
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 Device Number
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 )
Tag name that defines the stream number of the message to be sent.
Valid Entry: tag name Valid Data Type: analog
Tag name that defines the function number of the message to be sent.
Valid Entry: tag name Valid 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 name Valid 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 name Valid 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: optional
tag 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 name Valid 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 name Valid Data Type: analog
Tag name where the stream number of the last message received is written.
Valid Entry: tag name Valid Data Type: analog
Tag name where the function number of the last message received is written.
Valid Entry: tag name Valid Data Type: analog
Receive Message ID
Tag name where the message ID number of the last message received is written.
Valid Entry: tag name Valid 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 name Valid 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 name Valid 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 State Value: 1
Valid Entry: tag name Valid Data Type: analog
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 Line Value: 0 Command action: ON Line Value: 1
Valid Entry: tag name Valid 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 name Valid 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
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
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.
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] <U2 0> <U2 0> 1 1.1:
<U2 <L
1>
/*
CEID * /
1.2: 1.3
<L [ 2] <U2 <L <I2 <U1 <A <U4 <U4 <U4 > > < L [ 2] <U2 <L <I2 <U1 <U4 <U4 <U4 <U4 > -7> 4> 321> 123> 99> 100> /* Data * / /* Data * / /* Data * / /* Data * / /* Data * / /* Data * / 2> /* RPTID * / 135> 357> High 246> 468> 802> /* Data * / /* Data * / speed SECS> /* Data * / /* Data * / /* Data * / 1> /* RPTID * /
SECS DRIVER Configuring the SECS-II Message Definition Information Table The third data item in the first report is a text field. If only part of that string was desired, the word speed for example, the parse string would be 1.3.1.2.3:6,5. This begins at the 6th character, and stores the next 5.
Conditional Parsing: There are cases where the same stream and function (SxFy)
received by the driver may have varying structures. One common example of this is S6F 11 where different collection events will have different reports attached to them, therefore making the structures variable. This driver allows the application to evaluate different structures based on an tag within the structure. Conditional item types (entries in the ITEM TYPE field are of the form CONxx, where xx specifies the data type; for example CONAS would be ASCII, CONU4 would be a 4 byte unsigned integer) are used in conjunction with the parsing syntax to point to the tag are compare it to a value. If this comparison is true, then this message structure is used, if not, the driver goes on to the next. If none of the conditional tags match, the message is dropped. A complete list of supported conditional data types appears later in this section. In conditional comparisons on an ASCII data type (CONAS), the :X,Y parsing conditions apply to conditional matching; but if the conditions are met and a tag is specified to store 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> <L > /* Define Report */ S2F33 W <L [ 2] < U2 1235> <L <L [2] <U2 1> <L
/* DATAID * /
/* DATAID * /
/* RPTID */
/* VID */ /* 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
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 name Valid Data Type: digital
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 definition
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: optional
0 - 255
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 data ASCII - ASCII data JIS8 - Japanese SINT8 - 8 byte signed integer SINT1 - 1 byte signed integer SINT2 - 2 byte signed integer SINT4 - 4 byte signed integer FLOT8 - 8 byte float FLOT4 - 4 byte float UINT1 - 1 byte unsigned integer UINT2 - 2 byte unsigned integer UINT4 - 4 byte unsigned integer UINT8 - 8 byte unsigned integer FNAME- File Name for READ NOBDY - For header only messages FSIZE - File size FN_B - File Name for WRITE, send data as bytes FN_A - File Name for WRITE, send data as ASCII FN_I1 - File Name for WRITE, send data as SINT1 FN_I2 - File Name for WRITE, send data as SINT2 FN_I4 - File Name for WRITE, send data as SINT4 FN_I8 - File Name for WRITE, send data as SINT8 FN_U1 - File Name for WRITE, send data as UINT1 FN_U2 - File Name for WRITE, send data as UINT2 FN_U4 - File Name for WRITE, send data as UINT4 FN_U8 - File Name for WRITE, send data as UINT8 CONI2- Conditional item type SINT2 CONU2- Conditional item type UINT2 CONI4- Conditional item type SINT4 CONU4- Conditional item type UINT4 CONAS- Conditional item type ASCII
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 value Valid Data Type: digital
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 name
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
(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
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: NO
YES
Positional Parse Enable
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: NO
YES
E XAMPLES
1. Simple messages: The following are two common and simple message transactions. After each message is the corresponding SECS-II Message Definition Information Table entries. In both cases, the tables are filled out from a HOST-configuration point of view.
Host Initiated S1F13 (Establish Communications Request): S1F13 W < L> . Equipment Response S1F14: S1F14 <L [ 2] <B 0> <L <A 'ABC123'> <A '020100'> > > >
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
<L [ 3] <U2 1234> <U2 1> <L <L [2] <U2 1> <L
/* DATAID */ /* CEID */
/* RPTID */ <A High speed SECS> <U4 246> /* Data */ <U4 468> /* Data */
> > <L [2] <U2 2> <L <I2 -7> <U1 4> > > > > Host Response S6F12 S6F12 <B [1] 00> . /* RPTID */ /* Data */ /* Data */
/* ACKC6 */
3. Conditional Parsing: In the above message, the collection event ID (CEID) equals 1. The message for CEID 2 may be entirely different, or the data may need to go into different tags. This can be true for numerous collection events. Conditional parsing allows the application to accommodate these varying messages. The following is an example message for CEID 2. The tables below show how conditional parsing can be set up for both of these messages. In some cases, the application may require most of the data from a few of the messages in the set, but just one or two pieces from all the rest of the messages. To do this,
configure the conditionals first, then put the general case (with no conditionals) after. If one of the conditions are met, that structure will be used. If not the general case will be used. This is illustrated below.
Equipment Initiated S6F11 (Event report): S6F11 W <L [3] <U2 1235> <U2 2> <L <L [2] <U2 3> <L <U4 5678> <U4 5432> > > > > Host Response S6F12: S6F12 <B [1] 00>
/* DATAID */ /* CEID */
/* ACKC6 */
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> <L > > Equipment Response S2F34: S2F34 <B [1] 00> <L /* DATAID */
/* DRACK */
<L [2] <U2 1> <L <U2 12> <U2 13> > > > Equipment Response S2F34: S2F34 <B [1] 00> /* RPTID */ /* VID */ /* VID */
/* DRACK */
Note that for each primary S2F33 configured using differing message IDs, 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> <A Program2> <A Program3> <A Program4> <A Program5> <A Program6> >
Only looking at the fields involved in the repeat block, it is easier to illustrate how the syntax would be expanded. The following example
INQGN, CONXX, or Repeat Data
Tag Name
Item Length
10
EqPPID[0]
UINT4
Tag Name EqPPID[1] EqPPID[2] EqPPID[3] EqPPID[4] EqPPID[5] EqPPID[6] EqPPID[6] EqPPID[7] EqPPID[8] EqPPID[9]
Item Name UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4 UINT4
Item Length
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> <U2 102> <U2 109> <U2 311> <U2 417> > Equipment Response S1F12: S1F12 <L <L [3] /* SVID */ /* SVID */ /* SVID */ /* SVID */ /* SVID */
<U2 101> <A Vision Errors> <A > > <L [3] <U2 102> <A Feeder Errors> <A > > <L [3] <U2 109> <A Time in Alarm> <A SEC> > <L [3] <U2 311> <A Boards Lost> <A > > <L [3] <U2 417> <A Fire Suppressant> <A PSI> > >
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
Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data
1 3
LIST LIST UINT2 ASCII ASCII LIST LIST UINT2 ASCII ASCII LIST UINT2 ASCII ASCII LIST UINT2
1 3
5 3
Tag Name
Item Type
Item Length
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 IDs to be processed using that process program. Note how the repeat blocks are nested in the configuration table, but be sure to read the warning note below the table!
Host Initiated S7F9 (Process Program/Material Matrix Request): S7F9 W Equipment Response S7F10 S7F10 <L <L [2] <A Program1> <L <A LOT00001> <A LOT00002> <A LOT00003> > > <L [2] <A Program2> <L <A LOT00099> > > <L [2] <A Program3> <L <A LOT00601> <A LOT00602> > > >
/* PPID */ /* MID */
WARNING! The above example illustrates how a nested repeat block can be entered into the driver, but also illustrates a common mistake that can be made when using nested repeat blocks in this driver! By looking at the expansion for this configuration, note that the first index in the EqMID array IS NOT INCREMENTED! The driver has no way of knowing when to increment the first index, so it keeps incrementing the second index.
Only looking at the fields involved in the repeat block for the read of the secondary message, it is easier to illustrate how the syntax would be expanded. The following example
Tag Name Item Type Item Length INQGN, CONXX, or Repeat Data
EqPPID[0] EqMID[0][0]
1 2 0 1 0
EqPPID[0] EqMID[0][0] EqMID[0][1] EqMID[0][2] EqMID[0][3] EqMID[0][4] EqPPID[1] EqMID[0][5] EqMID[0][6] EqMID[0][7] EqMID[0][8]
LIST LIST ASCII LIST ASCII ASCII ASCII ASCII ASCII LIST ASCII LIST ASCII ASCII ASCII ASCII
3 2 0 5 0 0 0 0 0 2 0 5 0 0 0 0
Tag Name
Item Type
Item Length
EqMID[0][9] EqPPID[2] EqMID[0][10] EqMID[0][11] EqMID[0][12] EqMID[0][13] EqMID[0][14] EqPPID[3] EqMID[0][15] EqMID[0][16] EqMID[0][17] EqMID[0][18] EqMID[0][19]
ASCII LIST ASCII LIST ASCII ASCII ASCII ASCII ASCII LIST ASCII LIST ASCII ASCII ASCII ASCII ASCII
0 2 0 5 0 0 0 0 0 2 0 5 0 0 0 0 0
As a result, because of the variable nature of the message, there is no real way of knowing which material IDs belong to which process programs.
P ROGRAM A RGUMENTS
Argument Description
-B<#>
-D -D:F<#> -L
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. SDR Library API calls displayed on the screen. SDR Library API calls are written to FLAPP/sdrv-log.dat (default). The # indicates the file where the SDR Library API calls are written. Additional data for repeat blocks and parsing is displayed on the screen or written to the file specified by D:F.
TECHNICAL N OTES
Application Specific
Commands
Command Trigger and Command Value are analog tags. The Command Trigger defines the Command Type and the Command Value contains an optional argument for the Command. At present, the only Command Trigger value defined is 1, which sets the On Line/Off Line status. The desired affect is stored in Command Value: 1 for On Line and 0 for Off Line. Additional features may be added in the future.
Message Overrun Protection
In some situations, a piece of SECS equipment may send bursts of messages to FactoryLink. To ensure individual processing of each message (avoiding database tag information from being overwritten before processed), a message overrun feature is available. For messages where this may be a problem, enter YES in the Auto Read Disable field of the SECS II Message Definition Information table and specify a control tag in the appropriate Read Disable Field of the SECS Read/Write Control table. When a message is read in with this feature enabled, the FactoryLink database tags are updated and any further message processing by the driver on that logical device halts until the Read Disable Control tag is set back to 0. When the driver is in a halt mode, the SECS interface is still operational, buffering up any messages sent to FactoryLink.
Message Sequences
The driver handles the following six sequences: Send Trigger Send Primary SxFyMz, No Reply Send Trigger Send Primary SxFyMz, Reply Poll for Secondary SxF(y+1)Mz Drop Ticket Send Trigger Send Primary, Verify Delivery Poll for Verification Drop Ticket Poll Receive Primary SxFyMz, No Reply Drop Ticket Poll Receive Primary SxFyMz, Reply Respond with Secondary SxF(y+1)Mz Poll Receive Primary SxFyMz, Reply Respond with Secondary SxF(y=1)Mz, Verify Delivery Poll for Verification Drop Ticket SxFyMz meaning: Sx = Stream X Fy = Function Y Mz = Message ID z
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.
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.
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.
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
Description
Inquire/Grant failure. A conversation started has sent the Inquire, and received a refusal Grant. Possible failures are: 1. Grant message contained non-zero Data Item value 2. Grant message had incorrect format.
Status Code
Description
6 5
Timer Expired. The event is an application timeout. Good Delivery Notification. The event is the successful delivery of a transaction message to the other end of the link. 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. 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.
T3 or T4 Timeout
Transaction Aborted (SxF0 or Abort Reply. The event is the receipt of S9Fx) either an F0 Reply (same Stream, Function 0), or a Stream 9 System Error message aborting the transaction. 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. Status Good. The function was successful. ID error. The connection ID was not configured. ID State error. The connection ID was not enabled. Port error. The port was not configured.
0 -1 -2 -3
Status Code
Description
-4 -5
Port State error. The port was not enabled. 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 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. Ticket error. The state of the thicket is incorrect for the current operation. There is probably an incorrect sequence of commands. Ticket Originated Locally Ticket Busy. 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.
-6
-7
Ticket error
-8 -9 -10
Status Code
Description
-11
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. 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. Forced T_TOED (GEM Connection Failure). The SdrStart failed because the SDR Daemon is already running. The SdrStart calls failed to initialize the executable program and has timed out. The SDR Daemon process has terminated abnormally. The SDR Daemon did not initialize correctly. The configuration program failed. Error on config file open. Memory allocation failure. TCP/IP kernel not found.
-12