system.recipe.setItemRecipe

Sepasoft MES Module Suite

system.recipe.setItemRecipe()

Set the recipe for the production item specified by the itemPath parameter. If the production item is a line, then all children production items of the line will also be set to the same recipe provided they were added to the recipe.


system.recipe.setItemRecipe(itemPath, recipeName, enableValueMonitoring)

Syntax

system.recipe.setItemRecipe(itemPath, recipeName, enableValueMonitoring)

  • Parameters

String itemPath - The item path to a production line, cell, cell group or location.

String recipeName - Name of recipe.

Boolean  enableValueMonitoring - If true, turn on recipe value variance monitoring.

  • Returns

Nothing

  • Scope

All

Python
#---- setItemRecipe ----#
#-- function: system.recipe.setItemRecipe(itemPath, recipeName,  enableValueMonitoring)   
#                                          (str)      (str)              (bool)
#-- Definitions
itemPath = '[global]\Enterprise\Site 2\Packaging\Line 1\Holding'
recipeName = 'Stubborn' 
enableValueMonitoring = True
if enableValueMonitoring == True:
    evm = 'On'
else:
    evm = 'Off'
#-- execute
try:
    system.recipe.setItemRecipe(itemPath, recipeName, enableValueMonitoring)
     print recipeName + ' selected for ' + itemPath + ' and value monitoring is ' + evm
except:
    system.gui.messageBox('Attempt to set recipe item failed')

Output

Code
Stubborn selected for [global]\Enterprise\Site 2\Packaging\Line 1\Holding and value monitoring is On

 system.recipe.setItemRecipe(itemPath, recipeName, enableValueMonitoring, note, changeBy)

Version specific: 3.81.12 RC1 and later

Syntax

system.recipe.setItemRecipe(itemPath, recipeName, enableValueMonitoring, note, changeBy)

  • Parameters

String itemPath - The item path to a production line, cell, cell group or location.

String recipeName - Name of recipe.

Boolean  enableValueMonitoring - If true, turn on recipe value variance monitoring.

String note - Optionally provide a reason the recipe was set.

String changedBy -Optionally provide a reference to who or what changed the recipe. This value will only be recorded if a Note is also provided.

  • Returns

Nothing

  • Scope

All

 

Sepasoft MES Module Suite