Recipe Management Siemens WinCC SCADA


#1

Recipes are a collection of data that belongs together, e.g. Machine parameter settings or production data. A recipe has a fixed data structure. The recipe structure is defined during configuration. A recipe contains recipe data records. These differ in terms of their values, but not their structure. For SIMATIC Panels and WinCC Runtime Advanced, recipes are saved on the HMI device or on an external storage medium. For WinCC Runtime Professional, they are saved in an SQL database. The various data records for the recipes can be created as early as the engineering phase of the project. This means that they are available directly after the transfer of the configuration in Runtime. This data can function as the initial basis for an optimization during runtime or it even can be the result of such a process. During operation, the data records can be conveniently created, deleted, or modified across different views. In addition, recipe data can be imported into or exported from Runtime Configuration.
In addition to the option of using recipe data exported from the HMI device on other HMI devices, it can also be re-imported into engineering. This data can then either be logged with the project or reused for other projects. Configurable screen objects are used for displaying and managing the data at runtime.

Using recipes

Recipes can be used in the following situations:

  • Manual production
    The desired recipe data is selected and displayed on the HMI device. The data can be modified and saved on the HMI device as needed. The recipe data is then transferred to the controller.
  • Automatic production
    The control program initiates the transfer of the recipe data Between the PLC and HMI device. The transfer can also be started from the HMI device. Production is thus implemented adapted. It is not essential to display or modify the data.
  • Teach-In mode
    Production data is optimized manually on the system, e.g. Axis positions or filling volumes. The values thus determined are transferred to the HMI device and saved in a recipe data record. You can then transfer the saved recipe data back to the controller at a later date.

Structure of recipe
Recipes represent a grouping of data that is structured in the same way

  • Recipe name
    In the HMI device, all recipe data records of a recipe are collected in a database and saved under the recipe name in the database.

- Recipe data records
These are the contents of the recipe. Each recipe data record contains the component values of an individual variant, i.e., one recipe data record is saved per variant.

- Recipe elements
These form the recipe structure. Recipe elements are the components of a data record.
Comparison
A recipe can be conceived as a table saved in a file. The table header is the recipe structure and consists of the individual recipe elements, i.e., each column is a recipe element. The rows of the table are the individual recipe data records (variants).

Example
In this example, the production data of a brewery is stored in a recipe. The following components are required for beer production: water, yeast, hops, and malt. Different quantities of these are required for the individual products. One recipe data record is saved for each beer type that can be produced.
This results in the following recipe components:

  • Recipe name = Beer production
  • Recipe elements = 5 recipe elements Water, yeast, barley malt, wheat malt, and hops
  • Recipe data records = 4 recipe data records for the products: lager, pilsner, bock, and Weiss beer

Communication with the controller using tags
Recipe data is always transferred between the HMI device and the connected controller record by- record using configured recipe tags (process tags). Each recipe element is assigned a control tag. These recipe tags are then the communication area for exchange of a recipe data record between the HMI device and controller.

Settings for data transfer


The following options are available:

No data transfer
The recipe is not used for transferring recipe data to the controller but as a data memory and user log: You store values that belong together in data records, which you can access in various ways.
In the simplest case an operator switches between the recipes in a recipe view. The respective recipe data is loaded into the recipe tags (internal tags) and processed further there.

“Tags” communication type
Recipe tags transfer the recipe values to the controller. Conversely, the values from the controller are written to a recipe data record via recipe tags. In so doing, the data exchange is started by the operator using the buttons (Read tag/Write tag) in the recipe view or controlledvia control tags. The following jobs are started automatically by making the desired entry in the corresponding control tags.

  • Write data records to the recipe tags thereby transferring them to the controller
  • Read data records from the recipe tags thereby retrieving them from the controller
  • Delete data records
  • Create new data records

Note:
A complete data record is always transferred in the “Tags” communication type. Transfer of recipe data from a recipe query is not possible.

Table representation of WinCC recipe view:
The recipe view has a fixed structure, which can be configured during the configuring step. The advantage is that configuration is simple and fast. However, the basic structure of the recipe view cannot be changed. It is only possible to show/hide display elements (properties such as table columns, toolbar buttons, and the status bar) and change the size.
The recipe view is a configurable object that supports the handling of recipe data in the HMI device:

  • Recipe display and selection
  • Recipe entry and modification


    The recipe view is located in the “Controls” section of the “Toolbox” task card. Depending on the application, the recipe view can be adapted by means of its properties. The most important properties of a recipe view can be found in the inspector window in the sections:
  • General
  • Appearance
  • Columns
  • Symbol bar
  • Label
    These properties should always be checked and configured.

Sorting in the recipe view
Opens a dialog box for entering a user-defined sorting of the displayed columns. We can sort the recipe as per ascending and descending order.

Exporting in the recipe view
Export data
This button is used to export the selected recipes. The export is made with the current runtime data to a CSV file. The export settings are selected in the “Export data” dialog.


Basics of SCADA 71
We can export the data in any format like excel file or CVV file or Trend view. Below is the screen how exporting for recipe view looks.

Selection dialog

Selection criteria can also be entered in the SQL database language. The SQL string can be transferred, e.g., via a tag or script for the “Filter/Filter SQL statement” property of the recipe view.

Procedure for configuring a recipe
The following steps must be performed when configuring recipes:

  1. Project tree > HMI device > Recipes.

    Basics of SCADA 72
  2. By double-clicking on “<Add new >” in the “Name” column of the “recipe” window, new recipe will be created.
  3. Now select “Elements” in below tab (i.e. shown in figure) and in place of name enter elements for your recipes (for example: for TEA you needs elements are Water, milk, tea powder).
  4. Now add display name whatever you would like to display in your recipe window in SCADA
  5. Assign appropriate Tags for all the elements
  6. You Can also use “data record” function to record your recipe data.
  7. Take one recipe window from toolbox > control.
  8. Go to its properties > general > Assign your recipe.

Recipe editor
Recipes are created, configured, and edited in the “Recipes” editor. Recipe data records can also be entered in the “Recipes” editor.
The “Recipes” editor is opened by double-clicking in the Project tree.

  1. Name (recipe name):
  • Identifies the recipe uniquely within the project
  • Key words or reserved words of the SQL database language must not be used for the recipe name (see Section “SQL Keywords” in the TIA-Portal information system).
  1. Display name:
  • Appears on the HMI device, e.g., in the recipe view
  • Multilingual configuration is possible
  1. Recipe number:
    Identifies the recipe uniquely within the project
  2. Version:
  • Identifies the date and time of the most recent change made to the recipe.
  1. Name (recipe element name):
  • Identifies a recipe element uniquely within the recipe
  • Assign descriptive names or designations that you can explicitly associate with the element, such as axis designations on a machine, or ingredients such as "yeast”.
  1. Display name (recipe element display name):
  • Appears on the HMI device, e.g., in the recipe view
  • Multilingual configuration is possible
  1. Tag:
  • Each recipe element is assigned a recipe tag in which the corresponding value for the recipe data record is stored.
  1. Default value:
  • This is used as the default entry when a new recipe data record is created.
  1. Tooltip:
  • Help text on the recipe element that provides information to the operator on the HMI device.

Entering of recipe data

Recipe entry:
Recipe data records can be entered at the time the recipes are configured (in the "Recipes "editor). These recipes are then transferred to the HMI device along with the configuration.

Export/import of recipe data records:
The export function can be used to export individual recipe data records or the entire recipe. In the case of import, all recipe data records of the export file are imported. For importing, it can be selected whether existing recipe data records in the project are to be overwritten.

Setting recipe properties:
Recipe properties for a recipe are defined in the properties tab of the Inspector window.

Recipe property – Communication:
In WinCC Professional, recipe data is always stored in the database of the HMI device. Data are transmitted in two ways between recipes and the controller By means of recipe tags via user-actuated buttons in the recipe view or with the aid of control tags By means of message frames with the aid of raw data tags

“Tags/control tags” communication type:
In this case, the data exchange is started by the operator using the buttons (Read tag/Write tag) in the recipe view or organized via control tags. The control tags must be created separately for each recipe. A complete recipe data record is transferred to the recipe tags and vice versa via control tags. The recipe tags (process tags) have a communication connection to the controller.
Communication type “Raw data tag” The controller and the HMI device exchange raw data tags as message frames with a fixed structure.


Raw data tags offer the following advantages:

  • Exchange of multiple data records between controller and HMI device with one job
  • Transfer of portions of a recipe data record
  • Use of the same raw data tag for various recipes

Configuring the recipe view
The recipe view has a fixed structure, which can be configured during the configuring step. The advantage is that configuration is simple and fast. However, the basic structure of the recipe view cannot be changed. It is only possible to show/hide display elements (properties such as table columns, toolbar buttons, and the status bar) and change the size. The recipe view is a configurable object that supports the handling of recipe data in the HMI device:

  • Recipe display and selection
  • Recipe entry and modification
    The recipe view is located in the “Controls” section of the “Toolbox” task card. Depending on the application, the recipe view can be adapted by means of its properties. The most important properties of a recipe view can be found in the Inspector window in the sections:
  • General
  • Appearance
  • Columns
  • Symbol bar
  • Label