This ObjectType defines the metadata for a recipe and methods for handling individual recipes.
Figure 14 – Overview RecipeType
Table 54 – Definition of RecipeType
Attribute |
Value |
||||
BrowseName |
RecipeType |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the BaseObjectType defined in OPC 10000-5 |
|||||
HasProperty |
Variable |
ExternalId |
RecipeIdExternalDataType |
PropertyType |
Optional |
HasProperty |
Variable |
InternalId |
RecipeIdInternalDataType |
PropertyType |
Mandatory |
HasProperty |
Variable |
IsPrepared |
Boolean |
PropertyType |
Mandatory |
HasProperty |
Variable |
LastModified |
UtcTime |
PropertyType |
Mandatory |
HasProperty |
Variable |
LinkedProducts |
ProductIdDataType[] |
PropertyType |
Optional |
HasComponent |
Object |
Handle |
-- |
FileType |
Optional |
HasComponent |
Method |
LinkProduct |
-- |
-- |
Optional |
HasComponent |
Method |
UnlinkProduct |
-- |
-- |
Optional |
HasComponent |
Method |
Prepare |
-- |
-- |
Mandatory |
HasComponent |
Method |
Unprepare |
-- |
-- |
Mandatory |
ExternalId
RecipeId for identifying the recipe outside the vision system. The ExternalId is only managed by the environment.
InternalId
System-wide unique ID for identifying a recipe. This ID is assigned by the vision system.
LastModified
The time, when this recipe was last modified in the recipe store of the vision system. It is assumed that this value is consistent between recipes on the system so that it can be used to order recipes on the system by modification time. As it is possible that the vision system may not be synchronized with a time server, this value may not be valid for comparisons between systems.
LinkedProducts
Array of ProductIds which this recipe is linked to. May be empty.
Handle
FileType object for handling transfer of recipe data between client and server. The data is treated as a binary blob by the server. This method is optional for clients not supporting transfer of the actual recipe contents.
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.
This method is used to create a link between the recipe and a product in the vision system
Signature
LinkProduct ([in]ProductIdDataTypeproductId[out]Int32error);
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.
This method is used to remove the link between the recipe and a product in the vision system
Signature
UnlinkProduct ([in]ProductIdDataTypeproductId[out]Int32error);
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.
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]BooleanisCompleted[out]Int32error);
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.
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]Int32error);
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.
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.