TeachRecipe

function TeachRecipe(ctx: Required<TcHmi.Context>, recipeReference: string): void

The Teach function reads the current values of the symbols of a recipe from the target and stores them in this recipe.

Parameter

Name

Type

Description

ctx

Available from version 1.10

Required<TcHmi.Context>

Context object

Does not need to be specified by the user when used in a trigger or function expression. In this case the transfer and the evaluation is done by the corresponding parser.

Is used by the caller to indicate success or failure to the framework during execution.

If the function is used directly in JavaScript/TypeScript, the context object must be passed in the call and evaluated if necessary.

recipeReference

string

The reference of the recipe (path plus name) in which the current values of the target are to be read and stored.

Return value

Type

Description

void

No return value.

NuGet package: Beckhoff.TwinCAT.HMI.Functions

TeachRecipe 1:

NuGet packages are available from version 1.12.

TeachRecipe 2:

Available from version 1.10.1171.142