unRecipe 9.1.0
|
The goal of this document is to describe how to generate recipes for a UNICOS CPC6 application and how to install, import, and activate the recipes from WinCC OA. The necessary steps for using the recipes can be summarized as follows:
UAB Extended Configurations Wizard
2.1 Launch Extended Configurations Wizard
2.2 Create a recipe class
2.3 Run the plugin generation
WinCC OA
3.1 Create a WinCC OA - CPC6 application
3.2 Import the recipes
3.3 Use the recipes (activate, edit, duplicate...)
3.4 Dynamic recipe classes
3.5 Recipe advanced panel
3.6 Recipe periodic saving
The first step of the procedure is to create and generate a UNICOS CPC6 application using the CPC Wizard as described in the following documents:
In the PLC specifications panel, enable the recipes and fill in the recipe parameters as shown in Figure 1:
The most relevant settings are:
From the UAB Bootstrap application (installer available following the instructions in Automatic generation tools instruction), install the Extended configurations wizard, select a CPC application folder and continue, as illustrated in Figure 2:
Once the application is opened in the wizard, click the button Run
and select the generator in the wizard panel. The recipe generator in Figure 3 will appear:
From the recipes generator, click on the Open
button, and two new windows will be displayed:
A recipe class definition describes the list of devices (e.g. AnalogAlarm_1
) and device elements (e.g., HH
, H
) that will be used in all the recipes (recipe instances) of the class.
To create a new recipe class from the recipes configuration window, select the recipe class name from the select rcp class combo box, and click the Add
button. The panel in Figure 6 will appear where the appropriate information must be entered.
Then, click on Ok
and fill in the recipe class properties in the upper part of the window is shown in Figure 5:
UnRcpType
).The recipe class definitions can contain additional data for the recipe classes and recipe instances like domain, nature, access control domain, and privileged actions.
The fields used to define the additional data have the 'c
' prefix for the recipe class data and the 'i
' prefix for the recipe instance data. For example, the domain and nature fields for the recipe class and recipe instances are named: cDomain
, iDomain
, cNature
, and iNature
.
The same principle is applied to the privileged actions where it is possible to define the users who can trigger a specific action, like the recipe activation. The allowed values for the privileged actions are: admin
, expert
, or operator
.
The next step is to add devices to the recipe class:
AnalogAlarm
, AnalogParameter
, Controller
, DigitalParameter
, WordParameter
, and DigitalAlarm
(see more about Digital Alarm under the Alarm Delay time in the Appendix section).By default, when a device is added to a recipe class, all the elements included in the recipe type for that device type are added to the recipe class (e.g. when an AnalogAlarm
device is added to a recipe class the following elements will be added: HH
, H
, L
, LL
). However, modifying the recipe elements of a device included in the recipe class is possible by deselecting the desired device elements.
When the recipe class definitions are completed, it is necessary to generate the database file to be imported in WinCC OA.
To run the generation, go to the recipes generator panel in the wizard (Figure 8), and click the Generate
button. The database file will be generated in the output folder.
Please follow the procedure described in the relevant document (Procedure WinCC OA UCPC Application).
To import the recipes file generated by the Extended Configurations wizard do the following steps:
unicosHMI.pnl
interface (-p vision/graphicalFrame/unicosHMI.pnl
).admin
, and start the Import Database
panel by clicking on UNICOS Menu —> Configuration —> Import Database (local) as shown in Figure 9.SOFT_FE
.Recipes.txt
produced by the generator.Auto-import
button, which will first do a check, and then an import if there are no errors. The log will show the details of the checking and import phases and errors or warnings if they occur.RCP_FE
front end (Figure 11).To browse the imported recipes, do the following steps:
unicosHMI.pnl
panel.Device Selection
panel on the left, tick on the Device type checkbox.UnRcpInstance
device type from the device tree.To activate a recipe instance, perform the following actions:
Activate
button and wait until the activation finishes.When the recipe activation is triggered, messages similar to those depicted below will appear in the recipe log frame.
To edit the values of a recipe instance, perform the following steps:
Edit
button afterwards. The next actions will be enabled:Save
or Save to DB
button to save the changes, or the Cancel
button to discard them.The recipe instance panel allows the user to filter the available recipe elements and only display a subset matching certain patterns. Such an example is given in Figure 14, where only the elements whose description contains the text alarm
and have the digit 6
in their alias are shown. In addition, generic WinCC OA pattern-matching expressions are supported.
Currently, there are two ways of creating new recipe instances from the recipe instance panel:
New instance
button. A pop-up window, Figure 15, will prompt for the recipe instance name and description. The values for the new recipe instance will be taken from the PLC (online values). It is also possible to create a new recipe instance in several classes. In that case, press the Multiple classes
button and, from the new window of creating multiple instances, select the recipe classes where the new instances will be created.Duplicate
button of Figure 13. A pop-up window, Figure 16, will prompt for the recipe instance name and description. The values of the new recipe instance will be copied from the original recipe instance.The following steps need to be taken to delete a recipe instance:
Delete
button and press the confirmation message. Note that the recipe instances marked as Initial
cannot be deleted.By pressing the Initial Recipes
button in the recipe instance panel, Figure 13, a new window will pop up (Figure 17) displaying all the initial recipes in the PCO hierarchy (linked to the recipe instance PCO and its PCO children).
From this window, it is possible to do the following actions:
By clicking on the Last Activated
button in the recipe instance the panel, Figure 13, a new window will be opened (Figure 18), displaying the last activated recipes in the PCO hierarchy are linked to the recipe instance PCO and its PCO children.
From this window, it is possible to do the following actions:
By pressing the button Save
in the recipe instance panel, Figure 13, it is possible to save the values of the selected recipe in the recipe marked as Initial
for the recipe class.
The unRecipe
component offers the possibility to save recipes to the Oracle database once the database configuration is created.
When a recipe is selected to be saved in the Oracle database, the recipe class and all its recipe instances will be saved in the database.
To save a recipe class and all its instances from the recipe instance panel, do the following steps:
Select
button and then click on the Save to DB
button.Ok
.When a recipe is being edited, it is possible to load its values from the Oracle database by clicking the DB Values
button from the recipe instance panel, Figure 13. A pop-up menu, Figure 19, will show the following options:
From the database history panel, it is possible to view the contents of a recipe stored in the Oracle database by double-clicking on an entry in the table, as shown in Figure 20.
The unRecipe
component offers the possibility to create recipes dynamically in WinCC OA without importing the recipes file. This section explains how to use dynamic recipes.
To create new recipe classes from WinCC OA, click on the recipe class option in the UNICOS Menu —> Configuration.
A new window will be opened that allows operating with the recipe classes.
To create a new recipe class from the panel, click on the New Class
button, Figure 22. A pop-up window, Figure 23, will appear to prompt for the information required to create a new recipe class:
If a recipe front-end does not yet exist, the panel below in Figure 24 will appear:
It is recommended to choose a driver number different than the ones already existing in the application, so it is possible to import the recipes without stopping the drivers used to communicate with the different front-ends. Once the recipe front-end is created, the new recipe class will appear in the list, and it is possible to add new devices to the recipe.
To add new devices to an existing recipe class, do the following steps:
Select
button.Add devices
button. A new window, Figure 25, will pop up containing all the available devices. Select the required devices for the recipe class in the panel. Filtering the devices by application and searching them using the box is possible. Once the required devices are selected, click the Ok
button to continue.Apply changes
button in the recipe class panel, Figure 22, to include the new changes introduced. To cancel the addition of devices to the recipe class, click the Cancel
button.To remove devices from a recipe class, go to the recipe class panel, Figure 22, and do the following steps:
Select
button.Remove Sel
button, and accept the confirmation message.Apply changes
button to remove the selected devices from the recipe class and all its recipe instances (if any). On the contrary, click on the' Cancel' button to abort the removal of devices in the recipe class.To edit the device elements included in a recipe class, do the following steps:
Select
button.Edit Elements
button. A new window, Figure 26, will pop up, allowing the edition of the recipe class device elements. This window shows all the devices included in the recipe class organized by device type and the allowed elements to include in the recipe class. If a single device is selected in the list, its elements included in the recipe class will have a grey background in the list. From this window, it is possible to select one or several devices of the same type and select the desired elements to be included in the recipe class using the list. Once the required device elements are selected, click on the Apply
button to continue modifying the recipe device elements.Ok
(or Cancel
) button to close the Edit recipe elements
window.To remove an existing recipe class and all its recipe instances, do the following steps:
Select
button.Note that the recipe classes created with an importation file and the recipe classes containing initial recipes cannot be removed.
To duplicate an existing recipe class do the following steps:
Select
button.Duplicate
button in the recipe class window. A new pop-up window, Figure 27, will appear to ask for the necessary information to create a new recipe class.Ok
button.The recipe class and recipe instance privileges allow configuring the actions assigned to the different UNICOS roles (admin
, expert
, operator
). The different actions correspond to the buttons in the recipe class and instance panel. The actions assigned to the operator role can also be executed by the admin and expert users, and the admin users can also execute the actions assigned to the expert role.
To edit the recipe class privileges, do the following steps:
Select
button.Privileges
. A new window, Figure 28, will pop up to show the different privileges assigned to the UNICOS roles.[...]
at the right of the UNICOS role. A new window (Figure 29) will pop up to show the current actions assigned to the selected UNICOS role (table on the right side of the window) and the unassigned actions (table on the left). In the example illustrated in the image below, all the privileges are already assigned, so removing the existing privileges for the operator role is possible.Ok
button to apply the changes to the recipe class and all its recipe instances. The Reset
button will restore the privileges to the previous values. The Load Default
button will restore the default values for the recipe class and its recipe instances.To create a new recipe instance from the recipe class window, do the following steps:
Select
button.New Instance
button. A pop-up window, Figure 30, will prompt for the recipe instance name and description. The values for the new recipe instance will be taken from the PLC (online values).The unRecipe
component allows saving recipes to the Oracle database once the database configuration is created (see the configuration database setup in the Appendix section at the end of this document).
When a recipe is selected to be saved in the Oracle database, the recipe class and all its recipe instances will be saved in the database.
To save a recipe class and all its instances from the recipe class panel, do the following steps:
Select
button in Figure 22.Save to DB
button and press the confirmation dialog.From the recipe class panel, Figure 22, it is possible to load the values of all its recipe instances. To do that:
Select
button in the recipe instance panel, Figure 22.Edit
button.Load from DB
button. When this button is pressed, a pop-up menu, Figure 31, will offer the following options:When the recipe elements are different in the system and the Oracle database, only the values corresponding to the recipe elements existing in the local recipe will be updated.
Within the unRecipe
component, a panel can perform bulk operations in recipe instances. The advanced recipe panel is accessible through the UNICOS configuration menu, allowing performing operations for the recipes available in the system and the Oracle database.
The advanced recipe panel allows the following actions for the recipes available in the system:
*.csv
files.The advanced recipe panel allows the following actions for the recipes available in the Oracle database:
To view the contents of a recipe stored in the Oracle database, double-click on the recipe name. A new panel, Figure 34, will be opened to display the recipe values.
The recipe periodic saving option gives the users the possibility of saving recipes periodically in a database with a specific time and date frequency. Multiple recipes can be saved simultaneously, but it is recommended to configure a time to save the recipes when the users are not operating with them, as it is necessary to lock them to save them to the database.
Once the requirements are set, the next step is to select the time and date frequency when each recipe will be saved into the database. Next, select the new option UNICOS HMI menu button -—> Configuration -—> Recipes -—> Recipe Periodic Saving.
In this configuration panel, Figure 35, the user can see the following:
The time and date of the recipes that will be automatically saved periodically can be seen in the Next Backup box in the recipe configuration panel of Figure 35, and also in the last column of the table displayed after selecting UNICOS HMI menu button -—> Configuration -—> Recipes -—> Recipe Advanced, Figure 36 for each recipe configured, or in the recipe instance faceplate panel, Figure 37, in the top right corner.
The user can configure a system integrity alarm, and it will be raised in the case of a problem with the TCP connection (Warning – code 10), the maximum time of the manager restart reached (Warning – code 20), unRecipe manager blocked (Error – code 30), unRecipe manager stopped (Error – code 40), and no connection or database not accessible (Error – code 50).
The alarm can be set in the HMI menu button -—> Configuration -—> System Integrity (local) subsystem unRcpPeriodicSaving. The alarm can be added like any other system integrity alarm. To display the particular alarm in the System Status button, first, add the alarm in the System Integrity (local). Then select the HMI menu button -—> Configuration -—> Application -—> Alarms. After that, click the cascade button next to Add Class, select unRcpPeriodicSaving, and add it to the list of existing alarms.
There are currently known limitations regarding this new implementation. The major ones are:
The recipe activation can fail if the recipe activation timeout is not properly set.
To verify the recipe activation timeout in a Schneider PLC, do the following steps:
_Timeout
in the variable name and press the key.t#0s
). Otherwise, introduce a new timeout value (e.g., t#100s
).To verify the recipe activation timeout in a SIEMENS PLC, do the following steps:
Recipes
source file.ActivationTimeout
variable must be different than 0. Otherwise, introduce a new timeout value (e.g., 100), Figure 38.The error message displayed in listing oracle_driver_missing may appear while trying to save/load recipes from the Oracle database.
To fix the issue, please install the Oracle Instant Client.
The unRecipe
component allows users to save and load recipes from an Oracle database. However, before performing operations on the database, it is necessary to configure the connection to the database. The following actions should be performed:
JCOP Framework
tab of Gedi, open the Device Editor and Navigator
, Figure 41.Configuration
mode, right-click on the distributed system, and select Configuration DB
from the contextual menu. The Configuration Database Tool
window will be opened, Figure 42.[...]
available in the CDB Setup and status
frame. The Configuration Database Setup
window will be opened.Database setup
frame, click on the [...]
button next to the DB connection combo box and select the option Create
. The Database connection setup window will be opened, Figure 43.Try to connect
button. If the configuration is correct, a confirmation message should appear. Click on the confirmation message.Create
to finish the process.Notice that to be able to operate with recipes in the database, it is necessary to install the Oracle Instant Client.
The recipe type definitions file contains the list of device types and device elements that can be included in a recipe class and recipe instance, e.g., a recipe can contain the MPosR
element of a WordParameter
device type, Figure 45.
The default file path for the file is:
The recipe type definitions file contains the following fields:
defaultType
: Contains a Boolean value used to specify if the recipe type is the default one. Only one recipe type can be used as the default type.typeName
: The recipe type name. The value must be unique within the file.deviceType
: This field adds a new device type to the recipe type. It contains a UNICOS device type name (e.g. AnalogAlarm
).dpe
: This field adds a new device type attribute to the recipe type. For example, the value FEDeviceManualRequests: HH Alarm
will add the HH
attribute of the AnalogAlarm
device type to the recipe type.Figure 46, displayed below, shows the relationships between the recipe types, classes, and instances. A recipe class must belong to a recipe type, and a recipe instance must belong to a recipe class.
In the latest version of the unRecipe component (version 1.6.0), the new AlDt device element has been added to analog and digital alarms. Moreover, digital alarms are now supported so that the user can include any device defined for this type. However, there are some requirements to be able to configure the alarm delay time:
If only the unCPC and unRecipe components are updated, but the PLC resource package version is not; then the AlDt field is deselected by default (so there are not problems activating a particular recipe). In addition, any device that belongs to a particular PLC that is defined under digital alarm type will not be displayed, unless the resource package version of the PLC is updated to the 1.5.0 version.
If the PLC resource package version is updated, but the unCPC and unRecipe components are not, the AlDt and digital alarm types will not be available, but all the previous implementations will continue working without issues, i.e. backward compatibility is ensured.