Allen-Bradley Ethernet Interface for FactoryLink Version 7.2 October 12, 2000 February, 2004
Axisware, L.L.C Plano, TX 75074, USA http://www.axisware.com
[email protected] +1-(214)-764-1876 (Phone) +1-(214)-764-1876 (Fax)
Axisware
Allen-Bradley Ethernet Interface
This document contains proprietary information of Axisware, L.L.C and is based on information available at the time of its publication. While efforts have been made to be accurate, the information contained herein does not purport to cover all details or variations in hardware or software, or to provide for every possible contingency in connection with installation, operation, or maintenance. Features may be described herein which are not present in all hardware and software systems. Axisware, L.L.C. assumes no obligation of notice to holders of this document with respect to changes subsequently made. Axisware, L.L.C. makes no representation or warranty, expressed, implied, or statutory with respect to, and assumes no responsibility for the accuracy, completeness, sufficiency, or usefulness of the information contained herein. No warranties of merchantability or fitness for purpose shall apply. All Trademarks Acknowledged Copyright 2000-2004 Axisware, L.L.C, Plano, TX, USA All Rights Reserved
i
Axisware
Allen-Bradley Ethernet Interface
Software License Please carefully read the following licensing agreement. By using this Axisware, L.L.C. product, you are thereby indicating your acceptance of and agreement with all the terms specified and your commitment to abide by them.
Product Use Axisware, L.L.C. grants to you a non-exclusive license to use the Software programs and related documentation in this package on a single processing unit. No one other than a current Axisware, L.L.C. employee is permitted to modify or tamper with in any way the executable computer files(s) associated with this license. This license applies solely to Axisware, L.L.C. software and documentation contained in this package, and does not apply to any software or documentation provided by other parties which may be required for the proper operation of this product. You should check the license conditions provided by the originators of software supplied by others.
Warranty Except as modified by an in-force written agreement executed by an authorized officer of Axisware, L.L.C., Axisware, L.L.C. expressly disclaims any and all warranties, conditions or representations, either expressed or implied, with respect to software, other products and any part thereof delivered to Customer hereunder, including any and all implied warranties or conditions of title, non-infringement, merchantability or fitness or suitability for any purpose (whether or not Axisware, L.L.C. knows, has reason to know, has been advised or is otherwise in fact aware of any such purpose), whether alleged to arise by law, by reason of custom or usage in the trade or by course of dealing. In addition, Axisware, L.L.C. expressly disclaims any warranty or representation to any person other than Customer with respect to the software or any part thereof. No written or oral information or advice given by Axisware, L.L.C., its agents or employees shall create any warranty or in any way increase the scope of the limited warranty set forth in such license agreement and Customer may not rely on any such information or advice. Customer's sole and exclusive remedy for any breach of this Agreement, including any breach of warranty, shall be, to the exclusion of all other remedies therefor, in contract, tort or otherwise, at Axisware, L.L.C. sole option, either the return of the price paid for or the correction or replacement of any product that does not meet the limited warranty, if any, set forth in a written agreement signed by an authorized officer of Axisware, L.L.C. that is returned to Axisware, L.L.C.. In no event shall Axisware, L.L.C. be liable to Customer (nor to any person claiming rights derived from Customer's rights) for incidental, consequential, special, punitive or exemplary damages of any kind, including without limitation lost profits, loss of business or other economic damage and further including injury to property, as a result of a breach of this agreement, including any breach of warranty, regardless of whether Axisware, L.L.C. was advised, had other reason to know or in fact knew of the possibility thereof. In no event shall Axisware, L.L.C. aggregate liability to Customer (including liability to any person or persons whose claim or claims are based on or derived from a right or rights claimed by Customer), with respect to any and all claims at any and all times arising from or related to this Agreement, in contract, tort or otherwise, exceed the aggregate amounts paid to Axisware, L.L.C. by Customer.
ii
Axisware
Allen-Bradley Ethernet Interface
Table of Contents 1. Overview...................................................................................................................1 2. Definitions.................................................................................................................1 3. Differences from FactoryLink EDI Interfaces............................................................3 4. Application Configuration..........................................................................................4 System Configuration Information Table....................................................................4 Allen-Bradley Ethernet Interface: Device Definitions..................................................5 Allen-Bradley Ethernet Interface: Read/Write Control..............................................10 Allen-Bradley Ethernet Interface: Read/Write Information.......................................15 5. Details of Solicited Operation..................................................................................17 6. ABEI Program Arguments.......................................................................................20 System Configuration Information Table..................................................................20 Environment String..................................................................................................20 Task Command Line from Command Prompt..........................................................20 Task Sleep Period...................................................................................................20 Device Packet Retry Count......................................................................................21 Solicited Packets in Single Time Slice.....................................................................21 Unsolicited Packets in Single Time Slice.................................................................21 Maximum Number of Messages in Log File.............................................................21 7. Allen-Bradley Data Table Address Strings..............................................................22 PLC-5 I/O Data Tables............................................................................................22 All Other PLC-5 Data Tables...................................................................................23 SLC I/O Data Tables................................................................................................30 All Other SLC Data Tables.......................................................................................31 8. ABEI Error Codes and Extended Error Codes........................................................35 Extended Code: 35 – WSAEWOULDBLOCK..........................................................35 Extended Code: 36 – WSAEINPROGRESS............................................................35 Extended Code: 38 – WSAENOTSOCK..................................................................35 Extended Code: 45 – WSAEOPNOTSUPP.............................................................35 Extended Code: 50 – WSAENETDOWN.................................................................35 Extended Code: 51 – WSAENETUNREACH...........................................................36 Extended Code: 53 – WSAECONNABORTED........................................................36 Extended Code: 54 – WSAECONNRESET.............................................................36 Extended Code: 57 – WSAENOTCONN..................................................................36 Extended Code: 61 – WSAECONNREFUSED........................................................36 Extended Code: 64 – WSAEHOSTDOWN..............................................................36 Extended Code: 65 – WSAEHOSTUNREACH........................................................36 Extended Code: 1....................................................................................................37 Extended Code: 2....................................................................................................37 Extended Code: 3....................................................................................................37 Extended Code: 4....................................................................................................37 Extended Code: 5....................................................................................................37 Extended Code: 6....................................................................................................37 Extended Code: 7....................................................................................................37 Extended Code: 8....................................................................................................37 Extended Code: 16..................................................................................................37
iii
Axisware
Allen-Bradley Ethernet Interface
Extended Code: 32..................................................................................................37 Extended Code: 48..................................................................................................37 Extended Code: 64..................................................................................................38 Extended Code: 80..................................................................................................38 Extended Code: 96..................................................................................................38 Extended Code: 112................................................................................................38 Extended Code: 128................................................................................................38 Extended Code: 144................................................................................................38 Extended Code: 160................................................................................................38 Extended Code: 176................................................................................................38 Extended Code: 192................................................................................................38 Extended Code: 208................................................................................................38 Extended Code: 224................................................................................................38 Extended Code: 1....................................................................................................38 Extended Code: 2....................................................................................................39 Extended Code: 3....................................................................................................39 Extended Code: 4....................................................................................................39 Extended Code: 5....................................................................................................39 Extended Code: 6....................................................................................................39 Extended Code: 7....................................................................................................39 Extended Code: 8....................................................................................................39 Extended Code: 9....................................................................................................39 Extended Code: 10..................................................................................................39 Extended Code: 11..................................................................................................39 Extended Code: 12..................................................................................................39 Extended Code: 13..................................................................................................39 Extended Code: 14..................................................................................................40 Extended Code: 15..................................................................................................40 Extended Code: 16..................................................................................................40 Extended Code: 17..................................................................................................40 Extended Code: 18..................................................................................................40 Extended Code: 19..................................................................................................40 Extended Code: 20..................................................................................................40 Extended Code: 21..................................................................................................40 Extended Code: 22..................................................................................................40 Extended Code: 23..................................................................................................40 Extended Code: 24..................................................................................................40 Extended Code: 25..................................................................................................40 Extended Code: 26..................................................................................................40 Extended Code: 27..................................................................................................40 9. ABEI Messages.......................................................................................................42 10. ABEI Message Logging.........................................................................................44
iv
Axisware
Allen-Bradley Ethernet Interface
1. Overview This manual describes the configuration of the Axisware Allen-Bradley Ethernet Interface Task. The task enables FactoryLink to communicate with Allen-Bradley PLC-5/xxEs or SLC-5/05 controllers connected with the FactoryLink station via the controller's Ethernet Interface. This task provides an application interface similar to FactoryLink EDI drivers and supports solicited and unsolicited operations.
2. Definitions The following terms are used throughout this manual: A-B Controller The term A-B Controller is used to refer to an Allen-Bradley PLC-5/xxE or SLC 5/05 controller connected to the FactoryLink station via the controller's Ethernet Interface. ABEI Task The term ABEI task refers to the Axisware Allen-Bradley Ethernet Interface Task (the product described in this manual). Block Read A method of exchanging data between a FactoryLink application and an A-B Controller. In this method the task will monitor a trigger tag. On detecting the trigger the task will send the necessary “read” commands to the A-B Controllers required to sample the A-B Controllers' data table values and set those values into RTDB tags. Block Write A method of exchanging data between a FactoryLink application and an A-B Controller. In this method the task will monitor a trigger tag. On detecting the trigger the task will send the necessary “write” commands to the A-B Controllers required to "write" the A-B Controllers' data table values to those values in the RTDB tags. Device The ABEI task represents an A-B Controller with a device. Read/write Information table entries are grouped by devices. Each device is independent of other devices. Each device has it's own set of address, status, disable, error count and error codes which can be accessed via RTDB tags. Each device establishes it's own separate solicited and/or unsolicited sessions with an A-B Controller. In its basic form there is one device for each A-B Controller accessed by the ABEI task. The A-B Controller accessed by a device can be fixed in the configuration by using a literal string in the device's TCP/IP Host Address field. Alternatively by specifying a message tag for this field the application can control which A-B Controller the device is communicating with while the application is running. A device can only communicate with one AB Controller at a time. Disable Tag A tag that when specified can be used by the application to either disable or enable either a solicited data exchange or a device. While the tag is true (non-zero) the data exchange or device is disabled. While the tag is false (zero) the data exchange or device is enabled. If the tag is not specified the data exchange or device is enabled.
1
Axisware
Allen-Bradley Ethernet Interface
Exception Write A method of exchanging data between a FactoryLink application and an A-B Controller. In this method the ABEI task will individually monitor the RTDB tags listed in a Read/Write information table for a changed state on that tag. When a change is detected the task will initiate a write of that individual tag’s value to the A-B Controller to the address specified in the Read/Write Information table. RTDB FactoryLink Real-time Database. Solicited Solicited operations are data exchanges that are initiated by the FactoryLink task. The task will monitor a tag for a trigger condition and upon detection of the trigger condition initiate a data exchange. There are three types of solicited operations Block Read, Block Write and Exception Write. Tag A value in the FactoryLink Real-time Database. Unsolicited Read A method of exchanging data between a FactoryLink application and an A-B Controller. In this method this task will wait to receive a write command from the A-B Controller and define tags into the RTDB based on the contents of that command. Using this method allows the A-B Controller to write application tags based on the ladder logic in the A-B Controller. This task uses the term "Unsolicited Read" to match the FactoryLink EDI term for this function, the direction of data transfer is the same as a Block Read, data is "read" from the A-B Controller into the RTDB.
2
Axisware
Allen-Bradley Ethernet Interface
3. Differences from FactoryLink EDI Interfaces The application interface for the Allen-Bradley Ethernet Interface task is loosely based on the FactoryLink EDI Application interface. This section lists differences between this task and FactoryLink EDI interfaces. •
This task does not have an equivalent to an EDI Logical Port. Since this task uses an Ethernet Interface each device contains it’s own port or channel.
•
This task uses “Devices” in the place of the EDI Logical Station.
•
Additional triggers for an individual progressing (active) solicited operation (Block Read/Block Write on a single Read/Write Information table, or Exception Write of a single row (Tag) in a single Read/Write Information Table) are not queued. If a trigger is detected for a progressing (in process of reading or writing due to a previously detected trigger) single solicited operation the additional trigger is ignored.
•
Values read from A-B Controllers within an individual Block Read table are written in a singe write to the RTDB. The ABEI task updates the RTDB only if no errors were detected in the individual Block Read.
•
The ABEI task is designed to allow for the same tag to be in both a Block Read Table and an Exception Write Table without the block read of a tag triggering the exception write of that tag. This has a side effect that the ABEI task will not recognize a change in any tag in a Block Read Table due to the Block Read being performed. This applies only to a change in the tag due to the Block Read, a change in the tag will be recognized by the ABEI task if changed elsewhere in the application.
•
There are separate fields to enter priority queue number and disable tag for exception writes and block writes.
•
The ABEI task can process multiple solicited operations simultaneously. At any point when the task is running multiple solicited operations may be at different stages of processing.
•
Complete and state tags function differently than those for EDI tasks. Analog or long analog tag types can be used to detect whether the solicited block operation has been performed, and if performed whether or not the block operation completed with or without errors.
3
Axisware
Allen-Bradley Ethernet Interface
4. Application Configuration FactoryLink driver tasks are configured by entering data into configuration tables, thus specifying communication parameters, and defining the data to be read/written to/from an external device or multiple devices. Data is entered into configuration tables by accessing one or more screen displays within the FactoryLink Configuration Manager and/or Application Editor, which provide entry fields for information required by the table. For a description of the general principles governing the entry of data in FactoryLink configuration tables, consult the FactoryLink user documentation.
FactoryLink Configuration Tables System Configuration Information Table The “System Configuration Information” table is where different FactoryLink tasks are configured to run in an application. This section gives suggested entries for “required” fields in this table for the Allen-Bradley Ethernet Interface task. Please refer to FactoryLink documentation for more detailed information on all the fields in this table.
Flags The following entries for this field are suggested: F Run task in foreground. R Start program when application starts S Task has its own system console (text window for messages)
Task Name Enter “ABEI” in this field
Description Enter “Axisware Allen-Bradley Ethernet Interface” in this field
Executable File Enter “bin\abei” in this field.
Program Arguments Please see the “ABEI Program Arguments” section below for a description of the contents of this field.
4
Axisware
Allen-Bradley Ethernet Interface
ABEI Task Tables The following Three configuration tables are provided with this task.
Allen-Bradley Ethernet Interface: Device Definitions This table is used to define the devices used by the ABEI task. Entries in this table define the device’s type, address and other operational characteristics. For the purposes of this interface task a device represents either an A-B PLC-5/xxE or an A-B SLC 5/05 controller. Normally there would be a single device for each A-B Controller; however, it is possible to have multiple devices represent the same A-B Controller, or have a single device access multiple A-B Controllers.
Device Name Identifies the device defined by this entry. Up to 16 ASCII displayable characters, case specific unique identification string. The entry in the Read/Write Information Table "Device Name" field are matched to the device via this field.
Device Type Identifies whether the A-B Controller referenced by the device defined in this entry is a PLC-5/xxE or SLC 5/04.
TCP/IP Address Host Name This field specifies either the TCP/IP (dot) address or "host alias name" for the A-B Controller accessed by the device defined by this entry. This field may either be a constant string entered into the field (preceded with a single quote (‘) ) or a message tag name. Either the constant string or the content of the message tag is used as the AB Controller's address when the device attempts to connect. If a message tag is specified when the value in the tag changes the ABEI task will act as if the device was disabled and enabled via its Disable tag. Any pending commands in the device will be aborted and the device will attempt to connect to the new address on the first detected "new" operation. Note: Using a message tag for this field allows the application to control which A-B Controller is addressed. To maximize throughput the task prepares the commands when starting and not when a trigger is detected. Setting a device configured as a PLC-5 to the address of a SLC or a device configured as a SLC to the address of a PLC-5 will result in an illegal command being sent to the A-B Controller.
Packet Timeout This value specifies the amount of time (in tenths of seconds) the task will wait for a response to a command from the A-B Controller. Note: A value of zero instructs the task to never timeout (device will wait forever for a response).
5
Axisware
Allen-Bradley Ethernet Interface
Inactive Timeout This value specifies the amount of time (in tenths of seconds) the task will leave the device's solicited connection active without any solicited operations on the device. If the specified amount of time elapses before there is a data exchange with the A-B Controller the solicited connection is terminated. The solicited connection is reestablished when a new operation is detected for the device. This field provides a way for the ABEI task to clean up open solicited connections when those connections are no longer being used. Each open connection uses system, A-B Controller, and task resources that should be released if no longer required. The "best" value to use depends on numerous factors dependent on the application and the environment the application is running in. In general if the device is being used constantly by the application this value should be large enough to assure that the connection will be kept open. If the application uses the device occasionally the value should be small enough to assure that the connection will be closed when the occasional use has finished. Note: A value of zero instructs the task to never timeout (device will not be disconnected due to inactivity). Note: The device's unsolicited connection is generally controlled by the A-B Controller; however, disabling the device via its Disable Tag will close all open connections for the device.
Reconnect Timeout To avoid constant reconnection attempts to an A-B Controller when some component in that connection may have failed. The task will wait for the time period specified in this field before attempting to reconnect this device to the A-B Controller it addresses. This time period is used when the connection fails or a connection attempt fails. The effect is similar to a "slow poll". Note: A value of zero instructs the task to never timeout (device will not attempt to reconnect after error in connection or failure to reconnect). Note: The device will break out of this "wait state" if the device is enabled via its Disable Tag, or the message tag specified in the TCP/IP Address Host Name field changes.
Max Concurrent Packets An A-B Controller can handle (queue) simultaneous commands from multiple sources. This entry limits the number of simultaneous commands sent to an A-B Controller by this device. Higher values for this field may result in higher throughput though this device. If the A-B Controller's load is high and/or there are other entities communicating with the A-B Controller, then lowering this number may provide better overall performance. If the controller is not an Allen-Bradley controller than set this limit to no more then the controller's queue capacity. Valid entries: Decimal number 1 through 63.
6
Axisware
Allen-Bradley Ethernet Interface
Disable Tag Name If specified this field defines a tag that will be monitored by the task to control whether this device is enabled or disabled. If no tag is specified then the device is enabled. When a device is disabled the device's connections are closed. Disabled devices abort any pending or new solicited operations with a device disabled error code. Operations that are in progress may have some commands that were completed by the device before the disabled value was detected in this tag. When a device is enabled the device will attempt to connect to the associated A-B Controller on the next detected solicited operation on this device. Valid entries: FactoryLink digital, analog or long analog tag Tag Values: False (zero) True (non-zero)
Device is enabled Device is disabled.
Solicited Status Tag Name Specifies a tag to indicate the status of the solicited connection for this device. Valid entries: FactoryLink analog or long analog tag Tag Values: 0 1 period 2 3 4
Device is inactive and disabled (disable tag true) Device is inactive and waiting for the reconnect timeout Device is idle (waiting for an operation to connect) Device is connecting Device is active
Unsolicited Status Tag Name Specifies a tag to indicate the status of the unsolicited connection for this device. Valid entries: FactoryLink analog or long analog tag Tag Values: 0 1 2 Controller) 3 4
Device is inactive and disabled (disable tag true) Unused for unsolicited connection Device is idle (waiting to receive connection from A-B Device is connecting Device is active
Error Count Tag Name Specifies a tag to indicate the number of errors detected on communications in this device. If specified the tag is set to zero on task startup and incremented upon each error detected by the device. The value will not exceed the normal positive range for the type tag selected (1 for digital, 32767 for analog, and 2147483647 for long analog). Valid entries: FactoryLink digital, analog or long analog tag
7
Axisware
Allen-Bradley Ethernet Interface
Error Code Tag Name Specifies a tag to contain a code that represents the last error detected by this device. If defined the task will set this tag to zero (no error) on startup and then to the code for any error detected. Valid entries: FactoryLink digital, analog, or long analog tag Tag Values: For digital tags 0 No Error 1 Some Error For analog and long analog tags zero No Error non-zero Contains code for the detected error, refer to the ABEI Error Codes and Extended Error Codes section in this manual for information on specific codes and extended codes.
Extended Error Code Tag Name Specifies a tag to contain additional information for some of the error codes in the Error code Tag field described above. Valid entries: FactoryLink digital, analog, or long analog tag Tag Values: For digital tags 0 No Error 1 Some Error For analog and long analog tags zero No Error non-zero Refer to the ABEI Error Codes and Extended Error Codes section in this manual for information on specific extended error codes.
Comment Optional application documentation field. Valid entry:
31 alphabetic or numeric characters
Sample Allen-Bradley Ethernet Interface: Device Definitions entries are shown below. These screen-shots are taken from the sample application provided with the Allen-Bradley Ethernet Interface for FactoryLink.
8
Axisware
Allen-Bradley Ethernet Interface
9
Axisware
Allen-Bradley Ethernet Interface
Allen-Bradley Ethernet Interface: Read/Write Control This table is used to control the manner in which each Read/Write Information Table is processed at runtime. Each entry in this table specifies the operation(s) of its associated Read/Write Information table. Note: This section describes the Read/Write control table and it's individual fields. Please see the section in this manual entitled "Details of Solicited Operations" for further information on how the ABEI task processes Solicited Operations
Table Name Name of the Read/Write Information Table controlled by this entry. Valid entry:
ASCII string containing up to 16 of the following character set: A-Z, a-z, @, $, _, or 0-9.
Unsolicited Read Field which specifies whether or not the entries in the associated Read/Write Information table will be used to interpret write commands received from A-B Controllers. Valid entry: No: Yes:
Table is not to be used to receive unsolicited values Table is to be used to receive unsolicited values and when received are written to the RTDB using the “normal” RTDB write command. Force: Table is to be used to receive unsolicited values and when received are written to the RTDB using the “force” RTDB write command.
Exception Write Field that specifies whether or not the entries in the associated Read/Write Information table will be used for exception writes. Valid entry: No: Yes:
Table is not to be used for exception writes. Table is to be used for exception writes.
Exception Write Priority Field that specifies the priority queue number on which to queue exception writes in each device. The lower the priority queue number the higher the priority level. Valid entry:
Numeric entry of queue number (1 – 4, 1 highest priority)
Exception Write Disable Tag Specifies a tag to control the enabling and disabling of exception writes for the associated read/write information table. If no tag is specified then exception writes, if used, are enabled.
10
Axisware Valid entry:
Allen-Bradley Ethernet Interface Any valid digital, analog or long analog tag name
Tag Values: True (non-zero): False (zero):
Exception writes are disabled Exception writes are enabled
Block Read Trigger Tag Specifies a tag to be used as the trigger for block reads of the associated Read/Write Information table. If a tag is not specified the table will not be processed for Block Reads. Valid entry:
Any valid digital, analog, long analog tag name
Block Read Priority Field that specifies the priority queue number on which to queue Block Reads in each device. The lower the priority queue number the higher the priority level. Valid entry:
Numeric entry of queue number (1 – 4, 1 highest priority)
Block Read Complete Specifies a tag to be used as the complete tag for block reads of the associated Read/Write Information table. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: For Digital Tags 1 Trigger for Block Read has been processed. For Analog and Long Analog Tags 1 Block Read has finished without errors 2 Block Read has finished with one or more errors 3 Trigger for Block Read was ignored.
Block Read State Specifies a tag to be used as the state tag for block reads of the associated Read/Write Information table. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: For Digital Tags 0 Block Read is in progress (active) 1 Block Read is idle (inactive) For Analog and Long Analog Tags 0 Block Read is in progress (active) 1 Block Read is idle (last completion without error) 2 Block Read is idle (last completion with error(s)). 3 Block Read is idle (change in tag not due to block read having been performed).
11
Axisware
Allen-Bradley Ethernet Interface
Block Read Disable Tag Specifies a tag to control the enabling and disabling of block reads for the associated read/write information table. If no tag is specified then block reads, if used, are enabled. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: False (zero): True (non-zero):
Block Reads are enabled. Block Reads are disabled.
Block Write Trigger Tag Specifies a tag to be used as the trigger for block writes of the associated Read/Write Information table. If a tag is not specified the table will not be processed for Block Writes. Valid entry:
Any valid digital, analog, long analog tag name
Block Write Priority Field that specifies the priority queue number on which to queue Block Writes in each device. The lower the priority queue number the higher the priority level. Valid entry:
Numeric entry of queue number (1 – 4, 1 highest priority)
Block Write Complete Specifies a tag to be used as the complete tag for block writes of the associated Read/Write Information table. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: For Digital Tags 1 Trigger for Block Write has been processed. For Analog and Long Analog Tags 1 Block Write has finished without errors 2 Block Write has finished with one or more errors 3 Trigger for Block Write was ignored.
Block Write State Specifies a tag to be used as the state tag for block writes of the associated Read/Write Information table. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: For Digital Tags 0 Block Write is in progress (active) 1 Block Write is idle (inactive) For Analog and Long Analog Tags 0 Block Write is in progress 1 Block Write is idle (last completion without error)
12
Axisware
Allen-Bradley Ethernet Interface 2 3
Block Write is idle (last completion with error(s)). Block Write is idle (false finish indication).
Block Write Disable Tag Specifies a tag to control the enabling and disabling of block writes for the associated read/write information table. If no tag is specified then block writes, if used, are enabled. Valid entry:
Any valid digital, analog, long analog tag name
Tag Values: False (zero): True (non-zero):
Block Writes are enabled. Block Writes are disabled.
Comment Optional application documentation field. Valid entry:
31 alphabetic or numeric characters
Sample Allen-Bradley Ethernet Interface: Read/Write Control entries are shown below. These screen-shots are taken from the sample application provided with the Allen-Bradley Ethernet Interface for FactoryLink.
13
Axisware
Allen-Bradley Ethernet Interface
14
Axisware
Allen-Bradley Ethernet Interface
Allen-Bradley Ethernet Interface: Read/Write Information This table is used to map data tags to a specific data table file and element in an A-B Controller.
Tag Name The name of the data tag to be mapped to a data region in an A-B Controller. Valid entries: Digital, Analog, Long Analog, Float, or Message Tag
Device Name Identifies the device to use when exchanging data. This field must match exactly (case sensitive) the "Device Name" field in the Device Definitions table.
Address 20 character ASCII string that specifies the address in the A-B Controller's data table. Valid entries: Up to 20-character address string. Please refer to the addressing section that follows for more information on the content of this string.
Data Type Defines the type of the data in the A-B Controller. Valid entries: DEF: Default based on the tag type Digital: BIT Analog: INT2 Long Analog: INT4 Float: FLT4 Message: LOHI BIT: A single binary digit INT2: Two byte signed integer INT4: Four byte signed integer BCD4: Two byte unsigned BCD number with four digits UBCD: Two byte unsigned BCD number with three digits FLT4: Four byte (normal) A-B Floating point FLT8: Eight byte (non-standard) Floating point LOHI: Array of bytes as stored in the device HILO: Array of bytes with the bytes in each word swapped from as stored in the A-B Controller ST: Element of a String (ST) file
Comment Optional application documentation field. Valid entry:
31 alphabetic or numeric characters
15
Axisware
Allen-Bradley Ethernet Interface
Sample Allen-Bradley Ethernet Interface: Read/Write Information entries are shown below. These screen-shots are taken from the sample application provided with the Allen-Bradley Ethernet Interface for FactoryLink.
16
Axisware
Allen-Bradley Ethernet Interface
5. Details of Solicited Operation Detection and Execution of Trigger In solicited operations the ABEI task monitors a RTDB tag for each solicited operation, interpreting a changed indication on the tag as a request to initiate the solicited operation. For Exception Writes the ABEI task monitors each data tag is the associated Read/Write information table as the trigger for the individual solicited write operation. For Block Reads and Block Writes the ABEI task monitors the tag specified (if so) in the corresponding Trigger Tag field in the Read/Write Control Table. The existence of a changed state on the monitored trigger tag does not necessary initiate the solicited operation. There are three conditions where the task will ignore the changed state on the trigger and not initiate the solicited operation. 1. If the operation is a Block Read or Block Write and the trigger tag is digital, the value of the digital tag must be true (non-zero) for the operation to be initiated. This does not apply to Exception Writes. 2. If a disable tag is specified for the operation and the value of the disable tag is true (non-zero), disabling the operation, the task will not initiate the operation. 3. If the operation is progressing, in process of being performed due to a previous trigger, the task will not initiate a new operation.
Flow of Solicited Operations When the task starts the configuration for the task is examined, solicited operations are divided into separate commands (packets) and buffer space allocated for each solicited operation. When the solicited operation is initiated the commands are queued into the associated devices for processing. When the device has processed a command the results of that command are passed back to the solicited operation buffer where it is combined with the results of the other commands in the operation. Once the results from all the commands in the solicited operation have been collected, the task finishes the operation. The components in this process operate independently of each other. At any point while the task is running it is possible to have multiple solicited operations at different phases in this process, the order that solicited operations are initiated does not necessarily determine the order is which they are finished.
Priority Each device has four queues for individual commands of solicited operations to be processed by the device. Each queue is associated with a priority level, 1 through 4 where 1 is the highest priority. When the device is ready to send a command to the A-B Controller, it samples these queues to determine the next command to send. The higher the priority the more often the associated queue is sampled for a pending command. In order to ensure that any command regardless of priority will eventually be sent a command may be sent before one of a higher priority. Block Read, Block Write, and Exception Write are queued on the same four queues in each device. Note: The priority queues are in each separate device and operate independently of any priority queues in any other devices.
17
Axisware
Allen-Bradley Ethernet Interface
Complete and State Tags The ABEI task can provide information on the current status of Block Read and Block Write operations via the use of either the Complete or State tags for that block operation. The information provided by these tags is similar. The principle differences are when and how they are written to by the ABEI task. These differences are to facilitate the use of Self-Triggered and Daisy Changed Block operations. Please see the descriptions in this section of the manual for a description of these methods. Care should be taken if either of these tags is used by other FactoryLink tasks to indicate that a block operation has finished. There are conditions when either type of tag will indicate a false "finished" condition. For example the state tags are updated by the ABEI task upon startup which would, if the other FactoryLink tasks were unaware that the ABEI task has just started, be incorrectly interpreted by the other tasks as if the block operation has completed. Digital, analog, or long analog tags can be used for these fields. If analog or long analog tags are used the ABEI task will provide information in the value of the tag to indicate that the block operation was or was not performed and if performed whether the block operation completed with or without errors. The complete tag is force written to true (non-zero) by the ABEI task whenever the ABEI task has finished handling a change detected in the trigger for the block operation. Normally this is when the block operation completes; however, not all changes in the trigger initiate the block operation. For example if a disable tag is specified for the block operation and the disable tags value is true (non-zero), disabling the block operation, then the trigger will have changed but the block operation will not be performed. Complete tags facilitate a "Daisy Chain" of block operations as described later in this section. When the ABEI task is running the state tag reflects the "inactive" state of the block operation regardless of changes to the trigger tag for the block operation. When the block operation is progressing (active), in the act of being preformed, the state tag will be false (zero). When the block operation is not being performed (inactive), the state tag will be true (non-zero). The ABEI task sets the state tag to true (non-zero) when the task starts to indicate that the block operation is inactive. In order to facilitate self-triggering block operations the ABEI task will force write the state tag to true (non-zero) on start up and when a self-triggered block operation is reenabled via the disable tag for that block operation.
Self-Triggered Solicited Block Operations This method is designed to block read or block write data to or from the A-B Controller as fast as the ABEI task can perform the operation. While causing the least impact to other operations of this task and other FactoryLink or nonFactoryLink tasks running on the same system. In this method a single tag is used for both the trigger and state fields of the block operation. When the ABEI task starts it will force the value of the state tag to true (non-zero), causing a change to the trigger tag, which is detected by the ABEI task and starts the block operation. When the block operation is initiated the ABEI task will set the value of the state tag to false (zero) and when the block operation finishes the ABEI task will set the value of the state tag to true (non-zero) causing a change to the trigger tag. This change in the trigger is detected by the ABEI task and restarts the block operation. Thus in the absence of other factors the block operation is started when the ABEI task starts, and the block operation is restarted each time it finishes as long as the ABEI task is running.
18
Axisware
Allen-Bradley Ethernet Interface
If a disable tag is specified for a self triggered operation the setting of the disable tag to true (non-zero) disabling the block operation, will cause self-trigging of the operation to stop. This is because the state tag is updated only on changes in the Active/Inactive State of the operation. Without special handling in the ABEI task enabling the operation by setting the disable tag to false (zero) would not restart the self-triggering operation. The ABEI task looks on changes to solicited operations disable tags that enable the operation when the operation was disabled for whether the solicited operation has the same tag as its trigger and state tags. If so the ABEI task will force write the state tag to true (non-zero) restarting the self-triggering operation. Excessive overhead can be produced in the task if a disable tag is specified and the same tag is used as the trigger tag and the complete tag of the operation. The complete tag is set by the task upon handling a change in the trigger. If the disable tag is true, disabling the operation, once a change is detected in the trigger tag the task will set the complete tag causing a change in the trigger causing the task to set the complete tag causing a change in the trigger ...
Daisy-Chained Block Operations This method is designed to force the ABEI task to perform a series of solicited block operations one at a time and in a specific sequence. Note this applies only to the individual Read/Write Information tables used and not to the commands contained in the tables used or other Read/Write Information tables in the application. To implement this method use the complete tag of the first operation in the series as the trigger of the second operation, continue in this fashion until all subsequent operations are triggered on the complete tag of the previous operation. This method can be used to perform the sequence of operations in the same manner as an individual block read/write by specifying a trigger tag for the first operation. The daisy chain can be made circular by using the complete tag of the last operation as the trigger of the first operation. Thus when the last operation is finished the first operation is triggered and so on though the daisy chain. The complete tags are not written by the ABEI task on startup, thus some external method is required to start the daisy chain. If the complete tag is used as the trigger in the next operation disable tags may be used to disable a single operation in the chain. The single operation would not be performed but its complete tag would be set to trigger the following operation. If all the disable tags in a circular daisy chain are true then the condition of excessive overhead in the task similar to that described when using complete tags for selftriggered operations will exist. The state tag should not be used to daisy chain. When the task starts it force writes state tags to true (non-zero). This will cause all of the operations in the chain to be triggered simultaneously. Since the order that the ABEI task detects simultaneous triggers is indeterminate and since the ABEI task performs multiple simultaneous solicited operations, the serial and sequential nature desired in this method will not be accomplished. Also the use of a disable tag to disable a single operation in the chain would break the chain.
19
Axisware
Allen-Bradley Ethernet Interface
6. ABEI Program Arguments The Allen-Bradley Ethernet Interface task allows for some adjustments of its resource usage by use of “program arguments”. The arguments are entered in the following format: “-Innnn –I nn –Innn …” where: I nnnn
Denotes the start of a argument Argument Identifier Integer number (this is not a fixed number of digits)
Each argument has a minimum and maximum value. if a value below the minimum is given the minimum is used. If a value above the maximum is given the maximum is used. There are three places where these arguments can be specified. These three locations are checked for arguments in the order they are listed below. The last definition of an argument will be the value used by the task.
Program Arguments Locations System Configuration Information Table String entered into the “Program Arguments” field of the System configuration Information in the row that defines the ABEI task.
Environment String The environment string is "ABEIPARM" this can either be set in the System -> Environment applet from the control panel or from a DOS command session entering the command: "Set ABEIPARM=[arguments]" Note: If set from a DOS command session FactoryLink must be run from that command session. Note: In the DOS set command there is no space between "ABEIPARM" and the equals sign "=", a space after the equals sign is optional.
Task Command Line from Command Prompt The ABEI task can be started when the FactoryLink Application is running by entering the command: “abei” at the command prompt. Program arguments can be specified in this command as: “abei –Inn –Innn –In … “ Note: Before starting the ABEI task in this manner assure the ABEI task is not already running.
Argument Descriptions Task Sleep Period Unlike the majority of FactoryLink tasks a device interface task must often react to events other than changes to tags in the RTDB, for example processing unsolicited messages from an A-B Controller. The ABEI task accomplishes this by using “Time Slices” of the CPU to check for and process monitored events and then releases the CPU for a “Sleep Period”. The smaller the sleep period the faster the task will
20
Axisware
Allen-Bradley Ethernet Interface
respond to events; however this increases the amount of CPU time that is used by the task. The Higher the sleep period the less CPU time used by the task; however the task will take longer to detect and process events. This parameter is in milliseconds (1/1000th of a second). Parameter ID: Default Value: Minimum Value: Maximum Value:
s 10 1 1500
Device Packet Retry Count Defines the number of times a command packet will be resent to a device on certain transitional (non-fatal) errors. Parameter ID: Default Value: Minimum Value: Maximum Value:
r 2 1 10
Solicited Packets in Single Time Slice Defines the maximum number of solicited response packets a device will receive and process in a single CPU Time Slice. The higher the number the higher the throughput but the longer it may take for the task to complete a time slice and release the CPU. Parameter ID: Default Value: Minimum Value: Maximum Value:
p 25 1 1000
Unsolicited Packets in Single Time Slice Defines the maximum number of unsolicited command packets a device will receive and process in a single CPU Time Slice. The higher the number the higher the throughput but the longer it may take for the task to complete a time slice and release the CPU. Parameter ID: Default Value: Minimum Value: Maximum Value:
u 25 1 1000
Maximum Number of Messages in Log File In the “ABEI Message Logging” section below the logging parameter “maxmsg” is described as setting the maximum number of messages written to a log file at 10,000. This parameter controls the maximum number of messages. Parameter ID: Default Value: Minimum Value: Maximum Value:
m 10,000 100 250,000
21
Axisware
Allen-Bradley Ethernet Interface
7. Allen-Bradley Data Table Address Strings This section describes the fully specified address string format for the “Address” field in Read/Write Information tables. While the driver supports short hand address strings (for example: “B/129” to denote bit129 of Binary file 3) only the fully specified formats are described.
PLC-5 Logical Addressing PLC-5 I/O Data Tables The addressing scheme for inputs and outputs is different from that used for other PLC-5 data files. The addressing used by the Driver is detailed below. The standard format is as follows: filetype:[wordnumber][/bit] where filetype
=
Either I for input or O for output
wordnumber
=
Word number in OCTAL (optional) If the word number is omitted, a zero (0) is assumed. The valid range for word number is 0 - 37.
bit after
=
Bit number in OCTAL (optional) specified slash (slash must be included if bit number is specified) If the bit number is omitted, a zero
(0) is assumed. Note: The filetype and wordnumber may be separated by either a colon (:) or a semicolon (;).
I - Inputs The input image file uses no mnemonics. Examples: Address: I:7/1 I:30/7 I/17 I:32/0
Description: Element 7, bit 1 Element 30 (octal), bit 7 Element 0, bit 17 (octal) Element 32 (octal), bit 0
O - Outputs The output image file uses no mnemonics. Examples: Address: O:7/1 O:30/7 O/17 O:32/0
Description: Element 7, bit 1 Element 30 (octal), bit 7 Element 0, bit 17 (octal) Element 32 (octal), bit 0
22
Axisware
Allen-Bradley Ethernet Interface
All Other PLC-5 Data Tables The addressing scheme for the remaining PLC-5 Data Files are similar to inputs and outputs. The addressing used by the Driver is detailed below. The standard format is as follows: filetype[filenumber]:[element][.subelement] [/bit] [,length] where filetype
=
One of the following (required) A, B, BT, C, D, F, MG, N, PD, R, S, ST, or T
filenumber
=
File number in DECIMAL (optional) If the file number is omitted, the default for
that file type is assumed (i.e. T: = T4:). element (optional)
=
Element number in DECIMAL
Valid ranges are as configured in PLC. If element is not specified, a zero (0) is assumed. (Of the following you may use one or none:) subelement
=
Subelement number specified in DECIMAL or mnemonic (optional). Subelements are only valid for the file types where they are
specifically mentioned below. bit
=
Bit number in DECIMAL (optional) specified after slash (slash must be included if bit
number is specified). If the bit number is omitted, a zero (0) is assumed. Some file types, as described below, permit the use of bit mnemonics. Length tag.
=
Number of words to be read into message This is always preceded by a comma
(optional). Note: The filenumber and element may be separated by either a colon (:) or a semicolon (;).
A - ASCII The ASCII file uses no subelements or mnemonics. Please note that no default file number exists for an ASCII file. Examples:
23
Axisware
Allen-Bradley Ethernet Interface
Address: Description: A10:10 File 10, word 10, bit 0 A10:10,20 File 10, word 10, length 20 (40 bytes) A20:30/14 File 20, word 30, bit 14
B - Binary The binary file uses no subelements or mnemonics. Examples: Address: B/17 B3/17 B13:1/2
Description: File 3, word 1, bit 1 As above File 13, word 1, bit 2
BT - Block Transfer The block transfer file permits both subelement mnemonics and bit mnemonics. Please note that no default file number exists for this file type and that this file type is only valid for “new” generation PLC-5s (5/30, 5/40, 5/60, 5/80). Bits: Number: 15 14 13 12 11 10 9 8 7
Mnemonic: EN ST DN ER CO EW NR TO RW
Description: Enabled Start Done Error Continue Enable wait No response Time out Read/Write
Mnemonic: RLEN DLEN FILE ELEM RGS
Description: Receive length. Requested word count. Done length. Transmitted word count. File-type number. Element. Word number. Rack/Group/Slot.
Subelements: Number: 1 2 3 4 5 Examples: Address: BT12:1.RLEN BT20:2.FILE BT15:5/ST
Description: File 6, control 1, receive length value File 20, control 2, File type value File 6, control 5, start bit
24
Axisware
Allen-Bradley Ethernet Interface
C - Counter The counter file permits both subelement mnemonics and bit mnemonics. Bits: Number: 15 14 13 12 11
Mnemonic: CU CD DN OV UN
Description: Count up Count down Done Overflow Underflow
Mnemonic: PRE ACC
Description: Preset Value Accumulated Value
Subelements: Number: 1 2
Examples: Address: C:1.PRE C20:2.ACC C5:5.DN C5:6/12
Description: File 5, counter 1, preset value File 20, counter 2, accumulated value File 5, counter 5, done bit File 5, counter 6, overflow bit
D- Decimal The decimal file uses no subelements or mnemonics. This section is comprised of 16 bit BCD words. Please note that no default file number exists for a decimal file. Examples: Address: D0:10 D8:11
Description: File 0, element 10 File 8, element 11
F - Floating Point The floating point file uses no subelements or mnemonics. Examples: Address: F:10 F8:10
Description: File 8, element 10, bit 0 As above
MG - Message The message file permits both subelement mnemonics and bit mnemonics. Please note that no default file number exists for this file type and that this file type is only valid for “new” generation PLC-5s (5/30, 5/40, 5/60, 5/80). Bits: Number: 9 8 7
Mnemonic: NR TO EN
Description: No response Time out Enable
25
Axisware 6 5 4 3 2
Allen-Bradley Ethernet Interface ST DN ER CO EW
Start transmission Done Error Continuous Enable waiting
Mnemonic: ERR RLEN DLEN
Description: Error code Request length. Done length
Subelements: Number: 1 2 3
Examples: Address: MG11:1.ERR MG21:2.3 MG15:5/CO
Description: File 11, message 1, error code File 21, message 2, done length File 15, message 5, continuous bit
N - Integer The integer file uses no subelements or mnemonics. Examples: Address: N:10 N7:10 N20:30/14
Description: File 7, word 10, bit 0 As above File 20, word 30, bit 14
PD - PID Loop The PID file permits both subelement mnemonics and bit mnemonics. Please note that no default file number exists for this file type and that this file type is only valid for “new” generation PLC-5s (5/30, 5/40, 5/60, 5/80). Bits: Number: 28 27 26 25 24 19 18 17 16 15 9 8 7 6 4 2
Mnemonic: INI SPOR OLL OLH EWD DVNA DVPA PVLA PVHA EN CT CL PVT DO SWM CA
Description: PID initialized Set point out of range Output alarm, Low limit Output alarm, High limit Error within dead band Deviation High Alarm Deviation Low Alarm Process Variable Low Alarm PV High Alarm Enable Cascaded Type Cascaded Loop Process Variable Tracking Derivative Of Software A/M Mode Control Action
26
Axisware 1 0
Allen-Bradley Ethernet Interface MO PE
Station Mode (auto/manual) PID Equation Type
Mnemonic: SP KP KI KD BIAS MAXS MINS DB SO MAXO MINO UPD PV ERR OUT PVH PVL DVP DVN PVDB DVDB MAXI MINI TIE
Description: Setpoint Proportional gain Initial gain Derivative gain Output bias % Maximum scaled value Minimum scaled value Dead band Set output % Maximum Output limit Minimum Output limit Update time Process Variable Error: Scaled Output PV alarm High PV alarm Low Deviation Alarm + Deviation Alarm PV alarm dead band Deviation alarm dead band Maximum Input Minimum Input Tieback %
Subelements: Number: 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48
Examples: Address: PD11:1.SP PD16:2.DB PD15:5/PE PD70:1/OLL
Description: File 11, PID 1, setpoint File 16, PID 2, dead band File 15, PID 5, equation bit File 70, PID 1, lower output alarm
R - Control The control file permits both subelement mnemonics and bit mnemonics. Bits: Number: 15 14 13 12 11 10 9 8
Mnemonic: EN EU DN EM ER UL IN FD
Description: Enabled Enable unload Done Empty Error Unload Inhibit Comparison Found
Subelements:
27
Axisware Number: 1 2
Allen-Bradley Ethernet Interface Mnemonic: LEN POS
Description: Length Position
Examples: Address: R:1.LEN R20:2.POS R6:5.UL R6:6/14
Description: File 6, control 1, length value File 20, control 2, position value File 6, control 5, unload bit File 6, control 6, enable unload bit
S - Status The status file uses no subelements or mnemonics. Examples: Address: S:10 S2:10
Description: File 2, word 10, bit 0 As above
ST - String The string file permits subelement mnemonics. Please note that no default file number exists for this file type and that this file type is only valid for “new” generation PLC-5s (5/30, 5/40, 5/60, 5/80). Subelements: Number: 0 1
Mnemonic: LEN DATA
Description: Length. Specifies an even number of bytes. Actual string data
Examples: Address: ST22:1.LEN ST22:2.1,5
Description: File 22, string 1, length value File 22, string 2, string data, length 5
T - Timer The timer file permits both subelement mnemonics and bit mnemonics. Bits: Number: 15 14 13
Mnemonic: EN TT DN
Description: Enabled Timing Done
Mnemonic: PRE ACC
Description: Preset Value Accumulated Value
Subelements: Number: 1 2
Examples:
28
Axisware
Allen-Bradley Ethernet Interface
Address: Description: T:1.PRE File 4, timer 1, preset value T20:2.ACC File 20, timer 2, accumulated value T4:5.DN File 4, timer 5, timer done bit T4:6/15File 4, timer 6, enabled bit
29
Axisware
Allen-Bradley Ethernet Interface
SLC Logical Addressing SLC I/O Data Tables The addressing used by the Driver is detailed below. The standard format is as follows: filetype:[I/Oslotnumber][.wordnumber][/bit] where filetype
=
Either I for input or O for output
I/Oslotnumber =
I/O Slot Number in DECIMAL (0-30)
wordnumber word
Word number in DECIMAL (optional) If the
=
number is omitted, a zero (0) is assumed. If the device in the slot provides more then one word (16bits) of data the word number must be specified to access the additional words of data. The valid range for the word number is 0 127. bit
=
Bit number in DECIMAL (optional) specified after slash (slash must be included if bit
number is specified). The valid range is: 0 – 7 (8 bit I/O) 0 - 15 (16 or more bits) If the bit number is omitted, a zero (0) is assumed. Note: The filetype and I/O slotnumber may be separated by a colon(:) or a semicolon(;).
O - Output Image The output image file is file 0 of the data table. This file uses no mnemonics. Examples: Address: O:7/1 O:30/7 O:3.1/3
Description: Slot 7, bit 1 Slot 30, bit 7 Slot 3, bit 19
I - Input Image The file for input image elements is file 1 of the data table. mnemonics. Examples: Address: I:7/1
Description: Slot 7, bit 1
30
This file uses no
Axisware
Allen-Bradley Ethernet Interface
I:30/7 I:3.1/3
Slot 30, bit 7 Slot 3, bit 19
All Other SLC Data Tables The addressing used by the Driver is detailed below. The standard format is as follows: filetype[filenumber]:[element][.subelement] [/bit] [,length] where filetype
=
One of the following (required) A, B, C, F, N, R, or T.
filenumber
=
File number in DECIMAL (optional) If the file number is omitted, the default for that file type
is assumed (i.e. T: = T4:). element (optional) Valid
=
Element number in DECIMAL
ranges are as configured in PLC. If element is not specified, a zero (0) is assumed. (Of the following you may use one or none:) subelement
=
Subelement number specified in DECIMAL or mnemonic (optional). Subelements are only valid for the file types where they are
specifically mentioned below. bit
=
Bit number in DECIMAL (optional) specified after slash (slash must be included if bit
number is specified). Valid bit numbers are 0 - 15. Some file types, as described below, permit the use of bit mnemonics. If the bit number is omitted, a zero (0) is assumed. length tag.
=
Number of words to be read into message This is always preceded by a comma.
Note: The filenumber and element may be separated by either a colon (:) or a semicolon (;).
31
Axisware
Allen-Bradley Ethernet Interface
A - ASCII The ASCII file uses no subelements or mnemonics. Please note that no default file number exists for an ASCII file. Examples: Address: Description: A10:10 File 10, word 10, bit 0 A10:10,20 File 10, word 10, length 20 (40 bytes) A20:30/14 File 20, word 30, bit 14
B - Bit (Binary) Each binary element consists of one word. You can address a binary element in its entirety or you can address any particular data bit of an element individually. Examples: Address: B/17 B3/17 B13:1/2
Description: File 3, word 1, bit 1 As above File 13, word 1, bit 2
C - Counters Each counters structure consists of three words. The counters file permits both subelement mnemonics and bit mnemonics. Bits: Number: 15 14 13 12 11
Mnemonic: CU CD DN OV UN
Description: Count up Count down Done Overflow Underflow
Mnemonic: PRE ACC
Description: Preset Value Accumulated Value
Subelements: Number: 1 2
Examples: Address: C:1.PRE C20:2.ACC C5:5/DN C5:6/12
Description: File 5, counter 1, preset value File 20, counter 2, accumulated value File 5, counter 5, done bit File 5, counter 6, overflow bit
F - Floating Point Each floating point element consists of two words. The floating point file permits no subelements or mnemonics. Examples:
32
Axisware
Allen-Bradley Ethernet Interface
Address: F:10 F8:10
Description: File 8, element 10, bit 0 As above
N - Integer The integer file uses no subelements or mnemonics. Examples: Address: N:10 N7:10 N20:30/14
Description: File 7, word 10, bit 0 As above File 20, word 30, bit 14
R - Control Each control block consists of three words. The control file permits both subelement mnemonics and bit mnemonics. Bits: Number: 15 14 13 12 11 10 9 8
Mnemonic: EN EU DN EM ER UL IN FD
Description: Enabled Unloading Enabled Done Empty Error Unload Inhibit Comparisons Found
Mnemonic: LEN POS
Description: Length Position
Subelements: Number: 1 2
Examples: Address: R:1.LEN R20:2.POS R6:5/UL R6:6/14
Description: File 6, control 1, length value File 20, control 2, position value File 6, control 5, unload bit File 6, control 6, enable unload bit
T - Timers The timers file accommodates up to 256 timer structures. Each timer structure consists of three words. You can address a timer structure in its entirety or you can address any particular member of a structure individually. Bits: Number: 15
Mnemonic: EN
Description: Enabled
33
Axisware 14 13
Allen-Bradley Ethernet Interface TT DN
Timer Timing Done
Mnemonic: PRE ACC
Description: Preset Value Accumulated Value
Subelements: Number: 1 2
Examples: Address: T:1.PRE T20:2.ACC T4:5/DN T4:6/15
Description: File 4, timer 1, preset value File 20, timer 2, accumulated value File 4, timer 5, done bit File 4, timer 6, enabled bit
34
Axisware
Allen-Bradley Ethernet Interface
8. ABEI Error Codes and Extended Error Codes In the Device Definitions Configuration Table there are fields to assign tags to receive codes and extended codes to report errors detected in the device. If the tags assigned to these fields are analog or long analog tags they will contain specific values for the detected error. This section describes these values.
Code: 0 – Empty No Error. There are no extended code values for this code.
Code: 1 – Allocation of Socket Failed The task was unable to create a socket for the device, assure that the TCP/IP protocol is properly installed and sufficient resources are allocated to it. There are no extended code values for this code.
Code: 2 – IP Error The task received an error when attempting to perform some operation on a socket (connection to an A-B Controller). With this code the extended code will contain the error code resulting from the attempt. Some of the more common error codes are listed below. For a complete list please view the “winsock.h” and “winsock2.h” ‘C’ include files for the Win32 SDK (Microsoft provided development libraries for Windows 32-bit operating systems). The constant “WSABASEERR” has been subtracted from the error code before being written to the tag.
Extended Code: 35 – WSAEWOULDBLOCK This code should be handled internally by the ABEI task. If you see this code please report it to our tech-support department.
Extended Code: 36 – WSAEINPROGRESS This code should be handled internally by the ABEI task. If you see this code please report it to our tech-support department.
Extended Code: 38 – WSAENOTSOCK This code is generated when an operation was requested on a handle that is not an open socket. The ABEI task should not generate this error. If you see this code please report it to our tech-support department.
Extended Code: 45 – WSAEOPNOTSUPP This code is generated when attempting to set an option on a socket that is not supported by the TCP/IP protocol implementation in the operating system. On Windows NT and Windows 2000 this error should not occur. If you see this code please report it to our tech-support department.
Extended Code: 50 – WSAENETDOWN Check that the TCP/IP protocol is properly installed.
35
Axisware
Allen-Bradley Ethernet Interface
Extended Code: 51 – WSAENETUNREACH Network unreachable, this can result from numerous circumstances, for example, TCP/IP protocol improperly installed or configured, A-B Controller IP address incorrect or improper routing, invalid addresses in the host alias file. The network card could be down or a device providing the route to the network segment could be unavailable. This list is intended to denote the type of problem that can generate this error code and should not be considered a complete list of all possible problems.
Extended Code: 53 – WSAECONNABORTED This code is generated when a send or receive is attempted on a connection that has been disconnected but the disconnection had not been detected by the task before the send or receive attempt. Detection of this code will cause the device to go into an error recovery state.
Extended Code: 54 – WSAECONNRESET This code is normally generated when a send or receive is attempted on a connection that has been disconnected by the A-B Controller. Detection of this code will cause the device to go into an error recovery state.
Extended Code: 57 – WSAENOTCONN This code is generated when a send or receive is attempted on a connection that has been disconnected but the disconnection has not yet been determined by the task. Detection of this code will cause the device to go into an error recovery state.
Extended Code: 61 – WSAECONNREFUSED The addressed A-B Controller did not accept the connection request. Assure that the A-B Controller is properly configured and is not overloaded with connections to other network devices, or too many ABEI Task devices are mapped to the A-B Controller.
Extended Code: 64 – WSAEHOSTDOWN Check that the addressed A-B Controller is connected and active.
Extended Code: 65 – WSAEHOSTUNREACH Check that the TCP/IP address for the device is valid. Check that the TCP/IP protocol has been properly installed and configured.
Code: 3 - Timeout The task waited past it’s allotted time period for some communication to complete with the A-B Controller. There are no extended code values for this code.
Code: 4 – Local Status Error In the response packet to a solicited command the A-B Controller may report errors. For this code the A-B Controller reported a “local status” error. The extended codes are the actual value returned by the device. In the list below the quoted phrase is quoted from Allen-Bradley documentation. If the extended code is not in the list
36
Axisware
Allen-Bradley Ethernet Interface
below the code has not been listed in Allen-Bradley documentation (References to Allen-Bradley documentation are of most currently available to the author at the time of writing this manual).
Extended Code: 1 “station cannot buffer command”: Try reducing the “Max Concurrent Packets” field value in the Device Definitions Table.
Extended Code: 2 “destination node (PLC) not found on DH+”
Extended Code: 3 “duplicate token holder detected”
Extended Code: 4 “local port is disconnected”
Extended Code: 5 “application layer timed out waiting for a response”
Extended Code: 6 “duplicate node detected”
Extended Code: 7 "station is off-line"
Extended Code: 8 "hardware fault"
Code: 5 – Remote Status Error In the response packet to a solicited command the A-B Controller may report errors. For this code the A-B Controller reported a “remote status” error. The extended codes are the actual value returned by the device. In the list below the quoted phrase is quoted from Allen-Bradley documentation. If the extended code is not in the list below the code has not been listed in Allen-Bradley documentation (References to Allen-Bradley documentation are of most currently available to the author at the time of writing this manual).
Extended Code: 16 "illegal command or format": Assure that the proper device type (PLC-5 or SLC) is configured for this device.
Extended Code: 32 "host has a problem and will not communicate"
Extended Code: 48 "remote node host is missing, disconnected, or shut down"
37
Axisware
Allen-Bradley Ethernet Interface
Extended Code: 64 "host could not complete function due to hardware problem"
Extended Code: 80 "addressing problem or memory protect rungs"
Extended Code: 96 "function disallowed due to command protection selection"
Extended Code: 112 "processor is in program mode"
Extended Code: 128 "compatibility mode file missing or communication zone problem"
Extended Code: 144 “remote node cannot buffer command”: Try reducing the “Max Concurrent Packets” field value in the Device Definitions Table.
Extended Code: 160 “not used”
Extended Code: 176 “remote node problem due to download”
Extended Code: 192 “cannot execute command due to active IPBs”
Extended Code: 208 “not used”
Extended Code: 224 “not used”
Code: 6 – Extended Status Error In the response packet to a solicited command the A-B Controller may report errors. For this code the A-B Controller reported an “extended status” error. The extended codes are the actual “extended status” value returned by the device. In the list below the quoted phrase is quoted from Allen-Bradley documentation. If the extended code is not in the list below the code has not been listed in Allen-Bradley documentation (References to Allen-Bradley documentation are to that currently available to the author at the time of writing this manual)
Extended Code: 1 “a field has an illegal value”: Assure the proper device type (PLC-5 or SLC) is set for this device in the Device Definitions Table.
38
Axisware
Allen-Bradley Ethernet Interface
Extended Code: 2 “less levels specified in address than minimum for any address” : Assure the proper device type (PLC-5 or SLC) is set for this device in the Device Definitions Table.
Extended Code: 3 “more levels specified in address than system supports” : Assure the proper device type (PLC-5 or SLC) is set for this device in the Device Definitions Table.
Extended Code: 4 “symbol not found”
Extended Code: 5 “symbol is of improper format”
Extended Code: 6 “address does not point to something usable”: Assure the addressed file actually exists in the A-B Controller.
Extended Code: 7 “file is of wrong size”: Assure the addressed file in the A-B Controller actually has the number of elements referenced.
Extended Code: 8 “cannot complete request, situation has changed since the start of the command”
Extended Code: 9 “data or file is too large”: Assure the addressed file in the A-B Controller actually has the number of elements referenced.
Extended Code: 10 “transaction size plus word size is too large”: Assure the addressed file in the A-B Controller actually has the number of elements referenced.
Extended Code: 11 “access denied, improper privilege”
Extended Code: 12 “condition cannot be generated, resource is not available”
Extended Code: 13 “condition already exists, resource is already available”
39
Axisware
Allen-Bradley Ethernet Interface
Extended Code: 14 “command cannot be executed”
Extended Code: 15 “histogram overflow”
Extended Code: 16 “no access”
Extended Code: 17 “illegal data type”
Extended Code: 18 “invalid parameter or invalid data”
Extended Code: 19 “address reference exists to deleted data table”
Extended Code: 20 “command execution failure for unknown reason”
Extended Code: 21 “data conversion error”
Extended Code: 22 “scanner not able to communicate with 1771 rack adapter”
Extended Code: 23 “adapter cannot communicate with module”
Extended Code: 24 “1771 module response was not valid”
Extended Code: 25 “duplicated label”
Extended Code: 26 “file is open; another node owns it”
Extended Code: 27 “another node is the program owner”
40
Axisware
Allen-Bradley Ethernet Interface
Code: 7 – Invalid Response The ABEI task was unable to interpret the response packet received on a solicited connection. There are no extended code values for this code.
Code: 8 – Invalid Command The ABEI task was unable to interpret the command packet received on an unsolicited connection. There are no extended code values for this code.
Code: 9 – Unsupported Command The ABEI task does not support the kind of command packet received on an unsolicited connection. There are no extended code values for this code.
Code: 10 – Invalid Device Type The entry in the “Device Type” field in the Device Definitions Table is not supported by the executing version of the ABEI Task. Make sure that the same version of the ABEI task is installed for both “development” and “run-time” FactoryLink systems. There are no extended code values for this code.
Code: 11 – Invalid Unsolicited Session Establish Message The ABEI task was unable to recognize the initial unsolicited session connection command received from the device. Assure that the device is a valid A-B Controller or providing true emulation. There are no extended code values for this code.
Code: 12 – Invalid IP Address The ABEI task was unable to recognize the contents of the "TCP/IP Address Host Name" field of the Device Definitions table or the contents of the message tag specified in this field as a valid IP address or host name alias. There are no extended code values for this code.
41
Axisware
Allen-Bradley Ethernet Interface
9. ABEI Messages The ABEI task will display messages in the task’s console window. This may either be the “runmgr text window” or a separate “ABEI text window” depending on whether or not the ‘S’ flag is set for the ABEI task in the Flags field of the System Configuration Information Table. Additionally these messages can be logged to a text log file by enabling write to disk in the ABEI logging function. For more information on the ABEI logging function please refer to the section on ABEI logging which follows. We have attempted to make these messages as self-explanatory as reasonably possible; however a brief description of some of the messages is given below. Axisware A-B Ethernet Ver X.YY Banner line, this line is displayed on task start up and gives the current version of the task. ‘X’ is the major version number and ‘YY’ is the minor version number. Demo Time Limit Reached Task in suspend mode The task was installed using the demonstration license and the task has been running for the demonstration time period. Restarting the task will cause it to restart the demo time period. While in suspend mode the task will not operate. Out of Memory … The task allocates and frees memory during operation for temporary buffer space. When the task attempted to allocate a buffer the operating system was unable to provide the memory. In today’s operating systems this should be far less common then in previous times, but the same conditions apply: either reduce the amount of data required by the task or reduce the number of tasks running on the system. Unable to open .ct file ct_read_index failed Invalid ct table type Device ct table length mismatch ct_read_recs error reading device table Error reading R/W Table Header of Table .. ct_read_recs failed reading records of R/W table … Invalid return from ct_get_nrecs … R/W table record length mismatch R/W table header length mismatch Invalid ct table type … These messages denote some problem with the FactoryLink application. Ensure that the application matches the version of the task installed and/or rebuild the “ct” files with the command “ctgen ABEI”. Please refer to FactoryLink documentation for more information on configuration and building of applications. Device: %s Invalid host alias for TCP/IP Address … Either the literal string entered into the “TCP/IP Address Host Name” field of the Device Definitions table or the string contained in the message tag specified in this field is not a valid TCP/IP (dot) address or does not have a corresponding entry in the host alias file.
42
Axisware
Allen-Bradley Ethernet Interface
FlRead Error … FlWrite Error … fl_read failed … fl_read failed … fl_forced_write failed … fl_write failed … fl_clear_chang failed … Error: fl_clear_chng error … The task monitors return codes from the FactoryLink RTDB Application Programming Interface (API). This style of message will denote that a RTDB API error occurred displaying the error number and a text description of the error. {Operation} of Table: {Table Name}:Device:{Device Name} Local Sts Error: 0xEE {Operation} of Table:{Table Name}:Device:{Device Name} Remote Sts Error: 0xEE {Operation} of Table:{Table Name}:Device:{Device Name} Ext Sts Error: 0x%EE There are three classes of errors reported by the A-B Controller in a command response, Local Status, Remote Status, and Extended Status. These messages denote that one of these classes of errors (error code 0xEE) was received by device {Device Name} when an {Operation} (Block Read, Block Write or Exception Write) was being performed on Read/Write Information Table {Table Name}. These messages will be followed by a message giving the translation for the error code from Allen-Bradley documentation in double quotes “” and any available additional information in parenthesis (). Unable to allocate solicited socket for device: {Device Name} Device: {Device Name} solicited ioctlsocket error {Error Code} {Error Description} Device: {Device Name} solicited ioctlsocket error {Error Cord} {Error Description} The task was unsuccessful with creating and setting up a “socket” with which to perform solicited commands with device {Device Name}. This may be due to a lack of resources on the processing station (PC). Ensure that TCP/IP is properly installed and has sufficient resources. Unable to allocate unsolicited base(listen) socket setsockopt failed on Unsolicited base(listen) socket … ioctlsocket failed on Unsolicited base(listen) socket … listen failed on Unsolicited base(listen) socket … accept failed on Unsolicited base(listen) socket … repost of listen failed on Unsolicited base(listen) socket … The task was unsuccessful with creating and setting up a “socket” on which to listen for commands from A-B Controllers for unsolicited operations. This may be due to a lack of resource on the processing station (PC) or because some other program running on the processing station has taken this resource. Ensure that TCP/IP is properly installed, has sufficient resources, and other programs attempting to communicate with A-B Controllers over Ethernet are not running. Even though unsolicited operations will not function solicited operation may continue to function.
43
Axisware
Allen-Bradley Ethernet Interface
10. ABEI Message Logging By default the ABEI task will not create a log file and only messages in the “error” category are displayed in the task’s console window. Setting “logging parameters” in a system environment variable can modify this behavior. This section describes these “logging parameters”. The environment variable is parsed upon task startup thus to change a parameter the environment variable must be modified and then the task stopped and restarted. The default state for each parameter is disabled (off) thus if one of the following parameters is desired it must be enabled (turned on) in the environment variable. The environment variable is parsed left to right thus the “last” (rightmost) reference to a parameter will define its final state. The environment string is “ABEILOG” this can either be set in the “system environment dialog” from the control panel or from a DOS command session entering the command: “Set ABEILOG={parameters}” A parameter is enabled by setting the parameters to “+{Parameter ID}” or disabled by setting the parameters to “-{Parameter ID}” there must be at least one space between the parameters. Note: in the Set command there is no space between “ABEILOG” and the equals sign “=”, a space after the equals sign is optional. All parameters are made up of lower case characters. The following parameters are defined: disk Use this parameter to enable/disable the creation of the log file. If enabled the log file “%FLAPP%\log\abei.log” will be recreated each time the task is started. The log file is created so as to overwrite any previous ABEI log file in the “%FLAPP%\log” directory. unique If the “disk” parameter above is enabled, enabling this parameter will cause the task to create a unique log file name each time the task is started. The task creates a unique name by inserting a time stamp in the file name as “%FLAPP%\log\abeiYYMMDDHHMMSS.log”. Where ‘YY’ is the two digit year, ‘MM’ is the two digit month, ‘DD’ is the two digit day of month, ‘HH’ is the two digit (24 hour) hour, ‘MM’ is the two digit minute, and ‘SS’ is the two digit second of when the file was created (task startup). Note: Using a unique file name can be useful however this keeps the task from overwriting the previous file in the log directory. Thus care should be taken to remove log files that are no longer useful or excessive disk space may be used. maxmsg Enabling this parameter will limit the number of messages written to the log file to 10,000. When 10,000 messages have been written to the file the file will be closed and upon the next message to be logged the file will be reopened. Note: Enabling this parameter will force the enabling of the “unique” parameter described above.
44
Axisware
Allen-Bradley Ethernet Interface
warn Use this parameter to enable/disable the displaying of “Warning” category messages. Messages in this category display information about potential problems in the application but do not prevent the task from performing its function. dvcsts Use this parameter to enable/disable messages that denote when a device changes its connection status. dmpctinp Use this parameter to enable/disable a “dump” of the configuration data read by the task on startup. This information could be useful in determining configuration problems. dmptrig Use this parameter to enable/disable a “dump” of the “triggers” (an internal structure used to perform each operation on a Read/Write Information Table) generated by the task from its configuration information. This information could be useful in determining configuration problems. This information includes a detailed description of all commands (packets) built for each operation on a table. dmptrgtag This parameter is only valid if the “dmptrig” parameter above is enabled. Enabling this parameter will include individual tag information in the trigger dump information. proc&line Use this parameter to enable/disable the inclusion of the source file name, procedure, and source file line number in each “logged” message. This information can be useful to tech-support in identifying exactly which source code line generated the message. Note: this information will only be added to the messages in the log file; it will not be displayed in the console window. all Use this parameter to enable/disable all of the above parameters. Examples: Set ABEILOG=+all –dmptrgtag Enable all logging parameters then disable the “dmptrgtag” parameter Set ABEILOG=+disk +warn +proc&line Enable logging to disk, include warning messages, and include source line information in messages. If sufficient disk space is available this mode is suggested for normal operation. Set ABEILOG=+warn
45
Axisware
Allen-Bradley Ethernet Interface Include warning category messages in the console window. This does not enable logging to disk thus no log file would be created.
46