8 ObjectTypes for Vision System State Handling ToC Previous Next

8.3 VisionAutomaticModeStateMachineType ToC Previous Next

8.3.8 VisionAutomaticModeStateMachineType Events ToC Previous Next

8.3.8.1 RecipePreparedEventType ToC

RecipePreparedEventType is an EventType subtype of BaseEventType, defined in OPC 10000-5. This event shall be triggered by the server when the preparation of a recipe is completed on the vision system. Figure 27 defines the structure. It is formally defined in Table 109.

Typically, if the RecipeManagementType object is carried out by the server in a synchronous manner, this event will be triggered before the method returns, but there is no specified temporal relationship between the call to the PrepareRecipe method and the triggering of the event (except for the obvious that the event cannot occur before the call).

The same holds for the PrepareProduct method of the RecipeManagementType object which, in effect, also prepares a recipe.

An important special case, described in Section B.1.2.3, is local editing of an already prepared recipe. Since after local editing has finished, the recipe is a different one than before, effectively a new recipe has been prepared. Therefore, local editing of a prepared recipe shall generate a RecipePrepared event.

The RecipePrepared event transports the identification of the prepared recipe. If the event was caused by a PrepareProduct method call, it also transports the ProductId, otherwise the ProductId shall be empty.

readme_files/image035.png

Figure 27 – Overview RecipePreparedEventType

Table 109 – Definition of RecipePreparedEventType

Attribute Value
BrowseName RecipePreparedEventType
IsAbstract False

Subtype of the BaseEventType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable ExternalId RecipeIdExternalDataType PropertyType Optional
HasProperty Variable InternalId RecipeIdInternalDataType PropertyType Mandatory
HasProperty Variable ProductId ProductIdDataType PropertyType Optional

8.3.8.2 JobStartedEventType ToC

JobStartedEventType is an EventType subtype of BaseEventType, defined in OPC 10000-5. This event is to be triggered by the server when the state machine transitions from the Ready state to the SingleExecution or ContinuousExecution state. Figure 28 defines the structure. It is formally defined in Table 110.

It indicates to the client that the vision system has started the execution of a job, regardless whether the transition occurred due to a call to the StartSingleJob or StartContinuous method or automatically due, e.g. for a fieldbus start signal.

The event transports the jobId created upon the transition from state Ready to state SingleExecution or ContinuousExecution. This enables clients to maintain a time-sequential log of jobs, regardless whether this particular client started the job or whether the job was started by an OPC UA method call at all.

In the case of multiple running state machines in the same server, the client can use the Source property inherited from BaseEventType to identify the state machine instance the event originated from.

readme_files/image036.png

Figure 28 – Overview JobStartedEventType

Table 110 – Definition of JobStartedEventType

Attribute Value
BrowseName JobStartedEventType
IsAbstract False

Subtype of the BaseEventType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable JobId JobIdDataType PropertyType Mandatory

8.3.8.3 ReadyEventType ToC

ReadyEventType is an EventType subtype of BaseEventType, defined in OPC 10000-5. This event is to be triggered by the server when the state machine transitions to the Ready state from one of the “Execution” states, i.e. SingleExecution or ContinuousExecution. Figure 29 defines the structure. It is formally defined in Table 111.

It indicates to the client that the vision system has the necessary resources available for executing the next job. The client still has to make sure that the state machine is actually in the Ready state before calling the StartSingleJob or StartContinuous method as the vision system may fall out of the Ready state due to internal reasons or other method calls

The event transports the jobId created upon the transition from state Ready to state SingleExecution or ContinuousExecution. Together with the JobStarted event this enables clients to maintain a time-sequential log of state changes for each job.

In the case of multiple running state machines in the same server, the client can use the Source property inherited from BaseEventType to identify the state machine instance the event originated from.

readme_files/image037.png

Figure 29 – Overview ReadyEventType

Table 111 – Definition of ReadyEventType

Attribute Value
BrowseName ReadyEventType
IsAbstract False

Subtype of the BaseEventType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable JobId JobIdDataType PropertyType Mandatory

8.3.8.4 ResultReadyEventType ToC

ResultReadyEvent is an EventType subtype of BaseEventType, defined in OPC 10000-5. This event is to be triggered by the server when the vision system has a complete or partial result available for the client. Figure 30 defines the structure. It is formally defined in Table 112.

To enable access to a result, several properties of the result, which are generated by the system, are supplied. These properties can be used to query the results in the ResultManagement object. A sufficiently small result can also be provided in the ResultContent component of the event.

The ResultReadyEvent is not shown explicitly in the state machine as it is not connected to a state transition.

readme_files/image038.png

Figure 30 – Overview ResultReadyEventType

Table 112 – Definition of ResultReadyEventType

Attribute Value
BrowseName ResultReadyEventType
IsAbstract False

Subtype of the BaseEventType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable IsPartial Boolean PropertyType Mandatory
HasProperty Variable IsSimulated Boolean PropertyType Optional
HasProperty Variable ResultState ResultStateDataType PropertyType Mandatory
HasProperty Variable MeasId MeasIdDataType PropertyType Optional
HasProperty Variable PartId PartIdDataType PropertyType Optional
HasProperty Variable ExternalRecipeId RecipeIdExternalDataType PropertyType Optional
HasProperty Variable InternalRecipeId RecipeIdInternalDataType PropertyType Mandatory
HasProperty Variable ProductId ProductIdDataType PropertyType Optional
HasProperty Variable ExternalConfigurationId ConfigurationIdDataType PropertyType Optional
HasProperty Variable InternalConfigurationId ConfigurationIdDataType PropertyType Mandatory
HasProperty Variable JobId JobIdDataType PropertyType Mandatory
HasProperty Variable ResultId ResultIdDataType PropertyType Mandatory
HasProperty Variable CreationTime UtcTime PropertyType Mandatory
HasProperty Variable ProcessingTimes ProcessingTimesDataType PropertyType Optional
HasProperty Variable ResultContent BaseDataType[] PropertyType Optional

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

Indicates at what processing state this result was generated.

MeasId, PartId, ExternalRecipeId, InternalRecipeId, ProductId, ExternalConfigurationId, InternalConfigurationId, JobId, ResultId

If the information is somehow linked to one of the (vision system) objects referenced by these Ids, these properties can transport this reference. In particular:

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 Id of the recipe in use which produced the result. The ExternalId is only managed by the environment. This will typically be derived from the arguments of the Start method call which caused the result to be created.

InternalRecipeId:

Internal Id of the recipe in use which produced the result. This Id is system-wide unique and it is assigned by the vision system. This will typically be derived from the arguments of the Start method call which caused the result to be created.

ProductId: Id of the product selected to produce the result. This will typically be derived from the arguments of the Start method call which caused the result to be created.

ExternalConfigurationId: External Id of the configuration in effect in the system when the result was produced.

InternalConfigurationId: Internal Id of the configuration in effect in the system when the result was produced.

JobId:

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

ResultId: vision-system-wide unique Id, which is assigned by the system. This Id can be used for fetching exactly this result using the methods detailed in Section 7.10.2.

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 result data created by the selected recipe.

8.3.8.5 AcquisitionDoneEventType ToC

AcquisitionDoneEventType is an EventType subtype of BaseEventType, defined in OPC 10000-5. This event is to be triggered by the server. when the vision system finishes a data acquisition process for a job. Figure 31 shows the structure of the event. It is formally defined in Table 113.

It is not shown explicitly in the state machine diagram as it is not directly connected to a transition.

It indicates to the client that data acquisition for the specified job has finished. In many machines, this will be a signal that the work piece or camera can be moved. Triggering this event during a single or continuous execution is application-specific and not mandatory.

The event provides the JobId created upon the transition from the Ready state to the SingleExecution or ContinuousExecution state. This enables the client to maintain a time-sequential log of state changes for each job and also to match the event to the corresponding start signal.

In the case of multiple running state machines in the same server, the client can use the Source property inherited from BaseEventType to identify the state machine instance the event originated from.

readme_files/image039.png

Figure 31 – Overview AcquisitionDoneEventType

Table 113 – Definition of AcquisitionDoneEventType

Attribute Value
BrowseName AcquisitionDoneEventType
IsAbstract False

Subtype of the BaseEventType defined in OPC 10000-5

References NodeClass BrowseName DataType TypeDefinition ModellingRule
HasProperty Variable JobId JobIdDataType PropertyType Mandatory

JobId

The Id of the job for which the event was triggered. The JobId is created by the transition from state Ready to state Acquiring.

Previous Next