Configuring Image Sources During Process Integration

In certain circumstances, MERLIC allows you to adjust the image source configuration while the process integration mode (MERLIC RTE) is running. However, only image sources in the Image Source Manager can be adjusted.

You can open the MERLIC RTE Setup and adjust the settings in the "Image Sources" tab as desired. For example, you can activate a different configuration if you want to acquire images from an image source of a different configuration or you can adjust the settings of an image source to fix an image acquisition error.

If an image source configuration has been set as startup configuration for MERLIC RTE, it will be validated when starting MERLIC RTE. If it is valid, MERLIC changes to the "Initialized" state. In case the configuration is not valid, an "AcquisitionDeviceLost" error is emitted and a possibly defined default recipe will not be loaded.

For more information about the configuration of image sources, see Configuring Image Sources.

Prerequisites

The configuration is only allowed when MERLIC is in one of the following states: 

  • Preoperational
  • Initialized
  • Error (only for image acquisition errors)

The configuration in the "Error" state is only allowed if an image acquisition error occurred.

If MERLIC is in one of the other states, the configuration of image sources is not allowed and the "Image Sources" tab is locked.

Error Handling of Image Acquisition Errors

If an image acquisition error occurs during the process integration, MERLIC RTE proceeds depending on the current MERLIC state and the error.

When MERLIC transitions from a state which allows the image source configuration to a state in which the configuration is locked, for example, from "Initialized" to "Ready" due to a "PrepareRecipe", the active configuration and its image sources are checked for validity. If the validity check fails, the transition is rejected and an "Error" event is emitted with the error code "RecipePreparationFailed". However, the system does not change to the "Error" state but remains in the previous state. Therefore, you can use the "Image Sources" tab to fix the problem and try again.

If an acquisition-related error occurs when MERLIC is in a state that does not allow the configuration (for example, "Ready", "SingleExecution", "ContinuousExecution"), MERLIC changes to the "Error" state. In this case, you can also open the "Image Sources" tab to fix the image source configuration. The recipe remains prepared during the image source configuration. After resolving the problem, you can close the MERLIC RTE Setup again which triggers a re-evaluation of the image source configuration. If the configuration is valid, MERLIC changes to the "Ready" state while keeping the recipe loaded. The execution of the MVApp needs to be triggered anew in this case. If the configuration is not valid, MERLIC remains in the "Error" state.

Alternatively, the user may choose to call "Reset" or "Halt" to return MERLIC to "Preoperational" or "Halted", respectively, regardless of the validity of the image source configuration. In both case, the recipe will be unprepared in the process.

If an image source configuration has been defined as startup configuration for MERLIC RTE and the validity check of the configuration during the MERLIC RTE startup failed, a "RecipePreparationFailed" error is emitted.

Error Codes for Image Acquisition Errors

Depending on the type of the image acquisition error, the following error codes might be emitted with the "Error" event.

Error

Code

Description

AcquisitionDeviceLost

0x2116

The image acquisition device, that is, the connection to the camera or image file directory, is missing or has been lost.

AcquisitionConflictingTimeout

0x2138

The image acquisition partially timed out. In a multi-camera setup, the acquisition by some hardware-triggered cameras succeeded while the acquisition by other cameras timed out and it cannot be ensured that the image buffers of all cameras are in a consistent state.

AcquisitionError

0x2139

The image acquisition failed.

AcquisitionTimeout

0x4137

The acquisition timed out. Perhaps a hardware triggered camera did not receive the trigger signal within the specified "grab_timeout" interval or the connection to a camera was lost during acquisition.

AcquisitionFrameDropped

0x4140

A "frame drop" was detected. This means, that an image was lost and has not been processed, for example, because the images were acquired faster than they could be processed and the image buffer capacity is exceeded. Depending on the used trigger mode, this type of event is handled in different ways. For more information, see Configuring Triggers for the Image Acquisition.

AcquisitionFrameTriggerMissed

0x4141

A trigger signal was missed by the camera device, for example, because the camera was still exposing the previous image when the trigger signal was sent.

"Error" events which are emitted by MERLIC RTE are logged with the log level that corresponds the severity of the error, that is, "warning", "error", or "critical". Therefore, they will show up in the MERLIC RTE command prompt by default. All other events will be logged with the log level "info".