This ObjectType defines the representation of a machine vision system. Figure 8 shows the hierarchical structure and details of the composition. It is formally defined in Table 10.

Instances of this ObjectType provide a general communication interface for a machine vision system. This interface makes it possible to interact with this system independent of the knowledge of the internal structure and the underlying processes of the machine vision system.

System behavior is modeled with a mandatory hierarchical finite state machine.

VisionSystemType contains four optional management objects, RecipeManagement, ConfigurationManagement, ResultManagement, and SafetyStateManagement. All of these provide access to the exposed functionality of the machine vision system.

image015.png

Figure 8 – Overview VisionSystemType

Table 10 – Definition of VisionSystemType

Attribute

Value

BrowseName

VisionSystemType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasComponent

Object

ConfigurationManagement

--

ConfigurationManagementType

Optional

HasComponent

Object

RecipeManagement

--

RecipeManagementType

Optional

HasComponent

Object

ResultManagement

--

ResultManagementType

Optional

HasComponent

Object

SafetyStateManagement

--

SafetyStateManagementType

Optional

HasComponent

Object

VisionStateMachine

--

VisionStateMachineType

Mandatory

HasComponent

Variable

DiagnosticLevel

UInt16

BaseDataVariableType

Optional

HasComponent

Variable

SystemState

SystemStateDescriptionDataType

BaseDataVariableType

Optional

ConfigurationManagement providesConfigurationManagement provides methods and properties required for Section 7.2.

RecipeManagement provides functionality to add, remove, prepare, and retrieve vision system recipes. RecipeManagementType is described in Section 7.5.

ResultManagement provides methods and properties necessary for managing the results. ResultManagementType is described in Section 7.10.

SafetyStateManagement provides functionality to inform the vision system about the change of an external safety state. SafetyStateManagementType is described in Section 7.13.

StateMachine provides information about the current state of the vision system and methods for controlling it. VisionStateMachineType is defined in Section 8.2.

DiagnosticLevel specifies the threshold for the severity of diagnostic messages to be generated by the server. More information can be found in Section 11.3.

SystemState represents the system state in terms of the SEMI E10 standard. More information can be found in Section11.6.

This ObjectType defines the representation of the machine vision system configuration management. Figure 9 shows the hierarchical structure and details of the composition. It is formally defined in Table 11.

Even supposedly identical vision systems will differ in some details. In order to produce the same results the vision systems have to be adjusted individually e.g. calibrated. Within this document, the set of all parameters that are needed to get the system working is called a configuration. Configurations can be used to align different vision systems that have the same capabilities, so that these systems produce the same results for the same recipes.

Instances of this ObjectType handle all configurations that are exposed by the system. Only one configuration can be active at a time. This active configuration affects all recipes used in the machine vision system. The configurations can optionally also be exposed in a folder, in order to provide access to the client.

Configurations are handled as files, meta data of configurations can be directly viewed but not changed by the client. The interpretation of the configuration’s content is not part of this specification.

image016.png

Figure 9 – Overview ConfigurationManagementType

Table 11 – Definition of ConfigurationManagementType

Attribute

Value

BrowseName

ConfigurationManagementType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasComponent

Object

ConfigurationTransfer

--

ConfigurationTransferType

Optional

HasComponent

Object

Configurations

--

ConfigurationFolderType

Optional

HasComponent

Method

AddConfiguration

--

--

Optional

HasComponent

Method

GetConfigurationList

--

--

Mandatory

HasComponent

Method

GetConfigurationById

--

--

Mandatory

HasComponent

Method

ReleaseConfigurationHandle

--

--

Optional

HasComponent

Method

RemoveConfiguration

--

--

Optional

HasComponent

Method

ActivateConfiguration

--

--

Mandatory

HasComponent

Variable

ActiveConfiguration

ConfigurationDataType

BaseDataVariableType

Mandatory

ConfigurationTransfer is an instance of the ConfigurationTransferType defined in Section 7.4 and it is used to transfer the contents of a configuration by the temporary file transfer method defined in OPC 10000-5, Annex C.4.

Configurations is an instance of the ConfigurationFolderType and it is used to organize variables of DataType ConfigurationDataType which is defined in Section 12.9. If the server chooses to expose configuration information in the Address Space, the Object may contain the set of all configurations available on the system. This is implementation-defined. If a server does not expose configuration information in the Address Space, this Object is expected to be non-existent.

The DataTypes used in the ConfigurationManagementType are defined in OPC 10000-5 and in Section 11.6 of this specification.

This method is used to add a configuration to the configuration management of the vision system. It concerns itself only with the metadata of the configuration, the actual content is transferred by an object of ConfigurationTransferType which is defined in Section 7.4.

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

Signature

AddConfiguration ([in]ConfigurationIdDataTypeexternalId[out]ConfigurationIdDataTypeinternalId[out]NodeIdconfiguration[out]BooleantransferRequired[out]Int32error);

Table 12 – AddConfiguration Method Arguments

Argument

Description

externalId

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

internalId

System-wide unique ID for identifying a configuration. This ID is assigned by the vision system.

configuration

If the server chooses to represent the configuration in the Address Space, it shall return the NodeId of the newly created entry in the Configurations variable here.

If the server uses only method-based configuration management, this shall be a null NodeId as defined in OPC 10000-3.

transferRequired

In this argument, the server returns whether the vision system assumes that a transfer of the file content of the configuration 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 configuration content and shall transfer it. If the server returns FALSE, the client may transfer the configuration 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 13 – AddConfiguration Method AddressSpace Definition

Attribute

Value

BrowseName

AddConfiguration

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

If AddConfiguration is called with an ExternalId not yet existing in the configuration management of the vision system, it is expected that the vision system creates an appropriate management structure with an InternalId which is unique on the system. The server then returns this InternalId.

If the server chooses to represent all or selected configurations in the Address Space and if the new configuration matches the current selection criteria, the server shall create a new entry in the Configurations folder in the Address Space.

The method will return TRUE in the TransferRequired argument. Since the ExternalId does not yet exist in the configuration management of the vision system, it is expected the configuration does not yet exist either in the local configuration storage of the vision system, and therefore needs to be transferred.

If AddConfiguration is called with an ExternalId already existing in the configuration management of the vision system, it is expected that the vision system checks whether an identical version of the configuration already exists, provided that the content of the ExternalId allows for such a check. (A way to perform this comparison without having to download the binary content first is offered by the optional hash value in the ExternalId. The idea is that the client computes a hash for the contents of the recipe and passes that hash in the ExternalId. The server can then check this hash against a hash transmitted earlier, or it can compute a hash by itself over the contents of the recipe currently stored on the vision system side. For this procedure, the server needs to know the hash algorithm used by the client which can be transmitted in the hashAlgorithm member of the ExternalId).

Note that the method has no way of checking this with the actual configuration content which is not yet known to the vision system.

The method will return FALSE in the TransferRequired argument if the method comes to the conclusion that the configuration already exists with identical content on the vision system. Note that the result is not binding for the client who may decide to transfer the configuration content anyway.

If the server represents configurations in the Address Space, no new entry shall be created in the configurations folder.

If AddConfiguration comes to the conclusion that the content of the configuration to be transferred is different from the content already existing for this ExternalId, it shall return TRUE in the TransferRequired argument.

The behavior with respect to the management of the configuration metadata and configuration content is entirely application-defined. The vision system may decide to create a new management structure and add the configuration content to the local configuration store, or it may decide to re-use the existing ExternalId and overwrite the configuration content. In any case, the vision system shall create a new, system-wide unique InternalId for this configuration.

If the server chooses to represent configurations in the Address Space, the behavior with respect to these objects should mirror the behavior of the vision system in its internal configuration management.

This is not, strictly speaking, a use case of the method AddConfiguration, but results are comparable, and therefore the use case is described here.

If a configuration is created locally on the vision system or is loaded onto the vision system by a different interface than the OPC Machine Vision interface, i.e. the configuration is added without using method AddConfiguration, then this configuration shall have a system-wide unique InternalId, just like a configuration added through the method.

If an existing configuration which was uploaded to the vision system through the method AddConfiguration, is locally changed, the ExternalId shall be removed from the changed version and it shall receive a new system-wide unique InternalId so that the two configurations cannot be confused. The vision system may record the history from which configuration it was derived.

If the server exposes configurations in the Address Space and if the locally created or edited configurations match the current filter criteria, then they shall be represented as nodes in the Configurations folder, with their system-wide unique InternalIds, but without ExternalIds.

This method is used to get the metadata for one configuration from a number of configurations.

Signature

GetConfigurationById ([in]ConfigurationIdDataTypeinternalId[in]Int32timeout[out]HandleconfigurationHandle[out]ConfigurationDataTypeconfiguration[out]Int32error);

Table 14 – GetConfigurationById Method Arguments

Argument

Description

internalId

Identification of the configuration used by the vision system. This argument must not be empty.

Timeout

With this argument the client can give a hint to the server how long it will need access to the configuration data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

configurationHandle

The client can use the handle returned by the server to call the ReleaseConfigurationHandle method to indicate to the server that it has finished processing the configuration data, allowing the server to optimize its resource management.

If the server does not support the ReleaseConfigurationHandle method, this value shall be 0.

The client cannot rely on the data being available until ReleaseConfigurationHandle is called.

configuration

Requested configuration.

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 15 – GetConfigurationById Method AddressSpace Definition

Attribute

Value

BrowseName

GetConfigurationById

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to get a list of all configurations. It concerns itself only with the metadata of the configuration, the actual content is transferred by a ConfigurationTransferType object.

Signature

GetConfigurationList ([in]UInt32maxResults[in]UInt32startIndex[in]Int32timeout[out]BooleanisComplete[out]UInt32resultCount[out]HandleconfigurationHandle[out]ConfigurationDataType[]configurationList[out]Int32error);

Table 16 – GetConfigurationList Method Arguments

Argument

Description

maxResults

Maximum number of configurations to return in one call; by passing 0, the client indicates that it does not put a limit on the number of configurations.

startIndex

Shall be 0 on the first call, multiples of maxResults on subsequent calls to retrieve portions of the entire list, if necessary.

timeout

With this argument the client can give a hint to the server how long it will need access to the configuration data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

isComplete

Indicates whether there are more configurations in the entire list than retrieved according to startIndex and resultCount.

resultCount

Gives the number of valid results in configurationList.

configurationHandle

The server shall return to each client requesting configuration data a system-wide unique handle identifying the configuration set / client combination. The handle spans continuation calls, so on every call by the same client where startIndex is not 0, the same handle shall be returned.

This handle canbe used by the client in a call to the ReleaseConfigurationHandle method, thereby indicating to the server that it has finished processing the configuration set, allowing the server to optimize its resource management.

The client cannot rely on the data being available until the ReleaseConfigurationHandle method is called.

If the server does no support ReleaseConfigurationHandle, this value shall be 0.

configurationList

List of configurations.

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 17 – GetConfigurationList Method AddressSpace Definition

Attribute

Value

BrowseName

GetConfigurationList

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

The following cases must be considered with the respect to the number of available configurations:

This method is used to inform the server that the client has finished processing a given configuration set allowing the server to free resources managing this configuration set.

The server should keep the data of the configuration set available for the client until the ReleaseConfigurationHandle method is called or until a timeout given by the client has expired. However, the server is free to release the data at any time, depending on its internal resource management, so the client cannot rely on the data being available. ReleaseConfigurationHandle is merely a hint allowing the server to optimize its internal resource management. For timeout usage, see the description in Section 7.2.2.2.

Signature

ReleaseConfigurationHandle ([in]HandleconfigurationHandle[out]Int32 error);

Table 18 – ReleaseConfigurationHandle Method Arguments

Argument

Description

configurationHandle

Handle returned by GetConfigurationById or GetConfigurationList, identifying the configuration set/client combination.

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 19 – ReleaseConfigurationHandle Method AddressSpace Definition

Attribute

Value

BrowseName

ReleaseConfigurationHandle

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to remove a configuration from the configuration management of the vision system.

Application Note:

It may be required from a vision system – e.g. in pharmaceutical or other safety-critical applications – to keep a record of the prior existence of a removed configuration. This may be important in such systems for the meta information of results that were generated while the removed configuration was active. It serves to keep it comprehensible which configurations were available on the vision system

Signature

RemoveConfiguration ([in]ConfigurationIdDataTypeinternalId[out]Int32error);

Table 20 – RemoveConfiguration Method Arguments

Argument

Description

internalId

Identification of the configuration used by the vision system. This argument must not be empty.

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 21 – RemoveConfiguration Method AddressSpace Definition

Attribute

Value

BrowseName

RemoveConfiguration

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to activate a configuration from the configuration management of the vision system.

Since only a single configuration can be active at any time, this method shall deactivate any other configuration which may currently be active. From that point on until the next call to this method the vision system will conduct its operation according to the settings of the activated configuration.

Note that there is no way to deactivate a configuration except by activating another one to avoid having no active configuration on the system.

Signature

ActivateConfiguration ([in]ConfigurationIdDataTypeinternalId[out]Int32error);

Table 22 – ActivateConfiguration Method Arguments

Argument

Description

internalId

Identification of the configuration used by the vision system. This argument must not be empty.

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 23 – ActivateConfiguration Method AddressSpace Definition

Attribute

Value

BrowseName

ActivateConfiguration

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This ObjectType is a subtype of the FolderType and is used to organize the configurations of a vision system. Figure 10 shows the hierarchical structure and details of the composition. It is formally defined in Table 24.

Instances of this ObjectType organize all available configurations of the vision system, which the server decides to expose in the Address Space. It may contain no configuration if no configuration is available, if the server does not expose configurations in the Address Space at all, or if no configuration matches the criteria of the server for exposure in the Address Space.

Note that the folder contains only metadata of the configurations, not the actual configuration data of the vision system.

image017.png

Figure 10 – Overview ConfigurationFolderType

Table 24 – Definition of ConfigurationFolderType

Attribute

Value

BrowseName

ConfigurationFolderType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the FolderType defined in OPC 10000-5

HasComponent

Variable

<Configuration>

ConfigurationDataType

BaseDataVariableType

OptionalPlaceholder

The ConfigurationDataType used in the ConfigurationFolderType is defined in Section 12.12.

This ObjectType is a subtype of the TemporaryFileTransferType defined in OPC 10000-5 and is used to transfer configuration data as a file.

The ConfigurationTransferType overwrites the Methods GenerateFileForRead and GenerateFileForWrite to specify the concrete type of the generateOptions Parameter of the Methods.

Figure 11 shows the hierarchical structure and details of the composition. It is formally defined in Table 25.

image018.png

Figure 11 – Overview ConfigurationTransferType

Table 25 – Definition of ConfigurationTransferType

Attribute

Value

BrowseName

ConfigurationTransferType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the TemporaryFileTransferType defined in OPC 10000-5

HasComponent

Method

0:GenerateFileForRead

--

--

Mandatory

HasComponent

Method

0:GenerateFileForWrite

--

--

Mandatory

This method is used to start the read file transaction. A successful call of this method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForRead ([in]ConfigurationTransferOptionsgenerateOptions[out]NodeIdfileNodeId[out]UInt32fileHandle[out]NodeIdcompletionStateMachine);

Table 26 – GenerateFileForRead Method Arguments

Argument

Description

generateOptions

The structure used to define the generate options for the file.

fileNodeId

NodeId of the temporary file

fileHandle

The FileHandle of the opened TransferFile.

The FileHandle can be used to access the TransferFile methods Read and Close.

completionStateMachine

If the creation of the file is completed asynchronously, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object.

If the creation of the file is already completed, the parameter is null.

If a FileTransferStateMachineType object NodeId is returned, the Read Method of the file fails until the TransferState changed to ReadTransfer.

Table 27 – GenerateFileForRead Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForRead

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to start the write file transaction. A successful call of this method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForWrite ([in]ConfigurationTransferOptionsgenerateOptions[out]NodeIdfileNodeId[out]UInt32fileHandle);

Table 28 – GenerateFileForWrite Method Arguments

Argument

Description

generateOptions

The structure used to define the generate options for the file.

fileNodeId

NodeId of the temporary file.

fileHandle

The fileHandle of the opened TransferFile.

The fileHandle can be used to access the TransferFile methods Write and CloseAndCommit.

Table 29 – GenerateFileForWrite Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForWrite

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This ObjectType defines the representation of the machine vision system recipe management (for a conceptual overview of recipe management see Section B.1, for a definition of recipes itself, see Section B.1.2.1). Figure 12 shows the hierarchical structure and details of the composition. It is formally defined in Table 30.

For the actual data transfer, RecipeManagementType makes use of the RecipeTransferType, derived from the TemporaryFileTransferType defined in OPC 10000-5, beginning with version 1.04.

If the server chooses to expose recipe data in the Address Space (see Section B.1.3.3) using the Recipes folder of this type, the FileType object component of the RecipeType objects in this folder can also be used directly for the data transfer.

image019.png

Figure 12 – Overview RecipeManagementType

Table 30 – Definition of RecipeManagementType

Attribute

Value

BrowseName

RecipeManagementType

IsAbstract

False

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasComponent

Method

AddRecipe

--

--

Optional

HasComponent

Method

PrepareRecipe

--

--

Mandatory

HasComponent

Method

UnprepareRecipe

--

--

Mandatory

HasComponent

Method

GetRecipeListFiltered

--

--

Mandatory

HasComponent

Method

ReleaseRecipeHandle

--

--

Optional

HasComponent

Method

RemoveRecipe

--

--

Optional

HasComponent

Method

PrepareProduct

--

--

Optional

HasComponent

Method

UnprepareProduct

--

--

Optional

HasComponent

Method

UnlinkProduct

--

--

Optional

HasComponent

Object

RecipeTransfer

--

RecipeTransferType

Optional

HasComponent

Object

Recipes

--

RecipeFolderType

Optional

HasComponent

Object

Products

--

ProductFolderType

Optional

RecipeTransfer is an instance of the RecipeTransferType defined in Section 7.6 and it is used to transfer the contents of a recipe by the temporary file transfer method defined in OPC 10000-5, Annex C.4.

Recipes is an instance of the RecipeFolderType that organizes RecipeType objects, if the server chooses to expose recipe information in the Address Space. In this case, it may contain the set of all recipes available on the system or a filtered subset, e.g. the set of all currently prepared recipes. This is implementation-defined. If a server does not expose recipe information in the Address Space, this folder is expected to be non-existent.

Products is an instance of the ProductFolderType that organizes ProductDataType variables, if the server chooses to expose product information in the Address Space. In this case, it may contain the set of all products available on the system or a filtered subset, e.g. the set of all products for which recipes are currently prepared. This is implementation-defined. If a server does not expose product information in the Address Space, this folder is expected to be non-existent.

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

If AddRecipe is called with an ExternalId not yet existing in the recipe management of the vision system, it is expected that the vision system creates an appropriate management structure with an InternalId which is system-wide unique. The server may then return this InternalId, however the client cannot rely on this.

If the server chooses to represent all or selected recipes in the Address Space and if the new recipe matches the current selection critieria, the server shall create a new entry in the Recipes folder in the Address Space.

The method will return TRUE in the TransferRequired argument. Since the ExternalId does not yet exist in the recipe management of the vision system, it is expected that the recipe content does not yet exist either in the local recipe storage of the vision system, and therefore needs to be transferred.

If the ProductId argument is non-empty, it is expected that the vision system creates an appropriate management structure linking the newly created recipe for use with this ProductId. If the ProductId does not yet exist on the vision system, it is expected that it is created.

If the ProductId argument is empty, no such linking takes place. Note that it will not be possible to start a job based on a ProductId not linked to a recipe.

If the server chooses to represent all or selected products in the Address Space and if the ProductId matches the selection criteria, the server shall create a new entry in the Products folder in the Address Space.

If the server chooses to represent all or selected recipes in the Address Space and if the given recipe matches the selection criteria, the ProductId shall be added to the list of products within the appropriate Recipe node.

If AddRecipe is called with an ExternalId already existing in the recipe management of the vision system, it is expected that the vision system checks whether an identical version of the recipe already exists, provided that the content of the ExternalId allows for such a check (most likely using the hash value).

Note that the method has no way of checking this with the actual recipe content which is not yet known to the vision system.

The method will return FALSE in the TransferRequired argument if the system comes to the conclusion that the recipe already exists with identical content on the vision system. Note that the result is not binding for the client who may decide to transfer the recipe content anyway.

If the server represents recipes in the Address Space, no new entry shall be created in the recipes folder.

The behavior with regard to the ProductId argument is as described above for a new ExternalId. This way of calling AddRecipe can be used to link an existing recipe with another product.

If AddRecipe comes to the conclusion that the content of the recipe to be transferred is different from the content already existing for this ExternalId, it shall return TRUE in the TransferRequired argument.

The behavior with respect to the management of the recipe metadata and recipe content is entirely application-defined. The vision system may decide to create a new management structure with a new InternalId and add the recipe content to the local recipe store, or it may decide to re-use the existing ExternalId and overwrite the recipe content.

If the server chooses to represent recipes in the Address Space, the behavior with respect to these recipe objects should mirror the behavior of the vision system in its internal recipe management

The behavior with regard to the ProductId argument is as described above for a new ExternalId. If the vision system stores both recipe versions, it is implementation-defined whether both are linked to the ProductId or not.

Note that overwriting a recipe shall result in a change to the internalId of the recipe. The change may effect only the hash value, the identifier may remain the same. Historical storage is not required.

This is not, strictly speaking, a use-case of the method AddRecipe, but results are comparable, therefore, the use-case is described here.

If a recipe is created locally on the vision system or is loaded onto the vision system by a different interface than the OPC Machine Vision interface, i.e. the recipe is added without using the AddRecipe method, then this recipe shall have a system-wide unique InternalId, just like a recipe added through the method.

If an existing recipe which was uploaded to the vision system through AddRecipe is locally changed, the ExternalId shall be removed from the changed version and it shall receive a new system-wide unique InternalId so that the two recipes cannot be confused. Of course the vision system may record the history from which recipe it was derived.

If the server represents recipes in the Address Space and if the locally created or edited recipes match the current filter criteria, then they shall be represented as nodes in the Recipes folder, with their system-wide unique InternalIds, but without ExternalIds.

An important special case is the local editing of an already prepared recipe, described in Section B.1.2.3. Since after local editing, the already prepared recipe is different from before, effectively a new recipe has been prepared by the local editing. Therefore, a new RecipePrepared event shall be generated (see also Section 8.3.8.1).

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

Signature

PrepareRecipe ([in]RecipeIdExternalDataTypeexternalId[in]RecipeIdInternalDataTypeinternalIdIn[out]RecipeIdInternalDataTypeinternalIdOut[out]BooleanisCompleted[out]Int32error);

Table 33 – PrepareRecipe Method Arguments

Argument

Description

externalId

Identification of the recipe used by the environment which is to be prepared.

internalIdIn

Internal identification of the recipe which is to be prepared.

The client can use either the externalId or the internalIdIn, leaving the other empty. If both are given, the InternalIdIn takes precedence.

internalIdOut

Internal identification of the recipe selected based on the given externalId or internalId.

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 34 – PrepareRecipe Method AddressSpace Definition

Attribute

Value

BrowseName

PrepareRecipe

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

If the vision system is in state Initialized, it is expected to change into state Ready after successful preparation of the recipe and be able to execute jobs called by a Start method with the given ExternalId.

If the vision system is already in state Ready when PrepareRecipe is called, it is expected to be in state Ready again after successful preparation of the recipe and be able to execute jobs called by a Start method with the given ExternalId. Depending on the capabilities of the vision system, it may temporarily leave state Ready for state Initialized, then return to Ready, or, if the system is capable of preparing recipes in the background, it may stay in state Ready and react instantaneously to Start jobs for other, already prepared, recipes. Also depending on the capabilities of the vision system, preparing an additional recipe may unprepare others if the number of recipes being prepared at the same time is limited.

The preparation of a recipe may be a time-consuming operation. The client cannot necessarily assume that the recipe is completely prepared when the method returns. The client should therefore check the preparedness of the recipe after a reasonable amount of time or wait for a RecipePrepared event with the correct ExternalId to be fired. During the time required for preparing a recipe, the system may or may not be capable of reacting to a start method. However, the server is free to handle PrepareRecipe as a synchronous method, returning only after the recipe is completely prepared unless an error has occurred.

Not that the local editing of an already prepared recipe, as described in Sections 7.5.2.1.5 and B.1.2.3 is considered to be the same as the preparation of a new recipe, because after local editing, the already prepared recipe is different from before, so effectively a new recipe has been prepared by the local editing. Therefore, a new RecipePrepared event shall be generated (see also Section 8.3.8.1).

Some recipes may exclude each other from being in prepared state at the same time, for example, when there are mechanical movements involved. Having two such recipes prepared at the same time would mean that an instantaneous reaction to calling the Start method for a prepared recipe would not be possible. However, this is at the discretion of the vision system. The client may merely notice an unusually long reaction time between calling the Start method and the actual state change, or the vision system may prevent the simultaneous preparation by returning an error.

If there is more than one recipe with the identical ExternalId – e.g. due to local copying and modifying of recipes on the vision system – it is implementation-defined how this ambiguity will be handled. The vision system will prepare only a single one of these recipes, which may be the latest one or the latest externally defined one.

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

Signature

UnprepareRecipe ([in]RecipeIdExternalDataTypeexternalId[in]RecipeIdInternalDataTypeinternalIdIn[out]RecipeIdInternalDataTypeinternalIdOut[out]Int32error);

Table 35 – UnprepareRecipe Method Arguments

Argument

Description

externalId

Identification of the recipe used by the environment which is to be un-prepared.

internalIdIn

Internal identification of the recipe which is to be un-prepared.

The client can use either the externalId or the internalIdIn, leaving the other empty. If both are given, the InternalIdIn takes precedence.

internalIdOut

Internal identification of the recipe selected based on a given externalId or internalId. This is for verification by the client.

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 36 – UnprepareRecipe Method AddressSpace Definition

Attribute

Value

BrowseName

UnprepareRecipe

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

If the vision system is in Ready state when UnprepareRecipe is called, and the recipe to be unprepared is the only recipe currently prepared, the vision system is expected to change into state Initialized after successful reversion of the preparation of the recipe.

If there are additional recipes in prepared state, the vision system is expected to remain in state Ready and be able to be called by a Start method with one of the remaining prepared recipes. Depending on the capabilities of the vision system, it may temporarily leave state Ready for state Initialized, then return to Ready.

If there is more than one recipe with the identical ExternalId – e.g. due to local copying and modifying of recipes on the vision system – it is implementation-defined how this ambiguity will be handled. However, it is expected that the vision system will handle the ambiguity in the same way as for method PrepareRecipe so that UnprepareRecipe is exactly reciprocal to PrepareRecipe.

This method is used to get a list of recipes matching certain filter criteria. It concerns itself only with the metadata of the recipe, the actual content is transferred by a RecipeTransferType object.

Signature

GetRecipeListFiltered ([in]RecipeIdExternalDataTypeexternalId[in]ProductIdDataTypeproductId[in]TriStateBooleanDataTypeisPrepared[in]UInt32maxResults[in]UInt32startIndex[in]Int32timeout[out]BooleanisComplete[out]UInt32resultCount[out]HandlerecipeHandle[out]RecipeIdInternalDataType[]recipeList[out]Int32error);

Table 37 – GetRecipeListFiltered Method Arguments

Argument

Description

externalId

Identification of the recipe used by the environment used as a filter.

productId

Identification of a product, used as a filter.

isPrepared

This argument is used to filter for prepared recipes (for value TRUE_1), non-prepared recipes (for value FALSE_0) or without regard for the preparedness of recipes (for value DONTCARE_2).

maxResults

Maximum number of recipes to return in one call; by passing 0, the client indicates that it does not put a limit on the number of recipes.

startIndex

Shall be 0 on the first call, multiples of maxResults on subsequent calls to retrieve portions of the entire list, if necessary.

Timeout

With this argument the client can give a hint to the server how long it will need access to the configuration data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

isComplete

Indicates whether there are more results in the entire list than retrieved according to startIndex and resultCount.

resultCount

Gives the number of valid results in recipeList.

recipeHandle

The server shall return to each client requesting recipe data a system-wide unique handle identifying the recipe set / client combination. This handle has to be used by the client to release the recipe set.

recipeList

List of InternalIDs matching the filters.

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 38 – GetRecipeListFiltered Method AddressSpace Definition

Attribute

Value

BrowseName

GetRecipeListFiltered

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

The input arguments are used as filters. Strings or TrimmedStrings as arguments or structure components of arguments can contain * and ? to be used as wildcards. Empty elements are considered to match everything, or in other words are not taken into account for filtering at all. The notion of emptiness is defined together with the respective DataTypes.

In RecipeList, the method returns a list of all recipes whose ExternalIds or ProductIds match the filters.

For RecipleList method there are the following cases with the respect to the number of results:

  • The number of recipes to be returned according to the filter is less or equal to maxResults; the first call, with nstartIndex =0, returns isComplete =TRUE, so the client knows that no further calls are necessary. resultCount gives the number of valid elements in the recipeList array.
  • The number of recipes to be returned is larger than maxResults; the first N calls (N > 0 with N ≤ (number of recipes) divisor MaxResults), with startIndex =(N-1)*maxResults, return isComplete =FALSE, so the client knows that further calls are necessary. The following call returns isComplete =TRUE, so the client knows, no further calls are necessary. resultCount gives the number of valid elements in the recipeList array (on each call, so on the first N calls, this should be maxResults).

This method is used to inform the server that the client has finished processing a given recipe set allowing the server to free resources managing this recipe set.

The server should keep the data of the recipe set available for the client until the ReleaseRecipeHandle method is called or until a timeout given by the client has expired. However, the server is free to release the data at any time, depending on its internal resource management, so the client cannot rely on the data being available. ReleaseRecipeHandle is merely a hint allowing the server to optimize its internal resource management. For timeout usage see the description in Section 7.5.2.4.

Signature

ReleaseRecipeHandle ([in]HandlerecipeHandle[out]Int32error);

Table 39 – ReleaseRecipeHandle Method Arguments

Argument

Description

recipeHandle

Handle returned by GetRecipeById or GetRecipeListFiltered methods, identifying the recipe set/client combination.

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 40 – ReleaseRecipeHandle Method AddressSpace Definition

Attribute

Value

BrowseName

ReleaseRecipeHandle

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to remove a recipe from the recipe management of the vision system.

Signature

RemoveRecipe [([in]RecipeIdExternalDataTypeexternalId[out]Int32error);

Table 41 – RemoveRecipe Method Arguments

Argument

Description

externalId

Identification of the recipe used by the environment.

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 42 – RemoveRecipe Method AddressSpace Definition

Attribute

Value

BrowseName

RemoveRecipe

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

It is expected that the vision system removes the recipe matching the given ExternalId from its management structures. Whether the vision system also removes the actual recipe content is implementation-defined.

Application Note:

The removed recipe may still be referenced by stored results from the vision system. Therefore, it is strongly recommended that the InternalId of a removed recipe is not re-used by the vision system. Otherwise, traceability of results to recipes will be impaired and the vision system may no be able to fulfil certain external requirements, e.g.the FDA Part 11 requirements for pharmaceutical equipment.

However, this standard makes no requirements on the way the vision system creates and maintains its internal management data.

If there is more than one recipe with the identical ExternalId – e.g. due to local copying and modifying of recipes on the vision system – it is implementation-defined how this ambiguity will be handled. For example, the vision system may remove all these recipes or only the externally defined ones or any number of other possibilities.

If the server chooses to represent recipes in the Address Space, the server shall remove the recipe node in the same way as the vision system cleans up its management structures.

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

Signature

PrepareProduct ([in]ProductIdDataTypeproductId[out]RecipeIdInternalDataTypeinternalId[out]Int32error);

Table 43 – PrepareProduct Method Arguments

Argument

Description

productId

Identification of a product, which can be used in a Start method.

internalId

Internal identification of the recipe which is actually being used to work on the product.

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 44 – PrepareProduct Method AddressSpace Definition

Attribute

Value

BrowseName

PrepareProduct

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

In effect, the vision system will use a recipe to work on the product. Therefore, the vision system is expected to select a recipe linked to the given ProductId. If more than one recipe is linked to the product, the resolution of this ambiguity is implementation defined.

The vision system shall return the internal identification of the recipe selected. If there is more than one recipe linked to the given ProductId, it is implementation-defined how this ambiguity will be handled. It is expected that the resolution of the ambiguity will be implemented in a systematic manner throughout the vision system.

Since preparing a product is in effect the same as preparing a recipe which has been selected by the vision system on the basis of the ProductId, state handling is identical to the PrepareRecipe method.

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

Signature

UnprepareProduct ([in]ProductIdDataTypeproductId[out]RecipeIdInternalDataTypeinternalId[out]Int32error);

Table 45 – UnprepareProduct Method Arguments

Argument

Description

productId

Identification of a product, which is to be unprepared.

internalId

Internal identification of the recipe which is actually unprepared.

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 46 – UnprepareProduct Method AddressSpace Definition

Attribute

Value

BrowseName

UnprepareProduct

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

It is expected that the vision system will select a recipe based on the ProductId in the same way as in method PrepareProduct and then unprepare that recipe so that UnprepareProduct is exactly reciprocal to PrepareProduct.

Therefore, state handling is identical to UnprepareRecipe method.

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

Signature

UnlinkProduct ([in]RecipeIdInternalDataTypeinternalId[in]ProductIdDataTypeproductId[out]Int32error);

Table 47 – UnlinkProduct Method Arguments

Argument

Description

internalId

Identification of the recipe used by the system.

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 48 – 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

It is expected that the vision system removes a link between recipes with the given InternalId and products with the given ProductId from its internal management structures.

UnlinkProduct uses the InternalId to ensure that it is unambiguous which recipe the link is removed from. If need be, the client can get the InternalIds for given ExternalIds using the GetRecipeListFiltered method (7.5.2.4).

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.

If the server chooses to represent recipes in the Address Space, the server shall remove the given ProductId from the appropriate recipe node.

If the server chooses to represent products in the Address Space, and there are no recipes linked to a product anymore, it is expected that the server removes the corresponding product node.

This ObjectType is a subtype of TemporaryFileTransferType defined in OPC 10000-5 and is used for transferring a recipe.

The RecipeTransferType overwrites the Methods GenerateFileForRead and GenerateFileForWrite to specify the concrete type of the generateOptions Parameter of the Methods.

Figure 13 shows the hierarchical structure and details of the composition. It is formally defined in Table 49.

image020.png

Figure 13 – RecipeTransferType

Table 49 – Definition of RecipeTransferType

Attribute

Value

BrowseName

RecipeTransferType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the TemporaryFileTransferType defined in OPC 10000-5

HasComponent

Method

0:GenerateFileForRead

--

--

Mandatory

HasComponent

Method

0:GenerateFileForWrite

--

--

Mandatory

This method is used to start the read file transaction. A successful call of this method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForRead ([in]RecipeTransferOptionsgenerateOptions[out]NodeIdfileNodeId[out]UInt32fileHandle[out]NodeIdcompletionStateMachine);

Table 50 – GenerateFileForRead Method Arguments

Argument

Description

generateOptions

The structure used to define the generate options for the file, described in Section 12.11.

fileNodeId

NodeId of the temporary file

fileHandle

The fleHandle of the opened TransferFile.

The fileHandle can be used to access the TransferFile methods Read and Close.

completionStateMachine

If the creation of the file is completed asynchronously, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object.

If the creation of the file is already completed, the parameter is null.

If a FileTransferStateMachineType object NodeId is returned, the Read Method of the file fails until the TransferState changed to ReadTransfer.

Table 51 – GenerateFileForRead Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForRead

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to start the write file transaction. A successful call of this method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForWrite ([in]RecipeTransferOptionsgenerateOptions[out]NodeIdfileNodeId[out]UInt32fileHandle);

Table 52 – GenerateFileForWrite Method Arguments

Argument

Description

generateOptions

The structure used to define the generate options for the file, described in Section 12.11.

fileNodeId

NodeId of the temporary file

fileHandle

The fleHandle of the opened TransferFile.

The fileHandle can be used to access the TransferFile methods Write and CloseAndCommit.

Table 53 – GenerateFileForWrite Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForWrite

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This ObjectType defines the metadata for a recipe and methods for handling individual recipes.

image021.png

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.

This ObjectType is a subtype of the FolderType and is used to organize the recipes of a vision system. Figure 15 shows the hierarchical structure and details of the composition. It is formally defined in Table 63.

Instances of this ObjectType organize all available recipes of the vision system, which the server decides to expose in the Address Space. It may contain no recipe if no recipe is available, if the server does not expose recipes in the Address Space at all, or if no recipe matches the criteria of the server for exposure in the Address Space.

Note that the folder contains only metadata of the recipes, not the actual configuration data of the vision system.

image022.png

Figure 15 – Overview RecipeFolderType

Table 63 – Definition of RecipeFolderType

Attribute

Value

BrowseName

RecipeFolderType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the FolderType defined in OPC 10000-5

HasComponent

Object

<Recipe>

--

RecipeType

OptionalPlaceholder

The RecipeType used in the RecipeFolderType is defined in Section 7.7.

This ObjectType is a subtype of the FolderType and is used to organize the products of a vision system. Figure 16 shows the hierarchical structure and details of the composition. It is formally defined in Table 64.

Instances of this ObjectType organize all available products of the vision system, which the server decides to expose in the Address Space. It may contain no product if no product is available, if the server does not expose products in the Address Space at all, or if no product matches the criteria of the server for exposure in the Address Space.

Note that the folder contains only metadata of the products, not the actual product data of the vision system.

image023.png

Figure 16 – Overview ProductFolderType

Table 64 – Definition of ProductFolderType

Attribute

Value

BrowseName

ProductFolderType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the FolderType defined in OPC 10000-5

HasComponent

Variable

<Product>

ProductDataType

BaseDataVariableType

OptionalPlaceholder

The ProductDataType used in the ProductFolderType is defined in Section 12.15.

This ObjectType defines the representation of the machine vision system result management. Figure 17 shows the hierarchical structure and details of the composition. It is formally defined in Table 65.

ResultManagementType provides methods to query the results generated by the underlying vision system. Results can be stored in a local result store. An event of ResultReadyEventType, which is defined in Section 8.3.8.4, shall be triggered when the system generates a new result.

image024.png

Figure 17 – Overview ResultManagementType

Table 65 – Definition of ResultManagementType

Attribute

Value

BrowseName

ResultManagementType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasComponent

Method

GetResultById

--

--

Mandatory

HasComponent

Method

GetResultComponentsById

--

--

Mandatory

HasComponent

Method

GetResultListFiltered

--

--

Mandatory

HasComponent

Method

ReleaseResultHandle

--

--

Optional

HasComponent

Object

ResultTransfer

--

ResultTransferType

Optional

HasComponent

Object

Results

--

ResultFolderType

Optional

ResultTransfer is an instance of the ResultTransferType defined in Section 7.12 and it is used to transfer the contents of a result by the temporary file transfer method defined in OPC 10000-5, Annex C.4.

Results is an Object of the ResultFolderType that organizes variables of the DataType ResultDataType which is defined in Section 12.17. If the server chooses to expose result information in the Address Space, it may contain the set of all results available on the system or a filtered subset, e.g. the set of all currently finished results. This is implementation-defined. If a server does not expose result information in the Address Space, this variable is expected to be non-existent.

This method is used to retrieve a result from the vision system. Depending on the design of the vision system, the client may be informed by events of ResultReadyEventType that a new result is available. Then, the client might fetch this result using the information provided by events of ResultReadyEventType which is defined in Section 8.3.8.4.

Since the resultId is supposed to be system-wide unique, this method shall return only a single result. Since there may be additional result content to be retrieved by temporary file transfer, the server should keep result data available, resources permitting, until the client releases the handle ReleaseResult. However, the client cannot rely on the data to remain available until then.

Signature

GetResultById ([in]ResultIdDataTyperesultId[in]Int32timeout[out]HandleresultHandle[out]ResultDataTyperesult[out]Int32error);

Table 66 – GetResultById Method Arguments

Argument

Description

resultId

System-wide unique identifier for the result.

timeout

With this argument the client can give a hint to the server how long it will need access to the result data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

resultHandle

The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle should be used by the client to indicate to the server that the result data is no longer needed, allowing the server to optimize its resource handling .

result

The result including metadata.

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 67 – GetResultById Method AddressSpace Definition

Attribute

Value

BrowseName

GetResultById

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to retrieve a result from the vision system. It is basically identical to the GetResultById method described in Section 7.10.2.1, but it returns the result not in a single output argument of ResultDataType but in individual output arguments corresponding to the elements of the ResultDataType structure.

The reason for providing this method is to facilitate the use of subtypes to the structures nested inside of ResultDataType. Since the NodeIds of structured DataTypes nested within a structured DataType are not transferred together with the DataType, subtyping these nested structures would then also necessitate subtyping ResultDataType. This is of course possible, but in the absence of such a subtype, the individual components can still be requested by this method.

Signature

GetResultComponentsById ([in]ResultIdDataTyperesultId[in]Int32timeout[out]BooleanhasTransferableDataOnFile[out]HandleresultHandle[out]BooleanisPartial[out]BooleanisSimulated[out]ResultStateDataTyperesultState[out]MeasIdDataTypemeasId[out]PartIdDataTypepartId[out]RecipeIdExternalDataTypeexternalRecipeId[out]RecipeIdInternalDataTypeinternalRecipeId[out]ProductIdDataTypeproductId[out]ConfigurationIdDataTypeexternalConfigurationId[out]ConfigurationIdDataTypeinternalConfigurationId[out]JobIdDataTypejobId[out]UtcTimecreationTime[out]ProcessingTimesDataTypeprocessingTimes[out]BaseDataType[]resultContent[out]Int32error);

Table 68 – GetResultComponentsById Method Arguments

Argument

Description

resultId

System-wide unique identifier for the result

timeout

With this argument the client can give a hint to the server how long it will need access to the result data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

hasTransferableDataOnFile

Indicates that TemporaryFileTransfer needs to be used to retrieve all data of the result content.

resultHandle

The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle should be used by the client to indicate to the server that the result data is no longer needed, allowing the server to optimize its resource handling.

isPartial

Indicates whether the result is the partial result of a total result.

isSimulated

Indicates whether the system was in simulation mode when the job generating this result was created.

resultState

ResultState provides information about the current state of a result and the ResultStateDataType is defined in Section 12.19.

measId

This identifier is given by the client when starting a single or continuous execution and transmitted to the vision system. It is used to identify the respective result data generated for this job. Although the system-wide unique JobId would be sufficient to identify the job which the result belongs to, this makes for easier filtering on the part of the client without keeping track of JobIds.

partId

A PartId is given by the client when starting the job; although the system-wide unique JobId would be sufficient to identify the job which the result belongs to, this makes for easier filtering on the part of the client without keeping track of JobIds.

externalRecipeId

External identifier of the recipe in use which produced the result. This is only managed by the environment.

internalRecipeId

Internal identifier of the recipe in use which produced the result. This identifier is system-wide unique and it is assigned by the vision system.

productId

Identifier of the product in use which produced the result. This is only managed by the environment.

externalConfigurationId

External identifier of the configuration in use while the result was produced.

InternalConfigurationId

Internal identifier of the configuration in use while the result was produced. This identifier is system-wide unique and it is assigned by the vision system.

jobId

The identifier of the job, created by the transition from state Ready to state SingleExecution or to state ContinuousExecution which produced the result.

creationTime

CreationTime indicates the time when the result was created.

processingTimes

Collection of different processing times that were needed to create the result.

resultContent

Abstract data type to be subtyped from to hold the actual result content created by the job.

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 69 – GetResultComponentsById Method AddressSpace Definition

Attribute

Value

BrowseName

GetResultById

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This method is used to get a list of results matching certain filter criteria.

Signature

GetResultListFiltered ([in]ResultStateDataTyperesultState[in]MeasIdDataTypemeasId[in]PartIdDataTypepartId[in]RecipeIdExternalDataTypeexternalRecipeId[in]RecipeIdInternalDataTypeinternalRecipeId[in]ConfigurationIdDataTypeexternalConfigurationId[in]ConfigurationIdDataTypeinternalConfigurationId[in]ProductIdDataTypeproductId[in]JobIdDataTypejobId[in]UInt32maxResults[in]UInt32startIndex[in]Int32timeout[out]BooleanisComplete[out]UInt32resultCount[out]HandleresultHandle[out]ResultDataType[]resultList[out]Int32error);

Table 70 – GetResultListFiltered Method Arguments

Argument

Description

resultState

If not 0, only results having the specified state are returned.

measId

If not empty, only results corresponding to the given measId are returned

partId

If not empty, only results corresponding to the given partId are returned.

externalRecipeId

If not empty, only results corresponding to the given externalRecipeId are returned.

internalRecipeId

If not empty, only results corresponding to the given internalRecipeId are returned.

externalConfigurationId

If not empty, only results corresponding to the given externalConfigurationId are returned.

internalConfigurationId

If not empty, only results corresponding to the given internalConfigurationId are returned.

productId

If not empty, only results corresponding to the given productId are returned.

jobId

If not empty, only results corresponding to the given jobId are returned.

maxResults

Maximum number of results to return in one call; by passing 0, the client indicates that it does not put a limit on the number of results.

startIndex

Shall be 0 on the first call, multiples of maxResults on subsequent calls to retrieve portions of the entire list, if necessary.

timeout

With this argument the client can give a hint to the server how long it will need access to the result data.

A value > 0 indicates an estimated maximum time for processing the data in milliseconds.

A value = 0 indicates that the client will not need anything besides the data returned by the method call.

A value < 0 indicates that the client cannot give an estimate.

The client cannot rely on the data being available during the indicated time period. The argument is merely a hint allowing the server to optimize its resource management.

isComplete

Indicates whether there are more results in the entire list than retrieved according to startIndex and resultCount.

resultCount

Gives the number of valid results in ResultList.

resultHandle

The server shall return to each client requesting result data a system-wide unique handle identifying the result set / client combination. This handle has to be used by the client to release the result set.

resultList

List of results matching the Filter.

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 71 – GetResultListFiltered Method AddressSpace Definition

Attribute

Value

BrowseName

GetResultListFiltered

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

There are the following cases with the respect to the number of results:

This method is used to inform the server that the client has finished processing a given result set allowing the server to free resources managing this result set.

The server should keep the data of the result set available for the client until the ReleaseResultHandle method is called or until a timeout given by the client has expired. However, the server is free to release the data at any time, depending on its internal resource management, so the client cannot rely on the data being available. ReleaseResultHandle is merely a hint allowing the server to optimize its internal resource management. For timeout usage see the description in Section 7.10.2.1.

Signature

ReleaseResultHandle ([in]HandleresultHandle[out]Int32error);

Table 72 – ReleaseResultHandle Method Arguments

Argument

Description

resultHandle

Handle returned by GetResultById or GetResultList, identifying the result set/client combination.

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 73 – ReleaseResultHandle Method AddressSpace Definition

Attribute

Value

BrowseName

ReleaseResultHandle

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This ObjectType is a subtype of FolderType and is used to organize available results of the vision system which the server decides to expose in the Address Space. It may contain no result if no result is available, if the server does not expose results in the Address Space at all or if no available result matches the criteria of the server for exposure in the Address Space. Figure 18 shows the hierarchical structure and details of the composition. It is formally defined in Table Table 74.

The ResultFolderType contains all results of the vision system, which are available and should be exposed in the Address Space. It may contain no result if no result is available or multiple if multiple results are available.

image025.png

Figure 18 – Overview ResultFolderType

Table 74 – Definition of ResultFolderType

Attribute

Value

BrowseName

ResultFolderType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the FolderType defined in OPC 10000-5

HasComponent

Variable

<ResultVariable>

ResultDataType

ResultType

OptionalPlaceholder

The ResultType used in the ResultFolderType is defined in Section 9.1.

This ObjectType is a subtype of the TemporaryFileTransferType defined in OPC 10000-5 and is used to transfer result data as a file.

The ResultTransferType overwrites the Method GenerateFileForRead to specify the concrete type of the generateOptions Parameter of the Methods. It does not specialize the GenerateFileForWrite method of the base type as results are supposed to be only generated by the vision system, not received.

Figure 19 shows the hierarchical structure and details of the composition. It is formally defined in Table 75.

image026.png

Figure 19 – Overview ResultTransferType

Table 75 – Definition of ResultTransferType

Attribute

Value

BrowseName

ResultTransferType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the TemporaryFileTransferType defined in OPC 10000-5

HasComponent

Method

0:GenerateFileForRead

--

--

Mandatory

This method is used to start the read file transaction. A successful call of this method creates a temporary FileType Object with the file content and returns the NodeId of this Object and the file handle to access the Object.

Signature

GenerateFileForRead ([in]ResultTransferOptionsgenerateOptions[out]NodeIdfileNodeId[out]UInt32fileHandle[out]NodeIdcompletionStateMachine);

Table 76 – GenerateFileForRead Method Arguments

Argument

Description

generateOptions

The structure used to define the generate options for the file.

fileNodeId

NodeId of the temporary file

fileHandle

The FileHandle of the opened TransferFile.

The FileHandle can be used to access the TransferFile methods Read and Close.

completionStateMachine

If the creation of the file is completed asynchronously, the parameter returns the NodeId of the corresponding FileTransferStateMachineType Object.

If the creation of the file is already completed, the parameter is null.

If a FileTransferStateMachineType object NodeId is returned, the Read Method of the file fails until the TransferState changed to ReadTransfer.

Table 77 – GenerateFileForRead Method AddressSpace Definition

Attribute

Value

BrowseName

GenerateFileForRead

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

This ObjectType provides a method to inform the vision system about the changes of an external safety state. The vision system itself gives feedback about the action which is taken to react on this state change. Figure 20 shows the hierarchical structure and details of the composition. It is formally defined in Table 78.

image027.png

Figure 20 – Overview SafetyStateManagementType

Table 78 – Definition of SafetyStateManagementType

Attribute

Value

BrowseName

SafetyStateManagementType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasComponent

Method

ReportSafetyState

--

--

Mandatory

HasComponent

Variable 

VisionSafetyTriggered

Boolean

BaseDataVariableType

Mandatory

HasComponent

Variable 

VisionSafetyInformation

String

BaseDataVariableType

Mandatory

VisionSafetyTriggered

Information about the current internal safety state.

VisionSafetyInformation

Textual information that can be provided by the vision system – e.g. “open safety door”.

This method is used to provide information about the change of an external safety state. For example, safety doors which are not under supervision of a vision system are open and as a consequence it is not possible to switch on a laser source inside a vision system.

Important note: This is not to be used as a safety feature. It is only for information purposes.

Signature

ReportSafetyState ([in]BooleansafetyTriggered [in]StringsafetyInformation[out]Int32error);

Table 79 – ReportSafetyState Method Arguments

Argument

Description

safetyTriggered

Information about the current external safety state.

safetyInformation

Information that can be provided to the vision system – e.g. opening safety door.

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 80 – ReportSafetyState Method AddressSpace Definition

Attribute

Value

BrowseName

ReportSafetyState

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory