Sepasoft MES Module Suite
Description
Returns a list of recipe value names and their current live values.
Syntax
system.recipe.getItemLiveRecipeValues(itemPath, recipeName, subProductCode, valueNames)
- Parameters
String itemPath - The item path to a production line, cell, cell group or location.
String recipeName - Name of the recipe to remove the specified production item.
String subProductCode - Sub product code to return values for, or else leave blank to read the default values for the production item.
String valueNames - The recipe value names to get the live values for, or leave blank for all recipe values.
- Returns
A list of recipe value names and their current live values.
- Scope
All
Code Snippet
Python |
# Get the current live values (tag values) for a recipe #---- getItemLiveRecipeValues ----# #-- function: system.recipe.getItemLiveRecipeValues(itemPath, recipeName, subProductCode, valueNames) # (str) (str) (str) (str) #--- #--- SCRIPT CONSOLE CODE --------------------------------------------------------------------------- itemPath = "[global]\Enterprise\New Site\Packaging\packagingLine1\Filler" recipeName = "B_Test" userRole = '' result = '' data = '' map = system.recipe.getItemLiveRecipeValues(itemPath, recipeName,"", "") if map != None: for rv in map: data = "%s %s=%s" %(data, rv, map[rv]) result = "%s LIVE values: %s" %(result, data) print result else: print 'No live values found' #-------------------------------------------------------------------------------------------------- #--- WINDOW CODE ---------------------------------------------------------------------------------- event.source.parent.getComponent('taOutput').text = '' itemPath = event.source.parent.getComponent('mesosCell').equipmentItemPath #itemPath = "[global]\Enterprise\New Site\Packaging\packagingLine1\Filler" recipeName = event.source.parent.getComponent('RSC').selectedRecipeName #recipeName = "B_Test" userRole = '' result = '' data = '' # Get a map of the recipe value names and the current tag values referenced by the recipe map = system.recipe.getItemLiveRecipeValues(itemPath, recipeName,"", "") if map != None: for rv in map: data = "%s %s=%s" %(data, rv, map[rv]) result = "%s LIVE values: %s" %(result, data) event.source.parent.getComponent('taOutput').text = result else: event.source.parent.getComponent('taOutput').text = 'No live values found' #-------------------------------------------------------------------------------------------------- |
Output
Python |
LIVE values: IBC Vanilla Percentage=2.8 Max Temperature=92 Min Temperature=85.3 IBC Sugar Percentage=17.5 Line Speed=110 |
Sepasoft MES Module Suite