7 ObjectTypes for the Vision System in General ToC Previous Next

7.7 RecipeType ToC Previous Next

7.7.2 RecipeType Methods ToC Previous Next

7.7.2.1 Overview ToC

If recipes are exposed in the Address Space, the corresponding entries in the Recipes folder of the RecipeManagement object have to be created using the AddRecipe method of the RecipeManagement object. The recipe object cannot destroy itself as this would affect the data structures of the RecipeManagement object; therefore, removal has to take place using the Remove method of that object.

Operations other than AddRecipe can be carried out directly on the the RecipeType object as well as on he RecipeManagement object.

For data transfer, the FileType object contained in the RecipeType object can be used directly. Therefore, there is no need for a specific Get method.

7.7.2.2 LinkProduct ToC

This method is used to create a link between the recipe and a product in the vision system

Signature

LinkProduct ([in]	ProductIdDataType	productId[out]	Int32	error);

Table 55 – LinkProduct Method Arguments

Argument Description
productId Identification of a product, the recipe is to be used for.
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 56 – LinkProduct Method AddressSpace Definition

Attribute Value
BrowseName LinkProduct
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable InputArguments Argument[] PropertyType Mandatory
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

It is assumed that the given ProductId already exists in the vision system management structures, e.g. having been created with the AddProduct method of the RecipeManagementType. It is recommended that it also exists in the Products folder of the RecipeManagementType object to expose a consistent set of data in the Address Space.

In the case of a successful link, the server shall add the given ProductId to the LinkedProducts list of this RecipeType object.

The method shall fail if the product does not exist in the vision system management structures.

7.7.2.3 UnlinkProduct ToC

This method is used to remove the link between the recipe and a product in the vision system

Signature

UnlinkProduct ([in]	ProductIdDataType	productId[out]	Int32	error);

Table 57 – UnlinkProduct Method Arguments

Argument Description
productId Identification of a product, the recipe is to be used for.
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 58 – UnlinkProduct Method AddressSpace Definition

Attribute Value
BrowseName UnlinkProduct
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable InputArguments Argument[] PropertyType Mandatory
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

The server shall remove the given ProductId from the LinkedProducts list of this RecipeType object.

It is expected that the vision system removes a link between the recipe represented by this object and products with the given ProductId from its internal management structures.

Starting jobs based on this ProductId will no longer lead to this recipe being used. If there is no link left between this ProductId and any recipe, it will no longer be possible to start a job based on that ProductId.

7.7.2.4 Prepare ToC

This method is used to prepare the recipe so that it can be used for starting a job on the vision system.

Signature

Prepare ([out]	Boolean	isCompleted[out]	Int32	error);

Table 59 – Prepare Method Arguments

Argument Description
isCompleted Flag to indicate that the recipe has been completely prepared before the method returned.
If False, the client needs either to check the properties of the recipe to determine when preparation has completed or wait for the RecipePrepared event.
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 60 – Prepare Method AddressSpace Definition

Attribute Value
BrowseName Prepare
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

The effects of the Prepare method of a RecipeType object on the VisionSystem shall be identical to those of the PrepareRecipe method of the RecipeManagementType object.

7.7.2.5 Unprepare ToC

This method is used to revert the preparation of the recipe so that it can no longer be used for starting a job on the vision system.

Signature

Unprepare ([out]	Int32	error);

Table 61 – Unprepare Method Arguments

Argument Description
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 62 – Unprepare Method AddressSpace Definition

Attribute Value
BrowseName Unprepare
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable OutputArguments Argument[] PropertyType Mandatory

The effects of the Unprepare method of a RecipeType object on the VisionSystemAutomaticModeStateMachine shall be identical to those of the UnprepareRecipe method of the RecipeManagementType object.

7.7.2.6 Recipe transfer ToC

There are no dedicated transfer methods on the RecipeType because it already contains a FileType object representing the content of the actual recipe in the vision system. Thus, transfer can be carried out using the standard Open, Read, Write, Close methods of the FileType object.

Previous Next