7.7.2.2 LinkProduct

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
productIdIdentification 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
BrowseNameLinkProduct
References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasPropertyVariableInputArgumentsArgument[]PropertyTypeMandatory
HasPropertyVariableOutputArgumentsArgument[]PropertyTypeMandatory

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.