Request Value Script

Sepasoft MES Module Suite

Request Value Script

If the Request Value Script property of a production item contains a script, it will be executed every time a recipe is selected. When it is executed, the event object provides information about the recipe value being read. If event.setRecipeValue(value) is not called, then the value from the database will be used.

Properties

getItemPath()

Description

Return the item path for the recipe value being read.

Syntax

getItemPath()


  • Parameters

None

  • Returns

String itemPath - Item path for MES production item.

getRecipeValue()

Description

Return the current value for the recipe value being read.

Syntax

getRecipeValue()


  • Parameters

None

  • Returns

String recipeValue - The value for the recipe value being read.

getScale()

Description

Return the scale factor for the MES production item associated with the recipe value being read.

Syntax

getScale()


  • Parameters

None

  • Returns

Double scale - The scale factor corresponding to this recipe value.

getSetPoint()

Description

Get the Recipe setpoint's value. This is the target value set by the Recipe.

Syntax

getSetPoint()


  • Parameters

None

  • Returns

Object setpointValue - The target setpoint tag value for this Recipe Value.

getTagPath()

Description

Return the Ignition tag path assigned to the recipe value being read.

Syntax

getTagPath()


  • Parameters

None

  • Returns

String tagPath - The tag path corresponding to this recipe value.

getValueName()

Description

Return the name for the recipe value being read.

Syntax

getValueName()


  • Parameters

None

  • Returns

String valueName - Name of the recipe value.

setRecipeValue(value)

Description

Set the recipe value. Used to override the value defined in the recipe for the recipe value being read.

Syntax

setRecipeValue(value)


  • Parameters

String recipeValue - The new recipe value.

  • Returns

Nothing

Code Example

Python
import math
try:
 value = float(event.getRecipeValue())
 event.setRecipeValue(str(math.log10(value)))
except:        
 event.setRecipeValue("0")




Sepasoft MES Module Suite