Calling convention: CIP_SetUserScriptForOEEObject("ObjectName": String, "FormulaName": String, "FormulaText": String, "RefEntryName": String)
Description: Creates or updates a user-script formula on the named OEE object, enables it, and saves the object's user scripts. If the named reference entry exists, it is assigned as the formula's reference entry.
Parameters:
ObjectName: name of the target OEE object.
FormulaName: name of the user-script formula to create or update.
FormulaText: MathParser formula text.
RefEntryName: name of the reference entry; if it does not exist, the formula's existing reference entry is left unchanged.
Returns: No defined return value.
Availability: Default.
Example:
CIP_SetUserScriptForOEEObject("Machine", "CalcRate", "Result = Good / Total", "Good");