RecipeApplyInstance

This function/function block was added in KAS 5.00.

PLCopen motion icon Pipe Network motion icon

 Function Block - Copy values to from a recipe instance to the program data.

  • Validation occurs before writing data to the program data.
    • This avoids partial writes when an error occurs.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, copies the values of the specified instance into the program data.

RecipeID

UDINT

No range

N/A

No default

  • The ID of the recipe object to use.
  • RecipeID is the handle ID returned by the RecipeOpen function block.

Name

STRING

No range

N/A

No default

  • The name of the instance to apply.
  • If an empty string is supplied, the name "Instance" is used.
  • This is the same name applied to unnamed instances when a recipe is loaded from a file.

Outputs

Output

Data Type

See Data Types.

Range

Unit

Description

Done

BOOL

FALSE, TRUE

N/A

If TRUE, the command completed successfully.

Busy

BOOL

FALSE, TRUE

N/A

If TRUE, the function block is executing.

Error

BOOL

FALSE, TRUE

N/A

If TRUE, an error has occurred.

ErrorID

DINT

Enumerated

N/A

FBD Language Example

 

 

FFLD Language Example

 

 

IL Language Example

Not available.

ST Language Example

Inst_RecipeApplyInstance(True, recipeID, 'Widgets');
IF Inst_RecipeApplyInstance.Error THEN 
   errorMessage := MC_ErrorDescription(Inst_RecipeApplyInstance.ErrorID); 
END_IF;

See Also