Siemens SIMATIC S7-1200 Manual
Hide thumbs Also See for SIMATIC S7-1200:

Advertisement

Quality Assurance by
means of Weighing,
Controlling and
Logging (Set 6)
SIMATIC S7-1200 + SIWAREX WP231
https://support.industry.siemens.com/cs/ww/en/view/82454336
Siemens
Industry
Online
Support

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-1200

  • Page 1 Quality Assurance by means of Weighing, Controlling and Logging (Set 6) Siemens SIMATIC S7-1200 + SIWAREX WP231 Industry Online https://support.industry.siemens.com/cs/ww/en/view/82454336 Support...
  • Page 2: Warranty And Liability

    Application Examples at any time without prior notice. If there are any deviations between the recommendations provided in these Application Examples and other Siemens publications – e.g. Catalogs – the contents of the other documents have priority.
  • Page 3: Table Of Contents

    Table of Contents Table of Contents Warranty and Liability ....................2 Task......................... 5 Solution......................7 Overview ................... 7 Hardware and software components ..........9 2.2.1 Validity ....................9 2.2.2 Components used ................9 Basics ......................11 Recording weight as measured variable and providing as value ..11 Recipe management ................
  • Page 4 Table of Contents 7.3.2 Changing the recipe data via the web server ........49 7.3.3 Filling process ................. 51 7.3.4 DataLog ..................53 7.3.5 Reading out the DataLog file ............54 Links & Literature ..................56 History ......................56 Weighing, Controlling and Logging (Set 6) Entry ID: 82454336, V2.0, 10/2017...
  • Page 5: Task

    1 Task Task Introduction In the packaging industry, containers are to be filled with a specified number of pieces (e.g. of wall anchors), calculated by weight control. Before the actual filling, it can be selected via a recipe selection, what (which wall anchor diameter) and how many are to be filled.
  • Page 6 1 Task Overview of the automation task The figure below provides an overview of the automation task. Figure 1-1 125.6 g 5029 Recipe Pieces Filling Quality Load cell Weighing, Controlling and Logging (Set 6) Entry ID: 82454336, V2.0, 10/2017...
  • Page 7: Solution

    S7-1200 controller. The configuration of the SIWAREX WP231 weighing module is performed via the SIMATIC S7-1200 by means of “write data record” as of firmware V1.1. Weighing, Controlling and Logging (Set 6) Entry ID: 82454336, V2.0,...
  • Page 8 This application does not include a description of:  Positioning of the filling container (delivery and forwarding) Assumed knowledge Basic knowledge of SIMATIC S7-1200 and the TIA Portal is assumed. Weighing, Controlling and Logging (Set 6) Entry ID: 82454336, V2.0,...
  • Page 9: Hardware And Software Components

    2 Solution 2.2 Hardware and software components Hardware and software components 2.2.1 Validity This application is valid for  STEP 7 V14 (\9\) Update 2 (\11\)  WinCC Comfort V14 (\10\) Update 2 (\11\)  CPU 1214C Firmware V4.2.1 (\12\) ...
  • Page 10 2 Solution 2.2 Hardware and software components Software components Table 2-3 Component Qty. Article number Note STEP 7 Basic V14 6ES7822-0AA04-0YA5 Configuration and programming of the SIMATIC S7-1200 WinCC Comfort V14 6AV2101-0AA04-0AA5 Configuration and programming of the TP 700 Comfort SIWATOOL V7 7MH4960-2AK01 PC configuration software for...
  • Page 11: Basics

    3 Basics 3.1 Recording weight as measured variable and providing as value Basics Recording weight as measured variable and providing as value Table 3-1 Function Comment The SIWAREX WL260 load cell is used to convert a mechanical force into an electrical signal.
  • Page 12: Recipe Management

    3 Basics 3.2 Recipe management Note The real addressing can be read out via the device view of the SIWAREX WP231 weighing module in the “I/O addresses” and “Hardware identifier” menu item in STEP 7 V14 Basic. Recipe management The recipes are saved in the load memory of the controller (internally or on the memory card) to relieve the main memory.
  • Page 13 3 Basics 3.2 Recipe management Table 3-2 Function Comment Within the framework of the configuration, the packaged goods are selected with the help of the recipe management. In the example project a recipe has been created as PLC data type “UDT_Wall_anchors”.
  • Page 14: Filling Goods

    3 Basics 3.3 Filling goods Filling goods Table 3-3 Function Comment Once the product to be packaged is selected via the recipe data record, the setpoint weight is calculated in the CPU and filling is started via the digital control of the two sliders. During the filling process the actual weight is Digital control compared with the setpoint weight, with the...
  • Page 15: Logging The Quality Assurance

    3 Basics 3.4 Logging the quality assurance Logging the quality assurance Table 3-4 Function Comment Within the framework of the configuration, logging is executed with the help of the “Data Log” functionality in the flash memory of the S7-1200. Each data log entry includes the following data: ...
  • Page 16: Automated Archiving Of The Log Data

    3 Basics 3.5 Automated archiving of the log data Automated archiving of the log data Archiving the log data Table 3-5 Function Comment The log data can be exported from the flash memory onto the local hard disk of a Window PC with the help of an internet browser via the integrated web server of the S7-1200 and can be saved as CSV file...
  • Page 17: Mode Of Operation

    For easier use, the WP231 weighing module provides the “WP231PR” (FB 231) function block. The block is integrated in the example project. However, they are also on the CD of the "SIWAREX WP231 configuration package for SIMATIC S7-1200" (Table 2-3), as well as in the "Ready_for_use_NAWI_WP231" projects (\6\).
  • Page 18 4 Mode of Operation 4.2 SIWAREX blocks The call of the FB8 is in OB1. Figure 4-2 Interface Table 4-1 Name Data Description type Input ADDR DInt Start address of the I/O area of the WP231 HW_ID HW_IO Hardware identifier of the SIWAREX WP231 DB_SCALE Data block number of the instance DB Output...
  • Page 19: Wp231Pr_Db" Instance Data Block

    4 Mode of Operation 4.2 SIWAREX blocks “WP231PR_DB” instance data block 4.2.2 The “WP231PR_DB” instance data block forms the interface between the user program and the "WP231PR” function block. The following tags of the “WP231PR_DB” are used in the example project: Table 4-2 Name Data...
  • Page 20: Recipe Blocks

    4 Mode of Operation 4.3 Recipe blocks Function Code s_CMD2.i_CMD_CODE = 1012 s_CMD2.bo_CMD_TRIGGER = 1 Delete taring s_CMD2.i_CMD_CODE = 2003 s_CMD2.bo_CMD_TRIGGER = 1 Read data record 3 s_CMD2.i_CMD_CODE = 4003 s_CMD2.bo_CMD_TRIGGER = 1 Write data record 3 Recipe blocks The recipe management consists of the following blocks: ...
  • Page 21: Main_Recipe" Organization Block

    4 Mode of Operation 4.3 Recipe blocks For the proper functioning in connection with the SFBs “RecipeImport” and Note “RecipeExport”, the recipe DB has to consist of a one-dimensional array of a PLC data type or of a struct and it has to have the “Only store in load memory” attribute in the block properties.
  • Page 22 4 Mode of Operation 4.3 Recipe blocks Program flow chart The “Main_Recipe” OB is programmed as a sequence. The program flow chart is as follows. Figure 4-5 Teach.REQ Data_record RecipeImport.REQ FirstScan = true ? <> = true ? Data_record_old ? Piece_weight := weight / quantity RecipeImport...
  • Page 23: Tags_Recipe" Data Block

    4 Mode of Operation 4.4 User program blocks “tags_Recipe” data block 4.3.3 The “tags_Recipe” data block includes the tags for transmitting the function blocks and instructions in “Main_Recipe” OB to the interfaces. The following table lists the most important tags for individual adjustment and to understand the program flow chart: Table 4-5 Name...
  • Page 24 4 Mode of Operation 4.4 User program blocks Figure 4-6 Weighing, Controlling and Logging (Set 6) Entry ID: 82454336, V2.0, 10/2017...
  • Page 25 4 Mode of Operation 4.4 User program blocks Interface Table 4-6 Name Data type Description Input in_position Bool Box is in filling position (start request) SCALE_STATUS_1 UInt Status word 1 of the weighing module (includes taring and standstill of the scale) RESOLUTION_D Real Resolution of the load cell = Numerical...
  • Page 26: Hmi" Function Block

    4 Mode of Operation 4.4 User program blocks Program flow chart The “Filling" FB is programmed as a sequence. The program flow chart is as follows. Figure 4-7 in_position = true ? busy = 1 standstill ? weight_in = 0 ? nein code = 1011 &...
  • Page 27 4 Mode of Operation 4.4 User program blocks Figure 4-8 Interface Table 4-7 Name Data Description type Bool Start request for the supply conveyor belt Input start_M1 start_M2 Bool Start request for the removal conveyor belt slider_close_open Bool Slider for opening the storage container slider_slow_fast Bool Slider for accelerating the filling...
  • Page 28 4 Mode of Operation 4.4 User program blocks Name Data Description type reset Bool Reset input (reset after processing) Static conveyor_delta Horizontal distance that the box travels in 100ms (in pixel) stop_1 Horizontal position of the box on the scale (in pixel) stop_2 Horizontal position of the box at the end of the removal conveyor belt (in pixel)
  • Page 29: Tags" Data Block

    4 Mode of Operation 4.5 Data logging - blocks “Tags” data block 4.4.3 The “tags” data block includes the tags for transmitting the function blocks and functions to the interfaces. The following table shows the tags that have been provided with deviating start values in the example project.
  • Page 30 4 Mode of Operation 4.5 Data logging - blocks Interface Table 4-9 Name Data type Description Input Bool copy request (enabled when REQ = true) data_record UInt Recipe data record number Recipe "UDT_Wall_anchors" Recipe data (see Table 4-4) weight Real Filled weight quality Bool...
  • Page 31: Datalog" Function Block

    4 Mode of Operation 4.5 Data logging - blocks “DataLog” function block 4.5.2 The “DataLog" FB creates, opens and describes a DataLog file according to specifications. When exceeding the maximum entry numbers, the oldest entries are overwritten (ring buffer). The call of the "Data log" FB is in OB1. Figure 4-11 Interface Table 4-11...
  • Page 32 4 Mode of Operation 4.5 Data logging - blocks Name Data Description type NAME String Name of the data log Mode Bool Mode for opening the data log:  MODE= "0" Data records of the data log remain  MODE= "1" Data records of the data log are deleted Execution of the “DataLogWrite”...
  • Page 33: Time" Function

    4 Mode of Operation 4.5 Data logging - blocks Figure 4-12 DataLogCreate Data log already exists Status ? DONE DataLogOpen Data log does not exist Status ? DONE DataLogWrite Data log does not exist Data log not open Status ? DONE INC NumberRecords “Time”...
  • Page 34 4 Mode of Operation 4.5 Data logging - blocks Interface Table 4-12 Name Data Description type Input set_time Struct System time for writing (input field in HMI)  UInt Year year  USInt Month month  USInt  USInt Hour hour ...
  • Page 35: Configuration And Settings

    5 Configuration and Settings 5.1 Configuring SIMATIC Panel TP700 Comfort Configuration and Settings Configuring SIMATIC Panel TP700 Comfort Table 5-1 Action Comment Provide the TP700 Comfort with 24V. Click the “Settings” button in the start center after the initialization phase of Windows CE Double-click the transfer icon in the “Control Panel”...
  • Page 36: Network Connections

    5 Configuration and Settings 5.2 Network connections Action Comment Enable the “Specify an IP address” checkbox and accept the displayed settings:  IP-Address: 192.168.0.2  Subnet Mask: 255.255.255.0 Finally, accept the settings made in the “PN_X1” and transfer settings with “OK”. The transfer mode in the start center has to be enabled to subsequently transfer the HMI project part into the Comfort Panel.
  • Page 37 5 Configuration and Settings 5.2 Network connections Action Comment In “Networking”, select the “Internet Protocol Version 4 (TCP/IPv4)” item and open its properties.  Select “Use the following IP address”.  Select an IP address in the CPU’s subnet mask. ...
  • Page 38: Setting Pg/Pc Interface

    5 Configuration and Settings 5.3 Region and language options 5.2.1 Setting PG/PC interface Table 5-3 Action Comment Open the PG/PC interface settings via “Start > Control Panel” to set the correct access path for STEP 7 V14.  Select “S7ONLINE (STEP 7)” as the application's access point.
  • Page 39: Configuring Siwarex Wp231 Weighing Module

    5 Configuration and Settings 5.4 Configuring SIWAREX WP231 weighing module Configuring SIWAREX WP231 weighing module The SIWAREX WP231 has to be configured accordingly to adjust the weighing module to the load cell used and the specific application case. New modules are delivered with “factory settings”, which satisfies the majority of the applications.
  • Page 40: Installation And Commissioning

    6 Installation and Commissioning 6.1 Installing the hardware Installation and Commissioning This chapter describes the steps to be taken to commission the application example using the code from the download and the hardware list. Installing the hardware The figure below shows the hardware setup of the application. Figure 6-1 Weighing and Logging Station EXC+...
  • Page 41 6 Installation and Commissioning 6.1 Installing the hardware Table 6-1 Action Comment Mount the PM1207 power module, the CPU Figure 6-1 1214C and the SIWAREX WP231 weighing module onto the hat rail and establish the bus connection to the CPU with the slider switch of the weighing module.
  • Page 42: Installing The Software (Download)

    6 Installation and Commissioning 6.2 Installing the software (download) Installing the software (download) This chapter describes the steps for installing the sample code. Note At this point, it is assumed that the necessary software has been installed on your computer and that you are familiar with the software. Preliminary remark For the startup, we offer you software examples with test code and test parameters as a download.
  • Page 43: Operating The Application

    7 Operating the Application 7.1 Overview Operating the Application Overview The following picture shows the menu navigation via the toolbar. It can be selected from any screen. Figure 7-1 Filling process Quick Start Tarieren Zero digits Toggle language Delete taring Zeit- Data Log einstellung...
  • Page 44: Toolbar (Footer)

    7 Operating the Application 7.1 Overview 7.1.1 Toolbar (footer) The toolbar consists of 7 buttons:  you get to the recipe view. This is where you can execute the teach function.  you get to the display of the filling process. This is also the start screen.
  • Page 45: Commissioning

    7 Operating the Application 7.2 Commissioning 7. Empty: The scale is in a defined empty range (configurable via SIWATOOL V7). 8. Standstill: The weight is in a stable state. 9. ¼ d zero: The scale is +/- of a quarter numerical increment to the zero point (important for scales requiring verified calibration).
  • Page 46: Quick Start

    You need a known weight which should be at least 5% of the rated load of the load cell. The SIWAREX WP231 weighing module is configured via the SIMATIC S7-1200 by means of “write data record” as of firmware V1.1.
  • Page 47: Live Demo

    7 Operating the Application 7.3 Live demo Action Comment Confirm the empty weight of the empty scale (the weight display (2) will then show “0.0 g”). Then put the calibration weight onto the scale and confirm its validity. The weight display (2) then shows the previously configured value of the “Calibration weight 1”.
  • Page 48 7 Operating the Application 7.3 Live demo The “recipe” screen consists of an overview field with information on the selected recipe data record (1) and an operator panel for the teaching function (2). In the exported data blocks, a “wall anchor” recipe has been created for this application with the following three data records: 1.
  • Page 49: Changing The Recipe Data Via The Web Server

    7 Operating the Application 7.3 Live demo 7.3.2 Changing the recipe data via the web server During initialization of the controller, as well as when changing the recipe data using the teach function, the relocated recipe data records are copied into the controller via the “RecipeExport”...
  • Page 50 7 Operating the Application 7.3 Live demo Action Comment  Delete or rename the “RECIPE_DB.csv” file on the web server.  Browse your hard disk for the changed “RECIPE_DB.csv” and upload the file. Uploading is only possible if there is no file with the same name on the web server.
  • Page 51: Filling Process

    7 Operating the Application 7.3 Live demo 7.3.3 Filling process This screen presents the production of the wall anchors that are to be packaged. Figure 7-5 Select the wall anchors (size and number) to be packaged through the data record no (1).
  • Page 52 7 Operating the Application 7.3 Live demo Action Comment When the scale is reached, and the The filling process is indicated by conditions standstill and weight recording the flashing blue arrow. larger than zero have been fulfilled: The setpoint weight deviation is ...
  • Page 53: Datalog

    7 Operating the Application 7.3 Live demo 7.3.4 DataLog This screen is used to evaluate the status of the process data logging. Figure 7-6 1. Determine the maximum number of data records and the name of the DataLog file via the input fields “RECORDS” and “NAME”. 2.
  • Page 54: Reading Out The Datalog File

    7 Operating the Application 7.3 Live demo 7. Via this button you get to the web server of the S7-1200 controller (only possible for real Comfort Panel). 8. Via this button you get to the time setting of the S7-1200 controller. 7.3.5 Reading out the DataLog file You have the option to read out the csv file with the recorded process data via the...
  • Page 55 7 Operating the Application 7.3 Live demo Action Comment The “File Download” window gives you the option to open the csv file directly with a selected program or to save it first.  Click the “Open” button. Due to the previously defined default and format settings (see chapter 5.3), the csv file will be correctly displayed in Microsoft Excel with the columns...
  • Page 56: Links & Literature

    8 Links & Literature Links & Literature Table 8-1 Topic Siemens Industry Online Support https://support.industry.siemens.com Link to the entry page of the application example https://support.industry.siemens.com/cs/ww/en/view/82454336 S7-1200 Automation System - System Manual https://support.industry.siemens.com/cs/ww/en/view/109741593 Operating instruction SIWAREX WL200 load cells https://support.industry.siemens.com/cs/ww/en/view/109749190 Firmware SIWAREX WP231 https://support.industry.siemens.com/cs/ww/en/view/75231231...

This manual is also suitable for:

Siwarex wp231

Table of Contents