Power Management for WinCC SIMATIC WinCC powerrate Programming and Operating Manual V3.0 01 / 2009 A5E02308538A-01 Introduction 1 Information about the library 2 Description of blocks 3 Description of powerrate Reports 4 Configuration Manual 5 Technical data 6 Service and support information 7 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 A5E02308538A-01 02/2009 Copyright (c) Siemens AG 2009. Technical data subject to change Table of contents 1 2 3 Introduction................................................................................................................................................ 9 1.1 General ..........................................................................................................................................9 1.2 Installing the library ......................................................................................................................10 Information about the library .................................................................................................................... 11 2.1 Overview of the blocks.................................................................................................................11 2.2 2.2.1 2.2.2 General information about OS typicals ........................................................................................13 Faceplates....................................................................................................................................13 Symbols .......................................................................................................................................15 Description of blocks................................................................................................................................ 17 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 PRE_SYNC / PR3_SYNC: Time synchronization........................................................................17 Calling OBs ..................................................................................................................................17 Called blocks................................................................................................................................17 Function .......................................................................................................................................17 Message behavior........................................................................................................................18 Error behavior ..............................................................................................................................18 Start-up characteristics ................................................................................................................18 Block parameter ...........................................................................................................................18 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 PRE_SUM / PR3_SUM: Energy acquisition and processing.......................................................19 Calling OBs ..................................................................................................................................19 Called blocks................................................................................................................................20 Function .......................................................................................................................................21 Message behavior........................................................................................................................23 Error behavior ..............................................................................................................................24 Start-up characteristics ................................................................................................................25 Block parameter ...........................................................................................................................25 Description of icons and faceplate ...............................................................................................29 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 PRE_FIFO_DATA / PR3_FIFO_DATA: FIFO buffer ....................................................................33 Calling OBs ..................................................................................................................................33 Called blocks................................................................................................................................33 Function .......................................................................................................................................34 Message behavior........................................................................................................................34 Error behavior ..............................................................................................................................34 Start-up characteristics ................................................................................................................34 Block parameters .........................................................................................................................35 3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data.........................35 Calling OBs ..................................................................................................................................35 Called blocks................................................................................................................................35 Function .......................................................................................................................................36 Message behavior........................................................................................................................37 Error behavior ..............................................................................................................................37 Start-up characteristics ................................................................................................................37 Block parameters .........................................................................................................................38 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 3 Table of contents 4 3.5 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 PRE_AR_SND / PR3_AR_SND: Archiving measured values..................................................... 39 Calling blocks .............................................................................................................................. 39 Called blocks............................................................................................................................... 39 Function....................................................................................................................................... 39 Message behavior....................................................................................................................... 40 Error behavior ............................................................................................................................. 40 Start-up characteristics ............................................................................................................... 40 Block parameters ........................................................................................................................ 40 3.6 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management .................... 42 Calling blocks .............................................................................................................................. 42 Called blocks............................................................................................................................... 42 Function....................................................................................................................................... 43 Message behavior....................................................................................................................... 54 Error behavior ............................................................................................................................. 57 Start-up characteristics ............................................................................................................... 59 Block parameter .......................................................................................................................... 60 Description of icon and faceplate................................................................................................ 72 3.7 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 PRE_AS_SEND: AS-to-AS communication ................................................................................ 83 Calling blocks .............................................................................................................................. 83 Called blocks............................................................................................................................... 83 Function....................................................................................................................................... 83 Message behavior....................................................................................................................... 84 Error behavior ............................................................................................................................. 85 Start-up characteristics ............................................................................................................... 85 Block parameters ........................................................................................................................ 85 3.8 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 PRE_AS_RECV: AS-to-AS communication ................................................................................ 87 Calling blocks .............................................................................................................................. 87 Called blocks............................................................................................................................... 87 Function....................................................................................................................................... 87 Message behavior....................................................................................................................... 88 Error behavior ............................................................................................................................. 88 Start-up characteristics ............................................................................................................... 89 Block parameters ........................................................................................................................ 89 3.9 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 PRE_SND_H: AS-4xxH to AS-4xx communication..................................................................... 90 Calling blocks .............................................................................................................................. 90 Called blocks............................................................................................................................... 91 Function....................................................................................................................................... 91 Message behavior....................................................................................................................... 92 Error behavior ............................................................................................................................. 92 Start-up characteristics ............................................................................................................... 93 Block parameters ........................................................................................................................ 93 3.10 3.10.1 3.10.2 3.10.3 3.10.4 3.10.5 3.10.6 3.10.7 PRE_RCV_H: AS-4xxH to AS-4xx communication..................................................................... 95 Calling blocks .............................................................................................................................. 95 Called blocks............................................................................................................................... 95 Function....................................................................................................................................... 95 Message behavior....................................................................................................................... 96 Error behavior ............................................................................................................................. 97 Start-up characteristics ............................................................................................................... 97 Block parameters ........................................................................................................................ 97 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Table of contents 3.11 3.11.1 3.11.2 3.11.3 PRE_BS: Calls the BSEND system function block ......................................................................99 Calling blocks ...............................................................................................................................99 Called blocks..............................................................................................................................100 Function .....................................................................................................................................100 3.12 3.12.1 3.12.2 3.12.3 PRE_BR: Calling the BRCV system function block ...................................................................100 Calling blocks .............................................................................................................................100 Called blocks..............................................................................................................................100 Function .....................................................................................................................................100 3.13 3.13.1 3.13.2 3.13.3 3.13.4 3.13.5 3.13.6 3.13.7 PRE_GET / PR3_GET: AS-to-AS communication, read out of data .........................................101 Calling blocks .............................................................................................................................101 Called blocks..............................................................................................................................101 Function .....................................................................................................................................101 Message behavior......................................................................................................................102 Error behavior ............................................................................................................................102 Start-up characteristics ..............................................................................................................103 Block parameters .......................................................................................................................103 3.14 3.14.1 3.14.2 3.14.3 3.14.4 3.14.5 3.14.6 3.14.7 PRE_SUMC / PR3_SUMC: Batch-related energy acquisition ...................................................105 Calling OBs ................................................................................................................................105 Called blocks..............................................................................................................................105 Function .....................................................................................................................................106 Message behavior......................................................................................................................108 Error behavior ............................................................................................................................109 Start-up characteristics ..............................................................................................................109 Block parameter .........................................................................................................................110 3.15 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.15.6 3.15.7 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive ..........112 Calling OBs ................................................................................................................................112 Called blocks..............................................................................................................................112 Function .....................................................................................................................................113 Message behavior......................................................................................................................115 Error behavior ............................................................................................................................116 Start-up characteristics ..............................................................................................................116 Block parameters .......................................................................................................................117 3.16 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive....119 Calling OBs ................................................................................................................................119 Called blocks..............................................................................................................................119 Function .....................................................................................................................................120 Message behavior......................................................................................................................122 Error behavior ............................................................................................................................123 Start-up characteristics ..............................................................................................................123 Block parameters .......................................................................................................................124 3.17 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.17.7 PRE_SWTCH / PR3_SWTCH: General switch..........................................................................126 Calling OBs ................................................................................................................................126 Called blocks..............................................................................................................................126 Function .....................................................................................................................................127 Message behavior......................................................................................................................128 Start-up characteristics ..............................................................................................................129 Block parameters .......................................................................................................................129 Description of icons and faceplate .............................................................................................131 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 5 Table of contents 6 3.18 3.18.1 3.18.2 3.18.3 3.18.4 3.18.5 3.18.6 3.18.7 3.18.8 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 .................................... 133 Calling OBs ............................................................................................................................... 133 Called blocks............................................................................................................................. 133 Function..................................................................................................................................... 133 Message behavior..................................................................................................................... 135 Error behavior ........................................................................................................................... 135 Start-up characteristics ............................................................................................................. 135 Block parameters ...................................................................................................................... 136 Description of icons and faceplate ............................................................................................ 138 3.19 3.19.1 3.19.2 3.19.3 3.19.4 3.19.5 3.19.6 PRE_CALC / PR3_CALC: Calculations .................................................................................... 140 Calling blocks ............................................................................................................................ 140 Function..................................................................................................................................... 141 Message behavior..................................................................................................................... 141 Error behavior ........................................................................................................................... 141 Start-up characteristics ............................................................................................................. 141 Block parameter ........................................................................................................................ 142 3.20 3.20.1 3.20.2 3.20.3 3.20.4 3.20.5 3.20.6 3.20.7 PRE_FIFO_IO / PR3_FIFO_IO: Organizes the FIFO buffer ..................................................... 142 Calling blocks ............................................................................................................................ 142 Called blocks............................................................................................................................. 142 Function..................................................................................................................................... 142 Message behavior..................................................................................................................... 142 Error behavior ........................................................................................................................... 143 Start-up characteristics ............................................................................................................. 143 Block parameters ...................................................................................................................... 143 3.21 3.21.1 3.21.2 UDT_PRE_FIFO........................................................................................................................ 143 Description ................................................................................................................................ 143 Structure.................................................................................................................................... 144 3.22 3.22.1 3.22.2 UDT_PRE_ITEM ....................................................................................................................... 144 Description ................................................................................................................................ 144 Structure.................................................................................................................................... 144 3.23 3.23.1 3.23.2 UDT_PRE_TLG......................................................................................................................... 144 Description ................................................................................................................................ 144 Structure.................................................................................................................................... 145 3.24 3.24.1 3.24.2 UDT_PRE_SND_REQ............................................................................................................... 145 Description ................................................................................................................................ 145 Structure.................................................................................................................................... 145 3.25 3.25.1 3.25.2 UDT_PRE_SND ........................................................................................................................ 146 Description ................................................................................................................................ 146 Structure.................................................................................................................................... 146 3.26 3.26.1 3.26.2 UDT_PRE_RCV_REQ............................................................................................................... 146 Description ................................................................................................................................ 146 Structure.................................................................................................................................... 147 3.27 3.27.1 3.27.2 UDT_PRE_RCV ........................................................................................................................ 147 Description ................................................................................................................................ 147 Structure.................................................................................................................................... 147 3.28 3.28.1 3.28.2 UDT_PRE_ANY ........................................................................................................................ 148 Description ................................................................................................................................ 148 Structure.................................................................................................................................... 148 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Table of contents 4 5 Description of powerrate Reports .......................................................................................................... 149 4.1 4.1.1 4.1.2 4.1.3 Energy analyses ........................................................................................................................149 Export of archived measured values .........................................................................................149 Cost center report ......................................................................................................................149 Duration curve report .................................................................................................................151 4.2 4.2.1 4.2.2 Batch analyses...........................................................................................................................151 Export of batch values ...............................................................................................................152 Batch report................................................................................................................................152 Configuration Manual............................................................................................................................. 155 5.1 General settings.........................................................................................................................156 5.2 General configuring in WinCC ...................................................................................................157 5.3 5.3.1 5.3.2 5.3.3 Configuring the process tags for recording energy/power.........................................................159 Creating the PLC program .........................................................................................................159 Connection to WinCC ................................................................................................................162 Configuring the process value archive.......................................................................................167 5.4 5.4.1 5.4.2 5.4.3 Configuring communication with WinCC user archives .............................................................170 Configuring the connection in NETPRO ....................................................................................170 Creating the PLC program .........................................................................................................171 Configuring communication in WinCC .......................................................................................172 5.5 5.5.1 5.5.2 5.5.3 Configuring batch data...............................................................................................................175 Creating the PLC program .........................................................................................................175 Connection to WinCC ................................................................................................................176 Configuring the user archive in WinCC......................................................................................176 5.6 5.6.1 5.6.2 5.6.3 Configuring load management...................................................................................................178 Creating the PLC program .........................................................................................................178 Connection to WinCC ................................................................................................................180 Configuring the user archives in WinCC....................................................................................180 5.7 Configuring the Web Navigator..................................................................................................182 5.8 5.8.1 5.8.2 5.8.3 5.8.3.1 5.8.3.2 5.8.4 5.8.4.1 5.8.4.2 5.8.5 5.8.5.1 5.8.5.2 Configuring powerrate Reports ..................................................................................................183 Configuring powerrate Reports ..................................................................................................183 Calling powerrate Reports .........................................................................................................183 General configurations...............................................................................................................183 Configuring the server name......................................................................................................183 Configuring tariffs.......................................................................................................................184 Configuration of the reports .......................................................................................................186 Reports for energy analyses ......................................................................................................188 Batch analyses...........................................................................................................................193 Configuration of the times ..........................................................................................................194 Configuration of report time and report period...........................................................................194 Configuration of the validity period ............................................................................................200 6 Technical data ....................................................................................................................................... 201 7 Service and support information ............................................................................................................ 209 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 7 Table of contents 8 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 1 Introduction 1.1 General The SIMATIC WinCC powerrate (pre for short) software package V3.0 can be used in the WinCC versions V6.2 SP2 and V7.0 and contains the following components: Block library with: - PRE_SYNC / PR3_SYNC: Time synchronization - PRE_SUM / PR3_SUM Block for acquiring and processing energy - PRE_FIFO_DATA / PR3_FIFO_DATA: Contains the FIFO data - PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data - PRE_AR_SND / PR3_AR_SND: Archiving of measured values - PRE_LMGM / PR3_LMGM: Load management for up to 100 loads - PRE_LMGM_75 / PR3_LMGM_75: Load management for up to 75 loads - PRE_LMGM_50 / PR3_LMGM_50: Load management for up to 50 loads - PRE_LMGM_25 / PR3_LMGM_25: Load management for up to 25 loads - PRE_LMGM_10 / PR3_LMGM_10: Load management for up to 10 loads - PRE_AS_SEND: Send block for AS-to-AS communication - PRE_AS_RECV: Receive block for AS-to-AS communication - PRE_SND_H: Send block for AS-4xxH to AS-400 communication - PRE_RCV_H: Receive block for AS-4xxH to AS-400 communication - PRE_BS: Calls the system block BSEND - PRE_BR: Calls the system block BRCV - PRE_GET / PR3_GET: AS-to-AS communication, read out of data from S7-300 - PRE_SUMC / PR3_SUMC: Block for batch-related energy acquisition - PRE_UA_S / PR3_UA_S: Archive manager for writing archive data for load management and energy acquisition to the user archive - PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive - PRE_SWTCH / PR3_SWTCH: Block for general switch with integration via DI / DO - PRE_PAC / PR3_CALC: Block for basic functionality of the PAC3200 / PAC4200 - PRE_CALC / PR3_CALC: Calculation block - PRE_FIFO_IO / PR3_FIFO_IO: Organizes the FIFO buffer - CFC templates for using the blocks - User objects and operating blocks for operating and observing energy acquisition data, load management, switches, and PAC3200 / PAC4200 energy acquisition devices on the OS SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 9 Introduction 1.2 Installing the library The blocks with the prefix PRE are intended for use in S7-400, the blocks with the prefix PR3 for use in S7-300. There is no functional difference between the blocks for S7-400 and S7300. powerrate Reports with the following functions - Reading the archive data from the WinCC tag logging archive and WinCC user archives to Excel - Further processing of archive data - Output of archive data in the form of Excel reports - Creation of automatic reports Online help in German and English 1.2 Installing the library To start the installation, please insert the CD in the CD-ROM drive on your PG/PC and launch the "setup.exe" program. All the other information you need will be provided during the installation process. Please also read the information in the readme file. 10 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 2 Information about the library 2.1 Overview of the blocks The library contains the following blocks: Blocks for S7-400: Name Function Number PRE_SYNC Time synchronization FB1060 PRE_SUM Block for acquiring and processing energy FB1061 PRE_FIFO_DATA FIFO buffer FB1062 PRE_AR_DATA Data interface for sending the archive data FB1063 PRE_AR_SND Archiving of measured values in the WinCC tag logging archive FB1064 PRE_LMGM Load management for up to 100 loads FB1065 PRE_LMGM_75 Load management for up to 75 loads FB1066 PRE_LMGM_50 Load management for up to 50 loads FB1067 PRE_LMGM_25 Load management for up to 25 loads FB1068 PRE_LMGM_10 Load management for up to 10 loads FB1069 PRE_AS_SEND Send block for AS-to-AS communication FB1070 PRE_AS_RECV Receive block for AS-to-AS communication FB1071 PRE_SND_H Send block for AS-4xxH to AS-400 communication FB1072 PRE_RCV_H Receive block for AS-4xxH to AS-400 communication FB1073 PRE_BS Calls the BSEND system function block (used internally) FB1074 PRE_BR Calls the BRCV system function block (used internally) FB1075 PRE_GET AS-to-AS communication, read out of data from S7-300 FB1076 PRE_SUMC Block for batch-related energy acquisition FB1077 PRE_UA_S Archive manager for writing archive data to the user archive FB1078 PRE_UA_R Archive manager for reading archive data from the user archive FB1079 PRE_SWTCH Block for general switch FB1750 PRE_PAC Block for basic functionality of the PAC3200 / PAC4200 FB1751 PRE_CALC Calculation block FC1061 PRE_FIFO_IO Organizes the FIFObuffer FC1062 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 11 Information about the library 2.1 Overview of the blocks Blocks for S7-300: Name Function Number PR3_SYNC Time synchronization FB160 PR3_SUM Block for acquiring and processing energy FB161 PR3_FIFO_DATA FIFO buffer FB162 PR3_AR_DATA Data interface for sending the archive data FB163 PR3_AR_SND Archives measured values in the WinCC Tag Logging archive FB164 PR3_LMGM Load management for up to 100 loads FB165 PR3_LMGM_75 Load management for up to 75 loads FB166 PR3_LMGM_50 Load management for up to 50 loads FB167 PR3_LMGM_25 Load management for up to 25 loads FB168 PR3_LMGM_10 Load management for up to 10 loads FB169 PR3_GET AS-to-AS communication, read out of data from S7-300 FB176 PR3_SUMC Block for batch-related energy acquisition FB177 PR3_UA_S Archive manager for writing archive data to the user archive FB178 PR3_UA_R Archive manager for reading archive data from the user archive FB179 PR3_SWTCH Block for general switch FB180 PR3_PAC Block for basic functionality of the PAC3200 / PAC4200 FB181 PR3_CALC Calculation block FC161 PR3_FIFO_IO Organizes the FIFObuffer FC162 User defined data types: Name Function Number UDT_PRE_FIFO Data type for check data for organizing the FIFO buffer UDT1060 UDT_PRE_ITEM Data type for measured value UDT1061 UDT_PRE_TLG Data type for message frame item for sending to the WinCC tag logging archive UDT1062 UDT_PRE_SND_REQ Data type for write data request UDT1063 UDT_PRE_SND Data type for archive manager checkback signal for writing UDT1064 UDT_PRE_RCV_REQ Data type for read data request UDT1065 UDT_PRE_RCV Data type for archive manager acknowledgment signal for reading UDT1066 UDT_PRE_ANY Data type for Any pointer UDT1067 The numbers of the FBs (except PRE_BR and PRE_BS) can be modified. Because the FBs PRE_BR, PRE_BS, the FCs and the UDTs are used internally, their numbers cannot be modified. 12 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Information about the library 2.2 General information about OS typicals 2.2 General information about OS typicals 2.2.1 Faceplates The faceplates are configured with the Graphics Designer. If necessary, other user objects needed can be added. The faceplates described are provided as functional and tested examples and can be adapted by the user to reflect his or her own needs. Icons are created for the PRE_SUM / PR3_SUM energy acquisition block and the PRE_LMGM / PR3_LMGM and PRE_LMGM_x / PR3_LMGM_x, load management blocks, the PRE_SWTCH / PR3_SWTCH switch block, and the block for the PRE_PAC / PR3_PAC PAC devices, with a group/loop display in each case with all the necessary displays. The PRE_SUM / PR3_SUM, PRE_SWTCH / PR3_SWTCH und PRE_PAC / PR3_PAC blocks also have a loop display. The relevant group display is called using the icon. A description that allows the user to adapt the faceplates (description of interface to the blocks, description of operating and display functions) is provided along with the faceplates. Overview The display forms part of the @PG_PRE_xxx_OVERVIEW.PDL / @PG_PR3_xxx_OVERVIEW.PDL / @PL_PRE_xxx_OVERVIEW.PDL / @PL_PR3_xxx_OVERVIEW.PDL basic displays. (1) Group display (2) Message lock (MSG_LOCK) (3) Message acknowledgment (4) Message suppression (QMSG_SUP) Trend (@PCS7_Trend.pdl) The "ReturnPath" and "StandardTrend" properties must be parameterized on the icon to incorporate a trend in a faceplate. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 13 Information about the library 2.2 General information about OS typicals * StandardTrend * ReturnPath 2 Online values with 5 min time axis >2 Archive values with time axis of the value entered (in min) .S Structural element name starting with a full stop : Separators CO_GREEN Color for trend Add the structural element name and color to other trends (e.g. .S:CO_GREEN,.V:CO_RED) *asia Skip the server prefix in the archive tag name : Separators *archivname:pre Archive name of pre-archive Since a dynamic selection is made for the PRE_SUM / PR3_SUM faceplate as regards whether the online values or archive tags will be accessed, the ReturnPath_Online (for online values)/ReturnPath_Archive (for archive tags) properties must be parameterized here. Separate trends can be produced for other display types (e.g. comparison of a trend value over several time domains) with the help of the WinCC Online Trend Control. 14 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Information about the library 2.2 General information about OS typicals 2.2.2 Symbols The diagrams of the block icons are schematic diagrams. Template pictures @Template_PRE.pdl The icons can be found in the template diagram @Template_PRE.pdl. To be able to use the "Update Block Icons" function in the Graphics Designer, you have to copy the icons of the @Template_PRE.pdl file into @Template.pdl. Different variants of block icons There may be several variants of block icons for one measuring point. These variants are distinguished by the "type" attribute: The value of this attribute describes the variant. For example, if you look at a variant of the block icon for a measuring point for energy acquisition, you will find the value "@PRE_SUM/2". You use the part of the value displayed after the "/" to control which variant of the block icon is used. Connection to the measuring point For the different blocks, there is one icon that is linked to the associated measuring point using the "Connect faceplate with measuring point" function. The icons contain the following visible information: (1) Current value, dependent on block type (2) Current value, dependent on block type (3) Group display (EventState) (4) Manual/automatic mode (QMAN_AUT) (5) Tag name SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 15 Information about the library 2.2 General information about OS typicals 16 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.1 3.1.1 3 PRE_SYNC / PR3_SYNC: Time synchronization PRE_SYNC FB1060 PR3_SYNC FB160 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.1.2 Called blocks The block calls the following blocks: 3.1.3 SFC1 READ_CLK SFC6 RD_SINFO FC1 AD_DT_TM (IEC function from the STEP 7 Standard Library) FC34 SB_DT_DT (IEC function from the STEP 7 Standard Library) Function The block acts as the clock for time synchronization for the block for energy acquisition PRE_SUM / PR3_SUM and other powerrate blocks. The SYNC_OUT clock is triggered by an external synchronization signal (EXT_SYNC) or the internal CPU time. If the external synchronization is deactivated (EXT_EN = FALSE), REQ_PER contains the period time for synchronization. During external synchronization (EXT_EN = TRUE) the time stamp for the synchronization pulse (SYNC_TS) is rounded to the next whole time value (e.g. 15-minute value) according to the expected period time of the external synchronization signal (REQ_PER) and of the current CPU time stamp. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 17 Description of blocks 3.1 PRE_SYNC / PR3_SYNC: Time synchronization 3.1.4 Message behavior The block has no message behavior. 3.1.5 Error behavior The QPARAMF error output is set when Synchronization period REQ_PER or synchronisation pulse REQ_T 0 Synchronization period REQ_PER is less than the period of synchronization pulse REQ_T Synchronization period REQ_PER is greater than one hour Synchronization period REQ_PER is not a whole second value Synchronization period REQ_PER is not a divisor of an hour 3.1.6 Start-up characteristics The times are restarted during startup. 3.1.7 Block parameter PRE_SYNC Item Data type Type Meaning HMI CUR_TS DATE_AND_TIME O Current time stamp when block is called EXT_EN BOOL I 1 = Release for external synchronization EXT_SYNC BOOL I External synchronization pulse QPARAMF BOOL O 1 = Parameterization error REQ_PER REAL I Synchronization period in [s] REQ_T REAL I Period of synchronization pulse in [s] SAMPLE_T REAL I Sampling time in [s] SYNC_OUT BOOL O Synchronization pulse SYNC_PER REAL O Synchronization period in [s], copy of REQ_PER SYNC_TS DATE_AND_TIME O Time stamp of synchronization pulse 18 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing PR3_SYNC Item Data type Type Meaning CUR_TS DATE_AND_TIME O Current time stamp when block is called DIFF_LOC REAL O Difference between UTC and local time in [h] EXT_EN BOOL I 1 = Release for external synchronization EXT_SYNC BOOL I External synchronization pulse QPARAMF BOOL O 1 = Parameterization error REQ_PER REAL I Synchronization period in [s] REQ_T REAL I Period of synchronization pulse in [s] SAMPLE_T REAL I Sampling time in [s] SYNC_OUT BOOL O Synchronization pulse SYNC_PER REAL O Synchronization period in [s], copy of REQ_PER SYNC_TS DATE_AND_TIME O Time stamp of synchronization pulse 3.2 3.2.1 HMI + PRE_SUM / PR3_SUM: Energy acquisition and processing PRE_SUM FB1061 PR3_SUM FB161 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 19 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing 3.2.2 Called blocks PRE_SUM The block calls the following blocks: SFB35 ALARM_8P SFC6 RD_SINFO FC1 AD_DT_TM (IEC function from the STEP 7 Standard Library) FC14 GT_DT (IEC function from the STEP 7 Standard Library) FC34 SB_DT_DT (IEC function from the STEP 7 Standard Library) FC1061 PRE_CALC FC1062 PRE_FIFO_IO PR3_SUM The block calls the following blocks: 20 SFC6 RD_SINFO SFC19 ALARM_SC SFC107 ALARM_DQ FC1 AD_DT_TM (IEC function from the STEP 7 Standard Library) FC14 GT_DT (IEC function from the STEP 7 Standard Library) FC34 SB_DT_DT (IEC function from the STEP 7 Standard Library) FC161 PR3_CALC FC162 PR3_FIFO_IO SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing 3.2.3 Function The PRE_SUM / PR3_SUM block is used to acquire and process energy and it forms the interface to the OS. Measured value acquisition This does not have a driver function, i.e. it is not dependent on the measuring instruments used. Various types of signals are supported. They are selected using the INP_SEL switch. The table provides an overview of the various options. INP_SEL Signal mode Parameter Quality code parameter Normalization factor/calculation constants 0 Counter pulse VALUE_P QC_P WEIGHT_P 1 Integer count value VALUE_D QC_D WEIGHT_A 2 Analog count value VALUE_R QC_R WEIGHT_A 3 Energy value calculated using calculation function* ACTUALx (x = 1 ... 3) QC_ACTx (x = 1 ... 3) CALC_Px (x = 0 ... 3), CALC_FN* * See calculation algorithms contained in the PRE_CALC / PR3_CALC block (see "PRE_CALC / PR3_CALC: Calculations (Page 141)") For signal type 0, the energy consumed (work) is established by adding together the weighted pulses. At the end of the synchronization period (PER_T), the average power value (CUR_PWR) is calculated from the energy consumed (work). For signal types 1 and 2, the difference (normalized) between the current and last count value is the energy consumed (work). At the end of the acquisition period (PER_T), the power value (CUR_PWR) is calculated from the energy consumed (work). For signal type 3, the PRE_CALC / PR3_CALC function returns the current power value (CUR_PWR) which is converted into energy (time basis corresponds to processing cycle time of the block). If the power value is < ZERO_CUT, 0 is set for the value. At the start of a synchronization period (SYNC_PER, SYNC_P = FALSE TRUE) the current count value CUR_VAL = 0 is set. During the synchronization period, the energy values calculated are added to the CUR_VAL parameter in cycles. At the end of the synchronization period (SYNC_PER), the average power value (AVG_PWR) is calculated from the energy consumed (work). The change to the current energy value is extrapolated to the total synchronization period (EST_VAL). The expected, average power (EST_PWR) for the current synchronization period is determined from this. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 21 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Mode changeover for measured value acquisition For signal types (INP_SEL) 1 and 2, the operator can use the AUT_ON_OP input to change over the mode for measured value acquisition if the corresponding releases (AUTOP_EN / MANOP_EN) are present. The mode selected is displayed at the QMAN_AUT parameter. Automatic mode In automatic mode (QMAN_AUT = TRUE), the energy value is formed from the corresponding VALUE_P or VALUE_R input. Manual mode In manual mode (QMAN_AUT = FALSE), the faceplate can be used to enter the energy value at the V_MAN parameter. The value is then valid when V_MAN V_MAN_L1 (last valid manual value), taking into account the maximum counter value MAX_CNT (counter overflow) and the time stamp of the manual value (V_MAN_DATE, V_MAN_TIME) is > time stamp of the last valid manual value (V_MAN_L1_DATE, V_MAN_L1_TIME). The total energy consumed (CUR_VAL) and the average power values (AVG_PWR = CUR_PWR) for the acquisition period are calculated from the difference between the current and last manual value within the time entered (difference between current and last time stamp). The expected energy and power values (EST_VAL / EST_PWR) are equated with the current values for the acquisition period (CUR_VAL / CUR_PWR). Archiving The parameters LAST_VAL (current saved energy value CUR_VAL at the end of the synchronization period SYNC_PER), AVG_PWR (average power value at the end of the synchronization period SYNC_PER) and, with signal type 1 and 2, VALUE_D or VALUE_R (absolute count value) are used for archiving. In manual mode, the CUR_VAL (energy consumed within the time period stated) and AVG_PWR (average power value in time period stated) parameters are used for archiving. The values are given the time stamp entered. The data awaiting archiving are written to the FIFO buffer using the PRE_FIFO_IO / PR3_FIFO_IO function. The PRE_AR_SND / PR3_AR_SND block is responsible for archiving. Value archiving can be deactivated on an individual basis by setting the ARSNO_S parameter for the energy value, ARSNO_V for the power value, or ARSNO_C for the count value to 0. 22 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Quality Code The QC_P, QC_D, QC_R, and QC_ACTx (x=1 ... 3) parameters contain the quality codes of the input signals and must be connected to the QUALITY output of the associated driver blocks when using the input signals selected. Depending on the signal type, the corresponding inputs are used to form the quality codes for the output side: QC_LAST_VAL, QC_CUR_VAL, QC_EST_VAL, QC_AVG_PWR, QC_CUR_PWR and QC_EST_PWR. The following quality code data is evaluated: Quality Code = 16#60: Simulation on driver block active (QSIM = TRUE) Quality Code = 16#80: Valid value Quality code or <> 16#60 <> 16#80: Invalid value, external error (QBAD = TRUE) In the event of an error, -1 is displayed at the outputs. 3.2.4 Message behavior PRE_SUM PRE_SUM issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QPARAMF Parameterization error PLC pr ctrl failure 2 QPF_FIFO FIFO parameterization error PLC pr ctrl failure 3 QOVL FIFO buffer overflow PLC pr ctrl failure 4 QCALCERR Error in calculation function PLC pr ctrl failure 5 QOP_ERR Invalid manual value OS pr ctrl failure 6 QBAD External error PLC pr ctrl failure 7 - Free - 8 - Free - SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 23 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing PR3_SUM Message block Message number Block parameter Message text Message class MSGEVID1 1 QPARAMF Parameterization error PLC pr ctrl failure MSGEVID2 1 QPF_FIFO FIFO parameterization error PLC pr ctrl failure MSGEVID3 1 QOVL FIFO buffer overflow PLC pr ctrl failure MSGEVID4 1 QCALCERR Error in calculation function PLC pr ctrl failure MSGEVID5 1 QOP_ERR Invalid manual value OS pr ctrl failure MSGEVID6 1 QBAD External error PLC pr ctrl failure 3.2.5 Error behavior The QPARAMF error output is set when The acquisition period PER_T 0 The synchronization period SYNC_PER 0 Normalization factor WEIGHT_P (when INP_SEL = 0) or WEIGHT_A (when INP_SEL = 1 or 2) 0.0 The maximum counter value MAX_CNT 0.0 The count input of the selected signal type (VALUE_D / VALUE_R) > MAX_CNT The limit for zero point power ZERO_CUT < 0 Subnumber for archive tag (ARSNO_V / ARSNO_S / ARSNO_C) > 16#0FFF The QPF_FIFO error output is set when the PRE_FIFO_IO / PR3_FIFO_IO function called internally for managing the FIFO buffer reports that The parameterized FIFO DB is not present The FIFO DB length is too short The QCALCERR error output is set when the calculation function called internally PRE_CALC / PR3_CALC reports an error in the calculation. The QOP_ERR error output is set for 1 cycle when one of the following is entered in manual mode: An invalid time stamp A manual value < 0 or > maximum count value MAX_CNT 24 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing 3.2.6 Start-up characteristics During startup, the accumulated values are reset, the times restarted, and the messages suppressed. 3.2.7 Block parameter PRE_SUM Item Data type Ty pe Meaning HMI ACTUALx REAL I Current value x (x=1..3) for calculation * ARSNO_C WORD I Subnumber for archive tag of count value .C + ARSNO_S WORD I Sub-number for archive tag of accumulated value .S + ARSNO_V WORD I Subnumber for archive tag of average power value .V + AUT_ON_OP BOOL IO Mode selection for measured value acquisition: 0 = Manual , 1 = Automatic + AUTMAN_EN BOOL I 1 = Release for automatic changeover to manual in the event of an external error AUTOP_EN BOOL I 1 = Release for automatic operation AVG_PWR REAL O Average power at end of synchronization period CALC_FN INT I Calculation function * CALC_Px REAL I Parameter x (x=0..3) of calculation function * CSF BOOL I 1 = External error CUR_PWR REAL O Current power at end of acquisition period CUR_TS DATE_AND_TIME I Current time stamp when block is called + + CUR_VAL REAL O Current integrated value + EST_VAL REAL O Probable value by end of acquisition period + EST_PWR REAL O Average power by end of acquisition period + FIFO INT I Link to FIFO data INP_SEL INT I Selector for signal type: 0 = Pulse input, 1 = Integer count input, 2 = Analog count input, 3 = Result from calculation + LAST_VAL REAL O Last archived, accumulated value + MANOP_EN BOOL I 1 = Release for manual operation MAX_CNT REAL I Maximum count value for signal types 1 and 2 MSG_ACK WORD O Messages acknowledged, ALARM_8P block MSG_EVID DWORD I Event ID of the ALARM_8P message block MSG_STAT WORD O MESSAGE: STATUS output PER_T REAL I Acquisition period for current power value in [s] QAUTOP BOOL O 1 = Release for automatic operation QBAD BOOL O 1 = External error QC_ACTx BYTE I Quality code for ACTUALx QC_AVG_PWR BYTE O Quality code for AVG_PWR SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + + 25 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Item Data type Ty pe Meaning HMI QC_CUR_PWR BYTE O Quality code for CUR_PWR QC_CUR_VAL BYTE O Quality code for CUR_VAL QC_D BYTE I Quality code for VALUE_D QC_EST_PWR BYTE O Quality code for EST_PWR QC_EST_VAL BYTE O Quality code for EST_VAL QC_LAST_VAL BYTE O Quality code for LAST_VAL QC_P BYTE I Quality code for VALUE_P QC_R BYTE I Quality code for VALUE_R QCALCERR BOOL O 1 = Error in calculation function QMAN_AUT BOOL O Measured value acquisition mode: 0 = Manual , 1 = Automatic + QMANOP BOOL O 1 = Release for manual operation + QMSG_ERR BOOL O 1 = ALARM_8P error QMSG_SUP BOOL O 1 = Message suppression QOP_ERR BOOL O Operating error QOVL BOOL O 1 = FIFO buffer overflow QPARAMF BOOL O 1 = Parameterization error QPF_FIFO BOOL O 1 = Parameterization error FIFO QSIM BOOL O 1 = Simulation active RESET BOOL IO 1 = Reset the accumulated value RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SET BOOL IO Set manual value SYNC_P BOOL I Synchronization pulse SYNC_PER REAL I Synchronization period in [s] SYNC_TS DATE_AND_TIME I Time stamp of synchronization pulse + + + V_MAN REAL IO Current manual value + V_MAN_DATE DWORD IO Time stamp for date of current manual value + V_MAN_Lx REAL IO Last manual value x (x = 1 ... 3) + V_MAN_Lx_DA TE DWORD IO Time stamp for date of last manual value x (x = 1 ... 3) + V_MAN_Lx_TIM DWORD E IO Time stamp for time of last manual value x (x = 1 ... 3) + V_MAN_TIME IO Time stamp for time of current manual value + DWORD VALUE_D DINT I Integer count input VALUE_P BOOL I Pulse input VALUE_R REAL I Analog count input WEIGHT_A REAL I Normalization factor for integer/analog counter input WEIGHT_P REAL I Normalization factor for pulse input ZERO_CUT REAL I Limit for zero point during calculation * See calculation algorithms contained in the PRE_CALC block (see "PRE_CALC / PR3_CALC: Calculations (Page 141)") 26 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing PR3_SUM Item Data type Type Meaning HMI ACTUALx REAL I Current value x (x=1..3) for calculation * ARSNO_C WORD I Subnumber for archive tag of count value .C ARSNO_S WORD I Sub-number for archive tag of accumulated value .S + ARSNO_V WORD I Subnumber for archive tag of average power value .V + AUT_ON_OP BOOL IO Mode selection for measured value acquisition: 0 = Manual , 1 = Automatic + AUTMAN_EN BOOL I 1 = Release for automatic changeover to manual in the event of an external error AUTOP_EN BOOL I 1 = Release for automatic operation AVG_PWR REAL O Average power at end of synchronization period CALC_FN INT I Calculation function * CALC_Px REAL I Parameter x (x=0..3) of calculation function * CMP_ID DWORD I Component identifier for ALARM_DQ CSF BOOL I 1 = External error CUR_PWR REAL O Current power at end of acquisition period CUR_TS DATE_AND_TIME I Current time stamp when block is called + + + CUR_VAL REAL O Current integrated value + EST_VAL REAL O Probable value by end of acquisition period + EST_PWR REAL O Average power by end of acquisition period + FIFO INT I Link to FIFO data INP_SEL INT I Selector for signal type: 0 = Pulse input, 1 = Integer count input, 2 = Analog count input, 3 = Result from calculation + + LAST_VAL REAL O Last archived, accumulated value MANOP_EN BOOL I 1 = Release for manual operation MAX_CNT REAL I Maximum count value for signal types 1 and 2 MSG_ACKx BOOL O Messages acknowledged, ALARM_DQ block x (x = 1 ... 6) MSGEVIDx DWORD I Event ID of message block ALARM_DQ x (x=1..6) MSGSTATx WORD O MESSAGE x (x = 1 ... 6): STATUS Output PER_T REAL I Acquisition period for current power value in [s] QAUTOP BOOL O 1 = Release for automatic operation QBAD BOOL O 1 = External error QC_ACTx BYTE I Quality code for ACTUALx QC_AVG_PWR BYTE O Quality code for AVG_PWR QC_CUR_PWR BYTE O Quality code for CUR_PWR QC_CUR_VAL BYTE O Quality code for CUR_VAL QC_D BYTE I Quality code for VALUE_D QC_EST_PWR BYTE O Quality code for EST_PWR QC_EST_VAL BYTE O Quality code for EST_VAL QC_LAST_VAL BYTE O Quality code for LAST_VAL QC_P BYTE I Quality code for VALUE_P QC_R BYTE I Quality code for VALUE_R SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + + 27 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Item Data type Type Meaning HMI QCALCERR BOOL O 1 = Error in calculation function QMAN_AUT BOOL O Measured value acquisition mode: 0 = Manual , 1 = Automatic + QMANOP BOOL O 1 = Release for manual operation QMSG_ERR BOOL O 1 = ALARM_8P error QMSG_SUP BOOL O 1 = Message suppression QOP_ERR BOOL O Operating error QOVL BOOL O 1 = FIFO buffer overflow QPARAMF BOOL O 1 = Parameterization error QPF_FIFO BOOL O 1 = Parameterization error FIFO QSIM BOOL O 1 = Simulation active RESET BOOL IO 1 = Reset the accumulated value RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SET BOOL IO Set manual value SYNC_P BOOL I Synchronization pulse + + + + SYNC_PER REAL I Synchronization period in [s] SYNC_TS DATE_AND_TIME I Time stamp of synchronization pulse V_MAN REAL IO Current manual value V_MAN_DATE DWORD IO Time stamp for date of current manual value + V_MAN_Lx REAL IO Last manual value x (x = 1 ... 3) + V_MAN_Lx_DATE DWORD IO Time stamp for date of last manual value x (x = 1 ... 3) + V_MAN_Lx_TIME DWORD IO Time stamp for time of last manual value x (x = 1 ... 3) + V_MAN_TIME DWORD IO Time stamp for time of current manual value + + VALUE_D DINT I Integer count input VALUE_P BOOL I Pulse input VALUE_R REAL I Analog count input WEIGHT_A REAL I Normalization factor for integer/analog counter input WEIGHT_P REAL I Normalization factor for pulse input ZERO_CUT REAL I Limit for zero point during calculation * See calculation algorithms contained in the PR3_CALC block (see "PRE_CALC / PR3_CALC: Calculations (Page 141)") 28 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing 3.2.8 Description of icons and faceplate Block icon Variant 1 Variant 2 The faceplate available is described in this chapter. The following views are available: Overview OVERVIEW Standard STANDARD Table TABLE Input EDIT Maintenance MAINTENANCE Messages Trend The file name is composed as follows: @PG_PRE_SUM_.PDL / @PG_PR3_SUM_.PDL Standard displays are used for the messages and trend views. The structure of the individual views of faceplates is described below. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 29 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Standard (STANDARD) (1) QMAN_AUT / AUT_ON_OP (2) LAST_VAL / unit LAST_VAL#unit (3) CUR_VAL / unit CUR_VAL#unit (4) EST_VAL / unit EST_VAL#unit (5) EST_PWR / unit EST_PWR#unit (6) CUR_PWR / unit CUR_PWR#unit (7) AVG_PWR / unit AVG_PWR#unit (8) SYNC_PER Explanation of values Item Energy: (work) Power: 30 Signal type 0, 1 - 2 (automatic) Signal type 1 - 2 (manual) Signal type 3 Previous Last archived energy value from the previous synchronization period Last archived energy value from the last time period entered Last archived energy value from the previous synchronization period Instant. Energy value accumulated within the current synchronization period Energy consumption of the time period entered Energy value accumulated within the current synchronization period Forecast Extrapolated accumulated energy value to end of synchronization period See energy: Instant. Extrapolated accumulated energy value to end of synchronization period Prev. Avg Last archived average power value Average power value for the last time period entered Last archived average power value Instant. Current power value See Power: Instant. Current power value Forecast Extrapolated average power value to end of synchronization period See Power: Instant. Extrapolated average power value to end of synchronization period SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Table (TABLE) Display of archived, accumulated energy values and average power values from the database (1) Archive tag S: Added energy value (LAST_VAL) (2) Archive tag V: Average power value (AVG_PWR) Edit (EDIT) (1) V_MAN_Lx / unit V_MAN_Lx#unit (x = 1 ... 3) (2) V_MAN_Lx_DATE / V_MAN_Lx_TIME (x = 1 ... 3) (3) SET / text SET#string_1 (4) V_MAN_DATE / V_MAN_TIME (5) V_MAN / unit V_MAN#unit SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 31 Description of blocks 3.2 PRE_SUM / PR3_SUM: Energy acquisition and processing Maintenance (MAINTENANCE) The accumulated energy values and average power values in the archive can be changed in this view. Note The changed values are not checked for consistency. The user is responsible for ensuring the values are correct. (1) Archive tag S: Added energy value (LAST_VAL) (2) Archive tag .V: Average power value (AVG_PWR) Messages 32 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.3 PRE_FIFO_DATA / PR3_FIFO_DATA: FIFO buffer Trend If archiving of accumulated energy values is active, the S (added energy value) and V (average power value) archive tags are shown in the trend view. If accumulated energy values are not activated, the trend view contains the CUR_VAL (current energy) and CUR_PWR (current power) tags. (1) 3.3 3.3.1 Archive tag S: Added energy value (LAST_VAL) / CUR_VAL and archive tag .V: Average power value (AVG_PWR) / CUR_PWR PRE_FIFO_DATA / PR3_FIFO_DATA: FIFO buffer PRE_FIFO_DATA FB1062 PR3_FIFO_DATA FB162 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.3.2 Called blocks PRE_FIFO_DATA The block calls the following blocks: SFC6 RD_SINFO FC1062 PRE_FIFO_IO SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 33 Description of blocks 3.3 PRE_FIFO_DATA / PR3_FIFO_DATA: FIFO buffer PR3_FIFO_DATA The block calls the following blocks: 3.3.3 SFC6 RD_SINFO FC162 PR3_FIFO_IO Function The PRE_FIFO_DATA / PR3_FIFO_DATA block serves as a buffer for measured values to be archived which supply the PRE_SUM / PR3_SUM and are sent by the PRE_AR_SND / PR3_AR_SND to WinCC. It is used as a place holder for the buffer data block and passes the data block number to the blocks PRE_SUM / PR3_SUM and PRE_AR_SND / PR3_AR_SND. The PRE_FIFO_IO / PR3_FIFO_IO function is responsible for organizing the cyclic buffer. The source of the block is contained in the library. The user can thereby adjust the length of the buffer. The number of elements inside the FIFO buffer can be changed by adaption of the maximum size of the array FIFO_DATA . The buffer items are of data type UDT_PRE_ITEM (see "UDT_PRE_ITEM (Page 144)"). 3.3.4 Message behavior The block has no message behavior. 3.3.5 Error behavior The block has no error behavior. 3.3.6 Start-up characteristics The block initializes the PRE_FIFO_IO / PR3_FIFO_IO function during initial startup. When the CPU is started up subsequently, the pointers are retained. 34 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.4 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data 3.3.7 Block parameters Item Data type Type Meaning HMI FIFO INT O Number of the FIFO DB ITEM_LEN INT O Length of an element ITEM_NO INT O Number of elements 3.4 3.4.1 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data PRE_AR_DATA FB1063 PR3_AR_DATA FB163 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.4.2 Called blocks PRE_AR_DATA The block calls the following blocks: FB1064 PRE_AR_SND PR3_AR_DATA The block calls the following blocks: FB164 PR3_AR_SND SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 35 Description of blocks 3.4 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data 3.4.3 Function The PRE_AR_DATA / PR3_AR_DATA function block contains the data interface for the archive data to be sent and calls the PRE_AR_SND / PR3_AR_SND block which sends the archive data to WinCC. The memory area for telegram data is located in the instance DB. PRE_AR_DATA The source of the block is contained in the library. The user can thereby adjust the length of the telegram data. The number of elements inside the telegram data can be changed by adaption of the maximum size of the array AR_DATA . Please note the resource restrictions when using the S7 functions "AR_SEND" and "BSEND / BRCV" to communicate with a S7-400. No more than 16 Kbytes of data can be simultaneously sent by the AS to WinCC using the AR_SEND and/or BSEND / BRCV functions. The message frame items are of data type UDT_PRE_TLG (see UDT_PRE_TLG (Page 144)) and are 26 bytes in length. PR3_AR_DATA The source of the block is not contained in the library, because the set length of the telegram data cannot be modified due to resource restrictions with communication with S7-300. Max. 7 elements are transferred in a telegram. 36 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.4 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data 3.4.4 Message behavior The message behavior is programmed in the called block PRE_AR_SND / PR3_AR_SND. The interface to the messages is the PRE_AR_DATA / PR3_AR_DATA FB. PRE_AR_DATA PRE_AR_DATA issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR Communication error PLC pr ctrl failure 2 QPARAMF Parameterization error PLC pr ctrl failure 3 - Free - 4 - Free - 5 - Free - 6 - Free - 7 - Free - 8 - Free - PR3_AR_DATA PR3_AR_DATA issues the following messages: Message block Message number Block parameter Message text Message class MSGEVID1 1 QERR Communication error PLC pr ctrl failure MSGEVID2 1 QPARAMF Parameterization error PLC pr ctrl failure 3.4.5 Error behavior The block has no error behavior. 3.4.6 Start-up characteristics Messages are suppressed during startup. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 37 Description of blocks 3.4 PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data 3.4.7 Block parameters PRE_AR_DATA Item Data type Type Meaning HMI + ACK_TEL DWORD IO Acknowledgment frame AR_EVID DWORD I Archive number for the AR_SEND archive send block AR_STAT WORD O AR_SEND: STATUS Output FIFO INT I Link to FIFO data MSG_ACK WORD O Messages acknowledged, ALARM_8P block MSG_EVID DWORD I Event ID of the ALARM_8P message block MSG_STAT WORD O MESSAGE: STATUS Output QERR BOOL O 1 = Error when sending archive QMSG_ERR BOOL O 1 = ALARM_8P Error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SEND_T REAL I Monitoring time send request Item Data type Type Meaning AR_EVID DWORD I Archive number for the AR_SEND archive send block AR_STAT WORD O AR_SEND: STATUS Output PR3_AR_DATA HMI CMP_ID DWORD I Component identifier for ALARM_DQ FIFO INT I Link to FIFO data MSG_ACKx BOOL O Messages acknowledged, ALARM_DQ block x (x = 1 ... 2) MSGEVIDx DWORD I Event ID of message block ALARM_DQ x (x=1..2) MSGSTATx WORD O MESSAGE x (x = 1 ... 2): STATUS Output QERR BOOL O 1 = Error when sending archive QMSG_ERR BOOL O 1 = ALARM_DQ Error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error REPEAT_T REAL 1 Waiting time between 2 send requests REQUEST BOOL IO 1 = Request for archiving RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SEND_RST BOOL I 1 = Reset Send request SEND_T REAL I Monitoring time send request 38 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.5 PRE_AR_SND / PR3_AR_SND: Archiving measured values 3.5 3.5.1 PRE_AR_SND / PR3_AR_SND: Archiving measured values PRE_AR_SND FB1064 PR3_AR_SND FB164 Calling blocks The block is called by PRE_AR_DATA / PR3_AR_DATA. 3.5.2 Called blocks PRE_AR_SND The block calls the following blocks: SFB35 ALARM_8P SFB37 AR_SEND SFC6 RD_SINFO SFC24 TEST_DB FC1062 PRE_FIFO_IO PR3_AR_SND The block calls the following blocks: 3.5.3 SFC6 RD_SINFO SFC19 ALARM_SC SFC24 TEST_DB SFC107 ALARM_DQ FC162 PR3_FIFO_IO Function PRE_AR_SND The PRE_AR_SND function block reads the values from the FIFO buffer, produces the telegram data for writing the values to the OS, and sends them to WinCC with SFB37 AR_SEND. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 39 Description of blocks 3.5 PRE_AR_SND / PR3_AR_SND: Archiving measured values PR3_AR_SND The PR3_AR_SND function block reads the values from the FIFO buffer, produces the telegram data for writing the values to the OS and sends them via a raw data variable to WinCC. The raw data variable is evaluated by the function PR3_AR_SND.fct and writes the archive data to the WinCC Tag Logging Archive. 3.5.4 Message behavior See "Message behavior" (Page 37) in "PRE_AR_DATA / PR3_AR_DATA: Data interface for sending the archive data". 3.5.5 Error behavior The QPARAMF error output is set when The parameterized archive DB is not present The archive DB length is too short The QERR error output is set when An error occurred while writing to WinCC. 3.5.6 Start-up characteristics Messages are suppressed during startup. 3.5.7 Block parameters PRE_AR_SND Item Data type Type Meaning ACK_TEL DWORD IO Acknowledgment frame HMI AR_DB INT I DB number for archive data AR_EVID DWORD I Archive number for the AR_SEND archive send block AR_STAT WORD O AR_SEND: STATUS Output FIFO_DB INT I DB number for FIFO MSG_ACK WORD O Messages acknowledged, ALARM_8P block MSG_EVID DWORD I Event ID of the ALARM_8P message block MSG_STAT WORD O MESSAGE: STATUS Output QERR BOOL O 1 = Error when sending archive QMSG_ERR BOOL O 1 = ALARM_8P Error 40 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.5 PRE_AR_SND / PR3_AR_SND: Archiving measured values Item Data type Type Meaning QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SEND_T REAL I Monitoring time send request HMI PR3_AR_SND Item Data type Type Meaning AR_DB INT I DB number for archive data AR_EVID DWORD I Archive number AR_STAT WORD O AR_SEND: STATUS Output CMP__ID DWORD I Component identifier for ALARM_DQ FIFO_DB INT I DB number for FIFO MSG_ACKx BOOL O Messages acknowledged ALARM_DQ block x (x=1..2) MSGEVIDx DWORD I Event ID of message block ALARM_DQ x (x=1..2) MSGSTATx WORD O MESSAGE x (x = 1..2): STATUS Output QERR BOOL O 1 = Error when sending archive QMSG_ERR BOOL O 1 = ALARM_DQ error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error REPEAT_T REAL I Waiting time between 2 send requests REQUEST BOOL IO 1 = Request for archiving RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SEND_RST BOOL I 1 = Reset Send request SEND_T REAL I Monitoring time send request HMI Description of the status AR_STAT Description 0 No error 1 Connection error 2 Writing to Tag Logging archive failed 3 Job retry 4 Ini file cannot be read 6 Tag name not available in ini file 7 Number of values to be written is 0 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 41 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management 3.6 3.6.1 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management PRE_LMGM FB1065 PRE_LMGM_75 FB1066 PRE_LMGM_50 FB1067 PRE_LMGM_25 FB1068 PRE_LMGM_10 FB1069 PR3_LMGM FB165 PR3_LMGM_75 FB166 PR3_LMGM_50 FB167 PR3_LMGM_25 FB168 PR3_LMGM_10 FB169 Calling blocks The OB watchdog interrupt in which you install the block (e.g. OB32). Also in OB100 (see start-up characteristics). 3.6.2 Called blocks PRE_LMGM The block calls the following blocks: FC1 42 AD_DT_TM (IEC function from the STEP 7 Standard Library) SFB31 NOTIFY_8P SFB35 ALARM_8P SFC6 RD_SINFO SFC20 BLKMOV SFC21 FILL SFC51 RDSYSST SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management PR3_LMGM The block calls the following blocks: 3.6.3 FC1 AD_DT_TM (IEC function from the STEP 7 Standard Library) SFC6 RD_SINFO SFC19 ALARM_SC SFC20 BLKMOV SFC21 FILL SFC107 ALARM_DQ SFC108 ALARM_D Function In the context of power management systems, load management refers to monitoring the power limit agreed with the power supply company for each time interval. The time interval depends on the type of energy used; for electricity it is typically 15 minutes, for gas 1 hour. The following general functions of the load management are implemented in powerrate: Calculating the difference in power based on actual consumption and the trend transferred to the PRE_SUM / PR3_SUM block at the end of the period Monitoring the reference limit Issuing a warning/alarm if a limit is about to be exceeded Archiving of supplementary information in the case of limit violations Generating a release/hold signal for every load, based on the priority list and taking the load's min./max. disconnect times and min. connect times into account Blocks are provided for this with different quantity structures depending on the required number of loads: The following blocks are available: PRE_LMGM_10 / PR3_LMGM_10 up to 10 loads PRE_LMGM_25 / PR3_LMGM_25 up to 25 loads PRE_LMGM_50 / PR3_LMGM_50 up to 50 loads PRE_LMGM_75 / PR3_LMGM_75 up to 75 loads PRE_LMGM / PR3_LMGM_75 up to 100 loads Only the block PRE_LMGM is listed in the remaining description. With the restriction to the number of loads, all functions are identical in the other blocks in the CPUs used. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 43 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management General information about the configuration The load management configuration is stored in WinCC user archives. Please note that these archives must be licensed. Load management is configured in the faceplate. By editing and saving the parameters in the different views, the data is loaded to the controller and also written to WinCC user archives. To guarantee that the actual status of the priority list in the PLC is used for the configuration, the function "Load from PLC" in the faceplate view "Edit priolist" can be used. Before performing a general download of the controller, it is advisable to read the instance DB of the block PRE_LMGM back so that the latest configuration will remain active after a CPU restart. If upload is not possible, or if an old configuration is to be activated, the entire configuration can be loaded immediately from the faceplate view "Configuration" to the controller. The most recent configuration can be identified by means of the config ID (if known) or the "start of configuration" and "end of configuration" time stamps (the latter will be empty). Configuration of total energy consumption/total supply power The PRE_SUM block is used to acquire the total energy (CUR_VAL)/the total supply power (CUR_PWR), including calculation of trends up to the end of the period (EST_VAL / EST_PWR) and the energy / average power value at the end of the period (LAST_VAL / AVG_PWR). The block parameters must be connected accordingly. Configuration of loads The block can manage up to 100 loads. The number of the highest input to which a load will be connected must be specified via the MAX_LOAD input. Settings can be made for each load. The associated parameters are described below, where x represents the number of the load and can be a value of 01..100. The Px input contains the current load power. This input is only evaluated if the MODEx input (see below) has a value of 1. The rated power is specified at the CAPx input. The rated power always serves as the basis for performing a calculation during connection. If MODEx = 2 or 3, it is assumed that the load will run at rated power when enabled. The ONx input is connected to the load's switching state (only MODEx = 2). The type of load is set via the MODEx input: MODEx 44 Type of load 1 Actual power of the load is connected to the Px input 2 Switching state of the load is connected to the ONx input 3 Only the load's rated power is known SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Depending on its type, a load will be considered to be disabled under the following conditions: Type of load Condition for "OFF" MODEx = 1 Px < CAPx*MAX_STBYs/100.0 Current load power is lower than maximum standby power of the load MODEx = 2 ONx = FALSE Feedback: "OFF" MODEx = 3 QONx = FALSE Load not released by load management A minimum connect time, a minimum disconnect time, and a maximum disconnect time are parameterized at the MIN_ONx, MIN_OFFx, and MAX_OFFx inputs for each load: Minimum connect time is how long the load must remain enabled following its release before it can be held again. Minimum disconnect time is the minimum length of time the load must be shed before it can be released again. Maximum disconnect time is the maximum length of time the load may be shed before it has to be re-enabled (MAX_OFFx = 0 means there is no max. disconnect time). The block contains the SHED_Tx and EN_Tx output variables, which are of data type REAL, for each load. The time in seconds since the last connect/disconnect procedure is saved in these variables. A load cannot be held until the minimum connect time has elapsed, nor can it be released again until the minimum disconnect time has elapsed. Once the maximum disconnect time has elapsed without consideration of the SETTLE_T settling time, a shed load is automatically released without any other conditions being checked, unless it is in manual mode. The value of the MAX_STBYx input is used to determine the maximum standby power of every load. The load management block generates a hold/release signal, depending on the specified limit and the calculated trend. A hold signal means that load management calculations have indicated that the load should be disabled. The hold signal can either disable a load directly, if it is connected accordingly, or the load can be linked to other conditions so that process boundary conditions can be taken into account. The same applies to the release signal, which indicates that a load should be enabled. Where reference is made in the following to connection/disconnection or load shedding, it is assumed that the release/hold signals have caused the load to be enabled/disabled directly, but this does not necessarily have to be the case. The difference in power is calculated from the difference between the specified power limit and the estimated average power at the end of the period (EST_PWR). The power limit value may take a hysteresis into account at the start of the period, if necessary. Load shedding takes place if the difference in power is lower than 0 and both the SUPP_T suppression time and the SETTLE_T settling time have elapsed. Released loads or groups of loads in the priority list are shed, starting with the highest priority loads and taking the minimum connect time into account, until the total shed power (current power Px or rated power CAPx for loads without power feedback) is greater than the difference in power. Loads with the same priority represent a group and will always be shed together. Following load shedding, the SETTLE_T settling time is allowed to expire before a new load shedding procedure is executed or loads are reconnected, if required. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 45 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Requirements for load shedding: Parameter Meaning EN_SHED = TRUE General release for load shedding EN_SHEDx = TRUE Load is in load management mode, so is not deactivated MANx = FALSE Load is not in manual mode P_DIFF < 0 Negative difference in power QSUPP_T 0 Suppression time has elapsed QSETTLE_T 0 Settling time has elapsed QMIN_ONx = FALSE Load's minimum connect time has elapsed The QONx output is set to FALSE for shed loads. Loads with status feedback If load x does not have separate power feedback, but just ONx status feedback, and ONx = TRUE it is assumed that the load is running at its rated power CAPx; if ONx = FALSE it is assumed that no power is being used. A disabled load (ONx = FALSE) will also be shed, if it is next in line according to the priority list. However, no power is added in order to reach the difference in power. Releasing shed loads If loads have been shed and the P_DIFF difference in power is greater than 0 once the SETTLE_T settling time has elapsed, loads are released again. Shed loads or groups of shed loads are released, starting with the lowest priority loads and taking the minimum disconnect time into account, until the total released power (CAPx rated power) is greater than the difference in power. Loads with the same priority represent a group. Because of this, they always will be released together, if the load management allows this. It is not possible to release several loads within a group. Following release of a load, the SETTLE_T settling time is allowed to expire before a new load shedding procedure or release is executed, if required. If a low-priority load cannot be released because its rated power is greater than the available difference in power, no high-priority load is released either. If the settling time and maximum disconnect time (MAX_OFFx) of disconnected load x have elapsed, the load is released unconditionally. The QONx output is set to TRUE for released loads. Load control Hysteresis To avoid switching operations occurring too frequently, particularly at the start of the period, a hysteresis aimed at increasing the limit at which load shedding is triggered (HYS_LIMP) can be configured in accordance with the algorithm shown below. The block checks whether the value entered for the end of the hysteresis (HYS_T) is greater than zero and lower than the period time (SYNC_PER). If this is not the case, HYS_T is reset to its previous value when a change is made. If the period time (SYNC_PER) is changed to a value lower than HYS_T, HYS_T is set to the new period time. 46 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management +<6B/,03 W SRZHUYDOXHWDNLQJWKHK\VWHUHVLVLQWRDFFRXQW /,0B3 +<6B3: /,0B3 6833B7 +<6B7 6<1&B3(5 7LPHW HQGRISHULRG &DOFXODWLRQRI+<6B/,03 W W+<6B7 +<6B/,03 W /,0B3 +<6B3:/,0B3 W/,0B3 +<6B3: +<6B7 W! +<6B7 +<6B/,03 W /,0B3 Description of parameters LIM_P Power limit HYS_LIMP Current power limit, taking the hysteresis into account HYS_PW Hysteresis starting value as a % of the power or work maximum at the start of a period HYS_T Time after start of the period after which no hysteresis is to be taken into account any longer t Time since start of current period SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 47 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Delay time (suppression time) Another way of preventing unnecessary switching operations at the start of the period is to configure a delay time (suppression time) SUPP_T, during which no load shedding will be performed and the "limit about to be exceeded" warning/alarm messages will not be issued. Idle time A settling time can be configured to deal with the inertia of a load following a switching operation. After load shedding or the release of loads due to the difference in power, the block waits for the SETTLE_T settling time to elapse before a new load shedding procedure or release is executed. (SETTLE_T = 0 means that no settling time will be taken into account). If a load is connected because of the elapsed maximum disconnect time, the settling time does not have to elapse until another load is connected. Priority list Assigning a priority Each load has a PRIOx input, at which the load's priority is parameterized as a number (1 to 255). 1 is the highest priority, 0 means that the load is not participating in load management or that no load is present. Disconnection is performed from the highest priority down to the lowest, i.e. the load with priority 1 is disconnected first. Loads with the same priority form a priority group. Maximum disconnect time is the maximum length of time the load may be shed before it has to be re-enabled. A load is assigned to a priority group and/or a rolling group in the "Edit prio list" faceplate view in WinCC and loaded to the controller using "Save". Note If priorities (PRIOx) or assignments to rolling groups (ROLLx) have been changed in the program, it is essential that a recalculation is performed in the faceplate. The "Load from PLC" command must be executed in the "Edit prio list" faceplate view to transfer the modified values from the block to WinCC. Rolling loads Each load has an input named ROLLx, which defines whether the load is a rolling load within the priority group (ROLLx > 0) or not (ROLLx = 0). Rolling loads all have the same priority. The ROLLx parameter is used to specify the sequence in which these loads are disconnected. This procedure means that the load disconnected for a particular priority is not always the same one; rather, it changes each time. Groups can also be formed in order to switch loads together. Loads with the same priority and same ROLLx parameter form a group of loads, which are switched together. Several load groups may exist for the same priority. If a group of loads with the same priority (= priority group) is shed, all non-rolling loads are shed, as are the rolling loads starting with the first ROLLx number. If loads have the same ROLLx number, they are shed together too. 48 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Behavior of rolling load groups If several loads have the same ROLLx number, they cannot be shed until at least one load is in the load management and not in manual mode and its minimum connect time has elapsed. If the minimum connect time of all loads has not elapsed, an attempt is made to shed the next group of rolling loads. If the maximum disconnect time of a load located within a group of rolling loads elapses, this load is reconnected (without consideration of the settling time). The next group of rolling loads is not disconnected until it is required due to the difference in power. Das Zuschalten von rollierenden Verbrauchergruppen bei positiver Differenzleistung erfolgt immer nur gemeinsam, d. h. es wird kein Verbraucher einzeln zugeschaltet, wenn die Differenzleistung nur hierfur ausreicht. If the next group of rolling loads within a priority group cannot be disconnected because at least one load of the currently disconnected group has yet to be reconnected, loads of the next priority level will be disconnected to prevent a deadlock from occurring, if necessary. Irrespective of that, the next group of rolling loads will be connected as soon as all loads in the current group have been reconnected. Tariffs The block has three tariffs (on-peak tariff, off-peak tariff, and Sunday or holiday tariff). Either a work limit or a power limit can be defined for each tariff. The limit values can be defined either via the faceplate or the configurable inputs. You can switch between the operator-controllable limit values (LIM_L = FALSE) and the configurable limit values (LIM_L = TRUE) via the (LIM_L input. LIM_W_H: Operator-controllable work limit for on-peak tariff LIM_W_L: Operator-controllable work limit for off-peak tariff LIM_W_SH: Operator-controllable work limit for Sunday or holiday tariff L_LIM_W: Configurable work limit LIM_P_H: Operator-controllable power limit for on-peak tariff LIM_P_L: Operator-controllable power limit for off-peak tariff LIM_P_SH: Operator-controllable power limit for Sunday or holiday tariff L_LIM_P: Configurable power limit If SEL_PW = TRUE the limits must be defined as power values; if SEL_PW = FALSE they must be defined as work limits. The block receives the CPU's current UTC time via its CUR_TS input from the PRE_SYNC / PR3_SYNC block, which is internally converted to local time. The block uses the BEG_HT (start time for on-peak tariff) and BEG_LT (start time for off-peak tariff) inputs to decide whether the limit for the on- or off-peak tariff should be applied. On-peak tariff applies, when BEG_HT < BEG_LT and BEG_HT <= time <= BEG_LT, else off-peak tariff Off-peak tariff applies, when BEG_LT < BEG_HT and BEG_LT <= time <= BEG_HT, else on-peak tariff Off-peak tariff applies, when both times are equal. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 49 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Setting the SH_ACT (Sunday or holiday active) input causes the Sunday or holiday tariff to be used for the next day (starting at 00:00). The SH_NUM input is used to set how many consecutive days the Sunday/holiday tariff will remain active before it is switched back to the on-/off-peak tariff. The current work and power limits are displayed at the LIM_W and LIM_P outputs in each case. Quality Code The validity of the CUR_PWR, CUR_VAL,, and EST_VAL input parameters is monitored via their QC_CUR_PWR, QC_CUR_VAL, and QC_EST_VAL quality codes. The same applies to the current power of the individual loads (Px)/their switching feedback (ONx), whose quality codes are connected to the QC_Px or QC_ONx inputs. The quality code of the current power of the individual loads does not influence the choice of loads to be shed. In case of a bad quality code no power credit is granted for accomplishing the difference in power. The following quality code data is evaluated: Quality code = 16#80: Valid value Quality code <> 16#80: Invalid value, external error or simulation Archiving Loading of data from the faceplate is initiated via the inputs S_CFG (overall configuration), S_PRIO (priority list) of the PRE_LMGM block, or when the block limit is exceeded. The PRE_LMGM block sends a request for archiving data via its output structure QREQ_S_ST to the block PRE_UA_S (archive manager for writing). The archive manager informs the load management block that the job has been completed with or without errors via the input structure SND_ST. The output ARCH_OK is set if the job has been saved and can be transferred to the archive manager. ARCH_OK is reset with the next archiving request. A job is time-monitored by the PRE_LMGM block. The number of the archive containing the configuration data of the block instance of the PRE_LMGM is defined at the input parameter ARCH_ID. For this reason, each instance of the PRE_LMGM block must be assigned a unique archive ID ARCH_ID> 0. (If the ARCH_ID has the value 3, for example, the data of the instance is contained in the PRE_LMGM_CONFIG_3 / PR3_LMGM_CONFIG_3, PRE_LMGM_PRIO_3 / PR3_LMGM_PRIO_3 and PRE_LMGM_LIM_3 / PR3_LMGM_LIM_3 archives). 50 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Structure of the user archives The user archive PRE_LMGM_PRIO_x / PR3_LMGM_PRIO_x (Prioritatenliste) has the following data structure: Field name Data type Block parameter Meaning NAME STRING[32] NAMEx Load name CAP FLOAT CAPx Rated power (kW) MODUS INTEGER MODEx Mode PRIO INTEGER PRIOx Priority ROLL_NO INTEGER ROLL_NOx Rolling sequence GRP INTEGER GRPx Group MIN_ON FLOAT MIN_ONx Min. connect time [s] MIN_OFF FLOAT MIN_OFFx Min. disconnect time [s] MAX_OFF FLOAT MAX_OFFx Max. disconnect time [s] MAX_STBY FLOAT MAX_STBY Max. standby power [%] The user archive PRE_LMGM_CONFIG_x / PR3_LMGM_CONFIG_x (configuration) has the following data structure: Field name Data type Block parameter Meaning SRT_T DATE_AND_TIME - Start time of the configuration END_T DATE_AND_TIME - End time of the configuration BEG_HT STRING[8] BEG_HT_S Start time on-peak tariff BEG_LT STRING[8] BEG_LT_S Start time off-peak tariff LIM_W_H FLOAT LIM_W_H Energy limit on-peak tariff [kWh] LIM_P_H FLOAT LIM_P_H Power limit on-peak tariff [kW] LIM_W_L FLOAT LIM_W_L Energy limit off-peak tariff [kWh] LIM_P_L FLOAT LIM_P_L Power limit off-peak tariff [kW] LIM_W_SH FLOAT LIM_W_SH Energy limit holiday tariff [kWh] LIM_P_SH FLOAT LIM_P_SH Power limit holiday tariff [kW] SEL_PW INTEGER SEL_PW 0 = Energy, 1 = Power EN_SHED FLOAT EN_SHED Release for load shedding SETTLE_T FLOAT SETTLE_T Settling time [s] LIM_WRN FLOAT LIM_WRN Warning threshold [%] LIM_ALM FLOAT LIM_ALM Alarm threshold [%] HYS_PW FLOAT HYS_PW Hysteresis start value [%] HYS_T FLOAT HYS_T Hysteresis time range [s] SUPP_T FLOAT SUPP_T Suppression time [min] NAME STRING * NAMEx Load CAP FLOAT CAPx Rated power (kW) MODUS INTEGER MODUSx Mode SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 51 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Field name Data type Block parameter Meaning PRIO ROLL_NO INTEGER PRIOx Priority INTEGER ROLL_NOx Rolling sequence GRP INTEGER GRPx Group MIN_ON FLOAT MIN_ONx Min. connect time [s] MIN_OFF FLOAT MIN_OFFx Min. disconnect time [s] MAX_OFF FLOAT MAX_OFFx Max. disconnect time [s] MAX_STBY FLOAT MAX_STBYx Max. standby power [%] CONFIG_ID INTEGER - Configuration ID * PRE_LMGM_CONFIG_x: y = 32, PR3_LMGM_CONFIG_X: y = 12 The user archive PRE_LMGM_LIM_x / PR3_LMGM_LIM_x (limit violations) has the following data structure: Field name Data type Block parameter Meaning DATE_TIME DATE_AND_TIME LT_DT Local time LIM_W FLOAT LT_LIM_W Work limit of last period LIM_P FLOAT LT_LIM_P Power limit of last period W FLOAT LT_W Work in the last period P FLOAT LT_P Average power in the last period SHED_POS FLOAT LT_SHED_POS Number of loads which could be shed at end of last period P_SHED_POS FLOAT LT_P_SHED_POS Power of loads which could be shed at end of last period LOAD_SHED FLOAT LT_LOAD_SHED Number of switched-off loads at the end of the period P_SHED FLOAT LT_P_SHED Power of the switched-off loads at the end of the period Archiving in the case of limit violations When a limit is violated, an archiving request is issued at the end of the synchronization period. The load management block calculates and saves the time of the limit violation. The current values archived in the user archive at the time of the limit violation are copied to their own outputs beginning with "LT_" (for LAST). Archiving of the configuration All the configuration data (tariffs, general parameters and priority list) is saved under a configuration ID (CONFIG_ID) in the user archive PRE_LMGM_CONFIG_x / PR3_LMGM_CONFIG_x. Every time the configuration is saved, the configuration ID is incremented by 1 up to the value of the input CFG_MAX. Following this, the configuration is overwritten with ID 1. Each saved configuration contains the times at which the configuration was valid. Saving of the configuration in the user archive is initiated either by the user from the faceplate view "Configuration" by pressing the "Load from PLC" button, or automatically after the tariff data, general parameters, or the priority list have been loaded into the controller. 52 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management When opening the "Configuration" faceplate view, the currently valid configuration is selected. Older configurations that can also be loaded into the controller (see below) are displayed by deleting or modifying the selection criterion. Downloading the configuration to the controller Configuration data can be transferred to the controller from the faceplate views "Parameters", "Tariffs", "Edit Priolist" and "Configuration". With the "Save" button in the "Parameters" or "Tariffs" views, the data entered in the faceplate is written to the user archive PRE_LMGM_CONFIG_x / PR3_LMGM_CONFIG_x and transferred from there to the controller. If the "Parameters" or "Tariffs" views are closed before saving the data, changes made here are lost, while the data in the "Edit Priolist" and "Configuration" views in the user archives is retained but not transferred to the controller. Loading of data from the faceplate is initiated via the inputs R_CFG (overall configuration), R_PARA (parameters), R_TARIFF (tariffs) or R_PRIO (priority list) of the PRE_LMGM block. The PRE_LMGM block issues a request for reading data via its output structure QREQ_R_ST to the PRE_UA_R block (archive manager for reading). The archive manager informs the load management block that the job has been completed with or without errors via the input structure RCV_ST. The NDR output is set when new data has been received. NDR is reset with the next request for reading data. A job is time-monitored by the PRE_LMGM block. The number of the archive from which the configuration data of the block instance of PRE_LMGM is read is defined at the input parameter ARCH_ID. For this reason, each instance of the PRE_LMGM block must be assigned a unique archive ID ARCH_ID> 0. (If the ARCH_ID has the value 3, for example, the data of the instance is contained in the PRE_LMGM_CONFIG_3, 3 / PR3_LMGM_CONFIG_3, PRE_LMGM_PRIO_3 / PR3_LMGM_PRIO_3 and PRE_LMGM_LIM_3 / PR3_LMGM_LIM_3 archives). Every time configuration data is loaded, the current configuration is automatically saved in the configuration archive (PRE_LMGM_CONFIG_x / PR3_LMGM_CONFIG_x). Loads and load management on different PLCs If loads and load management are running on different PLCs, the current load power (Px, QC_Px)/current switching state (ONx, QC_ONx) must be transferred to the controller on which the PRE_LMGM / PR3_LMGM block is running, and information relating to releasing/shedding (QONx output) transferred to the controller on which the load is running. The PRE_AS_SEND / PRE_AS_RECV (send/receive block for AS-to-AS communication) and PRE_SND_H / PRE_RCV_H (send/receive block for AS-4xxH to AS-400 communication) blocks and PRE_GET / PR3_GET (AS-to-AS communication with S7-300) supplied can be used for communication purposes. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 53 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management 3.6.4 Message behavior PRE_LMGM PRE_LMGM issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID1 1 QLIM_WRN Warning approaching of limit @1 %.2f@ kWh/@3 %.2f@ kW (limit @2 %.2f@ kWh/@4 %.2f@ kW) WH 2 QLIM_ALM Alarm approaching of limit @1 %.2f@ kWh/@3 %.2f@ kW (limit @2 %.2f@ kWh/@4 %.2f@ kW) AH 3 QLIM_ERR Exceeding of limit:: @5 %.2f@ kWh/@6 %.2f@ kW (limit @2 %.2f@ kWh/@4 %.2f@ kW) AH 4 QSHED_IMP No load available to shed AH 5 QLMGM_OFF Load management deactivated AH 6 QELD_PARA Monitoring error while loading parameters AH 7 QLIM_E Invalid limit AH 8 QP_ERR Invalid supply power AH 1 - Reserved - 2 - Reserved - 3 - Reserved - 4 - Reserved - 5 QPRIO_LST_E Invalid priority list AH 6 QPARAMF Parameterization error communication PLC pr ctrl failure 7 QERR_R Invalid data from loading parameters PLC pr ctrl failure 8 QERR_S Invalid data archiving PLC pr ctrl failure 1 QMONERR_S Monitoring error archiving PLC pr ctrl failure 2 QOVL_LIM Overflow of user archive for limit exceedings PLC pr ctrl failure 3 - Free - 4 - Free - 5 - Free - 6 - Free - 7 - Free - MSG_EVID2 MSG_EVID3 MSG_EVID4 54 8 - Free - 1 QSHED Load @1%s@ has been shed Status PLC 2 QFREE Load @2%s@ has been enabled Status PLC 3 - Free - 4 - Free - SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Message block Message number Block parameter Message text Message class 5 - Free - 6 - Free - 7 - Free - 8 - Free - The ALARM_8P auxiliary values are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID1 1 EST_VAL Estimated energy value at end of synchronization period 2 HYS_LIMW Current work limit, taking the hysteresis into account 3 EST_PWR Average power value at end of synchronization period 4 HYS_LIMP Current, average power limit, taking the hysteresis into account 5 LAST_VAL Last archived, accumulated work value 6 AVG_PWR Average power at end of period 7 - Free 8 - Free 9 - Free 10 - Free MSG_EVID2 MSG_EVID3 The NOTIFY_8P auxiliary values are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID4 1 NAMEx Name of the load which has been shed 2 NAMEx Name of the load which has been enabled 3 - Free 4 - Free 5 - Free 6 - Free 7 - Free 8 - Free 9 - Free 10 - Free SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 55 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management PR3_LMGM PR3_LMGM issues the following messages: Message block Message number Block parameter Message text Message class MSGEVID1 1 QLIM_WRN Warning approaching of limit @1 %.2f@ kW WH MSGEVID2 1 QLIM_ALM Alarm approaching of limit @1 %.2f@ kW AH MSGEVID3 1 QLIM_ERR Limit @1 %.2f@ kW AH MSGEVID4 1 QSHED_IMP No load available to shed AH MSGEVID5 1 QLMGM_OFF Load management deactivated AH MSGEVID6 1 QELD_PARA Monitoring error while loading parameters AH MSGEVID7 1 QLIM_E Invalid limit AH MSGEVID8 1 QP_ERR Invalid supply power AH MSGEVID9 1 - Reserved - MSGEVID10 1 - Reserved - MSGEVID11 1 - Reserved - MSGEVID12 1 - Reserved - MSGEVID13 1 QPRIO_LST_E Invalid priority list AH MSGEVID14 1 QSHED Load @1%s@ has been shed Status PLC MSGEVID15 1 QFREE Load @2%s@ has been enabled Status PLC MSGEVID16 1 QPARAMF Parameterization error communication PLC pr ctrl failure MSGEVID17 1 QERR_R Invalid data from loading parameters PLC pr ctrl failure MSGEVID18 1 QERR_S Invalid data archiving PLC pr ctrl failure MSGEVID19 1 QMONERR_S Monitoring error archiving PLC pr ctrl failure MSGEVID20 1 QOVL_LIM Overflow of user archive for limit exceedings PLC pr ctrl failure 56 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management The auxiliary values of the ALARM_DQ / ALARM_D blocks are assigned as follows: Message block Auxiliary value Parameter Meaning MSGEVID1 1 EST_PWR Average power value at end of synchronization period MSGEVID2 1 EST_PWR Average power value at end of synchronization period MSGEVID3 1 AVG_PWR Average power at end of period MSGEVID4 1 - Free MSGEVID5 1 - Free MSGEVID6 1 - Free MSGEVID7 1 - Free MSGEVID8 1 - Free MSGEVID9 1 - Free MSGEVID10 1 - Free MSGEVID11 1 - Free MSGEVID12 1 - Free MSGEVID13 1 - Free MSGEVID14 1 NAMEx Name of the load which has been shed MSGEVID15 1 NAMEx Name of the load which has been enabled MSGEVID16 1 - Free MSGEVID17 1 - Free MSGEVID18 1 - Free MSGEVID19 1 - Free MSGEVID20 1 - Free 3.6.5 Error behavior Validity of input parameters If the associated quality codes detect an invalid value at the CUR_PWR, CUR_VAL, or EST_VAL input parameters, an "Invalid supply power" message is issued and load management is switched off. An invalid value for load feedback will mean that, if the load is shed, no power will be used to compensate the difference in power for this load. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 57 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Switching load management off Behavior of the PRE_LMGM / PR3_LMGM block in the event of an error, i.e. if load management needs to be switched off: Load control remains in its current state until the end of the period, i.e. it is not connected or disconnected any more. However, the user can still perform a manual release/hold operation. If the error is still present once the period has ended, all loads are released, taking their hold times into account. If a trend can be calculated, this calculation is also performed and displayed. No overshoot alarms/warnings are issued, however. Parameterization error A parameterization error QPARAMF is generated when The monitoring time T_OUT_LD is 0 ID 0 ARCH_ID 0 or ARCH_ID not available, or The archive manager block for reading or writing signals ID QARCHERR when the block ID agrees If the monitoring time is incorrect, a new request cannot be generated. Error in communication with WinCC user archives The QERR_R / QERR_S output is set when A read or write request has been issued to the archive manager and the parameters ID, JOB_ID and ARCH_ID do not agree between the request and the response of the archive manager. The QERR_R / QERR_S output is not reset until a new request is pending or until the request agrees with the job data when the job is repeated (COUNT > 0). If a valid response is not received from the archive manager within the monitoring time, the error output QELD_PARA / QMONERR_S is set. At the COUNT input, a number of job repetitions can be set before the occurred errors are output. If, for example, a monitoring time of 10 seconds is set and COUNT = 1, the monitoring error is not signaled until 20 seconds have elapsed. The parameterization error is an exception to this. This error is signaled immediately. All errors remain pending until a new request is transmitted. A job is always repeated when one of the errors described above has occurred. 58 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management 3.6.6 Start-up characteristics After a CPU restart, the PRE_SUM / PR3_SUM block does not provide a valid supply power at its CUR_VAL output until after the first synchronization pulse. Until this point, load management is not performed. The following applies between a restart and the first synchronization pulse: All loads are released (QONx = TRUE). The time since the loads were released (EN_Tx) starts at 0. This time forms the basis for the minimum connect time. The outputs for limits which take the hysteresis into account (HYS_LIMW and HYS_LIMP) do not themselves take any hysteresis into account. All messages have the "sent" state. The balance time in the current period (BAL_TM and BAL_TS) is set to 0. The differences in work and power are set to 0. The available connection and disconnection power (P_ON and P_SHED) and the number of loads to be disconnected and connected (EN_POS and SHED_POS) are calculated now. The number of shed loads (LOAD_SHED) is 0. The available connection and disconnection work (W_ON and W_SHED) is set to 0, as the period's balance time is not known. The average power/work of the last period (LT_P and LT_W) is set to 0. Flags for last rolling load (LAST_ROLLx) are set to 0. If necessary, the processes of editing and downloading a configuration from the faceplate are aborted (CFG_EDIT = FALSE and CFG_LOAD = FALSE). The remaining suppression time after the start of the period and settling time after load shedding (QSUPP_T and QSETTLE_T) are set to 0. The following also applies after restart: The error outputs are reset. The output structures QREQ_R_ST and QREQ_S_ST for the read and write requests from/to user archives are reset. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 59 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management 3.6.7 Block parameter PRE_LMGM General data Item Data type Type Meaning HMI BAL_TM INT O Period's balance time in minutes + BAL_TS INT O Period's balance time in seconds + CUR_TS DT I Current time stamp when block is called DIFF_LOC REAL O Difference between UTC and local time in [h] MAX_LOAD INT IO Number of the highest input, which is connected to a load MSG_ACKx WORD O Messages acknowledged, ALARM_8P block x (x = 1 ... 3) MSG_EVIDx DWORD I Event ID x (x = 1 ... 4) of message block ALARM_8P / NOTIFY_8P MSG_LOCK BOOL I 1 = Message suppression active MSG_STATx WORD O MESSAGE x (x = 1 ... 4): STATUS Output QMSG_ERR BOOL O 1 = ALARM_8P / NOTIFY_8P Error QMSG_SUP BOOL O 1 = Message suppression RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SYNC_P BOOL I Synchronization pulse SYNC_PER REAL I Synchronization period in [s] + + Infeed Item Data type Type Meaning AVG_PWR REAL I Average power at end of synchronization period HMI CUR_PWR REAL I Current power at end of acquisition period + CUR_PWRHR REAL I Bar graph upper limit, current power + CUR_VAL REAL I Current integrated value + CUR_VALHR REAL I Bar graph upper limit, current accumulated energy value + EST_PWR REAL I Average power by end of acquisition period + EST_VAL REAL I Probable value by end of acquisition period + LAST_VAL REAL I Last archived, accumulated value + P_DIFFHLR REAL I Bar graph upper limit, difference in power + QC_AVG_PWR BYTE I Quality code for AVG_PWR QC_CUR_PWR BYTE I Quality code for CUR_PWR QC_CUR_VAL BYTE I Quality code for CUR_VAL QC_EST_PWR BYTE I Quality code for EST_PWR QC_EST_VAL BYTE I Quality code for EST_VAL 60 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Data type Type Meaning QC_LAST_VAL BYTE I Quality code for LAST_VAL W_DIFFHLR REAL I Bar graph upper limit, difference in work HMI + Load data Item Data type Type Meaning CAPx REAL I Rated power of the load x (x = 01 ... 10, 25, 50, 75 or 100) DUMMY_IN STRUCT I Internal structure HMI DUMMY_PARA STRUCT I Internal structure DUMMY_OUT STRUCT O Internal structure EN_SHEDx BOOL I 1 = Load x (x = 01 ... 10, 25, 50, 75 or 100) is in load management mode EN_Tx REAL O Time elapsed since load x was released x (x = 01 ... 100) + GR_NAMEx STRING[32] I Name of load group x (x = 01 ... 20) + GRPx BYTE I Allocation of the load x (x = 01 ... 10, 25, 50, 75 or 100) to a load group LAST_ROLLx BOOL I Load x (x = 01 ... 10, 25, 50, 75 or 100): 1 = Last disconnected, rolling load MAN_ENx BOOL I Manual mode (MANx = TRUE): 0 = Disable, 1 = Release + MANx BOOL I 1 = load x (x = 01 ... 100) is in manual mode + MAX_OFFx REAL I Maximum disconnect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MAX_STBYx REAL I Maximum standby power as a percentage of rated power of the load x (x = 01 ... 10, 25, 50, 75 or 100) MIN_OFFx REAL I Minimum disconnect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MIN_ONx REAL I Minimum connect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MODEx BYTE I Type of load x (x = 01 ... 100): 0 = No load present, 1 = Actual power of the load is connected to the Px input 2 = Switching state of the load is connected at the ONx input 3 = Only the load's rated power is known NAMEx STRING[32] I Name of load x (x = 01 ... 100) ONx BOOL I 1=Load x (x=01..100) is enabled with rated power CAPx PRIOLSTx DWORD I Priority list for load shedding entry x (x = 01 ... 10, 25, 50, 75 or 100) PRIOx BYTE I Priority of the load x (x = 01 ... 10, 25, 50, 75 or 100) (1 = highest priority) Px REAL I Current power of the load x (x = 01 ... 10, 25, 50, 75 or 100) QC_ONx BYTE I Quality code for ONx QC_Px BYTE I Quality code for Px QMAX_OFFx BOOL O 1 = Maximum disconnect time for load x has not yet elapsed (x=01..100) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + + + 61 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Data type Type Meaning HMI QMIN_OFFx BOOL O 1 = Minimum disconnect time for load x has not yet elapsed (x=01..100) + QMIN_ONx BOOL O 1 = Minimum connect time for load x has not yet elapsed (x=01..100) + QMSG_OFFx BOOL O 1 = Hold message is sent to WinCC (x = 01 ... 10, 25, 50, 75 or 100) QMSG_ONx BOOL O 1 = Release message is sent to WinCC (x = 01 ... 10, 25, 50, 75 or 100) QONx BOOL O 1=Load x is released, 0=Load x is shed (x=01..100) ROLLx BYTE I Load x (x = 01 ... 100): Number for rolling load SHED_Tx REAL O Time elapsed since load x was held (x=01..100) + + Load control Item Data type Typ e Meaning HMI Dx BOOL I Internal tag (x = 101 ... 107 and 201 ... 207) EN_POS INT O Number of loads which can be connected EN_SHED BOOL I Load shedding release (loads disconnected) HYS_LIMP REAL O Current, average power limit, taking the hysteresis into account + HYS_LIMW REAL O Current work limit, taking the hysteresis into account: If HYS_LIMW < EST_VAL load shedding is performed + HYS_PW REAL I Hysteresis starting value as a [%] of the power or work maximum at the start of a period HYS_T REAL I Time after start of the period after which no hysteresis is to be taken into account any longer [min] LIM_ALM REAL I Limit for alarm message indicating a limit is about to be exceeded as a [%] of LIM_W or LIM_P LIM_P REAL O Current power limit without hysteresis + LIM_W REAL O Current work limit without hysteresis + LIM_WRN REAL I Limit for warning message indicating a limit is about to be exceeded as a [%] of LIM_W or LIM_P LOAD_SHED INT O Number of shed loads by load management LT_DT DT O Time stamp of last limit violation LT_LIM_P REAL O Power limit of last period with limit violation LT_LIM_W REAL O Work limit of last period with limit violation LT_LOAD_SHED DINT O Number of shed loads at end of last period with limit violation LT_P* REAL O Average power of last period with limit violation LT_P_SHED* REAL O Power of shed loads at end of last period with limit violation LT_P_SHED_POS* REAL O Power of sheddable loads at end of last period with limit violation LT_SHED_POS* DINT O Number of sheddable loads at end of last period with limit violation LT_W* REAL O Average work of the last period P_DIFF REAL O Difference in power: HYS_LIMP - EST_PWR + P_ON_POS REAL O Available connection power + P_SHED REAL O Shed power 62 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Data type Typ e Meaning HMI P_SHED_POS REAL O Available disconnection power + QC_W_DIFF BYTE O Quality code for W_DIFF QC_P_DIFF BYTE O Quality code for P_DIFF QFREE BOOL O Load has been released QLIM_ALM BOOL O Alarm indicating a limit is about to be exceeded QLIM_E BOOL O Invalid limit QLIM_ERR BOOL O Limit overshoot QLIM_WRN BOOL O Warning indicating a limit is about to be exceeded QLMGM_OFF BOOL O 1 = Load management deactivated QP_ERR BOOL O Invalid supply power QPRIO_LST_E BOOL O 1 = Errored priority list QSETTLE_T REAL O Remaining settling time after load shedding/release in [s] QSHED BOOL O Load has been held QSHED_IMP BOOL O No load available to shed QSUPP_T REAL O Remaining suppression time after start of period in [s] SEL_PW BOOL I Limit selector: + + 0=Setting of maximum average power (LIM_P_H, LIM_P_L, and LIM_P_SH) within a period 1=Setting of maximum work (LIM_W_H, LIM_W_L, and LIM_W_SH) within a period SETTLE_T REAL I Settling time [s] SHED_POS INT O Number of loads which can be switched SUPP_T REAL I Suppression time [min] W_DIFF REAL O Difference in work: HYS_LIMW - EST_VAL + W_ON_POS REAL O Available connection work + W_SHED_POS REAL O Available disconnection work + *These parameters are not evaluated or supplied in this version. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 63 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Tariffs Item Data type Type Meaning HMI ADJ_D_H* DWORD I Date on which the automatic on-peak tariff adjustment ends in [ddmmyyyy] + ADJ_D_L* DWORD I Date on which the automatic off-peak tariff adjustment ends in [ddmmyyyy] + ADJ_D_SH* DWORD I Date on which the automatic Sunday and holiday tariff adjustment ends in [ddmmyyyy] + ADJ_LIM* BOOL I Limits adjusted automatically in the event of an overshoot + ADJ_TEOM* BOOL I 1 = The ADJ_TIME time does not start until the end of the month following limit adjustment + ADJ_TIME* INT I Time in [months] for which a limit is valid following automatic adjustment + ADJ_VAL* REAL I Percentage by which the limit is adjusted automatically following an + overshoot BEG_HT DINT I Start time for on-peak tariff (local time) [ms] BEG_HT_S STRING[8] I Start time for on-peak tariff (local time) [ms] as string BEG_LT DINT I Start time for off-peak tariff (local time) [ms] BEG_LT_S STRING[8] I Start time for off-peak tariff (local time) [ms] as string EN_SCHEDULE* BOOL I 1 = Load management active according to schedule L_LIM_P REAL I Configurable power limit L_LIM_W REAL I Configurable work limit LIM_L BOOL I 1 = Configurable limits (L_LIM_P/L_LIM_W) active LIM_P_H REAL IO Power limit for on-peak tariff LIM_P_L REAL IO Power limit for off-peak tariff LIM_P_SH REAL IO Power limit for Sunday or holiday tariff LIM_W_H REAL IO Work limit for on-peak tariff LIM_W_L REAL IO Work limit for off-peak tariff LIM_W_SH REAL IO Work limit for Sunday or holiday tariff NT_END_D* REAL I End date for next period in [ddmmyyyy] + + NT_END_D* REAL I End time for next period in [hhmm] + NT_P* REAL I Maximum average power for next period + NT_SRT_D* REAL I Start date for next period in [ddmmyyyy] + NT_SRT_T* REAL I Start time for next period in [hhmm] + QADJ_LIM_H* BOOL O 1 = Automatic on-peak tariff adjustment executed + QADJ_LIM_L* BOOL O 1 = Automatic off-peak tariff adjustment executed + QADJ_LIM_SH* BOOL O 1 = Automatic Sunday and holiday tariff adjustment executed + QNXT_LE* BOOL O No limit for next period + SH_ACT BOOL IO 1 = Sunday or holiday tariff active + SH_NUM INT IO Number of days for which the Sunday and holiday tariff is valid if SH_ACT = TRUE + *These parameters are not evaluated or supplied in this version. 64 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Archiving Item Data type Type Meaning ARCH_ID INT I Archive ID ARCH_OK BOOL O Job completion Ok HMI CFG_CUR INT I ID of the current configuration in the user archive + CFG_EDIT BOOL I 1 = Configuration being processed + CFG_MAX INT I Maximum number of configurations in the user archive + CFG_READ INT I ID of the configuration to be read in the user archive COUNT INT I Number of job repetitions ID INT I Block ID; unique number for this block NDR BOOL O Receive new data QARCH_ID INT O Archive ID QELD_PARA BOOL O Monitoring error while loading parameters QERR_R BOOL O Group error - receive job QERR_S BOOL O Group error send job QMONERR_S BOOL O Monitoring error send job QMSG_ERR BOOL O 1 = Signal generation error QREQ_ACT BOOL O Request pending QREQ_R_ST UDT_PRE_REV_REQ O Request structure for receive request to archive manager QREQ_S_ST UDT_PRE_SND_REQ O Request structure for send request to archive manager QOVL_LIM BOOL O Overflow user archive limit violation QPARAMF BOOL O Parameterization error QT_LD REAL O Remaining time for loading parameters R_CFG BOOL IO 1 = Read all configuration data + R_PARA BOOL IO 1 = Read parameter + R_TARIFF BOOL IO 1 = Read tariffs + R_PRIO BOOL IO 1 = Read priority list + RCV_ST UDT_PRE_RCV I Checkback signals from the receive job of the archive manager SCHED_CUR* INT IO ID of the data record from the PRE_SCHEDULE user archive, which contains the currently valid limits S_CFG BOOL IO 1 = Send all configuration data S_PRIO BOOL IO 1 = Send priority list SND_ST UDT_PRE_SND I Checkback signals from the send job of the archive manager T_OUT_LD REAL I Timeout for loading parameters + *These parameters are not evaluated or supplied in this version. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 65 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management PR3_LMGM General data Item Data type Type Meaning HMI BAL_TM INT O Period's balance time in minutes + BAL_TS INT O Period's balance time in seconds + CMP_ID DWORD I Component identifier for ALARM_DQ CUR_TS DT I Current time stamp when block is called DIFF_LOC REAL I Difference between UTC and local time in [h] + + MAX_LOAD INT IO Number of the highest input, which is connected to a load MSG_ACKx BOOL O Messages acknowledged, ALARM_DQ block x (x = 1 ... 16) MSGEVIDx DWORD I Event ID x (x = 1 ... 16) of message block ALARM_DQ / ALARM_D MSGSTATx WORD O MESSAGE x (x = 1 ... 16): STATUS output QMSG_ERR BOOL O 1 = ALARM_DQ / ALARM_D Error QMSG_SUP BOOL O 1 = Message suppression RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SYNC_P BOOL I Synchronization pulse SYNC_PER REAL I Synchronization period in [s] + Infeed Item Data type Type Meaning AVG_PWR REAL I Average power at end of synchronization period HMI CUR_PWR REAL I Current power at end of acquisition period + CUR_PWRHR REAL I Bar graph upper limit, current power + CUR_VAL REAL I Current integrated value + CUR_VALHR REAL I Bar graph upper limit, current accumulated energy value + EST_PWR REAL I Average power by end of acquisition period + EST_VAL REAL I Probable value by end of acquisition period + LAST_VAL REAL I Last archived, accumulated value + P_DIFFHLR REAL I Bar graph upper limit, difference in power + QC_AVG_PWR BYTE I Quality code for AVG_PWR QC_CUR_PWR BYTE I Quality code for CUR_PWR QC_CUR_VAL BYTE I Quality code for CUR_VAL QC_EST_PWR BYTE I Quality code for EST_PWR QC_EST_VAL BYTE I Quality code for EST_VAL QC_LAST_VAL BYTE I Quality code for LAST_VAL W_DIFFHLR REAL I Bar graph upper limit, difference in work 66 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Load data Item Data type Type Meaning CAPx REAL I Rated power of the load x (x = 01 ... 10, 25, 50, 75 or 100) DUMMY_IN STRUCT I Internal structure HMI DUMMY_PARA STRUCT I Internal structure DUMMY_OUT STRUCT O Internal structure EN_SHEDx BOOL I 1 = Load x (x = 01 ... 10, 25, 50, 75 or 100) is in load management mode EN_Tx REAL O Time elapsed since load x was released x (x = 01 ... 100) + GR_NAMEx STRING[32] I Name of load group x (x = 01 ... 20) + GRPx BYTE I Allocation of the load x (x = 01 ... 10, 25, 50, 75 or 100) to a load group LAST_ROLLx BOOL I Load x (x = 01 ... 10, 25, 50, 75 or 100): 1 = Last disconnected, rolling load MAN_ENx BOOL I Manual mode (MANx = TRUE): 0 = Disable, 1 = Release + MANx BOOL I 1 = load x (x = 01 ... 100) is in manual mode + MAX_OFFx REAL I Maximum disconnect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MAX_STBYx REAL I Maximum standby power as a percentage of rated power of the load x (x = 01 ... 10, 25, 50, 75 or 100) MIN_OFFx REAL I Minimum disconnect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MIN_ONx REAL I Minimum connect time of the load x (x = 01 ... 10, 25, 50, 75 or 100) in [s] MODEx BYTE I Type of load x (x = 01 ... 100): 0 = No load present, 1 = Actual power of the load is connected to the Px input 2 = Switching state of the load is connected at the ONx input 3 = Only the load's rated power is known NAMEx STRING[12] I Name of load x (x = 01 ... 100) ONx BOOL I 1=Load x (x=01..100) is enabled with rated power CAPx PRIOLSTx DWORD I Priority list for load shedding entry x (x = 01 ... 10, 25, 50, 75 or 100) PRIOx BYTE I Priority of the load x (x = 01 ... 10, 25, 50, 75 or 100) (1 = highest priority) Px REAL I Current power of the load x (x = 01 ... 10, 25, 50, 75 or 100) + + QC_ONx BYTE I Quality code for ONx QC_Px BYTE I Quality code for Px QMAX_OFFx BOOL O 1 = Maximum disconnect time for load x has not yet elapsed (x=01..100) + QMIN_OFFx BOOL O 1 = Minimum disconnect time for load x has not yet elapsed (x = 01..100) + QMIN_ONx BOOL O 1 = Minimum connect time for load x has not yet elapsed (x = 01..100) + QMSG_OFFx BOOL O 1 = Hold message is sent to WinCC (x = 01 ... 10, 25, 50, 75 or 100) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 67 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Data type Type Meaning HMI QMSG_ONx BOOL O 1 = Release message is sent to WinCC (x = 01 ... 10, 25, 50, 75 or 100) QONx BOOL O 1 = Load x is released, 0 = Load x is shed (x = 01 ... 100) ROLLx BYTE I Load x (x = 01 ... 100): Number for rolling load SHED_Tx REAL O Time elapsed since load x was held (x = 01..100) + + Load control Item Data type Typ e Meaning HMI Dx BOOL I Internal tag (x = 101 ... 107 and 201 ... 207) EN_POS INT O Number of loads which can be connected EN_SHED BOOL I Load shedding release (loads disconnected) HYS_LIMP REAL O Current, average power limit, taking the hysteresis into account + HYS_LIMW REAL O Current work limit, taking the hysteresis into account: If HYS_LIMW < EST_VAL load shedding is performed + HYS_PW REAL I Hysteresis starting value as a [%] of the power or work maximum at the start of a period HYS_T REAL I Time after start of the period after which no hysteresis is to be taken into account any longer [min] LIM_ALM REAL I Limit for alarm message indicating a limit is about to be exceeded as a [%] of LIM_W or LIM_P LIM_P REAL O Current power limit without hysteresis + LIM_W REAL O Current work limit without hysteresis + LIM_WRN REAL I Limit for warning message indicating a limit is about to be exceeded as a [%] of LIM_W or LIM_P LOAD_SHED INT O Number of shed loads by load management LT_DT DT O Time stamp of last limit violation LT_LIM_P REAL O Power limit of last period with limit violation LT_LIM_W REAL O Work limit of last period with limit violation LT_LOAD_SHED DINT O Number of shed loads at end of last period with limit violation LT_P* REAL O Average power of last period with limit violation LT_P_SHED* REAL O Power of shed loads at end of last period with limit violation LT_P_SHED_POS* REAL O Power of sheddable loads at end of last period with limit violation LT_SHED_POS* DINT O Number of sheddable loads at end of last period with limit violation LT_W* REAL O Average work of the last period P_DIFF REAL O Difference in power: HYS_LIMP - EST_PWR + P_ON_POS REAL O Available connection power + P_SHED REAL O Shed power P_SHED_POS REAL O Available disconnection power QC_W_DIFF BYTE O Quality code for W_DIFF QC_P_DIFF BYTE O Quality code for P_DIFF QFREE BOOL O Load has been released 68 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Data type Typ e Meaning QLIM_ALM BOOL O Alarm indicating a limit is about to be exceeded QLIM_E BOOL O Invalid limit QLIM_ERR BOOL O Limit overshoot QLIM_WRN BOOL O Warning indicating a limit is about to be exceeded QLMGM_OFF BOOL O 1 = Load management deactivated QP_ERR BOOL O Invalid supply power QPRIO_LST_E BOOL O 1 = Errored priority list QSETTLE_T REAL O Remaining settling time after load shedding/release in [s] QSHED BOOL O Load has been held QSHED_IMP BOOL O No load available to shed QSUPP_T REAL O Remaining suppression time after start of period in [s] SEL_PW BOOL I Limit selector: HMI + + 0=Setting of maximum average power (LIM_P_H, LIM_P_L, and LIM_P_SH) within a period 1=Setting of maximum work (LIM_W_H, LIM_W_L, and LIM_W_SH) within a period SETTLE_T REAL I Settling time [s] SHED_POS INT O Number of loads which can be switched SUPP_T REAL I Suppression time [min] W_DIFF REAL O Difference in work: HYS_LIMW - EST_VAL + W_ON_POS REAL O Available connection work + W_SHED_POS REAL O Available disconnection work + *These parameters are not evaluated or supplied in this version. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 69 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Tariffs Item Data type Type Meaning HMI ADJ_D_H* DWORD I Date on which the automatic on-peak tariff adjustment ends in [ddmmyyyy] + ADJ_D_L* DWORD I Date on which the automatic off-peak tariff adjustment ends in [ddmmyyyy] + ADJ_D_SH* DWORD I Date on which the automatic Sunday and holiday tariff adjustment ends in [ddmmyyyy] + ADJ_LIM* BOOL I Limits adjusted automatically in the event of an overshoot + ADJ_TEOM* BOOL I 1 = The ADJ_TIME time does not start until the end of the month following limit adjustment + ADJ_TIME* INT I Time in [months] for which a limit is valid following automatic adjustment + ADJ_VAL* REAL I Percentage by which the limit is adjusted automatically following an + overshoot BEG_HT DINT I Start time for on-peak tariff (local time) [ms] BEG_HT_S STRING[8] I Start time for on-peak tariff (local time) [ms] as string BEG_LT DINT I Start time for off-peak tariff (local time) [ms] BEG_LT_S STRING[8] I Start time for off-peak tariff (local time) [ms] as string EN_SCHEDULE* BOOL I 1 = Load management active according to schedule L_LIM_P REAL I Configurable power limit L_LIM_W REAL I Configurable work limit LIM_L BOOL I 1 = Configurable limits (L_LIM_P/L_LIM_W) active LIM_P_H REAL IO Power limit for on-peak tariff LIM_P_L REAL IO Power limit for off-peak tariff LIM_P_SH REAL IO Power limit for Sunday or holiday tariff LIM_W_H REAL IO Work limit for on-peak tariff LIM_W_L REAL IO Work limit for off-peak tariff LIM_W_SH REAL IO Work limit for Sunday or holiday tariff NT_END_D* REAL I End date for next period in [ddmmyyyy] + + NT_END_D* REAL I End time for next period in [hhmm] + NT_P* REAL I Maximum average power for next period + NT_SRT_D* REAL I Start date for next period in [ddmmyyyy] + NT_SRT_T* REAL I Start time for next period in [hhmm] + QADJ_LIM_H* BOOL O 1 = Automatic on-peak tariff adjustment executed + QADJ_LIM_L* BOOL O 1 = Automatic off-peak tariff adjustment executed + QADJ_LIM_SH* BOOL O 1 = Automatic Sunday and holiday tariff adjustment executed + QNXT_LE* BOOL O No limit for next period + SH_ACT BOOL IO 1 = Sunday or holiday tariff active + SH_NUM INT IO Number of days for which the Sunday and holiday tariff is valid if SH_ACT = TRUE + *These parameters are not evaluated or supplied in this version. 70 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Archiving Item Data type Type Meaning ARCH_ID INT I Archive ID ARCH_OK BOOL O Job completion Ok HMI CFG_CUR INT I ID of the current configuration in the user archive + CFG_EDIT BOOL I 1 = Configuration being processed + CFG_MAX INT I Maximum number of configurations in the user archive + CFG_READ INT I ID of the configuration to be read in the user archive COUNT INT I Number of job repetitions ID INT I Block ID; unique number for this block NDR BOOL O Receive new data QARCH_ID INT O Archive ID QELD_PARA BOOL O Monitoring error while loading parameters QERR_R BOOL O Group error - receive job QERR_S BOOL O Group error send job QMONERR_S BOOL O Monitoring error send job QMSG_ERR BOOL O 1 = Signal generation error QREQ_ACT BOOL O Request pending QREQ_R_ST UDT_PRE_REV_REQ O Request structure for receive request to archive manager QREQ_S_ST UDT_PRE_SND_REQ O Request structure for send request to archive manager QOVL_LIM BOOL O Overflow user archive limit violation QPARAMF BOOL O Parameterization error QT_LD REAL O Remaining time for loading parameters R_CFG BOOL IO 1 = Read all configuration data + R_PARA BOOL IO 1 = Read parameter + R_TARIFF BOOL IO 1 = Read tariffs + R_PRIO BOOL IO 1 = Read priority list + RCV_ST UDT_PRE_RCV I Checkback signals from the receive job of the archive manager SCHED_CUR* INT IO ID of the data record from the PRE_SCHEDULE user archive, which contains the currently valid limits S_CFG BOOL IO 1 = Send all configuration data S_PRIO BOOL IO 1 = Send priority list SND_ST UDT_PRE_SND I Checkback signals from the send job of the archive manager T_OUT_LD REAL I Timeout for loading parameters + *These parameters are not evaluated or supplied in this version. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 71 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management 3.6.8 Description of icon and faceplate Block icon The following parameters are displayed: Item Parameter Description Power - Trend EST_PWR The calculated trend at the end of the period Limit HYS_LIMP The currently valid limit Faceplate The faceplate available is described in this chapter. The following views are available: Overview OVERVIEW Standard STANDARD Energy ENERGY Parameters PARAMETERS Bar para. BAR_PARA Tariffs TARIFFS Priority list PRIOLIST Edit list of prio EDITPRIOLIST Configuration CONFIG Limit exceedings LIM_EXCEEDINGS Messages The file name is composed as follows: @PG_PRE_LMGM_.PDL / @PG_PR3_LMGM_.PDL. A standard display is used for the messages view. The structure of the individual views of faceplates is described below. Standard (STANDARD) This view shows the current load management status, based on calculated power values. 72 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management The following parameters are displayed: Item Parameter Description (1) Power - act. CUR_PWR The current supply power, shown as a bar graph (2) Power - Trend EST_PWR The calculated trend at the end of the period, shown as a bar graph (3) Limit HYS_LIMP The currently valid limit, shown as a bar graph (4) Difference P_DIFF The difference between the trend and the current limit, shown as a bar graph (5) Power - Actual CUR_PWR The current supply power, shown as a value (6) Power - Trend EST_PWR The calculated trend at the end of the period (7) Limit HYS_LIMP The currently valid limit (8) Difference P_DIFF The difference between the trend and the current limit, shown as a value (9) trip P_SHED The disconnect power still available according to the priority list (10) add P_ON The connect power still available according to the priority list (11) Period SYNC_PER Synchronization period (12) Suppression QSUPP_T Suppression time: Time that must elapse from the start of the period before load management becomes active (13) Settling QSETTLE_T Settling time: Specifies the time which must elapse following release/hold before a new signal is set shed / add Remaining times SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 73 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Energy (ENERGY) This view shows the current load management status, based on calculated energy (work) values. The following parameters are displayed: Item Parameter Description (1) Energy - act. CUR_VAL The current supply energy, shown as a bar graph (2) Energy - Trend EST_VAL The calculated trend at the end of the period, shown as a bar graph (3) Limit HYS_LIMW The currently valid limit, shown as a bar graph (4) Difference W_DIFF The difference between the trend and the current limit, shown as a bar graph (5) Energy - Actual CUR_VAL The current supply energy, shown as a value (6) Energy - Trend EST_PWR The calculated trend at the end of the period (7) Limit HYS_LIMW The currently valid limit (8) Difference W_DIFF The difference between the trend and the current limit, shown as a value shed / add (9) trip W_SHED The disconnect energy still available according to the priority list (10) add W_ON The connect energy still available according to the priority list (11) Period SYNC_PER Synchronization period Remaining times 74 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Parameter Description (12) Suppression QSUPP_T Suppression time: Time that must elapse from the start of the period before load management becomes active (13) Settling QSETTLE_T Settling time: Specifies the time which must elapse following release/hold before a new signal is set Parameters (PARAMETERS) General load management parameters can be set in this view. Item Parameter Description (1) Limit source SEL_PW Specifies whether the limit will be defined as energy (work) or power. (2) Release of load shed EN_SHED If this box is checked, loads are released/held in accordance with the priority list. If the box is not checked, only a trend calculation and limit monitoring are performed, i.e. corresponding messages are output if a limit is about to be exceeded. (3) Stabilization delay SETTLE_T Specifies the time which must elapse following release/hold before a new signal can be set (4) Hysteresis - starting value HYS_PW % value based on the current limit for the hysteresis starting value at the start of the period (5) Hysteresis - time window HYS_T Time until hysteresis has reached 0, i.e. until the specified limit is used as a basis. (6) Suppression time SUPP_T Time which must elapse from the start of the period before load management becomes active SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 75 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management (7) Item Parameter Description Period synchro. SYNC_PER Time for the specified limit (for electricity, usually 15 min); this value is configured at the PRE_SUM block. Threshold Specifies when a a warning or alarm will be output. The values are given as percentages of the specified limit. (8) Warning limit LIM_WRN % value of the limit after which a warning message indicating a limit is about to be exceeded is issued (9) Alarm threshold LIM_ALM % value of the limit after which an alarm message indicating a limit is about to be exceeded is issued The parameters in brackets are not accessed direct from the faceplate. When the faceplate is opened, the values are read out of the PRE_LMGM_CONFIG_x user archive. When saving the parameters, these values are first transferred to the user archive and then from there to the parameters of the PRE_LMGM block. Bar para. (BAR_PARA) The limits for bar graphs displayed in the standard view are specified in this view. The following parameters are displayed: Item Parameter Description Bar graph upper limit for power bargraph upper limit (1) Power CUR_PWRH R (2) Energy CUR_VALHR Bar graph upper limit for energy diff. bargraph upper limit (3) Power P_DIFFHLR Bar graph upper limit for difference in power (4) Energy W_DIFFHLR Bar graph upper limit for difference in energy 76 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Tariffs (TARIFFS) This view shows the current tariff and enables the individual tariff limits to be changed. Item Parameter Description Current tariff (1) Power LIM_P Shows the currently valid tariff as power. (2) Energy LIM_W Shows the currently valid tariff as energy. (3) Power LIM_P_H Power limit for on-peak tariff On-peak tariff (4) Energy LIM_W_H Energy limit for on-peak tariff (5) Start time on-peak tariff BEG_HT / BEG_HT_ S Start time for on-peak tariff (6) Power LIM_P_L Power limit for off-peak tariff (7) Energy LIM_W_L Energy limit for off-peak tariff (8) Start time off-peak tariff BEG_LT / BEG_LT_S Start time for off-peak tariff Off-peak tariff Holiday tariff (9) Power LIM_P_SH Power limit for holiday tariff (10) Energy LIM_W_SH Energy limit for holiday tariff (11) Tariff active SH_ACT From 00:00 of the next day, the holiday tariff applies for "Number of days" (until 24:00) (12) Number of days SH_NUM Number of days for holiday tariff SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 77 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management If power is selected as "type of limit" in the parameter view, only the power values can be edited, and if "work" is selected, only the work values can be edited. The other limit in each case is calculated on the basis of the period time when saving. The values in brackets are not accessed direct from the faceplate. When opening the faceplate, the values are read from the user archive PRE_LMGM_CONFIG_x. When saving the parameters, these values are first transferred to the user archive and then from there to the parameters of the PRE_LMGM block. Priority list (PRIOLIST) This view shows the current status of the individual loads in load management mode and allows the user to remove certain loads from load management control and to release them manually. 78 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management (1) Item Parameter Description Load name NAMEx Shows the name of the load. (2) Released QONx Indicates whether the load is currently released via load management or not. (3) In the load management EN_SHEDx Defines whether the load is included in load management control or not. (4) in manual MANx Defines whether the load can be released manually or not. (5) manual add MAN_ENx This manually releases the load so that it is no longer under load management control. (6) Current output Px Shows the load's calculated power, provided it exists. (7) Switched on ONx Shows the status of the load, provided the load has status feedback. (8) Rated output CAPx Contains the load's configured rated power. (9) Priority PRIOx Shows the load's priority, which is used for holding. (10) Rolling sequence ROLLx Specifies the sequence in which loads of the same priority are disconnected in a rolling process. If loads have the same priority and rolling sequence, they are switched together as a group. x = 01 to 10, 25, 50, 75 or 100 Detailed information for the load: Detailed information is available for every load, including the configured hold times and the type of load, i.e. whether the load features power feedback (=1), status feedback (=2), or no feedback (=3). Das Fenster wird eingeblendet durch Mausklick auf den Verbrauchernamen. (1) Item Parameter Description Type of load MODEx Load type/mode: 0 = No load present, 1 = Actual power of the load is connected to the Px input 2 = Switching state of the load is connected at the ONx input 3 = Only the load's rated power is known (2) Min. connect time MIN_ONx Minimum time the load must be released before it can be held again (3) Min. connect time active QMIN_ONx 1 = Minimum connect time has not yet elapsed (4) Min. disconnect time MIN_OFFx Minimum time the load must be held before it can be released again SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 79 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Parameter Description (5) Min. disconnect time active QMIN_OFFx 1 = Minimum disconnect time has not yet elapsed (6) Max. disconnect time MAX_OFFx Maximum time the load may be held (7) Max. disconnect time active QMAX_OFF x 1 = Maximum disconnect time has not yet elapsed x = 01 to 10, 25, 50, 75 or 100 The values in brackets are not accessed direct from the faceplate. When opening the faceplate, the values are read from the user archive PRE_LMGM_CONFIG_x. Edit list of prio (EDITPRIOLIST) The PRE_LMGM_PRIO_x user archive is represented here. This view allows the user to edit load parameters and to load the current configuration from the PLC. In addition, the priority list can be exported and imported. 80 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Item Parameter Description Loads NAMEx Name of the load (2) Rated output CAPx Load's rated power (3) Mode MODEx Load status feedback: (1) 0: No load present 1: Power feedback 2: Status feedback 3: No feedback (4) Priority PRIOx Shows the load priority used for holding (5) Rolling sequence ROLLx Specifies the sequence in which loads of the same priority are disconnected in a rolling process. If loads have the same priority and rolling sequence, they are switched together as a group. (6) Min. connect time MIN_ONx Minimum time the load must be released before it can be held again (7) Min. disconnect time MIN_OFFx Minimum time the load must be held before it can be released again (8) Max. disconnect time MAX_OFFx Maximum time the load may be held (9) Max. standby MAX_STBYx Max. standby power of the load as a percentage of the rated power x = 01 to 10, 25, 50, 75 or 100 Configuration (CONFIG) This list contains the current and the last CFG_MAX configurations of the load management (user archive PRE_LMGM_CONFIG_x). When openeing the faceplate view, the current configuration (CONFIG_ID = CFG_CUR) is always selected. By entering the CONFIG_ID, any configuration can be selected, and by entering a filter condition, all configurations can be selected. The configurations can be displayed, printed out, exported, imported, and loaded into the controller. As well as the time stamp of its validity, each configuration contains the values from the faceplate views "Parameters", "Tariffs" and "Edit list of prio". SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 81 Description of blocks 3.6 PRE_LMGM / PR3_LMGM / PRE_LMGM_x / PR3_LMGM_x: Load management Limit exceedings (LIM_EXCEEDINGS) The archived limit exceedings (user archive PRE_LMGM_LIM_x) are displayed in this list. The list can be exported. 82 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.7 PRE_AS_SEND: AS-to-AS communication Messages 3.7 PRE_AS_SEND: AS-to-AS communication FB1070 3.7.1 Calling blocks The OB watchdog interrupt in which you install the block (e.g. OB32). Also in OB100 (see start-up characteristics). 3.7.2 Called blocks The block calls the following blocks: FB1074 PRE_BS 3.7.3 SFB35 ALARM_8P SFC6 RD_SINFO Function The block uses S7 communication BSEND) to send data to another S7 station (BRCV). A maximum of 30 REAL values and 30 binary values can be sent. Each value also has a binary quality code, which specifies whether the measured value is free of errors or not. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 83 Description of blocks 3.7 PRE_AS_SEND: AS-to-AS communication Quality Code The QC_Rx and QC_Bx (x=1..30) parameters contain the quality codes of the input signals and must be connected to the QUALITY output of the associated driver blocks when using the input signals selected 3.7.4 Message behavior PRE_AS_SEND issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR Communication error PLC pr ctrl failure 2 MSG_2 - - 3 MSG_3 - - 4 MSG_4 - - 5 MSG_5 - - 6 MSG_6 - - 7 MSG_7 - - 8 MSG_8 - - The auxiliary values of the message blocks are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID 1 QSTATUS Data transfer status 2 AUX_PR02 Free 3 AUX_PR03 Free 4 AUX_PR04 Free 5 AUX_PR05 Free 6 AUX_PR06 Free 7 AUX_PR07 Free 8 AUX_PR08 Free 9 AUX_PR09 Free 10 AUX_PR10 Free The auxiliary values (AUX_PRx, x=02..10) of the message block can be freely assigned 84 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.7 PRE_AS_SEND: AS-to-AS communication 3.7.5 Error behavior Monitoring the send process The connection with the partner station is monitored. When an error is detected, the QERR output is set and a summary event is sent to the OS. The QSTATUS status is also sent as an auxiliary value, which indicates the precise cause of the error. A message is not generated until the SUPPTIME (suppression time) has elapsed. This parameter is adjustable. The send error is reset when at least one telegram containing valid data has been successfully sent. If SUPPTIME < SAMPLE_T, the error message is generated immediately. 3.7.6 Start-up characteristics The RUNUPCYC parameter can be used to set for how long (number of cycles) messages are to be suppressed. RESTART = TRUEcan be used to simulate a restart. 3.7.7 Block parameters Item Data type Type Meaning AUX_PRx ANY IO Auxiliary value 02 - 10 BOOLx REAL I BOOL values 1 - 30 DONE BOOL O Data transfer complete ERR_COUNT DINT IO Error counter FIRST_VAR BOOL I Start of send data HISTLAST_STATUS WORD O Status of the last error HISTLAST_TIME_STAMP DATE_AND_TIME O Time stamp of the last error HISTx_STATUS WORD O Status of errors 1 - 4 HISTx_TIME_STAMP DATE_AND_TIME O *Time stamp of errors 1 - 4 ID WORD I Connection ID L_MSGLCK BOOL I Central message suppression can be connected LAST_VAR BOOL I End of send data LEN_COUNT DINT IO Integration of the sent data count MODE BYTE I 0 = Send once 1 = Send cyclically 2 - 255 = Send every nth cycle MSG_ACK WORD O Messages acknowledged MSG_EVID DWORD I MESSAGE ID/ALARM_8P event ID MSG_STAT WORD O STATUS output MSG_x BOOL I Message input 2 - 8 QC_Bx BYTE I Quality code BOOL value 1 - 30 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 HMI 85 Description of blocks 3.7 PRE_AS_SEND: AS-to-AS communication Item Data type Type Meaning QC_Rx BYTE I Quality code REAL value 1 - 30 QERR BOOL O 1 = data transfer error QLEN INT O Length of the sent data QMSG_ERR BOOL O ALARM_8P error QMSG_SUP BOOL O Message suppression QSTATUS INT O Data transfer status R_ID DWORD I Request ID for connection REALx REAL I REAL values 1 - 30 RES_HIST BOOL IO Reset history RESTART BOOL I Manual startup RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SUPPTIME REAL I Suppression time in [s] SWITCH BOOL I 1=Sending HMI Description of the status xSTATUS Description 11 Alarm: New job not active because the previous job is still busy. 25 Communication has started. The job is being processed. 1 Communication problems, e.g. connection description not loaded (local or remote), connection interrupted (e.g. cable, CPU off, CP in STOP mode) 2 Negative acknowledgment from partner SFB. The function cannot be executed. 3 R_ID is unknown on the connection specified by the ID or the receive block has not yet been called. 4 Error in the send area pointer SD_1 regarding data length or data type, or the value 0 was transferred with LEN. 5 Reset request was executed. 6 The status of the partner SFB is DISABLED (value of EN_R is 0). 7 The status of the partner SFB is not correct (receive block not called since last data transfer). 8 Access to remote object in the user memory was rejected: The destination area at the associated SFB13 "BRCV" is too small (ERROR = 1, STATUS = 4 is reported at the associated SFB13 "BRCV"). 10 Access to the local user memory not possible (for example, access to a deleted DB). 12 When the SFB was called, an instance DB that does not belong to SFB12 was specified, a shared DB was specified instead of an instance DB, no instance DB was found (loading a new instance DB from the PG). 18 R_ID already exists in the connection. 20 Insufficient work memory -1 Connection error FIRST_VAR and / or LAST_VAR -2 Internal error SFC20 BLKMOV -3 Internal error SFC20 BLKMOV: Destination area too small -4 Internal error SFC6 RD_SINFO 86 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.8 PRE_AS_RECV: AS-to-AS communication 3.8 PRE_AS_RECV: AS-to-AS communication FB1071 3.8.1 Calling blocks The OB watchdog interrupt in which you install the block (e.g. OB32). Also in OB100 (see start-up characteristics). 3.8.2 Called blocks The block calls the following blocks: FB1075 PRE_BR 3.8.3 SFC6 RD_SINFO SFB35 ALARM_8P Function The block uses S7 communication (BRCV) to receive data from another S7 station (BSEND). A maximum of 30 REAL values and 30 binary values can be sent. Each value also has a binary quality code, which specifies whether the measured value is free of errors or not. Quality Code The QC_Rx and QC_Bx (x=1..30) parameters contain the quality codes of the input signals and must be connected to the QUALITY output of the associated driver blocks when using the input signals selected In addition to the quality codes received, the quality code also provides the following information: Quality code = 16#14: Communication error, last valid value Quality Code = 16#18: Communication error, no valid value available SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 87 Description of blocks 3.8 PRE_AS_RECV: AS-to-AS communication 3.8.4 Message behavior PRE_AS_RECV issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR Communication error PLC pr ctrl failure 2 MSG_2 - - 3 MSG_3 - - 4 MSG_4 - - 5 MSG_5 - - 6 MSG_6 - - 7 MSG_7 - - 8 MSG_8 - - The auxiliary values of the message blocks are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID 1 QSTATUS Data transfer status 2 AUX_PR02 Free 3 AUX_PR03 Free 4 AUX_PR04 Free 5 AUX_PR05 Free 6 AUX_PR06 Free 7 AUX_PR07 Free 8 AUX_PR08 Free 9 AUX_PR09 Free 10 AUX_PR10 Free The auxiliary values (AUX_PRx, x=02..10) of the message block can be freely assigned 3.8.5 Error behavior Monitoring the receive process The connection with the partner station is monitored. When an error is detected, the QERR output is set and a summary event is sent to the OS. The QSTATUS status is also sent as an auxiliary value, which indicates the precise cause of the error. A message is not generated until the SUPPTIME (suppression time) has elapsed. This parameter is adjustable. The send error is reset when at least one telegram containing valid data has been successfully sent. If SUPPTIME < SAMPLE_T, the error message is generated immediately 88 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.8 PRE_AS_RECV: AS-to-AS communication 3.8.6 Start-up characteristics The RUNUPCYC parameter can be used to set for how long (number of cycles) messages are to be suppressed. RESTART = TRUEcan be used to simulate a restart. 3.8.7 Block parameters Item Data type Typ e Meaning AUX_PRx ANY IO Auxiliary value 02 - 10 BOOLx REAL O BOOL values 1 - 30 for connection ERR_COUNT DINT IO Error counter FIRST_VAR BOOL IO Start of receive data HISTLAST_STATUS WORD O Status of the last error HISTLAST_TIME_STAMP DATE_AND_TIME O Time stamp of the last error HISTx_STATUS WORD O Status of errors 1 - 4 HISTx_TIME_STAMP DATE_AND_TIME O Time stamp of errors 1 - 4 ID WORD I Connection ID IN_BOOLx REAL O BOOL values 1 - 30 receive buffer IN_QC_Bx BYTE O Quality code BOOL value 1 - 30 receive buffer IN_QC_Rx BYTE O Quality code REAL value 1 - 30 receive buffer IN_REALx REAL O REAL values 1 - 30 receive buffer L_MSGLCK BOOL I Central message suppression can be connected LAST_VAR BOOL I End of receive data LEN_COUNT DINT IO Integration of the sent data count MSG_ACK WORD O Messages acknowledged MSG_EVID DWORD I MESSAGE ID/ALARM_8P event ID MSG_STAT WORD O STATUS output MSG_x BOOL I Message input 2 - 8 NDR BOOL O Receive new data QC_Bx BYTE O Quality code BOOL value 1 - 30 QC_Rx BYTE O Quality code REAL value 1 - 30 QERR BOOL O 1 = data transfer error QLEN INT O Length of the received data QMSG_ERR BOOL O ALARM_8P error QMSG_SUP BOOL O Message suppression QSTATUS INT O Data transfer status R_ID DWORD I Request ID for connection REALx REAL O REAL values 1 - 30 for connection RES_HIST BOOL IO Reset history RESTART BOOL I Manual startup RUNUPCYC INT I Number of startup cycles SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 HMI 89 Description of blocks 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication Item Data type Typ e Meaning SAMPLE_T REAL I Sampling time in [s] SUPPTIME REAL I Suppression time in [s] HMI Description of the status xSTATUS Description 11 Alarm: New job not active because the previous job is still busy. 17 Alarm: Block receiving data asynchronously. 25 Communication has started. The job is being processed. 1 Communication problems, e.g. connection description not loaded (local or remote), connection interrupted (e.g. cable, CPU off, CP in STOP mode) 2 The function cannot be carried out. 4 Error in the receive area pointer RD_1 regarding data length or data type (data block sent is longer than receive area). 5 Reset request received, incomplete transfer. 8 Access error in the corresponding SFB12 "BSEND": The data packet to be sent is larger than 452 bytes and after the first data segment is sent, ERROR = 1 and STATUS = 4 are reported. 10 Access to local user memory not possible (for example, access to deleted DB). 12 When the SFB was called, an instance DB that does not belong to SFB13 was specified. A shared DB was specified instead of an instance DB. No instance DB was found (loading a new instance DB from the PG). 18 R_ID already exists in the connection. 20 Insufficient work memory -1 Connection error FIRST_VAR and / or LAST_VAR -2 Internal error SFC20 BLKMOV -3 Internal error SFC20 BLKMOV: Destination area too small -4 Internal error SFC6 RD_SINFO 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication FB1072 3.9.1 Calling blocks The OB watchdog interrupt in which you install the block (e.g. OB32). Also in OB100 (see start-up characteristics). 90 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication 3.9.2 Called blocks The block calls the following blocks: FB1074 PRE_BS 3.9.3 SFB35 ALARM_8P SFC6 RD_SINFO Function The block coordinates the process of sending telegrams between a redundant and a nonredundant automation station by means of S7 communication (BSEND). A maximum of 30 REAL values and 30 binary values can be sent. Each value also has a binary quality code, which specifies whether the measured value is free of errors or not. AS-4xxH AS-4xx Connection #1 Connection #2 35(B61'B+ 35(B5&9B+ 6HQGGLUHFWLRQ 6HQGGLUHFWLRQ 35(B5&9B+ 35(B61'B+ Quality Code The QC_Rx and QC_Bx (x=1..30) parameters contain the quality codes of the input signals and must be connected to the QUALITY output of the associated driver blocks when using the input signals selected SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 91 Description of blocks 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication 3.9.4 Message behavior PRE_SND_H issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR_1 Communication failure conn. 1 PLC pr ctrl failure 2 QERR_2 Communication failure conn. 2 PLC pr ctrl failure 3 QERR_1, QERR_2 Complete loss of communication PLC pr ctrl failure 4 MSG_4 - - 5 MSG_5 - - 6 MSG_6 - - 7 MSG_7 - - 8 MSG_8 - - The auxiliary values of the message blocks are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID 1 QSTATUS_1 Data transfer status, connection 1 2 QSTATUS_2 Data transfer status, connection 2 3 AUX_PR03 Free 4 AUX_PR04 Free 5 AUX_PR05 Free 6 AUX_PR06 Free 7 AUX_PR07 Free 8 AUX_PR08 Free 9 AUX_PR09 Free 10 AUX_PR10 Free The auxiliary values (AUX_PRx, x=03..10) of the message block can be freely assigned 3.9.5 Error behavior Monitoring the send process The two connections to the receiving partner are monitored separately. The block usually sends data via both connections simultaneously. When an error is detected, the relevant QERR_1 / QERR_2 output is set and a summary event is sent to the OS. Following a total failure of both connections, the auxiliary value (quality code) supplied for every value is also activated. A message is not generated until the SUPPTIME (suppression time) has elapsed. This parameter is adjustable. 92 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication The send error is reset when at least one telegram containing valid data has been successfully sent. If SUPPTIME < SAMPLE_T, the error message is generated immediately. 3.9.6 Start-up characteristics The RUNUPCYC parameter can be used to set for how long (number of cycles) messages are to be suppressed. RESTART = TRUEcan be used to simulate a restart. 3.9.7 Block parameters Item Data type Type Meaning AUX_PRx ANY IO BOOLx REAL I BOOL values 1 - 30 DONE_x BOOL O Data transfer complete, connection x ERR_CNT_x DINT O Error counter, connection x FIRST_VAR BOOL I Start of send data HISTLAST_STATUS WORD O Status of the last error, connection x HISTLAST_TIME_STAMP_x DATE_AND_TIME O Time stamp of the last error, connection x HISTx_STATUS_x WORD O Status of errors 1 - 4, connection x HISTx_TIME_STAMP_x DATE_AND_TIME O Time stamp of errors 1 - 4 ID_1 WORD I Connection ID, connection 1 ID_2 WORD I Connection ID, connection 2 HMI Auxiliary value 03 - 10 L_MSGLCK BOOL I Central message suppression can be connected LAST_VAR BOOL I End of send data LEN_CNT_x DINT O Integration of the sent data count, connection x MODE BYTE I 0 = Send once 1 = Send cyclically 2 ... 255 = Send every nth cycle MSG_ACK WORD O Messages acknowledged MSG_EVID DWORD I MESSAGE ID/ALARM_8P event ID MSG_STAT WORD O STATUS output MSG_x BOOL I Message input 4 - 8 QC_Bx BYTE O Quality code BOOL value 1 - 30 QC_Rx BYTE O Quality code REAL value 1 - 30 QERR_x BOOL O 1 = Error during data transfer, connection x QLEN_x INT O Length of the sent data, connection x QMSG_ERR BOOL O ALARM_8P error QMSG_SUP BOOL O Message suppression QSTATUS_x INT O Data transfer status, connection x R_ID_1 DWORD I Request ID for connection 1 R_ID_2 DWORD I Request ID for connection 2 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 93 Description of blocks 3.9 PRE_SND_H: AS-4xxH to AS-4xx communication Item Data type Type Meaning REALx REAL I REAL values 1 - 30 RES_HI_1 BOOL IO Reset history, connection 1 RES_HI_2 BOOL IO Reset history, connection 2 RESTART BOOL I Manual startup RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SUPPTIME REAL I Suppression time in [s] SWITCH BOOL I 1=Sending HMI Description of the status XSTATUS Description 11 Alarm: New job not active because the previous job is still busy. 25 Communication has started. The job is being processed. 1 Communication problems, e.g. connection description not loaded (local or remote), connection interrupted (e.g. cable, CPU off, CP in STOP mode) 2 Negative acknowledgment from partner SFB. The function cannot be executed. 3 R_ID is unknown on the connection specified by the ID or the receive block has not yet been called. 4 Error in the send area pointer SD_1 regarding data length or data type, or the value 0 was transferred with LEN. 5 Reset request was executed. 6 The status of the partner SFB is DISABLED (value of EN_R is 0). 7 The status of the partner SFB is not correct (receive block not called since last data transfer). 8 Access to remote object in the user memory was rejected: The destination area at the associated SFB13 "BRCV" is too small (ERROR = 1, STATUS = 4 is reported at the associated SFB13 "BRCV"). 10 Access to the local user memory not possible (for example, access to a deleted DB). 12 When the SFB was called, an instance DB that does not belong to SFB12 was specified. A shared DB was specified instead of an instance DB. No instance DB was found (loading a new instance DB from the PG). 18 R_ID already exists in the connection. 20 Insufficient work memory -1 Connection error FIRST_VAR and/or LAST_VAR -2 Internal error SFC20 BLKMOV -3 Internal error SFC20 BLKMOV: Destination area too small -4 Internal error SFC6 RD_SINFO 94 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.10 PRE_RCV_H: AS-4xxH to AS-4xx communication 3.10 PRE_RCV_H: AS-4xxH to AS-4xx communication FB1073 3.10.1 Calling blocks The OB watchdog interrupt in which you install the block (e.g. OB32). Also in OB100 (see start-up characteristics). 3.10.2 Called blocks The block calls the following blocks: FB1075 PRE_BR 3.10.3 SFB35 ALARM_8P SFC6 RD_SINFO Function The block coordinates the process of receiving telegrams between a redundant and a nonredundant automation station by means of S7 communication (BRCV). A maximum of 30 REAL values and 30 binary values can be sent. Each value also has a binary quality code, which specifies whether the measured value is free of errors or not. AS-4xxH AS-4xx Connection #1 Connection #2 35(B61'B+ 35(B5&9B+ 6HQGGLUHFWLRQ 6HQGGLUHFWLRQ SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 35(B5&9B+ 35(B61'B+ 95 Description of blocks 3.10 PRE_RCV_H: AS-4xxH to AS-4xx communication Quality Code The QC_Rx and QC_Bx (x=1..30) parameters contain the quality codes of the input signals and must be connected to the QUALITY output of the associated driver blocks when using the input signals selected In addition to the quality codes received, the quality code also provides the following information: Quality code = 16#14: Communication error, last valid value Quality Code = 16#18: Communication error, no valid value available 3.10.4 Message behavior PRE_RCV_H issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR_1 Communication failure conn. 1 PLC pr ctrl failure 2 QERR_2 Communication failure conn. 2 PLC pr ctrl failure 3 QERR_1, QERR_2 Complete loss of communication PLC pr ctrl failure 4 MSG_4 - - 5 MSG_5 - - 6 MSG_6 - - 7 MSG_7 - - 8 MSG_8 - - The auxiliary values of the message blocks are assigned as follows: Message block Auxiliary value Parameter Meaning MSG_EVID 1 QSTATUS_1 Data transfer status, connection 1 2 QSTATUS_2 Data transfer status, connection 2 3 AUX_PR03 Free 4 AUX_PR04 Free 5 AUX_PR05 Free 6 AUX_PR06 Free 7 AUX_PR07 Free 8 AUX_PR08 Free 9 AUX_PR09 Free 10 AUX_PR10 Free The auxiliary values (AUX_PRx, x=03..10) of the message block can be freely assigned 96 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.10 PRE_RCV_H: AS-4xxH to AS-4xx communication 3.10.5 Error behavior Monitoring the receive process The two connections to the sending partner are monitored separately. If the process is functioning without errors, the receive data is transferred from the first connection; if one connection fails, the data is transferred from whichever of the two connections still exists. When an error is detected, the relevant QERR_1 / QERR_2 output is set and a summary event is sent to the OS. Following a total failure of both connections, the auxiliary value (quality code) supplied for every value is also activated. A message is not generated until the SUPPTIME (suppression time) has elapsed. This parameter is adjustable. The send error is reset when at least one telegram containing valid data has been successfully sent. If SUPPTIME < SAMPLE_T, the error message is generated immediately. 3.10.6 Start-up characteristics The RUNUPCYC parameter can be used to set for how long (number of cycles) messages are to be suppressed. RESTART = TRUE can be used to simulate a restart. 3.10.7 Block parameters Item Data type Type Meaning AUX_PRx ANY IO Auxiliary value 03 - 10 BOOLx REAL O BOOL values 1 - 30 for connection DUMMY WORD IO Dummy ERR_CNT_1 DINT O Error counter FIRST_VAR_1 BOOL IO Pointer initial value, connection 1 FIRST_VAR_2 BOOL IO Pointer initial value, connection 2 HISTLAST_STATUS_x WORD O Status of the last error, connection x HISTLAST_TIME_STAMP_x DATE_AND_TIME O Time stamp of the last error, connection x HISTx_STATUS_x WORD O Status of errors 1 - 4, connection x HISTx_TIME_STAMP_x DATE_AND_TIME O Time stamp of errors 1 - 4, connection x ID_1 WORD I Connection ID, connection 1 ID_2 WORD I Connection ID, connection 2 IN_BOOLx_1 REAL IO BOOL values 1 - 30 for readback IN_BOOLx_2 REAL IO BOOL values 1 - 30 for readback IN_QC_Bx_1 BYTE IO Quality code BOOL value 1 - 30 for readback IN_QC_Bx_2 BYTE IO Quality code BOOL value 1 - 30 for readback IN_QC_Rx_1 BYTE IO Quality code REAL value 1 - 30 for readback IN_QC_Rx_2 BYTE IO Quality code REAL value 1 - 30 for readback IN_REALx_1 REAL IO REAL values 1 - 30 for readback SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 HMI 97 Description of blocks 3.10 PRE_RCV_H: AS-4xxH to AS-4xx communication Item Data type Type Meaning IN_REALx_2 L_ACT_CON HMI REAL IO REAL values 1 - 30 for readback BOOL O Last active connection: 0 = connection 1, 1 = connection 2 L_MSGLCK BOOL I Central message suppression can be connected LAST_VAR_1 BOOL IO End ID receive buffer readback, connection 1 LAST_VAR_2 BOOL IO End ID receive buffer readback, connection 2 LEN_CNT_1 DINT O Integration of the sent data count MSG_ACK WORD O Messages acknowledged MSG_EVID DWORD I MESSAGE ID/ALARM_8P event ID MSG_STAT WORD O STATUS output MSG_x BOOL I Message input 4 - 8 NDR_2 BOOL O Receive new data for connection 2 QC_Bx BYTE O Quality code BOOL value 1 - 30 QC_Rx BYTE O Quality code REAL value 1 - 30 QERR_2 BOOL O 1 = Error during data transfer for connection QLEN_2 INT O Length of the received data for connection QMSG_ERR BOOL O ALARM_8P error QMSG_SUP BOOL O Message suppression QSTATUS_2 INT O Data transfer status for connection R_ID_1 DWORD I Request ID for connection 1 R_ID_2 DWORD I Request ID for connection 2 REALx REAL O REAL values 1 - 30 for connection RES_HI_x BOOL IO Reset history, connection x RESTART BOOL I Manual startup RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time in [s] SUPPTIME REAL I Suppression time in [s] 98 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.11 PRE_BS: Calls the BSEND system function block Description of the status xSTATUS Description 11 Alarm: New job not active because the previous job is still busy. 17 Alarm: Block receiving data asynchronously. 25 Communication has started. The job is being processed. 1 Communication problems, e.g. connection description not loaded (local or remote), connection interrupted (e.g. cable, CPU off, CP in STOP mode) 2 The function cannot be carried out. 4 Error in the receive area pointer RD_1 regarding data length or data type (data block sent is longer than receive area). 5 Reset request received, incomplete transfer. 8 Access error in the corresponding SFB12 "BSEND": The data packet to be sent is larger than 452 bytes and after the first data segment is sent, ERROR = 1 and STATUS = 4 are reported. 10 Access to local user memory not possible (for example, access to deleted DB). 12 When the SFB was called, an instance DB that does not belong to SFB13 was specified. A shared DB was specified instead of an instance DB. No instance DB was found (loading a new instance DB from the PG). 18 R_ID already exists in the connection. 20 Insufficient work memory -1 Connection error FIRST_VAR and/or LAST_VAR -2 Internal error SFC20 BLKMOV -3 Internal error SFC20 BLKMOV: Destination area too small -4 Internal error SFC6 RD_SINFO 3.11 PRE_BS: Calls the BSEND system function block FB1074 3.11.1 Calling blocks The block is called internally. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 99 Description of blocks 3.12 PRE_BR: Calling the BRCV system function block 3.11.2 Called blocks The block calls the following blocks: 3.11.3 SFB12 BSEND SFC1 READ_CLK SFC6 RD_SINFO SFC20 BLKMOV Function The block forms the internal interface for communication in the send direction. 3.12 PRE_BR: Calling the BRCV system function block FB1075 3.12.1 Calling blocks The block is called internally. 3.12.2 Called blocks The block calls the following blocks: 3.12.3 SFB13 BRCV SFC1 READ_CLK SFC6 RD_SINFO SFC20 BLKMOV Function The block forms the internal interface for communication in the receive direction. 100 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.13 PRE_GET / PR3_GET: AS-to-AS communication, read out of data 3.13 PRE_GET / PR3_GET: AS-to-AS communication, read out of data PRE_GET FB1076 PR3_GET 3.13.1 FB176 Calling blocks The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.13.2 Called blocks PRE_GET The block calls the following blocks: SFC6 RD_SINFO SFB14 GET SFB35 ALARM_8P PR3_GET The block calls the following blocks: 3.13.3 SFC6 RD_SINFO SFC19 ALARM_SC SFC107 ALARM_DQ SFB14 GET Function The block uses S7 communication (GET) to read data from another S7 station. A maximum of 400 bytes can be read out of a DB. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 101 Description of blocks 3.13 PRE_GET / PR3_GET: AS-to-AS communication, read out of data 3.13.4 Message behavior PRE_GET PRE_GET issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR Communication error PLC pr ctrl failure 2 MSG_2 - - 3 MSG_3 - - 4 MSG_4 - - 5 MSG_5 - - 6 MSG_6 - - 7 MSG_7 - - 8 MSG_8 - - The auxiliary values (AUX_PRx) of the message block can be freely assigned. PR3_GET PR3_GET issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QERR Communication error PLC pr ctrl failure The auxiliary values (AUX_PR01) of the message block can be freely assigned. 3.13.5 Error behavior Monitoring the communication process The connection with the partner station is monitored. When an error is detected (error of SFC GET or no change in the status of the monitoring input LIFE_BIT within the monitoring time TIME_MON), the QERR output is set and a summary event is sent to the OS. A message is not generated until the SUPPTIME (suppression time) has elapsed. The parameters TIME_MON and SUPPTIME are adjustable. The send error is reset when at least one telegram containing valid data has been successfully sent and the lifebeat monitoring is ok. If SUPPTIME 0). If a valid response is not received from the archive manager within the monitoring time, the QMON_ERR error output is set. At the COUNT input, a number of job repetitions can be set before the occurred errors are output. If, for example, a monitoring time of 10 seconds is set and COUNT = 1, the monitoring error is not signaled until 20 seconds have elapsed. The parameterization error is an exception to this. This error is signaled immediately. All errors remain pending until a new request is transmitted. A job is always repeated when one of the errors described above has occurred. 3.14.6 Start-up characteristics During startup, the QREQ_ST output structure and the user data are reset and no job is executed. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 109 Description of blocks 3.14 PRE_SUMC / PR3_SUMC: Batch-related energy acquisition 3.14.7 Block parameter PRE_SUMC Item Data type Type Meaning HMI ACTIVE BOOL I Batch active ARCH_ID INT I Archive ID ARCH_OK BOOL O Job completion OK BA_ID DWORD I Batch ID BA_NA STRING[32] I Batch name COUNT INT I Number of job repetitions CUR_TS DT I Current time stamp when block is called CUR_VALx REAL O Current total work value x (x = 1 ... 5) ID INT I Block ID; unique number for this block LASTVALx REAL O Last archived, accumulated total work value x (x = 1 ... 5) MAX_VAL REAL I Maximum number of work values MSG_ACK WORD O Acknowledge status of the ALARM_8P block MSG_EVID DWORD I Event ID for the ALARM_8P block MSG_STAT WORD O Status of the ALARM_8P block QARCH_ID INT O Archive ID QERR BOOL O Group error QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QOVL BOOL O Overflow of user archive QPARAMF BOOL O Parameterization error QREQ_ACT BOOL O Request pending QREQ_ST UDT_PRE_SND_REQ O Request structure for request to archive manager REC_NA STRING[32] I Recipe name RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time [s] SND_ST UDT_PRE_SND I Acknowledgment signals from archive manager START_OK BOOL O Batch start OK TIME_MON REAL I Monitoring time [s] TYPEx STRING[32] I Energy type x (x = 1 ... 5) UNIT STRING[24] I System name VALUNITx STRING[8] I Unit of the value of the energy type x (x = 1 ... 5) VALx_y REAL I Current work value of the energy type of the load y (x = 1 ... 5, y = 1 ... 10) 110 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.14 PRE_SUMC / PR3_SUMC: Batch-related energy acquisition PR3_SUMC Item Data type Type Meaning ACTIVE BOOL I Batch active ARCH_ID INT I Archive ID ARCH_OK BOOL O Job completion Ok BA_ID DWORD I Batch ID BA_NA STRING[32] I Batch name CMP_ID DWORD I Component identifier for ALARM_DQ COUNT INT I Number of job repetitions CUR_TS DT I Current time stamp when block is called CUR_VALx REAL O Current total work value x (x = 1 ... 5) DIFF_LOC REAL I Difference between UTC and local time in [h] ID INT I Block ID; unique number for this block LASTVALx REAL O Last archived, accumulated total work value x (x = 1 ... 5) MAX_VAL REAL I Maximum number of work values MSG_ACKx WORD O Acknowledgment status of the ALARM_DQ block x (x=1..4) MSGEVIDx DWORD I Event ID of the ALARM_DQ block x (x = 1 .. 4) MSGSTATx WORD O Status of the ALARM_DQ block x (x = 1 .. 4) QARCH_ID INT O Archive ID QERR BOOL O Group error QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QOVL BOOL O Overflow of user archive QPARAMF BOOL O Parameterization error QREQ_ACT BOOL O Request pending QREQ_ST UDT_PRE_SND_REQ O Request structure for request to archive manager REC_NA STRING[32] I Recipe name RUNUPCYC INT I Number of startup cycles SAMPLE_T REAL I Sampling time [s] SND_ST UDT_PRE_SND I Acknowledgment signals from archive manager START_OK BOOL O Charge start OK TIME_MON REAL I Monitoring time [s] TYPEx STRING[32] I Energy type x (x = 1 ... 5) UNIT STRING[24] I System name VALUNITx STRING[8] I Unit of the value of the energy type x (x = 1 ... 5) VALx_y REAL I Current work value of the energy type of the load y (x = 1 ... 5, y = 1 ... 10) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 HMI 111 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive 3.15 3.15.1 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive PRE_UA_S FB1078 PR3_UA_S FB178 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.15.2 Called blocks PRE_UA_S The block calls the following blocks: SFB12 BSEND SFB35 ALARM_8P SFC6 RD_SINFO SFC20 BLKMOV PR3_UA_S The block calls the following blocks: 112 FB12 BSEND SFC6 RD_SINFO SFC19 ALARM_SC SFC20 BLKMOV SFC107 ALARM_DQ SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive 3.15.3 Function The PRE_UA_S / PR3_UA_S block (archive manager for writing) writes batch-related energy data for the PRE_SUMC / PR3_SUMC archive blocks and for PRE_LMGM / PR3_LMGM detailed information on limit violations and configuration data to the WinCC user archives. The blocks PRE_SUMC / PR3_SUMC and PRE_LMGM / PR3_LMGM send a request to the archive manager to write data to a WinCC user archive. The user data is transferred to the archive manager as a data array. For this, a pointer is transferred to the archive manager block which then copies the data with this information to its own instance data block. Only one archive manager block is provided Pro AS. PRE_UA_S The archive manager block can process up to 128 jobs with up to 8 KB of user data. PR3_UA_S The archive manager block can process up to 32 requests and can provide up to 8 KB of data. Mode of operation Data request from archive block The archive block issues a request to the archive manager block. The data is available in the archive manager block in the form of an input structure. Description of the structure: ID Block ID; used to assign the job data to the archive block. JOB_ID Job ID; specifies the job type: 1 = Append new data set to archive, 2 = Overwrite existing data set RECORD_NO Data set number; JOB_ID = 1: Number of the month of the last year of the data sets to be deleted JOB_ID = 2: Number of the data set to be overwritten ARCH_TY Archive type ARCH_ID Archive ID REQ Request for job MON_ERR Monitoring error DATA Pointer to the user data SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 113 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive After the archive data has been successfully written to the WinCC user archive, the successful execution of the job and the ID of the written data set is signaled to the archive block with JOB_ID = 1. The archive block then cancels the REQ request to the archive manager. When WinCC completes execution, a script sets the REQ_FIN parameter (job completed). REQ_FIN is also set if the active job signals a runtime error, or if a positive edge is detected at the RESET parameter. With this, the archive manager block is ready for a new job. Requests to WinCC user archives The archive manager block continuously scans its 128/32 request inputs for a pending request. If a request is pending and no other job is in progress, the user data is accepted and written to WinCC. Only one job can be processed at any time. Request confirmation of WinCC After a request has been sent to its WinCC transfer interface, the archive manager block expects confirmation that the data has been successfully written. For this purpose, a check is made to see if the parameters ID, RECORD_NO and ARCH_ID of the request are identical with the sent data. If the result is positive, this is reported to the archive block with QDONE = TRUE, and the request to WinCC is canceled. In the event of an error, the outputs QERR, QARCHERR or QMON_ERR are set, enabling the archive block to repeat the job immediately or to cancel it. In the case of JOB_ID = 1, the information RECORD_NO from WinCC is forwarded to the archive block. If the job has been completed, the achive block confirms this with the parameter REQ=FALSE. If the REQ_FIN parameter from WinCC has been set to TRUE, a new job can be initiated. This parameter indicates that WinCC has detected the falling edge of REQ and execution of the job has been completed. Mode of operation in WinCC Requests and data from the archive manager block For each archive manager block there is a global C action (PRE_UA_S.pas) in WINCC that responds to a request (status change of the REQ parameter) of the associated archive manager block. Using the JOB_ID, either a new data set is appended to the user archive (JOB_ID = 1) or an existing data set is overwritten with the RECORD_NO (JOB_ID = 2). If JOB_ID = 1, the newly generated data set number is saved in RECORD_NO and transferred to the archive manager. If the data set has been written to the user archive, the job data is written to the transfer interface of the archive manager block. 114 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive Preprocessing of the archive data There is a user archive for each type of archive block. The following nomenclature applies for the archive: ARCH_TY = 0: General archive PRE_+"ARCH_ID" e.g. PRE_1, PRE_2 to PRE_10 The meaning of the archives can be fixed here in the alias. ARCH_TY = 1: Load management configuration PRE_LMGM_CONFIG_+"ARCH_ID" e. g. PRE_LMGM_CONFIG_1 ARCH_TY = 2: Load management priority list PRE_LMGM_PRIO_+"ARCH_ID" e. g. PRE_LMGM_PRIO_1 ARCH_TY = 3: Load management limit violation PRE_LMGM_LIM_+"ARCH_ID" e. g. PRE_LMGM_LIM_1 ARCH_TY = 4: Batch-related energy acquisition PRE_SUMC_+"ARCH_ID" e. g. PRE_SUMC_1 Return value for archive manager block After the Write data set, the information ID, JOB_ID, RECORD_NO and ARCH_ID is written to the WinCC transfer interface of the archive manager block. 3.15.4 Message behavior PRE_UA_S PRE_UA_S issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QPARAMF Parameterization error PLC pr ctrl failure 2 QMON_ERR Communication error PLC pr ctrl failure 3 QERR Invalid data PLC pr ctrl failure 4 - Free - 5 - Free - 6 - Free - 7 - Free - 8 - Free - SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 115 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive PR3_UA_S PR3_UA_S issues the following messages: Message block Message number Block parameter Message text Message class MSGEVID1 1 QPARAMF Parameterization error PLC pr ctrl failure MSGEVID2 1 QMON_ERR Communication error PLC pr ctrl failure MSGEVID3 1 QERR Invalid data PLC pr ctrl failure 3.15.5 Error behavior If an error occurs in the C functions and WinCC cannot write the archive data (archive or data set not available, or the length of the user data of the archive manager does not agree with the actual length of the user archive), the QARCHERR error is set. This error is reported to the archive block. An error message is generated by the archive block. If a request is issued to WinCC and the parameters ID, JOB_ID, ARCH_ID do not agree between the request and the reply from WinCC, QERR is set. If ID, JOB_ID and ARCH_ID = 0, QARCHERR is set. QERR and QARCHERR are not reset until no more requests are pending, or the request agrees with the job again, or valid data are available. The QMON_ERR error is set if the internally called SFB / FB BSEND cannot establish a connection to WinCC. The error is reset when it is again possible to establish the connection. The status of the system block is evaluated to monitor the connection via BSEND. A parameterization error QPARAMF exists if the ID parameter in the REQx_ST input structures is not unique, or if no valid ID_1 / ID_2, and R_ID parameters (<>0) are available. No new job is executed while QMON_ERR or QPARAMF are pending. 3.15.6 Start-up characteristics The block has start-up characteristics. No job is executed during OB100 startup including RUNUPCYC. 116 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive 3.15.7 Block parameters PRE_UA_S Item Data type Type Meaning HMI ARCH_ID INT IO Archive ID + ARCH_TY INT IO Archive type + ID INT IO Block ID; + ID_1 WORD I Connection ID for BSEND_1 ID_2 WORD I Connection parameter ID for BSEND_2 JOB_ID INT IO Job ID 1 = Append, 2 = Overwrite MSG_ACK WORD O Acknowledge status of the ALARM_8P block MSG_EVID DWORD I Event ID for ALARM_8P block MSG_STAT WORD O Status of the ALARM_8P block QARCH_ID INT O Active archive ID QARCH_TY INT O Archive type QARCHERR BOOL O Error while writing the archive QERR BOOL O Error QID INT O Active ID QJOB_ID INT O Active job ID QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O Parameterization error QREC_NO DINT O Active data set number QSND_ST UDT_PRE_SND O Return value archiving R_ID WORD I Connection parameter R_ID for BSEND RECORD_NO DINT IO Data set number for overwriting + + REQ BOOL IO Request for archiving + REQ_FIN BOOL IO 1 = Job from OS completed + REQx_ST UDT_PRE_SND_REQ I x. request (x = 001 ... 128) RESET BOOL IO 1 = Reset job RUNUPCYC INT I Number of startup cycles SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + 117 Description of blocks 3.15 PRE_UA_S / PR3_UA_S: Archive manager for writing archive data to the user archive PR3_UA_S Item Data type Type Meaning HMI ARCH_ID INT IO Archive ID + ARCH_TY INT IO Archive type + CMP_ID DWORD I Component identifier for ALARM_DQ ID INT IO Block ID; ID_1 WORD I Connection ID for BSEND_1 + ID_2 WORD I Connection parameter ID for BSEND_2 JOB_ID INT IO Job ID 1 = Append, 2 = Overwrite MSG_ACKx WORD O Acknowledgment status of the ALARM_DQ x ( = 1..3) MSG_EVIDx DWORD I Event ID of the ALARM_DQ x (x = 1..3) MSG_STATx WORD O Status of the ALARM_DQ block x (x=1..3) QARCH_ID INT O Active archive ID QARCH_TY INT O Archive type QARCHERR BOOL O Error while writing the archive QERR BOOL O Error QID INT O Active ID QJOB_ID INT O Active job ID QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O Parameterization error QREC_NO DINT O Active data set number QSND_ST UDT_PRE_SND O Return value archiving R_ID WORD I Connection parameter R_ID for BSEND + RECORD_NO DINT IO Data set number for overwriting + REQ BOOL IO Request for archiving + REQ_FIN BOOL IO 1 = Job from OS completed + REQx_ST UDT_PRE_SND_REQ I x. request (x = 001 ... 032) RESET BOOL IO 1 = Reset job RUNUPCYC INT I Number of startup cycles 118 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive 3.16 3.16.1 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive PRE_UA_R FB1079 PR3_UA_R FB179 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.16.2 Called blocks PRE_UA_R The block calls the following blocks: SFB13 BRCV SFB35 ALARM_8P SFC6 RD_SINFO SFC20 BLKMOV PR3_UA_R The block calls the following blocks: FB13 BRCV SFC6 RD_SINFO SFC19 ALARM_SC SFC20 BLKMOV SFC107 ALARM_DQ SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 119 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive 3.16.3 Function The PRE_UA_R / PR3_UA_R block (archive manager for reading) receives configuration data from WinCC user archives for the PRE_LMGM / PR3_LMGM receive block. The PRE_LMGM / PR3_LMGM block sends a request to the archive manager to fetch data from the WinCC user archive. The data is provided as a data array for the receive block. For this, a pointer is transferred to the receive block, which then copies the data with this information to its own instance data block. Only one archive manager block is provided per AS. PRE_UA_R The archive manager block can process up to 128 requests and can provide up to 8 KB of data. PR3_UA_R The archive manager block can process up to 32 requests and can provide up to 8 KB of data. Mode of operation Data request from receive block The receive block requests data from the archive manager block. The data is available in the archive manager block in the form of an input structure. Description of the structure: ID Block ID; used to assign the job data to the archive block. JOB_ID Job ID RECORD_NO Data record number ARCH_TY Archive type ARCH_ID Archive ID REQ Data is requested MON_ERR Monitoring error After the receive block has received the data, the REQ request is reset. WinCC confirms resetting of the request by setting the REQ_FIN parameter (job completed) in a script. REQ_FIN is also set by the archive manager block if the active job reports a runtime error or a positive edge is detected at the RESET parameter. This deletes the output structure and the archive manager block is ready for a new job. 120 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive Data request to WinCC user archives The archive manager block continuously scans its 128/32 request inputs for a pending request. If a request is pending and no other job is in progress, the job data is accepted and transferred to WinCC. Only one job can be processed at any time. Data from WinCC user archives If a request has been issued to WinCC, WinCC sets the REQ_ACC parameter and writes the data to the transfer interface for the AS. The block waits until new data has arrived at the associated BRCV. To avoid jobs being lost, the request parameter REQ is not reset until REQ_ACC = TRUE is returned. A check is then made to see if the parameters ID, RECORD_NO and ARCH_ID of the job are identical with the received data. If the result is positive, the user data is written to a static data area and the request to WinCCis canceled. The receive block is informed of the presence of new data via the outputs NDR, ID, RECORD_NO and ARCH_ID. In the event of an error, the outputs QERR, QARCHERR or QMON_ERR are set, enabling the receive block to repeat the job immediately or to cancel it. If the data transfer is successful, the receive block can fetch the data from the archive manager with the transferred pointer. The data is not deleted until the receive block has acknowledged receipt of the data (parameter REQ FALSE). If the REQ_FIN parameter from WinCC has been set to TRUE, a new job can be initiated. This parameter indicates that WinCC has detected the falling edge of REQ and execution of the job has been completed. Mode of operation in WinCC Requests and data return from the archive manager block For each archive manager block there is a global C action (PRE_UA_R.pas) in WINCC that responds to a request (status change of the REQ parameter) of the associated archive manager block. Preprocessing of the data There is a user archive for each type of receive block. The following nomenclature applies for the archive: ARCH_TY = 0: General archive PRE_+"ARCH_ID" e.g. PRE_1, PRE_2 to PRE_10 The meaning of the archives can be fixed here in the alias. ARCH_TY = 1: Load management configuration PRE_LMGM_CONFIG_+"ARCH_ID" e. g. PRE_LMGM_CONFIG_1 ARCH_TY = 2: Load management priority list PRE_LMGM_PRIO_+"ARCH_ID" e. g. PRE_LMGM_PRIO_1 ARCH_TY = 3: Load management limit violation PRE_LMGM_LIM_+"ARCH_ID" e. g. PRE_LMGM_LIM_1 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 121 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive ARCH_TY = 4: Batch-related energy acquisition PRE_SUMC_+"ARCH_ID" e. g. PRE_SUMC_1 3.16.4 Message behavior PRE_UA_R PRE_UA_R issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QPARAMF Parameterization error PLC pr ctrl failure 2 QMON_ERR Communication error PLC pr ctrl failure 3 QERR Invalid data PLC pr ctrl failure 4 - Free - 5 - Free - 6 - Free - 7 - Free - 8 - Free - PR3_UA_R PR3_UA_R issues the following messages: Message block Message number Block parameter Message text Message class MSGEVID1 1 QPARAMF Parameterization error PLC pr ctrl failure MSGEVID2 1 QMON_ERR Communication error PLC pr ctrl failure MSGEVID3 1 QERR Invalid data PLC pr ctrl failure 122 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive 3.16.5 Error behavior If an error occurs in the C functions and WinCC cannot read out the requested archive data (archive or data set not available), only the parameters ID, RECORD_NO and ARCH_ID are sent to the the AS with the value 0. The block signals the QARCHERR error in this case. This error is reported to the receive block that generates an error message. If a request is issued to WinCC and the parameters ID, RECORD_NO and ARCH_ID do not agree between the request and the response from WINCC, QERR is set and the received data is not forwarded. If ID, RECORD_NO and ARCH_ID = 0, QARCHERR is set. QERR and QARCHERR are not reset until no more requests are pending, or the request agrees with the job again, or valid data are available. The QMON_ERR error is set if the internally called SFB / FB BRCV cannot establish a connection to WinCC. The error is reset when it is again possible to establish the connection. The status of the system block is used to monitor the connection via BRCV. A parameterization error QPARAMF exists if the ID parameter in the REQx_ST input structures is not unique, or if no valid ID_1 / ID_2, and R_ID parameters (<>0) are available. No new job is executed while QMON_ERR or QPARAMF are pending. 3.16.6 Start-up characteristics The block has start-up characteristics. During OB100 startup including RUNUPCYC, the QRCV_ST output structure and the user data are reset and no job is executed. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 123 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive 3.16.7 Block parameters PRE_UA_R Item Data type Type Meaning HMI ARCH_ID INT IO Archive ID + ARCH_TY INT IO Archive type + ID INT IO Block ID; + ID_1 WORD I Connection parameter ID for BRCV_1 ID_2 WORD I Connection parameter ID for BRCV_2 JOB_ID INT IO Job ID MSG_ACK WORD O Acknowledge status of the ALARM_8P block + MSG_EVID DWORD I Event ID for ALARM_8P block MSG_STAT WORD O Status of the ALARM_8P block QARCH_ID INT O Archive ID QARCH_ID INT O Active archive ID QARCH_TY INT O Archive type QARCHERR BOOL O Error while reading out the archive QERR BOOL O Error QID INT O Active ID QJOB_ID INT O Job ID QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O Parameterization error QRCV_ST UDT_PRE_RCV O Recipe data QREC_NO DINT O Active data set number R_ID WORD I Connection parameter R_ID for BRCV RECORD_NO DINT IO Data record + REQ BOOL IO Data request + REQ_ACC BOOL IO 1 = Data accepted from OS + + REQ_FIN BOOL IO 1 = Data completed by OS REQx_ST UDT_PRE_RCV_REQ I x. request (x = 001 ... 128) RESET BOOL IO 1 = Reset job RUNUPCYC INT I Number of startup cycles 124 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.16 PRE_UA_R / PR3_UA_R: Archive manager for reading archive data from the user archive PR3_UA_R Item Data type Typ e Meaning HMI ARCH_ID INT IO Archive ID + + ARCH_TY INT IO Archive type CMP_ID DWORD I Component identifier for ALARM_DQ ID INT IO Block ID; ID_1 WORD I Connection parameter ID for BRCV_1 ID_2 WORD I Connection parameter ID for BRCV_2 JOB_ID INT IO Job ID MSG_ACKx WORD O Acknowledgment status of the ALARM_DQ x ( = 1..3) MSGEVIDx DWORD I Event ID of the ALARM_DQ x (x = 1..3) MSGSTATx WORD O Status of the ALARM_DQ block x (x=1..3) QARCH_ID INT O Archive ID QARCH_ID INT O Active archive ID QARCH_TY INT O Archive type QARCHERR BOOL O Error while reading out the archive QERR BOOL O Error QID INT O Active ID QJOB_ID INT O Job ID QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression + + QPARAMF BOOL O Parameterization error QRCV_ST UDT_PRE_RCV O Recipe data QREC_NO DINT O Active data set number R_ID WORD I Connection parameter R_ID for BRCV RECORD_NO DINT IO Data record REQ BOOL IO Data request + REQ_ACC BOOL IO 1 = Data accepted from OS + + REQ_FIN BOOL IO 1 = Data completed by OS REQx_ST UDT_PRE_RCV_REQ I x. request (x = 01 ... 032) RESET BOOL IO 1 = Reset job RUNUPCYC INT I Number of startup cycles SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + + 125 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch 3.17 3.17.1 PRE_SWTCH / PR3_SWTCH: General switch PRE_SWTCH FB1750 PR3_SWTCH FB180 Calling OBs The OB watchdog interrupt in which the block is installed (e.g. OB32). Also in OB100 (see start-up characteristics). 3.17.2 Called blocks PRE_SWTCH The block calls the following blocks: SFB31 NOTIFY_8P SFB35 ALARM_8P SFC6 RD_SINFO PR3_SWTCH The block calls the following blocks: 126 SFC6 RD_SINFO SFC19 ALARM_SC SFC107 ALARM_DQ SFC108 ALARM_D SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch 3.17.3 Function The PRE_SWTCH / PR3_SWTCH function block is used to display and operate a switch via digital inputs and outputs. Status The input parameters ON, OFF, TRIP and UNPLUG are used to generate the switch status. The input parameters TRIP and UNPLUG are not evaluated if EN_TRIP or EN_UNPLUG = FALSE. The following switch statuses are generated dependent on the inputs and displayed on the faceplate and icon: Status Output QSTATUS Input ON Input OFF Input TRIP Input UNPLUG On Bit 0 TRUE FALSE FALSE FALSE Off Bit 1 FALSE TRUE FALSE FALSE Tripped Bit 2 X X TRUE FALSE Unplugged Bit 3 X X X TRUE Cells indicated with X are irrelevant in this status and are not evaluated. Statuses not available in the table are regarded as undefined and the QERR output is set. Activation Dependent on the status of the switch and the input parameter for operator control enabling (ON_OP_EN, OFFOP_EN) switching can be carried out via the faceplate (QON_OP, QOFFOP). The output signals QON and QOFF are set in accordance with the operator input and then reset after the requested status has been reached or after the monitoring time has expired. Monitoring The QMON_ERR output parameter is set if the requested switching status has not been reached within the monitoring time set using TIME_MON. This monitoring is switched off with TIME_MON = 0 or MONITOR = FALSE. The issued command is revoked. QMON_ERR is reset if RESET or L_RESET is set. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 127 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch 3.17.4 Message behavior PRE_SWTCH PRE_SWTCH issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID1 1 QBAD External error PLC pr ctrl failure 2 QSTATUS Tripped AH 3 QSTATUS Unplugged WH 4 QSTATUS Undefined status AH 5 QMON_ERR / QON Monitoring error On AH 6 QMON_ERR / QOFF Monitoring error Off AH 7 - Free - MSG_EVID2 8 - Free - 1 QSTATUS On Status PLC 2 QSTATUS Off Status PLC 3 QSTATUS Operation On successful Status PLC 4 QSTATUS Operation Off successful Status PLC 5 - Free - 6 - Free - 7 - Free - 8 - Free - PR3_SWTCH PR3_SWTCH issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID1 1 QBAD External error PLC pr ctrl failure MSG_EVID2 1 QSTATUS Tripped AH MSG_EVID3 1 QSTATUS Unplugged WH MSG_EVID4 1 QSTATUS Undefined status AH MSG_EVID5 1 QMON_ERR / QON Monitoring error AH MSG_EVID6 1 QSTATUS On Status PLC MSG_EVID7 1 QSTATUS Off Status PLC 128 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch 3.17.5 Start-up characteristics After startup, the messages are suppressed for the number of cycles parameterized in the RUNUPCYC value. 3.17.6 Block parameters PRE_SWTCH Item Data type Ty pe Meaning HMI CSF BOOL I External error EN_TRIP BOOL I 1 = TRIP input available + EN_UNPLUG BOOL I 1 = UNPLUG input available + L_RESET BOOL I Configurable input for resetting QMON_ERR MAN_ON BOOL IO Control input: 0 = Off, 1 = On + MONITOR BOOL I 1 = Monitoring on + MSG_ACK1 WORD O Acknowledge status of the ALARM_8P block MSG_EVID1 DWORD I Event ID for ALARM_8P block MSG_EVID2 DWORD I Event ID for NOTIFY_8P block MSG_STAT1 WORD O Status of the ALARM_8P block MSG_STAT2 WORD O Status of the NOTIFY_8P block MT_TYPE BOOL I Type of installation: 0 = Fixed installation, 1 = Withdrawable OFF BOOL I Switch off OFFOP_EN BOOL I Operator authorization for off ON BOOL I Circuit breaker CLOSED ON_OP_EN BOOL I Operator authorization for on QBAD BOOL O 1 = External error QC_OFF BYTE I Quality code for OFF QC_ON BYTE I Quality code for ON QC_QOFF BYTE O Quality code for QOFF QC_QOFF_I BYTE I Quality code for QOFF input QC_QON BYTE O Quality code for QON QC_QON_I BYTE I Quality code for QON input QC_QSTATUS BYTE O Quality code for QSTATUS output QC_TRIP BYTE I Quality code for TRIP QC_UNPLUG BYTE I Quality code for UNPLUG QERR BOOL O 1 = Error QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QOFF BOOL O Control output for off SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + + 129 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch Item Data type Ty pe Meaning HMI QOFF_OP BOOL O Operator authorization for off + QON BOOL O Control output for on QON_OP BOOL O Operator authorization for on + QSIM BOOL O 1 = Simulation active + QSTATUS BYTE O Status of the switch + RESET BOOL IO Control input for resetting QMON_ERR + RUNUPCYC INT I Number of initial run cycles after CPU restart SAMPLE_T REAL I Sampling time in [s] STYPE INT I Type of switch + TIME_MON REAL I Monitoring time in [s] + TRIP BOOL I Switch is tripped UNPLUG BOOL I Switch withdrawn Item Data type Ty pe Meaning CMP_ID DWORD I Component identifier for ALARM_DQ / ALARM_D CSF BOOL I External error EN_TRIP BOOL I 1 = TRIP input available + EN_UNPLUG BOOL I 1 = UNPLUG input available + L_RESET BOOL I Configurable input for resetting QMON_ERR MAN_ON BOOL IO Control input: 0 = Off, 1 = On + MONITOR BOOL I 1 = Monitoring on + MSG_ACKx WORD O Acknowledgment status of the ALARM_DQ block x (x = 1 ... 5) PR3_SWTCH HMI MSGEVIDx DWORD I Event ID of the ALARM_DQ block x (x = 1 ... 5) MSGEVIDx DWORD I Event ID for the ALARM_D block x (x = 6 ... 7) MSGSTATx WORD O Status of the ALARM_D block x (x = 6 ... 7) MT_TYPE BOOL I Type of installation: 0 = Fixed installation, 1 = Withdrawable OFF BOOL I Switch off OFFOP_EN BOOL I Operator authorization for off ON BOOL I Circuit breaker CLOSED ON_OP_EN BOOL I Operator authorization for on QBAD BOOL O 1 = External error QC_OFF BYTE I Quality code for OFF QC_ON BYTE I Quality code for ON QC_QOFF BYTE O Quality code for QOFF QC_QOFF_I BYTE I Quality code for QOFF input QC_QON BYTE O Quality code for QON QC_QON_I BYTE I Quality code for QON input QC_QSTATUS BYTE O Quality code for QSTATUS output 130 + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch Item Data type Ty pe Meaning QC_TRIP BYTE I Quality code for TRIP QC_UNPLUG BYTE I Quality code for UNPLUG QERR BOOL O 1 = Error QMON_ERR BOOL O Monitoring error QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression HMI + QOFF BOOL O Control output for off QOFF_OP BOOL O Operator authorization for off QON BOOL O Control output for on QON_OP BOOL O Operator authorization for on + QSIM BOOL O 1 = Simulation active + QSTATUS BYTE O Status of the switch + RESET BOOL IO Control input for resetting QMON_ERR + RUNUPCYC INT I Number of initial run cycles after CPU restart SAMPLE_T REAL I Sampling time in [s] STYPE INT I Type of switch + TIME_MON REAL I Monitoring time in [s] + TRIP BOOL I Switch is tripped UNPLUG BOOL I Switch withdrawn 3.17.7 + Description of icons and faceplate Block icon Variant 1 Variant 2 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 131 Description of blocks 3.17 PRE_SWTCH / PR3_SWTCH: General switch Variant 3 Faceplate The faceplate available is described in this chapter. The following views are available: Overview OVERVIEW Standard STANDARD Messages The file name is composed as follows: @PG_PRE_SWTCH_.PDL / @PG_PR3_SWTCH_.PDL A standard display is used for the Messages view. The structure of the individual views of faceplates is described below. Standard (STANDARD) The following parameters are displayed: Item Parameter Description (1) Status QSTATUS Circuit breaker state (2) Command MAN_ON 0 = Off, 1 = On (3) Monitoring - Reset RESET Reset monitoring error 132 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 3.18 3.18.1 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 PRE_PAC FB1751 PR3_PAC FB181 Calling OBs The block must be installed in the processing sequence in the following OBs: OB1 3.18.2 Cyclic program OB82 Diagnostic interrupt OB83 Insert/remove interrupt OB85 Program execution error OB86 Rack failure OB100 Warm restart Called blocks PRE_PAC The block calls the following blocks: SFB35 ALARM_8P SFC6 RD_SINFO PR3_PAC The block calls the following blocks: 3.18.3 SFC6 RD_SINFO SFC19 ALARM_SC SFC107 ALARM_DQ Function The function block PRE_PAC / PR3_PAC is used to display selected measured values and to report status information of the PAC3200 and PAC4200 Power Monitoring Devices. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 133 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 Measured value display Data of the basic type 1 and 2 can be selected for displaying measured values. However, when parameterizing the PAC in HW Config, you must make sure that the basic types whose data is to be displayed are configured in each case. The parameters BASADR1 and BASADR2 must each be supplied with the logical basic address of the basic types 1 and 2, if used. The measured value type is determined with the TYPE_x parameter. Measured value TYPE_x Basic type Meaning Unit 1 1 Current a A 2 1 Current b A 3 1 Current c A 4 1 Total active power W 5 2 Voltage PH-PH a-b V 6 2 Voltage PH-PH b-c V 7 2 Voltage PH-PH c-a V 8 2 Total power factor - The active energy is read out and displayed dependent on the EN_ACENER parameter. Status information The status information is output in the STATDIAG parameter. The bits relevant for the messages are also output at binary output parameters (see table). Assignment of the status doublewordSTATDIAG Byte Bit Binary status information Block parameter 0 0 No synchronization pulse - 0 1 Local configuration active - 0 2 Voltage overload QE_VOLTOVER 0 3 Current overload QE_CUROVER 0 4 ... 7 Reserved - 1 0 Reserved - 1 1 Maximum pulse rate exceeded QE_PULSOVER 1 2 ... 7 Reserved - 2 0 Relevant parameter changes - 2 1 Upper/lower limit exceeded - 2 2 Maximum pulse rate exceeded QE_PULSOVER 2 3 Restart of the device - 2 4 Resetting of energy counter by user - 2 5 ... 7 Reserved - 3 0 ... 7 Reserved - 134 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 3.18.4 Message behavior PRE_PAC PRE_PAC issues the following messages: Message block Message number Block parameter Message text Message class MSG_EVID 1 QBAD External error PLC pr ctrl failure 2 QPARAMF Parameterization error PLC pr ctrl failure 3 QE_VOLTOVER Voltage out of range PLC pr ctrl failure 4 QE_CUROVER Current out of range PLC pr ctrl failure 5 QE_PULSOVER Maximum pulse rate exceeded PLC pr ctrl failure 6 - Free - 7 - Free - 8 - Free - PR3_PAC PR3_PAC issues the following messages: Message block Message number Block parameter Message text Message class MSGEVID1 1 QBAD External error PLC pr ctrl failure MSGEVID2 1 QPARAMF Parameterization error PLC pr ctrl failure MSGEVID3 1 QE_VOLTOVER Voltage out of range PLC pr ctrl failure MSGEVID4 1 QE_CUROVER Current out of range PLC pr ctrl failure MSGEVID5 1 QE_PULSOVER Maximum pulse rate exceeded PLC pr ctrl failure 3.18.5 Error behavior The QPARAMF error output is set when a measured value TYPE_x < 1 or > 8 is entered or One of the UNITx parameters is set to an invalid value (see "Description of the icon and faceplate (Page 138)") The VALUE_x measured value is set to 0 if the associated measured value type is invalid. 3.18.6 Start-up characteristics After startup, the messages are suppressed for the number of cycles parameterized in the RUNUPCYC value. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 135 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 3.18.7 Block parameters PRE_PAC Item Data type Type Meaning HMI AEIT1DW1 DWORD O Active energy import tariff 1 DWORD 1 + AEIT1DW2 DWORD O Active energy import tariff 1 DWORD 2 + BASADR1 INT I Basic address of the basic type 1 BASADR2 INT I Basic address of the basic type 2 CSF BOOL I External error EN_ACENER BOOL I 1 = Active energy available MSG_ACK WORD O Acknowledge status of the ALARM_8P block MSG_EVID DWORD I Event ID for ALARM_8P block MSG_STAT WORD O Status of the ALARM_8P block QBAD BOOL O 1 = External error QE_CUROVER BOOL O Current out of range QE_PULSOVER BOOL O Maximum pulse rate exceeded QE_VOLTOVER BOOL O Voltage out of range + QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error RUNUPCYC INT I Number of initial run cycles after CPU restart STATDIAG DWORD O Device diagnostics and status TYPE_x INT I Measured value type of VALUE_x (x = 1 ... 3) + UNITACENER BYTE I Active energy units + UNITACPOW BYTE I Active power units + + UNITVOLT BYTE I Voltage units + VALUE_x REAL O Measured value x (x = 1 ... 3) + 136 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 PR3_PAC Item Data type Type Meaning HMI AEIT1DW1 DWORD O Active energy import tariff 1 DWORD 1 + AEIT1DW2 DWORD O Active energy import tariff 1 DWORD 2 + BASADR1 INT I Basic address of the basic type 1 BASADR2 INT I Basic address of the basic type 2 CMP_ID DWORD I Component identifier for ALARM_DQ CSF BOOL I External error EN_ACENER BOOL I 1 = Active energy available MSG_ACKx WORD O Acknowledgment status of the ALARM_D Q block x (x = 1 ... 5) MSGEVIDx DWORD I Event ID of the ALARM_DQ block x (x = 1 ... 5) MSGSTATx WORD O Status of the ALARM_DQ block x (x = 1 ... 5) + QBAD BOOL O 1 = External error QE_CUROVER BOOL O Current out of range QE_PULSOVER BOOL O Maximum pulse rate exceeded QE_VOLTOVER BOOL O Voltage out of range QMSG_ERR BOOL O 1 = Signal generation error QMSG_SUP BOOL O 1 = Message suppression QPARAMF BOOL O 1 = Parameterization error RUNUPCYC INT I Number of initial run cycles after CPU restart STATDIAG DWORD O Device diagnostics and status TYPE_x INT I Measured value type of VALUE_x (x = 1 ... 3) + UNITACENER BYTE I Active energy units + UNITACPOW BYTE I Active power units + UNITVOLT BYTE I Voltage units + VALUE_x REAL O Measured value x (x = 1 ... 3) + SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 + 137 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 3.18.8 Description of icons and faceplate Block icon Faceplate The faceplate available is described in this chapter. The following views are available: Overview OVERVIEW Standard STANDARD Parameter PARAMETERS Messages The file name is composed as follows: @PG_PRE_PAC_.PDL / @PG_PR3_PAC_.PDL A standard display is used for the Messages view. The structure of the individual views of faceplates is described below. 138 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.18 PRE_PAC / PR3_PAC: Basic functionality of the PAC3200/PAC4200 Standard (STANDARD) (1) VALUE_1 (2) UNITVOLT / UNITACPOW (3) VALUE_2 (4) VALUE_3 (5) AEIT1DW1 / AE1T1DW2 (6) UNITACENER The following parameters are displayed: Item Parameter Description Values 1 ... 3 VALUE_x TYPE_x Depending on the TYPE_x measured value, the relevant value is displayed with a description. UNITVOLT / UNITACPOW The format and unit of the measured value can be set in the Parameters view. AEIT1DW1 / AE1T1DW2 The active energy is displayed if the parameter EN_ACENER = TRUE. UNITACENER The format and unit of the measured value can be set in the Parameters view. Active energy import tariff 1 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 139 Description of blocks 3.19 PRE_CALC / PR3_CALC: Calculations Parameters (PARAMETERS) The format (integer place/decimal place) and unit can be parameterized for the different measured value types. (1) Item Parameter Description Active power UNITACPOW 0 2 / 2 [W] 1 3 / 1 [kW] 2 4 / 0 [kW] 3 4 / 0 [MW] (2) Active energy UNITACENER The selection box for the active energy is displayed if the parameter EN_ACENER = TRUE. 0 7 / 2 [kWh] 1 9 / 0 [kWh] 2 9 / 0 [MWh] 3 9 / 0 [GWh] (3) Voltage UNITVOLT 0 3 / 1 [V] 1 2 / 2 [kV] 2 3 / 1 [kV] 3.19 3.19.1 PRE_CALC / PR3_CALC: Calculations PRE_CALC FC1061 PR3_CALC FC161 Calling blocks The block is called by PRE_SUM / PR3_SUM. 140 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.19 PRE_CALC / PR3_CALC: Calculations 3.19.2 Function The PRE_CALC / PR3_CALC function contains the calculation algorithms which can be used when producing measured values for the FB PRE_SUM / PR3_SUM. The function is a source in the library and the user can therefore add other calculations to it. The function interface must not be changed. The following algorithms are implemented: Function CALC_FN Algorithm 0 OUT = P0 + P1 * IN1 + P2 * IN2 + P3 * IN3 1 Calculation of heat quantity for liquids OUT = P0*IN1*P1*IN2 where: P0 = specific heat capacity c P1 = density IN1 = flow V IN2 = difference in temperature T Assignment input parameters PRE_CALC / PR3_CALC to input parameters PRE_SUM / PR3_SUM: 3.19.3 PRE_CALC / PR3_CALC PRE_SUM / PR3SUM CALC_FN CALC_FN INx ACTUALx Px CALC_Px Message behavior The block has no message behavior. 3.19.4 Error behavior The QERR error output is set when an error is established during the calculation (e.g. division by 0) 3.19.5 Start-up characteristics The block has no start-up characteristics. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 141 Description of blocks 3.20 PRE_FIFO_IO / PR3_FIFO_IO: Organizes the FIFO buffer 3.19.6 Item Block parameter Data type Type Meaning CALC_FN INT I Calculation function INx REAL I Input value x (x = 1 ... 3): Px REAL I Constant x (x = 0 ... 3): QERR BOOL O 1 = Error OUT REAL O Results 3.20 3.20.1 HMI PRE_FIFO_IO / PR3_FIFO_IO: Organizes the FIFO buffer PRE_FIFO_IO FC1062 PR3_FIFO_IO FC162 Calling blocks The block is called by the PRE_SUM / PR3_SUM, PRE_FIFO_DATA PR3_FIFO_DATA, and PRE_AR_SND / PR3_AR_SND FBs. 3.20.2 Called blocks The block calls the following blocks: SFC24 3.20.3 TEST_DB Function The PRE_FIFO_IO/ PR3_FIFO_IO function organizes reading and writing access on the FIFO buffer which is represented by the PRE_FIFO_DATA / PR3_FIFO_DATA. The FIFO contains the functionality of a cyclic buffer. Old data are overwritten when the buffer overflows. The status of the FIFO buffer is displayed at the QEMPTY (buffer empty) and QFULL (buffer full) outputs. 3.20.4 Message behavior The block has no message behavior. 142 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.21 UDT_PRE_FIFO 3.20.5 Error behavior The QPARAMF error output is set when The parameterized FIFO-DB is not present the FIFO-DB length is too short 3.20.6 Start-up characteristics During initial startup, the block initializes the check data of the FIFO buffer. This call takes place in the FB PRE_FIFO_DATA / PR3_FIFO_DATA. When the CPU is started up subsequently, the pointers are retained. 3.20.7 Item Block parameters Data type Type Meaning DONE BOOL O 1 = Order completed FIFO_DB INT I DB number for FIFO FIFO_INIT BOOL I 1 = Initializing FIFO ITEM_LEN INT I Length of element ITEM_MAX INT I Maximum number of elements in FIFO ITEM_PTR POINTER I Pointer to element ITEM_RD BOOL I 1 = Read request ITEM_WR BOOL I 1 = Write request QEMPTY BOOL O 1 = FIFOBlank QFULL BOOL O 1 = Full FIFO QPARAMF BOOL O 1 = Parameterization error 3.21 HMI UDT_PRE_FIFO UDT1060 3.21.1 Description The UDT_PRE_FIFO user data type contains internal check data for organizing the FIFO buffer. The UDT is used internally. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 143 Description of blocks 3.22 UDT_PRE_ITEM 3.21.2 Structure Item Data type Meaning FIFO_ST DWORD Pointer at start of FIFO FIFO_END DWORD Pointer at end of FIFO WR_POS DWORD Pointer at current write position RD_POS DWORD Pointer at current read position ITEM_CNT INT Counter for elements LOCKED BOOL 1 = Access locked SPARE ARRAY[1 ... 4] of BYTE Spare 3.22 UDT_PRE_ITEM UDT1061 3.22.1 Description The UDT_PRE_ITEM user data type contains the storage structure of a measured value. The UDT is used internally. 3.22.2 Structure Item Data type Meaning TS DATE_AND_TIME Time stamp of measured value VALUE REAL Measured value AR_SNO WORD Subnumber for archive tag 3.23 UDT_PRE_TLG UDT1062 3.23.1 Description The UDT_PRE_TLG user data type contains the structure of a telegram element for sending into the WinCC Tag Logging archive. The UDT is used internally. 144 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.24 UDT_PRE_SND_REQ 3.23.2 Structure Item Data type Meaning Preassignment HEAD_TYPE WORD Header Type 8 : With time stamp CYCLE TIME Cycle 0: Not relevant U_TYPE BYTE Unit (Type) 2 : Each process value has a time stamp U_AREA BYTE Units (Range) 0: Not relevant AR_SNO WORD Subnumber of archive tag DT_TYPE INT Data type of element 5 : Analog value NO_ITEMS INT Number of elements to be sent 1 TS DATE_AND_TIME Time stamp of element VALUE REAL Measured value 3.24 UDT_PRE_SND_REQ UDT1063 3.24.1 Description The user data type UDT_PRE_SND_REQ contains the structure for the request to write data to a WinCC user archive. 3.24.2 Structure Item Data type Meaning ID INT ID of the requesting function JOB_ID INT Requested job number ARCH_TY INT Requested archive type ARCH_ID INT Requested archive ID RECORD_NO DINT Data record number REQ BOOL Request to write data to the archive MON_ERR BOOL Monitoring error DATA UDT_PRE_ANY Pointer to user data SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 145 Description of blocks 3.25 UDT_PRE_SND 3.25 UDT_PRE_SND UDT1064 3.25.1 Description The user data type UDT_PRE_SND contains the acknowledgment of the archive manager for the request to write data to a WinCC user archive. 3.25.2 Structure Item Data type Meaning ID INT ID of the requesting function JOB_ID INT Requested job number ARCH_TY INT Requested archive type ARCH_ID INT Requested archive ID RECORD_NO DINT Data record number QERR BOOL Error QARCHERR BOOL Error while writing to the archive QMON_ERR BOOL Monitoring error QDONE BOOL Archiving takes place 3.26 UDT_PRE_RCV_REQ UDT1065 3.26.1 Description The user data type UDT_PRE_RCV_REQ contains the structure for the request to read data from a WinCC user archive. 146 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of blocks 3.27 UDT_PRE_RCV 3.26.2 Structure Item Data type Meaning ID INT ID of the requesting function JOB_ID INT Requested job number ARCH_TY INT Requested archive type ARCH_ID INT Requested archive ID RECORD_NO DINT Data record number REQ BOOL Request to read data from the archive MON_ERR BOOL Monitoring error 3.27 UDT_PRE_RCV UDT1066 3.27.1 Description The user data type UDT_PRE_RCV contains the archive manager acknowledgment of the request to read data from a WinCC user archive. 3.27.2 Structure Item Data type Meaning ID INT ID of the requesting function JOB_ID INT Requested job number ARCH_TY INT Requested archive type ARCH_ID INT Requested archive ID RECORD_NO DINT Data record number QERR BOOL Error QARCHERR BOOL Error while writing to the archive QMON_ERR BOOL Monitoring error NDR BOOL New data present DATA UDT_PRE_ANY Pointer to user data SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 147 Description of blocks 3.28 UDT_PRE_ANY 3.28 UDT_PRE_ANY UDT1067 3.28.1 Description The user data type UDT_PRE_ANY contains the structure of the Any pointer. It is used as a transfer pointer to the send/receive areas for the archive manager. 3.28.2 Structure Item Data type Meaning SYNC BYTE Syntax ID TYP BYTE Data type LENGTH WORD Length DB_NR WORD DB number P DWORD Range pointer 148 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of powerrate Reports 4 powerrate Reports offers functions for energy analysis and analysis for batch-related energy recording. In doing so, selected energy data is read from the tag logging archive and from user archives from the WinCC runtime database, and generated on the basis of Microsoft Excel reports. 4.1 Energy analyses The following energy analyses can be carried out: Export of archived measured values Export of energy values from the Tag Logging archive to Excel without creating a report Cost center report Assigns energy values/costs to cost centers Duration curve report Represents average power values as a duration curve Due to the system characteristics of WinCC, it is not currently possible to access swapped archives. 4.1.1 Export of archived measured values The energy, power and counter values archived in the WinCC Tag Logging archive, and the values calculated from them, are exported as raw data to Excel using the function "Export of archived measured values". The values from the tag logging archive are stored in the "Archive data" sheet, and calculated values (virtual process tags) are stored in the "Virtual process tags" sheet. The generated export file can be used for further processing of the data by other applications. 4.1.2 Cost center report The reports "Cost center report table" and "Cost center report diagram" are generated to analyze energy values (.S tags in the Tag Logging). These reports are used to assign SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 149 Description of powerrate Reports 4.1 Energy analyses consumption data and costs to the relevant cost centers. When a report is created, the reporting period over which the evaluation is to be performed must be specified. "Cost center report table" sheet "Cost center report diagram" sheet 150 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of powerrate Reports 4.2 Batch analyses 4.1.3 Duration curve report The "Duration curve report" contains the average power values (.V tags in the Tag Logging archive). It shows the frequency with which particular average power values occur. This graphic can then be used to deduce whether temporary power peaks are present. "Duration curve report" sheet 4.2 Batch analyses powerrate Reports contains the following analyses of batch-related energy values: Export of batch values Export of the batch-related energy values from user archives to Excel without creating a report Batch report (sorted acc. to time) Sorting of the batch-related energy values according to start time Batch report (sorted acc. Sorting of the batch-related energy values according to batch to name) name SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 151 Description of powerrate Reports 4.2 Batch analyses 4.2.1 Export of batch values The data assigned to batches and archived in WinCC PRE_SUMC_x user archives is exported as raw data to Excel using the "Batch value export" function. The generated export file can be used for further processing of the data by other applications. 4.2.2 Batch report To analyze batch-related energy values (data from the PRE_SUMC_x user archives), a report with data sorted according to time (batch report (sorted acc. to time)) and a report with data sorted according to batches (batch report (sorted acc. to name)) can be generated. These reports are used to assign consumption data to the relevant batches. When a report is created, the reporting period over which the analysis is to be made must be specified. "Batch report (time)" sheet 152 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Description of powerrate Reports 4.2 Batch analyses "Batch report (name)" sheet A detailed description of powerrate Reports follows in "Configuring powerrate Reports (Page 183)". SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 153 Description of powerrate Reports 4.2 Batch analyses 154 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5 The library is divided into a program folder for S7-300 and a program folder for S7-400, that contain standard blocks and a sample program which can be used as a template. The sample programs for S7-300 and S7-400 have the same structure. In the following pages the sample program for S7-400 is described. For the sample program for S7-300 only the differences to S7-400 are explained. The blocks of the sample and the procedure for writing the program are provided below. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 155 Configuration Manual 5.1 General settings Construction of the sample program 5.1 General settings For correct archiving, use and calculation of times, the CPU time-of-day must be set to UTC time. 156 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.2 General configuring in WinCC 5.2 General configuring in WinCC With Basic Process Control, a special picture construction with the defined areas Overview Area, Work Area, and Button Area is created in WinCC as standard. (1) Overview Area (2) Work Area (3) Button Area If this picture construction is not desired, it can be adapted by assigning the following parameters. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 157 Configuration Manual 5.2 General configuring in WinCC Generate a backup copy of the configuration file. It is located in the directory \WinCC\options\"Layoutname" and has the designation "Layoutname".cfg. The layout name corresponds to the name of the layout selected in the OS project editor. Open the configuration file, and modify and save the graphical data (coordinates) of the Overview Area, Work Area and Button Area Original file: (1) Overview Area (2) Work Area (3) Button Area Modified configuration file: The Key and Overview Areas are hidden here (1) Overview Area (2) Work Area (3) Button Area Run the OS project editor. This causes the modified layout to be accepted. 158 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power 5.3 Configuring the process tags for recording energy/power 5.3.1 Creating the PLC program The function "SYSTEM" contains the call of the superordinate blocks which are responsible for time synchronization, data buffering and archiving. Call of PRE_SYNC block for different synchronization times - Parameterization of type of synchronization (internal/external) - Parameterization of synchronization periods - Parameterization of synchronization pulse periods Call of the PRE_FIFO_DATA block for the FIFO buffer SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 159 Configuration Manual 5.3 Configuring the process tags for recording energy/power Call of the PRE_AR_DATA block for communication with the WinCC Tag Logging archive - FIFO input: Allocation to the FIFO output of the PRE_FIFO_DATA block - Parameterization of the monitoring time for the send operation SEND_T: The monitoring time must be at least as long as the necessary power-up time of WinCC Runtime. 160 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power S7-300 Parameterization of the AR_EVID archive id. The archive id has to be unique throughout the project. The function "ENERGY" comprises the acquisition of energy. An example call is implemented for each signal type. Installation of PRE_SUM block for measuring point - Connection with measured value - Parameter transfer for time synchronization from the PRE_SYNC block - Transfer of the number of the FIFO DB from the PRE_FIFO_DATA block - Parameterization of signal type/calculation parameter - Parameterization of subnumbers of archive tags SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 161 Configuration Manual 5.3 Configuring the process tags for recording energy/power 5.3.2 Connection to WinCC It is recommended to create the tags and messages in WinCC via AS-OS-Engineering. This requires integration of the WinCC project into STEP7 . For the tags and messages to be created in WinCC, the instance data block of the HMI block must be allocated the object property "human machine interface". The attribute is set by right-clicking on the data block and selecting the menu item Special Object Properties > Human Machine Interface in the opened property window. The default assignment of the display texts and units for WinCC can be modified in the declaration section of the function block PRE_SUM . The display texts and units can be modified instance-specifically! Copy the user object from the @Template_PRE.pdl file to the process display and run the Dynamic Wizard "Connect Faceplate to Measuring Point". The wizard is set visible, when the user object is selected. 162 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power S7-400 Creation of one variable of the raw data type per PRE_AR_DATA block for archiving in WinCC tag management with - the following tag name structure: WinCC tag name of the block PRE_AR_DATA + Suffix "/DATA" - of the raw data type Archive Data Link SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 163 Configuration Manual 5.3 Configuring the process tags for recording energy/power Create C action for acknowledging the archiving: - Copy C action PRE_AR_SND.pas from the folder \WinCC\powerrate\archives to Projectdirectory\computer name\PAS of the project (for multi-user systems of the server project) - Adapt tag trigger to raw data variable for archiving - Adapt the tag connection in the C script to the tag name of the PRE_AR_DATA block 164 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power S7-300 Create a raw data variable for archiving. - The name has to have the following structure: tagname/rawdata, where "tagname" corresponds to the tag name of the PR3_AR_DATA block. - Parameterize DB number with number of instance DB of the PR3_AR_DATA block - Set start address = DBB46 and length = 192 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 165 Configuration Manual 5.3 Configuring the process tags for recording energy/power Create C-action for archiving: - Copy C action PR3_AR_SND.pas from the folder \WinCC\powerrate\Archive to Projectdirectory\computer name\PAS of the project (for multi-user systems of the server project) - Adapt the variable trigger/connection to variable .REQUEST of the PR3_AR_DATA block Enter archive tags to the PR3_AR_SND.ini file (located in the folder \WinCC\powerrate\archives) and copy them to Projectdirectory\computer name\PAS of the project (for multi-user systems of the server project): - Archive tag name;AR_ID;AR_ID subnumber 166 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power 5.3.3 Configuring the process value archive Create a process value archive with the name pre Create two or three process-controlled archive tags for the PRE_SUM / PR3_SUM- block - Assignment of the raw data variable of the associated block for archiving PRE_AR_DATA when using the S7-400 (PRE_SUM) - The names of the archive tags have the following structure: * Accumulated work value (LAST_VAL): tagname.S * Average power value (CUR_PWR): tagname.V * Absolute counter value (VALUE_D / VALUE_R) (optional): tagname.C tagname matches the tag name of the PRE_SUM / PR3_SUM block. It can be copied in the WinCC Explorer when selecting the PRE_SUM / PR3_SUM block in the case of the structure types. The names of the archive tags have to be unique throughout the project. Enter the unit in [ ] in the comments box (e.g. [kWh]) Parameterization of AR_ID with AR_EVID parameter of associated PRE_AR_DATA / PR3_AR_DATA archiving block SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 167 Configuration Manual 5.3 Configuring the process tags for recording energy/power Parameterization of subnumbers with the parameters ARSNO_S (for work value), ARSNO_V (for average power value) and ARSNO_C (for the absolute counter value, if available) of the associated energy acquisition block PRE_SUM / PR3_SUM Configuration of Tag Logging Fast: Process-controlled archive tags are saved by WinCC in Tag Logging Fast. When configuring Tag Logging Fast it has to be taken into account that the application only accesses the runtime archive and archives which have not been swapped out. 168 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.3 Configuring the process tags for recording energy/power The memory requirement of a process-controlled archive tag depends on the archiving cycle. For a 15-minute archiving cycle, it is approx. 1 MB per year for one archive tag. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 169 Configuration Manual 5.4 Configuring communication with WinCC user archives 5.4 Configuring communication with WinCC user archives 5.4.1 Configuring the connection in NETPRO Communication with the WinCC user archives is implemented via BSEND / BRCV. For this, a connection must be configured in NETPRO for each WinCC server. The same connection must be used here as when compiling the OS. The marked ID is written to the parameters ID_1 / ID_2 of the archive manager block PRE_UA_S / PR3_UA_S and PRE_UA_R / PR3_UA_R. 170 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.4 Configuring communication with WinCC user archives 5.4.2 Creating the PLC program The "SYSTEM" function contains the call of the PRE_UA_S block (archive manager for writing), and the call of the PRE_UA_R block (archive manager for reading). Call of the PRE_UA_S block for communication with WinCC in the write direction - Parameterization of the connection IDs ID_1 / ID_2 (ID_2 only has to be parameterized when using redundant WinCC servers) with the local ID of the connection created in NETPRO (see figure in "Configuring the connection in NETPRO (Page 170)") - Parameterization of the request ID R_ID (unique ID for identifying the communication job) Call of the PRE_UA_R block for communication with WinCC in the read direction - Parameterization of the connection IDs ID_1 / ID_2 (ID_2 only has to be parameterized when using redundant WinCC servers) with the local ID of the connection created in NETPRO (see figure in "Configuring the connection in NETPRO (Page 170)") - Parameterization of the request ID R_ID (unique ID for identifying the communication job) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 171 Configuration Manual 5.4 Configuring communication with WinCC user archives 5.4.3 Configuring communication in WinCC Creation of one raw data variable per archive manager block PRE_UA_S / PRE_UA_R in WinCC tag management for the configured connection with - the following tag name structure: WinCC tag name of the archive manager block PRE_UA_S / PRE_UA_R + Suffix "/DATA" - of the type BSEND / BRCV - R_ID of the associated archive manager block PRE_UA_S / PRE_UA_R (see "Creating the AS program (Page 171)") 172 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.4 Configuring communication with WinCC user archives Creation of one C action per archive manager block PRE_UA_S - Copy C action PRE_UA_S.pas from the folder \WinCC\powerrate\archives to Projectdirectory\computer name\PAS of the server project - Adapt tag connection to tag name of the archive manager block PRE_UA_S - Adapt tag trigger to associated raw data variable and the .REQ tag SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 173 Configuration Manual 5.4 Configuring communication with WinCC user archives Creation of one C action per archive manager block PRE_UA_R - Copy C action PRE_UA_R.pas from the folder \WinCC\powerrate\archives to Projectdirectory\computer name\PAS of the server project - Adapt tag connection to tag name of the archive manager block PRE_UA_R - Adapt tag trigger to .REQ tag 174 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.5 Configuring batch data 5.5 Configuring batch data 5.5.1 Creating the PLC program The "UNIT" function contains the call of the PRE_SUMC block that collects the data for batch-related energy acquisition, combines that data for archiving in the WinCC user archive, and forwards it. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 175 Configuration Manual 5.5 Configuring batch data Integration of the PRE_SUMC block for batch-related energy acquisition - Interconnection of the CUR_TS input with the CUR_TS output of the PRE_SYNC block - Interconnection of the SND_ST input structure with the QSND_ST output structure of the PRE_UA_S block (archive manager for writing) - Interconnection of the QREQ_ST output structure with a REQx_ST input structure of the PRE_UA_S block (archive manager for writing) - Parameterization of the ID (unique identifier of the block) - Parameterization of the ARCH_ID (archive ID) - Parameterization/interconnection of the parameters UNIT, BA_ID, BA_NA and REC_NA for the batch data - Parameterization/interconnection of the parameters VALUNITx, TYPEx, VALx_y S7-300 - Interconnection of the DIFF_LOC input with the DIFF_LOC output of the PR3_SYNC block 5.5.2 Connection to WinCC S7-300 Copy the C action PR3_SetDiff_UTC_Localtime.pas from the directory \WinCC\powerrate\Config to the server project Adapt the tag name that is transferred to the PR3_SetDiff_UTC_Localtime.fct function to the tag name of the PR3_SYNC block 5.5.3 Configuring the user archive in WinCC Configuration files are provided for the user archives. The batch-related energy data can be stored in these files. The files are located in the installation directory of WinCC in the powerrate\Config folder. Different files are available for English and German. Only one language can be used. 176 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.5 Configuring batch data Importing the configuration Please use the following files: German: UserArchiveKonfigurationDeutsch.uap English: UserArchiveConfigurationEnglish.uap A user archive is created: - PRE_SUMC_1: user archive with batch-related energy data (1 corresponds to the archive ID (ARCH_ID parameter in the PRE_SUMC block, can be changed) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 177 Configuration Manual 5.6 Configuring load management 5.6 Configuring load management 5.6.1 Creating the PLC program The "LMGM" function containing the functionality of the load management is available in the library. Since the interface of the PRE_LMGM block is too large for the representation and for editing in the incremental STL editor, the STL source that can be edited by the user is supplied for the "LMGM" function. Integration of the PRE_LMGM block for load management - Link to power and energy values of the PRE_SUM block for the incoming supply - Transfer of the parameters for time synchronization from the PRE_SYNC block (see figure below) - Connection of load inputs with status (ONx)/power (Px), if these are present - Connection of load release signal outputs (QONx) with load's switching logic - Connection of the SND_ST input structure with the QSND_ST output structure of the PRE_UA_S block (archive manager for writing) - Connection of the QREQ_S_ST output structure with a REQx_ST input structure of the PRE_UA_S block (archive manager for writing) - Connection of the RCV_ST input structure with the QRCV_ST output structure of the PRE_UA_R block (archive manager for reading) - Connection of the QREQ_R_ST output structure with a REQx_ST input structure of the PRE_UA_R block (archive manager for reading) - Parameterization of the ID (unique identifier of the block) - Parameterization of the ARCH_ID. . The ARCH_ID determines the number of the user archive in WinCC in which the data of the block instance is stored. Each block instance must be assigned a unique ARCH_ID. 178 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.6 Configuring load management S7-300 Interconnection of the DIFF_LOC input with the DIFF_LOC output of the PR3_SYNC block In the sample program the instance DB DB_PULSE of the PRE_SUM block is used for the acquisition of the supply power. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 179 Configuration Manual 5.6 Configuring load management 5.6.2 Connection to WinCC See "Connecting to WinCC (Page 162)" Loads and limits are parameterized in WinCC (see "Description of icon and faceplate (Page 72)"). S7-300 Copy the C action PR3_SetDiff_UTC_Localtime.pas from the directory \WinCC\powerrate\Config to the server project Adapt the tag name that is transferred to the PR3_SetDiff_UTC_Localtime.fct function to the tag name of the PR3_SYNC block 5.6.3 Configuring the user archives in WinCC Configuration files are provided for the user archives required by load management. The files are located in the WinCC installation directory, in folder powerrate\Config, and are available in English and German. Only one language can be used. Importing the configuration Please use the following files: German: UserArchiveKonfigurationDeutsch.uap English: UserArchiveConfigurationEnglish.uap 180 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.6 Configuring load management Six user archives are created: - PRE_LMGM_CONFIG_LIST1 / PR3_LMGM_CONFIG_1: List of previous configurations - PRE_LMGM_PRIO_1 / PR3_LMGM_CONFIG_1: Priority list - PRE_LMGM_LIM_1 / PR3_LMGM_LIM_1: Limit violations (1 corresponds to the archive ID (ARCH_ID parameter in the PRE_LMGM / PR3_LMGM block, can be changed) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 181 Configuration Manual 5.7 Configuring the Web Navigator Importing runtime data for making priority list default settings A file (PRx_LMGM_PRIO_Deutsch.csv / PRx_LMGM_PRIO_English.csv) containing archive default settings is provided for the PRE_LMGM_PRIO_1 / PR3_LMGM_PRIO_1 archive. This file can be edited in Excel, if desired, then imported. 5.7 Configuring the Web Navigator Adaptation of all WinCC projects (server and client projects) for use on the Web Navigator: - Adapting the Web settings in the WinCC project: Right-click on the Web Navigator and select the Web settings. The compatibility must be set to "Picture name and path". - Moving the C functions from the folder \WinCC\aplib\powerrate to Projectdirectory\library - Generation of header files in the global script editor Installation of the powerrate Web plug-in on the Web client 182 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports 5.8 Configuring powerrate Reports 5.8.1 Configuring powerrate Reports The detailed description of configuring powerrate Reports contains the following: Calling powerrate Reports General configurations Configuration of the reports Configuration of the times 5.8.2 Calling powerrate Reports There are two methods of starting powerrate Reports. Calling via the Start menu via SIMATIC > powerrate > Reports or Using a button in WinCC. This button is found on the @Template_pre.pdl template display. It must be incorporated in a display on the computer on which the application has been installed. Incorporating call button in process display Pressing the button A check is made to determine whether or not powerrate is installed. If this is not the case, an error message appears. 5.8.3 General configurations 5.8.3.1 Configuring the server name On first opening powerrate Reports from the start menu, the computer name of the WinCC server must be entered. The name of the WinCC server can be changed using the menu item Settings > WinCC Server. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 183 Configuration Manual 5.8 Configuring powerrate Reports When opening powerrate Reports from WinCC, the computer name of the server is automatically transferred to the application and does not have to be configured. If a connection to the database of a WinCC project cannot be established, or if there is no license for powerrate on the WinCC server, an error message appears. 5.8.3.2 Configuring tariffs To calculate costs when creating cost center reports, different tariffs can be defined that are each assigned to a physical variable. The tariffs are assigned to the cost center report when they are created (see "Cost center report (Page 188)" in "Reports for energy analyses"). They are defined using the menu item Settings > Tariffs. 184 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports A maximum of 6 tariffs can be defined. These can be assigned to a time-of-day and to weekdays/holidays. Only whole hours can be entered for time specifications. You must ensure that the times of the defined tariffs have no gaps or overlaps. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 185 Configuration Manual 5.8 Configuring powerrate Reports 5.8.4 Configuration of the reports Manual and automatic reports can be created in the start window of powerrate Reports. 186 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports The report wizard is started using the menu item Report > Add. The type, method of creation (manual/automatic), name, and storage location of the report are defined in the first window. Automatic reports can only be generated on a WinCC computer (client or server). Note Automatic reports are initiated using C actions. To prevent the C actions from being deleted when loading the OS, they must be copied to the relevant WinCC project on the ES. Note After creating or changing automatic reports, the newly created C actions must be compiled and saved in the Global Script Editor so that they can be activated. When continuing the wizard, different data content will be offered for selection for reporting purposes, depending on the type of report. For reports that are generated, the template file pre_Reports.xlt is available in the directory \Siemens\powerrate\bin\config. This file can be edited with standard Excel resources and adapted without any problem to existing requirements . Note: Assignment of the cells within the report is fixed. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 187 Configuration Manual 5.8 Configuring powerrate Reports 5.8.4.1 Reports for energy analyses When selecting a report for energy analyses (export of energy values, cost center report, duration curve report), the archive tags available in the process value archive with the name "pre" are read out of the WinCC Tag Logging archive. The archive tags for which the type of report selected is meaningful are offered for reading out. The following types of archive tags are analyzed: Archive tag name extension Meaning .C Absolute counter value .S Energy value .V Power demand The archive tags can be read out of the WinCC Tag Logging archive again using the update button. 188 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Virtual process tags For energy analyses, formulas can also be edited for the archived tags. These formulas can be used, for example, for converting the unit, or for distributing the energy value across different cost centers. A tag is created by right-clicking on the form and selecting Virtual process tag > Add. A screen form appears in which the name, unit and calculation formula for the virtual process tag can be entered. In the formula, the existing archive tags can be selected in the combobox for the operands. When naming the virtual process tags, you must note that depending on the value, the extensions ".C", ".S" and ".V" must be used so that they can be correctly taken into account in the different report types (see above and the descriptions of the different report types). SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 189 Configuration Manual 5.8 Configuring powerrate Reports The formula entered is displayed in the preview field as a support. An incorrect formula will be rejected at transfer. Export of energy values All archive tags stored in the WinCC Tag Logging pre archive are offered for exporting archived measured values. 190 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Cost center report The cost center report only takes energy values into account. The application identifies such values by the ".S" extension added to the archive tag name. The following configurations and settings must be made: Definition and assignment of a tariff (see "Configuring tariffs (Page 184)"). The tariff also defines the unit for the energy values to be analyzed. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 191 Configuration Manual 5.8 Configuring powerrate Reports Definition of virtual process tags, if relevant (see "Virtual process tags (Page 188)" in "Reports for energy analyses") Definition of cost centers Note The cost centers are not present in the WinCC data storage. Assignment of the cost centers to the archive tags (right-click on the archive tag and select the cost center with "Assign cost center") Tags which are not assigned to a cost center are not taken into account in the report. Since in the case of virtual process tags the archive tags used in the formula must also be read, these archive tags must not be assigned a cost center if they are not to appear in the report. Selection of the archive tags for reading 192 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Duration curve report The duration curve report only takes power values into account. The application identifies such values by the ".V" extension added to the archive tag name. Only 1 tag may be selected. This tag must have been archived during the reporting period with a uniform archiving cycle. 5.8.4.2 Batch analyses When selecting a report for batch analyses (export of batch values, batch report (sorted according to time), batch report (sorted according to name)), the names and aliases of the user archives whose names begin with PRE_SUMC_ are displayed from the WinCC database. The names of the user archives can be read out of the WinCC database again using the update button. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 193 Configuration Manual 5.8 Configuring powerrate Reports 5.8.5 Configuration of the times 5.8.5.1 Configuration of report time and report period Depending on the type of the report and the setting for execution, different settings can be made for the report time and the report period. Manual report For manual reports, the start and end times of the archive data are specified as the report period. Manual reports are initiated either direct in the wizard or in the main window using the menu item Report > Generate. 194 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Automatic report Automatic reports can only be created on a WinCC computer (client or server). The following report cycles are available: Daily The start time of report creation is specified by the time-of-day (hour, minute and second). The following can be set as the time range for the report period: - Time range: Start time - End time - Last day: The time is counted backwards from the report time. - Expired day (00:00 - 24:00): The entire last day prior to generation of the report is taken. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 195 Configuration Manual 5.8 Configuring powerrate Reports Weekly The time of report generation is specified by the weekday and the time-of-day. The following can be set as the time range for the report period: - Last week: The time is counted backwards from the report time. - Expired week (Mon - Sun): The entire last week prior to generation of the report is taken. 196 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Monthly The time of report generation is specified by the day and time-of-day. The following can be set as the time range for the report period: - Last month: The time is counted backwards from the report time. - Expired month (1st - end of the month): The entire last month prior to generation of the report is taken. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 197 Configuration Manual 5.8 Configuring powerrate Reports Export counter values If only absolute counter values (archive tags with the extension ".C") have been selected when exporting archived measured values, the time of readout must be specified. The following setting options are available for the readout time: Daily The time stamp of the value to be read out is specified by the time-of-day (hour, minute and second). Weekly The time stamp of the value to be read out is specified by the weekday and time-of-day. Monthly The time stamp of the value to be read out is specified by the end of the month - number of days and time-of-day. 198 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Configuration Manual 5.8 Configuring powerrate Reports Aggregation Aggregation times can be entered for reports for energy analyses. The export of counter values (archive tags ".C") and the duration curve report are exceptions to this. Note: The aggregation time must not be less than the archiving cycle of the archive tags, otherwise invalid values could be displayed. This applies in particular to energy values which are entered manually. The aggregation time must not be greater than 1 hour, so that the different tariffs can be accurate to one hour in the cost center report. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 199 Configuration Manual 5.8 Configuring powerrate Reports 5.8.5.2 Configuration of the validity period The period of validity of a report is only relevant for automatic reports. The period within which the reports are generated is defined here. When the validity period has expired, the C actions in WinCC that initiate reporting are deleted from the WinCC project. If generation of the report is to continue, the validity period must be adapted. 200 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Technical data 6 The following meanings apply: Block type name The symbolic identifier in the library's icon table for the relevant FB. It must be unique to the project. Object name Consists of the type of block (FB) and the number. Block length in load/work memory Memory requirement of program code, once per block type. Length of instance data in load/work memory Memory requirement of an instance DB. Temporary memory The local data memory needed when calling the block in an execution level. This is limited depending on the CPU. If exceeded, you must check this in the CPU configuration and, if necessary, redistribute to OBs of the size actually needed. Called blocks The blocks stated here are used by the block in question and must be located in the user program. They are saved in the same library. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 201 Technical data Blocks for S7-400 Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PRE_SYNC FB1060 1302 / 1100 70 FC1 238 / 92 FC34 SFC1 SFC6 PRE_SUM FB1061 6766 / 5882 912 / 456 92 FC1 FC14 FC34 FC1061 FC1062 SFB35 SFC6 PRE_FIFO_DATA* FB1062 452 / 288 14218 / 14066 64 FC1062 SFC6 PRE_AR_DATA* FB1063 498 / 210 792 / 518 10 FB1064 PRE_AR_SND FB1064 1866 / 1518 480 / 210 102 FC1062 SFB35 SFB37 SFC6 SFC24 PRE_LMGM FB1065 33370 / 25312 16902 / 9874 310 FC1 SFB31 SFB35 SFC6 SFC20 SFC21 SFC51 PRE_LMGM_75 FB1066 26448 / 19814 13478 / 7874 310 FC1 SFB31 SFB35 SFC6 SFC20 SFC21 SFC51 202 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Technical data Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PRE_LMGM_50 FB1067 25022 / 19814 310 FC1 10052 / 5874 SFB31 SFB35 SFC6 SFC20 SFC21 SFC51 PRE_LMGM_25 FB1068 23558 / 19774 6628 / 3874 310 FC1 SFB31 SFB35 SFC6 SFC20 SFC21 SFC51 PRE_LMGM_10 FB1069 22672 / 19774 4202 / 2334 310 FC1 SFB31 SFB35 SFC6 SFC20 SFC21 SFC51 PRE_AS_SEND FB1070 2174 / 1430 1878 / 1156 44 FB1074 SFB35 SFC6 PRE_AS_RECV FB1071 5616 / 4334 3008 / 1996 46 FB1075 SFB35 SFC6 PRE_SND_H FB1072 3010 / 2070 2692 / 1782 44 FB1074 SFB35 SFC6 PRE_RCV_H FB1073 9820 / 7806 4592 / 3460 44 FB1075 SFB35 SFC6 PRE_BS FB1074 2052 / 1758 792 / 594 38 SFB12 SFC1 SFC6 SFC20 PRE_BR FB1075 1846 / 1590 1374 / 1192 36 SFB13 SFC1 SFC6 SFC20 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 203 Technical data Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PRE_GET FB1076 1864 / 1482 78 SFB14 752 / 424 SFB35 SFC6 PRE_SUMC FB1077 11810 / 11012 514 / 226 362 FC1 FC28 SFB35 SFC6 SFC20 SFC21 SFC51 PRE_UA_S FB1078 8618 / 4310 26994 / 22804 84 SFB12 SFB35 SFC6 SFC20 PRE_UA_R FB1079 6814 / 4160 22778 / 20254 80 SFB13 SFB35 SFC6 SFC20 PRE_SWTCH FB1750 2312 / 1836 676 / 326 44 SFB31 SFB35 SFC6 PRE_PAC FB1751 2052 /1702 450 / 212 64 SFB35 PRE_CALC* FC1061 264 / 172 - 4 - PRE_FIFO_IO FC1062 1070 / 914 - 22 SFC24 SFC6 * The technical data relate to the condition of the blocks on delivery. If modified by the user, the data may differ from those provided. 204 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Technical data Blocks for S7-300 Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PR3_SYNC FB160 1304 / 1100 70 FC1 244 / 96 FC34 SFC1 SFC6 PR3_SUM FB161 8356 / 7442 840 / 378 106 FC1 FC14 FC34 FC161 FC162 SFC6 SFC19 SFC107 PR3_FIFO_DATA* FB162 450 / 286 14218 / 14066 64 FC162 SFC6 PR3_AR_DATA* FB163 508 / 256 578 / 342 10 FB164 PR3_AR_SND FB164 2134 / 1822 344 / 104 118 FC162 SFC6 SFC19 SFC24 SFC107 PR3_LMGM FB165 31970 / 23748 15124 / 7958 306 FC1 SFC6 SFC19 SFC20 SFC21 SFC107 SFC108 PR3_LMGM_75 FB166 30546 / 23748 12200 / 6458 306 FC1 SFC6 SFC19 SFC20 SFC21 SFC107 SFC108 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 205 Technical data Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PR3_LMGM_50 FB167 29120 / 23748 306 FC1 9274 / 4958 SFC6 SFC19 SFC20 SFC21 SFC107 SFC108 PR3_LMGM_25 FB168 27696 / 23748 6350 / 3458 306 FC1 SFC6 SFC19 SFC20 SFC21 SFC107 SFC108 PR3_LMGM_10 FB169 26810 / 23748 4224 / 2218 306 FC1 SFC6 SFC19 SFC20 SFC21 SFC107 SFC108 PR3_GET FB176 1660 / 1364 460 / 220 90 SFB14 SFC6 SFC19 SFC107 PR3_SUMC FB177 11624 / 10872 2062 / 1498 354 FC1 FC28 SFC6 SFC19 SFC20 SFC21 SFC51 SFC107 PR3_UA_S FB178 6748 / 5006 20392 / 18780 90 FB12 SFC6 SFC19 SFC20 SFC107 206 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Technical data Block (type name) Number Length of instance Block length in the data in the load/ load/ work memory (bytes) work memory (bytes) Temporary memory (bytes) Called blocks PR3_UA_R FB179 6344 / 5012 86 FB13 19344 / 18154 SFC6 SFC19 SFC20 SFC107 PR3_SWTCH FB180 4064 / 3620 420 / 130 64 SFC6 SFC19 SFC107 SFC108 PR3_PAC FB181 3230 / 2890 362 / 128 84 SFC6 SFC19 SFC107 PR3_CALC* FC161 276 / 1784 - 4 - PR3_FIFO_IO FC162 1070 / 914 - 22 SFC24 * The technical data relate to the condition of the blocks on delivery. If modified by the user, the data may differ from those provided. SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 207 Technical data 208 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 Service and support information 7 Up-to-the-minute information You can obtain further assistance by calling the following numbers: Technical Assistance: Telephone: +49 (0) 911-895-5900 (8 - 17 CET) Fax: +49 (0) 911-895-5907 Internet: (http://www.siemens.de/lowvoltage/technical-assistance) E-mail: (mailto:technical-assistance@siemens.com) SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01 209 Service and support information 210 SIMATIC WinCC powerrate Programming and Operating Manual, 01 / 2009, A5E02308538A-01