MES 3.0

The Recipe Values dialog box allows for the following settings to be applied:

  • Recipe Value name and description
  • Tag path to the tag that will hold the recipe value
  • Add a 'Request Value' script
  • Value Scaling
  • Variance Logging
  • Define a Sort Order

Name

The required name is used to reference the recipe value. The name must be unique and must not exist in any of the child production items of the production item that the recipe value is being added to. The reason for this is that recipe values are propagated down to all of the children, and if the name is the same, a conflict will occur. Also, some characters are not allowed in recipe value names. 



Description

The recipe value description is used to further describe the recipe value. It appears in the recipe editor component, analysis, reports, and etc. 



Tag

This is the path to the Ignition tag that is associated with this recipe value. If a recipe value is added but no tag is assigned, it will not appear in the recipe editor, and values will not be used when recipes are selected.



Request Value Script

Script can be added to calculate or obtain a value to return for a recipe value anytime a recipe is selected for a production item. This provides flexibility to do just about anything in place of returning the value stored in the Settings & Changeover system. See Request Value Script section for more information.



Enable Scaling

If this option is checked, the recipe value will be scaled. The recipe value is retrieved out of the Settings & Changeover system and then scaled by the value of the recipe scale tag for the production item. 

When using recipes for batch or other processes that can change based on the amount that is produced, recipe scaling will adjust recipe values based on a recipe scale value. In the recipe value configuration, there is an Enable Scaling setting that can be selected. If the Enable Scaling setting is selected for a recipe value, then whenever a recipe is selected for a line, cell, cell group or location, the recipe value will be scaled by the RecipeScale value.

Enabling recipe scaling is done for each individual recipe value. This supports scaling some of the recipe values while not scaling others. By default, each production item's Enable Scaling setting is false and must be selected before the RecipeScale value will be applied.

The RecipeScale tag is a production OPC item that exists for each line, cell, cell group or location. By default, the RecipeScale is 1.0 and recipe values will not change when recipes are selected. When selecting a recipe for a line, all of the cells, cell groups and locations beneath the line will also be set to the same recipe provided they are enabled. Also, each cell, cell group and location RecipeScale value will be set to match that of the line. This enables simple recipe selection for a line without the tedious task of selecting each machine underneath the line.

Watch the Video




Enable Variance Logging

If this option is checked, then the tag will be monitored for changes after a recipe is selected for a production item. If the value changes more than the window defined in the Low Variance Threshold and High Variance Threshold, the variance will be logged to the database, and the Recipe Variances Exists OPC tag for the production item will be set to true. This prevents values that are known to vary within an allowable range from being logged to the database and causing the Recipe Variances Exists tag from being set. 

If this option is not checked, then the value can change and it will not be logged to the database. Also, the Recipe Variances Exists tag will not be set as a result of this recipe value. 

Low Variance Threshold

The Low Variance Threshold setting is used to define the lower limit before recipe variances are triggered for this recipe value. The variance threshold can be defined as a percentage of the recipe value or a fixed amount.

High Variance Threshold

The High Variance Threshold setting is used to define the upper limit before recipe variances are triggered for this recipe value. The variance threshold can be defined as a percentage of the recipe value or a fixed amount.


Example

Both the low and high variance thresholds can be defined by percentage of the recipe value or a fixed offset around the recipe value or just fixed values. The image shows the Fill Weight recipe value with an upper variance threshold of +10%. The upper threshold value is calculated by starting with the recipe value of 50.2 and adding 10%. The lower threshold is calculated in the same manner. When the Ignition tag value changes, a check is done to see if the current value is between the upper and lower threshold values and in this case as shown, we see that the current value of 51.0 is between 55.22 and 47.69. As a result, no variance will be logged.




Now lets take a look at a case where the current value is 46.0 as shown in the image below. The value 46.0 is less than the lower threshold and a variance will be logged.

The example shows the upper and lower threshold values being calculated as a percentage of the recipe value, but they can also be a fixed offset around the recipe value. To configure a recipe value for a fixed offset around the recipe value, an upper variance threshold setting of +<offset> is used. An example is a variance threshold offset of +7.5 were the upper threshold is calculated by adding 7.5 to the recipe value. Using the recipe value from above of 50.2 and adding 7.5 to it will give us an upper threshold of 57.7. The lower variance threshold works the same way.

Instead of the thresholds being calculated as a percentage or fixed offset around the recipe value, fixed values can also be used. For example, a recipe value can be configured with an upper variance threshold of 52.0. In this case, the upper threshold will always be 52.0 irregardless of the recipe value.

Evaluate Variance Script

Script can be used instead of using the Low Variance Threshold and High Variance Threshold settings to determine if the recipe value is outside of an allowable range. When the Recipe Values tag value changes, the variance state is evaluated using the Low Variance Threshold and High Variance Threshold settings. Then, if an Evaluate Variance Script has been entered for the recipe value, the script will be executed, and the state can be changed. See Evaluate Variance Script for more information.


upperValue = system.tag.read("[Default]SomeOtherTag")
recipeValue = event.getRecipeTag().getCurrentValue()
if recipeValue > upperValue.value:
	event.setLogVariance(True)
else:
	event.setLogVariance(False)


The script is passed on Evaluate Variance Script object that allows accessing the current tag information and also allows setting the log variance flag. In the script above, a tag called SomeOtherTag is read and compared to the current value of the tag associated with the recipe value where this script was defined. If the current value is greater than the value of the SomeOtherTag, then the setLogVariance method is called with True meaning the recipe value is in a variance state. 

See Enable Variance Monitoring section for details about configuring recipe values.


Variance Status

Variances are logged to the database and can be viewed in the Recipe Variance Viewer component, analysis and reports. The Recipe Variance Time StampRecipe Set Point Value and Recipe Value To data points can be used in analysis to detect when a setpoint is in variance. Each line, cell, cell group and location production items has one or more associated setpoints.




Sort Order

The order in which Recipe Values appear in the Recipe editor can be modified by setting the Sort Order value. This is an integer value with higher values appearing first in the Recipe Editor. The default value is 1. 

  • No labels