RecipeSaveRetainVars

This function/function block was added in KAS 5.00.

PLCopen motion icon Pipe Network motion icon

 Function Block - Save all retain variables, and their values, into a new recipe file.

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 retain variables, and their values, to a new recipe file.

RecipeFile

STRING

No range

N/A

No default

  • The path of the destination recipe file.
  • If the file with the same name already exists, it is overwritten.

InstanceName

STRING

No range

N/A

No default

  • The name of the new instance.
  • If InstanceName is an empty string, the instance is assigned the name Instance.

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_RecipeSaveRetainVars(True, 'RetainVars.xml', 'Retain', RCP_FMT_XML);
IF Inst_RecipeSaveRetainVars.Error THEN 
   errorMessage := MC_ErrorDescription(Inst_RecipeSaveRetainVars.ErrorID); 
END_IF;

See Also