Sei sulla pagina 1di 16

Ethernet/IP Comms between

a WAGO 750-841 and a Mettler


Toledo JAGXTREME Terminal

Application note

A203000, English
Version 1.0.0

2 General

Copyright 2004 by WAGO Kontakttechnik GmbH


All rights reserved.

WAGO Kontakttechnik GmbH


Hansastrae 27
D-32423 Minden
Phone: +49 (0) 571/8 87 0
Fax:
+49 (0) 571/8 87 1 69
E-Mail: info@wago.com
Web:

http://www.wago.com

Technical Support
Phone: +49 (0) 571/8 87 5 55
Fax:
+49 (0) 571/8 87 85 55
E-Mail: support@wago.com

Every conceivable measure has been taken to ensure the correctness and completeness of this documentation. However, as errors can never be fully excluded we would appreciate any information or ideas at any time.
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 trademark or patent protected.

Application note
A203000

Table of Contents

TABLE OF CONTENTS
1 Important comments ................................................................................. 4
1.1
Legal principles...................................................................................... 4
1.1.1 Copyright ............................................................................................... 4
1.1.2 Personnel qualification .......................................................................... 4
1.1.3 Intended use ........................................................................................... 4
1.2
Range of validity.................................................................................... 5
1.3
Symbols ................................................................................................. 5
2

Description.................................................................................................. 6

Reference Material .................................................................................... 6

4 Solution ....................................................................................................... 7
4.1
Configuring the IP Addresses of the Mettler Toledo JAGXTREME.... 7
4.2
Enabling the WAGO 750-841 Controller for Ethernet/IP
Communications .................................................................................. 10
4.3
Programming the WAGO 750-841 Controller to send unscheduled
messages to the JAGXTREME............................................................ 11
4.4
Assigning the PLC Configuration........................................................ 13
4.5
Downloading The Project .................................................................... 14

Application note
A203000

Important comments

1 Important comments
To ensure fast installation and start-up of the units described in this manual,
we strongly recommend that the following information and explanation is
carefully read and adhered to.

1.1 Legal principles


1.1.1 Copyright
This manual is copyrighted, together with all figures and illustrations contained therein. Any use of this manual which infringes the copyright provisions stipulated herein, is not permitted. Reproduction, translation and electronic and photo-technical archiving and amendments require the written consent of WAGO Kontakttechnik GmbH. Non-observance will entail the right of
claims for damages.

1.1.2 Personnel qualification


The use of the product detailed in this manual 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 declines all liability resulting from
improper action and damage to WAGO products and third party products due
to non-observance of the information contained in this manual.

1.1.3 Intended use


For each individual application, the components supplied are to work with a
dedicated hardware and software configuration. Modifications are only admitted within the framework of the possibilities documented in the manuals. 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.
Please direct any requirements pertaining to a modified and/or new hardware
or software configuration directly to WAGO Kontakttechnik GmbH.

Application note
A203000

Important comments

1.2 Range of validity


This application note is based on the stated hardware and software of the specific manufacturer as well as the correspondent 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 Symbols
Danger
Always observe this information to protect persons from injury.
Warning
Always observe this information to prevent damage to the device.
Attention
Marginal conditions must always be observed to ensure smooth operation.
ESD (Electrostatic Discharge)
Warning of damage to the components by electrostatic discharge. Observe
the precautionary measure for handling components at risk.
Note
Routines or advice for efficient use of the device and software optimisation.
More information
References to additional literature, manuals, data sheets and INTERNET
pages

Application note
A203000

Description

2 Description
The purpose of this document is to provide an example of interfacing the
WAGO 750-841 Ethernet Controller with a Mettler Toledo JAGXTREME
terminal using the Ethernet/IP protocol. In this example, the WAGO 750-841
communicates to the JAGXTREME via unscheduled messaging (also known
as explicit messaging). The JAGXTREME responds to unscheduled messages originated by the WAGO 750-841, allowing the 750-841 to configure
and read the JAGXTREMEs batch process data.

3 Reference Material
- Mettler Toledo JAGXTREME w/ ControlNet Interface Card
- WAGO 750-841 Ethernet Controller
- CoDeSys (WAGO-IO-PRO CAA) Version 2.3.2.7 Programming Software

NOTE: This procedure assumes that the WAGO 750-841 contains a valid IP
address and it is installed on a working network, along with the JAGXTREME
and the Programming Terminal. If necessary, refer to WAGOs Application
Note A202900 for assigning a static IP address to the WAGO 750-841.

Application note
A203000

Solution

4 Solution
There are three main steps in setting up this system:
1) Configuring the IP Addresses of the Mettler Toledo JAGXTREME
2) Enable the WAGO 750-841 Controller for Ethernet/IP Communications
3) Programming the WAGO 750-841 Controller to send unscheduled messages to the JAGXTREME

4.1 Configuring the IP Addresses of the Mettler Toledo


JAGXTREME
The Mettler Toledo JAGXTREME with ControlNet interface card has two Ethernet ports. The Ethernet/IP port, located on the ControlNet interface card,
is configured through the internal webpages of the JAGXTREME. To access
these webpages, it is first necessary to set the IP address of the
JAGXTREMEs standard Ethernet port. This is accomplished via the front
keypad of the JAGXTREME.
To configure the IP address of the JAGXTREMEs standard Ethernet port
via the front keypad:
1) Turn on JAGXTREME, and wait until it completes its initialization sequence.
2) Push the F key to enter Setup mode.

3) Push the Enter key.

4) Press the Scroll Menu key repeatedly, until the text Config. Network is
displayed.

5)Press the Enter key so the text Ethernet is displayed.

Application note
A203000

Solution

6) Press the Enter key again. The MAC ID is displayed.


7) Press the Enter key again. The IP address is displayed.
8) Enter the new IP address using the numeric keypad. To enter the IP address 192.168.0.12, push the key sequence 1 9 2 1 6 8 0 0 0 0 1 2.
9) Press the Enter key again. The Subnet mask is displayed.
10) Change the Subnet mask (if necessary) using the numeric keypad. To enter the Subnet mask 255.255.0.0,push the key sequence 2 5 5 2 5 5 0 0 0 0
0 0.
11) Press the Enter key again. The Gateway address is displayed.
12) Change the Gateway address (if necessary) using the numeric keypad.
13) Press the ESC key repeatedly, until the text Exit Setup? is displayed.

14) Press the Enter key. The new settings are now in place.
Once the IP Address of the standard ethernet port is set, it is now possible to
configure the IP address of the Ethernet/IP port. This is done using a browser
to access the internal webpages of the JAGXTREME.
To configure the IP address of the JAGXTREMEs Ethernet/IP port via a
browser:
15) Run the browser utility (e.g. Microsofts Internet Explorer) on the programming terminal.
16) In the address bar, enter the IP address of the JAGXTREMEs standard
Ethernet port, and hit Enter.

The JAGXTREMEs internal webpage should appear. If it does not appear,


check that you have an Ethernet link to the JAGXTREMEs standard Ethernet port, and the IP address of the programming terminal is compatible with
the IP address of the JAGXTREME.

Application note
A203000

Solution

17) Click on the Communication icon in the left frame.

18) Click ControlNet PLC Interface.


19) If the JAGXTREME is in Run Mode, put it in Program Mode by clicking
the Program Mode button.

20) Change the IP Address, Subnet mask, and Gateway as required. Click
Save Changes when finished.

21) Put the JAGXTREME back in Run Mode by clicking the Run Mode
button.

The JAGXTREME Ethernet/IP port is now ready to communicate on the


Ethernet/IP network.

Application note
A203000

10

Solution

4.2 Enabling the WAGO 750-841 Controller for Ethernet/IP


Communications
The Ethernet/IP protocol is not recognized by default by the 750-841 Ethernet
Controller, so it is necessary to enable this protocol. This is done using a
browser to access the internal webpages of the 750-841.
To enable the 750-841 for Ethernet/IP communications using a browser:
1) Run the browser utility (e.g. Microsofts Internet Explorer) on the programming terminal.
2)In the address bar, enter the IP address of the 750-841 Ethernet Controller,
and hit Enter.

The 750-841s internal webpage should appear. If it does not appear, check
that you have an Ethernet link to the 750-841s Ethernet port, and the IP address of the programming terminal is compatible with the IP address of the
750-841.
3) Click Port in the left browser frame. The following will appear:

4) Enter the following:


User Name:admin
Password: wago
Click OK. The Port configuration frame will appear.
Application note
A203000

Solution

11

5) In this frame, you must check Ethernet IP as enabled. You may enable
or disable other protocols at this time as well. Click SUBMIT when finished.
The WAGO 750-841 Ethernet Controller is now enabled for Ethernet/IP
communications.

4.3 Programming the WAGO 750-841 Controller to send unscheduled messages to the JAGXTREME
The 750-841 Ethernet Controller can be programmed to send unscheduled
messages to other Ethernet/IP devices using the CoDeSys software development tool. The library EML.LIB contains the function block that will be used
for sending and receiving Ethernet/IP messages. Make sure the CoDeSys development tool and the library EML.LIB are installed on the programming
terminal before proceeding.
To program the 750-841 Controller to send unscheduled messages to the
JAGXTREME:
1) Start CoDeSys.
2) From the top menu bar, select File..New. You may be asked if youd like
to save your existing program. Answer accordingly.
A Target Settings window will appear. Select the appropriate target device for
your application. Several configuration options will appear. Click OK to continue.
A window will appear labeled New POU.

3) Complete the New POU information as follows:


Name of the new POU: PLC_PRG
Type of the POU:
Program
Language of the POU: LD
Click OK to continue. The Variable Editor (upper) and Logic Editor (lower)
windows will be displayed.
Application note
A203000

12

Solution

4) In the Variable Editor window, declare the project variables so they appear
as shown below. These variables can be declared by simply typing the text as
it is shown.

The function block that handles the Ethernet/IP communications,


EML_UCMM_REQ, will be inserted in the program logic. Before it can be
inserted, the library EML.LIB must be included in the project.
5) From the top menu bar, select Window..Library Manager. Again from
the top menu bar, select Insert..Additional Library. Select the library
EML.LIB, and hit Enter.
6) In the left window, double-click PLC_PRG to return to the project logic
editor.
7) Click on the empty rung of ladder logic. From the top menu bar, select Insert..Box with EN. The AND operator box will appear.
Click on the word AND, replace it with the word EML_UCMM_REQ, and
hit Enter.
Click on the ??? on the top of the EML_UCMM_REQ operator box.
Type in JAGXTREME, and hit Enter.
Replace or delete the remainder of the ??? fields, until the rung of logic appears as follows:

Application note
A203000

Solution

13

To insert the circle in front of the ENABLE input, right-click on the short line
in front of the input, and select NEGATE from the menu.
To delete the tail at the end of the CONFIRM output, click on the right end
of the tail, and hit Delete.
8) Check your project for errors, by selecting Project..Build from the top
menu bar. At this point, there should be no errors in the project. Error messages will be reported in the bottom window below the logic editor window.
All errors must be corrected before a project can be downloaded to the controller.

4.4 Assigning the PLC Configuration


Before the project can be executed, it is necessary to assign the PLC Configuration of I/O modules.
9) Begin by clicking the Resources tab at the bottom of the Project Organizer
window.

10) Double-Click PLC Configuration in the Project Organizer window, then


Double-Click Fieldbus Assignment in the window to the right, as shown below.

Application note
A203000

14

Solution

11) Repeatedly Right-Click on Controller[FIX], and select Append Module


from the menu. Each time you do, the text Module[VAR] will be added as a
sub-item. Do this for each I/O module on your node of I/O. (Do not append
modules for the 750-841 Controller or the 750-600 End Module). When finished, the configuration should appear as shown below if your node of I/O
contains four modules.

4.5 Downloading The Project


A communications channel needs to be configured for communicating with
the 750-841. The following example shows how to setup a communications
channel between a computer with an ethernet adapter and a 750-841 WAGO
Ethernet Controller.
1) From the top menu bar, select Online..Communication Parameters to
configure the communications channel to the 750-841.
2) Click New. The following window will appear:

3) In the Name field, type in a unique name for the communications channel.

Application note
A203000

Solution

15

4) In the selection list, select Tcp/Ip as the communications driver. Click


OK. A window similar to the one below will appear:

5) Double-click on the word localhost. An entry field will appear. Enter in


the IP address of the WAGO 750-841, and hit Enter.
6) Click OK. (Be sure to hit Enter before clicking OK.)
7) You should now be ready to Login to the 750-841 and download a project.
Click Online..Login. The window below will appear, prompting to download
a new program.

8) Click Yes to download the program.


9)Select Online..Run from the top menu bar to begin the execution of the
project.
This project will read the Scale Weight Object of the JAGXTREME terminal.
The Gross Weight will be reported back, and can be viewed in the byte array
Data. The Scale Weight Object was read, because the values 0x64, 0x01,
and 0x01 were assigned to the CLASS, INST (Instance), and ATTR (Attribute) inputs of the EML_UCMM_REQ function block. The function block was
instructed to read this object, because the SRV (Service) input was set to
EML_GET_ATTR. By setting the SRV input to EML_SET_ATTR, the function block would be instructed to write to an object. Other data objects within
the JAGXTREME can be read from or written to by providing the appropriate
Class, Instance, and Attribute to the EML_UCMM_REQ function block.
For a complete listing of objects accessible via Ethernet/IP, reference the Mettler Toledo CIP Interface Technical Manual.
Application note
A203000

WAGO Kontakttechnik GmbH


Postfach 2880 D-32385 Minden
Hansastrae 27 D-32423 Minden
Phone:
05 71/8 87 0
Telefax: 05 71/8 87 1 69
E-Mail:
info@wago.com
Internet:

http://www.wago.com

WAGO Corporation USA


N120W 19129 Freistadt Road
PO Box 1015
Germantown, Wi 53022
Phone:
1-262-255-6333
Fax:
1-262-255-3232
Internet:

http://www.wago.com

Call Toll Free: 1-800-DIN-Rail


(346-7246)

Potrebbero piacerti anche