10.5.1 Working with recipes 10.5.1.1 Basics Definition and applications Introduction Recipes are collections of related data, for example, machine parameterizations or production data.
Note Restrictions for recipes Recipes are not available on the HMI device OP 73:
Examples: Machine parameter settings that are needed to convert production to a different product variant. Product components that result in different compositions for different end products. A recipe has a fixed data structure. The structure of a recipe is defined during configuration. A recipe contains recipe data records. These differ in terms of their values, but not their structure. Recipes are stored on the HMI device or on an external storage medium. Recipe data records are always transferred complete and in a single pass between the HMI device and the PLC. In addition, production data can be imported in runtime, in the form of a CSV file.
Note Restrictions for Import / Export It is not possible to export or import the recipes for the following HMI devices: Basic Panels OP 77A OP 177A TP 177A (Portrait) Complete recipe data, but not single recipe data records, can be exported and imported using ProSave in CSV format and transferred to the HMI device. Thereby, Runtime is interrupted.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4160 System Manual, 02/2014 Using recipes Recipes can be used in the following situations: Manual production You select the required recipe data and display it on the HMI device. You modify the recipe data as required and save it on the HMI device. You transfer the recipe data to the PLC. Automatic production The control program starts transfer of the recipe data between the PLC and HMI device. You can also start the transfer from the HMI device. Production is then implemented automatically. It is not essential to display or modify the data. Teach-in mode You optimize production data that was 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 PLC at a later date. Entering and modifying the recipe data You enter the data in the individual recipe data records and modify it as required. The following options are available: Data entry during configuration If the production data exists already, you enter the data in the "Recipes" editor during recipe configuration. Entering the data in Runtime If you have to frequently modify production data, you can do this directly in Runtime as follows: Enter the data directly on the HMI device. Set the parameters directly on the machine. You then transfer the data from the PLC to the HMI device and save it in the recipe. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4161 Examples for using recipes Recipes are used in the manufacturing industry and mechanical engineering, for example. The following recipes show typical applications which you can implement with the recipe function of WinCC: Machine parameter assignment One field of application for recipes is the assignment of machine parameters in the manufacturing industry: A machine cuts wooden boards to a certain size and drills holes. The guide rails and drill have to be moved to new positions according to the board size. The required position data are stored as data records in a recipe. You reassign the machine parameters using "Teach in" mode if, for example, a new board size is to be processed. You transfer the new position data directly from the PLC to the HMI device and save it as a new data record. Batch production Batch production in the food processing industry represents another field of application for recipes: A filling station in a fruit juice plant produces juice, nectar, and fruit drinks in a variety of flavors. The ingredients are always the same, differing only in their mixing ratios. Each flavor corresponds to a recipe. Each mixing ratio corresponds to a data record. All of the required data for a mixing ratio can be transferred to the machine control at the touch of a button. Recipe structure Introduction The basic structure of a recipe is illustrated with reference to the filling station in a fruit juice plant. There may be several different recipes in an HMI device. A recipe can be compared to an index card box that contains several index cards. The index card box contains several variants for manufacturing a product family. All the data for each manufacturing variant is contained on a single index card. Example: In a soft drinks production plant, a recipe is needed for different flavors. Drink variants include fruit juice drink, juice and nectar. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4162 System Manual, 02/2014 Recipe The recipe contains all the recipe data records for the different drink variants.
5 30 23 80 15 35 20 70
Juice Recipe Water: Flavor: Sugar: Concentrate: Water: Sugar: Flavor: Concentrate: Nectar Recipe data record Recipe element Recipe data records Each index card represents a recipe data record needed to manufacture a product variant. Recipe entries Each index card in a drawer has the same structure. All the index cards contain fields for the different ingredients. Each field corresponds to a recipe entry. All the records of a recipe thus contain the same entries. The records differ, however, in the value of the individual entries. Example: All the drinks contain the following ingredients: Water Concentrate Sugar Flavoring The records for juice drink, fruit juice or nectar differ, however, in the quantity of sugar used in production. Display of recipes Introduction You can display recipes in the following ways: Recipe view Recipe screen Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4163 Input in the recipe view and recipe screen You change the values of a recipe in the recipe screen or recipe view and thus modify the manufacturing process or a machine. The recipe view and recipe screen can perform the same functions when using recipes. They differ in the following respects: Display options Operation Possibility of transferring data between the PLC and the HMI device Recipe view The recipe view is suitable for viewing simple recipes. The recipe view is an off-the-shelf WinCC display and operator control object for managing recipe data records. The recipe view is always part of a screen. The recipe view shows recipe data records in tabular form. You adapt the appearance and the possible operations to suit your specific needs. If you are editing recipes with a recipe view in your project, the values are saved in recipe data records. The values are not transferred between the HMI device and PLC until you use the relevant operator control object. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4164 System Manual, 02/2014 Recipe screen The recipe screen is an individual screen that contains: Input fields for recipe variables Operator control objects for using the recipes, e.g. "SaveDataRecord" Water Concentrate Sugar Flavoring Recipe name: Data record name: No.: No.: Save Load Data from the PLC Data to PLC Orange Nectar 1 2 40 70 30 30 l l kg l The recipe screen is suitable in the following situations: Large recipes Allocation of recipe fields to the graphic display of the relevant plant area Breakdown of the recipe data into several screens
Note The values of recipe variables are transferred between the PLC and recipe screen at the following times depending on the configuration: Immediately after modification When a relevant operator control object is used
Synchronizing recipe view and recipe screen There may be differences in Runtime between the values displayed in the recipe view and the values saved in the associated tags when you edit recipes in both a recipe view and a recipe screen. To prevent this, you must synchronize the recipe data record values with the values of the recipe tags. A complete recipe data record will always be saved or synchronized.
Note Recipe tags can only be synchronized in the advanced recipe view. Synchronization only takes place if the "Synchronize recipe view and recipe tags" setting is activated for the recipe.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4165 Transferring recipe data records Flow of data in recipes The following picture illustrates the flow of data in recipes:
PLC Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device Recipe view Recipe screen Recipe tag External storage medium Teach-in mode Synchronizing Interaction between the components There is interaction between the following components at runtime: Recipe view / recipe screen On the HMI device, recipes are displayed and edited in the recipe view or in a recipe screen: The recipe data records from the internal memory of the HMI device are displayed and edited in the recipe view. The values of the recipe tags are displayed and edited in the recipe screen. You synchronize the values displayed in the recipe view with the values of recipe tags according to the configuration. HMI device recipe memory Recipes are saved in the form of recipe data records in the HMI device's recipe memory. Recipe tags The recipe tags contain recipe data. When you edit recipes in a recipe screen, the recipe values are stored in recipe tags. The point at which the values of the recipe tags are exchanged with the PLC depends on the configuration.
Note You can synchronize the recipe tags with the recipe data records so that the same values are saved in both.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4166 System Manual, 02/2014 Loading and saving recipe data Complete recipe data records are loaded from or saved to the recipe memory on the HMI device in the recipe view. Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device Recipe view Recipe screen Recipe tag Synchronizing The values of the recipe data record are loaded from the recipe memory to the recipe tags in the recipe screen. When they are saved, the values of the recipe tags are saved to a recipe data record in the recipe memory. Transferring the recipe values between the HMI device and the PLC Complete recipe data records are transferred between the recipe view and PLC.
PLC Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device Recipe view Recipe screen Recipe tag Synchronizing Teach-in mode The following transfers are possible between the recipe screen and PLC, depending on the configuration: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4167 Transferring recipe data records between recipe view and recipe tags Immediate transfer of individual modified values between the recipe tags and PLC. The following settings are needed in the recipe in order to do this: "Synchronizing recipe view and recipe tags" is activated. "Manual transfer of individual modified values (teach-in mode)" is deactivated. Recipe data records can be transferred directly between the HMI device and PLC. In these situations, the display on the HMI device is not essential. Exporting and importing recipe data records Recipe data records are exported from the HMI device recipe memory and are saved to a CSV file on the external storage medium. The records can be reimported from the storage medium to the recipe memory.
Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device External storage medium The following external storage media may be used, depending on the HMI device: No storage medium, for example, for basic panels Memory card USB stick Hard disk Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4168 System Manual, 02/2014 Configuration of recipes Introduction Recipes are configured differently according to the intended use: If you are editing recipes with a recipe view in your project, the values are only saved in recipe data records. If you are editing recipes in a recipe screen in your project, the values are saved in recipe tags. The following possible settings determine how the recipe data records, recipe tags and PLC all interact. "Synchronizing recipe view and recipe tags" deactivated The data in a data record is only displayed and can only be edited in the recipe view. If you use data outside the recipe view, they are not synchronized with the recipe view. "Synchronizing recipe view and recipe tags" activated There may be differences in Runtime between the values displayed in the recipe view and the values saved in the associated tags when you edit recipes in both a recipe view and a recipe screen. To prevent this, you must synchronize the recipe data record values with the values of the recipe tags. Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device PLC Recipe view Recipe screen Recipe tag Synchronizing Teach-in mode
Note Recipe tags can only be synchronized in the advanced recipe view.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4169 The values of the recipe view and the associated recipe tags are not synchronized automatically. The recipe tags and the recipe view are not synchronized until you use the operating element with the "RecipeViewSynchronizeDataRecordWithTags" function. "Synchronize recipe view and recipe tags" activated and "Manual transfer of individual modified values (teach-in mode)" activated With this setting, modified recipe values are not synchronized immediately between the recipe tags in the recipe screen of the HMI device,and PLC. There must be an operating element with the "SetDataRecordToPLC" and "GetDataRecordFromPLC" functions present in order to synchronize the values. If recipe values are changed in the controller, the modified values are displayed immediately in the recipe screen if you use the operating element with the "GetDataRecordFromPLC" function. "Synchronize recipe view and recipe tags" activated and "Manual transfer of individual modified values (teach-in mode)" deactivated With this setting, modified recipe values are synchronized immediately between the recipe tags on the HMI device and PLC. When you change recipe values in the recipe screen, these changes are applied immediately by the PLC and immediately influence the process. If recipe values are changed in the PLC, the changed values are displayed immediately in the recipe screen. Special features of some devices
PLC Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device Recipe view Recipe tag Synchronizing Teach-in mode Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4170 System Manual, 02/2014 Basic panels, OP 77A, TP 177A and TP 177A (Portrait) respond differently to the other HMI devices in the following respects: Only the simple recipe view is supported. Recipe tags are always synchronized with the recipe view (see figure above): When the operator changes a value of the recipe element in recipe view, the value of the associated recipe tag will also change. Recipe tags are not automatically transferred between the PLC and HMI device when they are modified. Recipe tags are always transferred manually in teach-in mode. There must be an operator control object with the "SetDataRecordToPLC" and "GetDataRecordFromPLC" functions present in order to synchronize the values with the PLC.
Note Restrictions for recipe tags Generally, in Basic Panels and OP77A, TP177A (Portrait) recipe tags cannot be used, except in a recipe.
Note Restrictions for Import / Export It is not possible to export or import the recipes for the following HMI devices: Basic Panels OP 77A OP 177A TP 177A (Portrait) Complete recipe data, but not single recipe data records, can be exported and imported using ProSave in CSV format and transferred to the HMI device. Thereby, Runtime is interrupted.
NOTICE Data loss with several recipe views in the screen Applies only to Basic Panels, OP73, OP77A, TP177A and TP177A (Portrait): If two or more recipe views show the same recipe in a screen, you have a conflict when accessing the data. The result is data loss and unpredictable status of recipe data. Make sure the operators do not select and edit the same recipe in different recipe views. Display only one recipe in a recipe view. Display a different recipe in each recipe view.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4171 Interaction between the components There is interaction between the following components at runtime: Recipe view Recipes are displayed and edited in the recipe view on the HMI device. The recipe data records from the internal memory of the HMI device are displayed and edited in the recipe view. HMI device recipe memory Recipes are saved in the form of recipe data records in the HMI device's recipe memory. Recipe tags The recipe tags contain the values of recipe elements. Synchronization of recipe data records with the PLC Overview When recipe data records are transferred between the HMI device and PLC, both communication peers access common communication areas on the other peer. Recipe data records are always transferred directly. The values of the tags are written directly to or read directly from the configured addresses without being placed on the clipboard. Data transfer types There are two ways to transfer recipe data records between the HMI device and PLC: Transfer without coordination Coordinated transfer via the "Data record" area pointer.
Note Coordinated transfer Transfer with coordinated transfer is used to prevent the uncontrolled overwriting of data in either direction in your control program.
Requirements for coordinated transfer The following requirements apply to coordinated transfer: The "Data record" area pointer must be set up for the required connection in the "Communication > Connections" editor. In the properties of the recipe "Coordinated transfer of data records" is activated. The connection to the PLC is specified in the properties of the recipe with which the HMI device coordinates the transfer. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4172 System Manual, 02/2014 Coordinated transfer In the case of coordinated transfer, both the PLC and the HMI device set the status bits in the shared data compartment. Coordinated transfer of recipe data records can be a useful solution in the following cases: The PLC is the "active partner" for the transfer of recipe data records. The PLC evaluates information about the recipe number and name, as well as the recipe data record number and name. The transfer of recipe data records is started by the following PLC jobs: "Set_data_record_in_PLC" "Get_data_record_from_PLC" "Recipes" editor Introduction You can create, configure and edit recipes, recipe entries and recipe data records in the "Recipes" editor. The "Recipes" editor also allows you to enter values in recipe data records. Structure of the "Recipes" editor You create recipes in the top part of the table editor. You can also configure them there or in the Inspector window. The bottom part of the table editor has the following tabs: Elements Define the recipe elements of the selected recipe using the table cells provided here. You can move recipe elements within the table with the shortcut menu commands, "Up" and "Down". Data records Define the values of the data records of the selected recipe using the table cells provided here. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4173 You can then configure the selected recipe, the recipe element or the recipe data record in the Inspector window. You will find further notes on configuring the components of a recipe under "Configuring Recipes". Recipe settings The following settings are available for recipes: Setting Description Name of the recipe This is a unique identification for the recipe within the HMI device. Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Assign descriptive names or designations which the operator can associate directly with a recipe, e.g. "fruit juice drink". Recipe number This is a unique identification for the recipe within the HMI device. Version Information about the recipe. The date and time of the last change to the recipe is set by default. Path Defines the storage location for recipes. The recipes are stored as a file. Size type [fixed] The recipe data records are limited to a predetermined number by default. Number of data records [fixed] Maximum number of data records in a recipe in Runtime. The number is limited by the recipe memory of the HMI device. Communication type [fixed] The recipe data records are written directly to the addresses of the recipe tags and read from there. Tooltip Tooltip for the recipe which is shown to the operator in Runtime.
Note Path The storage location depends on the storage media available on the HMI device. Basic Panels and OP77A, TP177A (Portrait) These HMI devices have no external memory. Recipes are always saved in the internal Flash memory. The "Path" setting is therefore not available.
Recipe element settings You can make the following settings on the "Elements" tab: Setting Description Name of the recipe element Identifies a recipe element uniquely within the recipe. Enter meaningful names or labels that you can allocate uniquely, such as axis labels on a machine or ingredients such as "Flavoring". Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Assign meaningful names or designations which the operator can associate directly, e.g. "fruit juice flavoring". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4174 System Manual, 02/2014 Setting Description Recipe tag An assigned tag in Runtime stores the current value of the recipe element in the recipe data record. Data type Data type of the recipe tag. Data length [fixed] Data length of the recipe tag, depending on the data type. Text list Text is assigned to a value or range of values in a text list. You can display this text in an output field, for example. The assigned recipe tag must have the data type of a number. The tag value must be within the range of values of the text list. Default value This is used as the default entry when you create a new recipe data record. Minimum value [fixed] The smallest representable value of a number-based recipe tag, depending on the type of data. Maximum value [fixed] The largest representable value of a number-based recipe tag, depending on the type of data. Decimal places Determines how many places a decimal number is rounded to, e.g. 3 decimal places and vice versa by what power of ten an integer value is multiplied, e.g. 1,000. Tooltip Tooltip about the recipe element which is shown to the operator in Runtime. Recipe data record settings You can make the following settings on the "Data records" tab: Setting Description Name of the recipe data record Identifies a recipe data record uniquely within the recipe. Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Assign meaningful names or product numbers which the operator can associate directly with a product, e.g. "yellow fruit juice E231". Recipe data record number Identifies a recipe data record uniquely within the recipe. Recipe elements 1 to n You can store various values for each recipe element even during configuration. Together with the values of the other recipe elements, a value always forms a recipe data record. You can store multiple recipe data records. If enabled in the transfer settings, the recipe data records are transferred to the HMI device when downloading the project and existing data records on the HMI device are overwritten. Comment Comment about the recipe data record 10.5.1.2 Displaying and Editing Recipes in Runtime Recipe screen and recipe view You can display and edit recipes on the HMI device with a recipe view or recipe screen. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4175 Recipe view The recipe view is an off-the-shelf WinCC display and operator control object. The recipe view is available in the following views: As anvanced recipe view As simple recipe view
Note Availability In basic panels and OP77A, TP177A, only the simple recipe view is available.
Recipe screen The recipe screen contains an individual screen form for entering the recipes. The screen form contains I/O fields and other display and operator control objects. The recipe functionality is implemented with system functions, e.g. for saving recipe data records.
Note Availability In basic panels and OP73, OP77A, TP177A (Portrait), the recipe screens are not available.
Simple recipe view Recipe view The simple recipe view is a ready-made display element and operator control that is used to manage recipe data records. The recipe view shows recipe data records in tabular form. The displayed buttons and information in the columns are adjustable. The values displayed or entered in the recipe view are saved in recipe data records. The displayed recipe data record can be written into the PLC by buttons or values can be read in from the PLC. Layout of the display The simple recipe view consists of three areas: Recipe list Data record list Element list In the simple recipe view, each area is shown separately on the HMI device. Depending on the configuration, the simple recipe view starts with the recipe list. The figure below shows an example of the data record list. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4176 System Manual, 02/2014 Beverage Juice Nectar 1 2 3 Display of values
Note Processed recipe data record is changed in the background Only applies for Basic Panels: if an operator has changed a recipe data record and a PLC job wants to read or write any recipe data record of this recipe, the PLC job is stopped and a system alarm is output. On the other hand, the changed value is displayed immediately if only the PLC job and no operator has changed recipe data. Does not apply for Basic Panels: If an operator has changed a recipe data record and a PLC job has changed the values of the recipe data record concerned, the recipe view is not updated automatically. To update the recipe view, reselect the respective recipe data record.
See also Recipe view (Page 3598) Configuration options of the simple recipe view The response of the simple recipe view can be defined in the recipe view inspector window.
Note Validity Some devices, for example basic panels, only support the simple recipe view. For all other devices, observe the following: In the Inspector window, under "Properties > Display > Mode", select "Simple view" as "View type". The "Properties > Simple view" area contains additional properties only applicable to the simple recipe view. All other properties are also applicable to the advanced recipe view.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4177 Displaying recipe data record values only To display the recipe data in a recipe view for checking only, proceed as follows: 1. Deselect "Edit mode" in the "General" group. You cannot create, rename, edit or delete recipe data. Writing a recipe data record number or name to a tag A tag to each recipe data record can be configured in the advanced recipe view. Depending on the "String" or "Int" data type of the tag, the name or number of the recipe data record is stored in the tag. Conversely, the tag can also be used to select a recipe data record by entering the corresponding value. For example, the tag can be transferred as a parameter for a system function. Proceed as follows: 1. Enter a tag of the "Int" type in the field "Tag", under "Properties > General > Recipe data record". The number of the recipe data record is stored in a tag. Configuring an event on the recipe view
Note Events and buttons The "Events" register is faded out when a minimum of one button is enabled.
To configure an event for the recipe view, proceed as follows: 1. Select the recipe view that was added to the screen in the "Screens" editor. The properties of the recipe view are shown in the Inspector window. 2. Deactivate all buttons under "Properties > Toolbar" and "Properties > Simple view". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4178 System Manual, 02/2014 3. In the Inspector window, under "Properties > Events", click the event to be configured, e.g. "Enable". 4. Configure a function list for the event. The function list is processed when the operator enables the recipe view. Animation properties of the recipe view To configure an animation of a recipe view, proceed as follows: 1. Select the recipe view that was added to the screen in the "Screens" editor. The properties of the recipe view are shown in the Inspector window. 2. Click under "Properties > Animations" in the Inspector window. 3. Link a tag to one or more of the following properties. X-Position and y-Position Design: Colors, flashing Operability Visibility In the "Animations> Overview" area, all animations are summarized in tabular form. Under "Animations> Tag links > Tag linkage", as well as visibility and position a tag can also be linked to height and width.
Note Animations and buttons If all buttons are not disabled, an error message appears whilst compiling the project for windows-CE HMI devices.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4179 Constraints on the simple recipe view The following functions are not possible in the simple recipe view: Synchronizing recipe view and recipe tags Writing a recipe number / name to a tag Display status bar Display data record number Display label Display table Advanced recipe view Recipe view The advanced recipe view is an off-the-shelf display and operator control object that is used to manage recipe data records. The recipe view shows recipe data records in tabular form. The buttons, headers and information displayed in the columns are variable. The values displayed or entered in the recipe view are saved in recipe data records. Layout of the display The picture below contains an example of the advanced recipe view: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4180 System Manual, 02/2014 Display of values
Note Changing the recipe data record in the background Applies to the processing of a recipe data record: If values of the corresponding recipe data record are changed by a control job, the recipe view is not updated automatically. To update the recipe view, reselect the respective recipe data record.
See also Recipe view (Page 3598) Configuration options of the advanced recipe view The response of the advanced recipe view in the recipe view inspector window can be determined.
Note Validity The following description also applies to the advanced recipe view. In the Inspector window, under "Properties > Display > Mode", select "Advanced view" as "View type". All properties described for the simple recipe view are also applicable in the advanced recipe view, except "Properties > Simple view". The "Simple view" area contains additional properties only applicable to the simple recipe view. Basic Panels, OP77A and TP177A (Portrait) do not support any advanced recipe view.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4181 Displaying a recipe To allow access to the recipe data records of a specific recipe only in a screen, proceed as follows: 1. Enter the recipe or select an existing recipe in the "Recipe" field, under "Properties > General". 2. When a recipe is entered in the "Recipe" field, you will have to enable the "Selection list" if you want to display the recipe name in Runtime. The selected recipe appears in the recipe view. Writing a recipe number or name and recipe data record number or name to a tag Both the recipe and the recipe data record can each be configured to a tag in the recipe view. Depending on the "String" or "Int" data type of the tag, the name or number of the recipe or recipe data record is stored in the tag. Conversely, the tag can be used to select the recipe or recipe data record by entering the corresponding value. For example, the tag can be transferred as a parameter for a system function. Proceed as follows: 1. Enter a tag of the "String" type in the field "Recipe tag", under "Properties > General > Recipe". 2. Enter a tag of the "Int" type in the field "Tag", under "Properties > General > Recipe data record". The name of the recipe and the number of the recipe data record are each stored in a tag. Using the recipe view as a drop-down list To use the recipe view as a selection field for recipes and recipe data records in a recipe screen, proceed as follows: 1. Select the tag for the recipe name under "General > Recipe > Recipe tag". 2. Select the tag for the recipe data record name under "General > Recipe data record >Tag". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4182 System Manual, 02/2014 3. Disable the "Edit mode". You cannot create, rename, edit or delete recipe data. 4. In order to select recipes, enable "Show selection list" and make sure that no recipe is selected under "Properties > General > Recipe". 5. Deactivate all buttons under "Properties > Toolbar". Configuring an event on the recipe view To configure an event on the recipe view, proceed as follows: 1. Select the recipe view that was added to the screen in the "Screens" editor. The properties of the recipe view are shown in the Inspector window. 2. In the Inspector window, click the event you want to configure under "Properties > Events". 3. Configure a function list for the selected event. The function list is processed when the configured event occurs. Response of the recipe view in Runtime Screen change If you change to another screen and have not yet saved changes to the recipe data in the recipe view, you will be prompted to save the recipe data. The recipe name and the name of the recipe data record are displayed to show which recipe data have not been saved yet. Create, change, copy or delete recipe data records If you attempt to create a new recipe data record and a recipe data record already exists, a system alarm will appear on screen. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4183 Operating the recipe view with function keys The Recipe view can be operated with function keys, e.g. if the HMI device does not have touch functionality. You can assign functions such as "SaveDataRecord" to the function keys on the HMI device. Display after import of recipe data
Note Availability Import and export of recipe data is not available for Basic Panels and OP77A, TP177A (Portrait).
If you open the recipe view during the import of recipe data, only the recipe data that is already completely imported will be displayed. The recipe view is not automatically updated with a data import. In order to have a complete view of all the recipe data, do not open the recipe view until the system prompts you that the recipe data has been imported successfully. Alternatively, update the recipe view after successful completion of the import procedure. Updating tag for recipes and recipe data records
Note Availability Tags for recipes and recipe data records are not available for Basic Panels and OP77A, TP177A (Portrait).
The current recipe data record or its number can be saved to a tag, depending on the configuration. The tag will be updated under the following conditions: The recipe data record has been loaded. The screen with the recipe view was not exited during loading. This operation may take some time. Basics on the recipe screen Introduction The recipe screen contains an individual screen form for entering the recipes. The screen form contains I/O fields and other display and operator control objects. The recipe functionality is implemented with system functions, e.g. for saving recipe data records. The picture below contains an example of a recipe screen: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4184 System Manual, 02/2014 Water Concentrate Sugar Flavoring Recipe name: Data record name: No.: No.: Save Load Data from the PLC Data to PLC Orange Nectar 1 2 40 70 30 30 l l kg l
Note Availability of recipe screens Basic Panels and OP73A, OP77A, TP177A (Portrait) do not support any recipe screens.
Principle Configuring a recipe screen allows you to customize the display. You can spread large recipes over several screens according to topic and display them clearly using features such as graphical display and operator control objects. Spreading recipes over several screens according to topic You can distribute recipe data records with multiple entries across several screens. For example, for each plant area you can configure a screen containing the associated screen forms for the recipe data records. Spreading recipes over several screens is useful for HMI devices with small displays as they avoid having to scroll through tables in Runtime. Visual machine simulation You can visually simulate your machine in a screen using graphical screen objects. This enables you to display parameter settings more clearly by positioning I/O fields immediately next to machine elements such as axes or guide rails. which produces a direct relationship between the values and the machine. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4185 Synchronizing recipe values To enter recipe data record values outside the advanced recipe view in the configured I/O fields, activate "Synchronize recipe view and recipe tags" under "Properties > Synchronization" in the recipe properties. The "Synchronize recipe view and recipe tags" option is not available for the simple recipe view. Transferring recipe values automatically If the entered recipe values must be immediately transferred to the connected PLC in Runtime, deactivate "Manual transfer of individual modified values (teach-in mode)" under "Properties > Options". Configure the "SetRecipeTags" system function if you want to enable and disable the immediate transfer of entered recipe values in Runtime. System functions The following system functions are available for operator control of a recipe screen: ImportDataRecords ExportDataRecords LoadDataRecord SaveDataRecord SetDataRecordTagsToPLC GetDataRecordTagsFromPLC The following system functions are available for operator control of the recipe view when it is being used in the recipe screen: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4186 System Manual, 02/2014 RecipeViewSaveDataRecord RecipeViewSaveAsDataRecord RecipeViewSynchronizeDataRecordWithTags RecipeViewDeleteDataRecord RecipeViewNewDataRecord RecipeViewGetDataRecordFromPLC RecipeViewRenameDataRecord (for simple recipe view only) RecipeViewShowOperatorNotes RecipeViewMenu (for simple recipe view only) RecipeViewOpen (for simple recipe view only) RecipeViewBack (for simple recipe view only) The system functions for loading, saving and transferring recipe data records and recipes are located in the "Recipes" group. 10.5.1.3 Configuring Recipes General configuration procedure Carry out the following configuration steps when you create a new recipe: Step Description 1 Define the structure of the recipe. 2 Create tags according to the recipe structure. Assign process names to these tags. 3 Create the recipe. 4 Enter the required properties for the recipe: Language-dependent view name of the recipe "Coordinated transfer of data records" option Not for Basic Panels: Recipe storage location "Synchronize recipe view and recipe tags" option "Manual transfer of individual modified values (teach-in mode)" option 5 Create the recipe elements and enter the required properties: Language-dependent view name of the recipe elements Tag binding of the recipe elements Standard values and decimal places (power of ten) for the recipe elements 6 Create the recipe data records. Enter the language-specific display names for the recipe data records. 7 Configure a screen with recipe view or a recipe screen. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4187
Note Basic Panels and OP77A, TP177A (Portrait) The selection of the storage location is not available for these devices. The recipes are always saved in the internal Flash memory. Recipe tags cannot be used outside a recipe, e.g. not in I/O fields, not in alarms as trigger tags, not in systems functions as parameters, etc.
Note Restrictions recipe view and recipe image Only the simple recipe view is available in Basic Panels and OP77A, TP177A. Recipe images are not available in Basic Panels and OP73, OP77A, TP177A (Portrait).
Creating and Editing Recipes Creating a new recipe Introduction To create a complete recipe, start by creating a new recipe, assign the corresponding recipe elements and then define the associated values in a recipe data record. Requirement The tags for the recipe have been created. The "Recipes" editor is open. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4188 System Manual, 02/2014 Create recipe Create a recipe as follows: 1. Click "Add" in the first free row of the table in the "Recipes" editor. The new recipe is created and displayed on a line. 2. Enter a descriptive name for the recipe under "Name" in the "General" area. This name identifies the recipe unambiguously within the project. 3. Select "Display name" to enter the language-specific name to be displayed in runtime. 4. Select a recipe number in "Number". The number identifies the recipe unambiguously within the HMI device. The recipe is automatically assigned a version that indicates the date and time of the last change. As an alternative, you can enter specific information relating to the recipe. 5. Specify the storage location for recipe data records in "Data medium". The options offered depend on the specific HMI device used.
Note Basic Panels and OP77A, TP177A (Portrait) The selection of the storage location is not available for these devices. The recipes are always saved in the internal Flash memory. Recipe tags cannot be used outside a recipe, e.g. not in I/O fields, not in alarms as trigger tags, not in systems functions as parameters, etc.
6. Enter a tooltip that is shown to the operator in runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4189 7. To compare recipe tags which are configured in I/O fields with the recipe view in Runtime, activate "Synchronize recipe view and recipe tags" in the Inspector window under "Properties > Synchronization".
Note Basic Panels and OP77A, TP177A (Portrait) Because the recipe tags cannot be additionally used in I/O fields in screens for Basic Panels, the "Synchronize recipe view and recipe tags" is not available; you will also not be able to use the "Manual transfer of individual modified values (teach-in mode)" option.
8. Deactivate "Manual transfer of individual modified values (teach-in mode)" to specify that the recipe tags are automatically transferred to the PLC when editing the I/O fields. 9. Activate "Coordinated transfer of data records" to monitor the transfer of recipe data in Runtime using area pointers. 10.Select the appropriate connection to the PLC for coordinated transfer under "Synchronize with". Create recipe element To create recipe elements, proceed as follows: 1. Click the "Elements" tab. 2. Click "Add" in the first free line of the table editor. A new recipe element is created. 3. Enter a descriptive name for the element under "Name". The name identifies the element uniquely within the recipe. 4. Enter a language-specific display name for the element under "Display name". The display name appears in the recipe view, for example, in runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4190 System Manual, 02/2014 5. Select the tag you want to link to the recipe element under "Tag". The value of the recipe data element is saved in Runtime in this tag, which is stored in a recipe data record. 6. Enter a tooltip. The tooltip is shown to the operator in Runtime. 7. Under "Default value", enter the value that you want to use as the default entry when you create a new recipe data record. 8. To assign text to a value or range of values, select the relevant text list here. The assigned recipe tag must have the data type of a number. The tag value must be within the range of values of the text list. The text stored in the text list is displayed in an output field, for example, in Runtime. 9. Determine exactly how many places a decimal number is rounded to in the "Decimal places" column, e.g. 3 decimal places and vice versa by what power of ten an integer value is multiplied, e.g. 1,000. Examples for 3 decimal places: Entering "5" for a recipe element with the "Integer" data type gives the value "5000". Entering "5.6789" for a recipe element with the "Real" data type gives the value "5.679". 10.Create as many recipe entries as needed for the recipe. The maximum number of recipe entries possible depends on the HMI device being used. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4191 Create recipe data record with known recipe values To create recipe elements, proceed as follows: 1. Click the "Data records" tab. 2. Click "Add" in the first free line of the table editor. A new recipe data record is created. The recipe data record has a separate column for every recipe element created in the recipe. 3. Enter a descriptive name under "Name". The name identifies the data record uniquely within the recipe. 4. Enter a language-specific name under "Display name". The display name appears in the recipe view, for example, in runtime. 5. Enter a recipe data record number under "Number". The recipe data record number identifies the recipe data record uniquely within the recipe. 6. If you already know the recipe values at the configuration stage, you can enter the relevant value for each recipe element. 7. Create as many data records as you need for the recipe. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4192 System Manual, 02/2014 Enter the values in runtime The following options are available for entering values in the recipe data records at runtime: Transfer data directly from the PLC (Teach-in mode) Import of values from a CSV file Input values on the HMI device
Note Basic Panels and OP77A, TP177A (Portrait) The import of values is not available for these devices.
Result The complete recipe is configured. Recipe data records with date or time stamp If you use date or time data, make sure that the system setting for time and date on the configuring computer match those on the target system. Example: You load a recipe data record on the target system at 13:55 in which 14 h is stored as the processing time. If it is already 14:05 on the target computer, the recipe will not be processed. If an operator processes the recipe, change information will not written back correctly into the database. After loading to the target system, check the recipes with date or time stamps on the target system. Editing a recipe Purpose You want to modify, extend or delete parts of a recipe. Requirement You have created at least one recipe. The "Recipes" editor is open. Changing recipe settings To change the recipe settings, proceed as follows: 1. Select the recipe that you want to change in the "Recipes" editor. The Inspector window opens. 2. Change the recipe configuration in the Inspector window. You change recipe elements and recipe data records in the same way. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4193 Change recipe values To change recipe values, proceed as follows: 1. Select the recipe whose values you want to change. 2. Click the "Data records" tab. 3. Enter the new values in the value columns. Adding a recipe element To add more recipe elements to a recipe, proceed as follows: 1. Select the recipe to which you want to add more elements in the "Recipes" editor. 2. Click the "Elements" tab. 3. Click "Add" in the first free line. The recipe element is created. 4. Configure the recipe element. You add recipe data records in the same way. Managing recipes Requirement You have created a recipe with recipe elements and recipe data record. The "Recipes" editor is open. Renaming recipes We distinguish between internal names and display names for recipes, recipe entries and recipe data records. To rename recipe elements, proceed as follows: 1. Select the recipe that you want to rename. The Inspector window opens. 2. Select the "Rename" command from the shortcut menu. 3. Enter the new name. You rename recipe elements and recipe data records on the relevant tab in the same way.
Note The view names in the "Recipes" editor can also be renamed under "Languages & Resources > Project Texts". This possibility is useful when you have already configured in several languages for example.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4194 System Manual, 02/2014 Copying and pasting recipes To copy and paste recipes, proceed as follows: 1. Select the recipe that you want to copy. 2. Select the "Copy" command from the shortcut menu. 3. Select the "Paste" command from the shortcut menu in the first free table row. The copied recipe is pasted into the table. The recipe elements and recipe data records are also copied in the appropriate tab with the recipe. You also copy the recipe elements and recipe data records on the appropriate tab in the same way. If a recipe data record of the same name already exists, the name of the copied recipe data record is extended by one digit. This ensures that the name is unique. Recipe data records can only be copied or pasted within the same recipe. Deleting a recipe To delete a recipe, proceed as follows: 1. Select the recipe that you want to delete. 2. Select the "Delete" command from the shortcut menu. The recipe is deleted. You delete recipe elements and recipe data records on the relevant tab in the same way.
Note When a recipe is deleted, the recipe data records contained in the recipe are also deleted.
Note When you delete a recipe element, the associated values in the recipe data records are also deleted. The assigned tags are retained.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4195 Configuring the display of recipes Configuring the simple recipe view Requirement The recipe has been created. The "Screens" editor is open. The screen has been created and opened.
NOTICE Data loss with several recipe views in the screen Applies only to Basic Panels, OP73, OP77A, TP177A and TP177A (Portrait): If two or more recipe views show the same recipe in a screen, you have a conflict when accessing the data. The result is data loss and unpredictable status of recipe data. Make sure the operators do not select and edit the same recipe in different recipe views. Display only one recipe in a recipe view. Display a different recipe in each recipe view.
Procedure To configure a simple recipe view, proceed as follows: 1. Paste the recipe view into the screen. You will find the recipe view under "Controls" in the "Tools" task card. 2. Only in devices which also support the extended recipe view: Activate "Simple view" under "Properties > Display > Mode". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4196 System Manual, 02/2014 3. If you want to display only the recipe data records of a specific recipe in the recipe view, select the specific recipe under "Properties > General > Recipe". 4. If you only want to display the recipe data in the recipe view, deactivate "Processing mode" in the "Recipe data record" area. 5. You can define additional options for the recipe view under "Properties > Appearance" and "Properties > Layout". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4197 6. Select "Properties > Simple view" to select the position, the field length, and the number of lines required. Select "Position > Top" to display the recipe value in the first line of the recipe entry. Select "Position > Bottom" to display the recipe value in the last line of the recipe entry. 7. Under "Properties" > Toolbar" specify which menu commands are available in the recipe view in Runtime. Result The simple recipe view is configured. You can use the recipe view to display and edit recipe data during runtime. Deactivation of the editing mode in "Properties > Properties > General" has no impact on the toolbar icons. The buttons you activated in "Properties > Toolbar" can still be used even if editing mode is disabled. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4198 System Manual, 02/2014 Configuring the Advanced Recipe View Requirement The recipe has been created. The "Screens" editor is open. The screen has been created and opened. Procedure To configure an advanced recipe view, proceed as follows: 1. Paste the recipe view into the screen. The recipe view is found in the task card "Tools" > "Controls". 2. Select "Properties > Display > Mode > Advanced view" in the Inspector window. 3. Select the required settings from the "General" group in the Inspector window. If you want to display only the recipe data records for a particular recipe in the recipe view, select the recipe under "Recipe" in the "Recipes" area. If you want to save the recipe name or the recipe number in a tag, select the tag under "Recipe tag" in the "Recipe" area. If you want to save the recipe data record name or number in a tag, select the tag under "Tag" in the "Recipe data record" area. If you only want to display the recipe data in the recipe view, deselect "Edit mode". If you only want to use the recipe view to select recipes, disable "Display table" under "Properties > Table". 4. You can define additional options for the recipe view under "Properties > Appearance" and "Properties > Layout". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4199 5. If you want to change the label in the recipe view, enter a suitable text under "Properties" > "Label". 6. Under "Properties" > Toolbar" specify which buttons are available in the recipe view in Runtime.
Note If you select the "Edit" command in the context menu of the recipe view, the recipe view becomes active. To activate the recipe view, the zoom factor must be set to 100%. You can set the column width and the position of the "Entry name" and "Value" columns in active mode.
Result The recipe view is configured. You can use the recipe view to display and edit recipe data during runtime. Deactivation of the editing mode in "Properties > Properties > General" has no impact on the toolbar icons. The buttons you activated in "Properties > Toolbar" can still be used even if editing mode is disabled. Configuring a recipe screen Introduction The recipe screen is a screen in which you configure a customized screen form in the "Screens" editor. You create the screen form from input/output fields and other display and operator Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4200 System Manual, 02/2014 control objects. System functions are used to configure the recipe functionality, such as saving recipe data records.
Note Availability Recipe screens cannot be created for basic panels and OP73, OP77A and TP177A (Portrait).
Application You can spread recipe data records containing lots of entries across several screens. For example, for each plant you can configure a screen containing the associated screen forms for the recipe data records. You can visually simulate your machine in a screen using graphical screen objects. This enables you to display parameter settings more clearly by positioning I/O fields immediately next to machine elements, such as axes or guide rails. You can use this to produce a direct reference between the values and the machine. Requirement You have created the recipe. The "Screens" editor is open. Procedure To configure a recipe screen, proceed as follows: 1. Configure the screen and create the I/O fields for the input mask of the recipe. You can create multiple screens to suit the size and complexity of the recipe. 2. Configure the I/O fields with the tags you have linked to the recipe element. 3. Configure I/O fields for selecting recipes and recipe data records. Alternatively: 1. Configure a recipe view as a selection list for recipe data records and recipes. 2. Hide the buttons that are not required in the recipe view. 3. Configure the system functions for editing recipe data records on the configured control elements. Control elements are configured buttons in the screen or function keys on the HMI device. You will find the system functions for editing recipe data records under "Recipes" and "Keyboard operation for screen objects". Result The recipe screen is created. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4201 Importing recipes into the configuration and exporting them Introduction You can export recipes as a CSV file and import them again into the configuration. Application case Recipe data is exported for long-term storage and backup on a computer. In order to unify and distribute recipe data, export the recipe data to an HMI device. Change the CSV file in Microsoft Excel and import the CSV file to all HMI devices that require the same recipe data. You want to exchange recipe data between different projects. You change the recipe data in Runtime. To transfer the modified recipe data to WinCC ES, export the recipe data records in Runtime and copy the CSV file to the configuring computer. There you import the CSV file containing the recipe data records into the recipe. And in the opposite direction, you transfer the modified recipe data records to the HMI device in WinCC ES in Runtime. Requirement You have created the recipe. The structures of the exported CSV file and the recipe in WinCC ES match; name, number and data type of the recipe elements are identical. The "Recipes" editor is open. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4202 System Manual, 02/2014 Importing CSV files To import recipe data records into a recipe, proceed as follows: 1. Select the row which contains the desired recipe in the "Recipes" tab. 2. Select the "Import recipe data" command from the shortcut menu. The "Import" dialog box opens. 3. To select the desired CSV file, go to "File name". 4. Under "Strategy", specify whether a recipe data record with the same recipe number in WinCC ES should be overwritten. 5. Specify the list separator and decimal separator under "Data separation". The list separator separates individual recipe elements in the CSV file. The decimal separator separates integers and decimal places.
Note Use the same list separator for import as in the CSV file for export.
6. Click "Import" to start the operation. Result The recipe will be amended by recipe data records from the CSV file that have not yet been entered. If the option is selected, existing recipe data records will be overwritten. An error message is shown in the "Info" of the Inspector window if the structure of the recipe does not match the structure of the CSV file. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4203 Exporting CSV files 1. Select the row which contains the recipe to export in the "Recipes" tab. 2. Select the "Export recipe data" command from the shortcut menu. The "Export" dialog box opens. 3. Under "File name", specify the path of the CSV file. 4. Select all recipe data records under "Selection content", or restrict the selection to specific record numbers of the recipe data. 5. Specify the list separator and decimal separator under "Data separation". The list separator separates individual recipe elements in the CSV file. The decimal separator separates integers and decimal places. 6. Click "Export" to start the operation. Result The configuration is exported as a CSV file. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4204 System Manual, 02/2014 10.5.1.4 Using Recipes in Runtime Simple recipe view Description of the simple recipe view Layout The simple recipe view consists of the following display areas: Recipe list Data record list Element list This application is illustrated below: Beverage Juice Nectar 1 2 3 In the simple recipe view, each area is shown separately on the HMI device. You can use the shortcut menu to operate each of these display areas. The simple recipe view always begins with the recipe list. Operation You have the following options for using the simple recipe view, according to the configuration: Create, change, copy or delete recipe data records Read recipe data records from the PLC or transfer to the PLC Using the display area and shortcut menu Toggle between the display areas and the shortcut menus to operate the simple recipe views. The table below shows the operation of the display area. Button Key Function <Enter> The next lowest display area is opened, i.e. the data record list or the element list. <Esc> The previous display area opens. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4205 Button Key Function <INS> Creates a new data record for the selected recipe if the list of recipes or recipe data records is displayed. Then changes to the list of recipe element. Requirement: "Properties >General > Processing mode" is activated. The button can be simulated with the "Key SimulateSystemKey" function even on devices without keys. <DEL> Deletes the selected recipe data record in the list of recipe data records. Requirement: "Properties >General > Processing mode" is activated. <Up>/<Down> Selects the previous/next entry. <Pg Up>/<Pg Down> Moves the display up or down one page. <Home>/<End> Selects the first/last entry. The first/last entry is selected. The table below shows the operation of the shortcut menu: Button Key Function <Right> The shortcut menu of the display area opens. <Esc> The menu is closed. The display area opens. Input of the number of the menu command The menu command is executed. Shortcut menus of the simple recipe view You can click the button in each display area to call up a selection of commands. The command selection lists those commands that are available in the current display area. A number is assigned to each command. The command is executed when you enter this number. Alternatively select the command and press the <Return> key. Shortcut menus in the recipe list Menu command Function New A new recipe data record is created for the selected recipe. If a start value is configured, it is displayed in the input field. Display tooltip The tooltip configured for the recipe is displayed. Open The record list of the selected recipe opens. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4206 System Manual, 02/2014 Shortcut menus of the recipe data record list Menu command Function New Creates a new recipe data record. If a start value is configured, it is displayed in the input field. Deleting The displayed record is deleted. Save as The selected data record is saved under a different name. A dialog box opens where you can enter the name. Rename Renames the selected data record. A dialog box opens where you can enter the name. Open The element list of the selected data record opens. Previous The recipe list opens. Shortcut menus of the recipe element list Menu command Function Save The selected data record with the recipe element is saved. To PLC The displayed values of the selected data record are transferred from the HMI device to the PLC. From PLC The recipe values from the PLC are displayed in the recipe view of the HMI device. Save as The data record is saved under a new name. A dialog box opens where you can enter the name. Display tooltip The tooltip configured for the recipe element is displayed. Rename The selected recipe element is renamed. A dialog box opens where you can enter the name. Previous The data record list opens. Shortcut menus in the data record list
Note HMI device dependency The following menu commands are configured in Basic Panels and in OP 77A, TP 177A, TP 177A (Portrait) and TB 177B.
Menu command Function To PLC The displayed values of the selected data record are transferred from the HMI device to the PLC. From PLC The recipe values from the PLC are displayed in the recipe view of the HMI device. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4207 Using the simple recipe view Controlling the simple recipe view with mouse or touchpad To control the simple recipe view with mouse or touchpad, proceed as follows: 1. Select the desired recipe from the recipe view. 2. Click the button. The shortcut menu is opened. 3. Select the desired menu command. The menu command is executed. Controlling the simple recipe view with the keyboard To control the simple recipe view with the keyboard, proceed as follows: 1. Press the <Tab> key until the simple recipe view is selected. 2. Select the desired recipe with the cursor keys. 3. Press <Right>. The shortcut menu is opened. 4. Press the <Down> key until the desired menu command is selected. 5. Press <Enter> to confirm the command. Key shortcuts for the simple recipe view The following key shortcuts are activated for the simple recipe view in Runtime if "Activate keyboard operation" is enabled in the ES. Key shortcut Effect Menu command <Insert> Generates a new recipe data record New <Del> Deletes the recipe data record displayed. Delete Managing recipe data records Recipe data record administration You have the following options for managing the simple recipe view, according to the configuration: Creating new recipe data records Copy recipe data records Edit recipe data records Delete recipe data records Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4208 System Manual, 02/2014 Creating new recipe data records To create a new recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to create a new recipe data record. 2. Select the "New" command from the shortcut menu for the recipe list. A new data record with the next available number will be created. The element list of the new recipe data record opens. 3. Enter values for the elements of the recipe data record. The configuration data may already contain default values for the recipe data record. 4. Select the "Save" command from the shortcut menu for the element list. The dialog "Save as" opens. 5. Enter the name and number of the recipe data record. 6. Click the "OK" button. Result The new recipe data records will be saved to the selected recipe. If the recipe data records already exists, a system event will be output to the screen. Copying a recipe data record To copy a recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to copy an existing recipe data record. 2. On the HMI device, select the recipe data record of which you want to save a copy. 3. Select the "Save As" command from the shortcut menu for the data record list. The dialog "Save as" opens. The recipe data record is automatically given the next free recipe data record number. 4. Under name, enter the name of the record. 5. Click the "OK" button. Result The recipe data record is stored under the new name. Modify recipe data record To change a recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to edit an existing recipe data record. 2. Select the recipe data record that you want to edit on the HMI device. 3. Select the recipe data record. The element list of the recipe data record is displayed. 4. Replace the old values with new ones. 5. Select the "Save" command from the shortcut menu for the element list. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4209 Result The modified values are applied to the recipe data record. Deleting a recipe data record To delete a recipe data record, proceed as follows: 1. Select the recipe on the HMI device from which you want to delete an existing recipe data record. 2. Select the recipe data record that you want to delete on the HMI device. 3. Select the "Delete" command from the shortcut menu for the data record list. 4. Confirm this security prompt to delete the data record. Result The recipe data record is deleted. Read recipe data record from PLC Introduction In Runtime, you can change values directly in the plant that are also stored in recipes in the HMI device. This applies if a valve was opened further directly in the plant than was specified in the recipe. The values of the recipe data records saved in the HMI device possibly no longer match the values in the PLC. You can read the values of the recipe tags from the PLC and write them to a recipe data record. The read values are written to the recipe data record that is currently displayed on the HMI device. Procedure To read a recipe data record from the PLC, proceed as follows: 1. Open the recipe on the HMI device. The data record list opens. 2. Select the element list of the recipe data record to which you want to apply the values from the PLC. 3. Select the "From PLC" command from the shortcut menu for the element list. The values are read from the PLC and displayed in the current recipe data record. 4. If you want to save the values, select the "Save" or "Save As" command. Result The values are read from the PLC, visualized on the HMI device and saved to the recipe data record. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4210 System Manual, 02/2014 Transferring a recipe data record to the PLC Introduction For the values of a data record that was changed in the recipe view to take effect, you must transfer the values to the PLC. The values displayed in the recipe view are always transferred to the PLC. Procedure To transfer a recipe data record to the PLC, proceed as follows: 1. Open the recipe you want to use. The data record list opens. 2. Select the element list of the recipe data record whose values you want to transfer to the PLC. 3. Select the "To PLC" command from the shortcut menu for the element list. Result The values of the recipe data record are transferred to the PLC. Advanced recipe view Description of the advanced recipe view Application The recipe view is used to display, edit and manage data records. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4211 Operation Depending on the configuration you can: Create, change, copy or delete recipe data records Synchronizing recipe data records with the associated recipe tags Read recipe data records from or transfer to the PLC Operating elements The following operating elements can be configured in the recipe view: Operating element Key combination Function The configured tooltip is displayed. <Ctrl+Space Bar> Creates a new recipe data record. If a start value is configured, it is shown in the input field. <Ctrl+Enter> Saves the displayed values of the recipe data record. The storage location is predefined by the project. <Ctrl+*> The recipe data record is saved under a different name regardless of the recipe view. A dialog box opens where you can enter the name. <Ctrl+Del> The displayed recipe data record is deleted. <Ctrl+=> The system always updates the current value of the recipe view with the up-to-date recipe tag value. When the value shown in the recipe view is more recent than the current recipe tag value, the system writes this value to the recipe tag. "Synchronize recipe view and recipe tags" must be activated in the recipe properties before this function can be used. <Ctrl+Down> The values of the set recipe data record displayed in the recipe view are transferred to the PLC. <Ctrl+Up> The recipe values from the PLC are displayed in the recipe view. Using the advanced recipe view Introduction You can control the recipe view using both mouse or touchpad or with the keyboard. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4212 System Manual, 02/2014 Controlling the recipe view with mouse or touchpad To control the recipe view with mouse or touchpad, proceed as follows: 1. Select the recipe you want to use. The records for the recipe are displayed. 2. Click on the data record you wish to edit. 3. Click the button whose function you want to run. Controlling the recipe view with the keyboard To control the recipe view with the keyboard, proceed as follows: 1. Press the <Tab> key until the cursor reaches the field for selecting the recipe. 2. Press <Enter>. The drop-down list box for the recipes opens. 3. Select a recipe. You navigate between the next or previous entry in the list by using the cursor keys <Left>, <Right>, <Up> and <Down>. 4. Select a data record. 5. Press the <Tab> key until the operator control object you wish to use is selected. Alternatively you can control the recipe view using certain key combinations. Key shortcuts for the advanced recipe view The following key shortcuts are activated for the advanced recipe view in Runtime if "Activate keyboard operation" is enabled in the ES. Keys shortcut Effect Menu command Button <Ctrl +Space> Generates a new recipe data record. Any configured start value is displayed in the input field. Add data record <Ctrl+Del> Deletes the recipe data record displayed. Delete data record" <Ctrl+Enter> Saves the edited data record by its current name. Save <Ctrl+*> Saves the edited data record by a new name. Save as <Ctrl+=> Compares the values of the selected data record with the values on the PLC. Any value in the recipe view which is more recent compared to the current recipe tag value is written to the recipe tag. This function is only available if enabled in the ES. Synchronizing recipe tags <Ctrl+Down> Transfers the current value to the PLC. Write to PLC <Ctrl+Up> Reads the actual value from the PLC. Read from PLC Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4213 Managing recipe data records Administration of recipe data records You have the following options for managing recipe data records, according to the configuration: Create new recipe data records Copy recipe data records Edit recipe data records Delete recipe data records Creating new recipe data records To create a new recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to create a new recipe data record. 2. Click the button or press the <Ctrl + Spacebar> keys. A new recipe data record with the next available number is created. If you change the new data record number to an existing data record number, the existing data record is overwritten. 3. Enter values for the elements of the data record. The elements of the recipe data record can be assigned default values depending on the configuration. 4. Click the button or press the <Ctrl + *> keys. The dialog "Save as" opens. 5. Enter a name for the data record. 6. Click on "OK" to confirm your input. The data record is saved under the new name. If the recipe data record already exists, a dialog is opened. In this dialog, specify whether the existing data record is to be overwritten. Result The new recipe data records will be saved to the selected recipe. If the recipe data records already exists, a system alarm will be output to the screen. Copying a recipe data record To copy a recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to copy an existing recipe data record. 2. Select the recipe data record that you want to copy on the HMI device. 3. Click the button in the recipe view or press the <Ctrl + *> keys. The dialog "Save as" opens. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4214 System Manual, 02/2014 4. Enter a name for the data record. 5. Click on "OK" to confirm your input. Result The recipe data record is stored under the new name. Modify recipe data record To change a recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to edit an existing recipe data record. 2. Select the recipe data record that you want to edit on the HMI device. 3. Replace the old values with new ones. 4. Click the button in the recipe view or press the <Ctrl + Enter> keys. Result The modified values are applied to the recipe data record. Delete recipe data record To delete a recipe data record, proceed as follows: 1. Select the recipe on the HMI device in which you want to delete an existing recipe data record. 2. Select the recipe data record that you want to delete on the HMI device. 3. Click the button in the recipe view or press the <Ctrl + Del> keys. Result The recipe data record is deleted. Synchronizing recipe data record Introduction Differences between the following values may occur during runtime: The values displayed in the recipe view The actual values of the recipe tags Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4215 Depending on the configuration, the values displayed in the recipe view are synchronized with the recipe tags. Synchronization encompasses all tags of a recipe data record.
Note Changed tag name The tag and the value of the recipe data record cannot be associated if you have renamed the tag you want to synchronize. The tags in question are not synchronized.
Note Recipe tags can only be synchronized in the advanced recipe view.
Requirement A recipe data record is displayed in the recipe view. The values of recipe tags were modified by teaching, for example. Procedure To synchronize a recipe data record, proceed as follows: 1. Click the button in the recipe view or press the <Ctrl + => keys. Result The system always updates the current value of the recipe view with the up-to-date recipe tag value. When the value shown in the recipe view is more recent than the current recipe tag value, the system writes this value to the recipe tag. Read recipe data record from PLC Introduction In Runtime, you can change values directly in the plant which are also stored in recipes in the HMI device. This applies if a valve was opened further directly in the plant than was specified in the recipe. The values of the recipe data records saved in the HMI device possibly no longer match the values in the PLC. You can read the values of the recipe tags from the PLC and write them to a recipe data record. The read values are written to the recipe data record that is currently displayed on the HMI device. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4216 System Manual, 02/2014 Procedure To read a recipe data record from the PLC, proceed as follows: 1. Select the recipe on the HMI device. 2. On the HMI device, select the recipe data record of which you want to fetch the values from the PLC. 3. Click the button in the recipe view or press the <Ctrl + Up> keys. Result The values are read from the PLC and displayed on the HMI device. Transferring recipe data records to the PLC Introduction For the values of a data record that was changed in the recipe view to take effect, you must transfer the values to the PLC. The values displayed in the recipe view are always transferred to the PLC. Procedure To transfer a recipe data record to the PLC, proceed as follows: 1. Select the recipe on the HMI device. 2. On the HMI device, select the recipe data record of which you want to transfer the values to PLC. 3. Click the button in the recipe view, or press the <CTRL+DOWN> shortcut key. Result The values of the recipe data record are transferred to the PLC. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4217 Exporting and importing recipe data records Introduction Depending on configuration and the HMI device, either export recipe data records to a CSV file, e.g. for editing in MS Excel, or import these from a CSV file. The extent to which you can influence these processes is determined by the project configuration.
Note Restrictions for Import / Export It is not possible to export or import the recipes for the following HMI devices: Basic Panels OP 77A OP 177A TP 177A (Portrait) Complete recipe data, but not single recipe data records, can be exported and imported using ProSave in CSV format and transferred to the HMI device. Thereby, Runtime is interrupted.
A list separator is used to separate the data records during importing and exporting.
Note The list separator used as the default depends on the setting for formats and numbers in the operating system. Select "Start > Settings > Control Panel > Regional and Language Options". If you want to import or export recipe data records, do not use this list separator in the display name of the recipe data records.
The following fields can be configured on the user interface, for example, in order to use the export/import function: Selection field for the recipe Selection field for the recipe data record Operating element with the "ExportDataRecords" functionality Operating element with the "ImportDataRecords" functionality Export recipe data record To export a recipe data record, proceed as follows: 1. Select the relevant recipe and recipe data record from the selection boxes. 2. Click the control element with the "ExportDataRecords" functionality. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4218 System Manual, 02/2014 Result The recipe data record are exported to a CSV file.
Note New data records created in runtime can be exported to an external file.
Importing recipe data records To import a recipe data record, proceed as follows: 1. Select the relevant recipe and recipe data record from the selection boxes. 2. Click the control element with the "ImportDataRecords" functionality. Result The recipe data record are imported. Reactions to modifications of the recipe structure Introduction Different recipe structures can occur in the following situations: In the event of changes during commissioning When work is carried out on the machine by the machine manufacturer (retrofit) When CSV files are imported, the structure of the CSV file can differ from the recipe structure. Nevertheless, you can still use any recipe data records already created.
NOTICE When a tag is renamed, the assignment is lost.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4219 Effects Handle any structural differences as follows: If the old recipe data record or the CSV file contains additional values, these values will be discarded. If the old recipe data record or the CSV file contains values of the wrong data type, the configured default value will be used in the recipe data record. Example: The recipe data record contains values that show the tank contents and were input as floating point numbers. However, the corresponding recipe tag expects an integer value. In this case, the system discards the transferred value and the configured default value is used. If the old recipe data record or the CSV file contains too few values, the configured default value will also be used in the recipe data record. 10.5.1.5 Examples Example of creating a recipe Task In this example, you create three recipes for a fruit juice mixing machine. The fruit juice mixing machine produces drinks with "orange", "apple" and "tropical" flavors. You create a recipe for each flavor. Each recipe contains a recipe data record for the following mixing ratios: Beverage Nectar Juice Settings The settings relate to an HMI device which is connected to a SIMATIC S7-300 or SIMATIC S7-400. In this example, you will need the following tags, recipes, recipe entries and recipe data records: Tags: Name PLC connection Address Type Liter water Yes DB 120, DBW 0 Integer Liter concentrate Yes DB 120, DBW 4 Integer Kilo sugar Yes DB 120, DBW 8 Integer Gram flavoring Yes DB 120, DBW 12 Integer Recipes: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4220 System Manual, 02/2014 Orange Apple Tropical Recipe entries: Recipe element Associated tag Liter water Liter water Liter concentrate Liter concentrate Kilo sugar Kilo sugar Gram flavoring Gram flavoring Recipe data records for drink, nectar and juice: Data record name Liter water Liter concentrate Kilo sugar Gram flavoring Beverage 30 70 45 600 Nectar 50 50 10 300 Juice 5 95 3 100 Procedure To create a recipe, proceed as follows: 1. Create the following tags with the settings specified above: "LiterWater", "LiterConcentrate", "KiloSugar" and "GramFlavoring". 2. Create the "Orange", "Apple" and "Tropical" recipes with the settings indicated above. Create the recipe entries in each recipe. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4221 3. Not for Basic Panels: Configure each recipe so that you can synchronize the recipe data records between the recipe screen and recipe view. The values of the recipe tags should not be transferred automatically to the PLC. You will have to make the following settings in the Properties dialog for the recipe concerned: Under "Properties > Options": Activate the "Synchronize recipe view and recipe tags" option. Activate the "Manual transfer of individual modified values (teach-in mode)" option. 4. Create the data records indicated above in each recipe. Enter the values indicated above in each of the data records. Result The "Orange", "Apple" and "Tropical" recipes have been created. Example of configuring a recipe screen Task In this example, you create a recipe screen for the visualization of values of the fruit juice mixing machine. You use a recipe view to select the recipes and their associated recipe data records. You should be able to use the following functions with the buttons: "Load" Button The selected recipe data record is loaded from the recipe memory on the HMI device and displayed in the recipe screen. "Save" Button The displayed recipe tags are saved in the recipe memory of the HMI device. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4222 System Manual, 02/2014 "Data to PLC" button The displayed tags are transferred to the PLC. "Data from PLC" button The current recipe data record in the PLC is transferred to the recipe variables and displayed on the HMI device. Requirement The "Creating a recipe" sample application has been carried out. You have created and opened the "Fruit juice mixing plant" screen. Settings In this example, you need the following tags and buttons with the indicated settings: Tags: Name PLC connection Type RecipeNumber No Integer Data record number No Integer Buttons: Labeling Configured event System function Load Click LoadDataRecord Save Click SaveDataRecord Data to PLC Click SetDataRecordTagsToPLC Data from PLC Click GetDataRecordTagsFromPLC Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4223 Procedure To configure a recipe screen, proceed as follows: 1. Drag-and-drop the "Liter water", "Liter concentrate", "Kilo sugar" and "Gram flavoring" tags from the object view to the "Fruit juice mixing machine" process screen. Four IO fields are created and linked by the specified tags. 2. Add a recipe view containing selection fields for the recipe name and data record name only. Make the following settings in the Inspector window for the recipe view: Select the "Advanced view" display type under "General". Deselect "Edit mode" under "Properties > General" and "Display table" under "Properties > Table". Connect the "Recipe tag" field to the "RecipeNumber" tag. Connect the "Tag" field to the "DataRecordNumber" tag. Disable all the buttons under "Properties > Buttons". 3. Assign the above settings to four buttons. Transfer each "Recipe number" and "Data record number" tag as a parameter for the recipe number and recipe data record number. Result You can select the recipe and the associated recipe data record from the recipe view and modify the recipe values at runtime. You can load, save and transfer the recipe data records using the buttons. Scenario for Entering Recipe Data Records in Runtime Objective You want to enter production data on the HMI device without disturbing the process that is currently underway. Therefore, the production data should not be transferred to the PLC. Requirement The recipe has been created. The recipe has the following settings: "Synchronizing recipe view and recipe tags" is activated or deactivated. If "Synchronize recipe view and recipe tags" is activated, "Manual transfer of individual modified values (teach-in mode)" has to be activated. This will prevent the recipe tags being transferred automatically between the HMI device and PLC. A recipe screen or a screen with recipe view is available. There is an operating element for saving the recipe data records. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4224 System Manual, 02/2014 Sequence Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device PLC Recipe view Recipe screen Recipe tag Synchronizing Teach-in mode 1. Enter the production data in the recipe view or recipe screen. 2. Save the modified recipe data record. Transfer the recipe data to the PLC The configuration may provide operating elements for transferring recipe data to the PLC. Scenario for a manual production sequence Objective A reading device connected to the PLC reads a bar code on the work piece to be processed. The recipe data record names correspond to the respective bar code names. This will enable the PLC to load the necessary recipe data record from the storage medium of the HMI device. The recipe data record is displayed for inspection on screen. You want to be able to correct the transferred production data online, if necessary. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4225 Requirement You have created the recipe. The recipe has the following settings: "Synchronizing recipe view and recipe tags" is activated. "Manual transfer of individual modified values (teach-in mode)" is deactivated.
Note The changes are immediately transferred to the PLC
There is a recipe screen available. There may also be an operating element for saving the recipe data records in the recipe screen. Sequence Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device PLC Recipe screen Recipe tag Synchronizing Teach-in mode Behavior when the recipe view is used If the recipe view is used, it is not possible to transfer changes immediately. You must use the operating element to transfer the recipe data record to the PLC. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4226 System Manual, 02/2014 Scenario for an Automatic Production Sequence Objective You want production to be executed automatically. The production data is to be transferred directly to the PLC, either from the recipe memory in the HMI device or from an external storage medium. The screen display is not necessary. Requirement You have created the recipe. The recipe has the following settings: "Coordinated transfer of data records" is activated. The production data is transferred to the PLC, so a coordinated transfer with the PLC in necessary to prevent the data from being accidentally overwritten. Sequence Recipe 1 Recipe 2 Recipe 3 Recipe n Recipe memory HMl device PLC External storage medium Coordinated transfer
Implementation You can control the flow of data in the following ways: The control program controls the automatic transfer via control jobs or via WinCC system functions, if necessary. The sequence is controlled via the status information in the mailbox and via return values from the functions used. One or more scripts control the automatic transfer via WinCC system functions. The sequence can be checked using the values returned by the functions used. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4227 You can implement the automatic production sequence with available system functions: "ImportDataRecords" This function loads data records from a *.CSV file into the recipe memory of the HMI device. "SetDataRecordToPLC" This function transfers a data record from the HMI device's recipe memory to the PLC. 10.5.2 Working with recipes 10.5.2.1 Principles Definition and applications Introduction Recipes are collections of related data, for example, machine parameter settings or production data. Examples: Machine parameter settings that are needed to convert production to a different product variant. Product components that result in different compositions for different end products. Data from technical processes that is continuously stored at longer intervals. A recipe has a fixed data structure. The structure of a recipe is defined once at the configuration stage. A recipe contains recipe data records. These differ in terms of their values, but not their structure. The project data is stored in an SQL database. Recipe data records are always transferred completely and in a single pass between the HMI device and the PLC. You can import the production data in Runtime additionally by a CSV file. Using recipes Recipes can be used in the following situations: Manual production You select the required recipe data and display it on the HMI device. You modify the recipe data as required and save it on the HMI device. You transfer the recipe data to the PLC. Automatic production The control program starts transfer of the recipe data between the PLC and HMI device. You can also start the transfer from the HMI device. Production is then implemented automatically. It is not essential to display or modify the data. Saving project data You are using a recipe which is not interconnected with the PLC to save project data. Project data saved to the recipe can be accessed using scripts in Runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4228 System Manual, 02/2014 Views Views relate data from existing recipes that have at least one common feature. They are used to compile data from the recipes. Display recipes and views The recipes and views can be displayed and edited on the HMI device in the following ways: A recipe view within a process screen A recipe screen Entering and modifying the recipe data You enter the data in the individual recipe data records and modify it as required. The following options are available: Enter the data during configuration If the production data exists already, enter it in the "Recipes" editor during recipe configuration. Entering the data in Runtime Frequent adaptations of production data should be handled directly in Runtime. Enter the data directly on the HMI device. Set the parameters directly on the machine. You then transfer the data from the PLC to the HMI device and save it in the recipe. You import the recipe data from already swapped-out CSV files. See also Recipe view in reports (Page 4368) Recipe report (Page 4369) Recipe structure Introduction The basic structure of a recipe is illustrated with reference to a filling station in a fruit juice plant. There may be several different recipes in an HMI device. A recipe can be compared to an index card box that contains several index cards. The index card box contains several variants for manufacturing a product family. The complete data of a manufacturer variant are contained on one file card. Example: In a soft drinks production plant, a recipe is needed for different flavors. Drink variants include fruit juice drink, juice, and nectar. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4229 Recipe
5 30 23 80 15 35 20 70
Juice Recipe Water: Flavor: Sugar: Concentrate: Water: Sugar: Flavor: Concentrate: Nectar Recipe data record Recipe element Recipe data records Each index card represents a recipe data record needed to manufacture a product variant. Recipe elements Each index card in a drawer is printed identically. All the index cards contain fields for the different ingredients. Each field corresponds to a recipe element. Each recipe data record contains the same elements. The records differ, however, in the value of the individual elements. Example: All beverages contain the same elements: Water Concentrate Sugar Flavoring The records for juice drink, fruit juice, or nectar differ, however, in the quantity of sugar used in production. Recipe Recipe data record Recipe elements Value Drinks 1 Item Juice Water 5 Sugar 30 Flavoring 23 Concentrate 80 Coloring F30 Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4230 System Manual, 02/2014 Recipe Recipe data record Recipe elements Value 2 Item Nectar Water 15 Sugar 35 Flavoring 20 Concentrate 70 Coloring F35 Recipe queries A recipe query is a recipe whose elements are made up of various recipes. Example: Recipe query Element1 = Recipe1_Recipe element 3 Recipe query Element2 = Recipe3_Recipe element 7 Recipe query Element3 = Recipe2_Recipe element 10 The used recipes must already exist. A recipe query is displayed in a recipe view. Instead of having its own data records, however, a recipe query combines all the recipe data records of the recipes used. Example: If there are 10 recipe data records for each recipe in the example above, the recipe query covers 10*10*10 = 1000 data records. You can define a relation in the recipe query to limit these data records. Example: Recipe query Element2 = Recipe query Element3 The relation acts as a filter for the recipe query (see also example below). Example A "Label" recipe query is created from the "Drinks" and "Order" recipe for label printing. Fill quantity Data elements Number Data elements Order Customer Item Quantity Fill quantity Recipe Data elements Drinks Water Sugar Flavoring Concentrate Coloring Best before Recipe Item Label Item Best before View Coloring Sugar Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4231 The figure below shows the "Label" recipe query. The necessary information for the label is contained in the "Drinks" and "Order" recipes. The recipe elements "Article", "Sugar", "Colorant" and "Best before" are transferred to the "Label" recipe query from the "Drinks" recipe, the recipe elements "Article" and "Net weight" from the "Order" recipe. The "Article" recipe element is double: Drinks.Article, Order.Article, Drinks.Water, Order.Net weight... The recipe view first shows every combination of these data in its own line. However, the recipe data of the ordered article and not of another article must be on the label which is ensured by the following condition: Drinks.Article = Order.Article The recipe view is filtered and only the ordered articles with their recipe data displayed line by line. Displaying Recipes in Runtime You have the following options of displaying recipe data in Runtime: In I/O fields at any position in plant screens In a recipe view in table format You can connect a recipe view to a selected recipe and/or recipe query during configuration. The recipe view can only access this recipe and/or recipe query. You can assign various authorizations for access. Communication with the PLC Introduction Data are transmitted in two ways between recipes and the PLC: By recipe tags with the aid of control tags By message frames with the aid of raw data tags "Control tags" communication type A complete recipe data record is transferred to the recipe tags and vice versa by control tags. The recipe tags have a communication connection to the PLC "Raw data tag" communication type The PLC and the HMI device exchange raw data tags as message frames with a fixed structure. Raw data tags offer the following advantages: Several data records transferred between the PLC and the HMI device. Parts of a recipe data record transmitted. Use the same raw data tag for several recipes. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4232 System Manual, 02/2014 See also Overview (Page 4255) "Recipes" Editor Introduction You can create, configure and edit the following objects in the "Recipes" editor. Recipes and the corresponding recipe elements and recipe data records. Recipe queries and the corresponding recipe query elements and relations The "Recipes" editor also allows you to enter values in recipe data records. Structure of the "Recipes" editor The upper part of the working area in the "Recipes" editor contains the "Recipes" and "Recipe queries" tabs. Create the recipes and/or recipe queries in the "Recipes" and "Recipe queries" tabs and configure these in the Inspector window. The tab called in the upper area of the working area determines the tabs to display in the bottom area of the working area. "Recipes" tab Recipe elements Define the recipe elements of the selected recipe using the table cells provided here. You can move recipe elements within the table with the shortcut menu commands, "Up" and "Down". Recipe data records Define the values of the data records of the selected recipe using the table cells provided here. "Recipe queries" tab Recipe query elements Here, you define the recipe query elements of the selected recipe query via the table cells. You move recipe queries and recipe query elements within the table using the "Up" and "Down" shortcut menu commands. You define the relations between the recipe query elements in the "Conditions" field. Inspector window In the Inspector window, you configure each element that is selected in one of the tables, e.g. a recipe query or recipe data record. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4233 Recipe settings The following settings are available for recipes: Setting Description Recipe name This is a unique identification for the recipe within the HMI device. Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Enter meaningful names or designations which you can assign directly to a product, such as "Fruit_juice_Orange". Recipe number This is a unique identification for the recipe within the HMI device. For the "Raw data tag" communication type, the "PLC" field in the message frame must correspond to a valid recipe number. Version Information about the recipe. The date and time of the last change to the recipe is set by default. Path Defines the storage location for recipes. The recipes are not saved in a file but in a database. Type You can limit the recipe data records to a maximum number you select yourself. Maximum number of data records Maximum number of data records in a recipe. This limits the required recipe memory of the HMI device. The value "0" appears for the "Unlimited" size type. Communication type Define how the HMI device and PLC exchange recipe data as a rule: No communication Raw data tags Tags Raw data tag Tag which transfers the recipe data as a frame between the PLC and the HMI device in the "raw data tag" communication type. Control tag task, ID, field, value Four tags which control the data transmission between the recipe and recipe tags and therefore the PLC in the "tags" communication type. For reading For writing Name of the authorization which has read, write access to the recipe in runtime. Last modification Last user Change information of a recipe is displayed in Runtime. Tooltip Infotext on recipe for the configuration engineer Recipe element settings The following settings are available for recipe elements: Setting Description Recipe element name Identifies a recipe element uniquely within the recipe. Enter meaningful names or labels that you can allocate uniquely, such as axis labels on a machine or ingredients such as "Flavoring". Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Enter meaningful names or designations which you can assign directly to a product, such as "Fruit_juice_Orange". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4234 System Manual, 02/2014 Setting Description Recipe tag An assigned tag in Runtime stores the current value of the recipe element in the recipe data record. Data type Data type of the recipe tag. Data length Data length of the recipe tag, depending on the data type. Default value This is used as the default entry when you create a new recipe data record. Minimum value The smallest representable value of a number-based recipe tag, depending on the data type. Maximum value The largest representable value of a number-based recipe tag, depending on the data type. For reading For writing Name of the authorization which has read, write access to the recipe in runtime. Value required The recipe element has a value other than zero. Unique values A value for the recipe element may only occur once in all recipe data records. Example recipe element "Order number". Fast search The value of the recipe element is indexed for faster searching. Tooltip Infotext on recipe element for the configuration engineer Recipe data record settings The following settings are available for recipe data records: Setting Description Recipe data record name Identifies a recipe data record uniquely within the recipe. Display name Appears in the recipe view, for example, in Runtime. You can configure display names in multiple languages. Enter meaningful names or labels that you can assign directly to a product, such as "Product_numbers". Recipe data record number Identifies a recipe data record uniquely within the recipe. Recipe element name Name of the created recipe element The values which the recipe element has in the different recipe data records (lines) are saved under this name. A value forms a recipe data record respectively with the values of the other recipe elements in a line. You can already save the values during the configuring. Last modification Last user Modification information items of a recipe data record are displayed in runtime. Comment Comment about the recipe data record AP01421094 Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4235 10.5.2.2 Configuring Recipes General configuration procedure Configuring steps Follow the steps outlined below to create a recipe: Step Task 1 Define the structure of the recipe. 2 Define the communication mode for the recipe. 3 Define the control tags or raw data tags according to the communication mode selected. 4 Create the recipe and define its properties. 5 Create the recipe elements in accordance with the structure planned. 6 Create the recipe data records. 7 Configure views of multiple recipes, if required. 8 Configure a screen which contains a recipe view and interconnect this recipe view with the recipe or view. Or: Configure a screen which contains I/O fields and buttons. Configure button functions for reading and writing the values of recipe data records.
Note Runtime API Runtime API provides you with extensive uaArchive functions to edit recipes and recipe queries (see section "Interfaces > Runtime API", subsection "Auto-Hotspot").
Configuring Recipes and Elements Creating a New Recipe Introduction Create the new recipes using the "Recipes" tab of the "Recipes" editor. Naming the recipe Do not use keywords or reserved words of the SQL database language for recipe names (see subsection "SQL keywords (Page 4291)"). Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4236 System Manual, 02/2014 Recipes with date or time stamp If you use data or time data, make sure that the system setting for time and date on the configuring computer matches that on the target system. Example: You load a recipe data record on the target system at 13:55 in which the processing time 14 h is stored. If it already 14:05 on the target computer, the recipe will not be processed. If an operator processes the recipe, modification information is not written back correctly into the database. After loading to the target system, check the recipes with date or time stamps on the target system. Requirement You have created the control tags or the raw data tag. The "Recipes" editor is open. Procedure Create a recipe as follows: 1. Double-click the first empty table row in the "Recipes" tab of the "Recipes" editor. 2. Select "Properties > General > Settings > Name" in the Inspector window and enter a descriptive recipe name. The name identifies the recipe uniquely within the project. 3. Select the "Display name" field to enter the language-specific name to be displayed in Runtime. 4. Define whether or not the recipe data records are limited to a specified maximum number in the area "Size" under "Type". 5. If the size type is limited, specify the maximum number of recipe data records of a recipe under "Number of data records". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4237 6. Specify the "Communication type" under "Properties > Communication": If you have selected "Raw data tag", create a raw data tag and select it under "Raw data tag". Select "No communication" if you use the recipe only to save project data. 7. Select the control tags for access to the recipe under "Properties > Control tags" if you have selected the "Tags" communication type. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4238 System Manual, 02/2014 8. Define under "Properties > Security" which operator authorizations have read and write access to the recipe in Runtime. 9. Under "System fields", specify whether to display the "Last modification" and "Last user" entries. Result You have created the recipe. Creating Recipe Elements and Data Records Introduction Select the "Recipe elements" tab in the bottom area of the "Recipes" editor to set up the elements for the selected recipe. You can also enter the recipe element values in the "Recipe data records" tab. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4239 Requirement The tags for the recipe have been created. You have created the recipe. The recipe is selected in the "Recipes" editor. Procedure Create a recipe element as follows: 1. Double-click the first empty table row in the "Recipe elements" tab. 2. Select "Properties > General > Settings > Name" in the Inspector window and enter a descriptive name for the recipe element. This name must be unique within a recipe. 3. Select the "Display name" to enter the language-specific name to be displayed in Runtime. 4. When the recipe has the "Tags" communication type: To link the recipe element to a tag, select a tag under "Properties > Basic settings > Settings". The data type will be displayed below. 5. For a "String" data type, also specify the maximum length of the string under "Data length". The "Settings" area on the right shows the value range for number-based data types, for which you can also specify a default value. 6. When the recipe has the "Raw data tag" communication type or "No communication": Select the "Data type" and also the "Data length" of the recipe element for the "String" data type. 7. Define under "Properties > Security" which operator authorizations have read and write access to the recipe element in Runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4240 System Manual, 02/2014 8. Define in "Properties > Extras" which conditions the values of the recipe element must satisfy. For faster search, the values can be indexed: 9. Double-click the first empty table row in the "Recipe data records" tab to set up a recipe data record. 10.Enter the desired value for the recipe element in the table editor. Result The recipe element and a corresponding recipe data record are created with one value. Importing recipes into the configuration and exporting them again Introduction You can export recipes as a CSV file and import them again into the configuration.
Note You cannot import or export data records from recipe queries.
Application case You export recipe data to store and back up recipe data long-term on a computer. You export the recipe data to an HMI device to standardize and distribute recipe data. You change the CSV file Microsoft Excel and import the CSV file to all HMI devices which require the same recipe data. You want to exchange recipe data between different projects. You change the recipe data in Runtime. To transfer the changed recipe data to WinCC ES, export the recipe data records to Runtime and copy the CSV file to the configuring computer. There you import the CSV file containing the recipe data records into the recipe. And in the opposite direction, you transfer the modified recipe data records to the HMI device in WinCC ES in Runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4241 Requirement You have created the recipe. The structures of the exported CSV file and the recipe in WinCC ES match; name, number and data type of the recipe elements are identical. The "Recipes" editor is open. Importing CSV files To import recipe data records into a recipe, proceed as follows: 1. Select the row which contains the desired recipe in the "Recipes" tab. 2. Select the "Import recipe data" command from the shortcut menu. The "Import" dialog box opens. 3. Select the desired CSV file with the recipe data under "File name". 4. Under "Strategy", define whether a recipe data record in the CSV file overwrites an existing recipe data record in WinCC with the same recipe data record number. 5. Click "Import" to start the operation. Result The recipe will be amended by recipe data records from the CSV file that have not yet been entered. If the option is selected, existing recipe data records will be overwritten. An error message is shown in the "Info" of the Inspector window if the structure of the recipe does not match the structure of the CSV file. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4242 System Manual, 02/2014 Exporting CSV files 1. Select the row which contains the recipe to export in the "Recipes" tab. 2. Select the "Export recipe data" command from the shortcut menu. The "Export" dialog box opens. 3. Select a path for the CSV file under "File name". 4. Select the desired recipe under "Recipe name". 5. Select all recipe data records or limit the selection to certain recipe data record numbers under "Select content". 6. Click "Export" to start the operation. Result The configuration is exported as a CSV file. The list separator is the semicolon "RecipeElement_1;RecipeElement_2". The decimal separator is a period, e.g. "3.14". Procedure for changing the recipe structure Introduction Different recipe structures can occur in the following situations: Due to changes during commissioning If a machine is upgraded by the machine manufacturer (retrofit) When CSV files are imported, the structure of the CSV file can differ from the recipe structure. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4243 Nevertheless, you can still use any recipe data records already created.
NOTICE When a tag is renamed, the assignment is lost.
Effects If the structure of the CSV file differs from the structure of the recipe, deviations are handled as follows: If the old recipe data record or the CSV file contains additional values, these values will be discarded. If the old recipe data record or the CSV file contains values of the wrong data type, the configured default value will be used in the recipe data record. Example: The recipe data record contains values that show the tank contents and were input as floating point numbers. However, the corresponding recipe tag expects an integer value. In this case, the system discards the transferred value and the configured default value is used. If the old recipe data record or the CSV file contains too few values, the configured default value will also be used in the recipe data record. Configuring recipe queries Creating recipe queries Introduction A recipe query is a set of recipe elements from various recipes. Example: Recipe query "Water consumption": Water from the "Fruit juice drink" recipe Water from the "Juice" recipe Water from the "Nectar" recipe You can link recipe elements to form relations, such as "Nectar.Water > FruitJuiceDrink.Water". In the recipe query, only the data records that satisfy the relation are displayed in Runtime. In the example, these are the records in which the water requirement of the "Nectar" recipe is greater than that of "Fruit juice drink". You can assemble recipe queries from recipe elements in the "Recipes" editor in the "Recipe queries" tab. Select the recipe elements from the recipes that are included in the recipe query and set their relation. The relation expresses a condition. Only those combinations of recipe elements which satisfy the condition (true) are displayed in the recipe view. You can also edit the recipe query data in Runtime. The data you have edited are applied to the original recipe in Runtime. The recipe query does not support the following actions: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4244 System Manual, 02/2014 Creating new recipe data Deleting recipe data Requirement You have created at least two recipes. The recipes are in the same database on the same HMI device. The recipes have at least one identical recipe element in the same data format. Creating recipe queries Create a recipe query as follows: 1. In the "Recipes" editor, double-click the first empty table row in the "Recipe queries" tab. A new recipe query is created. 2. In the inspection window, enter a name for the recipe query under "Properties > General > Name " to indicate its function. 3. Select the "Display name" to enter the language-specific name to be displayed in Runtime. Creating recipe query elements and relations To create a new element for the recipe query and the relation, follow these steps: 1. Double-click on the first free table row in the "Recipe query elements" tab. 2. Under "Properties > General > Recipe element", select the recipe element to insert into the query. 3. Create other recipe query elements as required. 4. Select the recipe query in the "Recipe queries" index. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4245 5. Select a recipe query element and the desired operator as a left and right operand in the Inspector window under "Properties > Relation > Relation". 6. Click the "Add" button. The relation appears under "Condition". If a condition was already defined there, the new relation with the logical operator "AND" is added. You can edit the condition. 7. Change the order of the recipe query elements as required using drag-and-drop. Result The recipe query is created and a condition is defined. Only those combinations of recipe elements which satisfy the condition are displayed. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4246 System Manual, 02/2014 10.5.2.3 Configuring the visualization of recipes Displaying recipes Introduction Recipes and recipe queries are displayed on the HMI device as follows: In a recipe view In individual I/O fields Recipe view The recipe view displays the recipes and queries in tabular format. Each recipe data record uses one line. The picture below contains an example of a recipe view. Operators use the recipe view in Runtime and, for example, create new data records or import recipes. You transfer a recipe data record to the recipe tags and vice versa with two buttons in the recipe view.
Note You select a recipe or recipe query when configuring a recipe view. The operator can change the selection and other properties in Runtime.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4247
Note Data source The recipe view only accesses one recipe or recipe query respectively. Recipe query An operator can only change the displayed recipe data in Runtime. The creation and deletion of data records and their transfer from/to the PLC is not possible.
Recipes in the screen You can show recipe elements in I/O fields alternatively instead of a preconfigured recipe display. The following screen shows an example for a screen with configured I/O fields in the "Tags" communication type. The blue fields at the top show the values of the recipe tags which have a communication connection with the PLC. The yellow fields at the bottom show the contents of the four control tags. In the example the blue recipe values were written into recipe data record number 3 (task = 6) and the number of errors = 0 returned. See also Control tags (Page 4257) Properties of the recipe view Introduction The recipe view visualizes recipe elements in table format on the screens. Operators can edit recipe data in the recipe view in Runtime. Configuration of the recipe view The following optional recipe view configurations are available: General > Display: You select a recipe or recipe query as a data source and define whether recipe data records can be edited, inserted or deleted. General > Print job The recipe view is automatically linked by logical operation with the system print job for recipe views. Create a logical link to the recipe view for any custom print jobs or system print jobs. General > Time Define the time base for the "Last access" display, for example the coordinated universal time (UTC). You can include the time base selected for output in Runtime. Appearance, layout, text format You define colors and design, size and position of the recipe display, font type and font size. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4248 System Manual, 02/2014 Window You define the font size, window header of the recipe display and other window properties. Table You define the appearance of the column headers, table and boundary lines and the behavior for selecting and sorting data records. Table > Mark Determine whether lines or only cells can be marked with the mouse. Configure the properties of the selection rectangle which can be shown around the marked cells or lines of the table. Configure the marking colors for the markable cells and/or lines as required. The color defined by the system for the marking is used with the "Automatic coloring" property. Table > Sorting Determine whether sorting is to take place and if so, with click or double-click on the column header. Define the order of sorting which is to run cyclically when clicking or double-clicking the column header: either sorting ascending - descending or ascending - descending - no sorting Configure the sorting symbol and sorting index which are to be shown right-justified in the column header. You show sorting sequence and sorting order of the columns. If you activate the "Use sorting key" option, the sorting symbol is displayed as a sorting key above the vertical scrollbar. You sort the selected column in the configured sorting order with a mouseclick on the sorting key. The sorting key is not displayed if there is no vertical scrollbar in the table. Columns You determine which recipe elements are displayed in what order in Runtime. You apply write protection to certain elements and determine the width and formatting. Some columns can also show the content and header as symbols. Determine how these columns are displayed in the "Layout" field. The text and symbol can be displayed together. Filter As a filter criterion you define a condition for a recipe element and link several conditions. The data record is not displayed until all the filter criteria are satisfied. Toolbar In addition to the appearance of the toolbar you define which buttons are visible in what order in Runtime and with what operator authorization they can be operated. Activate the buttons in the list which you need for operating the WinCC-Control in Runtime. Information about the function of the individual buttons can be found in the subsection "Operation in Runtime" Define a hotkey for a button if necessary. If you assign operator authorizations to the individual buttons, the button is only released in Runtime for the users who have the appropriate operator authorization. If you deactivate the "Active" option for a button, the activated button is displayed in Runtime but cannot be operated. Status bar In addition to the appearance of the status line, you define what information is displayed in the status line in Runtime, e.g. the recipe data record number. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4249 Data export A standard file name and a standard directory are already entered by switch tags. However, you can assign your own file names and directory names. You can use the following switch tags. @OBJECTNAME: Object name of the recipe display, see "Properties > Miscellaneous" @PROJECTPATH: Project directory @CURRENTDATE: Current date @CURRENTTIME: Current time Safety You determine whether and how changes to the properties of the recipe display can be saved in Runtime and after a screen change and which authorization is necessary for changing. Miscellaneous You define the visibility and layer for the recipe display. Configuring a recipe view Requirement You have created a recipe or a recipe query. A screen is created and open in the "Screens" editor. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4250 System Manual, 02/2014 Procedure Configure a recipe view as follows: 1. Drag the "Recipe display" object from the "Controls" palette of the "Tools" task card into the screen. 2. Select the desired recipe or recipe query in the Inspector window under "General > Display". 3. Define the write and read rights for the recipe display in Runtime under "General > Allow in Runtime". 4. Select "Appearance," "Layout," and "Text format" to define additional display options for the recipe view. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4251 5. Select "Properties" > Columns" to define the recipe elements which will be visible and write- protected in Runtime. 6. Select "Toolbar" to define the recipe view buttons to be available in Runtime. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4252 System Manual, 02/2014 7. Select "Status bar" to define the scope of information to display in the status bar in Runtime. 8. Select "Filter" to define the filter criteria for recipe elements in Runtime. 9. Select "Sort" to define the sorting criteria for recipe elements in Runtime. Result The recipe view is configured. Exporting recipe data in Runtime Introduction In Runtime you export the recipe data with a button in the recipe display. You configure operation of the data export in Runtime. How to configure the operation of the data export 1. Define a file name and a directory for the export file under "Properties > Data export". The file name may be made up of names you select yourself and the following switch tags: @OBJECTNAME: Object name of the recipe display @PROJECTPATH: Project directory @CURRENTDATE: Current date @CURRENTTIME: Current time 1. Define the file extension, e.g. "CSV". 2. Define the scope of the data export: All Runtime data are exported. Selected Runtime data are exported. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4253 3. Configure the operation of the data export during runtime. Define: The "Data export defaults" are displayed in runtime. The user may change the file name or the directory. 4. If "Show dialog" is deactivated, the data are exported immediately to the defined export file on pressing the "Export log" button. 5. Save the project. 6. Activate the "Export log" button under "Properties > Toolbar". Results In Runtime you can export all or selected recipe data to a defined file with the button. Configuring persistence Introduction A user can configure WinCC-Controls in Runtime. You define what effect the online configuration has in Runtime. The changes configured in Runtime are saved separately from the screen in the engineering system. The screen is thus retained in its original configuration. Procedure 1. Select "Properties > Safety > Persistence > Online configuration" which you can only operate in the engineering system. The online configuration can then be defined permanently in Runtime: "No persistence" The online configurations are not retained in Runtime. This default leaves the user no option in Runtime. The online configurations are lost the next time the screen changes and with deactivate/activate. "Persistence" This default leaves the user the options of "reject", "retain" or "reset". With the "retain" option the online configurations are retained the next time the screen changes and with deactivate/activate. "Persistence in Runtime". This default leaves the user the options of "reject", "retain" or "reset". With the "retain" option the online configurations are retained the next time the screen changes but are lost when the project is deactivated/activated.
Note In case of a user change, the different configurations are not saved until you have executed a screen change.
2. Define what operator authorization the user must have to carry out online configuration. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4254 System Manual, 02/2014 3. "Screen change characteristics" can be operated in the engineering system and in Runtime with the defaults "Persistence" and "Persistence during Runtime". The "reset" option can only be operated in Runtime because the original configuration is in the engineeringm system. Select one of the three effects of the online configuration in the next screen change: Activate "Reject changes" so that the online configuration only exists for as long as the screen is selected. The changes are rejected at the next screen change. The recipe display appears as configured if you select the screen again. Activate "Retain changes" so that the online configuration is not lost at the next screen change. Activate "Reset" so that the configured screen is saved again in Runtime. All online configured changes are lost.
Note The screen is also replaced in Runtime when saving the screen or in Delta compiling (change loading). All online configured changes are lost.
4. Save the configuration. 10.5.2.4 Data transfer to the PLC Overview The options for transferring recipe values between the PLC and HMI device are as follows: No data transfer "Tags" communication type "Raw data tag" communication type No data transfer The recipe is not used for transferring recipe data to the PLC but as a data memory and user log: You store values which belong together in data records to which you have multiple access. In the simplest case an operator switches between the recipes in a recipe view. The respective recipe data are loaded into the recipe tags and processed further there. "Tags" communication type Recipe tags transfer the recipe values to the PLC. Vice versa the values from the PLC are written into a recipe data record by recipe tags. Control tags control the data transfer. The following tasks are started automatically by the desired entry into the corresponding control tags. Write data records into the recipe tags and therefore into the PLC Read data records out of the recipe tags and therefore out of the PLC Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4255 Delete data records Create new data records
Note A complete data record is always transferred in the "Tags" communication type. You cannot transfer recipe data from a recipe query.
"Raw data tag" communication type The automation system sends the raw data tag as a message frame to the HMI device as an active partner. The message frame contains the following: Desired target recipe Desired target recipe data records Job e.g. "Read", "Write" or "Delete" New recipe values, e.g. for "Write" job The HMI device returns recipe and acknowledgement data as a message frame. The "BSEND/BRCV" function of the S7 communication is used for the data exchange. The consecutive number of the recipe serves to identify the recipe uniquely in the PLC (PLCID). The PLC requires a user program which executes the following in Runtime: Collect data if necessary via I/O fields in the HMI device. Check data. Create raw data tag as a message frame. Send message frame. If you want to start creation of the message frame from the HMI device, you configure functions in the screen which start the user program.
Note The following is possible in the "Raw data tag" communication type: Transfer of an individual recipe element Transfer of an entire recipe data record Transfer of multiple recipe data records Data transfer from the recipe view or by control tags is not possible.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4256 System Manual, 02/2014 Control tags Introduction With the "Tags" communication type in the recipe, you transfer the recipe data between the PLC and the HMI device using recipe tags. The data transfer is controlled by four control tags which are assigned fixed to a recipe. Other control tags can be assigned to another recipe. Data transfer is started automatically once you have entered the required value at the corresponding control tag.
Note All four control tags must always be specified in a recipe to ensure that it works. Do not change the data type of the control tags.
Note You must implement access protection for the control tags of a protected recipe separately using the object properties of the screen, I/O field or button, for example.
Control tags Control tag Required data type Meaning ID Long Number of the recipe data record within the assigned recipe Job Long Read out of the recipe tags, write into the recipe memory: 6 Read out of the recipe memory, write into the recipe tags: 7 Delete in the recipe memory: 8 After the job has been carried out, an error ID can be seen in the "Job" control tag: No error 0 Error -1 Field String The name of the recipe element Make sure that you do not use the display name. Value String The value of the recipe element Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4257 Requirement Communication type is set to "Tags" in the recipe. You have configured a process screen with all I/O fields required for process tags and control tags of the recipe. Example: Inserting the control tag The following control tag combinations are supported: "ID" and "Job" control tags The control tag "ID" indicates the number of the recipe data record which is transferred. The "Job" control tag indicates whether the selected recipe data record is written, read or deleted (6, 7, 8) in the recipe memory of the HMI device. "Job", "Field" and "Value" control tags The recipe data record is selected for the data transfer whose recipe element "Field" has the recipe value "Value". Example field = "Water", value = "5 liters". The "Job" control tag indicates whether the selected recipe data record is written, read or deleted (6, 7, 8) in the recipe memory of the HMI device.
Note Different data records may not contain the same recipe value in the "Field" recipe element You have to activate the "Unique values" checkbox under "Properties > Options" for the recipe element. Otherwise no clear assignment of the recipe data record by the value is possible and the first data record which satisfies the "Value in field" condition is used. If the type "String" is assigned to the element, you must enclose the entry in the "Value" I/O field in inverted commas (such as 'Cola Light').
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4258 System Manual, 02/2014 More combinations of values for the "ID" and "Job" control tags ID Job = 6 Job = 7 Job = 8 -1 Data record from the recipe tags is read and appended to the end in the recipe in the recipe memory. - Data record with the lowest ID is deleted in the recipe in the recipe memory. -6 Data record from the recipe tags is read and written into the recipe data record with the lowest ID in the recipe. Data record with the lowest ID is written in the recipe into the recipe tags. Data record with the lowest ID is deleted in the recipe in the recipe memory. -9 Data record from the recipe tags is read and written into the recipe data record with the highest ID in the recipe. Data record with the highest ID is written in the recipe into the recipe tags. Data record with the highest ID is deleted in the recipe in the recipe memory. See also Displaying recipes (Page 4247) Using the recipe screen (Page 4280) Raw data tag Data Transfer via Raw Data Tags This section describes the transfer of recipe data between the HMI device, and PLC using raw data tags. The BSEND/BRCV function is used in the PLC. The message frame containing the raw data tag is actively sent by the PLC. The message frames may contain one or more write or read jobs. Data transfer procedure 1. The PLC sends the message frame to the HMI device. 2. The HMI device returns the following: Data, if requested A processing acknowledgement The HMI device returns a separate acknowledgement for every job.
Note The PLC is the active partner in this data transfer, so it is the PLC that must start the required function. On the HMI device, you can start the required function by means of a change in value of an external tag, for example, and the corresponding analysis in the PLC. Do not use the "Job type" parameter to start the data transfer. The "Job type" parameter used in the job, or acknowledgement header only works with respect to recipes.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4259 Message Frame Structure for Jobs General message frame structure Structure of a message frame for sending jobs: Length Message frame header 16 bytes
Job header 1 12 bytes Data for job 1 n bytes
Job header 2 12 bytes Data for job 2 n bytes
Job header n 12 bytes Data for job n n bytes Example The total length of a message frame with a job, and 10 bytes of job data is 38 bytes. 16 bytes +12 bytes +10 bytes = 38 bytes Structure of the message frame header 16 bytes are needed for a message frame header. Function of the field Comment Byte Message frame length in bytes LSB 1 ) Max. length 4091 bytes 1 Message frame length in bytes 2 Message frame length in bytes 3 Message frame length in bytes MSB 2 ) 4 Transfer type "1" from the HMI device "2" from the PLC 5 Reserved 6 Number of jobs in the message frame LSB 1 ) 7 Number of jobs in the message frame MSB 2 ) 8 Number of the recipe (PLCID) 1. character, in ASCII 9 Number of the recipe (PLCID) 2. character, in ASCII 10 Number of the recipe (PLCID) 3. character, in ASCII 11 Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4260 System Manual, 02/2014 Function of the field Comment Byte Number of the recipe (PLCID) 4. character, in ASCII 12 Number of the recipe (PLCID) 5. character, in ASCII 13 Number of the recipe (PLCID) 6. character, in ASCII 14 Number of the recipe (PLCID) 7. character, in ASCII 15 Number of the recipe (PLCID) 8. character, in ASCII 16 Least significant byte Most significant byte
Note The number of the recipe is defined automatically in the "Recipes" editor during configuration, but can later be changed as needed. Enter the number in ASCII format in the message frame.
Structure of a job header 12 bytes are needed for a job header. Function of the field Comment Byte Job length in bytes LSB 1 ) 1 Job length in bytes MSB 2 ) 2 Job type see "Description of job types and error codes" 3 Reserved 4 Field number LSB 1 ) 5 Field number MSB 2 ) 6 Data record number LSB 1 ) 7 Data record number 8 Data record number 9 Data record number MSB 2 ) 10 Selection criterion LSB 1 ) Element value entered or element number as selection criterion. 11 Selection criterion MSB 2 ) not if 0 12 Least significant byte Most significant byte The field number corresponds to the consecutive number of the recipe element. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4261 Message Frame Format for Acknowledgements General Structure of an Acknowledgement Message Frame Structure of the acknowledgment message frame to the PLC: Length Acknowledgement header 24 bytes Acknowledgement data Structure of an acknowledgment header 24 bytes are needed for an acknowledgement header Function of the field Comment Byte Message frame length in bytes LSB 1 ) Max. length 4091 bytes 1 Message frame length in bytes 2 Message frame length in bytes 3 Message frame length in bytes MSB 2 ) 4 Transfer type "1" from HMI device, "2" from the PLC 5 Reserved 6 Job type See Description of "Job Types and Error Codes" 7 Error code See Description of "Job Types and Error Codes" 8 Reserved 9 Reserved 10 Field number LSB 1 ) 11 Field number MSB 2 ) 12 Data record number LSB 1 ) 13 Record number 14 Record number 15 Data record number MSB 2 ) 16 Number of the recipe (PLCID) 1st character, in ASCII 17 Number of the recipe (PLCID) 2nd character, in ASCII 18 Number of the recipe (PLCID) 3rd character, in ASCII 19 Number of the recipe (PLCID) 4th character, in ASCII 20 Number of the recipe (PLCID) 5th character, in ASCII 21 Number of the recipe (PLCID) 6th character, in ASCII 22 Number of the recipe (PLCID) 7th character, in ASCII 23 Number of the recipe (PLCID) 8th character, in ASCII 24 Least significant byte Most significant byte Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4262 System Manual, 02/2014 Acknowledgement data The acknowledgement can contain the following: The required recipe data record The required content of the element No data Configuring raw data tag Raw data tags of the "SIMATIC S7" channel Introduction A tag of the type raw data type is a data telegram on a transport level. The contents of the raw data tag are not fixed and therefore only the sender and the receiver can interpret the transmitted data. There are no format changes in WinCC for this data type. Maximum length is 65535 Byte. WinCC distinguishes between two types of raw data tags: Raw data tag for free application use and raw data tag for handling S7 functions. Raw data tag for free application use Raw data tags for free application use are used for transferring user data blocks between WinCC and PLC and handle only user data. It distinguishes between: Raw data tag as byte array Raw data tag for BSEND/BRCV functions Raw data tag for handling S7 functions These raw data tags do not have any channel-specific header and are normally used by the message system and for process data entry in WinCC. No further description is needed here as these are tags and functions internal to the channel. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4263 Creating raw data tag Procedure 1. Create a new connection, for example, "SIMATICS7". 2. In the "Parameters" tab, select "WinCC RT Prof connection > Send/receive raw data block". 3. Under "Connection", specify the hexadecimal value of the connection ID for the connection resource that was assigned during the configuration of the controller. 4. Create a new tag "Raw data tag_1". 5. Select "SIMATICS7" as "Connection". 6. Select the "Raw" "Data type" and specify a sufficient "Length" in bytes. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4264 System Manual, 02/2014 7. Select "BSEND / BRCV" under "Raw data." 8. Specify the "R_ID" parameter, which was assigned in the configuration of the controller. 9. Create a new recipe. 10.In the Inspector window under "Properties > Communication" select "Raw data tag" as communication type and "Raw data tag_1" as raw data tag. 11.Create the recipe elements and recipe data records. Ensure that the recipe number matches the "PLC" field in the message frame. Raw data tag for BSEND/BRCV functions of S7 communication Introduction Raw data tags for "BSEND/BRCV" functions are used for transferring user data blocks between WinCC and AS and handle only user data. This raw data type can be used to access the "BSEND/BRCV" functions of S7 communication. The functions are available in a S7-400 or a S7-300 using CP343. The initiative of data transfer always lies with the sending partner; hence "BSEND/BRCV" functions can also be used to implement event-controlled or sporadic data block transfers. For resource reasons, it is advisable to keep the number of BSEND/BRCV raw data tags low. Resource limitations for using S7 functions "AR_SEND" and "BSEND/BRCV" for communication with S7-400 The maximum data volume that can be sent simultaneously using AR_SEND and/or BSEND/ BRCV functions from AS to WinCC is limited to 16 kByte. Example: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4265 1x BSEND with a max. of 16 Kbytes 1x AR_SEND with 8 kBytes + 1x BSEND with 8 kBytes 1x AR_SEND with 10 Kbytes + 1x AR_SEND with 2 Kbytes + 1x BSEND with 4 Kbytes
Note If the data block of a write job is transferred to AS and has not yet been deleted or fully deleted from the receiving buffer, then the next write job will be rejected with an error message. During such an error display, write jobs with R_ID > 0x8000 0000 are written to a connection-specific queue and the system tries to repeat the write job for 6 seconds. The responsibility for time co-ordination for transfer rests with the user and needs to be noted as shorter time intervals for write jobs.
Configuring a PBK Connection for Using "BSEND/BRCV" functions "BSEND/BRCV" functions can only be used via a "hard-configured connection", a so-called PBK connection (programmed component communication). To configure a hard-configured connection, you must mention a connection resource (hex: 10 ... DF) in the connection parameters. This connection resource will be assigned by STEP 7 when the connection is configured within the PLC. The connection must be configured in AS as passive connection end-point. A hard-configured connection can also be used to handle "normal" read and write jobs. If very large data areas are to be transferred via the connection, then the data blocks are transferred in multiple PDUs. For performance reasons, it would therefore be better to create a separate connection for "BSEND/BRCV" functions. Raw data tag for "BSEND/BRCV" functions with the "R_ID" parameter Raw data tags for transferring "BSEND/BRCV" data blocks are configured as raw data of type "BSEND/BRCV" with a "R_ID". The data length is derived implicitly from the sent or received data volume. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4266 System Manual, 02/2014 A decimal value of 1 to 999999 must be specified for "R_ID". The R_ID is assigned at the time of configuration in AS and is used for distinguishing multiple data block transfers over one connection. The send and receive calls are always notified with reference to this R_ID in the underlying communication sub-system (SIMATIC Device Drivers). A raw data tag is thus assigned to one unique R_ID. Sending a "BSEND/BRCV" raw data tag Sending a "BSEND/BRCV" raw data tag takes place in the same way as writing a "normal" process tag. After sending the data block and receiving a positive acknowledgement from AS, the data block is transferred to the image of the Data Manager. Receiving a "BSEND/BRCV" raw data tag "BSEND/BRCV" raw data is sproradically sent to the channel on the initiative of the AS. Hence it is not possible to explicitly read S7 raw data tags. The BSEND/BRCV mechanisms do not include any synchronization functions. If no user has logged in to receive the data during the start-up phase, the data blocks sent by AS will bounce on the receiver side. Hence, the user has to take care of the synchronization and, for e.g., release the sending direction on the AS by setting a flag with a data word. Job types and error codes Description of the job types Type Description 4 The existence of the recipe is checked. 5 All data records are deleted from the recipe. 6 The data record is requested from the HMI device and is written to the PLC. 7 The data record from the PLC is written to the required data record. 8 The data record is deleted from the recipe. 9 The element of the required data record is requested from the HMI device and is written to the PLC. 10 The element of the required data record is written to the required data record. Description of the error codes Group No. Description Possible Fault Causes General 0 The function has been executed. -- Recipe 2 Data not available No recipe configured with this PLCID. Data record 101 Data not allowed Recipe structure does not tally, such as number or type of fields. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4267 Failed data record insertion or update. Possible causes: Recipe is of the "limited" type. A min. or a max. value is configured for a field. Incorrect criterion Data record 102 Data not available For job type 6 only: No data available Criterion is incorrect. Field 201 Data not allowed For job type 10 only: Criterion is incorrect. Possible causes: Field not found. A min. or a max. value is configured for a field. Field 202 Data not available For job type 9 only: Criterion is incorrect. No field found corresponding to criterion. General 254 Function not found -- General 255 Undefined error -- Differences between data formats Introduction The data formats in WinCC conform to the Intel and Microsoft data formats. The least significant byte is saved first and the most significant byte is saved last. This data format is very common and is generally known as the "Intel format". The data formats in WinCC differ fundamentally from the data formats in the PLCs. Intel format In the Intel format, the decimal number 300 is stored as follows: Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Binary 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 Hex 0 1 2 C According to the Intel Format, the decimal number 300 corresponds to the hex-number 12C (1*256 + 2*16 + 12*1). Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4268 System Manual, 02/2014 SIMATIC format In SIMATIC format, the least significant byte is are stored in the most significant digits. In SIMATIC format, decimal number 300 is stored as follows: Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Binary 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 Hex 2 C 0 1 According to the SIMATIC format, decimal number 300 corresponds to hex number 2C01. If hex number 2C01 is interpreted according to Intel format, it corresponds to decimal number 11265. There are function blocks that convert the data for PLCs from the SIMATIC S7 series. You must always call up the blocks before and after data transfers between the PLC and WinCC. The function blocks are available for download from the Siemens Customer Support website in the Internet. The compressed file ANSI_S5.EXE is then loaded. ANSI_S5.EXE contains the "IEEE:GP" function block. Active sending is described in the reference manuals for the PLCs or CPs (communication processors). 10.5.2.5 Operation in Runtime Recipe view Functional scope The recipe display offers access to user archives, the recipes and recipe queries. In runtime, you can: Online configuration of recipe view Create, delete or modify new data records Scrolling in recipes Read and write tags for direct tag link Importing and exporting recipes Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4269 Defining selection criteria to display only a certain part of the recipes Defining sorting conditions for the displayed recipe elements Properties You connect a recipe view to a recipe or recipe query during the configuration. The online configuration and changing of selected recipe values in Runtime can be protected against unauthorized access respectively by own operator authorizations. If you cancel the access protection, you must reconnect the recipe view with the recipe in the configuration dialog box. The access protection is queried when the recipe view screen opens. If the user has no authorization to read a recipe element, the corresponding column is not displayed in the table. If the user has no authorization to write a recipe element, the user cannot edit the data of the the corresponding column in the table. Access protection for the control tags must be configured separately by the object properties, e.g. of a screen, an I/O field or a button. Using the Recipe View Mouse and keyboard operation Introduction You operate the recipe view in Runtime by buttons in the toolbar. If you do not want to use the toolbar for operation, you can write the "ID" of the desired button in the "ToolbarButtonClick" object property with any dynamization type. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4270 System Manual, 02/2014 Overview Symbol Description ID "Help" Calls the help for the recipe view. 1 "Configuration dialog" Opens the configuration dialog box in which you change the properties of the recipe view. 2 "Select data connection" Opens a dialog for selecting a recipe or recipe query. The recipe data are then shown in the table of the recipe view. 3 "First line" The first data record is displayed in the table by the button. 4 "Previous line" The previous data record is displayed in the table by the button. 5 "Next line" The next data record is displayed in the table by the button. 6 "Last line" The last data record is displayed in the table by the button. 7 "Delete lines" The content of the marked lines are deleted. 8 "Cut lines" The content of the marked lines are cut out. 9 "Copy lines" The content of the marked lines are copied. 10 "Insert lines" The content of the copied or cut-out lines is inserted starting from the marked line. 11 "Read tags" The contents of the connected WinCC tags are read and written into the recipe elements by the button. The "Tags" communication type must be activated in the displayed recipe to be able to use the button. The recipe elements must be connected with tags. 12 "Write tags" The contents of the recipe elements are written into the connected WinCC tags. The "Tags" communication type must be activated in the displayed recipe to be able to use the button. The recipe elements must be connected with tags. 13 "Import Archive" Using a button, a CSV file is imported from the "ua" directory of the project folder into the table of the recipe view. 14 "Export archive" The original contents of the table are exported with table headers by the button when loading. The recipe is stored as a CSV file in the "ua" directory of the project folder. 15 "Sort dialog" Opens a dialog box for setting a customized sorting of the displayed columns. 16 Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4271 "Print" Starts the printout of the displayed values. The print job used for printing is defined in the configuration dialog in the "General" tab. 18 "Export data" Using a button, you can export the recipe or recipe query to a CSV file as configured but with the current runtime data. If the "Display dialog" option is active, a dialog opens in which you can view the settings for exporting and can start the export. With the appropriate operator authorizations you can also select the file and the directory for the export. If no dialog box is displayed, the data export to the preset file starts immediately. 20 "Time base dialog" Opens a dialog box for setting the time base for the used times. 19 "User-defined 1" Displays the first button created by the user. The function of the button is customized. 1001 Possible elements of the status bar The following elements may appear in the status bar of the recipe view: Symbol Name Description Archive name Displays the name of the selected recipe or recipe query. Row Shows the number of the marked line. column Shows the number of the marked column. Date Shows the system date. Time Shows the system time. Time Base Shows the time base used in the display of times. Navigation in the table You can navigate in the table as follows: You enter the next cell with the "ENTER" key or with the "Right" cursor key. You enter the previous cell with "SHIFT+ENTER" key or with the "Left" cursor key. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4272 System Manual, 02/2014 You enter the next line by clicking with the mouse in the line or with the "Down" cursor key. You enter the previous line by clicking with the mouse in the line or with the "Up" cursor key.
Note If the "Error while connecting the data!" error message appears when Runtime starts, the recipe view has no connection to a recipe or recipe query. Check the following: The name is specified correctly. The configuration is not changed. The connected recipe or recipe query still exists.
Editing recipe data Introduction You can edit data in the Data recipe view. The following options are available: Enter new data Change existing data Delete lines Cut-out, copy and insert lines Requirement You have permitted editing in the configuration dialog in the "General" tab. You have deactivated the "Write-protected" property for the column to be edited in the configuration dialog in the "Columns" tab. The "ID" column cannot be edited. If the recipe view is connected to a recipe query, you cannot delete and cut out a row. Entering new data in the table 1. Click on to move to the last line. The line is marked. 2. Double-click on the first cell of the marked line. You can also press on "F2", "Alt+Enter" or Ctrl+Enter" in the cell. 3. You enter the values in the cells one after the other and confirm each time by pressing Enter. After you have entered all values in the line and selected another line, the new data record is written into the recipe. You move to another line by clicking with the mouse, with the "ENTER" key or with the "Up" and "Down" cursor keys. 4. You can copy the data of a marked line with "CTRL+C" or "CTRL+X" into the clipboard. The copied data is inserted into a marked line with "CTRL+V". Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4273 Changing existing data in the table 1. Click on or to move to the desired line. You can also use the scrollbars to move to the desired line. 2. Double-click on the desired cell of the marked line. You can also press on "F2", "Alt+Enter" or Ctrl+Enter" in the cell. 3. You enter the values in the cells one after the other and confirm each time by pressing Enter. After you have entered all values in the line and selected another line, the changed data record is written into the recipe. Deleting a line in the table 1. Click on or to move to the desired line. You can also use the scrollbars to move to the desired line. 2. Click on to delete the marked line. Cutting, copying and inserting lines 1. Click on or to move to the desired line. You can also use the scrollbars to move to the desired line. 2. Click on or to cut or copy the data of the line. As an alternative, you can also use key combination "CTRL+ALT+X" or "CTRL+ALT+C". 3. Go to the desired line into which you want to copy the data. Click on to insert the cut- out or copied data. If you do not want to overwrite the data of the marked line, move into the last line to insert the data. Selecting and configuring data Introduction The recipe view shows the data of the connected recipe in a table. The displayed content of the table is determined by the selected columns and the selection of contents of the columns. Requirement You have created one or more recipes and/or recipe queries. You have connected the recipe view to a recipe or recipe query. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4274 System Manual, 02/2014 Configuring the columns 1. Go to the "Columns" tab. 2. In the "Columns" list, you can see the fields of the connected recipe or recipe query. If the check box in front of the name of the column is checked, the column is displayed in the table. Deactivate the check box if you do not want it to appear. 3. Determine the order of the columns in the table using the "Up" and "Down" buttons. 4. Select a column to configure the properties and the format. 5. If necessary, change the width of the column in the table. Enter a value in the "Length in chars" field. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4275 6. Some columns can also show the content and the header as a symbol. Determine how these columns are displayed in the "Display" field. Text and symbols can be displayed at the same time. 7. Save the configuration. Selection of column content that will be displayed in the table Configure criteria used to display the content in the columns in the "Selection" area. Procedure 1. Click "Edit...". The selection dialog is opened. 2. Specify the criteria for the display. More information on the selection of columns can be found under Select data (Page 4277). 3. Click "OK" to close the selection dialog. The selection is considered at the start of Runtime in the table of the recipe view. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4276 System Manual, 02/2014 Configuring the Sorting of Columns You configure the sorting of the columns in the table in the "Sorting" area. You can also specify the sorting criteria in Runtime using the key functions. 1. Click "Edit...". The sorting dialog opens. 2. Set a sorting sequence. More information on the sorting of columns can be found under Auto-Hotspot. 3. Click "OK" to close the sorting dialog. 4. Save the configuration of the contents. See also Select data (Page 4277) Select data Introduction Which contents of the recipe you want to show or export in the recipe view table can be defined in Runtime by the selection dialog box. In the selection dialog box you defie selection criteria with regard to the displayed columns of the recipe. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4277 Requirement The selection dialog is open (see paragraph "Selecting and configuring data (Page 4274)"). Procedure Proceed as follows: 1. Double-click in the first empty line in the "Criteria" column. The list with the columns of the recipe view is shown. Select the desired columns, e.g. "field1". 2. Double-click in the "Operand" column to select an operand. 3. Double-click in the "Setting" column to enter a comparison value. 4. Double click in the "Logic operator" column to select an "AND" or "OR" function. 5. Repeat the procedure if you want to define further criteria. 6. Click "OK" to close the selection dialog. The selection is displayed in the table of the recipe view.
Note Ensuring the display of column content Make sure of proper use of the settings and connections of criteria. Incorrect logical operations can lead to the data of the connected recipe not being displayed in the recipe view. Therefore test every criterion separately before the logical operation and then the logically operated criteria respectively. Check that all expected contents are also displayed in combination. This ensures that the selection is displayed completely in the recipe view.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4278 System Manual, 02/2014 Sorting data Introduction The data in the recipe view can be sorted by columns in Runtime. You sort the columns either via the "Sort dialog" button function or directly via the column headers.
Note You can define the sorting criteria already in the configuration in the recipe view by clicking the "Edit..." button under "Sorting" on the "Columns" tab.
How to sort with the Sort dialog Requirement You have activated the "Sorting dialog" button on the "Toolbar" tab of the UserArchive Control. Procedure 1. Click the "Sort Dialog" button . 2. Select the column of the connected recipe from the "Sort by" list which is to be used for sorting first. Select the relevant check box to specify sorting in ascending or descending order. If you want to sort by more than one column, select the other columns in the desired order in the "Then sort by" lists. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4279 How to sort the column contents with the column heading When sorting using the column header, you are able to specify the sort order for more than four columns. A sorting icon and sorting index, displayed with right-justification in the column heading, show sorting order and sorting sequence of the column contents. Requirement You have allowed sorting in the list field "Sort by column header" by click or double click on the "Parameters" tab of the recipe view. You have activated the "Show sorting icon" and "Show sorting index" checkboxes. Procedure 1. Click the column header of the column you want to sort as first column. The sorting index "1" is displayed, and the sorting icon points upwards for ascending sort order. 2. If you want to sort in descending order, click the column header again. 3. If the sorting order has been defined with "up/down/none", you can undo the sorting of the column with a third click. 4. If you want to sort several message blocks, click the respective header columns in the desired sequence. Using the recipe screen Introduction You use the recipe screen with the control objects you have configured. The paragraph describes the operation of the recipe screen with control tags from the section "Control tags (Page 4257)".
Note Runtime API Runtime API provides you with extensive uaArchive functions to edit recipes and recipe queries in Runtime (see section "Interfaces > Runtime API", subsection "Control tags").
Requirement Communication type is set to "Tags" in the recipe. The "Unique values" checkbox is activated under "Options" in the properties of the recipe element "Coloring 7". Recipe tags and control tags are set up. A process picture with the required I/O fields is configured. The I/O fields are connected with the recipe tags and control tags. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4280 System Manual, 02/2014 Example: Procedure To transfer recipe data to the recipe memory of the HMI device, follow these steps: 1. Enter the recipe values displayed in the blue fields "Water", "Sugar", "Aroma", "Coloring 7" and "Concentrate". The recipe values form the recipe data record you want to transfer. 2. Enter "3" as "ID" for the target recipe data record. 3. Enter "6" as job for reading in the "Instruction" field. The entered recipe data are transferred as complete data record. The recipe data record number 3 is overwritten in the recipe memory. The job mailbox returns the value "0" (no error) in the "Job" control tag. Alternative procedure 1. Enter new recipe values in the blue fields " Water", "Sugar", "Aroma", "Coloring 7" and "Concentrate". 2. Enter the recipe element "Coloring 7" as the "Field". 3. Enter the recipe element "020" as the value in the "Value" field. 4. Enter "6" as job for reading in the "Instruction" field. The entered recipe data are transferred as complete data record. The recipe data record whose recipe element " Coloring 7" has the recipe value "020" - in the example the recipe data record number 3 in the recipe memory - will be overwritten. The job mailbox returns the value "0" (no error) in the "Job" control tag. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4281 See also Displaying recipes (Page 4247) 10.5.2.6 Examples Example: Creating recipes Task In this example, you will create two recipes. A "Beverage" recipe for drinks. The drinks mixing plant produces various drinks. You create a recipe data record for each item. An "Orders" recipe for orders. The orders contain the current order data. Settings The settings relate to an HMI device which is connected to a SIMATIC S7-300 or SIMATIC S7-400. In this example, you will need the following tags, recipes, recipe entries and recipe data records: Tags: Name PLC connection Address Type article Yes DB 120, DBW 0 String litrewater Yes DB 120, DBW 4 Integer kilosugar Yes DB 120, DBW 8 Integer gramaroma Yes DB 120, DBW 12 Integer litreconcentrate Yes DB 120, DBW 16 Integer coloring Yes DB 120, DBW 20 Integer customer Yes DB 120, DBW 24 String numbercustomer Yes DB 120, DBW 28 String numberorder Yes DB 120, DBW 32 Integer quantitiy Yes DB 120, DBW 36 Integer filling Yes DB 120, DBW 40 Integer dateorder Yes DB 120, DBW 44 Date status Yes DB 120, DBW 48 Integer "Beverage" recipe: Recipe element Associated tag Article article Water litrewater Sugar kilosugar Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4282 System Manual, 02/2014 Recipe element Associated tag Aroma gramaroma Concentrate litreconcentrate Coloring coloring Data record ID 1 2 3 Article Juice Nectar Cola Light Water 5 50 72 Sugar 5 10 35 Aroma 100 300 240 Concentrate 95 50 35 Coloring FS 0063 FS 0063 FS 1007 "Orders" recipe: Recipe element Associated tag Customer customer Number numbercustomer Order numberorder Article article Quantitiy quantitiy Filling filling Status status Date dateorder Procedure 1. Create the tags listed above with the settings described above. 2. Create the "Beverage" and "Orders" recipes with the settings indicated above. 3. Select the following properties for the recipes: Under "General > Size" the "Unlimited" type Under "Communication > Communication type" the "Tags" communication type Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4283 4. Create the recipe entries in each recipe. 5. Activate the "Unique values" check box for the following elements in the property window under "Extras". In the "Beverage" recipe for the "Article" recipe element In the "Orders" recipe for the "Order" recipe element 6. Create the data records indicated above in the "Beverage" recipe. Enter the values indicated above in each of the data records. Result The "Beverage" and "Orders" recipes are created. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4284 System Manual, 02/2014 See also Example: Configuring a recipe view (Page 4286) Example: Creating recipe queries Task In this example, you create the "Label" recipe query. The following recipe elements are displayed in the recipe query: Recipe element Recipe Article Beverage, Orders Customer Orders Status Orders Order Orders Filling Orders Sugar Beverage Coloring Beverage The "Article" recipe element is contained as a common element of both recipes. Requirements The "Beverage" and "Orders" recipes are created. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4285 Procedure 1. Create the "Label" recipe query. Create the elements listed above. 2. Enter the following conditions under "Properties > Relations": Beverage.Article = Orders.Article Result The "Label" recipe query is created. Example: Configuring a recipe view Task In this example, you will add a plant screen with recipe view to the "Label" view. Requirement The "Create recipes" and "Create recipe query" examples are created. You have created and opened the "Drinks mixing plant" process picture. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4286 System Manual, 02/2014 Procedure 1. Insert the recipe view in the process picture. You will find the recipe display in the toolbox under "Controls". 2. In the Inspector window, use the arrow to select the "Recipe query" type in the "Data source" input field of the "General > View" group. 3. Select the "Label" recipe query. 4. Define additional display options for the recipe view in the "Properties" > "Appearance" group in the Inspector window. 5. Go to the "Properties" > "Columns" group in the Inspector window. Activate the check box in the "Visible" and "Protected" columns for all recipe elements. 6. In the Inspector window, switch to the "Properties" > "Toolbar" group. Activate the check box in the "Visible" column for the following buttons under "Toolbar - Buttons". "First line" "Previous line" "Next line" "Last line" "Sort dialog" "Selection dialog" 7. Go to the "Properties" > "Columns" group in the Inspector window. Enter the following sorting in the "Sort" column. By job number Ascending Result In Runtime,the recipe view is opened with the "Label" recipe query in the "Drinks mixing plant" process picture. The data records are displayed sorted by job number. You can use the buttons to switch between the data records. Use the "Status" data field to display the current job or jobs that have been run. You can adapt the recipe display to the data records as required with the "Sort dialog" and "Selection dialog" buttons. See also Example: Creating recipes (Page 4282) Using control tags Example for the use of control tags: You need to perform the following steps to work through the example with the control tags: Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4287 Requirement You have created the "Drinks" recipe. Properties of the "Cola" recipe Log type "Unlimited" Communication "Tags" Data type for the "ID" control tag Long Data type for the "Job" control tag Long Data type for the "Field" control tag String (1 character) Data type for the "Value" control tag String (1 character) Procedure 1. Create the control tag with the following properties: Control tag Data Format Output format ID decimal 0999 Job decimal s9 Field String * Value String * 1. Select the "Update for changes" object property for each control tag. 2. Connect the control tags to the "Drinks" recipe. 3. Create a new screen and add a recipe view. Select the "Drinks" recipe. Check the "Paste", "Change" and "Delete" check boxes under "General". 4. Create an I/O field for every configured recipe element. 5. Connect the I/O fields to the associated tags. For example, connect the I/O field for "Coloring" to the "Coloring" process tag. Create a text field for the label of every configured I/O field. By doing so, you assign the I/O fields to the individual recipe elements in Runtime. 6. Create an I/O field for every control tag. Create a text field for the label of every configured I/O field. By doing so, you assign the I/O fields to the individual control tags in Runtime. 7. Start Runtime or load the project into the HMI device and start the project. Result The configuration for the recipe is completed. Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4288 System Manual, 02/2014 Accessing the recipe You can now access the recipe in the following ways: In the table view of the recipe view Using the configured I/O fields Write the data record to the process tags using the ID Enter the ID "3" in the "ID" I/O field and enter a "7" in the "Job" I/O field. The values of data record "3" will be written to the process tags in the I/O fields and displayed in the I/O fields. If the data record values were read without error from the recipe, error number "0" is displayed in the "Job" field. Error number "-1" is output if an error occurs. The "Field" and "Value" control tags are not required.
Note The current contents of the process tags are read into the recipe by entering the ID "-1" and the job "6". The new values are appended at the end of the table. The data record IDs are continuously incremented.
Read the process tags via the ID Change the values in the I/O fields of the process tags and enter a "5" in the "ID" field. Enter "6" in the "Job" I/O field. The changed values of the process tag are written to data record "5" of the recipe. The values that were previously contained in this data record are overwritten. The "Field" and "Value" control tags are not required. Write a data record to the process tag using the "Field" and "Value" control tags
Note For an element that is referenced with the "Value" control tag, you must select the "Field must posses an unique value" check box under "Properties" > "Memory options". Otherwise it will not be possible to create a unique assignment between the recipe data record and the value in the element.
Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4289 In the "Field" I/O field, enter the word "Item" and write "Cola Light" to the "Value" I/O field. Enter "7" in the "Job" I/O field. The values of the "Cola Light" data record will be written to the process tags in the I/O fields and displayed in the I/O fields. The "ID" control tag is not needed, so it must be set to 0. 10.5.2.7 SQL language SQL (Structured Query Language) is an efficient and widely distributed database language. The SQL language is used for database queries in the functions of the WinCC script language. You will find further information in the relevant technical manuals. In some standard functions and some functions in the "Recipes" editor, you must specify conditions in the database language SQL to specify the data records to be edited. A few examples of how provide an SQL instruction are given below:
Note Name convention Suffixes, extensions and the name of a recipe, recipe query or a recipe element may only consist of letters, numbers and underscores "_" and may not exceed a length of 20 characters. The first character must always be a letter.
FieldA > '1992-12-31 23:45:12.12' The instruction selects all data records whose value in the "FieldA" column is greater than the specified value. FieldA is is of the data type DB_TYP_TIME. FieldB like 'tank%' Then the data records for which the "FieldB" column contains the value "tank1" or "tank4" or "tank12" etc. are selected for example. FieldB is of the data type DB_TYP_CHAR. FieldC > 100 With a condition of this type, all data records are selected for which the "FieldC" column contains a value greater than 100. FieldC is of the data type DB_TYP_INTEGER. BETWEEN FieldC = 20 AND FieldC = 200 The statement selects all data records for which the "FieldC" column contains a value between 20 and 200. FieldC is of the data type DB_TYP_INTEGER. FieldD Sorting then takes place by column "FieldD". FieldE desc Sorting then takes place by column "FieldE" in reverse alphabetical order (descending order). See also SQL keywords (Page 4291) Visualize processes 10.5 Working with recipes WinCC Professional V13.0 4290 System Manual, 02/2014 10.5.2.8 SQL keywords SQL keywords
Note Do not use the following terms and keywords of the SQL language as names for a recipe, recipe query or recipe element: "Archive" "View" "Field" "ViewCol"
Keywords of the SQL language add all alter and any as asc begin between binary break by call cascade cast char char_convert character check checkpoint close comment commit connect constraint continue convert create cross current cursor date dba dbspace deallocate dec decimal declare default delete desc distinct do double drop else elseif encrypted end endif escape exception exec execute exists fetch first float for foreign from full goto grant group having holdlock identified if in index inner inout insert instead int integer into is isolation join key left like lock long match membership message mode modify named natural noholdlock not null numeric of off on open option options or order others out outer passthrough precision prepare primary print privileges proc procedure Visualize processes 10.5 Working with recipes WinCC Professional V13.0 System Manual, 02/2014 4291 Keywords of the SQL language raiserror readtext real reference references release remote rename resource restrict return revoke right rollback save savepoint schedule select set share smallint some sqlcode sqlstate start stop subtrans subtransaction synchronize syntax_error table temporary then time tinyint to tran trigger truncate tsequal union unique unknown update user using validate values varbinary varchar variable varying view when where while with work writetext See also SQL language (Page 4290) 10.6 Working with reports 10.6.1 Basics 10.6.1.1 Reports Introduction Reports are used to record process data and processed production cycles. You have the opportunity, for example, to create regular shift reports, output batch data, or record the production process for quality control (QC). Visualize processes 10.6 Working with reports WinCC Professional V13.0 4292 System Manual, 02/2014
HTML Stands For Hyper Text Markup - HTML Is Not A Programming Language, It Is A Markup Language - A Markup Language Is A Set of Markup - HTML Uses Markup Tags To Describe Web Pages