Item Recipe Value

Sepasoft MES Module Suite

ItemRecipeValue Object

An ItemRecipeValue object is returned by many of the recipe script methods, usually as a list of ItemRecipeValue. Because a recipe value has several properties such as the name, minimum value, maximum value, units, etc., the details are returned in this ItemRecipeValue object.

Recipe values also can have varying data types and an ItemRecipeValue object supports reading the value in its true data type. For example, if a recipe value is of type Float8, then getValue(), getMinValue() and getMaxValue() all return Float8 values. This cannot be done by returning the recipe values in a Dataset where each column must be a single data type.

Properties

getAssignedBy()

Description

Returns the recipe or production item default value where the recipe value is inherited from. If the recipe value is not inherited, it will be the name of the recipe where it was overridden.

Syntax

getAssignedBy()

  • Parameters

 None

  • Returns

The default value of the item.

  • Scope

All

getCategory()

Description

Returns the MES module that created the recipe value. Where 1 is recipe value created by the recipe module, 2 is recipe value created by the OEE module and 3 is recipe value created by the SPC module. 

getCategory()

  • Parameters

 None

  • Returns

The MES module that created the recipe.

  • Scope

All

getDataType()

Description

Returns the Ignition DataType for the recipe value.

getDataType()

  • Parameters

 None

  • Returns

DataType for the specified recipe value.

  • Scope

All

getDescription()

Description

Returns the description of the recipe value. This is the description entered in the recipe value entry in the designer.

getDescription()

  • Parameters

 None

  • Returns

 The description of the recipe value.

  • Scope

All

getFormat()

Description

Returns the format as defined in the Ignition tag.

Syntax

getFormat()

  • Parameters

 None

  • Returns

The format of the recipe value.

  • Scope

All

getMinValue()

Description

Returns the minimum value that the value can be as defined in the Ignition tag. This is different from the recipe value security that depends on the authenticated user.

Syntax

getMinValue()

  • Parameters

 None

  • Returns

The minimum value of the recipe value.

  • Scope

All

getMaxValue()

Description

Returns the maximum value that the value can be as defined in the Ignition tag. This is different from the recipe value security that depends on the authenticated user.

Syntax

getMaxValue()

  • Parameters

 None

  • Returns

The maximum value of the recipe value.

  • Scope

All

getName()

Description

Returns the name of the recipe value. This is the same name entered in the recipe value entry in the designer.

Syntax

getName()

  • Parameters

 None

  • Returns

 Name of the recipe value.

  • Scope

All

getSortOrder()

Description

Gets the sort order for the item recipe value.

Syntax

getSortOrder()

  • Parameters

None

  • Returns

Integer sortOrder - The sort order for the item recipe value.

  • Scope

All

getUnits()

Description

Returns the units as defined in the Ignition tag.

Syntax

getUnits()

  • Parameters

 None

  • Returns

The units defined for the recipe value.

  • Scope

All

getValue()

Description

Returns the value of the recipe value. The data type will be one defined by the Ignition DataType. If a value has not been assigned to the recipe value, then None will be returned and isValid() will return false.

Syntax

getValue()

  • Parameters

 None

  • Returns

The value of the recipe value.

  • Scope

All

hasDataType()

Description

Returns True if the recipe value has a data type assigned. Recipe values that do not have a tag assigned to them will not have a data type. This is because the data type is obtained from the tag.

Syntax

hasDataType()

  • Parameters

 None

  • Returns

True, if datatype is assigned.

  • Scope

All

hasDescription()

Description

Returns True if a description exists for the recipe value.

Syntax

hasDescription()

  • Parameters

 None

  • Returns

True, if the description exist.

  • Scope

All

hasSortOrder()

Description

Checks whether the item recipe value has a sort order or not.

Syntax

hasSortOrder()

  • Parameters

None

  • Returns

boolean sortOrder - True, if there exist a sort order and False otherwise.

  • Scope

All

hasValue()

Description

Checks whether there exist a valid value associated with the recipe item.

Syntax

hasValue()

  • Parameters

 None

  • Returns

 boolean True, if the value is valid and False otherwise.

  • Scope

All

isValid()

Description

Returns True if the value is valid for the data type of the recipe value.

Syntax

isValid()

  • Parameters

 None

  • Returns

 True if the value is valid for the data type of the recipe value.

  • Scope

All

restorePreviousValue()

Description

This script function will reset the previous value for the item recipe value.

Syntax

restorePreviousValue()

  • Parameters

None

  • Returns

Nothing

  • Scope

All

setDataType(dataType)

Description

Convert the value to the new data type.

Syntax

setDataType(dataType)

  • Parameters

DataType dataType - The new data type to be set.

  • Returns

Nothing

  • Scope

All

setSortOrder(sortOrder)

Description

Sets the sorting order for this recipe item.

Syntax

setSortOrder(sortOrder)

  • Parameters

Integer sortOrder - The sort order to set for.

  • Returns

Nothing

  • Scope

All

setValue(value)

Description

Sets the value to this item recipe value.

Syntax

setValue(value)


  • Parameters

Object value - The value to be set for.

  • Returns

Nothing

  • Scope

All

updateValue(value, assignedBy)

Description

Update the new value and assignedBy parameters for the item recipe.

Syntax

updateValue(value, assignedBy)

  • Parameters

Object value - The value to be updated.

String assignedBy - The new assignedBy to get updated.

  • Returns

Nothing 

  • Scope

All

Code Snippets

Python
itemPath = event.source.parent.getComponent('Production Line Selector').selectedPathWithoutProject
valueList = system.recipe.getDefaultValueItems(itemPath, "")
if valueList != None:
 system.gui.messageBox("Count = %d" % valueList.size())
 for itemRecipeValue in valueList:
         system.gui.messageBox("%s = %s" % (itemRecipeValue.getName(), itemRecipeValue.getValue()))



 

Sepasoft MES Module Suite