This method is used to add a recipe to the recipe management of the vision system. It concerns itself only with the metadata of the recipe, the actual content is transferred by a RecipeTransferType object.

The intended behavior of this method for different input arguments is described in the following subsections.

Signature

AddRecipe ([in]RecipeIdExternalDataTypeexternalId[in]ProductIdDataTypeproductId[out]RecipeIdInternalDataTypeinternalId[out]NodeIdrecipe[out]NodeIdproduct[out]BooleantransferRequired[out]Int32error);

Table 31 – AddRecipe Method Arguments

Argument

Description

externalId

Identification of the recipe used by the environment. This argument must not be empty.

productId

Identification of a product the recipe is to be used for.

This argument may be empty.

internalId

Internal identification of the recipe. This identification shall be system-wide unique and must be returned.

recipe

If the server chooses to represent the recipe in the Address Space, it shall return the NodeId of the newly created entry in the Recipes folder here.

If the server uses only method-based recipe management, this shall be null.

Note that, even if the server uses the Recipes folder to expose recipe data in the Address Space, this may be empty, if the newly created recipe does not fit the selection criteria of the server for the entries in this folder.

product

If the server chooses to represent product information in the Address Space, it shall return the NodeId of a newly created entry in the Products folder here.

If the server uses only method-based recipe management, this shall be null.

Note that, even if the server uses the Products folder to expose product data in the Address Space, this may be null if the newly created product does not fit the selection criteria of the server for the entries in the Products folder.

transferRequired

In this argument, the server returns whether the vision system assumes that a transfer of the file content of the recipe is required.

Note that this is only a hint for the client. If the server returns TRUE, the client will have to assume that the vision system needs the recipe content and shall transfer it. If the server returns FALSE, the client may transfer the recipe content anyway.

error

0 – OK

Values > 0 are reserved for errors defined by this and future standards.

Values < 0 shall be used for application-specific errors.

Table 32 – AddRecipe Method AddressSpace Definition

Attribute

Value

BrowseName

AddRecipe

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory