Preface SIMATIC Industrial Ethernet Module (IEM) SIMATIC Industrial Ethernet Module (IEM) Manual 1 Product Description Ex___________ 2 Installation ______________ Configuration - Basic USB Flash Drive Operation 3 ______________ Configuration MBUS/Ethernet Network Settings 4 ______________ Configuration - IEM & APACS+ Time Sync 5 ______________ Configuration - APACS+ Peer-to-Peer Communications 6 ______________ Configuration - S7 to APACS+ Communications 7 ______________ Communications Blocks GW_SEND and GW_REC 8 ______________ 9 Redundancy ______________ 10 NIM32 Operation ______________ Industrial Ethernet Module Diagnostics 11 ______________ 06/2012 A5E00322186-08 Legal information Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger. DANGER indicates that death or severe personal injury will result if proper precautions are not taken. WARNING indicates that death or severe personal injury may result if proper precautions are not taken. CAUTION with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken. CAUTION without a safety alert symbol, indicates that property damage can result if proper precautions are not taken. NOTICE indicates that an unintended result or situation can occur if the corresponding information is not taken into account. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage. Qualified Personnel The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards. Proper use of Siemens products Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems. The permissible ambient conditions must be adhered to. The information in the relevant documentation must be observed. Trademarks All names identified by (R) are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG Industry Sector Postfach 48 48 90026 NURNBERG GERMANY A5E00322186-08 06/2012 Copyright (c) Siemens AG 2012. Technical data subject to change Preface Purpose of this Document This document provides configuration and diagnostic instructions for the Industrial Ethernet Module (IEM).This document is intended for software and hardware engineers responsible for upgrading a plant to PCS 7 or for expanding a plant using new S7-400 Controllers. Required Basic Knowledge Use of this product requires a general knowledge of the field of automation engineering and some knowledge of PCS 7 or APACS+. In addition, staff should know how to use computers under the Microsoft Windows 2000, Microsoft Windows XP and Microsoft Windows 7 operating systems. Where is this Manual valid? This manual is valid for the IEM 2.0, 2.1 and V3.0. SIMATIC Box PC 620 IEM 6EQ2010-1AA00-5XX0 http://support.automation.siemens.com/WW/view/en/27609866 SIMATIC Box PC 627 IEM 6EQ2020-0AA00-5XX0 http://support.automation.siemens.com/WW/view/en/27609871 SIMATIC Box PC 627B IEM 6EQ2020-0AB12-5XX0 http://support.automation.siemens.com/WW/view/en/32824811 SIMATIC Box PC 627C IEM 6EQ2020-0AC03-5XX0 http://support.automation.siemens.com/WW/view/en/60453025 Certification UL508 CE Labelling CE Training Centers Siemens Technical Training Centers provides extensive training for all levels of plant personnel to ensure optimal performance from PCS 7 control systems. Classes include extensive hands-on activities using appropriate equipment, making the training directly and immediately applicable. Information is available online (http://www.sitrain.com). Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 3 Preface Siemens also offers a number of training courses to familiarize you with the SIMATIC S7 automation system. Please contact your regional training center or our central training center in D 90327 Nuremberg, Germany, for details: Telephone: +49 (911) 895-3200 or see the Internet site (http://www.sea.siemens.com/sitrain). A&D Technical Support Worldwide, available 24 hours a day: 13/4UQEHUJ -RKQVRQ&LW\ %HLMLQJ United States: Johnson City, TN Worldwide: Nurnberg Asia / Australia: Beijing Technical Support and Authorization Technical Support Technical Support and Authorization Local time: Monday to Friday 24 hours a day, 365 days a year Local time: Monday to Friday 8:00 AM to 5:00 PM Phone:+49 (180) 5050-222 8:00 AM to 5:00 PM Telephone:+1 (423) 262 5710 Fax:+49 (180) 5050-223 Phone:+86 10 64 75 7575 or +1 (800) 333-7421 (USA only) Email for technical support (mailto:ad.support@siemens.com). Fax:+86 10 64 74 7474 Fax:+1 (423) 262 2231 An Internet site is available for support requests (http://www.siemens.com/automation/s upport-request). GMT:+1:00 Email for technical support (mailto:ad.support.asia@siemens.com) . GMT:+8:00 Automation and Drives Service and Support International (http://www.siemens.com/automation/service&support) The languages of the SIMATIC Hotlines and the authorization hotline are generally German and English. 4 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Table of contents Preface ...................................................................................................................................................... 3 1 2 3 4 Product Description ................................................................................................................................... 9 1.1 Product Components .....................................................................................................................9 1.2 Technical Specifications ..............................................................................................................10 Installation ............................................................................................................................................... 11 2.1 2.1.1 Basic installation procedure .........................................................................................................11 Cable Part Numbers for IEM installation ......................................................................................12 2.2 Replacing an IEM .........................................................................................................................13 Configuration - Basic USB Flash Drive Operation ................................................................................... 15 3.1 Startup with Saved Data in the Flash Memory ............................................................................15 3.2 Configuring the IEM with a USB Flash Drive ...............................................................................15 3.3 Storing the Current Configuration ................................................................................................16 3.4 3.4.1 3.4.2 Implementing the New Configuration ...........................................................................................17 IEM Startup Configuration Change Processing ...........................................................................17 IEM Runtime Configuration Change Processing .........................................................................18 3.5 Audible Beep Code Description ...................................................................................................19 Configuration - MBUS/Ethernet Network Settings.................................................................................... 23 4.1 Global Configuration by Text File on a USB Flash Drive during Power Up .................................23 4.2 Default Configuration ...................................................................................................................28 4.3 Configuring the IEM for Ethernet and MBUS Communications ...................................................29 5 Configuration - IEM & APACS+ Time Sync ............................................................................................. 33 6 Configuration - APACS+ Peer-to-Peer Communications ......................................................................... 37 7 6.1 IEM Connection Tables Setup .....................................................................................................39 6.2 Using the CONNECT Block with GW_SEND and GW_REC Blocks ...........................................42 6.3 6.3.1 6.3.2 GW_SEND and GW_RCV Blocks ................................................................................................43 GW_SEND ...................................................................................................................................44 GW_REC......................................................................................................................................45 6.4 Example: M-Net to Ethernet Upgrade Procedure ........................................................................45 Configuration - S7 to APACS+ Communications ..................................................................................... 51 7.1 Hardware Component Configuration in a STEP 7 Project ...........................................................51 7.2 Setting up S7 Stations .................................................................................................................51 7.3 7.3.1 7.3.2 Adding the IEM to a PCS 7 project ..............................................................................................51 Ensuring Proper Hardware Component Profiles..........................................................................51 Adding an IEM in SIMATIC Manager ...........................................................................................55 7.4 Ethernet Configuration .................................................................................................................56 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 5 Table of contents 8 9 10 6 7.5 Configuration of Connections in STEP 7 .................................................................................... 58 7.6 Configuring the system to exchange data between APACS+/ QUADLOG and PCS 7 ............. 59 Communications Blocks - GW_SEND and GW_REC .............................................................................. 65 8.1 8.1.1 8.1.2 8.1.3 Overview ..................................................................................................................................... 65 Online Configuration ................................................................................................................... 65 Common Features of the Send Function Block .......................................................................... 66 Common Features of the Receive Function Block ..................................................................... 66 8.2 APACS+/QUADLOG GW_SEND Function Block ....................................................................... 67 8.3 APACS+/QUADLOG GW_REC Function Block ......................................................................... 71 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 S7 GW_SEND Function Block (FB 598) ..................................................................................... 78 Description .................................................................................................................................. 78 Operating Principle ...................................................................................................................... 80 Performance Considerations....................................................................................................... 80 H-Systems Considerations.......................................................................................................... 81 Error Handling ............................................................................................................................. 82 8.5 8.5.1 8.5.2 8.5.3 S7 GW_REC Function Block (FB 599) ....................................................................................... 82 Description .................................................................................................................................. 82 Operating Principle ...................................................................................................................... 84 Error Handling ............................................................................................................................. 86 Redundancy ............................................................................................................................................ 89 9.1 Configuring Redundancy for NIM32 Operation ........................................................................... 89 9.2 Configuring Redundancy for IEM2IEM Operation ...................................................................... 89 9.3 Configure the GW_SEND and GW_REC Blocks for Redundancy in ACM1 ............................... 90 9.4 Configure the GW_SEND and GW_REC Blocks for Redundancy in ACM5 ............................... 90 9.5 9.5.1 9.5.2 9.5.3 Redundancy Connection Health ................................................................................................. 91 Gateway.Ethernet.Quality Data Tag ........................................................................................... 91 Gateway.MBI.Quality Data Tag .................................................................................................. 91 Ways to Implement Data Tags .................................................................................................... 91 NIM32 Operation ..................................................................................................................................... 95 10.1 10.1.1 10.1.2 10.1.3 Introduction ................................................................................................................................. 95 Product Description ..................................................................................................................... 95 Capacity ...................................................................................................................................... 95 Compatibility ................................................................................................................................ 96 10.2 Operation..................................................................................................................................... 96 10.3 10.3.1 10.3.2 10.3.3 10.3.4 Configuration ............................................................................................................................... 97 Hosts File .................................................................................................................................... 97 Use of NIM Names ...................................................................................................................... 98 LMHOSTS File ............................................................................................................................ 98 Settings for Client Nodes ............................................................................................................ 99 10.4 10.4.1 10.4.2 10.4.3 10.4.4 10.4.5 User Interface ............................................................................................................................ 100 User Interface Startup ............................................................................................................... 100 User Display .............................................................................................................................. 100 Connection List ......................................................................................................................... 103 Status History Window .............................................................................................................. 107 Configuration ............................................................................................................................. 108 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Table of contents 10.5 10.5.1 10.5.2 10.5.3 11 Diagnostics and Error Reporting ................................................................................................109 Startup Errors .............................................................................................................................109 Name and Address Conflict Resolution .....................................................................................109 Status History Window Messages .............................................................................................110 Industrial Ethernet Module Diagnostics.................................................................................................. 121 11.1 Statistics Messages ...................................................................................................................122 11.2 Diagnostic and Statistics Data Tags Available through Any Virtual APACS Resource ............125 11.3 Operational Messages ...............................................................................................................129 SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 7 Table of contents 8 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Product Description 1 The Industrial Ethernet Module (IEM) is a configurable communications interface that transfers data between functions blocks of the APACS+TM/QUADLOG(R) system and function blocks of the SIMATIC S7/PCS 7 system, or between function blocks on different APACS+/QUADLOG MBUS segments. The communication function blocks are primarily configured with standard tools of the APACS+/QUADLOG and S7/PCS 7 systems. Active connections between function blocks in the APACS+/QUADLOG and SIMATIC S7/PCS 7 systems are not affected by the configuration and connection of other function blocks. The IEM is configured with a single, static IP Address for its single Ethernet interface. Two IEMs can be used in a redundant pair. The function block configuration (both APACS+ and S7) controls the redundancy. The S7 CPUs and APACS+ resources can also be redundant. This redundancy has no effect on the function block configuration. The S7/PCS 7 system provides function blocks that are used to exchange data with the corresponding function blocks in the APACS+/QUADLOG system via the IEM with a minimum of configuration work. S7 function blocks for the following APACS+/QUADLOG standard functions are available: GW_SEND and GW_REC. Each block can transfer 32 REALS, 32 BOOLS, and 16 WORD values and multiple blocks can be used to give the ability to send more data. A new feature of the APACS+ standard function blocks GW_SEND and GW_REC for the ACM, ACM+ and ACMx controllers have been enhanced to allow STRINGS to pass. But this is only available for APACS+ Peer-to-Peer connections NOT APACS+ to S7 connections. GW_SEND and GW_REC are similar to the S7 BSEND/BRCV blocks. SIMATIC Manager NetPro is used to configure the connections between S7 and the IEM for data to be transferred between systems. But this does not include the new String data mentioned above. The IEM can also be used as a replacement for the Rack mounted Network Interface (RNI), Rack mounted Industrial Computer (RIC), or Rack mounted Industrial Server stations used as dedicated APACS+ NIM32 MBUS communications interfaces. 1.1 Product Components The IEM consists of the following: * Either a SIMATIC Box PC 620, a SIMATIC Box PC 627, a SIMATIC Box PC 627B or a SIMATIC Box PC 627C Industrial PC, which does not have a keyboard, mouse, or monitor. For improved reliability, rotating storage media is not used. Instead, the IEM uses flash-memory storage media, which is preloaded with the run-time software. * Bracket for installation. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 9 Product Description * MBUS interface card (MBI adapter) for connection to the MBUS. * Installation CD, which includes the following: - Installation for the NIM32 user interface - Communication blocks for APACS+, QUADLOG, and S7 controllers - User documentation and help files Configuration of the IEM includes the following: * IP address and computer name for IP communications. These parameters are configured in the gateway.ini file. * Node, rack, and slot address as three separate parameters for the MBUS. These parameters are configured in the gateway.ini file. * Note other optional parameters to configure the IEM are found in the gateway.ini file, these will be defined in detail elsewhere in this manual. * NIM32 security files (optional). If the USB holds the files remoteconfigurationsecuritytable.txt and clientaccesstable.txt, then both files are copied to the IEM folder c:\etc\ (see SG39NIM32-1, Section Client Access Table Operation on the APACS+ Electronic Manuals CD for details.) * Communications between IEMs is defined in the iem2iem.txt file in order to establish APACS+/QUADLOG peer-to-peer communications. Note The customer must supply a USB flash drive, which is a common, pocket-sized, memory device plugged directly into a USB port. The USB flash drive is displayed in Windows Explorer as a removable drive or by the brand name of the device. An 8 MB or larger USB flash drive is sufficient. 1.2 10 Technical Specifications Component or Category Description Stainless Steel Housing 298x301x100mm Power Supply 110/230 VAC Weight Approx. 6kg Ambient temperatures during operation 5-45C Humidity 5-80% @ 25C Heat Dissipation Maximum permissible ambient air temperature for the IEM is 45C. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Installation 2 The IEM connects to the APACS+ MBUS and to the S7 plant bus Industrial Ethernet, which uses the TCP/IP protocol. For complete installation details, please refer to one of the following documents packaged with the IEM: * SIMATIC Box PC 627C Getting Started Guide (A5E02669077-02) * SIMATIC Box PC 627B Getting Started Guide (A5E00927400-01) * SIMATIC Box PC 627 Getting Started Guide (A5E00362054-03) * SIMATIC Box PC 620 Getting Started Guide (A5E00131477-03) These documents are available from the following internet site: http://www.siemens.com/automation/service&support 2.1 Basic installation procedure 1. Mount the IEM to a wall or rack using included flanges. 2. Connect AC power. 3. Connect MBUS. 4. Connect Ethernet cable. 5. Install the software by clicking the setup.exe file on the installation CD. Notes * For APACS+ Function Blocks, you must have 4-mation installed. * For S7 Function Blocks, you must have STEP 7 installed. The IEM uses the following ports, named in accordance with the labels on the housing: * Ethernet: Port with 8-pin RJ45 plug that connects to the Industrial Ethernet plant bus (SIMATIC NET). * MBUS: A 15-pin female port for connection directly to the APACS+ communication bus through a Y cable. * Power: 110/220 AC power connection. * USB: The port used for configuring the IEM, using a customer-provided USB flash drive. The connection between the IEM and the MBUS consists of a 15-pin interface connected to an MBUS Y adapter cable (P/N 16137-215 - supplied with the IEM). The other end of the Y connector is attached to the local bus segment of the MBUS Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 11 Installation system. Please note that the total length of a local bus segment in the MBUS system must not exceed 18 meters (60 feet) using standard cables, and up to 168 meters (550 feet) max only when using MBI extender cabling for PCs. 2.1.1 Cable Part Numbers for IEM installation * Rack to MBI Card Connection - cable needs to be terminated UPH:16137-194A MBI Cable Kit A side 1 Meter UPH:16137-196A MBI Cable Kit B side 1 Meter UPH:16137-172A MBI Cable Kit A side 4 Meter UPH:16137-175A MBI Cable Kit B side 4 Meter UPH:16137-178A MBI Cable Kit A side 15 Meter UPH:16137-180A MBI Cable Kit B side 15 Meter * Rack to MBI Card Extension cables (includes isolation transformer) UPH:16137-186 M-Bus Extension Cable A 150 Meter UPH:16137-187 M-Bus Extension Cable B 150 Meter UPH:16137-182A MBI Extension A&B 50M Kit UPH:16137-215 Y cable supplied with IEM UPH:16137-173 Termination Plug M-BUS A UPH:16137-176 Termination Plug M-BUS B Notes 1. The maximum length of MBUS is 60 ft. This length includes MBUS cables used to connect up to four MODULRACS and the MBI cables used to connect IEMs. 2. Extension Cables can be used to allow the remote mounting of an IEM. The maximum distance that can be achieved is 550 ft. This distance includes the length of the Extension Cable, MBI Cable, and MBUS cables. 3. One pair of Extension Cables, which includes an isolation transformer can be installed per MODULERAC. 4. The Extension Cable can not be installed between MODULRACs. 5. A maximum of four IEMs can be connected to an MBUS. Figure 2-1 IEM Sample Connections 12 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Installation The signal cables of the MBUS are electrically isolated from the IEM. The local bus cable shield is in contact with the IEM housing via the MBUS front panel. Note Newer IEMs, based on the SIMATIC Box PC 627, have two Ethernet ports. The Ethernet cable must be connected to the right hand port, as shown in the following illustration. Note the SIMATIC Box PC 627C is similar to the SIMATIC Box PC 627B. 6,0$7,&%R[3& (WKHUQHWFRQQHFWRUV 8VHULJKWFRQQHFWRURQ6,0$7,&%R[3&DQG% 6,0$7,&%R[3& 6,0$7,&%R[3&% Figure 2-2 SIMATIC Box PC Real Panels 2.2 Replacing an IEM When replacing an IEM, be sure to use the same settings for all configuration parameters in the new IEM as in the old one. Notes SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 13 Installation 14 * The MBUS cards shipped with the IEM have no switches. Configuration is done through the USB flash drive. * Save all configuration files after configuring an IEM, so they can be reloaded into a new IEM when replacing a module. (After the IEM time and date have been set, remember to remove the time and date configuration items from the file. Otherwise, the new IEM will have an old time and date.) See section 3.3 titled "Storing the Current Configuration." Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - Basic USB Flash Drive Operation 3.1 3 Startup with Saved Data in the Flash Memory The flash memory of the IEM stores the operating system, the programs for the IEM functions, the addresses specified for the S7 connections, and the addresses of partner IEMs for APACS+/QUADLOG communication. 3.2 Configuring the IEM with a USB Flash Drive The IEM does not require a keyboard or mouse. All configuration operations may be performed by editing the configuration files residing on the USB flash drive, using a text file editor on any USB equipped workstation. After saving changes to files on the USB flash drive, remember to remove the USB flash drive safely by using the Safely Remove Hardware icon located on the Windows toolbar. The changes may then be put into effect by introducing the changed files to the IEM. All user configuration and status communication with an IEM is accomplished using a USB flash drive folder that has the same name as the IEM. This allows for configuring several different IEMs using one USB flash drive. When a USB flash drive is first inserted into a "running" IEM, the IEM looks on the root directory of the USB flash drive for a folder with the same name as the IEM computer name (the default IEM name is GATEWAY). If the folder is not found, the IEM creates it, and copies its current configuration files to the new folder. When changing an IEM computer name, the IEM creates a new folder on the USB flash drive, if necessary, with the same name as the new IEM computer name. IEMs prior to version 2.0 used the root directory of the USB flash drive for all configurations. Notes * Initialize the IEM with proper configuration parameters before connecting it to the Ethernet and MBUS networks. The settings are specified in a file on the customer-provided USB flash drive (see Section 4 titled Configuration MBUS/Ethernet Network Settings). * A USB hard drive cannot be used as a USB flash drive. * The first time a new type of USB flash drive (new manufacture or new model) is introduced to an IEM, the IEM sees the device as new hardware. The result is that the IEM beeps three times, then a few seconds later, the IEM beeps three more times. The status.txt on the USB flash drive shows that the current configuration was copied to the flash drive twice. It is possible that the IEM will then reboot one time. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 15 Configuration - Basic USB Flash Drive Operation 3.3 Storing the Current Configuration Retrieve the current configuration of the IEM by plugging in a USB flash drive at any time after the IEM has been powered on for more than a minute. The current configuration is written to a flash drive folder with the name of the source IEM computer. The IEM beeper sounds, indicating that the USB flash drive can be removed. The IEM writes the following files to this folder: IEM Current Configuration Files Written to the USB Flash Drive oldgateway.ini status.txt oldremoteconfigurationsecuritytable.txt oldclientaccesstable.txt oldiem2iem.txt 16 The current values for all the gateway.ini configuration parameters will be written to this file, overwriting any existing copy and creating the file if it does not exist. Status information will be appended to this file if it already exists. If the file does not exist, it will be created. Each line in the Status.txt file begins with a three-letter acronym to assist the user in determining which group of lines is related to a single usage of the USB flash drive for a given IEM. STS - line was generated as a result of an IEM status being written to a USB flash drive CFG - line was generated as a result of an IEM configuration change being read from a USB flash drive UPG - line was generated as a result of an IEM upgrade being read from a USB flash drive. The current copy of the IEM's c:\etc\remoteconfigurationsecuritytable.tx t file is written onto the USB as the file oldremoteconfigurationsecuritytable.txt overwriting any existing copy and creating the file if it does not exist. The current copy of the IEM's c:\etc\oldclientaccesstable.txt file is written onto the USB as the file oldclientaccesstable.txt overwriting any existing copy and creating the file if it does not exist. The current IEM connection table configuration is copied to the USB flash drive overwriting any existing copy and creating the file if it does not exist. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - Basic USB Flash Drive Operation Versions.txt RtConfigDisabled.txt 3.4 The current file versions of all the IEM run time components is written to this file overwriting any existing copy and creating the file if it does not exist. This file is written to the USB flash drive overwriting any existing copy and creating the file if it does not exist. The file has no configuration data and only contains comments to assist the user in activating the IEM's Runtime Configuration Change capability. Further details on the use of this file can be found in Section 3.4.2 titled "IEM Runtime Configuration Change Processing." Implementing the New Configuration There are two methods to implement configuration changes into the IEM: 1. IEM Startup Configuration Change Processing 2. IEM Runtime Configuration Change Processing Both methods require the use of a USB Flash Drive to contain the required special configuration files which the IEM utilizes to implement the user specified configuration changes. 3.4.1 IEM Startup Configuration Change Processing 1. Insert the USB flash drive into the IEM. A folder named GATEWAY is created which contains the files with the initial, default configuration. 2. Remove the USB flash drive from the IEM and insert it into your other Windows system. 3. Copy and rename the files in the GATEWAY folder. 4. Edit the parameters as required. For example, copy/rename the oldgateway.ini file to gateway.ini, then edit the default settings of the parameters as required to uniquely configure the IEM. 5. With the IEM powered off, plug the USB flash drive with the new gateway.ini file into the IEM. 6. Power on the IEM. The IEM reads the new configuration and writes the old configuration to a file called oldgateway.ini. The previous configuration of the IEM is stored in this file. Another file, called status.txt, is written containing the results, including errors and warnings, of the configuration change. 7. The IEM beeps after about one minute, indicating that the USB flash drive can be removed. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 17 Configuration - Basic USB Flash Drive Operation Note For IEMs based on the SIMATIC Box PC 620, you can reset the IEM by inserting a pointed object (for example, a toothpick or other non-conductive item) into the RESET port on the side of the IEM, instead of removing power. For IEMs based on the SIMATIC Box PC 627, 627B and 627C, you can remove the power using the power switch on the IEM unit, next to the power cable. The newer IEM platforms (Box627, Box627B & Box627C) have motherboard BIOSs that support booting from a USB flash drive. Customers who mistakenly use a "boot ready" USB flash drive to configure an IEM using the power cycling configuration change method may not be successful in completing the configuration change. 3.4.2 IEM Runtime Configuration Change Processing The IEM also supports a runtime configuration capability as an alternate method for completing IEM configuration changes. The former method of power cycling the IEM with a USB flash drive inserted into one of the IEM's USB ports during startup is still available for completing any user desired IEM configuration changes. The IEM runtime configuration capability also shortens the total IEM down (or offline) time necessary for an IEM configuration change. After a properly "run time configuration prepared" USB flash drive is inserted into a "running" IEM, the IEM's configuration-change detection logic immediately begins parsing the USB flash drive configuration files without the need to first start up from a power off state. To use the new IEM run time configuration capability, perform the following steps: 1. Insert a USB flash drive into a running IEM USB port and wait for the three short high pitched tones signaling that the IEM has finished writing its current configuration to the USB flash drive. 2. On a PC with a monitor and keyboard, insert the USB flash drive from step 1 into any USB port, open Windows Explorer, navigate to the USB flash drive's folder named after the computer name of the IEM, and complete one or more IEM configuration changes using any of the normal IEM configuration files (gateway.ini, iem2iem.txt, etc.) 3. In the IEM-named USB flash drive folder, rename the file RtConfigDisabled.txt to RtConfigEnabled.txt. This file name must be spelled exactly as stated in order for the IEM runtime configuration capability to activate successfully. Note that instructions on the use of this file are also included within the file's contents. Double-click this file to read the instructions inside a Notepad window. 4. Insert the USB flash drive into a "running" IEM and wait for the configuration change to complete. The entire configuration change processing should take place within a few seconds if the resulting configuration does not require the IEM to reboot. Note the SIMATIC Box PC 627C will always reboot for configuration changes. 5. After inserting the USB flash drive into an IEM USB port, rather than hearing the three short beeps (indicating that a configuration status was written to the USB flash drive), you will instead hear one double-length high pitched tone (indicating IEM configuration change processing has commenced) followed by any one of the three configuration-change beep code patterns (indicating the 18 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - Basic USB Flash Drive Operation action required to complete the configuration change): configuration change requiring a reboot, configuration change not requiring a reboot, or no configuration change was needed. As part of the run time configuration change operation, the RtConfigEnabled.txt file will be deleted and then re-created as RtConfigDisabled.txt at the end of the configuration change processing to prevent a future unexpected configuration change event. 6. If you then want to verify the current configuration state of the IEM immediately following a run time configuration change attempt, upon hearing any one of the three "end result" configuration change beep patterns, temporarily remove the USB flash drive from the IEM's USB port, re-insert the USB flash drive back into the IEM's USB port, wait for the three short high pitched tone signal, remove the flash drive, and inspect its current configuration state on a PC workstation capable of accessing files from a USB flash drive. 3.5 Audible Beep Code Description The IEM beep code signals, which signal that it is safe to remove a USB flash drive from one of the IEM's USB ports, have been enhanced to improve user recognition of various IEM configuration change request outcomes. In addition, the sound level of the beep signals has been increased to make it easier to hear IEM beep patterns in noisier working environments. The beep code pattern heard when a USB flash drive is inserted into an IEM USB port on a "running" IEM (as compared to a "starting" IEM that is starting up from a power off state) has not changed (albeit the sound level is now more pronounced) and continues to be three short high pitched tones (high/high/high). This beep code pattern signals the user that the current IEM configuration has been successfully written to the USB flash drive and that it is ok to remove the flash drive from the IEM's USB port. New beep code patterns were added to indicate changes from the current IEM configuration. When the IEM firmware detects that a USB flash drive has been inserted into an IEM USB port for the purpose of potentially making one or more IEM configuration changes (either following an IEM power cycle or by use of the new IEM runtime configuration capability), the IEM signals the user that it is about to scan the USB flash drive for configuration changes with one double length high pitched tone. After the IEM firmware completes its scan of the USB flash drive for potential configuration changes, within a few seconds following the one double length high pitched tone, the audible results of the configuration change scan are signaled by one of three different end-result beep code patterns: End Result Beep Codes IEM Configuration was NOT ALTERED: Four short, multi-pitched tones (high/high/high/low). IEM Configuration was altered and DOES NOT REQUIRE a reboot to complete the configuration change: Three short, multi-pitched tones (low/high/low). IEM Configuration was altered and REQUIRES a reboot to complete the configuration change: Two short, multi-pitched tones (high/low). SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 19 Configuration - Basic USB Flash Drive Operation IEM Startup Configuration Change Audible Beep Code Matrix USB Flash Drive Use Case USB Flash Drive Insertion Time Frame Potential IEM Config at Startup USB flash drive inserted at IEM Startup Potential IEM Config at Startup USB flash drive inserted at IEM Startup Potential IEM Config at Startup USB flash drive inserted at IEM Startup IEM Config files on USB Flash Drive (Gateway.ini, iem2iem.txt, ...) No config files present Result: IEM config NOT altered. One double length high pitched tone followed by four shorter multi-pitched tones: high/high/high/low One or more config files present with One double length high no configuration changes. pitched tone followed by four shorter multi-pitched Result: IEM config NOT altered. tones: high/high/high/low One or more config files present with One double length high one or more configuration changes that pitched tone followed by does NOT require a reboot. three shorter multipitched tones: * iem2iem.txt changed low/high/low and/or * Potential IEM Config at Startup USB flash drive inserted at IEM Startup Audible Beep Code Signal Gateway.ini changed - MaxR_ID - DiagLevel Date, Time Result: IEM config altered and continues to run. Note the Box 627C will require a reboot. One or more config files present with One double length high one or more configuration changes that pitched tone followed by DOES require a reboot. two shorter multi-pitched tones: Gateway.ini changed high/low * Node, Rack, Slot * Timezone * ComputerName * IpAddress * SubnetMask * DefaultGateway * ApacsTimeBroadcastEnabled * NtpTimeSource Result: IEM config altered and then reboots. IEM Runtime Configuration Change Audible Beep Code Matrix USB Flash Drive Use Case 20 USB Flash Drive Insertion IEM Config files on USB Flash Time Frame Drive (Gateway.ini, iem2iem.txt, ...) Audible Beep Code Signal Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - Basic USB Flash Drive Operation USB Flash Drive Use Case USB Flash Drive Insertion IEM Config files on USB Flash Time Frame Drive (Gateway.ini, iem2iem.txt, ...) Audible Beep Code Signal Potential IEM Config at Runtime USB flash drive inserted into a "running" IEM AND the RtConfigEnabled.txt file exists either in the IEM node named flash drive sub-dir or in the flash drive's root dir. One double length high pitched tone followed by four shorter multipitched tones: high/high/high/low Potential IEM Config at Runtime USB flash drive inserted One or more config files present into a "running" IEM AND with no configuration changes. the RtConfigEnabled.txt file Result: IEM config NOT altered. exists either in the IEM node named flash drive sub-dir or in the flash drive's root dir. One double length high pitched tone followed by four shorter multipitched tones: high/high/high/low Potential IEM Config at Runtime USB flash drive inserted into a "running" IEM AND the RtConfigEnabled.txt file exists either in the IEM node named flash drive sub-dir or in the flash drive's root dir. One double length high pitched tone followed by three shorter multipitched tones: low/high/low No config files present Result: IEM config NOT altered. One or more config files present with one or more configuration changes that does NOT require a reboot.; * iem2iem.txt changed and/or * Gateway.ini changed - MaxR_ID - DiagLevel - Date, Time Result: IEM config altered and continues to run. Note the Box 627C will require a reboot. Potential IEM Config at Runtime USB flash drive inserted into a "running" IEM AND the RtConfigEnabled.txt file exists either in IEM node named flash driv sub-dir or in the flash drive's root dir. One or more config files present with one or more configuration changes that DOES require a reboot. Gateway.ini changed: * Node, Rack, Slot * Timezone * ComputerName * IpAddress * SubnetMask * DefaltGateway * ApacsTimeBroadcastEnabled * NtpTimeSource One double length high pitched tone followed by two shorter multipitched tones: high/low Result: IEM config altered and then reboots. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 21 Configuration - Basic USB Flash Drive Operation USB Flash Drive Use Case USB Flash Drive Insertion IEM Config files on USB Flash Time Frame Drive (Gateway.ini, iem2iem.txt, ...) IEM Config USB flash drive inserted Status Report into a running IEM and NO RtConfigEnabled.txt runtime config file exists either in the IEM node named flash drive sub-dir or in the flash drive's root dir. 22 Any config files present are not checked for possible config changes. Audible Beep Code Signal Three short high pitched tones: high/high/high Result: IEM config NOT altered. Old files written to the IEM's named subdir on the USB flash drive. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - MBUS/Ethernet Network Settings 4.1 4 Global Configuration by Text File on a USB Flash Drive during Power Up Change the IEM configuration by editing a configuration file using any text editor (for example, Notepad). This configuration is transferred to the IEM using a memory device. Currently, there is a configuration program for the NIM32. This will continue to be used only for configuring the NIM32 running on the IEM. The configuration parameters handled by this program are unchanged from the NIM32 configuration parameters available in the ProcessSuite R5 version of the NIM32. The IEM starts automatically when the power supply is turned on. The IEM operating system boots from the internal flash memory and starts the IEM program. While the IEM program is starting up, the configuration data is read from the USB flash drive. This data is permanently stored in the flash memory of the IEM. To change the configuration, there must be a file called gateway.ini on the USB flash drive, in the folder with the same name as the IEM computer name (see the ComputerName parameter below). This file can be created from scratch, or the oldgateway.ini file can be edited and saved as gateway.ini. The file oldgateway.ini is one of the current configuration files obtained by inserting the USB flash drive in a running IEM. Edit the configuration parameters in this file using a parameter = value format, with one parameter per line. Note Parameters and values in .ini files are case-insensitive. In the discussion that follows, case has been rendered for readability. The following, for example, are equivalent: DiagnosticLevel, diagnosticlevel, and DIAGNOSTICLEVEL The following parameters are supported: Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 23 Configuration - MBUS/Ethernet Network Settings MBUS Parameters Node These parameters define the MBUS address for the IEM. The Rack value of these in combination must form a unique address on Slot the MBUS. The Node can range from 0 to 62. Node 63 is reserved for NIM32 addressing assignments and is not permitted as an address by the Control Panel Applet. The Rack can range from 1 through 16 (see Note 2), and the Slot is 1 through 16 (see Note 1). The IEM reboots if any of these parameters are changed. Notes 1. All IEM's redundant or non-redundant MUST use Slot 11 to avoid communication conflicts. 2. All IEM's connected to the same MBUS MUST use Rack x for the first IEM and Rack x + 2 for the second IEM. It is not necessary for the IEM Rack address to match that of the Rack it is connected to. Diagnostics DiagnosticLevel These set the diagnostic logging level for the IEM. There are 6 settings, 0 through 5. DiagLevel 0 Errors only. 1 Errors only. 2 Medium logging (some warnings and all errors). 3 Medium Logging and periodic statistical tag information. 4 High Logging (and medium logging messages also). 5 High Logging and periodic statistical tag information. Note Setting the diagnostic level above 1 increases the amount of information the IEM outputs, which may result in a slowing of data transfer. Use of level 0 is recommended unless otherwise indicated. System Settings Setting Meaning IPAddress SubnetMask These specify the IP address and the subnet mask for the IEM. If the IP address is not unique, communications may not be established with the IEM. Changing this parameter causes the IEM to reboot. 24 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - MBUS/Ethernet Network Settings Setting Meaning ComputerName This parameter specifies the computer name for the IEM. Changing this parameter causes the IEM to reboot. Note: The ComputerName should be limited to only letters and numbers, and not longer than 15 characters. This syntax restriction is due to a limitation of both Microsoft Windows and the NIM32 software. TimeZone This parameter is used to set the time zone for the IEM. It can be one of the following values: International Date Line, Midway Island, Midway Is, Samoa, Hawaii, Alaska, Pacific Time, Tijuana, Arizona, Chihuahua, Mazatlan, Mountain Time, Central America, Central Time, Guadalajara, Mexico City, Monterrey, Saskatchewan, Bogota, Lima, Quito, Eastern Time, Indiana, Atlantic Time, Caracas, Santiago, Newfoundland, Brasilia, Buenos Aires, Georgetown, Greenland, Mid-Atlantic, Azores, Cape Verde Island, Cape Verde Is, Casablanca, Monrovia, Greenwich Mean Time, Dublin, Edinburgh, Lisbon, London, UTC, Zulu, Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna, Belgrade, Bratislava, Budapest, Ljubljana, Prague, Brussels, Copenhagen, Madrid, Paris, Sarajevo, Skopje, Warsaw, Zagreb, West Central Africa, Athens, Istanbul, Minsk, Bucharest, Cairo, Harare, Pretoria, Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius, Jerusalem, Baghdad, Kuwait, Riyadh, Moscow, St Petersburg, Volograd, Nairobi, Tehran, Abu Dabi, Muscat, Baku, Tbilisi, Yerevan, Kabul, Ekaterinburg, Islamabad, Karachi, Tashkent, Chennai, Kolkata, Mumbai, New Delhi, Kathmandu, Almaty, Novosibirsk, Astana, Dhaka, Sri Jayawardenepura, Rangoon, Bangkok, Hanoi, Jakarta, Krasnoyarsk, Beijing, Chongqing, Hong Kong, Urumqi, Irkutsk, Ulaan Bataar, Kuala Lumpur, Singapore, Perth, Taipei, Osaka, Sapporo, Tokyo, Seoul, Yakutsk, Adelaide, Darwin, Brisbane, Canberra, Melbourne, Sydney, Guam, Port Moresby, Hobart, Vladivostok, Magadan, Solomon Is., New Caledonia, Auckland, Wellington, Fiji, Kamchatka, Marshall Island, Marshall Is, Nuku'alofa Time Date These are used to set the time and date on the IEM. Use 24-hr. format (HH:MM:SS) and date format (MM/DD/YYYY). Note: Seconds must not be omitted from the time. Note: When changing the configuration, the date and time parameters can be removed from the gateway.ini file so as not to reset the IEM Time and Date. Notes * Newer IEMs, those based on SIMATIC PC Box 627, Box 627B and Box 627C, have daylight savings time disabled. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 25 Configuration - MBUS/Ethernet Network Settings * Changing the IEM's time zone no longer shifts the local time by the hour difference between the current time zone and the changed time zone. For example, creating a gateway.ini file, that contains the single line "TIMEZONE = Pacific Time", then applying this gateway.ini file configuration change to an IEM whose current time is "09:00:00" and current time zone is "Eastern Time", the resulting IEM time and time zone will be "09:00:00" and "Pacific Time". Communication Settings Setting 26 Meaning S7ToAPACS This parameter takes a non-negative integer value. A value of 0 disables the S7 to APACS communications; any other value enables it. MaxR_ID This parameter takes a non-negative integer and is used to specify the maximum value of the R_ID used in the GW_REC and GW_SEND blocks. The range limits for this parameter are 0 to 512. Normally, this parameter is set to a value within the 1-512 range. The 0 setting is reserved as a special case, which turns off all IEM connection communication support between resources by making all R_IDs invalid. The larger the number, the more system resources are used. It is recommended to set all IEMs to the same value. The parameter should be set as small as possible to a value that is the anticipated maximum R_ID assigned to any GW_REC/GW_SEND block. You can make the setting in advance of actually implementing the controller programs using the GW_REC/GW_SEND blocks. The default setting is sufficient unless the system will be exchanging large amounts of data requiring more GW_REC/GW_SEND pairs. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - MBUS/Ethernet Network Settings Setting Meaning DefaultGateway This parameter enables IEM boxes to be connected to TCP/IP networks not local to the IEM local network. The value for this new parameter takes any valid IP address as the address for either a network router or a multi-homed gateway workstation/server that has connections to IP addresses outside of the local network for which the IEM is configured for (for example, DefaultGateway = 192.168.0.1). The DefaultGateway parameter's IP address value MUST be on the same local network as the IEM's configured IPAddress parameter. Specifically, if the IEM's configured IPAddress value is 192.168.0.111 with a corresponding SubnetMask value of 255.255.255.0, then the DefaultGateway value must be an address on the 192.168.0 local network (that is, 192.168.0.1). The default value for this parameter is None. To un-configure a previously assigned DefaultGateway IP address, set this parameter value equal to None (that is, DefaultGateway = None). ETHERNETQUALITYTIMEOUT This parameter works on the Gateway.Ethernet.Quality data tag. The ETHERNETQUALITYTIMEOUT is the number of seconds to allow for Gateway.Ethernet.Quality to not have activity before making Gateway.Ethernet.Quality go false. The default value is 3 seconds and for most applications this parameter does not need to be changed. MBIQUALITYTIMEOUT This parameter works on the Gateway.MBI.Quality data tag. The MBIQUALITYTIMEOUT is the number of seconds to allow for Gateway.MBI.Quality to not have activity before making Gateway.MBI.Quality go false. The default value is 6 seconds and for most applications this parameter does not need to be changed. APACSTimeBroadcastEnabled This parameter can only be one of two values: 0 (disabled) or 1 (enabled). A value of 1 enables the IEM's APACS Time Broadcast feature that periodically broadcasts the IEM's local time value to all the MBUS connected APACS controllers. A value of 0 disables the IEM APACS Time Broadcast feature. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 27 Configuration - MBUS/Ethernet Network Settings Setting Meaning APACSTimeTolerance This parameter is only used if APACSTimeBroadcastEnabled is set to 1. This parameter is sent to the APACS Time Master controller used monitor the difference between the Real Time Clock and time broadcasted from the IEM. If the difference is greater then the set APACSTimeTolerance a class 1 26:14 warning "System Time Sync is Out of Tolerance" is logged to the diagnostic logger. The default value is 250000 or 250 milliseconds. For most applications this value does not need to be changed. NTPTimeSource This parameter is used to set the time reference that the IEM utilizes for time syncing its own system clock. The parameter accepts any one of four different values: {CustomSettings | LocalClock | <Server_IP_Addr> | <Server_DNS_Name>}. The CustomSettings value means the W32Time registry is configured in an unexpected way (such as to use a Network Domain and Kerberos authentication). In this case, the W32Time registry will not be modified. The LocalClock value configures the IEM's NTP Server to use the time from the IEM's local clock, with no synchronization to an external time source. Any other value is interpreted as either an IP address, or DNS Name, of an NTP Server on the network. 4.2 Default Configuration The gateway.ini file with the default configuration (except for time/date) appears as shown below: 28 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - MBUS/Ethernet Network Settings ApacsTimeBroadcastEnabled = 0 APACSTIMETOLERANCE = 250000 ComputerName = GATEWAY Date = 3/29/2004 DefaultGateway = NONE DiagnosticLevel = 0 ETHERNETQUALITYTIMEOUT = 3 IPAddress = 192.168.0.1 MaxR_ID = 8 MBIQUALITYTIMEOUT = 6 Node = 62 NtpTimeSource = CustomSettings Rack = 16 S7ToAPACS = 0 Slot = 16 SubnetMask = 255.255.255.0 TIME = 09:19:41 TimeZone = Amsterdam Notes * If the ComputerName is being changed, do not change other parameters at the same time. * Be careful when placing multiple configurations on the same USB flash drive. It is possible to accidentally configure an endless loop configuration when changing the IEM computer name if a configuration folder using the new IEM name already exists. For example: - IEM1 configuration changes the computer name to IEM2 - IEM2 configuration changes the computer name to IEM1 Each time the IEM reboots, the configuration is read and the computer name is changed, which causes the IEM to reboot. 4.3 Configuring the IEM for Ethernet and MBUS Communications The first step in configuring peer-to-peer communications is to set up the IEM to establish Ethernet and MBUS communications. Once this has been established, configuring the connection tables for peer-to-peer communications can proceed. 1. Remove the IEM from the box and connect it (via an RJ45 connector) from the Ethernet port (located on the side of the IEM) to an active Ethernet (switch). For further installation instructions, refer to the SIMATIC Box PC Getting Started manual. 2. Obtain the IEM's current configuration information by inserting a USB flash drive (that does not contain the RtConfigEnabled.txt file in the IEM name directory) into a "running" IEM (an IEM that has been powered on for more than 1 minute). SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 29 Configuration - MBUS/Ethernet Network Settings - Upon initial use of the USB flash drive, the IEM loads the USB drivers and beeps. - After the second set of beeps, it is safe to remove the USB flash drive, which at this point has a file called oldgateway.ini in the IEM name folder. 3. Take the USB flash drive to any Windows 2000, Windows XP or Windows 7 PC (Windows NT does not recognize USB), locate the IEM name folder, and open the oldgateway.ini file using Notepad or any other text editor. Edit this file using the default configuration as a guide (see Section 4.2 titled "Default Configuration"), rename it gateway.ini, and save it in the IEM name folder of the USB flash drive. In the same IEM name folder, activate the IEM runtime configuration change capability by renaming the RtConfigDisabled.txt file to RtConfigEnabled.txt. 4. Insert the USB flash drive with modified gateway.ini file into the "running" IEM using either USB port and wait for the IEM runtime configuration change processing to start. 5. Within a couple of seconds, the IEM reads the new USB flash drive gateway.ini file and signals completion of the configuration change attempt with one of the beep code patterns described in Section 3.5 titled "Audible Beep Code Description." The IEM reboots a second time if parameters such as computer name, IP address, or MBUS address have been changed. The USB flash drive can be left in during this second reboot and removed after the next set of IEM beeps. The IEM writes the following files to the IEM name folder of the USB flash drive: - oldgateway.ini (previous configuration) - Status.txt (status info) Notes * Immediately after the IEM configuration change, the oldgateway.ini file written back to the USB flash drive relates to the configuration of the IEM before processing the gateway.ini file located on the USB flash drive. If, after one minute, the USB flash drive is removed and reinserted, it will return "old" files that correspond to the latest USB file configuration. * The IEM strips out the Time and Date information from the original gateway.ini file. This prevents the accidental resetting of the old Time and Date on subsequent reboots using the gateway.ini file. 6. Review the Status.txt for a successful configuration-change message or error message. 7. Go to another PC on the same network and ping the IEM by PC Name and IP address to verify the information. If the IEM does not respond to the ping, review oldgateway.ini to ensure that the parameters are what you expect. Repeat steps 4 through 7 if necessary. 8. After the IEM IP address and PC name are verified, verify the NRS address using the second PC's NIM32 User Interface (Start > APACS+ Control > APACS+). 9. When the NIM32 User Interface window opens, select Local and review the top pane. 30 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - MBUS/Ethernet Network Settings Figure 4-1 NIM32 User Interface 10. Select the IEM in the top pane, right-click and select Properties. This opens the NIM32 tab. Figure 4-2 NIM32 Configuration 11. Verify that the NIM32 component is in Bridge mode. Note Make sure the security check boxes are not checked, or you will be prevented from using the NIM features until the security tables are loaded into the IEM. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 31 Configuration - IEM & APACS+ Time Sync 5 The IEM has the ability to synchronize the controller time on the local MBUS with a time server on Ethernet. The IEM does this in two steps: * First, the IEM uses Windows Time Service (W32Time) as an NTP Client to synchronize the IEM's time with an NTP Server on Ethernet. The NTP Server can obtain its time from a GPS receiver, other higher stratum NTP Servers, or from other time sources. * Second, the IEM runs a new APACS Time Broadcast Service that sends periodic time messages to the MBUS Time Master Controller and to controllers which are not using the Time Sync block. This MBUS Time Master Controller then sends periodic "group time sync" messages to the other MBUS Controllers. The illustration below provides a block diagram of these steps: Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 33 Configuration - IEM & APACS+ Time Sync Time Source Local Time Server System Time NTP Server IEM NTP Client System Time APACS Time Broadcast Service APACS APACS Time Master APACS APACS Figure 5-1 Block Diagram of Configuration Steps In the previous version of the IEM, such time synchronization was done using the Time Sync Utility on a PC to send time messages to MBUS controllers by means of the Ethernet and NIM32 software (running on the IEM). The new capability provides more accurate time synchronization among separate MBUS segments. Configuration The operation of the new Time Synchronization function is configured by entries in the gateway.ini file. There are three entries associated with Time Synchronization: 34 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - IEM & APACS+ Time Sync ApacsTimeBroadcastEnabled = {0 | 1} ApacsTimeTolerance The ApacsTimeTolerance value is sent to the APACS Time Master controller before the initial time is set. This allows the user to configure the difference used between the Real Time Clock of the APACS Time Master controller and the time sent from the IEM. If the difference calculated is greater then the ApacsTimeTolerance set a class 1 26:14 warning is logged to the diagnostic logger. The default value is 250000 or 250 milliseconds and for most applications this value does not need to be changed. NTPTimeSource = {CustomSettings | LocalClock | <Server_IP_Addr> | <Server_DNS_Name>} The CustomSettings value means the W32Time registry is configured in an unexpected way (such as to use a Network Domain and Kerberos authentication). In this case, the W32Time registry will not be modified. The LocalClock value configures the IEM's NTP Server to use the time from the IEM's local clock, with no synchronization to an external time source. Any other value is interpreted as either an IP address, or DNS Name, of an NTP Server on the network. The APACSTimeBroadcastEnabled setting controls synchronization from the IEM to the TimeSync Master Controller on the IEM's local MBUS segment. The NTPTimeSource setting selects the NTP Server to be used as the time source by the IEM. When enabling NTP by setting the NTP time source to a server address or name, ensure that the time and date setting is within a few minutes of the correct time and date so that the NTP client can begin synchronizing without delay. Arbitration of Time Sync among Multiple IEMs If multiple IEMs on the same MBUS segment have ApacsTimeBroadcastEnabled=1, the MBUS Time Master Controller applies only minimal arbitration when selecting messages to process. The MBUS Time Master Controller might process time messages from more than one IEM. Therefore, it is important that time be well synchronized among the multiple IEMs, to maintain stable, precise time in the MBUS controllers. Recommended Time Sync Architecture For best performance, Siemens recommends the following: * The system should have an on-site NTP Server, synchronized to a GPS Clock. * All IEMs should have the NTPTimeSource set to the same on-site NTP Server, using the NTP Server's IP Address or DNS name. (This synchronizes each IEM's local time to the NTP Server's time.) * ApacsTimeBroadcastEnabled should be set to 1 for all IEMs. (This synchronizes the TimeSync Master Controller of each MBUS segment with the IEMs on that MBUS segment. See notes 2 and 3.) Notes SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 35 Configuration - IEM & APACS+ Time Sync 1. When the IEM configuration is changed to set the NTPTimeSource to the NTP Server's name or address, the IEM's local time should be previously (or simultaneously) set to within 2 minutes of the correct time. Otherwise, it can take a long time before the IEM will synchronize its time to the NTP Server's time. 2. When an IEM configuration is changed to set ApacsTimeBroadcastEnabled to 1 for more than one IEM on a MBUS segment, the local time on all IEMs on that MBUS segment should already be synchronized to within 3 seconds of each other. Otherwise, there may be frequent posting and clearing of error 26:14 (Time Sync Out of Tolerance) by the TimeSync Master Controller on that MBUS segment, until the IEM clock times are within 3 seconds of each other. 3. If more than one IEM on an MBUS segment has ApacsTimeBroadcastEnabled set to 1, then the controller time will continue to be synchronized, even if one of the IEMs is removed from service. However, when that IEM is returned to service, if its time is not within 3 seconds of the correct time, there will be frequent posting and clearing of error 26:14 (Time Sync Out of Tolerance) until the restarted IEM synchronizes its time to within 3 seconds of the NTP Server's time. 4. If APACS controllers are added or removed from the APACS rack time set messages will be broadcasted from the IEM. These messages will set the Real Time Clock and post class 1 26:15 warnings "System Time Has Been Set" to the diagnostic logger. 36 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 6 Configuration - APACS+ Peer-to-Peer Communications The IEM allows a resource (ACM or CCM) on one MBUS segment to send or receive data values to a resource on another, remote, MBUS segment. The IEM uses standard Ethernet hardware and cabling, and does not need Module Bus expanders (MBX) and Modulnet coaxial cable (MNET). The IEM uses the GW_SEND and GW_REC function blocks (included with the IEM CD) to transfer arrays of data organized as 16 Word values, 32 Boolean values, and 32 Real values, between resources. Please see the topic ID 50418580 for more information on an update for the ACM+ and ACMx which also allows for STRING data to be sent and received over the GW_SEND and GW_REC function blocks (http://support.automation.siemens.com/WW/view/en/50418580). Each MBUS segment permits an IEM to communicate with up to eight other MBUS segments. If you are using an IEM V3.0 then you can utilize up to 12 connections. Redundancy is achieved by using a second set of IEMs between segments. The GW_SEND and GW_REC function blocks support the redundant transfer of data over two separate connections. In the past, a typical multi-node system connected multiple MBUS segments together using MBX modules and MNET cabling. An example system is shown below. This system combines three local MBUS segments called Node2, Node4 and Node6 onto one communications highway called the MNET. MNet Node2 A C M 1 A C M 2 Node6 Node4 M B X A C M 3 A C M 4 M B X A C M 5 A C M 6 M B X Figure 6-1 APACS+ Multi-node System using MNET with MBXs The IEM functionality for the Ethernet link is used instead of the MBX/MNET data highway, and can be used to link a total of eight separate IEM devices/local MBUS nodes together. If you are using an IEM V3.0 it can be used to link up to 12 separate IEM devices/local MBUS nodes together. Each IEM has its own IP address and its own local MBUS segment of APACS+ controllers. The APACS+ controllers on each local MBUS segment can now use the IEM Ethernet link functionality to exchange data between remote APACS+ controllers connected to any of up to eight other IEM devices (up to 12 other IEM devices if using IEM V3.0). Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 37 Configuration - APACS+ Peer-to-Peer Communications Engineering Station Tag Server Ethernet IEM#1 Node2 192.168.1.2 IEM#3 Node6 192.168.1.6 IEM#2 Node4 192.168.1.4 MBUS MBUS Node2 A C M 1 MBUS Node4 A C M 2 A C M 3 Node6 A C M 4 A C M 5 A C M 6 Figure 6-2 APACS+ Multi-node Using Ethernet with IEMs Controller to controller data exchange across the IEM Ethernet link requires the ACM configuration to use paired GW_REC and GW_SEND function blocks (included on the IEM CD). For an APACS+ controller to send/receive data over the Ethernet link, its 4-mation configuration requires a CONNECT function block and a GW_SEND paired to a corresponding GW_REC function block at the receiving ACM. The APACS+ controller receiving the data would also include a CONNECT function block for proper operation (see Section 6 titled "Configuring the ACM for Peer-to-Peer Communications"). ACM1 38 IEM1 IEM2 Connect Block Connect Block GW_SEND GW_REC ACM2 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications Figure 6-3 APACS+ Communications Blocks for IEM Based Peer-to-Peer Communications Configuration of peer-to-peer communications is done on two (2) distinct levels. 1. IEM - Configuring the IEM computer name, the IP address, and the node, rack and slot using the gateway.ini file. Also configuring the IEM name and IP address of the IEM with which this IEM is to communicate with using the iem2iem.txt file. 2. APACS+/QUADLOG controller - Configuring the communications blocks (CONNECT, and the paired GW_SEND & GW_REC function blocks). 6.1 IEM Connection Tables Setup After establishing a presence on the Ethernet and MBUS, the next step in configuring peer-to-peer communications is to set up the IEM connection tables to determine which IEMs are used to communicate between controllers. This is accomplished by creating the file iem2iem.txt on the USB key. Note The step numbers in the procedure below correspond to the numbers in the graphic. 1. Node2 controllers (either ACM1 or ACM2 or both) are to communicate with Node6 controllers (either ACM5 or ACM6 or both). This would require communications using IEM#1 and IEM#3 2. Node2 controllers (either ACM1 or ACM2 or both) are also to communicate with Node4 controllers (either ACM3 or ACM4 or both). This would require communications using IEM#1 and IEM#2 3. Node6 controllers (either ACM5 or ACM6 or both) are also to communicate with Node4 controllers (either ACM3 or ACM4 or both). This would require communications using IEM#2 and IEM#3 SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 39 Configuration - APACS+ Peer-to-Peer Communications Engineering Station Tag Server Ethernet IEM#1 Node2 192.168.1.2 IEM#3 Node6 192.168.1.6 1 2 IEM#2 Node4 192.168.1.4 MBUS MBUS Node2 A C M 1 3 MBUS Node4 A C M 2 A C M 3 A C M 4 Node6 A C M 5 A C M 6 Figure 6-4 IEM Connections for APACS+ Peer-to-Peer Communications The following connection tables, one for each IEM, are used to configure the intraIEM communications. iem2iem.txt for IEM#1 iem2iem.txt for IEM#2 iem2iem.txt for IEM#3 NODE2_NODE4,192. 168.1.4 NODE2_NODE6,192. 168.1.6 NODE4_NODE2, 192.168.1.2 NODE4_NODE6, 192.168.1.6 NODE6_NODE4,192.168 .1.4 NODE6_NODE2,192.168 .1.2 Adding IEM connections 1. Place an iem2iem.txt file in the IEM name folder on the USB flash drive. The iem2iem.txt file must contain one connection per line in the form of <localIEMname_remoteIEMname>,IPaddress (no spaces allowed and name is limited to 16 characters). For example, in IEM#1 the iem2iem.txt table might be: NODE2_NODE4,192.168.0.4 NODE2_NODE6,192.168.0.6 2. Insert the USB flash drive into the IEM and reboot to update the table. 40 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications Note Existing IEM connections not listed in the iem2iem.txt file will be removed. The alias name <localIEMname_remoteIEMname> must be used with the CONNECT function block. This makes all IEM connections unique. Sending data from ACM3 in "Node4" to an ACM5 in "Node6" Step Procedure 1 Configure IEM#2 Node4 with its connection table (iem2iem.txt). 2 Configure IEM#3 Node6 with its connection table (iem2iem.txt). 3 Since the data is to be exchanged with Node6, a CONNECT block is placed in the ACM3 configuration in Node4 and the resource name is set to NODE4_NODE6, since this is the name of the connection from Node4 to Node6. 4 A GW_SEND block is placed in the ACM3 configuration and wired to the CONNECT block. 5 A CONNECT block is placed in the ACM5 configuration in Node6, and the resource name is set to NODE6_NODE4, since it is expecting the data to come from Node4. 6 A GW_REC block is placed in the ACM5 configuration, and wired to the CONNECT block. The data flow in the above configured system follows: Step Procedure 1 The GW_SEND in ACM3 sends the data to the IEM "Node4". 2 "Node4" sends the data to "Node6". 3 The IEM, "Node6", receives the message. It checks the source of the message, and recognizes that the source is on the other side of its "Node4" connection. 4 The GW_REC in ACM5 reads the data from the IEM, "Node6". Details for configuring the GW_SEND and GW_REC blocks are in the following sections. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 41 Configuration - APACS+ Peer-to-Peer Communications Note You must configure each IEM participating in the connection separately. For example, if a connection is made from Node4 to Node2, a corresponding connection must also be made from Node2 to Node4. IEM1 IEM2 The following connection table is invalid because the IEM has two connections to the other IEM. All errors are reported to the status.txt file which is downloaded to the USB flash drive. Node3 N02, 192.168.1.102 O Error Node2, 192.168.1.102 IEM1 6.2 IEM2 Using the CONNECT Block with GW_SEND and GW_REC Blocks 42 * Establishes the communication channel ID between two ACMs. * Each ACM must contain one CONNECT block for each remote segment with which it is to communicate. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications Note The APACS+ controller program uses a CONNECT block to make a connection for exchanging data using the GW_REC and GW_SEND blocks. The NAME parameter is used to identify the name of the remote IEM connected to the remote APACS+ controller that will be exchanging data. To keep these names unique use the local IEM name and the remote IEM name together <localIEMname_remoteIEMname>. This NAME parameter is limited to 16 characters with no spaces and is case sensitive. The recommended convention is to always use uppercase text for the NAME parameter. The same exact text is used for configuring the IEM using the USB file iem2iem.txt. This file holds the IEM names and their corresponding network IP addresses. If the APACS+ program uses uppercase text for the CONNECT NAME, then the iem2iem.txt file must also have the same name text in uppercase. See section 7 titled "Configuration - S7 to APACS+ Communications" for further information on these configuration components. * CONNECT blocks are required for all IEM communications using GW_SEND and GW_REC. Although multiple GW_SEND / GW_REC blocks can be configured, only one CONNECT block is required for transferring data between a resource and a remote segment. The channel ID displayed at the ID output of the CONNECT block provides the connection. When additional communication is necessary with a different remote segment, an additional CONNECT block is required. CONNECT (When TRUE , allows block to function ) BOOL local IEM name _ remote IEM name (e.g. `NODE4_NODE2') EN NDR BOOL (TRUE when connection is established REUSE ERROR BOOL (TRUE for an error ) `STRING NAM STATUS INT (Code for last detected error ' E (Not used ) BOOL ID DEVICE ) ) INT (Communications channel that the two ACMs will use . Max 8) INT (Not used ) Figure 6-5 APACS+ Connect Block 6.3 GW_SEND and GW_RCV Blocks * These blocks work as a pair and provide one-way communications between an APACS+/QUADLOG controller and another APACS+/QUADLOG controller or an S7 controller. * The Remote Identification (R_ID) input to each GW_SEND/GW_RCV pair must be identical. This common linking ID is how the two blocks are linked together - The GW_SEND block must exist in one resource, while a paired (common R_ID) GW_RCV block is in the other resource. See section 7 titled "Configuration - S7 to APACS+ Communications" for further information on these configuration components. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 43 Configuration - APACS+ Peer-to-Peer Communications 6.3.1 GW_SEND GW_SEND EN DONE1 C_ID1 ERROR1 C_ID2 STAT1 RD_ID MSGS1 REALS DONE2 BOOLS ERROR2 WORDS STAT2 MSGS2 Figure 6-6 Original GW_SEND Block in APACS+ 44 * Each APACS+/QUADLOG GW_SEND function block is used to send data to one paired GW_REC block in another ACM/CCM or an S7 controller. * The GW_SEND may be configured to send 32 REAL, 32 BOOLS, and 16 WORD values to its paired GW_REC block in another APACS+/QUADLOG or S7 controller resource. The send values are stored in arrays (REALS, BOOLS, and WORDS) which appear as inputs to the GW_SEND block. * In the APACS+/QUADLOG or S7 resource, a linked (R_ID) GW_REC block must be configured to receive the data. The identical R_ID input parameter links the two blocks together. * Please see section 8 titled "Communication Blocks - GW_SEND and GW_REC" for more information on an update for the ACM, ACM+ (v4.45) and ACMx (V4.52) which also allows for STRING data to be sent and received over the GW_SEND and GW_REC function blocks. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications 6.3.2 GW_REC GW_REC EN RCOUNT C_ID1 QSUBON C_ID2 USING1 R_ID NDR1 SUB_RL ERROR1 SUB_BO STAT1 SUB_WD MSGS1 REALS DROP1 BOOLS NDR2 WORDS ERROR2 STAT2 MSG2 DROP2 MISS Figure 6-7 Original GW_REC Block in APACS+ 6.4 * The APACS+/QUADLOG GW_REC function block is used to receive data from a paired GW_SEND block in another APACS+/QUADLOG or an S7 controller. * The GW_REC may be configured to receive 32 REALS, 32 BOOLS, and 16 WORD values from another APACS+/QUADLOG or S7 controller resource. The received values are stored in arrays (WORDS, BOOLS, and REALS) which appear as inputs to the GW_REC block. * In the APACS+/QUADLOG or S7 controller, a corresponding GW_SEND block must be configured to send the data. The identical R_ID input parameter links the two blocks together. * Please see section 8 titled "Communication Blocks - GW_SEND and GW_REC" for more information on an update for the ACM, ACM+ and ACMx which also allows for STRING data to be sent and received over the GW_SEND and GW_REC function blocks. Example: M-Net to Ethernet Upgrade Procedure This is a partial implementation example of replacing existing ACM communications using the READ block over MNET with GW_SEND and GW_REC blocks. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 45 Configuration - APACS+ Peer-to-Peer Communications Engineering Station Tag Server Ethernet IEM#1 Node2 192.168.1.2 IEM#3 Node6 192.168.1.6 IEM#2 Node4 192.168.1.4 MBUS MBUS Node2 A C M 1 A C M 2 MBUS Node4 A C M 3 Node6 A C M 4 A C M 5 A C M 6 Figure 6-8 Multi-node APACS+ System Using Ethernet with IEMs Figure 6-9 Interlocking of Communications Blocks in APACS+ The following is an overview of procedures that corresponds with the two graphics above. Each step of the overview refers to a procedure detailed in subsections below: 46 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications 1. Install the IEM. 2. Configure the IEM. 3. Modify the 4-mation configuration. Install the IEM 1. Mount the IEM to a wall or rack using included flanges. For further installation information, please refer to one of the following manuals: - SIMATIC Box PC 627C Getting Started Guide (A5E02669077-02) - SIMATIC Box PC 627B Getting Started Guide (A5E00927400-01) - SIMATIC Box PC 627 Getting Started (A5E00362056-01) - SIMATIC Box PC 620 Getting Started (A5E00131477-03) 2. Connect AC power. 3. Connect MBUS. 4. Connect Ethernet cable. Configure the IEM 1. Prepare the file gateway.ini, configuring MBUS and and Ethernet communication. See Section 4 titled "Configuration - MBUS/Ethernet Network Settings." 2. Prepare the file iem2iem.txt, configuring the connections list. See Section 6.1 titled "IEM Connection Tables Setup." 3. Apply the prepared configuration files to the IEM. See Section 3, titled "Configuration - Basic USB Flash Drive Operation." Modify the 4-mation configuration Establish the IEM connection by configuring the CONNECT blocks in each resource From the controller that contains the current READ block, add a CONNECT block. The NAME input of the CONNECT block will be a string the same name as the IEM connection. When the CONNECT block is enabled with the name of the connection, there will be a non-zero value on the CONNECT block's ID output. This indicates a successful connection. Configure the GW_REC block 1. Place a GW_REC block on the configuration sheet with the new CONNECT block. 2. Click the F7 Derived Function key, and place the cursor on the configuration sheet where you want to place the block. The Function Block Types dialog box opens. 3. From the Categories area, select the Standard radio button. 4. From the Name/Category list, select GW_REC. Click the Select button. The block appears on the configuration sheet. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 47 Configuration - APACS+ Peer-to-Peer Communications 5. Connect the ID output from the CONNECT block to the C_ID1 input of the GW_REC block. You can use a variable, a wire, or a stub. If you have more than one GW_REC connected to the same node, it may be useful to use a Global variable for the ID. Create arrays on the GW_REC block. 1. Create arrays on GW_REC for the REALS (max 32 elements), BOOLS (max 32 elements), and WORDS (max 16 elements) to the input side of the GW_REC block. 2. Fan-out the values of the array using standard left to right assignments in an open area of the configuration sheet. Configure the corresponding GW_SEND block 1. Configure the SEND IEM the same way you configured the REC IEM. 2. Assuming the values from the source controller are on several configuration sheets, create a PROGRAM block to consolidate these values. 3. In the new consolidation PROGRAM block, place a CONNECT block. The NAME input of the CONNECT block will be a string the same name as the destination IEM. 4. Click the F7 Derived Function key, and select the configuration sheet where you want to place the block. The Function Block Types dialog box will open. 5. From the Categories area, select the Standard radio button. 6. From the Name/Category list, select GW_SEND. Click the Select button. The block should appear on the configuration sheet. 7. Connect the CONNECT block ID output to C_ID1 Input. Use the same R_ID as the GW_REC block and enable the SEND block. Create arrays on the GW_SEND block. 1. Create an array for REALS, BOOLS and WORDS. If the variables to send are on more than one configuration sheet, it is advisable to use a global array. 2. Assign the variables to the arrays using standard left to right assignments such as (assuming a global array): <var_name> - |<array_name>|[element] or TANK1_LVL - |SND_REAL|[13] Note Any Engineering Stations or Tag Servers that interfacing with these IEMs must have the IEMs added to their APACS.ini current NIM list from the APACS+ Control Panel Applet. 48 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - APACS+ Peer-to-Peer Communications Figure 6-10 Writing to an Array Element in APACS SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 49 Configuration - S7 to APACS+ Communications 7 After the hardware is installed and the power supply is switched on, three steps are required to put the IEM into operation: 1. In a STEP 7 project using the HW-Config program within STEP 7, configure the IEM as a SIMATIC PC Station and as a participant to the plant bus. 2. Using the NetPro program under STEP 7, configure S7 connections between the IEM and the participating S7 stations. 3. Configure the IEM settings by entering the IP addresses from NetPro. These tasks are described in the following sections. Once the IEM is in operation, configure the specific function blocks in the APACS+/QUADLOG and SIMATIC S7/PCS7 systems. The function blocks and their configurations are described in Function Blocks section. 7.1 Hardware Component Configuration in a STEP 7 Project In STEP 7, the S7 stations and the IEMs are configured to be connected to a common Industrial Ethernet plant bus. 7.2 Setting up S7 Stations For the IEM, select the station type SIMATIC PC Station in STEP 7. Use the Insert function to integrate the station into a STEP 7 project. Using the HW-Config utility, assign the first two plug-in slots in the SIMATIC PC station (the IEM station) as follows: * CP/IE General must be in slot one * User application must be in slot two 7.3 Adding the IEM to a PCS 7 project 7.3.1 Ensuring Proper Hardware Component Profiles Two hardware profiles are needed for different IEM types: * IEM v2.0 and v2.1 - IEM_PROFILE.zip * IEM v3.0 - IEM_PROFILE_v3.0.zip For the IEM v2.0 and v2.1 PCS 7 system 6.0 and earlier have the necessary hardware component profiles to properly configure the IEM. However, PCS 7 6.1 and later systems do not supply these profiles. These later systems instead Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 51 Configuration - S7 to APACS+ Communications provide later versions of the IE General and Application components that are not compatible with the IEM. The later versions are easily identified in both NetPro and in the Hardware Catalog by their firmware version compatibility numbers, which are appended to their component names: Figure 7-1 Firmware Version Compatibility Number in Hardware Catalog A file (IEM_PROFILE.dat) is available on the CD containing the necessary profiles for these later systems. This file contains only the elements necessary to configure IEM v2.0 and v2.1 on Box620, Box627 and Box627B. For the IEM v3.0 a file (IEM_PROFILE_v3.0.dat) is available on the CD containing the necessary profiles for the Box627C. 1. Locate the file \Profile\IEM_PROFILE.zip or file \Profile\IEM_PROFILE_v3.0.zip on the CD or Download either file from the following site: http://support.automation.siemens.com/US/view/en/30340213: 2. Unzip the file contents to the following location: \Program Files\Siemens\STEP7\S7DATA\SWHWPRF\B\ - Or \Program Files\Siemens\STEP7\S7DATA\S7HWPRF\B\ 52 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications 3. Place the file IEM_PROFILE.dat or file IEM_PROFILE_v3.0.dat in any language folders where it is required (the "B" folder is for system configured to use English: Figure 7-2 .DAT file in "B" Folder 4. In NetPro open the Hardware Configuration utility for the IEM station you wish to configure. Select the IEM_PROFILE or IEM_PROFILE_v3.0 from the list: Figure 7-3 IEM_PROFILE in Hardware Catalog 5. With the IEM_PROFILE or IEM_PROFILE_v3.0 open, SELECT THE APPROPRIATE IE General and Application components: SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 53 Configuration - S7 to APACS+ Communications Figure 7-4 Selecting IEM in Hardware Catalog 6. For the IEM_PROFILE the correct versions have no firmware version extension on their names, first figure below. For the IEM_PROFILE_v3.0 the correct versions have no firmware version extension on their names but the Firmware column does have versions V7.1 and V6.3, second figure below. 54 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications Figure 7-5 Confirming Proper Firmware Versions The IEM_PROFILE components are appropriate for IEM 2.0 and 2.1 Box620, Box627 and Box627B. The IEM_PROFILE_v3.0 components are only appropriate for IEM 3.0 Box627C. 7.3.2 Adding an IEM in SIMATIC Manager 1. Open the PCS 7 project in SIMATIC Manager. 2. In the component view, add a SIMATIC PC Station at the root of the hierarchy. Give it a meaningful name, then click on the name to open the next level. A Configuration object should appear in the right pane. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 55 Configuration - S7 to APACS+ Communications Figure 7-6 Setting Up in SIMATIC Manager 3. Double-click Configuration in the right pane to open the HW Config utility. 4. Follow the steps in the previous section 4 thru 6 from the Hardware Catalog. 5. Save the hardware configuration changes. The IEM itself is preconfigured to contain a generic network card and a single application. Note The configuration must match only IE General in slot 1 and the application in slot 2, or NetPro will not be able to download the configuration to the IEM. 7.4 Ethernet Configuration To set up the bus system to which the IEM station must be connected, follow these steps: 1. Open the PCS 7 project in SIMATIC Manager. 2. In the Component view, open the hardware configuration for the IEM. 3. In the HW-Config utility, right-click IE General, and select Object Properties to open a window with the bus connection parameters. 56 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications Figure 7-7 HW Configuration in SIMATIC Manager 4. The IE General Properties show the IP (Ethernet) address of the IEM station that is automatically assigned by HW-Config. Click Properties to display the General Properties dialog. Change the IP address and the subnet mask, if necessary. Figure 7-8 Setting General Properties in SIMATIC Manager 5. Make note of the IP address for the IEM station and the subnet mask specified in HW-Config. These are required for IEM configuration later. Set MAC address / use ISO protocol must be unchecked. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 57 Configuration - S7 to APACS+ Communications 6. In the lower part of the dialog, under Subnet, enter the bus system parameters. Make sure that the IEM station is connected to the same bus as the S7 CPUs that are to communicate with the IEM. 7.5 Configuration of Connections in STEP 7 The NetPro utility is used to configure S7 connections between the IEM and an S7 CPU. The NetPro utility is a STEP 7 component. NetPro defines and centrally administers all connections. The parameters of the S7 connections are imported into the S7 CPUs and the IEM (it is necessary to download connections to the IEM) using standard procedures of the S7 configuration. NetPro shows all the stations of an S7 project. Use NetPro to select a participant to the Ethernet and insert a connection to another participant to the Ethernet. The IEM station must be selected to establish an active connection. It is important, however, that the connection between the S7 CPU and IEM is of the S7 connection type. NetPro assigns the active role to the IEM when establishing an online connection. When the IEM station is selected, the following value appears in the connection parameters: Actively establish connection = yes. The value is no when the CPU is selected. It is possible to configure a non-redundant connection to the IEM from any CPU of a redundant S7 station. Each CPU has its own communication module, which provides access to the Ethernet. S7 and APACS+ function blocks with redundant connections use all available configured connections to the IEM and automatically coordinate the data traffic using these connections. Each of the two connections can handle the entire communication between the IEM and the CPU. Communication is not affected if one of the two connections (one of the two redundant S7 station subsystems) fails. Notes 58 * The IEM does not support fault-tolerant connections with H systems. Use regular connections, and select unique names. * When the connection is made in NetPro, you see it appear as a database style record. * When viewed in NetPro with the focus placed on the IEM application, the first two fields from the left Local_ID and Partner_ID are of importance: * Local_ID holds the connection name string value the APACS+ communication block will use. * Partner_ID holds the parameter value to be used in the associated S7 Gateway CFC block's C_ID nub. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications 7.6 Configuring the system to exchange data between APACS+/ QUADLOG and PCS 7 1. Open the PCS 7 project in SIMATIC Manager. 2. Open Network Configuration. NetPro displays all of the controllers in a network view. 3. Select the application in the IEM that will send the data to the S7-400 controller. 4. Select Insert > New Connection from the NetPro menu bar. 5. In the Insert New Connection dialog, select the S7 controller and the CPU. The Connection Type is S7 connection. Figure 7-9 NetPro Setup -1 6. Click Apply, and then edit the text in the Local ID field to give it a proper connection name. Give the connection the same (or similar) name as the controller. (For a redundant system, it is recommended to append an "A" to the name on the primary path, and a "B" for the backup path.) Note Since the connection name is used as the virtual APACS+ resource name, the connection name must be a valid and unique APACS+ resource name. Therefore, the resource name must be limited to 16 alphanumeric characters and the user must ensure it is unique name on the MBUS. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 59 Configuration - S7 to APACS+ Communications Figure 7-10 NetPro Setup - 2 A redundant configuration is shown below. Here there are two separate Ethernet IEMs, each with a separate Ethernet network. Likewise, the S7 Hsystem has each of its two CP443 modules on the separate networks. Figure 7-11 NetPro Setup -2 7. Select the CPU associated with the CP443 module on the same network. 60 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications Figure 7-12 NetPro Setup -3 8. Compile and download the connection data to the IEM. Be sure to choose the Download Selected and Partner Stations Option. The IEM creates virtual APACS+ controllers using the names given to the connections in the previous step. Note When connection information is downloaded to the IEM, all communication connections between S7 and APACS+ halts. 9. Open the CFC configuration for the controller. 10. Add GW_REC and GW_SEND blocks to the S7-400 controllers as needed. For the ID1 and ID2 (redundant) connections, use the values assigned to the connections by NetPro. 11. Assign R_ID values to the blocks that are unique for the connection. Start with "1" for the first value, and assign additional values consecutively. Note Failure to assign unique R_IDs may result in indeterminate behavior. 12. Configure the GW_SEND blocks with the desired Real, Boolean, and Word data to send to APACS+/QUADLOG. 13. Compile and download changes to the controller. 14. Open the APACS+/QUADLOG configuration in 4-mation. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 61 Configuration - S7 to APACS+ Communications 15. Using 4-mation, add a connect block in APACS+ to connect to the virtual APACS+ controller created by the IEM from the connection data in step 8. If redundant data paths are used, two CONNECT blocks are required. 16. Configure the name for the controller input in the CONNECT block using the name given to the connection in step 6 above. 17. Using 4-mation, add the appropriate GW_SEND and GW_REC blocks to the APACS+ configuration. Each GW_SEND block in APACS+ is used to send data to a corresponding GW_REC block in an S7-400 controller. Each GW_REC block in APACS+ receives data from a corresponding GW_SEND block in an S7-400 controller. Set the EN input to TRUE to enable the blocks. Figure 7-13 Communication Blocks in 4-mation 18. Connect the ID output of the CONNECT blocks to the ID1 and ID2 inputs of the GW_REC and GW_SEND blocks in APACS+. ID1 is the primary communication channel, and ID2 is the backup channel. (See Figure 7-13.) 62 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Configuration - S7 to APACS+ Communications 19. Configure the R_ID input for the GW_SEND and GW_REC blocks. The R_ID value should match the R_ID value on the corresponding block on the S7-400 controller. 20. Configure the REALS, BOOLS, and WORDS inputs of the GW_SEND blocks with arrays containing the desired data to send to S7. Configure the REALS, BOOLS, and WORDS inputs of the GW_REC blocks with arrays to receive the data sent from S7. 21. Download the APACS+ configuration to the APACS+ resource. APACS+/ QUADLOG should now be able to exchange data with the S7-400 controller. Figure 7-14 shows the completed configuration. The circled numbers with arrows correspond to the configuration steps above. ID = 2 Co Na nne m cti e= on PL C1 _A Figure 7-14 STEP 7 / APACS+ Communications Overview SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 63 Communications Blocks - GW_SEND and GW_REC 8.1 8 Overview The APACS+/QUADLOG IEM Communication Function Block Library adds specialized function blocks to 4-mation to permit the configuration of communications between APACS+/QUADLOG controller resources and S7 Controller resources via the Industrial Ethernet Module (IEM). The IEM is connected to both the MODULBUS network and Industrial Ethernet to serve as a gateway between APACS+/ QUADLOG and S7. The blocks are designed to pass data between an S7 controller through the IEM to an APACS+/QUADLOG resource. In addition, the blocks provide communications between APACS+/QUADLOG resources on different MBUS segments. The APACS+/QUADLOG library blocks are used in conjunction with the S7 IEM communication blocks as send-receive pairs to provide a data transmission capability. The library contains two function blocks: GW_SEND and GW_REC. The S7 function blocks for communication with APACS+/QUADLOG are copied from a provided function block library into an S7 project using the SIMATIC Manager. These blocks will be used to communicate with APACS+ (ACM, ACM+, ACMx), QUADLOG (CCM, CCM+, CCMx). The interface is the same in all environments. However, the new enhancement of STRING data passing for the APACS+ (ACM, ACM+ and ACMx controllers) makes the GW_SEND and GW_REC blocks slightly different with regard to extra input nubs (see Note below). These blocks are only available for APACS+ peer-to-peer connections NOT APACS+ to S7 connections. Note When using the new enhanced APACS+ blocks with STRING inputs the physical size of the GW_SEND and GW_REC blocks have not changed from the original blocks. Therefore, exporting and importing into your off-line configuration with existing blocks should not cause a problem. So even though the new blocks contain extra input nubs they should not be connected to anything and the new blocks will function the same as the previous blocks when transferred to the online controller. 8.1.1 Online Configuration APACS+/QUADLOG blocks can be configured online. After a change to any of the S7 communication block's Remote ID (R_ID) inputs, restart the S7 controller. All of the other parameters required for communication between APACS+/QUADLOG and SIMATIC PCS 7 are contained in the APACS+/QUADLOG or S7 function blocks. When changing, adding, or removing connected function blocks in either system, no changes are required on the IEM. Active connections between function blocks in the APACS+/QUADLOG and PCS 7 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 65 Communications Blocks - GW_SEND and GW_REC systems are not affected by the configuration and connection of more function blocks. Note If an R_ID value is used that is greater than the MAX R_ID configuration parameter in the IEM, then the MAX R_ID must be reconfigured in the IEM. After the IEM Library is properly installed in APACS+/QUADLOG, the 4-mationTM configuration software automatically includes the IEM GW_SEND and GW_REC function blocks after a new configuration has been initialized. These function blocks can be selected from 4-mation's Standard function block list (they do not appear on the icon bar). 1. Use the DERIVED key and then select the Standard option button to display the list of function blocks in 4-mation. 2. Highlight the GW_SEND or GW_REC block and choose the SELECT button to place the block on the sheet. 8.1.2 Common Features of the Send Function Block 8.1.2.1 Data Sources The GW_SEND block sends 32 REAL, 32 BOOL, and 16 WORD values. An R_ID input parameter identifies the block with the corresponding GW_REC block. The APACS+ (ACM, ACM+ and ACMx controllers) can also send Strings based on the array dimensions specified. In the S7 GW_SEND block, each REAL, BOOL, and WORD value is configured as an individual input parameter of the block. In the APACS+/QUADLOG GW_REC, there is one array input parameter for the REALS, one array input parameter for the BOOLs and one array input parameter for the WORDs. 8.1.2.2 Connection to Receive Function Blocks The GW_SEND block has two ID inputs specifying the communication paths. These are input from the ID outputs from connect blocks in APACS+. 8.1.3 Common Features of the Receive Function Block 8.1.3.1 Data Destination The GW_REC block receives 32 REAL, 32 BOOL, and 16 WORD values. An R_ID input parameter identifies the block with the corresponding GW_SEND block. The APACS+ (ACM, ACM+ and ACMx controllers) can also receive Strings based on the array dimensions specified. In the S7 GW_REC block, each received REAL, BOOL, and WORD value is shown as an individual output parameter of the block. In the APACS+/QUADLOG GW_SEND, there is one array parameter for the received REALS, one array parameter for the received BOOLs and one array parameter for the received 66 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC WORDs. Note that although these arrays function as outputs, they appear on the input side of the block due to an APACS+ restriction which prevents arrays from appearing on the output side. In the S7 GW_REC block, each substitute REAL, BOOL, and WORD value is shown as an individual input parameter of the block. In the APACS+/QUADLOG GW_REC, there is one array parameter for the substitute REALS, one array input parameter for the substitute BOOLs and one array input parameter for the substitute WORDs. If the SUBS_ON parameter is true and the block encounters an error, then the configured substitute values are copied to the REAL, BOOL and WORD outputs. 8.1.3.2 Connection to Send Function Blocks The GW_REC block has two ID inputs specifying the communication paths. These are input from the ID outputs from CONNECT blocks in APACS+. 8.2 APACS+/QUADLOG GW_SEND Function Block The APACS+/QUADLOG GW_SEND function block is used to send data to an S7 controller, or another APACS+ resource. The GW_SEND may be configured to send 32 REALS, 32 BOOLS, and 16 WORD values to an S7 controller resource. The send values are stored in arrays (REALS, BOOLS, and WORD) which appear as inputs to the GW_SEND block. In the S7 or APACS+ resource, a corresponding S7 GW_REC block must be configured to receive the data. An R_ID input parameter identifies the block with the corresponding S7 GW_REC block. The GW_SEND block has two C_ID inputs specifying the communication paths. These are input from the ID outputs from CONNECT blocks. The CONNECT block must be configured with the connection name of the corresponding S7 Netpro connection to the IEM, or the connection name of the remote APACS+/QUADLOG IEM. For non-redundant communication, configure only C_ID1. For redundant communication, configure both C_ID1 and C_ID2 inputs. When used redundantly, the GW_SEND block transmits the same data to two separate IEMs. When the EN input is TRUE, the block sends the configured data every other scan. Therefore if the scan rate of the controller is 100 ms, the data is sent at a rate of 200 ms. The GW_SEND block transmits at each opportunity, even if the data values are unchanged. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 67 Communications Blocks - GW_SEND and GW_REC GW_SEND EN DONE1 GW_SEND EN C_ID1 ERROR1 C_ID2 STAT1 RD_ID MSGS1 REALS DONE2 BOOLS ERROR2 WORDS STAT2 MSGS2 DONE1 C_ID1 ERROR1 C_ID2 STAT1 RD_ID MSGS1 REALS DONE2 BOOLS ERROR2 WORDS STAT2 STRNGS MSGS2 Figure 8-1 Original (left) GW_SEND Block and New (right) for APACS+ with STRINGS Note The APACS+/QUADLOG GW_SEND block is unable to detect whether the S7 controller containing the GW_REC block is not running. 68 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC Table 8-1 GW_SEND Parameters Parameter Data Type Description/Comments Inputs EN BOOL When TRUE, the block writes data to the S7 partner GW_REC block (through the IEM) every other scan. C_ID1 INT Connection ID - identifies the communication channel between two resources. Obtained from the ID output of the CONNECT block. C_ID2 INT Connection ID - identifies an additional communication channel between two resources to be used for redundancy. Obtained from the ID output of another CONNECT block. R_ID DINT Remote Message ID - Must match the R_ID of the corresponding REC block. REALS ARRAY Send Array of REALS. A maximum of 32 elements will be sent. Only a 1 dimensional array of type REAL is permitted. BOOLS ARRAY Send Array of BOOLS. A maximum of 32 elements will be sent. Only a 1 dimensional array of type BOOL is permitted. WORDS ARRAY Send Array of WORDS. A maximum of 16 elements will be sent. Only a 1 dimensional array of type WORD is permitted. STRNGS (see Notes below) ARRAY Send Array of STRINGS. (maximum 8 Strings of 16 characters each) * Siring Size = 16 * Dimensions = 1..8 (maximum 4 Strings of 32 characters each) * Siring Size = 32 * Dimensions = 1..4 (maximum 2 Strings of 64 characters each) * Siring Size = 64 * Dimensions = 1..2 Notes Only applies to APACS+ (ACM, ACM+ and ACMx controllers) for peer-to-peer connections. When using the GW_SEND block with Strings the REALS, BOOLS and WORDS must not be connected to anything or an error '47 Array Input Not Valid' will be seen on STATx. On the GW_SEND block the new STRNGS array input nub at the bottom is configured for sending Strings. The STRNGS array can be configured different ways based on the configuration needed, but must be 1-dimensional or an error '47 Array Input Not Valid' will be seen on STATx and ERRORx will be set true. Also note the String Size must be the same between GW_SEND and GW_REC pairs or the same error '47 Array Input Not Valid' will be seen on STATx. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 69 Communications Blocks - GW_SEND and GW_REC Outputs DONE1 BOOL TRUE = Send command completed successfully this scan on connection ID1. ERROR1 BOOL Error indicator. TRUE = problem writing the data on connection ID1 or configuration error. STAT1 STRING Contains a string description of the last detected error code for connection ID1. Empty if no error. MSGS1 UDINT Number of Messages output for connection ID1. Indicates the number of complete send (write) operations since the function block was last initialized. Disabling and re-enabling the CONNECT block used in conjunction with this function block zeros this value. This number is also reset when it reaches 1000. DONE2 BOOL TRUE = Send command completed successfully this scan on connection ID2. ERROR2 BOOL Error indicator. TRUE = problem writing the data on connection ID2 or configuration error. STAT2 STRING Contains a string description of the last detected error code for connection ID2. Empty if no error. MSGS2 UDINT Number of Messages output for connection ID2. Indicates the number of complete send (write) operations since the function block was last initialized. Disabling and re-enabling the CONNECT block used in conjunction with this function block zeros this value. This number is also reset when it reaches 1000. Timeout UINT Block Timeout parameter in milliseconds. If the block does not receive a response to a write message within the duration established by this timeout value, the block indicates an error on its STATUS output. Default = 3000 Version STRING Contains the version string of the function block for easy identification. Softlist Error Codes The STATUS output of the GW_SEND block can provide the error codes/messages shown in Table 8-2. Table 8-2 GW_SEND Error Codes and Messages ERR_CODE 38 Dest Database Rev Changed 70 Explanation Indicates the configuration in the destination resource (the IEM) has changed and this function block must reinitialize. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC ERR_CODE Explanation 39 Destination Did Not Respond Indicates the destination resource did not respond within the timeout period determined by the Timeout softlist parameter with an acknowledge signal. 40 Tag Name Not Found in Dest Indicates the function block has failed to find the desired tag name in the destination resource. This error is typically seen if the R_ID exceeds the maximum allowed by the IEM. 45 Invalid ID Input Indicates that this function block is not connected to the Resource Name specified by the CONNECT function block. The CONNECT block's ID output must be connected to this block's ID input, and the connection ID must be non-zero. 46 Initializing Block Indicates that this function block is performing initialization because of one of the following reasons: The configuration has changed A communications error has occurred A configuration error has occurred 47 Array Input Not Valid Indicates that one or more of the input send arrays (REALS, BOOLS, WORDS) is not valid. If an array is connected, it must have the expected data type and one dimension. At least one of these arrays must be configured for the block to send data, but it is not necessary to configure ones that are not needed. 48 Block Out Of Memory Indicates the function block has run out of memory for the communications resources required to send messages. It may be necessary to reduce communication function block configuration. 49 Waiting For Response Indicates the function block is waiting for the destination resource to respond with either an acknowledge signal or the data being read. 52 Invalid R_ID The R_ID input is invalid for one of the following reasons: the input is not connected or the R_ID exceeds the maximum allowed by the Gateway. 8.3 APACS+/QUADLOG GW_REC Function Block The APACS+/QUADLOG GW_REC function block is used to receive data from an S7 controller. The GW_REC may be configured to receive 32 REALS, 32 BOOLS, and 16 WORD values from an S7 controller resource. The received values are stored in arrays (REALS, BOOLS, and WORDS) which appear as inputs to the GW_REC block. In the S7 controller, a corresponding S7 GW_SEND block must be configured to send the data. An R_ID input parameter identifies the block with the corresponding S7 GW_SEND block. The GW_REC block has two C_ID inputs specifying the communication paths. These are input from the ID outputs from CONNECT blocks. The CONNECT block must be configured with the connection name of the corresponding S7 Netpro connection to the IEM, or the connection name of the remote APACS+/QUADLOG SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 71 Communications Blocks - GW_SEND and GW_REC IEM. For non-redundant communication, configure only C_ID1. For redundant communication, configure both C_ID1 and C_ID2 inputs. If operating redundantly, the data received on C_ID1 will always be used in the receive arrays when no error occurs. If an error occurs on C_ID1 and data is received successfully on C_ID2, then the data from C_ID2 will be used. The receive arrays are updated after a 0-to-1 transition of the signal at output NDR1 or NDR2 ("New Data Ready" on C_ID1 or C_ID2, respectively). Block outputs are provided on each connection for NDR, ERROR, STAT, MSGS, and DROP. These outputs indicate "New Data Received", ERROR received, STAT value for the receive, number of MSGS received, and number of dropped messages. For example, connection one has the outputs NDR1, ERROR1, STAT1, MSGS1, and DROP1. The block output for RCOUNT indicates the number of received REAL values and the block output QSUBS_ON indicates that the output values for the BOOLS, WORDS, and REALS are not received values, but instead are the substitute values. The GW_SEND block transmits its data with its own internal incrementing "reference count" (REFCNT). The GW_REC block checks for the data received on each connection to determine if a "reference count" has been missed. The DROP value is incremented whenever the data received on the connection has a "reference count" exceeding the next expected value. For example, if the last data had REFCNT=1, then the next expected REFCNT=2. However, if the next data had REFCNT=3, then DROPn would be incremented. A DROP can occur if the GW_SEND block is sending at a faster rate then the GW_REC can receive. A DROP can also occur due to transient network upsets/congestion or if programming, debugging, or downloading is occurring to either the GW_SEND or GW_REC controller. Even though one connection might see a DROP condition, the data will most likely come over the redundant connection. When used redundantly, the GW_SEND block transmits the same data (same REFCNT) to two separate IEMs. If the DROP is seen on one connection, it might not occur on the other. Only when GW_REC misses the next REFCNT entirely is the MISS output set to TRUE. The GW_REC block also permits using substitute values for the 32 REALS, 32 BOOLS, and 16 WORD values when an error occurs. Two settings are required to enable value substitution. Unless the softlist parameter SUBS_ON is true, no substitution occurs. When SUBS_ON=TRUE, then substitution occurs after REC_MON cycles have elapsed and no new data has been received or another error has occurred. The absence of new data could be due to an error locally or remotely. When SUBS_ON=FALSE, the block will report "Stale Data" in the absence of new data after REC_MON cycles have elapsed. The REC_MON should be set to a value outside of the normal receive behavior for the block. For instance, if the GW_REC is placed in a controller with a fast scan rate, then many scans might occur before any new data is received. When GW_REC is used with a slow scan rate then fewer "no data" scans would occur between receives. The setting made for REC_MON is typically made once the update behavior of the GW_SEND/ GW_REC data exchange has been observed. However, a large setting can be made based on the expected performance. For example, if the expectation is to receive data every second, then the REC_MON setting can be configured to use the value substitution after 10 "idle" seconds. If the GW_REC is placed in a controller running at 100 ms cycle, then 10 seconds corresponds to 100 calls (make REC_MON=100). 72 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC GW_REC GW_ REC EN RCOUNT EN RCOUNT C_ID1 QSUBON C_ID1 QSUBON C_ID2 USING1 C_ID2 USING1 R_ID NDR1 SUB_RL ERROR1 SUB_BO STAT1 SUB_WD MSGS1 REALS DROP1 BOOLS NDR2 WORDS ERROR2 STAT2 MSG2 DROP2 MISS R_ID NDR1 SUB_RL ERROR1 SUB_BO STAT1 SUB_WD MSGS1 REALS DROP1 BOOLS NDR2 WORDS ERROR2 STRNGS STAT2 SUB_ST MSG2 DROP2 MISS Figure 8-2 Original (left) GW_REC Block and New (right) for APACS+ with STRINGS Table 8-3 GW_REC Parameters Parameter Data Type Description/Comments Inputs EN BOOL When TRUE, the block reads data from the S7 partner GW_SEND block (through the IEM) each scan. C_ID1 INT Connection ID - identifies the communication channel between two resources. It is to be obtained from the ID output of the CONNECT block. C_ID2 INT Connection ID - identifies an additional communication channel between two resources to be used for redundancy. Obtained from the ID output of another CONNECT block. The data from this connection will not be used unless a problem is detected with connection ID1. R_ID DINT Remote Message ID - Must match the R_ID of the corresponding SEND block. SUB_RL ARRAY Substitute Array of REALS. These values, if configured, will be copied to the RD_RL array if the block does not receive data and the SUBON parameter is TRUE. Only a 1 dimensional array of type REAL is permitted. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 73 Communications Blocks - GW_SEND and GW_REC Parameter Data Type Description/Comments SUB_BO ARRAY Substitute Array of BOOLS. These values, if configured, will be copied to the RD_BO array if the block does not receive data and the SUBON parameter is TRUE. Only a 1 dimensional array of type BOOL is permitted. SUB_WD ARRAY Substitute Array of WORDS. These values, if configured, will be copied to the RD_WD array if the block does not receive data and the SUBON parameter is TRUE. Only a 1 dimensional array of type WORD is permitted. REALS ARRAY Received Array of REALS. This array holds the REAL values received from S7. A maximum of 32 REALS may be received. Only a 1 dimensional array of type REAL is permitted. BOOLS ARRAY Received Array of BOOLS. This array holds the BOOL values received from S7. A maximum of 32 BOOLS may be received. Only a 1 dimensional array of type BOOL is permitted. WORDS ARRAY Received Array of WORDS. This array holds the WORD values received from S7. A maximum of 16 WORDS may be received. Only a 1 dimensional array of type WORD is permitted. STRNGS (see Notes below) ARRAY Received Array of STRINGS. (maximum 8 Strings of 16 characters each) SUB_ST (see Notes below) ARRAY * Siring Size = 16 * Dimensions = 1..8 (maximum 4 Strings of 32 characters each) * Siring Size = 32 * Dimensions = 1..4 (maximum 2 Strings of 64 characters each) * Siring Size = 64 * Dimensions = 1..2 Substitute Array of STRINGS. (maximum 8 Strings of 16 characters each) * Siring Size = 16 * Dimensions = 1..8 (maximum 4 Strings of 32 characters each) * Siring Size = 32 * Dimensions = 1..4 (maximum 2 Strings of 64 characters each) * Siring Size = 64 * 74 Dimensions = 1..2 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC Notes Only applies to APACS+ (ACM, ACM+ and ACMx controllers) for peer-to-peer connections. When using the GW_REC block with Strings the REALS, BOOLS and WORDS must not be connected to anything or an error '47 Array Input Not Valid' will be seen on STATx. On the GW_REC block the new STRNGS array input nub second from the bottom is configured for receiving Strings. If substitute values are used the new SUB_ST array input nub at the bottom is configured to match the STRNGS array input String Size and Dimensions. The STRNGS array can be configured different ways based on the configuration needed, but must be 1-dimensional or an error '47 Array Input Not Valid' will be seen on STATx and ERRORx will be set true. Also note the String Size must be the same between GW_SEND and GW_REC pairs or the same error '47 Array Input Not Valid' will be seen on STATx. Outputs RCOUNT INT Indicates how many REAL values were received from S7. [The S7 GW_SEND allows the user to configure how many REALS to send] QSUBON BOOL Indicates when substitute values are being used. True = Substitute values used USING1 BOOL Indicates True when the data is being used from Connection 1. False Otherwise. NDR1 BOOL New Data Ready True = New Data Received on connection ID1 ERROR1 BOOL Error indicator for connection ID1 True=Communication or Configuration Error STAT1 STRING Contains a string description of the last detected error code on connection ID1. MSGS1 UDINT Number of Messages output for connection ID1. Indicates the number of complete receive (read) operations since the function block was last initialized. Disabling and re-enabling the CONNECT block used in conjunction with this function block zeros the NUMMSG value. DROP1 UDINT Indicates how many times a missed message was detected on connection ID1. Value is reset when MSG1 is reset. NDR2 BOOL New Data Ready True = New Data Received on connection ID2 ERROR2 BOOL Error indicator for connection ID2 True=Communication Error SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 75 Communications Blocks - GW_SEND and GW_REC STAT2 STRING Contains a string description of the last detected error code on connection ID2. MSGS2 UDINT Number of Messages output for connection ID2. Indicates the number of complete receive (read) operations since the function block was last initialized. Disabling and re-enabling the CONNECT block used in conjunction with this function block zeros the NUMMSG value. DROP2 UDINT Indicates how many times a missed message was detected on connection ID2. Value is reset when MSG2 is reset. MISS BOOL Indicates whether data was missed on one connection when operating non-redundantly, or on both connections when operating redundantly. Timeout UINT Block Timeout parameter in milliseconds. If the block does not receive a response to a read message within the duration established by this timeout value, the block writes `Timeout' to its STATUS output. Default = 3000 REC_MON UINT Receive monitoring (cycles) Max number of cycles that block will tolerate stale data before posting an error and using substitute values (if SUB_ON = True). Default = 3. A value of 0 will cause the receive monitoring functionality to be effectively turned off. SUBS_ON BOOL Substitution On. If TRUE, substitute values will be used if error occurred while receiving data or if no data received. If SUBS_ON is TRUE, the substitution arrays which correspond to the connected send arrays must be configured; otherwise an error will occur. For example, if the block is configured to send REALS (the REALS input is connected) and SUBS_ON is TRUE, then the SD_RL array input must be configured. Version STRING Contains the version string of the function block for easy identification Softlist Note If the received number of REALS, BOOLS, and WORDS exceeds the size of the corresponding connected receive array, the remaining elements are ignored, and no error is indicated. Error Codes The STATUS output of the GW_REC block provides the error codes/messages shown in Table 8-4. Table 8-4 GW_REC Error Codes and Messages ERR_CODE 76 Explanation Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC ERR_CODE Explanation 38 Dest Database Rev Changed Indicates the configuration in the destination resource (the IEM) has changed and this function block must reinitialize. 39 Destination Did Not Respond Indicates the destination resource did not respond within the timeout period determined by the Timeout softlist parameter with an acknowledge signal. 40 Tag Name Not Found in Dest Indicates the function block has failed to find the desired tag name in the destination resource. This error is typically seen if the R_ID exceeds the maximum allowed by the IEM. 45 Invalid ID Input Indicates that this function block is not connected to the Resource Name specified by the CONNECT function block. The CONNECT block's ID output must be connected to this block's ID input, and the connection ID must be non-zero. Note: This can also occur when the sending controller is stopped. 46 Initializing Block Indicates that this function block is performing initialization because of one of the following reasons: * The configuration has changed * A communications error has occurred * A configuration error has occurred 47 Array Input Not Valid Indicates that one or more of the array inputs is not valid. At least one input receive array must be connected and valid for the block to operate. If an array is connected, it must be of the expected data type and it must be one dimensional. 48 Block Out Of Memory Indicates the function block has run out of memory for the communications resources required to send messages. It may be necessary to reduce communication function block configuration. 49 Waiting For Response Indicates the function block is waiting for the destination resource to respond with either an acknowledge signal or the data being read. This may result if the S7 controller is shut down. 50 Incompatible Msg Format Block is receiving a message from an S7 GW_SEND block which is incompatible with this version of the GW_REC. 51 Stale Data Received Block is receiving data which is stale - the same data is being received more than once, possibly because the partner GW_SEND block or the IEM is experiencing communications problems. The scan rate of the GW_SEND block may need to be adjusted. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 77 Communications Blocks - GW_SEND and GW_REC ERR_CODE 52 Invalid R_ID Explanation The R_ID input is invalid for one of the following reasons: the input is not connected, the R_ID exceeds the maximum allowed by the Gateway, the corresponding R_ID is not configured in S7, or the S7 controller is stopped. 8.4 S7 GW_SEND Function Block (FB 598) 8.4.1 Description The S7 GW_SEND function block forms a simple user interface to the block SFB12 BSEND. It is designed to provide redundant Ethernet transmission of the data to two separate IEMs. In redundant mode, two separate S7 connections are used. The block can also be used in non-redundant mode using only a single S7 connection. The block sends 32 BOOL values, 16 WORD values, and up to 32 REAL values. A corresponding GW_REC block is used to receive the data. The IEM is the interface to the MBUS network of APACS+ controllers. The APACS+ controllers also have equivalent versions of the GW_SEND and GW_REC blocks. The S7 GW_SEND block looks like the picture below. The parameters for the GW_SEND block are described in the tables below. 78 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC Figure 8-3 S7 GW_SEND Block Table 8-5 GW_SEND Default Visible Parameters Parameter Declaration Data Type Description C_ID1,C_ID2 INPUT WORD Connection ID R_ID INPUT DWORD Remote ID RCOUNT INPUT INT Number of REAL values BOOL01..BOOL08 INPUT BOOL BOOLEAN values WORD01..WORD08 INPUT WORD WORD values REAL01...REAL08 INPUT REAL REAL values DONE1, DONE2 OUTPUT BOOL Transmission complete USING1 OUTPUT BOOL Connection 1 sending OK Table 8-6 GW_SEND Additional Parameters Parameter Declaration Data Type Description BOOL09..BOOL32 INPUT BOOL BOOLEAN values SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 79 Communications Blocks - GW_SEND and GW_REC Parameter Declaration Data Type Description WORD09..WORD16 INPUT WORD WORD values REAL09...REAL32 INPUT REAL REAL values DONE1, DONE2 OUTPUT BOOL Transmission complete ERROR1, ERROR2 OUTPUT BOOL Send job had error STAT1, STAT2 OUTPUT WORD Status of send job MSGS1, MSGS2 OUTPUT WORD Messages sent 8.4.2 Operating Principle The internal SFB12 BSEND is used to exchange the data values between the communication partners. The ERROR and STAT outputs for GW_SEND come directly from the BSEND block (refer to its Help documentation). Each connection has its own ERROR and STAT output (ERROR1, STAT1 and ERROR2, STAT2). The output USING1 indicates that the primary connection (C_ID1) is actively sending the data. USING1 is false only when C_ID1 has some error, but C_ID2 does not. Each connection also has outputs for DONE and MSGS. The output "DONE" indicates that the transmission was completed and a new transmission can begin. The GW_SEND block is capable of sending data on every second call (provided that the last data sent was received by its partner). The MSGS value is incremented on each send and resets to zero on any ERROR or when the value reaches 1000. The MSGS value is intended to show the current behavior of the block. For example, comparison of MSGS1 and MSGS2 can be done to confirm that both of the connections are sending without error. To accumulate message counts over different durations, the DONE1 and DONE2 signals can be used to drive other logic (such as an ADD operation to increment by one). When new data is ready to be sent, a REFCNT (reference count) is incremented internal to the block (and also transmitted). The transmitted block holds an internal "format" value, the RCOUNT value, the REFCNT value followed by the 32 BOOL, the 16 WORD, and the number of REAL values indicated by the RCOUNT. The GW_REC block accepts the data provided its "format" value is correct, and its REFCNT exceeds its previous received REFCNT (and roll-over of this 32-bit value is taken into account). 8.4.3 Performance Considerations The GW_SEND block checks and attempts a new send on each second call. The cyclic block (such as OB35) holding the GW_SEND determines the cycle time between block calls. For instance, if GW_SEND is placed in OB35, which has a 100 ms cycle, then the GW_SEND will send every 200 ms at most. The GW_REC block also takes two calls to complete a new receive. While GW_REC and GW_SEND can both be placed in the same OB cycle, best performance is possible when the GW_REC is called at a rate more than twice as fast as the GW_SEND block. For example, if the GW_SEND block is sent every 80 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC 200 ms then the corresponding GW_REC block should be placed in an OB with a cycle smaller than 100 ms. As a general guideline, the GW_REC block(s) should just be placed in the fastest OB cycle suitable for the program. Each GW_SEND/GW_REC block uses a unique Remote ID (R_ID). For each connection, the Remote ID should begin at "1" and be assigned consecutively. In this case, the data for each Remote ID is effectively sent and received in sequence (each R_ID in turn) with a correspondingly longer time to transmit and process. In general, the processing cycles chosen for best performance for a single GW_SEND/GW_REC should be multiplied by the number of GW_SEND/GW_REC resources used over the same connection. For example, if two resources, R_ID=1 and R_ID=2 are used, then the two GW_SEND calls should be made every 400 ms. For the connections using the GW_SEND and GW_REC blocks to transfer data, do not intermix calls to BSEND/BRCV or other communications blocks with different R_ID values over the same connections used by GW_SEND/GW_REC. In the S7 controller, a receive block (GW_REC) is capable of receiving provided it has processed a previously received data block. When GW_REC is idle it can receive during one cycle. On its next call it will process the data and be ready to receive again. It basically takes two cycles of GW_REC to get new data. For this reason and to account for the overhead of transmission to/from the IEM and the APACS+ controllers, the GW_REC block needs to be called on a cycle more than twice as fast as GW_SEND. GW_SEND always sends the 32 BOOLS, and the 16 WORD values. An input parameter "RCOUNT" defines the number of REAL values to send. RCOUNT can be set to a value of 0 up to 32. Note In the S7-400 the settings for the block connection numbers (C_ID1, C_ID2) and the Remote ID (R_ID) are bound at the time of Cold-Start. If these are changed during runtime, the block continues to function with the settings present at the time of ColdStart. These values should be set once when the program is compiled and left alone during program execution. 8.4.4 H-Systems Considerations For the S7-400 H system, use NetPro to assign each connection to a specific S7 CPU. Since the IEM has a single Ethernet interface, there will be a separate IEM for each network (and each connection). The connection assignment is made for a standard "S7 connection" (not for the "S7 connection fault tolerant connection"). However, the hardware configuration for the S7 CP443 module should have the setting selected for Activate Fast switchover of the connections (appearing on the configuration page for Options/Ethernet Profile for Fault Tolerant Connections). With this configuration, both connections are active when both the master and slave CPUs are running and both connections will remain running with a fault in one of the CP443s. In the case of a CPU failure (or while in STOP), one connection will still be running in the master CPU. With a separate IEM on each network, this configuration maintains the data transmission in the case of a single failure point during operation. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 81 Communications Blocks - GW_SEND and GW_REC 8.4.5 Error Handling All ERROR and STAT output settings correspond directly to the values defined by the BSEND block except for one. The GW_SEND block also defines the case of ERROR=1 with STAT=255 as an invalid configuration (C_ID1, C_ID2, or R_ID are invalid). Additional error codes and descriptions are listed in Table 8-7. Table 8-7 GW_SEND Error Codes Error Status Description 0 11 Warning: new job is not effective since the previous job is not yet completed. 0 25 Communication has started. The job is being processed. 1 1 Communications problems. 1 2 Negative acknowledgement from the partner SFB/FB. The function cannot be executed. 1 3 R_ID is unknown on the connection specified by the ID or the receive block not called. 1 4 Error in the send area pointer SD_1 or the data length LEN. 1 5 Reset request was executed. 1 6 Partner SFB/FB is in the DISABLED state (EN_R has the value 0). 1 7 Partner SFB/FB is in the wrong state(not ready to receive again). 1 8 Access to remote object in the user memory was rejected. 1 10 Access to the local user memory not possible (for example, access to a deleted DB). 1 12 No instance DB found (loading a new instance DB from the PG). 1 18 R_ID already exists in the connection ID. 1 20 Insufficient memory. H-System: SFB first called while update in progress. 1 255 Incorrect settings for C_ID1, C_ID2, R_ID or RCOUNT. Values not in range. 8.5 S7 GW_REC Function Block (FB 599) 8.5.1 Description The GW_REC block represents a simple user interface to SFB13 BRCV. It is designed for use with the IEM product, which provides the connectivity to APACS+ controllers on the MBUS network. The block is designed for redundant communications over two standard S7 connections, each on a separate Ethernet network having a separate IEM for each connection. 82 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC The GW_REC block receives 32 BOOL, 16 WORD, and 32 REAL values from its corresponding GW_SEND block. It is designed for redundant communications using two S7 connections. The data transmitted by the GW_SEND block in the remote controller is received in the S7 with a corresponding GW_REC block that uses the same connection(s) and Remote ID setting (R_ID). If used nonredundantly, the C_ID1 setting specifies the connection number. Data is only available after the job is completed, and after a 0-to-1 transition of the signal at output NDR1 or NDR2 ("New Data Ready" on connection 1 or connection 2, respectively). The S7 GW_REC block looks like the picture below. The parameters for the GW_REC block are described in the following tables. Figure 8-4 S7 GW_REC Block Table 8-8 GW_REC Default Visible Parameters Parameter Declaration Data Type Description C_ID1,C_ID2 INPUT WORD Connection ID R_ID INPUT DWORD Remote ID SUBS_ON INPUT BOOL Enable substitution REC_MON INPUT INT Number of calls before substitution done. RCOUNT OUTPUT INT Number of REAL values QSUBS_ON OUTPUT BOOL Substitute values set USING1 OUTPUT BOOL Connection 1 OK BOOL01..BOOL08 OUTPUT BOOL BOOLEAN values SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 83 Communications Blocks - GW_SEND and GW_REC Parameter Declaration Data Type Description WORD01..WORD08 OUTPUT WORD WORD values REAL01...REAL08 OUTPUT REAL REAL values Table 8-9 GW_REC Additional Parameters Parameter Declaration Data Type Description SUB_BO01... SUB_BO32 INPUT BOOL Substitute BOOL values SUB_WD01... SUB_WD16 INPUT WORD Substitute WORD values SUB_RD01... SUB_RD32 INPUT REAL Substitute REAL values BOOL09..BOOL32 OUTPUT BOOL BOOLEAN values WORD09..WORD16 OUTPUT WORD WORD values REAL09...REAL32 OUTPUT REAL REAL values NDR1, NDR2 OUTPUT BOOL New DataReady ERROR1, ERROR2 OUTPUT BOOL Receive error STAT1, STAT2 OUTPUT WORD Status of job MSGS1, MSGS2 OUTPUT WORD Messages received DROP1, DROP2 OUTPUT WORD Messages missed MISS OUTPUT WORD Data missed 8.5.2 Operating Principle The GW_REC block takes two calls to complete a new receive. Best performance is possible when the GW_REC is called at a rate more than twice as fast as the rate at which the data is being transmitted. For example, if the GW_SEND block sends data every 200 ms, then the corresponding GW_REC block should be placed in an S7 OB with a cycle smaller than 100 ms. As a general guideline, the GW_REC block(s) should just be placed in the fastest OB cycle suitable for the program. Each GW_SEND/GW_REC block uses a unique Remote ID (R_ID). For each connection, the Remote ID should begin at "1" and be assigned consecutively. The block inputs for connection configuration are the parameters for C_ID1 (connection 1 identifier), C_ID2 (connection 2 identifier), and the R_ID setting (Remote ID). The R_ID is a unique setting having a value of 1 or greater and must be assigned consecutively for each connection. The R_ID should match the value given in the corresponding GW_SEND block. 84 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC Note In the S7-400 the settings for the block connection numbers (C_ID1, C_ID2) and the Remote ID (R_ID) are bound at the time of Cold-Start. If these are changed during runtime, the block continues to function with the settings present at the time of ColdStart. These values should be set once when the program is compiled and left alone during program execution. Block outputs are provided on each connection for NDR, ERROR, STAT, MSGS, and DROP. These outputs indicate "New Data Received", ERROR received, STAT value for the receive, number of MSGS received, and number of dropped messages. For example, connection one has the outputs NDR1, ERROR1, STAT1, MSGS1, and DROP1. The block output for RCOUNT indicates the number of received REAL values and the block output QSUBS_ON indicates that the output values for the BOOLS, WORDS, and REALS are not received values, but instead are the substitute values. The internal SFB13 BRCV is used to exchange the data values between the communication partners. The ERROR and STAT outputs for GW_REC come directly from the BRCV block (refer to its Help documentation). Each connection has its own ERROR and STAT output (for example, ERROR1, STAT1 and ERROR2 and STAT2). However, GW_REC also generates its own error STAT value of 255 if the inputs C_ID1, C_ID2, R_ID are misconfigured (for example, , R_ID1=0). GW_REC also generates the error STAT value of 254 whenever data is "stale" and not being received. When SUBS_ON is false, but REC_MON is set greater than zero, then the "stale data" condition is made (ERROR=true, STAT=254) when GW_REC is called REC_MON number of times and no new data is received. If REC_MON (record monitoring) is not required, then set REC_MON to zero. The "stale data" condition is also made (ERROR=true, STAT=254) whenever substitute values are being used. If SUBS_ON=true and REC_MON are greater than zero, then the substitute values are used whenever REC_MON number of calls have been made and no data was received. The output QSUBS_ON is true whenever the substitute values are used to set the output values. Once new data is received, the "stale data" condition is reset (ERROR=false and STAT=0) and QSUBS_ON is set to false. The setting of STAT=254 is made when there is not some other error already present for the connection (STAT will be set to 254 only when it is currently set to zero). The output USING1 indicates that the primary connection (C_ID1) is actively receiving the data. USING1 is false only when C_ID1 has some error, but C_ID2 does not. The output NDR indicates that a new data instance has been received. The GW_REC block is capable of receiving data on every second call of each connection. The MSGS value is incremented on each receive and resets to zero on any ERROR or when the value reaches 1000. The MSGS value is intended to show the current behavior of the block. For example, comparison of MSGS1 and MSGS2 can be done to confirm that both of the connections are receiving without error. To accumulate message counts over different durations, the NDR1 and NDR2 signals can be used to drive other user-programmed logic blocks (such as an ADD operation to increment by one). The GW_SEND block transmits its data with its own internal incrementing "reference count" (REFCNT). The GW_REC block checks for the data received on SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 85 Communications Blocks - GW_SEND and GW_REC each connection to determine if a "reference count" has been missed. The DROP value is incremented whenever the data received on the connection has a "reference count" exceeding the next expected value. For example, if the last data had REFCNT=1, then the next expected REFCNT=2. However, if the next data had REFCNT=3, then DROPn would be incremented. A DROP can occur if the GW_SEND program is sending at a faster rate then the GW_REC can receive. A DROP can also occur due to transient network upsets/congestion or if programming, debugging, or downloading is occurring to either the GW_SEND or GW_REC controller. Even though one connection might see a DROP condition, the data will most likely come over the redundant connection. When used redundantly, the GW_SEND block transmits the same data (same REFCNT) to two separate IEMs. If the DROP is seen on one connection, it might not occur on the other. Only when GW_REC misses the next REFCNT entirely is the MISS output set to true. The GW_SEND block transmits at each opportunity, even if the data values are unchanged. The DROP and MISS outputs are intended for use in setting up and commissioning the operation of the data exchange between the GW_SEND and GW_REC controllers. That is, to determine if the data exchange is performing as expected. In actual practice, the data values themselves should be used in the controller programs to "handshake" or otherwise control and/or influence behavior between the controllers. The block also permits using substitute values for the 32 BOOL, 16 WORD, and the (up to) 32 REAL values. Two input settings are required to enable value substitution. Unless the input SUBS_ON is true, no substitution occurs. When SUBS_ON=true, then substitution occurs after REC_MON calls have elapsed and no new data has been received. The absence of new data could be due to an error locally or remotely. The REC_MON should be set to a value outside of the normal receive behavior for the block. For instance, if the GW_REC is placed in a fast cyclic OB, then many calls might occur before any new data is received. When GW_REC is placed in a slower OB, then fewer "no data" calls would occur between receives. The setting made for REC_MON is typically made once the update behavior of the GW_SEND/ GW_REC data exchange has been observed. However, a large setting can be made based on the expected performance. For example, if the expectation is to receive data every second, then the REC_MON setting can be used to do the value substitution after 10 "idle" seconds. If the GW_REC is placed in an OB running at 100 ms cycle, then 10 seconds corresponds to 100 calls (make REC_MON=100). 8.5.3 Error Handling All ERROR and STAT output settings correspond directly to the values defined by the BRCV block except for one. The GW_REC block also defines the case of ERROR=1 with STAT=255 as an invalid configuration (C_ID1, C_ID2, or R_ID are invalid). The GW_REC error codes and descriptions are listed in Table 8-10. 86 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Communications Blocks - GW_SEND and GW_REC Table 8-10 GW_REC Error Codes Error Status Description 0 11 Warning: New job is not effective since the previous job is not yet completed 0 17 Warning: Block receiving data asynchronously 0 25 Data being received 1 1 Communications problems 1 2 Function cannot be executed (protocol error). 1 4 Error in the receive area pointer RD_1 regarding the data length or data type. 1 5 Reset request received, incomplete transfer. 1 8 Access error in the corresponding SFB/FB 12 "BSEND". 1 10 Access to the local user memory not possible (for example, access to a deleted DB) 1 12 No instance DB found (loading a new instance DB from the PG). 1 18 R_ID already exists in the connection ID. 1 20 Insufficient memory. H-System: SFB first called while update in progress* 1 254 Data has not come in REC_MON calls: "stale data" or substitute values in use 1 255 Incorrect settings for C_ID1, C_ID2 or R_ID SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 87 Redundancy 9.1 9 Configuring Redundancy for NIM32 Operation The IEM Name and IP Address must be unique. Add the IEM Names to the Nim List on the Engineering Station. APACS+ communications is non-deterministic in that a connection will be made to both NODE2A and NODE2B, however the data may come from either at any give time. 9.2 Configuring Redundancy for IEM2IEM Operation Configure the iem2iem.txt file such that IEM 1 passes data to IEM 3 and IEM 2 passes data to IEM 4. Due to the fact that IEM 1 and IEM 2 are connected to the same MBUS, they both cannot pass data to IEM 3. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 89 Redundancy 9.3 Configure the GW_SEND and GW_REC Blocks for Redundancy in ACM1 1. Add a second CONNECT block, and configure it to communicate to the redundant IEM. 2. Connect the ID nub to the C_ID2 nub of the GW_REC block. No other configuration is required. 9.4 Configure the GW_SEND and GW_REC Blocks for Redundancy in ACM5 1. Add a second CONNECT block, and configure it to communicate to the redundant IEM. 90 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Redundancy 2. Connect the ID nub to the C_ID2 nub of the GW_SEND block. No other configuration is required. 9.5 Redundancy Connection Health Now with the IEM V3.0 redundancy connection health can be monitored for Ethernet and MBUS connections. This is accomplished with two new Boolean data tags that can be read. * Gateway.Ethernet.Quality * Gateway.MBI.Quality 9.5.1 Gateway.Ethernet.Quality Data Tag The IEM V3.0 will now monitor the Ethernet adapter connection for activity, meaning Ethernet messages are continuing to be received. When activity is detected within a set timeout period the Gateway.Ethernet.Quality data tag will remain true. Otherwise if activity is not detected within the timeout period the Gateway.Ethernet.Quality data tag will transition to false. This data tag is not latched so when activity is detected again the value will transition true again. The timeout period mentioned is configurable. A new entry is found in the Gateway.ini file. This entry is ETHERNETQUALITYTIMEOUT with a default value of 3 seconds. If desired this entry can be changed (with integer values in seconds only) by following the standard for changing the IEM configuration using the Gateway.ini file. But for most practical purposes this value does not need to be changed. 9.5.2 Gateway.MBI.Quality Data Tag The IEM V3.0 will now monitor the MBI adapter connection for activity, meaning any APACS or QUADLOG controller active on the MBUS is considered active. When activity is detected within a set timeout period the Gateway.MBI.Quality data tag will remain true. Otherwise if activity is not detected within the timeout period the Gateway.MBI.Quality data tag will transition to false. This data tag is not latched so when activity is detected again the value will transition true again. The timeout period mentioned is configurable. A new entry is found in the Gateway.ini file. This entry is MBIQUALITYTIMEOUT with a default value of 6 seconds. If desired this entry can be changed (with integer values in seconds only) by following the standard for changing the IEM configuration using the Gateway.ini file. But for most practical purposes this value does not need to be changed. 9.5.3 Ways to Implement Data Tags Since these two new data tags are internal to the IEM any APACS+ Peer-to-Peer connection or APACS+ to S7 connection can be used. This means any one connection configured in the iem2iem.txt file can be used. If no APACS+ Peer-to-Peer connections or no APACS+ to S7 connections are required for your configuration simply add a dummy APACS+ Peer-to-Peer connection with a unique name to other IEMs on the same Ethernet network and IP address can be bogus but fit the normal format (xxx.xxx.xxx.xxx). The creation of a connection in the IEM creates a virtual controller of the connection name. It is this virtual controller that provides access to the IEM diagnostics (refer to section 11.2 #Diagnostic and Statistics Data Tags Available through Any Virtual APACS Resource for other diagnostic tags to read). SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 91 Redundancy Two methods exist to retrieve the Boolean values of these data tags as seen below, either can be used based on your configuration needs. But this is done for each redundant IEM to monitor all connections. 9.5.3.1 Recommended Method In the APACS+ controller add a CONNECT function block with NAME input set to the connection name (from the iem2iem.txt file). The ID output is then connected to a READ function block ID input. Then set VAR_01 string to 'Gateway.Ethernet.Quality' and VAR_02 string to 'Gateway.MBI.Quality'. Note the `Gateway.MBI.Quality' can be left out since the CONNECT function block ERROR output will go true if the MBI cable is disconnected so reading the `Gateway.MBI.Quality' tag is not available. The RD_01 output must have a Boolean variable connected as seen below. Note if the READ function block Continuous_REQ softlist is set true the data tags are continuously read. This allows any other logic in the APACS+ controller to act on GatewayEthernetQ (ie. can feed discrete alarm status blocks) in addition the CONNECT function block ERROR output (IEMQuality / MBIQuality) can be monitored if the IEM totally stops functioning. To add HMI alarming to the function blocks below add Discrete Alarm blocks (HLLDA1) to the GatewayEthernetQ and IEMQuality / MBI Quality outputs to generate HMI alarms or add a single Discrete Alarm block (HLLDALM) to these outputs to generate HMI alarms. Note the IEMQuality / MBIQuality ERROR output is normally FALSE unlike the RD_01 output normally TRUE when the IEM and all connections are good quality. Duplicate these function blocks for the second redundant IEM this provides 4 total alarms for the redundant IEM pair. 9.5.3.2 Alternate Method In the HMI (ie.WinCC) add the two new data tags directly. This is done by adding two tags named with the connection name (from the iem2iem.txt file) used followed by .Gateway.Ethernet.Quality and .Gateway.MBI.Quality (ie. "IEM01A_IEM02A.Gateway.Ethernet.Quality" and "IEM01A_IEM02A.Gateway.MBI.Quality"). You should also do the same thing for the other redundant IEM (ie. "IEM01B_IEM02B.Gateway.Ethernet.Quality" and "IEM01B_IEM02B.Gateway.MBI.Quality"). Since the redundant IEMs share the same MBUS segment even if the Ethernet port of 1 IEM is disconnected the data tags of the disconnected IEM are still available to the HMI. If both data tags generate bad quality this would be a sign that the IEM has totally stopped functioning. These data tags can then be assigned to any objects on graphics that accept two states for 92 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Redundancy visual detection and alarming as desired. Note unlike the recommended method in the first section the `Gateway.MBI.Quality' is available when using the alternate method. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 93 NIM32 Operation 10 This chapter describes the operation, configuration, user interface, and diagnostics of the NIM32 software. The chapter is divided into the following sections: * Introduction - Provides product description, product support information, and related literature. * Operation - Describes the functional requirements of the NIM32 software, including its operation as an NT service, its modes of operation, and its role in MBUS redundancy. * Configuration- Discusses the requirements for Ethernet-based network connections that use the NIM32 software, such as the APACS+ control panel applet settings, requirement for host files, APACS.INI file settings, TCP/IP logical ports, and hardware/operating system requirements. * User Interface - Discusses the NIM32 user interface, including status window displays and the Connection List. * Diagnostics and Error Reporting - Discusses the NIM32 support of an interface to the NT Event Log and the APACS+ Diagnostic Logger, and the use of priority criteria to resolve address conflicts. This section also provides and defines all messages displayed in the NIM32 status window. 10.1 Introduction 10.1.1 Product Description The APACS+ Network Interface Manager 32-bit (NIM32) software provides an Ethernet-to-MBUS interface within an APACS+ system. This software-based solution eliminates the need for hardware-based interfaces. NIM32 software provides Ethernet and MBUS access to control and I/O modules, and data contained in an APACS+ system. 10.1.2 Capacity In addition to the eight possible S7 connections, each NIM32 supports a maximum of 256 simultaneous connections (not including NIM32s and NIM32 user interfaces) to APACS+ communication sessions. Any control resource (ACM, CCM, Control or Data Acquisition Engine, or Control Simulator) or standard client application (4-mation, API, Diagnostic Logger, APACS+ I/O Server, SOE Viewer, or the Time Sync Utility) counts as a connection. If the maximum limit of 256 connections occurs, remote connections that have been inactive for at least 20 seconds are de-activated to allow new connections to be made. Each NIM32 supports connections to 100 NIM32s, including itself. Each NIM32 supports a maximum of 100 NIM32 User Interface connections. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 95 NIM32 Operation 10.1.3 Compatibility The NIM32 software supports communications to the following: 10.2 * APACS+ Ethernet client applications: 4-mation (Version 4.40), API (Version 4.37), I/O Server (Version 4.40), and Diagnostic Logger (Version 4.41) or later versions * ACM System Software version 3.xx and later * CCM/ACM+ System Software version 3.xx and later * CCMx System Software version 3.51 and later * ACMx System Software version 4.50 and later Operation This section describes the functional operation of the Network Interface Manager 32-bit (NIM32) software. The NIM32 software provides MBUS connectivity to Ethernet. Prior to the introduction of NIM32 software, there were two versions of each of the APACS+ standard client applications (API, I/O Server, Diagnostic Logger, SOE Viewer, and the Time Sync Utility) to interface with both MODULBUS (MBUS) and Ethernet. All applications can now use just Ethernet versions. The Bridge Mode provides an Ethernet to MBUS bridging capability, allowing remote standard client applications to communicate with resources on the local MBUS through the IEM. This is the same functionality that is provided by the DOS NIM software. The NIM32 provides a direct Ethernet connection between APACS+ client applications and the Control Engine operating on remote computer nodes. No MBUS communication software or MBUS adapter cards are required. Redundancy Controller Redundancy The NIM32 software supports controller redundancy. Any standard APACS+ client application and the NIM32 software communicate with a redundant pair of controllers operating as a single resource. The standard client and the NIM32 will automatically continue to communicate with the new primary controller when a switchover occurs. Controller redundancy is supported for both peer-to-peer (module-to-module) and node-to-node (rack-to-rack) redundancy. Ethernet/Server Redundancy In this architecture, each client node has two Ethernet connections. One connection is to Server Node A of a redundant pair of Tag Servers, and the second connection is to Server Node B of the redundant pair. Each server pair additionally has a dedicated Ethernet connection for redundancy synchronization and switchover. 96 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation The NIM32 software can operate on multiple IEMs to create redundant connection paths between client nodes and MBUS networks. If multiple connection paths exist between a client node and an MBUS resource, the initial connection path is arbitrarily chosen. If this connection path fails, a timeout is detected at the client, and after a timeout period of less than 10 seconds, a new connection is established using an alternate connection path. Once the connection is established, the client node and resource continue to use the same NIM32 for all subsequent communications; if the server fails, the client times out, and a connection is automatically established with the other server running the NIM32 software. The new connection happens automatically within 10 seconds. The user is not required to restart any applications or to manually select the new path for the new connection to be established. This backup mechanism requires the client node to identify both server nodes in either a HOSTS file or in the APACS.INI file. 10.3 Configuration The configuration of the NIM32 software is performed by the use of the NIM32 tab of the APACS+ Control Panel applet. Refer to the APACS+ Control Panel Software Guide (document SG39-15). The settings of the APACS+ Control Panel are made for the IEM using the Node/Rack/Slot settings in the USB file gateway.ini. Note Use NIM32 User Interface on another computer to connect remotely to the NIM32 on the IEM. 10.3.1 Hosts File A HOSTS file is a static table that is used on each computer node to resolve host names (or computer names) to IP addresses. The advantage of HOSTS files is that they can be used to optimize connection times. The disadvantage is that they can be more difficult to administer than NT services, such as WINS and DNS, because the HOSTS file must be manually maintained on each node. A HOSTS file is required for certain types of networked connections using the NIM32 software. The HOSTS file must be located in the appropriate directory (\systemroot\System32\Drivers\Etc for Windows XP and Windows 2000). The HOSTS file can be modified with any standard text editor, such as Windows Notepad. Note When connecting to a Box PC 627C IEM V3.0 it may be necessary to configure a HOSTS file on the PCs requiring access to the IEMs. For instance, a PC with 4Mation installed requires access to an IEM which is a Box PC 627C IEM V3.0. In this case a HOSTS file entry should be made for this IEM and its IP address. If this entry is created while the applications are running it will be necessary to stop the applications and restart them, i.e. 4-Mation, DLOGGER, etc. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 97 NIM32 Operation HOSTS file entries are required for connections to client nodes that do not use name resolution (DNS or WINS). The client node HOSTS file contains the IP address and computer name of a remote computer node that is running the NIM32 software in Bridge Mode. HOSTS file entries are not required for client nodes that are configured to use DNS or WINS and connect to a remote NIM32 that is operating in Bridge Mode. Note The HOSTS file cannot be edited on the IEM. The HOSTS file should only be changed on client computers that need to use the NIM32 on the IEM, and the client computer does not use name resolution (DNS or WINS). Although a HOSTS file is not required for client nodes that are configured to use DNS or WINS, a HOSTS file can be used to improve connection times for standard client applications, such as 4-mation Configuration Software. Windows name resolution first searches a HOSTS file for name resolution before using DNS or WINS servers. If a user edits the HOSTS file, the client applications need to be restarted for the change to take effect; however, the associated computer node does not need to be rebooted. 10.3.2 Use of NIM Names With DOS NIM software, NIM names are aliases that are used in the HOSTS file. NIM names can be used optionally in the HOSTS file of a computer node for client application connections to remote NIM32s. The use of NIM names and the search settings in the APACS.INI file can be used to optimize connection times for client applications. For more details on the use of NIM names, refer to section 3.2 of Communication Considerations for Versions 4.20 and Higher (document number CG39-13). Note HOSTS file cannot be edited on IEM. 10.3.3 LMHOSTS File The LMHOSTS file is a Microsoft-modified enhanced version of the HOSTS file. This file has the same functionality that a HOSTS file does, with additional capabilities that are not needed by the NIM32 software. An LMHOSTS file can be used as a replacement to the HOSTS file. For use with the NIM32 software, the format of entries in the LMHOSTS file is the same as that for a HOSTS file. Note LMHOSTS file cannot be modified on an IEM. Modifications can only be made on client computers. 98 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation 10.3.4 Settings for Client Nodes The settings in the APACS.INI file required for client nodes that connect to an instance of NIM32 software running in Bridge Mode are provided in Table 10-2. Note MIN_NIM_NAME_SEARCH and MAX_NIM_NAME_SEARCH are included for backward compatibility. The NIM_LIST is the preferred implementation. For more details regarding APACS.INI settings, refer to section 3.2 of the Communication Considerations for Versions 4.20 and Higher Configuration Guide (document CG39-13). Note These settings are only for client computers, not the IEM. Table 10-1 Parameter Settings in the NETWORK Section of the APACS.INI File Parameter Name Description MIN_NIM_NAME_SEARCH (obsolete see Important below) Used to limit computer name to IP address resolution for a client that is establishing a connection to a remote instance of NIM32 software. Valid range is 1 to 64 (for NIM1 to NIM64). MAX_NIM_NAME_SEARC H (obsolete see Important below) Used to limit computer name to IP address resolution for a client that is establishing a connection to a remote instance of NIM32 software. Valid range is 1 to 64 (for NIM1 to NIM64). NIM_LIST (preferred for NIM32) Used to establish a connection list of specific instances of NIM32 software. If name resolution is used, this parameter specifies the specific computer names to which the client node connects. (The list is limited to 160 characters.) Using this parameter along with WINS or DNS eliminates the need for a HOSTS file at the client node for connection to a remote instance of NIM32 software. This is the preferred use. If this parameter is used, MIN_NIM_NAME_SEARCH and MAX_NIM_NAME_SEARCH will not be used. Note MIN_NIM_NAME_SEARCH and MAX_NIM_NAME_SEARCH both require that all PC Names be in the format of NIMxx where xx is a number between 1 and 64 (for example, NIM1, NIM 12, etc.). This scheme only used with older - pre-NIM32 - systems and has been replaced with the NIM_LIST command which places no restrictions on PC names. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 99 NIM32 Operation 10.4 User Interface This section describes the NIM32 software's user interface. While the NIM32 is an NT service that may run independently of a user interface, this user interface is available as a separate application to allow configuration of the NIM32 and realtime visual status of NIM32 operations and diagnostic information. The user interface will be installed on a separate computer that may also have a NIM32 installed on it. 10.4.1 User Interface Startup When the NIM32 User Interface is started, a dialog box is displayed. The dialog box provides a choice to connect to either a local or remote NIM32. This NIM32 is identified as the "Primary NIM32." The dialog box is shown in Figure 10-1. Figure 10-1 NIM32 User Interface Start-up (Connection Options) Dialog Box If Remote is selected, it is possible to enter the name of a remote PC or browse to select the desired PC. Enter a computer name that is running a NIM32, or select Cancel to shut down the user interface. If the user interface is started from a shortcut that specifies a particular NIM32 to connect to, the dialog box functionality described previously is bypassed (for example, by adding the NIM32 name to the command line in the shortcut in the Start menu). 10.4.2 User Display This section describes general aspects of the User Display window (as shown in Figure 10-2. The primary NIM32 is shown in boldface in the Connection List. 100 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation Figure 10-2 NIM32 User Display Window The NIM32 User Display consists of menu bars, toolbars, a Connection List window, and one or more Status History windows. The Connection List occupies the upper portion of the window, and the Status History windows are located beneath it. The NIM32 User Display supports resize, minimize, maximize, move, and scroll bar functions. The relative sizes of the Connection List window and the Status History window are adjustable within the confines of the User Display window. Tiling of windows is available within the Status History window area. The background color of all windows and the color of all text are system colors. Colors are shown on icons (as noted in subsequent sections). The application title bar is entitled NIM32, and includes the name of the NIM32 to which it is connected. When the User Interface is opened to the local NIM32 using the Local option of the initial dialog box, then the word Local: appears before the computer name. If the local NIM32 is selected using the computer name or browse options, the computer name is shown without Local:. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 101 NIM32 Operation The User Interface shuts down with the workspace (state) saved and re-opens to the same size and position; it does not start automatically. 10.4.2.1 User Display Menu Choices The following User Display menus are provided: File Edit View Window Help The File menu includes the following choices: New - Opens a new status window for the NIM32 that is currently selected in the Connection List. Close - Closes the status window on top. Close All - Closes all the status windows. Save - Saves the contents of the current Status History window. Log - Enables or disables logging of the active status window. Exit - Exits the User Interface application. This does not stop the NIM32 service. The Edit menu includes the following choice: Clear - Clears a status window. This choice prompts the user with an "Are you sure?" warning dialog box to avoid the loss of all status history. The View menu includes the following choices: Columns - Selects which columns are visible in the Connection List. Default Columns - Returns the Connection List column settings to their default state. Toolbar - Displays the toolbar. Properties - Shows the property page for the NIM32 highlighted in the Connection List. The Window menu includes the following choices: Cascade Tile Horizontal Tile Vertical The Help menu includes the following choices: Contents - Displays the NIM32 help file. About - Opens the About dialog box. The About dialog box includes versions of each of the two User Interface components. In addition, this dialog box displays the versions of the NIM32 UI Container and the NIM32 UI Feature Set components. 102 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation The System menu options are standard (Move, Size, Maximize, Minimize, Close). 10.4.2.2 User Display Toolbar The following menu items have tool bar buttons: File: New File: Save View: Properties Help: Contents When the mouse pointer pauses over a tool bar button, its name appears in a tool tip (balloon). 10.4.3 Connection List The upper portion of the User Interface window contains the Connection List window, which lists the active connections to the NIM32. The Connection List includes standard clients, standard resources, and remote NIM32 computer nodes. The Connection List does not include DOS NIMs. 10.4.3.1 Window Layout and Content Tree Hierarchy The Connection List opens in a Windows Explorer style format, with all of its contents shown in a hierarchical tree structure. The hierarchy is as follows: Top Level: Subnet (local or remote) Second Level: NIM32 connections Third Level: Local connections to the NIM32 (resources and clients) The Top Level category in the hierarchy of the Connection List is the subnet, which includes all NIM32 connections on that subnet. The User Interface program starts up with a single subnet, which is called "Subnet" by default, but is user-editable: * The edited name doesn't persist if the NIM32UI is restarted. * It is possible to expand or collapse any portion of the hierarchy by clicking on the +/- box to the left of each object. Each NIM32 connection opens as a subcategory directly beneath a subnet folder. The primary NIM32 in the system is shown in bold. Directly beneath each NIM32 connection are subcategories that include all local connections to the NIM32. Note The NIM32 is aware of other NIM32s, and each NIM32 shows the others of which it is aware in its Connection List. If two NIM32s do not list each other, it may be because of an NRS address conflict between the two. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 103 NIM32 Operation When the status of a connection to a NIM32 is not good, an overlay (displayed as a question mark) appears over that connection in the Connection List. Table 10-2 NIM32 Connection Types Connection Type Examples MBUS resource ACM, CCM Peer resource Control Engine Ethernet peer resource Control Simulator MBUS client MBUS version of 4-mation Ethernet client Ethernet version of 4-mation Monitor client NIM32 User Interface System node NIM32 service (Local and Bridge Modes) Columns of Data Each entry in the Connection List includes status information in a column format. The columns in Table 10-3 are available by default in the Connection List window. Table 10-3 Default Columns In Connection List Column Name Description Connection Type Name or type of NIM32, resource, or client connection Computer Name Computer name for NIM32, client, or resource node IP Address IP Address of NIM32, client, or resource node Node/Rack/Slot MBUS node, rack, and slot address (see Note below) Task ID Task identification number. This is the unique identifier for a specific MBUS application, providing, in addition to Node/Rack/Slot, addressing information such that the full address appears as NxxRyySzzTaa. For Ethernet applications, the Task ID is zero. Note The NIM32 uses the Node/Rack/Slot address of other NIM32s and NIM32 client interfaces to track all connections to the NIM32. Since Ethernet clients do not have a Node/Rack/Slot assignment, the NIM32 to which the client connects assigns an arbitrary, but unique, Node/Rack/Slot address based on the NIM32's own Node/Rack/Slot address. This Node/Rack/Slot address does not correspond to a physical address, but is used by the NIM32 only to distinguish multiple Ethernet clients. This address is displayed in the Connection list and is reported in the Status History window. 104 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation The Connection List window supports display or hiding any of the columns using a menu selection or dialog box; however, the first column, Connection Type, is always retained. It is possible to re-order or re-size columns by dragging the column headings. The current column format will be saved and used the next time the Connection List window is opened. Icons Each connection type (for example, NIM32, MBUS resource, peer resource, Ethernet client, etc) is distinguished by its own unique icon. These icons are displayed to the left of each object in the Connection List. A different icon is available for each mode of the NIM32 software (Local and Bridge) to indicate the operating mode of each instance of NIM32 software. An additional security icon is displayed to the left of a NIM32 node, indicating the local client's access privileges to the NIM32. The icons used to identify connection types in the Connection List are shown in Table 10-4. Table 10-4 Connection Type Icons Description Icon Connection Type Icon Subnet (closed) Subnet (open) MBUS resource Peer resource Ethernet peer resource MBUS client Ethernet client Monitor client System node (Local mode) System node (Bridge Mode) System node (mode not identified) Security Icon Client connection security enabled, access denied Client connection security enabled, access allowed SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 105 NIM32 Operation Client connection security disabled (None) Status Status is OK Icon (None) Status is not OK 10.4.3.2 Functionality of the Connection List The Connection List of the NIM32 User Display contains very useful diagnostic information. A detailed discussion of the functionality of the Connection List is provided in the following paragraphs. The Connection List displays all active connections to each instance of NIM32 software. Double-clicking on a NIM32 object expands its tree, thereby showing all active connections for that instance of NIM32 software and opening the Status History window for that instance of NIM32 software. The types of connections that are listed differ based on the operational mode of the NIM32 software. The first subcategory beneath the Local Subnet includes the NIM32 connections. Each of these top-level NIM32 connections displays all possible connection types beneath it (regardless of mode). These connection types include: * MBUS resource (ACM, CCM) * Peer resource (Control Engine) * Ethernet peer resource (Control Simulator) * MBUS client (such as MBUS version of 4-mation) * Ethernet client (such as Ethernet version of 4-mation) * Monitor client (NIM32 User Interface) * Remote NIM32 node Note It is possible to expand the tree hierarchies of multiple top-level instances of NIM32 software at the same time. Therefore, a particular node type (for example, Resource or NIM32) may simultaneously appear in the trees of more than one instance of NIM32 software. This occurs because each instance of NIM32 software senses its own connection to the same device. In this way, the Connection List of each instance of NIM32 software is accurately shown. 10.4.3.3 Access to Other Displays It is possible to access other displays from the Connection List window that relate to the currently selected instance of NIM32 software. Right-clicking on an instance of NIM32 software that appears in the Connection List provides two menu choices (see Table 10-5). 106 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation Table 10-5 NIM32 Connection List Menu Items Menu Item Description New Status History Window Opens a new Status History window for the selected instance of NIM32 software in the Status History window area of the User Display. Properties Displays the NIM32 Properties tab of the APACS+ Control Panel applet, allowing configuration of the selected instance of NIM32 software. 10.4.3.4 Security The Connection List shows all NIM32 nodes and their active connections, regardless of how the Client Access table is configured in the NIM32 software. However, each instance of NIM32 software with Client Connection Security enabled may prevent a client from communicating with the software if the NIM32 software's Client Access table does not contain the client's computer name or IP address. A padlock-shaped icon is used to indicate the security access privileges of a local client for the given instance of NIM32 software, as follows: Closed padlock: Indicates security is enabled on the NIM32 software. Standard client applications on the node running the User Interface do not have access to the NIM32 because this node does not have access privileges to communicate with the NIM32 software. Open padlock: Indicates security is enabled on the NIM32 software. Standard client applications on the node running the User Interface have access to the NIM32 because this node has access privileges to communicate with the NIM32 software. No padlock: Standard client applications have access to the NIM32 because Client Connection Security is disabled on the instance of NIM32 software. 10.4.4 Status History Window The lower portion of the User Interface window contains the Status History window. The Status History window area displays events and various status and error messages that can occur during operation of the NIM32 software. Each message includes the date and time of occurrence. At startup of the User Interface, a single Status History window area is displayed to reflect the list of events for the primary NIM32. A tab beneath the Status History window area indicates the computer name of the node running the associated NIM32 software. It is possible to open additional Status History windows for other NIM32 nodes by right-clicking on the desired instance of NIM32 software in the Connection List and making a menu selection to open another Status History window (or by using the menu selection File > New). Multiple Status History windows may be open at the same time and are overlaid by default. A Status History window area may be brought to the front by selecting its tab beneath the window. The Status History windows may be cascaded or tiled in the lower viewing area using standard Windows functions. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 107 NIM32 Operation Each entry in the Status History window area contains the following fields. Column headings identify each field. * Date and time stamp that the event was posted * Node/Rack/Slot address of the client or resource causing the message to be posted * Task ID of the application that caused the message to be posted * IP address of the client or resource that caused the message to be posted * Computer name of the client or resource that caused the message to be posted * Resource type * Text of the posted message Icons are displayed next to each message, with the following coloring scheme: * Blue - Informational messages that require no user action. These messages typically involve connection status * Yellow - Warning messages * Red - Error messages that alert to either a severe system problem or a client (or resource) problem. The NIM32 Status History window displays up to 1,000 entries. Note When a NIM32 connects to a NIM32 User Interface, it sends the most recent 100 status events. New entries are posted to the top of the list. When the Status History window is full, the oldest entries are deleted as new entries are placed in the window. New entries in the Status History window do not automatically scroll the window to the most recent entry in the window. However, when the open Status History Window is displaying the top of the list, it stays at the top as new entries are posted to the list. A menu item allows a user to open a dialog box for saving the contents of the Status History window as a text (.csv) file. When multiple Status History windows are open, the dialog box saves the contents of the active Status History window. The dialog box supports standard browse capability to select the file. A menu item enables or disables the logging of events from the active status window to a file. Enabling this option brings up a dialog box for specifying the file name and location. The log file is a .csv file with the same information as the displayed status window. 10.4.5 Configuration The NIM32 configuration display is accessed by selecting the APACS+ Control Panel application or by right-clicking on a NIM32 object in the Connection List window and selecting Properties, which opens the NIM32 tab of the APACS+ Control Panel. When selected from the Connection List, the configuration parameters shown in the Control Panel apply only to the currently selected instance of NIM32 software. The other Control Panel tabs are not displayed. 108 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation Clicking the Apply or OK buttons after making configuration changes results in a dialog box that provides an opportunity to accept or cancel the changes. When the configuration changes are accepted, any changes to configuration parameters are immediately sent to the NIM32. The changes take effect immediately, without manually restarting the NIM32 or rebooting the node. For complete details, please refer to the APACS+ Control Panel Version 4.40 or Higher Software Guide (document SG39-15). 10.5 Diagnostics and Error Reporting 10.5.1 Startup Errors Any errors that prevent the NIM32 from starting normally are reported to the NT Event Viewer. For example, a TCP/IP port conflict prevents the NIM32 from starting. After startup, all errors are reported to the User Interface's Status History window, and most are reported to the Diagnostic Logger application. The errors that can be reported are identified in Table 10-6 through 10-9. 10.5.2 Name and Address Conflict Resolution All computers on a network must have unique names. When configuring the network setup, assigning two PCs the same name causes the NIM32 to post an error message, Computer name resolver has detected a computer name conflict, once per second. If this occurs, stop the NIM32, change one of the computer names to remove the conflict, and then restart the NIM32. The NIM32 requires that all computer nodes and resources on a network each have a unique Node, Rack, and Slot (NRS) address. If a conflict exists, the NIM32 determines which entity has rights to use the address by using the priority criteria shown in the paragraph below. Entities that are not granted access to the address are blocked from communicating with the NIM32, and an event is posted to the status window and the diagnostic logger to indicate the conflict. Each instance of NIM32 software running on a computer node controls its own message routing and resolves any address conflicts. A NIM32 prioritizes NRS addressing as follows (from highest to lowest): 1. Nodes (MBUS resources) that are connected to a local MBUS 2. Control Simulator and Control Engine running on the local computer node (including the Open Application Server Control Engine) 3. Remote connections to NIM32s that are running on separate computer nodes 4. Multiple NIM32s on one local MBUS (Since these NIM32s do not actually connect to each other, this is not a problem. The NIM32 user interface in one node does not display the other NIM32 and its resources in the event of a conflict.) 5. Connections to local client applications (such as 4-mation and the Diagnostic Logger) SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 109 NIM32 Operation 10.5.3 Status History Window Messages The NIM32 software's Status History window is capable of displaying any of the messages shown in Table 10-7 through 10-10. Additionally, initialization, informational, warning, and error messages from Tables 10-7 through 10-10 with a System Service Code (SSC) are logged by the Diagnostic Logger Utility if it is operating on the system. When an uninitialized Advanced Control Module (ACM) is present in an APACS+ system, the NIM32 may post a connection-established message for the ACM. If the ACM remains uninitialized, the NIM32 subsequently posts a Heartbeat Missed message, followed by an Abnormal Disconnect message. These messages should be ignored. To avoid this situation, initialize the ACM. 10.5.3.1 Initialization Messages Messages that can be displayed when the NIM32 software initializes are provided in Table 10-6. 10.5.3.2 Runtime Informational Messages Informational messages that can be displayed by the NIM32 software at runtime are provided in Table 10-7. These messages can appear during normal operation and are not an indication of problem conditions. No user actions are required. 10.5.3.3 Warning Messages Warning messages that can be displayed during an instance of NIM32 software operation are provided in Table 10-8. These messages are an indication of a potential problem. NIM32 software operation continues. Warning messages are additionally posted to the Diagnostic Logger Utility. 10.5.3.4 Error Messages Error messages that can be displayed during NIM32 software operation are provided in Table 10-9. These messages are an indication of an error condition that can prevent operation of the NIM32 software. Error messages are additionally posted to the Diagnostic Logger Utility. Table 10-6 NIM32 Initialization Messages Message Local MBUS communications disabled 110 Description User Action MBUS communications could not be started, and the NIM32 cannot communicate with local MBUS resources. This is a normal condition if an MBUS adapter card is not installed in the computer node. If an MBUS adapter card is installed, the condition is possibly due to improper installation of MBUS driver software or malfunctioning MBUS adapter card. If an MBUS adapter is installed, re-install MBUS driver software and verify proper operation of MBUS. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation Message Description User Action Local MBUS communications enabled Initialization message confirming proper operation of MBUS communications No action required Client Access Table found at <pathname> Lists the location of the Client Access Table No action required Remote Configuration Security Table found at <pathname> Lists the location of the Remote Configuration Security Table No action required Client Connection Security is enabled. Client Connection Security has been configured, and a Client Access Table has been found. No action required Client Connection Security is disabled. Client Connection Security is disabled, or a Client Access Table has not been found. No action required Remote Configuration Security is enabled. Remote Configuration Security has been configured, and a Remote Configuration Security Table has been found. No action required Remote Configuration Security is disabled. Remote Configuration Security is disabled, or a Remote Configuration Security Table has not been found. No action required Table 10-7 NIM32 Software's Runtime Informational Messages SSC Message Description Detected User Action Client Connection Aborted A client application abnormally terminated, and the connection to the NIM32 has been broken. A client application abnormally terminated, and the connection to the NIM32 has been broken. No action required Blue Unexpected TCP Receive Failed An error has occurred in receiving an Ethernet TCP message. When receiving Ethernet TCP messages No action required Red An unexpected client not connected A client is trying to use a closed connection. When a message is received, a check is performed to validate the connection. No action required Red SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Icon Color 111 NIM32 Operation SSC 112 Message Description Detected User Action Icon Color Record discarded The NIM32 is having problems sending messages to a NIM32 user interface. When the number of retries to send the message has been exceeded No action required Red Driver Not Loaded The MBUS drive is not loaded. This is a normal condition if an MBUS adapter card is not installed in the computer node. If an MBUS adapter card is installed, the condition is possibly due to improper installation of MBUS driver software or malfunctioning MBUS adapter card. At startup If an MBUS adapter is installed, re-install MBUS driver software and verify proper operation of MBUS. Red Configuration record file not found - attempt to create file Configuration file not found. Creating a new one. Configuration changes will not be saved. At startup Check for full or writeprotected disk. Red Can't create a configuration file The creation of the configuration file failed. Configuration changes will not be saved. At startup Check for full or writeprotected disk. Red Failure to create configuration record file The creation of the configuration file failed. Configuration changes will not be saved. At startup Check for full or writeprotected disk. Red Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation SSC Message Description Detected User Action 1 Multiple connection paths detected; communication now occurring on MBUS An MBUS connection path has now been identified between the NIM32 and the resource. This connection path is now used , and the Ethernet connection path serves as a backup path. This is detected at startup and when an additional path is connected during runtime. No action required Blue 11 Start up completed. This node is online. NIM32 software initialization has been successfully completed. Upon completion of initialization procedures No action required Blue 12 Shutdown completed. This node is offline. NIM32 software termination has been successfully completed. Upon completion of shutdown procedures No action required Blue 13 Connection established A user has just established a connection to the NIM32 software. When a connection attempt is successful No action required Blue 14 Heartbeat received After posting a "Heartbeat missed" message, this message is posted when the NIM32 software has resumed receiving the periodic heartbeat messages. After posting a "Heartbeat missed" message, this message is posted when the NIM32 software has resumed receiving the periodic heartbeat messages. No action required Blue 19 Client connection closed A user application has closed its connection to the NIM32. When a user application has closed its connection to the NIM32 No action required Blue SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Icon Color 113 NIM32 Operation SSC Message Description Detected User Action 24 Remote Configuration Access Table could not be found at the configured location. Remote Security has been disabled. The Remote Configuration Access Table could not be found at the configured location. Remote Security has been disabled. At startup, the REMOTECONFIGURATION SECURITYTABLE.TXT file was not found. No action required Blue 30 NIM32 configuration changed A NIM32 configuration change has occurred. When the user makes changes to the configuration No action required Blue 114 Icon Color Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation Table 10-8 NIM32 Software's Warning Messages SSC Message Description Detected User Action Icon Color 2 Heartbeat missed The periodic heartbeat message was not received by the NIM32 software. During runtime when a client or resource fails to send a heartbeat ("Here I am message") in the expected timeframe Check MBUS communication path Yellow 3 Heartbeat missed; NIM32 has switched to alternate communication path. A heartbeat message was dropped. Since an alternate communications path exists, the NIM32 software has switched to the use of the alternate communication path. When a primary communications path has faltered, and the secondary path was enabled Check MBUS communication path Yellow 4 Client connection aborted A client application was abnormally terminated, and the connection to the NIM32 software has been broken. When a client application is abnormally terminated, and the connection to the NIM32 software has been broken No action required Yellow 5 Source of message not recognized A message was received from a source that isn't recognized. This is probably due to improper registration of the client with the NIM32 software. The message was discarded. When a client's or resource's name is not properly registered with the NIM32 software, and that client or resource has just attempted to pass a message through the NIM32 software. Client Connection Security enabled, but source not listed in the Client Access Table. Possible software failure. Monitor and contact supplier. Yellow SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 115 NIM32 Operation SSC Message Description Detected User Action Icon Color 6 Permission to connect is denied The Client Access Table is enabled, and a client that is not identified in the table attempts to connect to the NIM32 software. As soon as an invalid client attempts to connect to the NIM32 software. No action required Yellow 7 This node is not licensed for remote connections. The NIM32 software is licensed for Local Mode, and a remote computer node attempts to connect. The connection is not granted. When a remote computer node attempts to connect, and the connection is not granted. No action required Yellow 8 Client Access Table not found; security disabled. The Client Access Table cannot be found at the configured location. Security has been disabled, and all connections to the NIM32 software are allowed. At startup the SECURITY_TABLE.TXT file is not found. Its location is defined by No action required Yellow The NIM32 software cannot complete processing all UDP messages in its queue. Communications may be degraded. No messages are deleted from the queue. When the number of messages processed in any one port per scan reaches a predetermined limit, the NIM32 software informs users that significant loading is occurring. Check the MBUS/ Ethernet communications path. Reduce the number of applications running on the local PC. Yellow 9 116 Not all UDP messages processed during this scan NIM32_SECURITY_ TABLE_PATH. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation SSC 10 Message Licensing Violation Description Software has detected that the APACS.LIC file has expired, or the hardkey was physically removed from the PC. Detected These tests are run periodically in the background. User Action Install valid license file or replace hard key. Icon Color Yellow Table 10-9 NIM32 Software's Error Messages SSC 20 Message Description Detected User Action Icon Color Local MBUS Communicat -ions Startup failed Startup of the MBUS interface has failed. At startup If an MBUS adapter is installed, re-install MBUS driver software and verify proper operation of MBUS. Red MBUS Driver not functional The MBUS driver is not functioning correctly. At startup If an MBUS adapter is installed, re-install MBUS driver software and verify proper operation of MBUS. Red Maximum number of connections exceeded The connection cannot be made. The maximum number of connections is currently in use. When a client tries to establish a connection. The current number of connections is checked. When that limit is exceeded, no more connections can be established. Close any unneeded connections. Red SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 117 NIM32 Operation SSC Message Description Detected User Action Icon Color 21 Client timeout; connection aborted A communication timeout occurs between the NIM32 software and a client application or a resource. Possible causes include abnormal termination of client application or communications problems. After an extended period of time, no messages are received from a client or resource. Check the MBUS/ Ethernet communications path. Reduce the number of applications running on the local PC. Red 22 Computer name not resolved Security is enabled, and the computer name cannot be resolved to an IP address using a HOSTS file, WINS or DNS. At startup and at client/resource connection time. Can also occur after a client name is added to the Client Access Table. Verify that computer node is configured for WINS or DNS. Consult network administrator. As an alternative, use static IP addresses in a HOSTS file and Client Access Table. Red 23 Local computer name not found The NIM32 software cannot read the local computer name from the operating system. At startup If an Ethernet network card is not installed, verify that TCP/IP loopback software is properly configured and installed. Otherwise, possible software failure. Monitor and contact supplier. Red 25 NRS address conflict; lower priority connection disconnecte d A higher priority connection is detected using an NRS address that is already in use. The lower priority connection is disconnected. When a new client or resource comes online Change the node, rack, and slot address of the lower priority conflicting connection. 26 NRS address conflict; connection blocked. A client attempted to connect using a node, rack, slot address that is already in use. When a new client or resource, at a lower priority, attempts to come online Change the node, rack, and slot address of the conflicting client. 118 Red Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 NIM32 Operation SSC Message Description 27 Internal error; TCP/IP communicati on error. A TCP/IP communication error occurs. Normally, when this error occurs, it is an indication that the PC that is running the NIM32 software is overloaded (typically with multiple highloading applications) and may experience difficulty in processing the full queue of messages. During startup, shutdown, and normal transmission of TCP/IP messages, the NIM32 software monitors interaction with the communications stack. Possible software failure. Monitor and contact supplier Red 28 TCP/IP port is already in use. Terminating During startup, the NIM32 attempts to use a TCP/IP logical port that is in use by another application. The NIM32 software terminates. At startup Modify port assignments in the Services file to eliminate the conflict and restart the NIM32 software. Red 29 Internal error; MBUS communication runtime error. An MBUS communication error occurs. At startup or when sending or receiving MBUS messages. Possible software failure. Monitor and contact supplier Red 32 Internal error; attempts to disconnect from invalid path. The NIM32 software attempts to disconnect from a nonexistent client. When an unregistered client attempts to disconnect Possible software failure. Monitor and contact supplier Red 33 Internal error; software has entered an invalid internal state. The NIM32 software has internally entered an undefined state. When the NIM32 software detects invalid internal logical state Possible software failure. Monitor and contact supplier Red SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Detected User Action Icon Color 119 NIM32 Operation SSC Message Description 34 Internal error; internal state changed unexpectedl y. An internal error has occurred during software execution. When the NIM32 software detects invalid internal logical state Possible software failure. Monitor and contact supplier Red 35 Internal error; NULL pointer encountered . An internal error has occurred during software execution. When the NIM32 software detects an internal pointer that is not properly set up for use. Possible software failure. Monitor and contact supplier. Red 36 Internal error - Out of Memory. The NIM32 software cannot allocate additional memory for internal use. During runtime, when client connections are being requested, memory is allocated for each connection. If the allocation fails, this message is displayed. Possible software failure. Monitor and contact supplier Red 120 Detected User Action Icon Color Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Industrial Ethernet Module Diagnostics 11 This section describes the messages logged from the Industrial Ethernet Module (IEM) to the ProcessSuite NIM32. The IEM logs the diagnostics messages based on its configuration setting for DiagnosticLevel. When diagnostics are enabled, the IEM also computes the statistics for its APACS+ Diagnostic tags. The diagnostic messages are logged every 60 seconds when the setting for DiagnosticLevel has a value of either 3 or 5. The IEM messages logged to the NIM32 are easily recognized since each message begins with the text "GATEWAY." Figure 11-1 IEM Diagnostics Logging in NIM32 User Interface The messages logged to the NIM32 are either Statistics messages or Operational messages. The statistics messages can be used to determine if the IEM send and receive blocks (GW_SEND and GW_REC) have been optimally matched such that the rate that the messages are sent does not exceed the rate at which they are received. The operational messages indicate the start and stop of the IEM whenever it gets a new configuration. After the new configuration is processed, the IEM restarts and logs a message indicating the number of connections in use. Other operational messages are logged in the case of certain unexpected events. These messages are logged to give detailed information in case a call for Siemens product support is necessary. Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 121 Industrial Ethernet Module Diagnostics 11.1 Statistics Messages Table 11-1 Statistics Messages Message Description (CONNECTION_NAME) RID=nnn not in S7, messages=nnn For the indicated connection, the RID (Remote ID) is not used in any GW_REC block. Even though the APACS+ GW_SEND block is sending the message to the IEM, the message is not being received by the S7 program. In the S7 program, add a GW_REC block for the connection and make the assignment to the indicated RID. This not in S7 message might reappear with a different RID. That is, it only logs the most recently seen RID that is not programmed in the S7. 122 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Industrial Ethernet Module Diagnostics Message Description (CONNECTION_NAME) TO S7: Messages=nnn Sent=nnn Retries=nnn Discarded=nnn Pending(all)=nnn MaxPending(RID=nnn)=nnn RIDs=nnn This message lists the activity for the connection in the last Diagnostic Interval (for example, the last 60 seconds). The message values indicate the activity since this message last occurred. The Messages indicates the number of data messages from the APACS+ GW_SEND block that have been received by the IEM. The value for Sent indicates the number of data messages transmitted to the S7. If the S7 program was not ready to receive messages (for example, when offline, in Stop, or the GW_REC block has not been called in a fast enough cycle), then the Retries value indicates the number of times a message has been resent. The Discarded value indicates the number of messages intended for the S7 that were not sent. This value indicates messages not sent due to errors, retry attempts exhausted, or time expiration. Each message received by the IEM gets a receive timestamp. If the message is held by the IEM for more than one second, it is considered too old and discarded. This insures that the S7 is sent current messages. This implementation also insures that a backlog of messages is prevented. A backlog could occur if the APACS+ GW_SEND is sending at a faster rate than the S7 GW_REC is capable of receiving. The Pending(all) value indicates the number of messages from all of the APACS+ GW_REC instances that are still in the IEM awaiting transmission to the S7. The value is the total for all RID values used for the connection. Ideally, this number should be less than or equal to the number of different RID values used on the connection. If it is larger, then either the APACS+ GW_SEND call should be made less frequently or else the S7 GW_REC should be made more frequently. The MaxPending(RID=nnn) value indicates the RID that had the most messages pending. Ideally this value should never be more than a few messages. There typically could occur temporary conditions over the sampling interval where several messages for a given RID might be awaiting transmission. However, if this value is consistently high, then optimization of the GW_SEND and GW_REC calls should be made. The final value for RIDs=nnn indicates the total number of RIDs used (in an S7 GW_REC block) on the connection. It is an indication of the load over a given connection. Since each RID is separately transmitted to the S7, a higher number of RID values equates to longer time to transmit each RID message to the S7. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 123 Industrial Ethernet Module Diagnostics Message Description (CONNECTION_NAME) TO S7: Time(ms) between Sends: Min=nnn Avg=nnn Max=nnn This message indicates the rate of message transmission (in milliseconds) over this S7 connection. If the connection is using only a single RID, then the Avg (Average) value should approximate the rate that the APACS+ GW_SEND is sending each message. When more than one RID is used on the connection, this value indicates the rate for all RIDs. The Max value can indicate temporary conditions where it might occasionally take longer to transmit the message (for example, TCP/IP retry). The rate of message transmission is also influenced by the rate that the GW_REC call is made in the S7 program. (CONNECTION_NAME) TO S7: Message Latency (ms): Min=nnn Avg=nnn Max=nnn This message for Message Latency indicates how long a message is held in the IEM. Whenever the APACS+ GW_SEND and S7 GW_REC have been optimized so that the message can be received as fast as it is sent, the values for Min and Avg will typically indicate small milliseconds value. If messages have been backlogged (more than one is pending), then the Max times will increase. A backlog occurs when multiple messages for the same RID or else multiple messages for different RIDs are awaiting transmission. Temporary conditions (such as transmission errors, retries, or S7 not ready to receive) can cause the Max value to reach higher values. (CONNECTION_NAME) TO APACS: Messages=nnn Sent=nnn Discarded=nnn The messages coming from the S7 GW_SEND blocks are indicated. These messages are sent to APACS variables (in the APACS API). The totals for Messages and Sent will match, and the total for Discarded will be zero unless some problem occurs in the IEM. This log message indicates that the messages from the S7 GW_SEND have been sent to the APACS API. The GW_REC blocks programmed in the APACS+ controllers provide the outputs for indicating whether the block received the messages. (CONNECTION_NAME) TO APACS: Message Latency (ms): Min=nnn Avg=nnn Max=nnn Each message from the S7 GW_SEND is time-stamped when received by the IEM. When the message is given to the APACS API, it is considered sent and is time-stamped again. The time difference is the Latency, indicating the amount of time the message spent in the IEM. (CONNECTION_NAME) TO APACS: Time(ms) between Sends: Min=nnn Avg=nnn Max=nnn This message indicates the rate that messages are coming from the S7 GW_SEND blocks programmed for the S7 connection. When only a single GW_SEND is programmed in the S7, the average time (Avg) in milliseconds should correspond to the rate that the GW_SEND is transmitting the message. When there are multiple GW_SENDs on the same connection, these values indicate the total throughput for all RIDs used on the connection. 124 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Industrial Ethernet Module Diagnostics 11.2 Diagnostic and Statistics Data Tags Available through Any Virtual APACS Resource Each virtual APACS resource (connection entry name in the iem2iem.txt file) will maintain data tags for statistic and diagnostic purposes. These tags will be available using the tag read capability of the APACS API. Note Each tag name must be preceded by the virtual resource name (that is, connection name). For example, to read the number of packets sent OK from APACS+ to S7 using connection PC200_ID1, the tagname is the following: PLC200_ID1. APACStoS7.PacketsSentOK Table 11-2 IEM Diagnostics (currently only available on IEM V3.0) Tag Name Data Type Description Gateway.Ethernet.Quality BOOL Indicates whether Ethernet adapter is active (for details see section 9 titled "Redundancy Connection Health") Gateway.MBI.Quality BOOL Indicates whether MBI adapter (MBUS) is active (for details see section 9 titled "Redundancy Connection Health") Table 11-3 APACS to S7 Diagnostic and Statistical Data Tag Name Data Type Description S7.Connection.Online BOOL Indicates whether the S7 connection is alive S7.InvalidR_ID INT If >0 then this RID is not used in the S7 program APACStoS7.Messages.Processed DWORD Count of messages sent to S7 from APACS APACStoS7.Messages.SentOK DWORD Number of messages sent to the S7 successfully APACStoS7.Messages.RetryCount DWORD Number of retry attempts when sending messages APACStoS7.Messages.Deleted DWORD Number of messages not sent (error or too old) APACStoS7.Messages.Pending DWORD Total number of messages now waiting to be sent APACStoS7.MaxPendingAnyRID DWORD Most pending messages at any time for any RID SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 125 Industrial Ethernet Module Diagnostics Tag Name Data Type Description APACStoS7.MinSendInterval DWORD Min Interval between message sends to the S7 from APACS APACStoS7.MaxSendInterval DWORD Max Interval between message sends to the S7 from APACS APACStoS7.AvgSendInterval DWORD Avg Interval between message sends to the S7 from APACS APACStoS7.MinTimePending DWORD Min latency (time message was pending) APACStoS7.AvgTimePending DWORD Avg latency (time message was pending) APACStoS7.MaxTimePending DWORD Max latency (time message was pending) Gateway.Connections.TotalConfigu red USINT Total number of connections currently configured by the IEM. Gateway.Connections.TotalInUse USINT Total number of connections in use - the number of connections that will be serviced. Gateway.Connections.TotalOnline USINT Total number of connections online Gateway.Messages.PerSecond USINT Number of messages processed per second since start Gateway.Messages.PerSecond5s USINT Number of messages processed per second in the last 5 seconds Gateway.Version STRING Gateway Version S7toAPACS.Messages.Processed DWORD Count of messages sent to APACS from S7 S7toAPACS.Messages.SentOK DWORD Number of messages sent to APACS successfully S7toAPACS.Messages.Deleted DWORD Number of messages discarded S7toAPACS.MinSendInterval DWORD Min Interval between message sends to APACS from S7 S7toAPACS.MaxSendInterval DWORD Max Interval between message sends to APACS from S7 S7toAPACS.AvgSendInterval DWORD Avg Interval between message sends to APACS from S7 S7toAPACS.MinTimePending DWORD Min latency (time message was pending) S7toAPACS.MaxTimePending DWORD Max latency (time message was pending) S7toAPACS.AvgTimePending DWORD Avg latency (time message was pending) Table 11-4 APACS to APACS Diagnostic and Statistical Data Tag Name IEM.Connection.Online 126 Data Type BOOL Description Indicates whether the IEM connection is alive Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Industrial Ethernet Module Diagnostics Tag Name Data Type Description IEM.InvalidR_ID INT If >0 then this RID is not used in the partner IEM APACStoIEM.Messages.Processed DWORD Count of messages sent to the partner IEM from APACS APACStoIEM.Messages.SentOK DWORD Number of messages sent to the partner IEM successfully APACStoIEM.Messages.RetryCou nt DWORD Number of retry attempts when sending messages APACStoIEM.Messages.Deleted DWORD Number of messages not sent (error or too old) APACStoIEM.Messages.Pending DWORD Total number of messages now waiting to be sent APACStoIEM.MaxPendingAnyRID DWORD Most pending messages at any time for any RID APACStoIEM.MinSendInterval DWORD Min Interval between message sends to the partner IEM from APACS APACStoIEM.MaxSendInterval DWORD Max Interval between message sends to the partner IEM from APACS APACStoIEM.AvgSendInterval DWORD Avg Interval between message sends to the partner IEM from APACS APACStoIEM.MinTimePending DWORD Min latency (time message was pending) APACStoIEM.AvgTimePending DWORD Avg latency (time message was pending) APACStoIEM.MaxTimePending DWORD Max latency (time message was pending) Gateway.Connections.TotalConfigu red USINT Total number of connections currently configured by the IEM. Gateway.Connections.TotalInUse USINT Total number of connections in use - the number of connections that will be serviced. Gateway.Connections.TotalOnline USINT Total number of connections online Gateway.Messages.PerSecond USINT Number of messages processed per second since start Gateway.Messages.PerSecond5s USINT Number of messages processed per second in the last 5 seconds Gateway.Version STRING Gateway Version IEMtoAPACS.Messages.Processed DWORD Count of messages sent to APACS from the partner IEM IEMtoAPACS.Messages.SentOK DWORD Number of messages sent to APACS successfully from the partner IEM IEMtoAPACS.Messages.Deleted DWORD Number of messages discarded IEMtoAPACS.MinSendInterval DWORD Min Interval between message sends to APACS from the partner IEM IEMtoAPACS.MaxendInterval DWORD Max Interval between message sends to APACS from the partner IEM SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 127 Industrial Ethernet Module Diagnostics Tag Name Data Type Description IEMtoAPACS.AvgSendInterval DWORD Avg Interval between message sends to APACS from the partner IEM IEMtoAPACS.MinTimePending DWORD Min latency (time message was pending) IEMtoAPACS.MaxTimePending DWORD Max latency (time message was pending) IEMtoAPACS.AvgTimePending DWORD Avg latency (time message was pending) 128 Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 Industrial Ethernet Module Diagnostics 11.3 Operational Messages Table 11-5 Operational Messages Message Description S7 API: Gateway not configured The IEM has not yet had any connections downloaded from NETPRO. Use SIMATIC Manager, Hardware Configuration, to assign the IEM to the S7 project, and use NETPRO to assign and download the configuration. The download to the IEM is performed with the S7ONLINE connection set to the TCP/IP interface. Use SIMATIC Manager, Options, and select Set PG/PC Interface to make this setting. S7 API: Could not initialize The IEM does not have a current NETPRO configuration. Use NETPRO to download the configuration to the IEM. S7 API: No Connections Configured The IEM does not have a current NETPRO configuration. Use NETPRO to download the configuration to the IEM. NETPRO was used to assign more connections to the IEM than S7 API: TOO MANY CONNECTIONS CONFIGURED!! the 8 permitted. The IEM performance capacity was exceeded. The message indicates the number of connections that will be Only nnn of nnn are used. serviced. Use NETPRO to remove the extra connections and download the corrected configuration to the IEM. S7 API: S7 Communications started. Connections Configured, count=nnn This message identifies the number of connections currently used by the IEM. It should match the configuration created in NETPRO. S7 API: S7 Communications stopped This is an informative message stating that the communications to the S7 were stopped. This can occur if a new NETPRO configuration has been downloaded to the IEM. When this happens, the S7 communications are stopped, the new configuration is accepted, and then S7 communications are restarted. ACP (CONNECTION_NAME) FATAL Error... The APACS+ Communications Process (ACP) has encountered some type of fatal error (from the APACS API). This condition prevents the IEM from running. Contact Siemens product support if a check of the complete configuration (IEM, GW_SEND and GW_REC programming, or physical cabling) does not solve the indicated problem. Further checks of the IEM hardware and operating system might be required. ACP (CONNECTION_NAME) Error updating statistics... The APACS tags used for the statistics could not be refreshed. An error code from the APACS API is logged. Although not fatal, this error should be investigated and Siemens product support contacted. Further checks of the IEM hardware and operating system might be required. SIMATIC Industrial Ethernet Module (IEM) Manual, 06/2012, A5E00322186-08 129