Polling Data From Allen-Bradley PLC: Using Serial Protocol
Polling Data From Allen-Bradley PLC: Using Serial Protocol
APPLICATION NOTE
AUG-0045-00 2.2 en-US ENGLISH
Important User Information
Disclaimer
The information in this document is for informational purposes only. Please inform HMS Networks of any
inaccuracies or omissions found in this document. HMS Networks disclaims any responsibility or liability for any
errors that may appear in this document.
HMS Networks reserves the right to modify its products in line with its policy of continuous product development.
The information in this document shall therefore not be construed as a commitment on the part of HMS Networks
and is subject to change without notice. HMS Networks makes no commitment to update or keep current the
information in this document.
The data, examples and illustrations found in this document are included for illustrative purposes and are only
intended to help improve understanding of the functionality and handling of the product. In view of the wide range
of possible applications of the product, and because of the many variables and requirements associated with any
particular implementation, HMS Networks cannot assume responsibility or liability for actual use based on the data,
examples or illustrations included in this document nor for any damages incurred during installation of the product.
Those responsible for the use of the product must acquire sufficient knowledge in order to ensure that the product
is used correctly in their specific application and that the application meets all performance and safety requirements
including any applicable laws, regulations, codes and standards. Further, HMS Networks will under no circumstances
assume liability or responsibility for any problems that may arise as a result from the use of undocumented features
or functional side effects found outside the documented scope of the product. The effects caused by any direct or
indirect use of such aspects of the product are undefined and may include e.g. compatibility issues and stability
issues.
1 Preface ................................................................................................................................. 3
1.1 About This Document .......................................................................................................3
1.2 Document history ............................................................................................................3
1.3 Related Documents ..........................................................................................................3
1.4 Trademark Information .....................................................................................................3
2 Objectives ............................................................................................................................ 4
3 Requirements ...................................................................................................................... 5
3.1 Hardware .......................................................................................................................5
3.2 Software.........................................................................................................................5
3.3 PLC Protocol Compatibility.................................................................................................5
4 Implementation Steps......................................................................................................... 7
4.1 Link the Flexy and the PLC .................................................................................................7
4.2 Configure the IO Server.....................................................................................................7
4.3 Create Tags in the Flexy .................................................................................................. 10
4.4 Monitor Tags................................................................................................................. 12
1 Preface
1.1 About This Document
This document explains in a few steps how the Flexy can poll data registers from an Allen-Bradley
PLC based on DF1 or ABLOGIX serial protocols.
For additional related documentation and file downloads, please visit www.ewon.biz/support.
2 Objectives
The objective of this document is to explain how the Flexy can poll data registers out of one or
more Allen-Bradley PLCs using DF1 or ABLOGIX.
Polling PLC data registers implies the following steps:
1. Link the Flexy with the PLC;
2. Configure theFlexy IO server;
3. Create tags in the Flexy;
4. Monitor tags.
3 Requirements
3.1 Hardware
To follow this guide, you need:
► A computer suitable to connect to the Ewon Flexy.
→ From a computer running a web-browser, you will configure the IO server in the Flexy
to poll different types of PLC data registers.
→ You access the Flexy web server either by using (one of) its local LAN port(s) or by
another type of access such as VPN IP address.
► An Allen-Bradley PLC: PLC5, SLC500, MicroLogix, CompactLogix, ControlLogix or FlexLogix.
→ Connection between the Ewon Flexy and the Allen-Bradley PLC must be done through
serial protocol. The serial port could be on the base unit as in the Flexy 202 or on a
Flexy extension card: FLA 3301 – 2 serial ports. For polling tags over Modbus TCP with
an Ethernet connection, see “Polling Data from Allen-Bradley using Ethernet Protocol”
from Related Documents, p. 3.
→ The device will have its registers read by the tags configured in the IO server of the
Flexy.
3.2 Software
3.2.1 eBuddy
The Flexy is configured through its web server. All you need is a standard web browser software
such as Google Chrome® or Mozilla Firefox®.
The DF1 IO server name does not mean that this server is limited to the DF1 protocol and
associated serial link.
The DF1 IO server supports the EIP protocol of the listed PLC families as well.
4 Implementation Steps
4.1 Link the Flexy and the PLC
1. In the PLC configuration, the serial port must be configured in DF1 Full Duplex mode.
This is the standard setting for the PLC interface when used for programming maintenance.
2. Use the Allen-BradleyDF1 crossed serial cable (ref 1747-CP3) or equivalent to interconnect
the Flexy with the PLC.
3. The serial port on the Flexy — base unit or extension card — must be in RS232 mode.
For the FLA 3301 – 2 Serial Ports Extension card:
• Port S2 is fixed RS232 mode.
• Port S1 is configurable with dip switches. The proper configuration is printed on the
extension card to the left of the switches.
You must also configure the serial interface inside the Flexy:
1. Go to the Flexy web interface.
2. Browse to Setup ► System ► Communication ► General ► Serial ports.
3. Set the different serial ports you need according to the RS* protocol used by your PLC.
The pinout for the serial port on the Flexy is available in the Installation Guides for the Flexy and
for the FLA 3301 serial port extension card, depending if you use the serial port of the Flexy base
unit or of theFlexy extension card. For more information, refer to Related Documents, p. 3.
4. Set the settings of the IO server with the parameters as defined in the PLC you want to poll:
a. Select the COM port to which the PLC is connected.
The COM port numbering depends on the Flexy model and the number of serial port
extension cards installed in the Flexy:
– For a Flexy 205 with a single FLA 3301 (2 Serial Ports) extension card: port “S1” is
COM 1 and “S2” is COM 2.
– For other configurations, see the Installation Guides for your Flexy model and
extension cards from the Related Documents, p. 3.
b. Set the Baudrate.
c. Set the Parity.
d. Set the Stop Bit.
e. Set the Frame Error detection.
f. Select Full Duplex NO Handshaking for HW Mode.
5. Enable at least one Topic to be able to poll data registers — called tags — out of your PLC.
Topics are meant to allocate common properties to a group of tags.
Properties include Enable/Disable polling, Poll Rate, and Global Device Address.
a. Enter a valid address in the Global Device Address as per the table below.
Even though there are only three topics, the Flexy can support polling from more than
three PLCs on the same IO server.
To poll from more than three PLCs, do not specify the device address in the topic.
Instead, include the device address as part of the tag address – when configuring the
tag itself – as described later in this document.
When entering a device address, a helper appears to indicate if the address uses a valid
syntax for this IO server. An address using a valid syntax is displayed in green and an
invalid syntax in red.
b. Define the refresh rate in ms (milliseconds) inside the Poll Rate which is applicable to
all.
The poll rate is the refresh rate in ms (milliseconds) applicable to all data registers that
is included in this topic. If you leave this field blank, the default value applied will be
2000 ms (2 seconds).
If you have tags that need to refreshed at a different rates, enable and configure
multiple topics.
6. Click on Update to save your settings.
If you enter a wrong address syntax, the tag creation will be rejected and an error
message will be displayed.
For more information on data register ID syntax, see Allen-Bradley Tag Address Syntax,
p. 17.
f. Type: The data type of the tag such as Floating Point or Boolean.
The Automatic option lets the Flexy decide the format depending on the IO server
register/modifier type.
5. [Optional] The remaining fields are mostly left with their default value:
– Force Read Only: Unchecked is the default.
When it is checked, users will not be able to change a value in View mode on the
Values page.
The tag remains read/write for commands written in the embedded BASIC script program or on custom
webpages.
It is the first selected tag that will be copied if more than one single tag is selected in the list.
This page shows the tags and their last polled values as well as alarm information and logging
information for tags with alarming and logging enabled.
The page refreshes automatically at the rate set on the bottom of the page.
On this page, you can sort, filter, and search for tags to easily find specific tags.
Information about configuring additional tag features is available in the Flexy Family Reference
Guide, see Related Documents, p. 3.
You can change the value of tags that are configured as read/write (unless the box Force Read
Only was ticked in the tag creation wizard).
By clicking the Apply button, the Flexy sends the new values to the registers of the PLC. Since the
value displayed in the value column is the last value read from the PLC, the new value will not
appear until the next poll takes place.
As long as the quality of the displayed value is good, no icon appears in this column.
More information about the nature of the problem can be obtained by placing the mouse cursor
on the icon.
To get more information about the nature of the error and the sequence of events before and
after the error occurred, you can check the events appearing in the Event Log.
During commissioning or maintenance, you may want to isolate the truly bad tag from the others.
Therefore, you have to disable the polling of tags in error.
This can be done in the IO Server ► Global Settings parameters.
where:
The table below summarizes the valid file types, the default file number for each type and the
fields allowed:
The tag format is the one defined by theFlexy if it was configured as Automatic, see Create Tags
in the Flexy, p. 10:
• DWord: an unsigned 32 bits integer.
• Floating point: IEEE single precision float representation.
To read the controller tags, use the Symbolic Tag Name created inside the controller tag section
of your PLC:
Typical Examples
Item type Address to use in Ewon Flexy Description
Local:1:O Local:1:O.Data Local IO module 1:O
Local:1:O.Data/2 Bit 2 of Local IO module 1:O
ons ons[3] 3d element of INT Array
ons[3]/2 Bit 2 of 3d element of INT Array
Note .2 replaced by /2 while Ewon does not support .
before a number
TON TON[0].PRE Preset of Timer TON[0]
Myvar Myvar DINT
Typical Examples
Item type Address to use in Ewon Flexy Description
Myvar2 PROGRAM:MainProgram.Myvar2 tag Myvar2 inside MainProgram
PROGRAM:MainProgram.Myvar2/4 bit 4 of tag Myvar2 inside
MainProgram
TON1 PROGRAM:MainProgram.TON1.PRE preset of Timer TON1 inside
MainProgram
If you use the status address, the tag must be configured as an analog data type such as floating
point or integer.