Remote access to the WAGO Ethernet controller/coupler using an ...
Remote access to the WAGO Ethernet controller/coupler using an ...
Remote access to the WAGO Ethernet controller/coupler using an ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
WLAN Access <strong>to</strong> <strong>the</strong><strong>WAGO</strong> E<strong>the</strong>rnet ControllerUsing <strong>an</strong> iPod TouchApplication NoteLast Update: 30.03.11
2 • GeneralCopyright 2011 by <strong>WAGO</strong> Kontakttechnik GmbHAll rights reserved.<strong>WAGO</strong> Kontakttechnik GmbHH<strong>an</strong>sastraße 27D-32423 MindenPhone: +49 (0) 571/8 87 – 0Fax: +49 (0) 571/8 87 – 1 69E-mail: info@wago.comWeb: http://www.wago.comTechnical SupportPhone: +49 (0) 571/8 87 – 7 77Fax: +49 (0) 571/8 87 – 87 77E-mail: tcba@wago.comEvery conceivable measure has been taken <strong>to</strong> ensure <strong>the</strong> accuracy <strong>an</strong>d completenessof this documentation. However, as errors c<strong>an</strong> never be fully excluded,we always appreciate <strong>an</strong>y information or suggestions for improving<strong>the</strong> documentation.We wish <strong>to</strong> point out that <strong>the</strong> software <strong>an</strong>d hardware names, as well as <strong>the</strong>trademarks of comp<strong>an</strong>ies used <strong>an</strong>d/or mentioned in <strong>the</strong> present m<strong>an</strong>ual, aregenerally protected by trademark or patent law.Application Note
Contents • 3TABLE OF CONTENTS1 Import<strong>an</strong>t Notes ......................................................................................... 41.1 Legal Principles .....................................................................................41.1.1 Copyright ...............................................................................................41.1.2 Personnel Qualification..........................................................................41.1.3 Intended Use ..........................................................................................41.2 Scope of Validity ................................................................................... 51.3 Symbols .................................................................................................52 Description.................................................................................................. 63 Material....................................................................................................... 64 Set-Up..........................................................................................................75 Program Description ................................................................................. 85.1 CoDeSys Program..................................................................................85.2 Determining <strong>the</strong> MODBUS Addresses.................................................. 85.3 Visualization Interface.........................................................................106 iPod Configuration .................................................................................. 116.1 WLAN Settings....................................................................................116.2 ScadaMobile App ................................................................................ 126.3 Communication Settings...................................................................... 136.4 Processing <strong>the</strong> Configuration File .......................................................136.5 Operating Interface .............................................................................. 156.6 Access <strong>to</strong> Multiple Controllers ............................................................ 167 Appendix...................................................................................................177.1 Required Files for <strong>WAGO</strong>-I/O-PRO CAA..........................................17Application Note
4 • Import<strong>an</strong>t Notes1 Import<strong>an</strong>t Notes1.1 Legal Principles1.1.1 CopyrightTo ensure quick installation <strong>an</strong>d start-up of <strong>the</strong> units, please carefully read <strong>an</strong>dadhere <strong>to</strong> <strong>the</strong> following information <strong>an</strong>d expl<strong>an</strong>ations.This document, including all figures <strong>an</strong>d illustrations contained <strong>the</strong>rein, is subject<strong>to</strong> copyright protection. Any use of this document that infringes upon <strong>the</strong>copyright provisions stipulated herein is prohibited. Reproduction, tr<strong>an</strong>slation,electronic <strong>an</strong>d pho<strong>to</strong>technical filing/archiving (e.g., pho<strong>to</strong>copying) as well as<strong>an</strong>y amendments require <strong>the</strong> written consent of <strong>WAGO</strong> KontakttechnikGmbH, Minden, Germ<strong>an</strong>y. Non-observ<strong>an</strong>ce will involve <strong>the</strong> right <strong>to</strong> assertdamage claims.<strong>WAGO</strong> Kontakttechnik GmbH reserves <strong>the</strong> right <strong>to</strong> enact ch<strong>an</strong>ges that servetechnical progress.<strong>WAGO</strong> Kontakttechnik GmbH owns all rights arising from <strong>the</strong> gr<strong>an</strong>ting ofpatents or from <strong>the</strong> legal protection of utility patents. Third-party products arealways mentioned without <strong>an</strong>y reference <strong>to</strong> patent rights. Thus, <strong>the</strong> existenceof such rights c<strong>an</strong>not be excluded.1.1.2 Personnel Qualification1.1.3 Intended UseThe use of <strong>the</strong> product detailed in this document is geared exclusively <strong>to</strong> specialistshaving qualifications in PLC programming, electrical specialists orpersons instructed by electrical specialists who are also familiar with <strong>the</strong> validst<strong>an</strong>dards. <strong>WAGO</strong> Kontakttechnik GmbH assumes no liability resulting fromimproper action <strong>an</strong>d damage <strong>to</strong> <strong>WAGO</strong> products <strong>an</strong>d third-party products due<strong>the</strong> disregard of <strong>the</strong> information contained in this document.For each individual application, <strong>the</strong> components are supplied from <strong>the</strong> fac<strong>to</strong>rywith a dedicated hardware <strong>an</strong>d software configuration. Modifications are onlyadmitted within <strong>the</strong> framework of <strong>the</strong> possibilities documented in this document.<strong>WAGO</strong> Kontakttechnik GmbH will be exempted from <strong>an</strong>y liability incase of ch<strong>an</strong>ges in hardware or software as well as <strong>to</strong> non-compli<strong>an</strong>t usage ofcomponents.Please send your requests for modified <strong>an</strong>d new hardware or software configurationsdirectly <strong>to</strong> <strong>WAGO</strong> Kontakttechnik GmbH.Application Note
Import<strong>an</strong>t Notes • 51.2 Scope of ValidityThis application note is based on <strong>the</strong> stated hardware <strong>an</strong>d software from <strong>the</strong>specific m<strong>an</strong>ufacturer, as well as <strong>the</strong> associated documentation. This applicationnote is <strong>the</strong>refore only valid for <strong>the</strong> described installation.New hardware <strong>an</strong>d software versions may need <strong>to</strong> be h<strong>an</strong>dled differently.Please note <strong>the</strong> detailed description in <strong>the</strong> specific m<strong>an</strong>uals.1.3 SymbolsDANGERAlways observe this information <strong>to</strong> protect persons from injury.NOTICEAlways observe this information <strong>to</strong> prevent damage <strong>to</strong> <strong>the</strong> device.NOTEBoundary conditions that must always be observed <strong>to</strong> ensure smooth operation.NoteRoutines or advice for efficient use of a device <strong>an</strong>d software optimization.Additional InformationReferences <strong>to</strong> additional literature, m<strong>an</strong>uals, data sheets <strong>an</strong>d INTERNETpages.Application Note
6 • Description2 DescriptionThis application note describes <strong>the</strong> basic procedures for <strong>access</strong> <strong>to</strong> <strong>the</strong> <strong>WAGO</strong>E<strong>the</strong>rnet Controller 750-8xx or <strong>the</strong> <strong>WAGO</strong> E<strong>the</strong>rnet Coupler 750-3xx <strong>using</strong> <strong>an</strong>iPod Touch. An iPhone c<strong>an</strong> also be used as <strong>an</strong> alternative.The connection is established <strong>using</strong> a WLAN <strong>access</strong> point. The pro<strong>to</strong>col usedis MODBUS TCP.3 MaterialSupplier Qty. Designation Item No.<strong>WAGO</strong> 1 Programmable fieldbus <strong>controller</strong> 750-8xx<strong>WAGO</strong> 1 Digital input module 750-402<strong>WAGO</strong> 1 Digital output module 750-504<strong>WAGO</strong> 1 End terminal block 750-600- 1 iPod Touch- 1 WLAN <strong>access</strong> point- 1 Switch + Patch cableThe following software is also required for programming <strong>an</strong>d commissioning:<strong>WAGO</strong> <strong>WAGO</strong>-I/O-PRO CAA 759-333SweetWilliam ScadaMobile or ScadaMobile LiteAdditional Information:The libraries <strong>an</strong>d documentation used are available at www.wago.com/Service/Downloads/LibrariesAdditional Information:Information about <strong>the</strong> different versions, m<strong>an</strong>uals, <strong>an</strong>d <strong>the</strong> required CSV filetemplates is available at http://www.sweetwilliamau<strong>to</strong>mation.com/Application Note
Set-Up • 74 Set-UpIllus. 4.1: Network set-upThe <strong>controller</strong>s are connected <strong>to</strong> a WLAN <strong>access</strong> point. The network settingsmust be adapted from <strong>the</strong> <strong>access</strong> point <strong>to</strong> <strong>the</strong> <strong>controller</strong>'s IP addresses (seeillus. 4.1).Note:The set-up described is only one example. The set-up c<strong>an</strong> be exp<strong>an</strong>ded asrequired by <strong>the</strong> respective application.Application Note
8 • Program Description5 Program Description5.1 CoDeSys ProgramIllustration 5.1 shows <strong>the</strong> set-up of <strong>an</strong> example program in <strong>the</strong> CoDeSys software.Illus. 5.1: CoDeSys programThe declared variables are distinguished according <strong>to</strong> bit <strong>an</strong>d register <strong>access</strong><strong>an</strong>d are referenced at <strong>the</strong> corresponding flag addresses. These flags c<strong>an</strong> <strong>the</strong>nbe read <strong>an</strong>d described <strong>using</strong> corresponding MODBUS addresses.5.2 Determining <strong>the</strong> MODBUS AddressesThe MODBUS addresses for bit <strong>an</strong>d register <strong>access</strong>, which are a function ofcommunication direction, are listed in <strong>the</strong> following tables.NoteThe included tables show only <strong>an</strong> excerpt of <strong>the</strong> MODBUS communicationaddresses. The complete tables are available in <strong>the</strong> m<strong>an</strong>uals for <strong>the</strong> <strong>controller</strong><strong>an</strong>d <strong>coupler</strong> in <strong>the</strong> chapter “MODBUS Access Mapping”.Application Note
Pos: 116.22/All series (general modules)/Fieldbus communication/MODBUS/MODBUS register mapping - bit read <strong>access</strong> (<strong>using</strong> FC1, FC2) (Controller, x41) @ 3\mod_1235394387921_6.doc @ 27586 @Pos: 116.21/All series (general modules) Fieldbus communication/MODBUS/MODBUS register mapping - section Coil services, bit <strong>access</strong> @ 3\mod_125393917265_6.doc @ 27582 @@Pos: 116.22/All series (general modules)/Fieldbus communication/MODBUS/MODBUS register mapping - bit read <strong>access</strong> (<strong>using</strong> FC1, FC2) (Controller, x41) @ 3\mod_1235394387921_6.doc @ 27586 @Program Description • 9Bit Read AccessMODBUS address Memory areaDescription[dez] [hex]0...511 0x0000...0x01FF Physical input area (1) First 512 digital inputs512...1023 0x0200...0x03FF Physical output area (1) First 512 digital outputs4096...8191 0x1000...0x1FFF %QX256.0...%QX511.15 PFC-OUT-AreaVolatile PLC output variables12288...32767 0x3000...0x7FFF %MX0...%MX1279.15 Flag areaPos: 116.23/All series (general modules)/Fieldbus communication/MODBUS/MODBUS register mapping - bit write <strong>access</strong> (<strong>using</strong> FC5, FC15) (Controller, x41) @ 3\mod_1235398841703_6.doc @ 27594 @Bit Write AccessMODBUS address Memory areaDescription[dez] [hex]512...1023 0x0200...0x03FF Physical output area (1) First 512 digital outputs8192...12287 0x2000...0x2FFF %IX256.0...%IX511.15 PFC-IN-AreaVolatile PLC input variables12288...32767 0x3000...0x7FFF %MX0...%MX1279.15 Flag areaRegister Read AccessMODBUS address IEC-61131-Memory area[dez] [hex] address0...255 0x0000...0x00FF %IW0...%IW255 Physical input area (1)256...511 0x0100...0x01FF %QW256...%QW511 PFC-OUT-AreaVolatile PLC output variables512...767 0x0200...0x02FF %QW0...%QW255 Physical output area (1)12288...24575 0x3000...0x5FFF %MW0...%MW12287 Flag areaPos: 116.20 / All series (general modules)/Fieldbus communication /MODBUS register mapping - register <strong>access</strong> (<strong>using</strong> FC6, FC16, FC22, FC23) (Controller, x41) @ 3\mod_1235392386281_6.doc @ 27579 @Register Write AccessPos: 116.21/All series (general modules) Fieldbus communication/MODBUS/MODBUS register mapping - section Coil services, bit <strong>access</strong> @ 3\mod_125393917265_6.doc @ 27582 @@MODBUS address IEC-61131-Memory area[dez] [hex] address512...767 0x0200...0x02FF %QW0...%QW255 Physical output area (1)768...1023 0x0300...0x03FF %IW256...%IW511 PFC-IN-AreaVolatile PLC input variables12288...24575 0x3000...0x5FFF %MW0...%MW12287 Flag areaApplication Note
10 • Program Description5.3 Visualization InterfaceThe declared variables are ch<strong>an</strong>ged or displayed <strong>using</strong> elements in <strong>the</strong> visualizationinterface (see illus. 5.2).Illus. 5.2: Visualization with examplesNote:<strong>WAGO</strong>-I/O-PRO CAA visualization requires that <strong>the</strong> PC is connected <strong>to</strong> <strong>the</strong><strong>WAGO</strong> fieldbus <strong>controller</strong>. Depending on <strong>the</strong> fieldbus <strong>controller</strong> used, twooptions are available.The first option is available for all types of fieldbus <strong>controller</strong>s. Here, connection<strong>to</strong> <strong>the</strong> fieldbus <strong>controller</strong>'s service interface is established via 750-923Communication Cable. With ETHERNET fieldbus <strong>controller</strong>s, connection isalso possible <strong>using</strong> <strong>the</strong> ETHERNET interface.Application Note
iPod Configuration • 116 iPod Configuration6.1 WLAN SettingsThe first step is <strong>to</strong> establish WLAN (WiFi) communication. In order <strong>to</strong> accomplishthis, <strong>the</strong> WLAN <strong>access</strong> point must be established <strong>an</strong>d activated in <strong>the</strong>iPod settings (see illus. 6.1).Illus. 6.1: WiFi network settingsApplication Note
12 • iPod ConfigurationThe iPod's Safari browser c<strong>an</strong> be used for a first communication test. Enter <strong>the</strong><strong>controller</strong>'s IP address in Safari's address bar (see illus. 6.2). For example:“192.168.1.81”.Illus. 6.2: Safari web browserIf <strong>the</strong> WLAN communication functions between <strong>the</strong> iPod <strong>an</strong>d <strong>the</strong> <strong>WAGO</strong> <strong>controller</strong>,<strong>the</strong> <strong>WAGO</strong> WebBasedM<strong>an</strong>agement for <strong>the</strong> corresponding ETHERNET<strong>controller</strong> will be displayed on <strong>the</strong> iPod.NoteThe browser does not support JAVA, <strong>the</strong>refore, web pages created withCoDeSys c<strong>an</strong>not be displayed!6.2 ScadaMobile AppIn <strong>the</strong> next step, <strong>the</strong> application (app) “ScadaMobile” must be loaded on <strong>the</strong>iPod.As <strong>an</strong> alternative, “ScadaMobile Lite” c<strong>an</strong> also be used. This is a ‘lite’ versionwhich c<strong>an</strong> communicate up <strong>to</strong> 4 data points.In <strong>the</strong> example, “ScadaMobile” version 1.5.1 was used. The m<strong>an</strong>ual is availableat <strong>the</strong> following homepage:http://www.sweetwilliamau<strong>to</strong>mation.comApplication Note
iPod Configuration • 136.3 Communication SettingsIn <strong>the</strong> “ScadaMobile” app, a few basic communication settings have <strong>to</strong> be setin <strong>the</strong> “Settings” tab. All of <strong>the</strong> following steps c<strong>an</strong> be also be found in <strong>the</strong>“ScadaMobile User M<strong>an</strong>ual”.Illus. 6.3: Communication settings in ScadaMobileIllustration 6.3 shows <strong>the</strong> typical settings for MODBUS communication. The<strong>WAGO</strong> <strong>controller</strong>'s IP address c<strong>an</strong> be entered under “Default Connection”,which should be considered a st<strong>an</strong>dard setting. In addition, <strong>the</strong> following settingsare required: Local Port: 502 <strong>Remote</strong> Port: 502 Address: e.g.: 192.168.1.816.4 Processing <strong>the</strong> Configuration FileThe file server is launched <strong>using</strong> <strong>the</strong> “File Server” tab, <strong>an</strong>d enables <strong>the</strong> exch<strong>an</strong>geof data between <strong>the</strong> PC <strong>an</strong>d <strong>the</strong> iPod. After starting, <strong>the</strong> server addressis displayed (see illus. 6.4). This address is entered in Internet Explorer <strong>an</strong>ddisplays <strong>the</strong> CSV configuration files saved on <strong>the</strong> iPod. If no files are displayed,<strong>the</strong> templates c<strong>an</strong> be loaded <strong>using</strong> “Load Examples”. Then select <strong>the</strong>file“DataTypesModbusES.csv” <strong>an</strong>d save it <strong>to</strong> <strong>the</strong> PC.Application Note
14 • iPod ConfigurationIllus. 6.4: Turning on <strong>the</strong> file server on <strong>the</strong> iPodThe saved template c<strong>an</strong> now be opened <strong>an</strong>d processed <strong>using</strong> Excel. The entriesshould be adapted <strong>to</strong> <strong>the</strong> example program shown in chapter 6. The columnshave <strong>the</strong> following me<strong>an</strong>ing:Column A: Variable name, as it should be displayed in <strong>the</strong> iPodColumn B: Data type of <strong>the</strong> CoDeSys variablesColumn C: MODBUS r<strong>an</strong>ge <strong>an</strong>d MODBUS addressColumn D: Additional parameters (appear<strong>an</strong>ce, headers, <strong>an</strong>d commentary)When entering <strong>the</strong> MODBUS address in column C, you must pay attention <strong>to</strong><strong>the</strong> fact that in general, <strong>an</strong> offset of 1 must be added <strong>to</strong> <strong>the</strong> addresses documentedin <strong>the</strong> <strong>WAGO</strong> m<strong>an</strong>ual. If 32bit variables are entered (e.g. DINT orREAL), <strong>the</strong> attribute “word_swap:=true;” must be entered one time in columnD (see illus. 6.5). After all ch<strong>an</strong>ges have been made, <strong>the</strong> file should be saved<strong>using</strong> a different name.Illus. 6.5: Example of a configuration file (<strong>WAGO</strong>_iPod_Example_1.csv)NoteMore complete documentation <strong>an</strong>d fur<strong>the</strong>r details about <strong>the</strong> entry possibilitiesare available in <strong>the</strong> “ScadaMobile M<strong>an</strong>ual”.Application Note
iPod Configuration • 15In <strong>the</strong> file server, select <strong>an</strong>d upload <strong>the</strong> processed file <strong>using</strong> “File Upload”.This file will <strong>the</strong>n have <strong>to</strong> be actively switched on in ScadaMobile (see illus.6.6).Illus. 6.6: Selected file6.5 Operating InterfaceThe display is turned on <strong>using</strong> <strong>the</strong> “Connections” tab. The green LED light indicates<strong>an</strong> error-free MODBUS connection. The variables specified in <strong>the</strong>CSV file are displayed in <strong>the</strong> “Home” tab. The variables c<strong>an</strong> be modified withwrite <strong>access</strong> (see illus. 6.7).Illus. 6.7: Operating interfaceApplication Note
16 • iPod Configuration6.6 Access <strong>to</strong> Multiple ControllersMultiple <strong>WAGO</strong> <strong>controller</strong>s c<strong>an</strong> be <strong>access</strong>ed <strong>using</strong> ScadaMobile. A separateCSV file must be generated for each <strong>controller</strong>. In each file, <strong>the</strong> attribute “local_ip:=x.x.x.x”must be present once in column D (see illus. 6.8). Files thatdo not contain this attribute will be assigned <strong>to</strong> <strong>the</strong> <strong>controller</strong> <strong>using</strong> <strong>the</strong> IP addressfrom <strong>the</strong> st<strong>an</strong>dard settings.“Illus. 6.8: Configuration file with IP address (Wago_iPod_Example_2.csv)The second CSV file is also uploaded <strong>to</strong> <strong>the</strong> file server <strong>an</strong>d activated in <strong>the</strong>“Files” tab with a check. The “Tags” from all active files are displayed under“Home” (see illus. 6.9). The order of <strong>the</strong> tags within <strong>the</strong> sections c<strong>an</strong> bech<strong>an</strong>ged <strong>using</strong> <strong>the</strong> “ord” attribute in <strong>the</strong> CSV file.Illus. 6.9: Operating interface for two CSV filesApplication Note
Appendix • 177 Appendix7.1 Required Files for <strong>WAGO</strong>-I/O-PRO CAANo special libraries are required for <strong>the</strong>se applications.LibraryDescription- -Application Note
<strong>WAGO</strong> Kontakttechnik GmbHPO Box 2880 • D-32385 MindenH<strong>an</strong>sastraße 27 • D-32423 MindenPhone: +49 (0) 571/8 87 – 0Fax: +49 (0) 571/8 87 – 1 69E-mail: info@wago.comOnline: