Monitoring of 24 V load circuits

Similar documents
Monitoring of 24 V load circuits


Block for SIMOTION SCOUT for Monitoring 24V-Branches

Key Panel Library / TIA Portal

Checking of STEP 7 Programs for the Migration of S7-318 to S CPU318 Migration Check. Application description 01/2015

Applications & Tools. Block for STEP 7 V5.5 for monitoring 24 V DC load circuits using SITOP PSE200U Single Channel Message and S7-300/400 CPUs

Generating the Parameters for the Modbus/TCP Communication

Communication between HMI and Frequency Converter. Basic Panel, Comfort Panel, Runtime Advanced, SINAMICS G120. Application Example 04/2016

Display of SINAMICS Fault Messages in WinCC V7.4

Library Description 08/2015. HMI Templates. TIA Portal WinCC V13.

User Login with RFID Card Reader

Display of SINAMICS Error Messages in Runtime Professional

Windows firewall settings for X-Tools Server Pro. CMS X-Tools / V / CPU PN/DP. Application description 6/2016

Applications & Tools. Communication between WinAC MP and a SIMATIC S7. Application for the PUT and GET Function Blocks of the S7 Communication

SINAMICS G/S: Integrating Warning and Error Messages into STEP 7 V5.x or WinCC flexible

X-Tools Loading Profile Files (LPF)


Setting up time synchronization of Process Historian and Information Server

Diagnostics for enabled Configuration Control with S and ET200SP

Configuration Control with the S and ET 200SP

Moving a Process Historian/ Information Server from Workgroup A to Workgroup B


Networking a SINUMERIK 828D


Setting up a secure VPN Connection between SCALANCE S and CP x43-1 Adv. Using a static IP Address. SCALANCE S, CP Advanced, CP Advanced

Automatic Visualization of the Sample Blocks in WinCC Advanced


Integral calculation in PCS 7 with "Integral" FB or "TotalL" FB

Setting up a secure VPN connection between two SCALANCE S Modules Using a static IP Address

House Control with Touch Panel

Setting up a secure VPN Connection between CP x43-1 Adv. and SOFTNET Security Client Using a static IP Address

Improving the performance of the Process Historian

Determination of suitable hardware for the Process Historian 2014 with the PH-HWAdvisor tool

Applications & Tools. Time-of-Day Synchronization between WinCC Runtime Professional and S7 Controllers. WinCC Runtime Professional

Position Control with SIMATIC S and SINAMICS V90 via IRT PROFINET SINAMICS V90 PROFINET. Application description 03/2016

STEP 7 function block to control a MICROMASTER 4 or SINAMICS G120/G120D via PROFIBUS DP

Exchange of large data volumes between S control system and WinCC

S Data Transfer with SEND/RECEIVE Interface

Use and Visualization of IOLink Devices

Configuring the F-I-Device function with the SENDDP and RCVDP blocks.

Check List for Programming Styleguide for S7-1200/S7-1500

Configuration of an MRP Ring and a Topology with Two Projects

Transmitting HMI data to an external monitor

WinCC Runtime Professional S7-Graph Overview and PLC Code Viewer


SINAMICS G/S: Tool for transforming Warning and Error Messages in CSV format

Setting up a secure VPN Connection between the TS Adapter IE Advanced and Windows 7

Setting up a secure VPN Connection between SCALANCE S and SSC Using a static IP Address. SCALANCE S, SOFTNET Security Client

Configuration of an MRP ring with SIMOCODE and SIMATIC S SIMOCODE pro V PN, SIMATIC S Siemens Industry Online Support

Application example 12/2016. SIMATIC IOT2000 OPC UA Client SIMATIC IOT2020, SIMATIC IOT2040

Application example 02/2017. SIMATIC IOT2000 Connection to IBM Watson IoT Platform SIMATIC IOT2040

Data Synchronization between Head and Field PLCs with Storage of the Process Values in CSV Files

I-Device Function in Standard PN Communication SIMATIC S7-CPU, CP, SIMOTION, SINUMERIK. Configuration Example 08/2015

TeleService of a S station via mobile network

SIMATIC NET OPC Server Implementation

SIMATIC PCS 7 Minimal Configuration

SINAMICS V: Speed Control of a V20 with S (TIA Portal) via MODBUS RTU, with HMI



Visualizing Energy Data of a SITOP PSU8600

Sample Blocks for WinCC V7 and STEP 7 (TIA Portal)

Universal Parameter Server

Application for Process Automation

Applikationen & Tools. Network Address Translation (NAT) and Network Port Address Translation (NAPT) SCALANCE W. Application Description July 2009

Application about Drive Technology


Communication via the CM PtP of the ET200 SP using the Freeport Protocol. S7-300, ET200SP, CM PtP, SIMATIC MV340. Application description 03/2015

Applications & Tools. Service Concept: Auto Backup for the Comfort Panels. WinCC (TIA Portal) V12. Application Description May 2013

Communication of a SIMATIC MV400, SIMATIC S7-1200/1500 and a HMI via PROFINET/IE SIMATIC MV400. Application Description 11/2014


Cover. WinAC Command. User documentation. V1.5 November Applikationen & Tools. Answers for industry.

Application on Control Technology


Serial Connection of SIMATIC RFID Readers via ET 200 Systems

Synchronizing recipes via a SIMATIC HMI Panel

Sending and Receiving SMS Messages via a SCALANCE M Router SCALANCE M874/M876, S7-1200/S CPU / V1.0. Application Example 06/2016

Multiuser Engineering in the TIA Portal

Setting up 01/2017. Setting up the SIMATIC IOT2000 SIMATIC IOT2020, SIMATIC IOT2040


Check List for Programming Styleguide for S7-1200/S7-1500

Production feedback via WinCC Data Transfer with XML file

Applications & Tools. Individual Access to Stored PDF- and HTML-Documents via Comfort Panel. WinCC Comfort V11. Application Description May 2012

Setting up 08/2017. Setting up the SIMATIC IOT2000 SIMATIC IOT2020, SIMATIC IOT2040

Acyclic communication between S and V90PN via PROFINET. Application example 12/




Data Storage on Windows Server or NAS Hard Drives

Time Synchronization with an HMI Operator Panel and a SIMATIC PLC

PCS 7 Process Visualization on Mobile Devices with RDP

Open user communication to 3rd party control system. STEP 7 (TIA Portal), S7-1200/S7-1500, Allen-Bradley. Library description 01/2015

Application Description 03/2014. Detecting PROFINET Topologies and Activating IO Devices.

Monitoring Energy Consumption with LOGO! 8 and LOGO! CMR

SINAMICS G120 / G120C / G120D / G120P (with FW >= 4.6) SIMATIC S7-300/400. Short-Documentation 04/2014

Cover sheet. Application Operations Diary. WinCC Flexible 2008 SP1. Application Description June Applications & Tools. Answers for industry.




Configuration Control with the S and ET 200SP


Transcription:

Application description 05/2014 Monitoring of 24 V load circuits S7-300 CPU, SITOP PSE200U with single-channel signaling, SIMATIC Panel http://support.automation.siemens.com/ww/view/en/61450284

Warranty and liability Warranty and liability Note The Application Examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The Application Examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These application examples do not relieve you of the responsibility to use safe practices in application, installation, operation and maintenance. When using these Application Examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these application examples and other Siemens publications e.g. Catalogs the contents of the other documents have priority. We do not accept any liability for the information contained in this document. Siemens AG 2014 All rights reserved Any claims against us based on whatever legal reason resulting from the use of the examples, information, programs, engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act ( Produkthaftungsgesetz ), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract ( wesentliche Vertragspflichten ). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment. Any form of duplication or distribution of these Application Examples or excerpts hereof is prohibited without the expressed consent of Siemens Industry Sector. Security information Siemens provides products and solutions with industrial security functions that support the secure operation of plants, solutions, machines, equipment and/or networks. They are important components in a holistic industrial security concept. With this in mind, Siemens products and solutions undergo continuous development. Siemens recommends strongly that you regularly check for product updates. For the secure operation of Siemens products and solutions, it is necessary to take suitable preventive action (e.g. cell protection concept) and integrate each component into a holistic, state-of-the-art industrial security concept. Third-party products that may be in use should also be considered. For more information about industrial security, visit http://www.siemens.com/industrialsecurity. To stay informed about product updates as they occur, sign up for a productspecific newsletter. For more information, visit http://support.automation.siemens.com. Entry-ID: 61450284, V1.1, 05/2014 2

Table of contents Siemens AG 2014 All rights reserved Table of contents Warranty and liability... 2 1 Task... 5 2 Solution... 7 2.1 Overview of the general solution... 7 2.2 Description of the core functionality... 10 2.3 Hardware and software components used... 13 3 Basics on Control Messages (PLC Alarms)... 15 4 Functional Mechanisms of the Application... 16 4.1 User program of the S7-CPU... 16 4.2 Signal evaluation with the PSE_DIAG (FB50) block... 18 4.3 HMI interface... 22 4.4 Visualization... 23 4.4.1 Displaying the states... 23 4.4.2 Controls the remote reset input (RST) of the PSE200U module... 24 4.4.3 Displaying the control messages (PLC alarms)... 25 4.5 Message generation with the Messages block (FB10)... 26 5 Configuration and Settings... 31 5.1 Creating the alarm class... 31 5.2 Configuring control messages (PLC alarms)... 33 5.2.1 Filling the block interface of the Messages (FB10) block and calling the ALARM_D message blocks.... 33 5.2.2 ALARM_D message block... 34 5.2.3 Inputs and outputs of the ALARM_D message block... 35 5.2.4 Editing the PLC alarms in the Alarm class editor... 38 5.2.5 Display PLC alarm at the SIMATIC Panel... 39 5.3 Changing the I/O addresses... 40 6 Installation... 41 6.1 Hardware configuration... 41 6.1.1 Structure... 41 6.1.2 Overview of the I/O addresses... 42 6.1.3 Overview of IP addresses... 42 6.2 Software installation... 42 6.3 Installing the application software... 43 7 Starting up the Application... 44 7.1 Preparation... 44 7.1.1 Changing the IP address of the PG/PC... 44 7.1.2 Changing the IP address of the SIMATIC Panel... 45 7.1.3 Changing the IP address of SIMATIC S7-300 CPU... 46 7.2 Commissioning... 49 7.2.1 Transferring the project to the SIMATIC Panel... 49 7.2.2 Loading the project into the S7-CPU... 52 7.3 Using the application with STEP 7 / WinCC V13... 54 8 Operation of the Application... 58 8.1 Overview... 58 8.2 Start screen... 59 8.3 Sample project... 59 8.3.1 Overview screen... 60 8.3.2 State of the outputs of the SITOP PSE200U screen... 61 8.4 Examples for the operation... 64 Entry-ID: 61450284, V1.1, 05/2014 3

Table of contents 8.4.1 Overload of the motor... 64 8.4.2 Short-circuit at the lighting... 65 8.4.3 Error of the PSE_DIAG (FB50) block... 66 9 Links & Literature... 67 10 History... 67 Siemens AG 2014 All rights reserved Entry-ID: 61450284, V1.1, 05/2014 4

1 Task 1 Task Overview of the automation task Figure 1-1 Visualization Operator panel Display of the load circuits Display of the messages Control S7-CPU Digital Input serial coding Power supply and load circuits Power Supply (24V DC) OUT 1-4 PSE 200U Status S Load 4 Load 3 Load 2 Load 1 Entry-ID: 61450284, V1.1, 05/2014 5

1 Task Description of the automation task Using the PSE200U module enables monitoring up to four 24 V load circuits electronically for overload or short-circuit. The PSE200U module is connected to a controlled 24 V power supply with up to 40 A output current, e.g. a 24 V power supply by SITOP. The PSE200U module divides the controlled output voltage (24 V DC) between four load circuits. The 24 V load circuits are connected to the outputs OUT 1 to OUT 4 and monitored by the electronic system of the PSE200U module. Load 1 is located in the 24 V load circuit of output OUT 1. The module detects, for example, if an overload or a short-circuit occurs in a load circuit. In the case of an overload or short-circuit, the appropriate outputs OUT 1 to OUT 4 are automatically switched off. The state output (S) of the PSE200U module supplies a signal that serially codes the state of the outputs OUT 1 to OUT 4. The following tasks must be solved in order for the status of the individual channels to be evaluated by the SIMATIC S7-300 CPU and displayed by the SIMATIC Panel: Reading the signal of the status output (S) of an S7-CPU. Evaluating the signal course of the status output (S) in the user program of the SIMATIC S7-300 CPU, in order to save the states of outputs OUT 1 to OUT 4 of the PSE200U module in the SIMATIC S7-300 CPU and provide it for the SIMATIC Panel. The S7-CPU must generate all massages on the state of outputs OUT 1 to OUT 4 for the SIMATIC Panel. Resetting the message and the PSE200U module at the SIMATIC Panel via remote reset. Entry-ID: 61450284, V1.1, 05/2014 6

2 Solution 2.1 Overview of the general solution 2 Solution 2.1 Overview of the general solution The PSE_DIAG (FB50) block of library SITOP_Library_V12_S7-300_S7-400 reads the signal of the state output (S) of the PSE200U module via a digital input at the S7-CPU and evaluates the read signal. The information available from the evaluation is displayed as message on a SIMATIC Panel. We will show you: Schematic layout how the PSE_DIAG (FB50) block is integrated in the user program of the S7-CPU how the states of outputs OUT 1 to OUT 4 of the PSE200U module are visualized on a SIMATIC Panel (TP900 Comfort Panel) a message procedure (control messages (PLC alarms)) The figure below shows a schematic illustration of the main components of this solution. Figure 2-1 6 User program with PSE_DIAG (FB50) block from the SITOP_Library_V12_S7-300_S7-400 library 7 5 4 2 Industrial Ethernet 3 8a 2 M 8b 8 1 Entry-ID: 61450284, V1.1, 05/2014 7

2 Solution 2.1 Overview of the general solution Components included The following table represents a list of the used hardware components. Table 2-1 No. Component Description 1 SITOP PSE200U with single-channel signaling The PSE200U module is connected to a 24 V DC power supply. The output voltage (24 V DC) generated by the power supply is divided between four load circuits. 2 Load circuits The load circuits are connected to outputs OUT 1 to OUT 4 of the PSE200U module, e.g.: motor at output OUT 1 lighting at output OUT 2 3 Status output (S) The state output (S) of the PSE200U module supplies a signal that serially codes the states of all four outputs OUT 1 to OUT 4. 4 Digital input module / Digital output module (DI/DO) The signal of status output (S) of the S7-CPU is read via the digital input module. Via a digital output, the remote reset input (RST) of the PSE200U module is controlled by the S7-CPU. 5 SIMATIC S7-300/400 CPU In the user program of the S7-CPU, the signal of the status output (S) is evaluated to monitor the states of the load circuits connected at outputs OUT 1 to OUT 4 of the PSE200U module. The S7-CPU detects: output OUT 1 of the PSE200U module is switched off, e.g. due to an overload at the connected motor output OUT 2 of the PSE200U module is switched off, e.g. due to a short circuit of the connected lighting 6 SIMATIC Panel The SIMATIC Panel indicates: states of the load circuits messages on state changes at the load circuits 7 Power Supply (PS) 24 V DC power supply with an output current of up to 40 A. 8 Remote reset input (RST) If outputs OUT 1 to OUT 4 of the PSE200U module were automatically switched off due to a failure, e.g. overload or short-circuit, they can be switched back on after a wait time of 20s via the remote reset input (RST). In the application, the remote reset input (RST) is controlled via the SIMATIC Panel (8a). However, it can also be controlled directly by pressing a button (8b). Entry-ID: 61450284, V1.1, 05/2014 8

2 Solution 2.1 Overview of the general solution The following table represents a list of the used software components. Table 2-2 Block in the S7-CPU PSE_DIAG (FB50) Messages (FB10) Function The block: evaluates the signal of the state output (S) indicates the state of outputs OUT 1 to OUT 4 at its output The block creates PLC alarms with ALARM_D, which are indicated at the SIMATIC Panel. The SIMATIC Panel displays messages if the load circuits connected at outputs OUT 1 to OUT 4 fail or are switched off. Comment Universal block from the SITOP_Library_V12_S7-300_S7-400 library; not modified by the user Individual function block which can be modified and adjusted by the user Advantages The application on hand offers you the following advantages: Detecting overload or short-circuit in individual 24 V load circuits reliably even for long and thin lines or creeping short-circuits and switches the 24 V load circuits to zero current. Avoiding plant down times by maintaining the 24 V supply of the remaining consumers. Sequential switching of the individual channels unloads the power supply. Reducing down-times by fast and channel-specific error localization of the faulty 24 V load circuit via direct integration into the S7 diagnosis (via the PSE_DIAG (FB50) function block). Simple and cost-efficient connection to a PLC. Only one single digital input per PSE200U module is required. Topics not covered by this application This application does not include a description of programming and configuration in STEP 7 V12 programming and configuration in WinCC V12 Basic knowledge of these topics is assumed. Entry-ID: 61450284, V1.1, 05/2014 9

2 Solution 2.2 Description of the core functionality 2.2 Description of the core functionality Principle of the core functionality The diagram below shows the sequence of the core functionality in this application. Figure 2-2 OUT 4 OUT 3 OUT 2 OUT 1 S7-CPU 0 0 1 1 1 2 3 S IMPULSE PSE_DIAG CHANNEL_STATE DATA PSE 200U Table 2-3 No. The following table describes the process. Action 4 SIMATIC Panel 1 The PSE_DIAG (FB50) block reads the signal of the state output (S) of the PSE200U module via its IMPULSE input and evaluates it. 2 At its CHANNEL_STATE output, the PSE_DIAG (FB50) block indicates the state of outputs OUT 1 to OUT 4 of the PSE200U module. 3 The status information indicated at the CHANNEL_STATE output is saved in data block DATA (DB2). 4 The states are read from data block DATA (DB2) and displayed at the SIMATIC Panel on several screens. Furthermore, messages on the state of output OUT 1 to OUT 4 are indicated at the SIMATIC Panel. Entry-ID: 61450284, V1.1, 05/2014 10

2 Solution 2.2 Description of the core functionality Visualization on the SIMATIC Panel The screens of the SIMATIC Panel are shown below. Table 2-4 Designation Note Start screen Overview Entry-ID: 61450284, V1.1, 05/2014 11

2 Solution 2.2 Description of the core functionality Designation Note State of the outputs of the SITOP PSE200U Entry-ID: 61450284, V1.1, 05/2014 12

2 Solution 2.3 Hardware and software components used 2.3 Hardware and software components used The application document was generated using the following components: Hardware components Table 2-5 Component Qty. Order number Note Controlled power supply: SITOP smart 24 V/10 A SITOP PSE200U with single-channel signaling 1 6EP1334-2BA01 Alternatively, you can use any 24 V DC power supply with an output current of up to 40 A 1 6EP1961-2BA31 Alternatively, you can also use the version for monitoring higher currents (4 x 3 to 10 A): 6EP961-2BA41 SIMATIC S7-300 CPU 1 6ES7315-2AG10-0AB0 Alternatively, you can use any S7-300/400 CPU. CP343-1 1 6GK7343-1EX30-0XE0 Using an S7-CPU with integrated PROFINET interface does not require an Industrial Ethernet CP. Digital input module / Digital output module: SM323 DI8/DO8 24V 1 6ES7323-1BH01-0AA0 Alternatively, you can use another digital input module or digital output module. TP900 Comfort Panel 1 6AV2124-0JC01-0AX0 Standard software components Table 2-6 Component Qty. Order number Note STEP 7 Professional V12 SP1 Upd4 WinCC Professional V12 SP1 Upd4 1 6ES7822-1AA02-0YA5 Configuring the S7-CPUs requires STEP 7 Professional V12 SP1 Upd4 or higher. 1 6AV2103-0XA02-0AA5 Configuring the SIMATIC Panel requires WinCC Professional V12 SP1 Upd4 or higher. Note Service Pack 1 (SP1) for STEP 7 V12 is available to you as download on the internet (see \5\). Service Pack 1 (SP1) for WinCC V12 is available to you as download on the internet (see \6\). The current updates for STEP 7 V12 SP1 and WinCC V12 SP1 are available to you as download on the internet (see \7\). Entry-ID: 61450284, V1.1, 05/2014 13

2 Solution 2.3 Hardware and software components used Downloads of the application The following table includes all downloads of the application. Table 2-7 Component Note 61450284_SITOP_Appl_S7-300_400_CODE_v11.zip This zip file contains the STEP 7 project. 61450284_PSE_DIAG_Applikation_S7-300_DOKU_en.pdf This document. Entry-ID: 61450284, V1.1, 05/2014 14

3 Basics on Control Messages (PLC Alarms) 3 Basics on Control Messages (PLC Alarms) Messages enable you to recognize processing errors within the automation systems, localize them exactly and remove them. This can considerably shorten the down-times of a plant. Before messages can be output, they need to be configured. The message system in WinCC V12 SP1 enables the display and recording of operating states and failures at a SIMATIC Panel, which are pending or occurring in a plant. The message system in WinCC V12 SP1 processes various alarm methods of the controller and the SIMATIC Panel. For the S7-300 CPUs only the control messages (PLC alarms) are used. Control messages (PLC alarms) are configured in STEP 7. These event-related messages are assigned to one respective block (FB). They are generated in the program editor. In the message editor you assign message texts and message attributes to the generated PLC alarms. Control messages (PLC alarms) are then further edited in WinCC V12 SP1. Note Detailed information on the configuration of control messages (PLC alarms) is available in chapter 5.2 and in the STEP 7 V12 SP1 manual (see \3\) Detailed information on working with messages in WinCC V12 SP1 is available in the WinCC V12 SP1 manual (see \4\). Entry-ID: 61450284, V1.1, 05/2014 15

4 Functional Mechanisms of the Application 4.1 User program of the S7-CPU 4 Functional Mechanisms of the Application The following sections provide detailed explanations of the following 5 functions: User program of the S7-CPU Signal evaluation with the PSE_DIAG (FB50) block HMI interface Visualization Message generation with the Messages block (FB10) 4.1 User program of the S7-CPU The following figure shows the structure of the user program in the S7-CPU. Overview Figure 4-1 Initialization Startup [OB 100] Analyzing the state of the PSE200U module Cyclic interrupt [OB 35] PSE_DIAG HMI interface DATA Message generation and remote reset Main [OB 1] Messages -ALARM_D Entry-ID: 61450284, V1.1, 05/2014 16

4 Functional Mechanisms of the Application 4.1 User program of the S7-CPU Blocks The user program of the SIMATIC S7-300 CPU consists of the following blocks: Table 4-1 Block Symbolic name Description OB1 Main In OB1 the Messages block (FB10) including the appropriate instance data block idb_messages (DB10) is called cyclically. In OB1 the remote reset input (RST) of the PSE200U module is controlled via a digital output of the S7-CPU. OB35 CYC_INT5 In OB35, the PSE_DIAG block (FB50) including the appropriate instance data block idb_pse_diag (DB50) is called cyclically. OB100 COMPLETE RESTART After starting the S7-CPU, all parameters are reset: static variables in the instance data block outputs of the PSE_DIAG (FB50) block FB50 PSE_DIAG The block originates from the SITOP_Library_V12_S7-300_S7-400 library. The block evaluates the signal of the state output (S) of the PSE200U module and determines the state of output OUT 1 to OUT 4 of the PSE200U module. DB50 idb_pse_diag Instance DB of the PSE_DIAG (FB50) block. DB2 DATA The states of outputs OUT 1 to OUT 4 of the PSE200U module are saved in data block DB2. This enables the visualization to access the states. FB10 Messages The Messages (FB10) block calls four ALARM_D message blocks. This creates a PLC alarms for each output OUT 1 to OUT 4 of the PSE200U module, which is sent to the SIMATIC Panel independent of the state of the respective output. DB10 idb_messages Instance data block of the Messages (FB10) block. Entry-ID: 61450284, V1.1, 05/2014 17

4 Functional Mechanisms of the Application 4.2 Signal evaluation with the PSE_DIAG (FB50) block Data flow Figure 4-2 The figure below shows the data flow of the application. SIMATIC Panel TP900 Comfort Panel 5 3 PLC alarms SIMATIC S7-1500 CPU 4 States Messages -ALARM_D Main [OB 1] 1 2 State output (S) Table 4-2 No. PSE200U Cyclic interrupt [OB 35] PSE_DIAG Action DATA State of the outputs OUT 1 to OUT 4 of the PSE200U module 1 The PSE_DIAG (FB50) block evaluates the signal of the state output (S) of the PSE200U module to determine the state of output OUT 1 to OUT 4. 2 The status information is saved in data block DATA (DB2). 3 The saved states are read by the SIMATIC Panel TP900 Comfort Panel. Depending on the state a PLC alarm is generated and displayed at the SIMATIC Panel. 4 The Messages block (FB10) calls the ALARM_D message block internally to send PLC alarms regarding the state of outputs OUT 1 to OUT 4 of the PSE200U module to the SIMATIC Panel. 5 The PLC alarms are displayed at the SIMATIC Panel as control messages. 4.2 Signal evaluation with the PSE_DIAG (FB50) block The PSE_DIAG (FB50) block has the following task: Evaluation of the state output (S) of the PSE200U module. This determines the states of outputs OUT 1 to OUT 4 of the PSE200U module. Save these states in the S7-CPU and process them further. Figure 4-3 shows the call of block PSE_DIAG (FB50) in the user program of the S7-CPU. Entry-ID: 61450284, V1.1, 05/2014 18

4 Functional Mechanisms of the Application 4.2 Signal evaluation with the PSE_DIAG (FB50) block The block is called cyclically in the cyclic interrupt OB OB35 with the default time interval of 100ms. Figure 4-3 DB50 idb_diag FB50 PSE_DIAG DONE BOOL BUSY BOOL CHANNEL_STATE BYTE BOOL IMPULSE STATUS WORD BOOL COM_RST ERROR BOOL Inputs The following table shows the assignment of the inputs of the PSE_DIAG (FB50) block. Table 4-3 Input Data type Variable Description IMPULSE BOOL I4.0 Input via which the signal of the state output (S) is read. The address of the input is available in the device configuration of STEP 7 V12 SP1 (see chapter 6.1.2). COM_RST BOOL DB2.DBX0.1 For a positive edge of the variable a reset will be triggered. All parameters are reset. static variables in the instance data block outputs of the block Entry-ID: 61450284, V1.1, 05/2014 19

4 Functional Mechanisms of the Application 4.2 Signal evaluation with the PSE_DIAG (FB50) block Outputs The outputs of the PSE_DIAG (FB50) block are saved in data block DATA (DB2). The assignment of the outputs is listed in the following table. Table 4-4 Output Data type Variable Description COM_RST input DONE BOOL DB2.DBX0.2 1 = Evaluation of the state output (S) completed successfully. The state of outputs OUT 1 to OUT 4 of the PSE200U module is displayed at the CHANNEL_STATE output. 0 = Evaluation of the signal of the state output (S) running. BUSY BOOL DB2.DBX0.3 1 = PSE_DIAG (FB50) block is active. 0 = If at the same time DONE = 1, data from the CHANNEL_STATE output can be adopted. ERROR BOOL DB2.DBX0.4 Error display 1 = error 0 = no error CHANNEL_STATE BYTE DB2.DBB1 State of outputs OUT 1 to OUT 4 of the PSE200U module. Table 4-5 shows the structure of CHANNEL_STATE STATUS WORD DB2.DBW2 Status display The variable of the COM_RST input is set to value 1 in Startup-OB OB100. The PSE_DIAG (FB50) block is called at the first call in OB35 with COM_RST = 1. Subsequently, the variable in OB35 is reset to value 0. Entry-ID: 61450284, V1.1, 05/2014 20

4 Functional Mechanisms of the Application 4.2 Signal evaluation with the PSE_DIAG (FB50) block CHANNEL_STATE output The following table shows the structure of CHANNEL_STATE: Addresses in data block DATA (DB2) Values depending on output OUT 1 to OUT 4 of the PSE200U module. Table 4-5 CHANNEL_STATE output State of OUT 1 to OUT 4 Value (bin) CHANNEL_STATE STATUS output Bit 0 DB2.DBX1.0 OUT 1 0 1 1 0 Bit 1 DB2.DBX1.1 OUT 2 0 1 1 0 Bit 2 DB2.DBX1.2 OUT 3 0 1 1 0 Bit 3 DB2.DBX1.3 OUT 4 0 1 1 0 Bit 4 DB2.DBX1.4 Not relevant - Bit 5 DB2.DBX1.5 Not relevant - Bit 6 DB2.DBX1.6 Not relevant - Bit 7 DB2.DBX1.7 Not relevant - The STATUS output is used for fault diagnosis, if the signal of the state output (S) could not be evaluated successfully. The value of the STATUS output is saved in data block DATA (DB2.DBW2) and displayed at the SIMATIC Panel. If block PSE_DIAG (FB50) supplies an error, the Error FB PSE_DIAG message is displayed at the SIMATIC Panel. Note Information on error messages can be referred to in the library description (see \1\): 61450284_PSE_DIAG_Bibliothek_DOKU_S7-300_S7-400_TIA_en.pdf Program details on the PSE_DIAG (FB50) block Note Information on the program details of the PSE_DIAG (FB50) block can be referred to in the library description (see \1\): 61450284_PSE_DIAG_Bibliothek_DOKU_S7-300_S7-400_TIA_en.pdf Entry-ID: 61450284, V1.1, 05/2014 21

4 Functional Mechanisms of the Application 4.3 HMI interface 4.3 HMI interface The data required for the visualization is stored in variables of data block DATA (DB2) (see Table_4_6). These variables are integrated into WinCC V12 SP1 and form the HMI interface. Table 4-6 Variable Data type Address Description HMI_RESET BOOL DB2.DBX0.1 Controls the remote reset input (RST) of the PSE200U module ERROR_MESSAGE BOOL DB2.DBX0.5 Error of the PSE_DIAG (FB50) block CHANNEL_STATE BYTE DB2.DBB1 Bit 0: State OUT 1 Bit 1: State OUT 2 Bit 2: State OUT 3 Bit 3: State OUT 4 Bit 4 to bit 7: Reserved STATUS_SAVE WORD DB2.DBW4 Status of the PSE_DIAG (FB50) block Entry-ID: 61450284, V1.1, 05/2014 22

4 Functional Mechanisms of the Application 4.4 Visualization 4.4 Visualization The State of the outputs of the SITOP PSE200U screen displays the variables of the HMI interface at the SIMATIC Panel. The variables of the HMI interface are linked with WinCC basic objects and elements. Figure 4-4 4.4.1 Displaying the states To display the states of output OUT 1 to OUT 4 as well as the state of the PSE_DIAG (FB50) block on the SIMATIC Panel, the following variables of the HMI interface in the State of the outputs of the SITOP PSE200U screen are linked with WinCC basic objects and elements. Table 4-7 WinCC Basic object / element Variable Data type Bit Description Text field CHANNEL_STATE BYTE 0 Channel 1 Text field CHANNEL_STATE BYTE 1 Channel 2 Text field CHANNEL_STATE BYTE 2 Channel 3 Text field CHANNEL_STATE BYTE 3 Channel 4 I/O field STATUS_SAVE WORD - Status of the PSE_DIAG (FB50) block Entry-ID: 61450284, V1.1, 05/2014 23

4 Functional Mechanisms of the Application 4.4 Visualization States of outputs OUT 1 to OUT 4 of the PSE200U module The individual bits of the CHANNEL_STATE variable contain the states of outputs OUT 1 to OUT 4 of the PSE200U module and are assigned in the text fields. This enables representing the states of outputs OUT 1 to OUT 4 via the background color of the text fields. Each text field shows the state of one output OUT 1 to OUT 4 of the PSE200U module. Each of the outputs OUT 1 to OUT 4 can take on state 0 or 1. The text fields are represented red or green independent of the state of output OUT 1 to OUT 4 (see Table 8-4). The following table shows which states of module PSE200U cause the outputs OUT 1 to OUT 4 to go to state 0 or 1. Table 4-8 State of PSE200U State of OUT 1 to OUT 4 Output enabled 1 Output current > rated current 1 Device starting up, supply voltage missing 0 Output was automatically disabled 0 Automatic disable can be reset 0 Output manually disabled 0 Output defective (internal fuse has tripped) 0 Device over temperature 0 Status of the PSE_DIAG (FB50) block The STATUS_SAVE variable contains the state of the PSE_DIAG (FB50) block and is assigned to an I/O field. 4.4.2 Controls the remote reset input (RST) of the PSE200U module The HMI_RESET variable is assigned to the RESET button. This enables you to set the variable to value 1 via the SIMATIC Panel and reset it to value 0 again. In the user program of the S7-CPU (OB1) the HMI_RESET variable is assigned to the digital RESET output (Q8.4). The digital output is connected with the remote reset input (RST) of the PSE200U module. When clicking the RESET button, the HMI_RESET variable is set to value 1, so the digital RESET output (Q8.4) and the remote reset input (RST) are controlled to trigger a reset of the PSE200U module. Outputs OUT 1 to OUT 4, which were automatically switched off due to a failure, e.g. overload or short-circuit, are automatically switched back on if the wait time of 20s has already elapsed. As soon as you release the RESET button, the HMI_RESET variable is reset to value 0. The digital RESET output (Q8.4) and the remote reset input (RST) are no longer controlled. Entry-ID: 61450284, V1.1, 05/2014 24

4 Functional Mechanisms of the Application 4.4 Visualization 4.4.3 Displaying the control messages (PLC alarms) States of outputs OUT 1 to OUT 4 Table 4-9 Name of the PLC alarm When the outputs OUT 1 to OUT 4 of the PSE200U module take on the state 0, the control message (PLC alarm) on the state of the respective output is displayed in the alarm view. The following table shows the texts and attributes used for configuring the four control messages (PLC alarms) on the state of output OUT 1 to OUT 4. Message text Alarm class Acknowledgement EV_ID1 Channel Error 1 AlarmClass deactivated EV_ID2 Channel Error 2 AlarmClass deactivated EV_ID3 Channel Error 3 AlarmClass deactivated EV_ID4 Channel Error 4 AlarmClass deactivated The messages need not be acknowledged. As soon as the outputs OUT 1 to OUT 4 of the PSE200U module go back to state 1, the message goes automatically and is no longer displayed in the alarm view. Status of the PSE_DIAG (FB50) block Table 4-10 Name of the PLC alarm When the PSE_DIAG (FB50) block displays an error at its ERROR output, the control message (PLC alarm) on the status of the PSE_DIAG (FB50) block is displayed in the alarm view. The following table shows the text and attributes used for configuring the control message (PLC alarm) on the status of the PSE_DIAG (FB50) block. Message text Alarm class Acknowledgement EV_ID5 Error FB PSE_DIAG AlarmClass deactivated The message needs not be acknowledged. As soon as the error is removed and the PSE_DIAG (FB50) block its DONE output indicates that the data of the CHANNEL_STATE output can be adopted, the message goes automatically and is no longer displayed in the alarm view. Entry-ID: 61450284, V1.1, 05/2014 25

4 Functional Mechanisms of the Application 4.5 Message generation with the Messages block (FB10) 4.5 Message generation with the Messages block (FB10) The Messages (FB10) block has the task to send 5 PLC alarms to the SIMATIC Panel. Figure 4-5 shows the call of the Messages (FB10) block in the user program of the S7-300/400 CPU. The Messages (FB10) block is called at cyclic intervals in OB1. Figure 4-5 DB10 idb_messages FB10 Messages BOOL C_Alarm_s C_Alarm_s C_Alarm_s C_Alarm_s EN EV_ID1 EV_ID2 EV_ID3 EV_ID4 C_Alarm_s BOOL BOOL BOOL BOOL BOOL EV_ID5 SIG_OUT1 SIG_OUT2 SIG_OUT3 SIG_OUT4 SIG_ERR_PSEDIAG Entry-ID: 61450284, V1.1, 05/2014 26

4 Functional Mechanisms of the Application 4.5 Message generation with the Messages block (FB10) Overview of inputs The following table shows the assignment of the inputs of the Messages (FB10) block. Table 4-11 Input Data type Variable / Value Description EN BOOL M0.1 Enabling the Messages (FB10) block 1 = block is enabled (functions of the block are executed) 0 = block is not enabled (functions of the block are not executed) EV_ID1 EV_ID2 EV_ID3 EV_ID4 EV_ID5 C_Alarm_s DW#16#6000_00001 Message number (ID) of PLC alarm 1 C_Alarm_s DW#16#6000_00002 Message number (ID) of PLC alarm 2 C_Alarm_s DW#16#6000_00003 Message number (ID) of PLC alarm 3 C_Alarm_s DW#16#6000_00004 Message number (ID) of PLC alarm 4 C_Alarm_s DW#16#6000_00005 Message number (ID) of PLC alarm 5 SIG_OUT1 BOOL DB2.DBX1.0 Signal that triggers PLC alarm 1. 1 = PLC alarm 1 is triggered (state OUT 1 = 0) 0 = PLC alarm 1 is not triggered (state OUT 1 = 1) SIG_OUT2 BOOL DB2.DBX1.1 Signal that triggers PLC alarm 2. 1 = PLC alarm 2 is triggered (state OUT 2 = 0) 0 = PLC alarm 2 is not triggered (state OUT 2 = 1) SIG_OUT3 BOOL DB2.DBX1.2 Signal that triggers PLC alarm 3. 1 = PLC alarm 3 is triggered (state OUT 3 = 0) 0 = PLC alarm 3 is not triggered (state OUT 3 = 1) Entry-ID: 61450284, V1.1, 05/2014 27

4 Functional Mechanisms of the Application 4.5 Message generation with the Messages block (FB10) Input Data type Variable / Value Description SIG_OUT4 BOOL DB2.DBX1.3 Signal that triggers PLC alarm 4. 1 = PLC alarm 4 is triggered (state OUT 4 = 0) 0 = PLC alarm 1 is not triggered (state OUT 4 = 1) SIG_ERR_PSEDIAG BOOL DB2.DBX0.5 Signal that triggers PLC alarm 5. 1 = PLC alarm 5 is triggered (PSE_DIAG (FB50) block is executed with error) 0 = PLC alarm 5 is not triggered (PSE_DIAG (FB50) block is executed without error) Entry-ID: 61450284, V1.1, 05/2014 28

4 Functional Mechanisms of the Application 4.5 Message generation with the Messages block (FB10) Program details The figure below shows program details on the Messages (FB10) block. Figure 4-6 DATA (DB2) Address: 0.5 1.0 1.1 1.2 1.3 DW#16#6000_0001 DW#16#6000_0002 DW#16#6000_0003 DW#16#6000_0004 DW#16#6000_0005 SIG_OUT1=1 EV_ID1 EV_ID2 EV_ID3 EV_ID4 EV_ID5 SIG_OUT1 SIG_OUT2 SIG_OUT2=1 SIG_OUT3 SIG_OUT3=1 SIG_OUT4 SIG_OUT4=1 SIG_ERR_PSEDIAG=1 SIG_ERR_PSEDIAG Messages (FB10) TRUE SIG_OUT1 W#16#EEEE EV_ID1 DW#16#0000_0001 #SD TRUE SIG_OUT2 W#16#EEEE EV_ID2 DW#16#0000_0002 #SD TRUE SIG_OUT3 W#16#EEEE EV_ID3 DW#16#0000_0003 #SD TRUE SIG_OUT4 W#16#EEEE EV_ID4 DW#16#0000_0004 #SD TRUE SIG_ERR_PSEDIAG W#16#EEEE EV_ID5 DW#16#0000_0005 #SD ALARM_D EN SIG ID EV_ID CMP_ID SD ALARM_D EN SIG ID EV_ID CMP_ID SD ALARM_D EN SIG ID EV_ID CMP_ID SD ALARM_D EN SIG ID EV_ID CMP_ID SD ALARM_D EN SIG ID EV_ID CMP_ID SD PLC alarms Error Channel 1 Error Channel 2 Error Channel 3 Error Channel 4 Error FB PSE_DIAG The Messages block calls the ALARM_D instruction internally. For each call, the ALARM_D instruction generates a PLC alarm to which an optional associated value can be attached. When the ALARM_D instruction is called with the SIG=1 input, the PLC alarm is triggered. The message is pending until the ALARM_D instruction is called with the SIG=0 input. In this application example, five PLC alarms are created in the Messages (FB10) block: When the outputs OUT 1 to OUT 4 of the PSE200U module take on the state 0, a PLC alarm is triggered for the respective output. When the PSE_DIAG (FB50) block supplies an error, a PLC alarm is also triggered. Entry-ID: 61450284, V1.1, 05/2014 29

4 Functional Mechanisms of the Application 4.5 Message generation with the Messages block (FB10) The following table shows an overview of the five PLC alarms created in the Messages (FB10) block which can now be edited in the message editor. Table 4-12 Name ID Location: PLC alarm Location: Message instance Message text EV_ID1 60000001 Messages (FB10) idb_messages (DB10) Error Channel 1 EV_ID2 60000002 Messages (FB10) idb_messages (DB10) Error Channel 2 EV_ID3 60000003 Messages (FB10) idb_messages (DB10) Error Channel 3 EV_ID4 60000004 Messages (FB10) idb_messages (DB10) Error Channel 4 EV_ID5 60000005 Messages (FB10) idb_messages (DB10) Error FB PSE_DIAG When calling the ALARM_D message block in Messages (FB10) block, the ID of PLC alarm is automatically generated by STEP 7 V12 SP1. This ID is also automatically entered as a constant at input EV_ID1, EV_ID2, EV_ID3, EV_ID4 and EV_ID5 of the Messages (FB10) block. Note Chapter 5.2 describes how the PLC alarm listed in Table 4-12 are created and edited. Entry-ID: 61450284, V1.1, 05/2014 30

5 Configuration and Settings 5.1 Creating the alarm class 5 Configuration and Settings The following sections show you how to configure a control message (PLC alarm) in STEP 7 / WinCC V12 SP1 for the SIMATIC S7-300 CPU and the Comfort Panel. 5.1 Creating the alarm class Alarm classes can be configured at well. They are created and edited in the Alarm class editor. In this application example, the following alarm class is created without acknowledgement. Table 5-1 Name Display name Acknowledgement AlarmClass Channel_Error_S7-300 deactivated This alarm class is assigned to the configured control message (PLC alarm). The control messages (PLC alarms) of alarm class AlarmClass are displayed in the alarm view of the Overview S7-300/400 screen. Table 5-2 No. To create an alarm class, please proceed as follows: Action 1. In the project navigation, you click on the arrow on the left next to the Common data folder. The data which you can use on all devices is displayed, such as jointly used alarm classes, for example. Double-click on the Alarm classes object. The Alarm class editor is opened and displayed in the work area. Entry-ID: 61450284, V1.1, 05/2014 31

5 Configuration and Settings 5.1 Creating the alarm class No. Action 2. Right-click an empty field in the Alarm class editor and select the context menu Insert new alarm class. 3. Assign a unique name for the new alarm class in the Name column. The name assigned here is language neutral. 4. Assign a display name in the Display name column. This name can be translated. 5. In the Acknowledgement column you specify whether the messages of this class require acknowledgement or not. Entry-ID: 61450284, V1.1, 05/2014 32

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) 5.2 Configuring control messages (PLC alarms) 5.2.1 Filling the block interface of the Messages (FB10) block and calling the ALARM_D message blocks. Table 5-3 The PLC alarms are created in the Messages (FB10) block. The table below describes how to create five PLC alarms. Filling the block interface of the Messages (FB10) block Calling the message block No. Action Remarks 1. In the block interface of the Messages (FB10) block you declare five variables of data type C_Alarm_s as input, e.g. EV_ID1 EV_ID2 EV_ID3 EV_ID4 EV_ID5 Note For each ALARM_D message block you need to declare a variable of data type C_Alarm_s as input in the Messages (FB10) block. Entry-ID: 61450284, V1.1, 05/2014 33

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) No. Action Remarks 2. Then you declare five variables of data type BOOL as input in the block interface of the Messages (FB10) block, e.g. SIG_OUT1 SIG_OUT2 SIG_OUT3 SIG_OUT4 SIG_ERR_PSEDIAG The signals triggering the messages are read via this input. 3. For each PLC alarm you call an ALARM_D message block in the Messages (FB10) block. The ALARM_D message block is located in the Task Card Instructions in pallet Extended instructions > Alarming. 4. Assign the inputs and outputs of the five ALARM_D message blocks. see chapter 5.2.2 see chapter 5.2.3 5.2.2 ALARM_D message block Figure 5-1 shows the call of the ALARM_D message block in the Messages (FB10) block. Figure 5-1 ALARM_D BOOL EN BOOL SIG WORD ID C_ALARM_S (WORD) EV_ID DWORD CMP_ID ANY SD RET_VAL INT Entry-ID: 61450284, V1.1, 05/2014 34

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) The following table shows an overview of the inputs and outputs of the ALARM_D message block. Table 5-4 Input/output Data type Description EN Input BOOL Enabling the ALARM_D message block. 1 = Message block is enabled (PLC alarm is triggered when calling with input SIG=1) SIG Input BOOL Signal triggering the message. When the ALARM_D message block is called with SIG=1, the PLC alarm is triggered. The message is pending until the ALARM_D message block is called with SIG=0. ID Input WORD W#16#EEEE Data channel for the messages EV_ID Input C_ALARM_S (WORD) Message number CMP_ID Input DWORD ID for identification of the subsystem, to which the appropriate message is assigned. SD Input ANY Associated value RET_VAL Output INT Error information 5.2.3 Inputs and outputs of the ALARM_D message block Figure 5-2 shows an example for assigning a message block. Figure 5-2 Signals triggering the message Assign the data type BOOL variable to the SIG input of the ALARM_D message block previously declared as input in the block interface of the Messages (FB10) block. The following table shows which variable is assigned to the SIG input of the ALARM_D messages block. Entry-ID: 61450284, V1.1, 05/2014 35

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) Table 5-5 Variable Data type Description #SIG_OUT1 BOOL Variable at input SIG of the first ALARM_D message block (signal, which triggers the first PLC alarm) #SIG_OUT2 BOOL Variable at input SIG of the second ALARM_D message block (signal, which triggers the second PLC alarm) #SIG_OUT3 BOOL Variable at input SIG of the third ALARM_D message block (signal, which triggers the third PLC alarm) #SIG_OUT4 BOOL Variable at input SIG of the fourth ALARM_D message block (signal, which triggers the fourth PLC alarm) #SIG_ERR_PSEDIAG BOOL Variable at input SIG of the fifth ALARM_D message block (signal, which triggers the fifth PLC alarm) Message number Assign the data type C_Alarm_s variable to the EV_ID input of the ALARM_D message block previously declared as input in the block interface of the Messages (FB10) block. The following table shows which variable is assigned to the EV_ID input of the ALARM_D messages block. Table 5-6 Variable Data type Description EV_ID1 C_Alarm_s Variable at input EV_ID of the first ALARM_D message block (message number of the first PLC alarm) EV_ID2 C_Alarm_s Variable at input EV_ID of the second ALARM_D message block (message number of the second PLC alarm) EV_ID3 C_Alarm_s Variable at input EV_ID of the third ALARM_D message block (message number of the third PLC alarm) EV_ID4 C_Alarm_s Variable at input EV_ID of the fourth ALARM_D message block (message number of the fourth PLC alarm) EV_ID5 C_Alarm_s Variable at input EV_ID of the fifth ALARM_D message block (message number of the fifth PLC alarm) Entry-ID: 61450284, V1.1, 05/2014 36

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) Subsystem of the PLC alarm The following table shows which variable is assigned to the CMP_ID input of the ALARM_D messages block. Table 5-7 Variable Data type Description DW#16#0000_0001 DWORD Value at the CMP_ID input of the first ALARM_D message block DW#16#0000_0002 DWORD Value at the CMP_ID input of the second ALARM_D message block DW#16#0000_0003 DWORD Value at the CMP_ID input of the third ALARM_D message block DW#16#0000_0004 DWORD Value at the CMP_ID input of the fourth ALARM_D message block DW#16#0000_0005 DWORD Value at the CMP_ID input of the fifth ALARM_D message block Associated value Error information In this application example, the associated value W#0000 is defined at all five ALARM_D message blocks. The associated value W#0000 is saved in the static variable #SD of the Messages (FB10) block and assigned to the SD input of the ALARM_D message block. The following table shows in which static variables of the Messages (FB10) block the error information of the ALARM_D message blocks are saved: Table 5-8 Variable Data type Associated value RET_VAL1 INT Error information of the first ALARM_D message block RET_VAL2 INT Error information of the second ALARM_D message block RET_VAL3 INT Error information of the third ALARM_D message block RET_VAL4 INT Error information of the fourth ALARM_D message block RET_VAL5 INT Error information of the fifth ALARM_D message block Entry-ID: 61450284, V1.1, 05/2014 37

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) 5.2.4 Editing the PLC alarms in the Alarm class editor Table 5-9 No. In the Alarm class editor you edit the PLC alarms created in the Messages (FB10) block. For editing the PLC alarms, please proceed as follows. Action 1. In the project navigation, you click on the arrow on the left side of the PLC_2 [CPU 315-2 PN/DP] device to display the objects and actions for the device. Double-click on the PLC alarms object. The Alarm class editor is opened and displayed in the work area. 2. In the Alarm class editor you click on the PLC alarms tab. In the Message text column you enter the text of the PLC alarm, e.g. Channel Error 1. This text is displayed at the SIMATIC Panel in the alarm view when the PLC alarm is triggered. Entry-ID: 61450284, V1.1, 05/2014 38

5 Configuration and Settings 5.2 Configuring control messages (PLC alarms) No. Action 3. In the Alarm class column you assign an alarm class to the PLC alarm, e.g. AlarmClass. 4. In the Acknowledgement column you specify whether the message requires acknowledgement or not. In this example, the Acknowledgement option is deactivated. Therefore, the messages do not require acknowledgement. 5.2.5 Display PLC alarm at the SIMATIC Panel An alarm view is required to display the configured PLC alarms at the SIMATIC Panel. In this example, the alarm view is located in the State of the outputs of the SITOP PSE200U screen. To display the messages of the AlarmClass alarm class in the alarm view activate the configured alarm class AlarmClass in Properties > Properties > General. Figure 5-3 Entry-ID: 61450284, V1.1, 05/2014 39

5 Configuration and Settings 5.3 Changing the I/O addresses 5.3 Changing the I/O addresses Table 5-10 No. When changing the addresses for the digital inputs and outputs of the S7 station, please proceed according to the following instruction: Chapter 6.1.2 gives an overview of the I/O addresses used in the application. Action 1. Open the STEP 7 project of the application (see chapter 6.3). In the project navigation, you click on the arrow on the left side of the PLC_2 [CPU 315-2 PN/DP] device to display the objects and actions for the device. Double-click on the Device configuration object. The hardware and network editor is opened: 2. In the Device view tab, select the device PLC_2. The device view of the SIMATIC S7-300 is opened. 3. In the Device overview table you assign the addresses for the digital inputs and outputs. Entry-ID: 61450284, V1.1, 05/2014 40

6 Installation 6.1 Hardware configuration 6 Installation 6.1 Hardware configuration 6.1.1 Structure Figure 6-1 The figure below shows the hardware setup of the application example. PS CPU DI/DO TP900 Comfort +24V 0V Industrial Ethernet M OUT1 OUT2 S RST PG/PC PSE200U +24V 0V Table 6-1 No. Action Remarks 1. Attach the individual modules to a suitable rack. See chapter 2.3 2. Connect the PSE200U module with the 24 V DC power supply. Ensure that the polarity is correct. 3. Connect the motor with the OUT 1 output of the PSE200U module and the 0V of the power supply. 4. Connect the lighting with the OUT 2 output of the PSE200U module and the 0V of the power supply. 5. Connect the status output (S) of the PSE200U module with the DI (input I4.0 ). Connect the remote reset input (RST) of the PSE200U module with the DI/DO (output Q8.4 ). Connect the 24 V and 0V of the power supply to the DI/DO. 6. Inter-connect the following PROFINET interfaces: PG/PC with S7-CPU S7-CPU with SIMATIC Panel TP900 Comfort Panel Load circuit 1, which is monitored Load circuit 2, which is monitored The remote reset input (RST) of the PSE200U module can be set via the SIMATIC Panel. The CPU 315-2 PN/DP has a 2 port switch. Entry-ID: 61450284, V1.1, 05/2014 41

6 Installation 6.2 Software installation Note Always follow the installation guidelines for the installation of all components. 6.1.2 Overview of the I/O addresses Table 6-2 The following table gives you an overview of the I/O addresses used. I/O module Connection at the PSE200U module Function DI I4.0 Status output (S) State of OUT 1 to OUT 4 DI /DO Q8.4 Remote reset input (RST) Reset PSE200U Module Q8.0 - Display State OUT 1 Q8.1 - Display State OUT 2 Q8.2 - Display State OUT 3 Q8.3 - Display State OUT 4 6.1.3 Overview of IP addresses Table 6-3 The following table gives you an overview of the IP addresses used. For each device, you can use any IP address in the same subnet. Device CPU 315-2 PN/DP 172.16.43.21 TP900 Comfort Panel 172.16.43.60 PG/PC 172.16.40.11 IP address 6.2 Software installation The PG/PC is used as engineering station. On the PG/PC you need to install STEP 7 Professional V12 SP1 Upd4 and WinCC Professional V12 SP1 Upd4. Entry-ID: 61450284, V1.1, 05/2014 42

6 Installation 6.3 Installing the application software 6.3 Installing the application software This chapter describes the steps for the installation of the sample code. The application software consists of a project with the following content: device configuration user program for the S7-CPU configuration and settings of the SIMATIC Panel The project is available as a zip-file on the HTML page from which you downloaded this document. Unzip the file 61450284_SITOP_Appl_S7-300_400_CODE_v10.zip into a separate directory. The project is then automatically unzipped with all respective subdirectories. Subsequently, you can open and edit the extracted project in STEP 7 / WinCC V11 SP2. Entry-ID: 61450284, V1.1, 05/2014 43

7 Starting up the Application 7.1 Preparation 7 Starting up the Application 7.1 Preparation 7.1.1 Changing the IP address of the PG/PC Table 7-1 First of all, make sure that the IP address of the PG/PC is located in the same subnet as that of the S7-CPU and of the SIMATIC Panel. The figure below shows the network settings to which you have to change the PG/PC. No. Action Remarks 1. Open the Internet Protocol (TCP/IP) Properties by selecting Start > Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings > Local Area Connection. Select the option field Use following IP-address and assign the IP address and subnet mask according to the screenshot. Close the dialog boxes with OK. 2. If your PG/PC has a WLAN interface, deactivate it. Entry-ID: 61450284, V1.1, 05/2014 44

7 Starting up the Application 7.1 Preparation 7.1.2 Changing the IP address of the SIMATIC Panel Table 7-2 No. Before the project can be transferred to the SIMATIC Panel, you have to change the IP address of the SIMATIC Panel as shown in Table 6-3, via which the project is downloaded to the CPU. Action 1. At the SIMATIC Panel, open the Control Panel. 2. Double-click on the Network and Dial-up Connections icon. The available network adapter is displayed. 3. Open the PN_X1 entry. The PN_X1 Settings dialog is opened. 4. Go to the IP Address tab. Activate Specify an IP address, to specify the address manually. Assign IP address and subnet mask according to the figure below. Apply the settings with OK. Entry-ID: 61450284, V1.1, 05/2014 45

7 Starting up the Application 7.1 Preparation 7.1.3 Changing the IP address of SIMATIC S7-300 CPU Table 7-3 No. Before the STEP 7 project can be downloaded to the SIMATIC S7-300 CPU, you have to change the IP address of the PROFINET interface, as shown in Table 6-3, via which the project is downloaded to the SIMATIC S7-300 CPU. Action 1. From the online menu you choose the Accessible devices command. The Accessible devices dialog is opened. Entry-ID: 61450284, V1.1, 05/2014 46

7 Starting up the Application 7.1 Preparation No. Action 2. Select the type of the interface from the Type of the PG/PC interface drop-down menu. Since the SIMATIC S7-300 CPU is connected to the PG/PC via the PROFINET interface, select the interface type PN/IE. Depending on the selection, only those interfaces of the PG/PC are displayed in the PG/PC interface drop-down list, which match the selected interface type. Select the desired interface of the PG/PC from the PG/PC interface drop-down list, e.g. an Industrial Ethernet card. Since the accessible nodes at the selected interface of the PG/PC are displayed in a list. Select the SIMATIC S7-300 CPU from the list of the accessible nodes and click on the Show button to go to the SIMATIC S7-300 CPU in the project navigation. Entry-ID: 61450284, V1.1, 05/2014 47

7 Starting up the Application 7.1 Preparation No. Action 3. The interface connected at the SIMATIC S7-300 CPU, is selected in the project navigation. Click on the arrow icon on the left side of the SIMATIC S7-300 CPU in the project navigation to display the Online & diagnostics function. Double-click on the Online & diagnostics function. The diagnostics and online function of the SIMATIC S7-300 CPU is opened. 4. In the diagnostics and online function you assign IP address and subnet mask in Functions according to the figure below. Click on the Assign IP address button to set the IP address in SIMATIC S7-300 CPU. Entry-ID: 61450284, V1.1, 05/2014 48

7 Starting up the Application 7.2 Commissioning 7.2 Commissioning 7.2.1 Transferring the project to the SIMATIC Panel Table 7-4 No. Proceed according to the following instruction to transfer the project to the SIMATIC Panel. Action 1. At the SIMATIC Panel, set the transfer mode. 2. In the Project tree, right-click on the SIMATIC Panel HMI_2[TP900 Comfort]. Select the Compile > Software (rebuild all) menu. Entry-ID: 61450284, V1.1, 05/2014 49

7 Starting up the Application 7.2 Commissioning No. Action 3. In the Project tree, select the SIMATIC Panel HMI_2[TP900 Comfort]. In the toolbar you click on the Download to device button to transfer the project to the SIMATIC Panel. The Extended download to device dialog box or the Load preview dialog box opens automatically. 4. The Extended download to device dialog box opens automatically only if the access path from the PG/PC to the SIMATIC Panel has to be reset. Make the following settings: Type of the PG/PC interface: PN/IE PG/PC interface: Network card of the PG/PC Select the SIMATIC Panel from the Compatible devices in target subnet list and click on the Load button. Entry-ID: 61450284, V1.1, 05/2014 50

7 Starting up the Application 7.2 Commissioning No. Action 5. In the Load preview dialog box, activate the Overwrite All action and click on the Load button to start loading. Entry-ID: 61450284, V1.1, 05/2014 51

7 Starting up the Application 7.2 Commissioning 7.2.2 Loading the project into the S7-CPU Table 7-5 No. To load the project into the S7-CPU, proceed according to the following instruction: Action 1. In the Project tree, select the S7-300 CPU PLC_2[CPU 315-2 PN/DP]. In the toolbar you click on the Compile button. 2. In the Project tree, select the S7-300 CPU PLC_2[CPU 315-2 PN/DP]. In the toolbar you click on the Download to device button to download project to the SIMATIC S7-300 CPU. The Extended download to device or Load preview dialog box opens automatically. Entry-ID: 61450284, V1.1, 05/2014 52

7 Starting up the Application 7.2 Commissioning No. Action 3. The Extended download to device dialog box opens automatically only if the access path from the PG/PC to the SIMATIC S7-300 CPU has to be reset. Make the following settings: Type of the PG/PC interface: PN/IE PG/PC interface: network card of the PG/PC Select the S7-300 CPU from the Compatible devices in target subnet list and click on the Load button. 4. In the Load preview dialog box, click on the Load button to start loading. Entry-ID: 61450284, V1.1, 05/2014 53

7 Starting up the Application 7.3 Using the application with STEP 7 / WinCC V13 No. Action 5. In the Load results dialog box, activate the Start all action and click on the Finish button to terminate loading. 7.3 Using the application with STEP 7 / WinCC V13 Unzip the file 61450284_SITOP_Appl_S7-300_400_CODE_v11.zip into a separate directory. The project is then automatically unzipped with all respective subdirectories. In STEP 7 / WinCC V13 you open the project established with STEP 7 / WinCC V12 SP1 Upd4. The message shown in Figure 7-1 appears automatically. Confirm the message with Yes to upgrade the project to V13. Figure 7-1 Entry-ID: 61450284, V1.1, 05/2014 54

7 Starting up the Application 7.3 Using the application with STEP 7 / WinCC V13 Confirm the following message with OK. In STEP 7 / WinCC V13 the upgraded project is created and saved with a new name. Figure 7-2 Execute the Edit > Compile menu for each device in the project to finish the upgrade. Figure 7-3 You can use and edit the project in STEP 7 / WinCC V13 when you have finished the upgrade. Entry-ID: 61450284, V1.1, 05/2014 55

7 Starting up the Application 7.3 Using the application with STEP 7 / WinCC V13 In the network view of the hardware and network editor, select the SIMATIC Panel and choose the Change device / version menu. The Change device dialog box opens. Figure 7-4 Entry-ID: 61450284, V1.1, 05/2014 56

7 Starting up the Application 7.3 Using the application with STEP 7 / WinCC V13 In the Change device dialog box replace the TP900 Comfort V12 by the TP900 Comfort V13. Adopt the settings with OK. Figure 7-5 Download the configuration and software to the SIMATIC Panel and SIMATIC S7-300 CPU. Entry-ID: 61450284, V1.1, 05/2014 57

8 Operation of the Application 8.1 Overview 8 Operation of the Application 8.1 Overview The state of the outputs of the PSE200U module and the respective messages are displayed at the SIMATIC Panel. Figure 8-1 PS CPU DI/DO TP900 Comfort +24V 0V Industrial Ethernet M PG/PC OUT1 OUT2 S RST PSE200U +24V 0V Entry-ID: 61450284, V1.1, 05/2014 58

8 Operation of the Application 8.2 Start screen 8.2 Start screen After installation and commissioning of the application, the following start screen appears automatically on the SIMATIC Panel TP900 Comfort Panel. Figure 8-2 3 1 2 The following buttons exist in the start screen: Table 8-1 No. Button Remarks 1 Sample project Opens the screens of the sample project 2 Siemens Industry Online Support 3 Change language (DE or EN) Here you get more information about the Siemens Industry Online Support. Switches between German and English language 8.3 Sample project The sample project consists of the following screens: Overview State of the outputs of the SITOP PSE200U Entry-ID: 61450284, V1.1, 05/2014 59

8 Operation of the Application 8.3 Sample project 8.3.1 Overview screen The Overview screen shows an overview of the structure of the sample project. Figure 8-3 2 1 4 5 3 The following buttons exist in the Overview screen: Table 8-2 No. Button Remarks 1 Home Opens the start screen 2 Tools Opens the screen where you can execute the following system functions: Terminate the runtime Set the SIMATIC Panel in transfer mode Start the task manager Calibrate the SIMATIC Panel Call the keyboard on the display screen of the SIMATIC Panel Change the operating mode of the SIMATIC Panel (Online or Offline) 3 Change language (DE or EN) 4 State of the outputs of the SITOP PSE200U Switches between German and English language Opens the screen which displays the states of outputs OUT 1 to OUT 4 of the PSE200U module. 5 Overview Opens the Overview screen. Entry-ID: 61450284, V1.1, 05/2014 60

8 Operation of the Application 8.3 Sample project 8.3.2 State of the outputs of the SITOP PSE200U screen Open the screen The states of outputs OUT 1 to OUT 4 of the PSE200 module are represented clearly in the State of the outputs of the SITOP PSE200U screen. This enables a simple monitoring of the load circuits connected at output OUT 1 to OUT 4 of the PSE200U module. In the Overview screen click on the State of the outputs of the SITOP PSE200U button. Figure 8-4 Entry-ID: 61450284, V1.1, 05/2014 61

8 Operation of the Application 8.3 Sample project Using the screen The figure below shows the State of the outputs of the SITOP PSE200U screen Figure 8-5 3 1 4 Elements in this screen Table 8-3 No. 2 Description 1 Status display The states of outputs OUT 1 to OUT 4 of the PSE200U module determined in the user program are visualized via text fields. 2 Message display Messages on the state of outputs OUT 1 to OUT 4 of the PSE200U module are displayed in the alarm view. 3 RESET Automatic switch-off of outputs OUT 1 to OUT 4 is reset when pressing the button. If outputs OUT 1 to OUT 4 of the PSE200U module were automatically switched off due to a failure, e.g. overload or short-circuit, and the wait time of 20s has elapsed, they are switched back on. 4 Status of the PSE_DIAG (FB50) block The STATUS output of the PSE_DIAG (FB50) block is displayed. Entry-ID: 61450284, V1.1, 05/2014 62

8 Operation of the Application 8.3 Sample project Status display The background color of the text field depends on the value of the assigned bit of the CHENNAL_STATE variable and of the state of output OUT 1 to OUT 4 of the PSE200U module. Table 8-4 Text field Bit of variable CHANNEL_STATE Value (bin) Color of the text field State Channel 1 0 0 State OUT 1 = 1 1 State OUT 1 = 0 Channel 2 1 0 State OUT 2 = 1 1 State OUT 2 = 0 Channel 3 2 0 State OUT 3 = 1 1 State OUT 3 = 0 Channel 4 3 0 State OUT 4 = 1 1 State OUT 4 = 0 Alarm view RESET For the SIMATIC S7-300 CPU control messages (PLC alarms) are configured and displayed in an alarm view at the SIMATIC Panel. When pressing the RESET button, the automatic switch-off of outputs OUT 1 to OUT 4 is reset. STATUS of the PSE_DIAG block The value of the STATUS_SAVE variable is displayed in an I/O field. The following table shows an overview of the possible values of the STATUS_SAVE variable. Table 8-5 Value of the STATUS_SAVE (hex) variable Description 0000 The PSE_DIAG (FB50) block works without error. 8001 Cycle time of 100 ms exceeded 8002 No signal change was detected at the IMPULSE input for at least 6 s. Entry-ID: 61450284, V1.1, 05/2014 63

8 Operation of the Application 8.4 Examples for the operation 8.4 Examples for the operation Note The states of outputs OUT 1 to OUT 4 (OUT x) are also displayed at the digital outputs of the DI/DO: OUT x switched on: DOx off (LED for DOx off) OUT x switched off: DOx on (LED for DOx on) 8.4.1 Overload of the motor Table 8-6 No. Action Remark 1. Overload: Mechanically decelerating or blocking the motor. PSE200U module: Output OUT 1 is automatically switched off and takes on state 0. The motor is switched off. The LED of the OUT 1 output lights red. 2. The wait time of 20s has elapsed, so that the automatic switch-off of output OUT 1 can be reset. 3. Click on the RESET button on the SIMATIC Panel. Operator panel: Text field Channel 1 is shaded red. The Channel Error 1 message is displayed in the alarm view. S7-CPU: LED for DO 8.0 on PSE200U module: The LED of output OUT 1 flashes red. The automatic switch-off of output OUT 1 is reset. PSE200U module: Output OUT 1 is switched on and takes on state 1. The motor is switched on. The LED of output OUT 1 lights green. Operator panel: Text field Channel 1 is shaded green. The Channel Error 1 message is no longer displayed in the alarm view. S7-CPU: LED for DO 8.0 off Entry-ID: 61450284, V1.1, 05/2014 64

8 Operation of the Application 8.4 Examples for the operation 8.4.2 Short-circuit at the lighting Table 8-7 No. Action Remarks 1. Short circuit: Bridge the lamp connections with wire until the LED of output OUT 2 lights red. Remove the short-circuit again. PSE200U module: Output OUT 2 is automatically switched off and takes on state 0. The lighting is switched off. The LED of the OUT 2 output lights red. Operator panel: Text field Channel 2 is shaded red. The Channel Error 2 message is displayed in the alarm view. S7-CPU: LED for DO 8.1 on 2. The wait time of 20s has elapsed, so that the automatic switch-off of output OUT 2 can be reset. PSE200U module: The LED of output OUT 2 flashes red. 3. Click on the RESET button on the SIMATIC Panel. The automatic switch-off of output OUT 2 is reset. PSE200U module: Output OUT 2 is switched on and takes on state 1. The lighting is switched on. The LED of output OUT 2 at the PSE200U module lights green. Operator panel: Text field Channel 2 is shaded green. The Channel Error 2 message is no longer displayed in the alarm view. S7-CPU: LED for DO 8.1 off Entry-ID: 61450284, V1.1, 05/2014 65

8 Operation of the Application 8.4 Examples for the operation 8.4.3 Error of the PSE_DIAG (FB50) block Table 8-8 No. Action Remarks 1. When calling the PSE_DIAG (FB50) the cycle time of 100ms is exceeded. The value 8001(hex) is displayed in I/O field STATUS FB PSE_DIAG. The Error FB PSE_DIAG is displayed in the alarm view. 2. Call the PSE_DIAG (FB50) block in OB35 with 100ms. Note The value 0000(hex) is displayed in I/O field STATUS FB PSE_DIAG. The Error FB PSE_DIAG is no longer displayed in the alarm view. An overview of the possible errors of the PSE_DIAG (FB50) block is available in Table 8-5. Entry-ID: 61450284, V1.1, 05/2014 66