RecipeSave

This function/function block was added in KAS 5.00.

PLCopen motion icon Pipe Network motion icon

 Function Block - Save a recipe object to a file.

  • RecipeSave writes the recipe object (definition + stored instances) to the filesystem.
  • It does not read live PLC values.
  • To capture PLC values before saving, call RecipeStoreInstance beforehand.

Inputs

Input

Data Type

See Data Types.

Range

Unit

Default

Description

Execute

BOOL

FALSE, TRUE

N/A

No default

On the rising edge, save the recipe table to the file RecipeFile.

RecipeID

UDINT

No range

N/A

No default

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

RecipeFile

STRING

No range

N/A

No default

  • The location of the recipe file. (this is a snippet - does it apply here?)
  • The path of the destination recipe table file.

RecipeFormat

SINT

Enumerated

N/A

No default

  • The recipe file format.
  • Valid values include one of these enumeration values:

Value

Description

RCP_FMT_XML

XML file format.

RCP_FMT_TOML

TOML file format.

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_RecipeSave(True, recipeID, 'Parts_Recipes.xml', RCP_FMT_XML);
IF Inst_RecipeSave.Error THEN 
   errorMessage := MC_ErrorDescription(Inst_RecipeSave.ErrorID); 
END_IF;

See Also