a500620 en - wago 750-880 ethernetip communications … - … · program can control when the...

16
Application Note WAGO 750-880 EtherNet/IP Communications with a CompactLogix™ PLC Using Explicit Messaging A500620e, English Version: 1.0.0

Upload: votruc

Post on 23-Apr-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

Application Note

WAGO 750-880 EtherNet/IP Communications with a

CompactLogix™ PLC Using Explicit Messaging

A500620e, English Version: 1.0.0

2

Application Note

© 2013 by WAGO Kontakttechnik GmbH & Co. KG All rights reserved.

WAGO Kontakttechnik GmbH & Co. KG

Hansastraße 27 D-32423 Minden

Phone: +49 (0) 571/8 87 – 0 Fax: +49 (0) 571/8 87 – 1 69

E-Mail: [email protected]

Web: http://www.wago.com

Technical Support

Phone: +49 (0) 571/8 87 – 7 77 Fax: +49 (0) 571/8 87 – 87 77

E-Mail: [email protected]

Every conceivable measure has been taken to ensure the accuracy and completeness of this documentation. However, as errors can never be fully excluded, we always appreciate any information or suggestions for improving the documentation.

We wish to point out that the software and hardware terms as well as the trademarks of companies used and/or mentioned in the present manual are generally protected by trademark or patent.

Table of Contents 3

Application Note

Table of Contents

1 Important Notes ........................................................................................... 4

1.1 Legal Principles ......................................................................................... 4 1.1.1 Subject to Changes ............................................................................... 4 1.1.2 Copyright .............................................................................................. 4

1.1.3 Personnel Qualification ........................................................................ 4 1.1.4 Intended Use ......................................................................................... 4 1.2 Scope of Validity ....................................................................................... 5 1.3 Number Notation ....................................................................................... 5 1.4 Font Conventions ...................................................................................... 5

2 Description .................................................................................................... 6

3 Solution ......................................................................................................... 7

3.1 Setup EtherNet/IP in the WAGO 750-880 PLC ....................................... 7 3.2 Program the WAGO 750-880 PLC ........................................................... 9 3.3 Program the CompactLogix PLC ............................................................ 11 3.4 Test the Communications ........................................................................ 14

1 Important Notes

To ensure quick installation and start-up of the units, we strongly recommend that the following information and explanations are carefully read and adhered to.

1.1 Legal Principles

1.1.1 Subject to Changes

WAGO Kontakttechnik GmbH & Co. KG reserves the right to provide for any alterations or modifications that serve to increase the efficiency of technical progress. WAGO Kontakttechnik GmbH & Co. KG owns all rights arising from the granting of patents or from the legal protection of utility patents. Third-party products are always mentioned without any reference to patent rights. Thus, the existence of such rights cannot be excluded.

1.1.2 Copyright

This Manual, including all figures and illustrations, is copyright-protected. Any further use of this Manual by third parties that violate pertinent copyright provisions is prohibited. Reproduction, translation, electronic and phototechnical filing/archiving (e.g., photocopying) as well as any amendments require the written consent of WAGO Kontakttechnik GmbH & Co. KG, Minden, Germany. Non-observance will involve the right to assert damage claims.

1.1.3 Personnel Qualification

The use of the product detailed in this document is exclusively geared to specialists having qualifications in PLC programming, electrical specialists or persons instructed by electrical specialists who are also familiar with the valid standards. WAGO Kontakttechnik GmbH & Co. KG declines any liability resulting from improper action and damage to WAGO products and third party products due to non-observance of the information contained in this document.

1.1.4 Intended Use

For each individual application, the components are supplied from the factory with a dedicated hardware and software configuration. Modifications are only admitted within the framework of the possibilities documented in this document. All other changes to the hardware and/or software and the non-conforming use of the components entail the exclusion of liability on part of WAGO Kontakttechnik GmbH & Co. KG.

Please direct any requirements pertaining to a modified and/or new hardware or software configuration directly to WAGO Kontakttechnik GmbH & Co. KG.

5

Application Note

1.2 Scope of Validity

This application note is based on the stated hardware and software of the specific manufacturer as well as the associated documentation. This application note is therefore only valid for the described installation. New hardware and software versions may need to be handled differently.

Please note the detailed description in the specific manuals.

1.3 Number Notation

Table 1: Number Notation

Number code Example Note Decimal 100 Normal notation Hexadecimal 0x64 C notation Binary '100'

'0110.0100' In quotation marks, nibble separated with dots (.)

1.4 Font Conventions

Table 2: Font Conventions

Font type Indicates italic Names of paths and data files are marked in italic-type.

e.g.: C:\Programme\WAGO-I/O-CHECK Menu Menu items are marked in bold letters.

e.g.: Save > A greater-than sign between two names means the selection of a

menu item from a menu. e.g.: File > New

Input Designation of input or optional fields are marked in bold letters, e.g.: Start of measurement range

“Value” Input or selective values are marked in inverted commas. e.g.: Enter the value “4 mA” under Start of measurement range.

[Button] Pushbuttons in dialog boxes are marked with bold letters in square brackets. e.g.: [Input]

[Key] Keys are marked with bold letters in square brackets. e.g.: [F5]

2 Description

The purpose of this document is to provide a step-by-step example of how to establish communications between a WAGO 750-880 PLC and an Allen-Bradley 1769-L32 CompactLogix™ Controller using explicit messaging.

Explicit messaging is sometimes preferred to implicit messaging, as the user program can control when the message request is to be transmitted. Explicit messages can be programmed to trigger based on an event, a set cyclic rate, or other user-defined conditions. Implicit messaging via an EtherNet/IP scanner operates cyclically, and only the cyclic rate can be adjusted.

7

Application Note

3 Solution

There are four general steps for setting up this system:

1) Setup EtherNet/IP in the WAGO 750-880 PLC

2) Program the WAGO 750-880 PLC

3) Program the CompactLogix PLC

4) Test the Communications

3.1 Setup EtherNet/IP in the WAGO 750-880 PLC

Change the IP address and subnet mask of the WAGO 750-880 PLC so the device is reachable via the ethernet network. These settings can be changed using the built-in web pages of the 750-880, using a BootP or DHCP server, or using WAGO Ethernet Settings software. Consult the 750-880 user manual for detailed instruction on changing these settings.

Use the configuration tool WAGO Ethernet Settings to configure the EtherNet/IP settings for the WAGO 750-880. To connect via Ethernet using WAGO Ethernet Settings, click the Settings button, and change the Communication Settings accordingly (see example below).

Once connected, click the Protocol tab. A list of supported protocols is displayed. Click on the Ethernet/IP check box to select it (checked). If Modbus UDP or Modbus TCP is not needed for the application, click on it to deselect it (unchecked).

Click the EtherNet/IP tab to view/modify the number of PFC Fieldbus Variables to be communicated between the controllers. For this example, there will be 8 bytes of PLC input variables, and 8 bytes of PLC output variables exchanged between the devices. Change the PFC Fieldbus Variables as shown below.

9

Application Note

Click the Write button to save the changes. The WAGO 750-880 PLC is now ready for EtherNet/IP communications.

3.2 Program the WAGO 750-880 PLC

A simple program written in CoDeSys will populate the registers used for data exchange.

Start CoDeSys. Click File>New and select the 750-880 PLC, then click the OK button.

Select ST (structured text) for PLC_PRG. Click OK.

Create the program shown in the capture below. You must declare the input and output arrays as global variables at the starting addresses of the EtherNet/IP assembly instances (%IW1276 and%QW1276).

In Online>Communication Parameters, create a new TCP connection with the IP address of the WAGO 750-880 PLC.

Now that the program is written, click Online>Login and download the program to the PLC. Then click Online>Run to start the program.

11

Application Note

3.3 Program the CompactLogix PLC

Start RSLogix5000 programming software, and create a new project. Set the Controller Module Properties so that the IP Address and Gateway are on the same subnet as the WAGO 750-880 PLC.

Add the controller tags and ladder diagram logic shown below.

The Message (MSG) block is used for controller-to-controller communications. Configure the message blocks as follows:

Read MSG Block

13

Application Note

Write MSG Block

Click Communications>Download to download the program to the CompactLogix 32E PLC. Click the Download button when prompted (if safe to do so).

3.4 Test the Communications

In this example, the CompactLogix PLC is polling the WAGO 750-880 PLC by using the MSG block every 32 seconds. By modifying the preset time in Rung 0, any cyclic rate can be achieved. Communications is working below; a value of 123 in WAGO_OutData[0] can be observed in the WAGO PLC in CoDeSys variable In_Data[1]. Conversely, the WAGO variables in Out_Data array [1,2,3,4] are showing up in the CompactLogix PLC variables WAGO_InData array [0,1,2,3].

15

Application Note

This example can easily be modified by increasing the number of words transmitted between the two controllers for larger applications (up to 256 words in each direction). Also, in certain applications, this form of communications offers many benefits over the implicit (scanner) communication, by giving full control of the message occurrence to the programmer. This may be useful on slower networks, or in systems with a large amount of network traffic.

WAGO Kontakttechnik GmbH & Co. KG Postfach 2880 D-32385 Minden Hansastraße 27 D-32423 Minden Phone: +49/5 71/8 87 – 0 Fax: +49/5 71/8 87 – 1 69 E-Mail: [email protected] Internet: http://www.wago.com