To change the acquisition settings at runtime,
bind input elements directly to platform configuration
settings, use a CameraSettings step, or link
a
Button element in the operator view to the Change Camera Settings
action.
Note that you cannot directly bind operator view input elements
to platform configuration settings for GenICam cameras. Instead, to
adjust a GenICam camera's settings at runtime, ensure your project
can call a subflowchart with a CameraSettings step.
The camera settings on the PhysicalCameraN page in the
Platform Configuration dialog are typically configured
during design-time, before a project is initially deployed. In most
applications, these initial camera settings are not changed while a
project is running. Examples of when to change a camera setting at
runtime include, but are not limited to:
-
When entering a diagnostic or training mode, and you need to
disable the hardware trigger.
-
When it is necessary to grab an object using different exposure
times.
-
When some acquisition settings need to be controlled by an
external device or operator input.
Some camera setting changes require the grab process to be
halted; other camera settings might be modifiable while grabbing.
Typically, the modifiable settings include the exposure and gain
settings. Other settings, like those that modify the size or data
type of the image, will typically require that grabbing is stopped.
Typically, Matrox Design Assistant determines whether the grab
should be stopped or not.
If you intend to halt the grab process, use the Camera step's ImageQueueAvailable output
to configure your flowchart so that all pending images are
processed, before executing a CameraSettings step. To
guarantee that the image queue is emptied (that is, its images are
discarded), you can manually halt the grab process using the
StopGrab input
of the CameraSettings step.
Alternatively, halt the grab process by linking a
Button element in the operator view to an action. For more
information, see the Queuing
images subsection of the Grab timing section earlier in this
chapter.
The
Configuration pane of the CameraSettings step allows
you to configure most of your physical camera's inputs. By default,
all inputs in this pane (except the Camera name input) have the
value of Unchanged. A single
CameraSettings
step can be configured to change one or more camera settings.
To change the Camera step's source while
the project is running (such as a switch between a camera and saved
images), instead of specifying an explicit source, you can specify
an expression using the
Advanced editor. The camera's source can also be set using
platform configuration
binding, a change to the Camera Name input of a
CameraSettings
step, or a link between a
Button element in the operator view and the Set Camera Source
action.
If a flowchart calls the CameraSettings step, and the
operator view contains input elements that also change the camera
settings, the order of operations cannot be guaranteed. In
time-critical flowcharts, all camera setting changes should be
performed the same way, and not through a combination of different
methods. To ensure that platform settings are not modified during
an inspection, use the CameraSettings step in the
main or a subflowchart, instead of using the platform configuration
binding feature in the operator view.