Skip to main content

IVision

Interface for machine vision and inspection operations.

Namespace: ControlBee.Interfaces

Extends: IDeviceChannel

Methods

Trigger

Triggers an inspection.

void Trigger(int inspectionIndex, string? triggerId, Dictionary<string, object?>? options = null);
void Trigger(int inspectionIndex, Dictionary<string, object?>? options = null);

Parameters:

  • inspectionIndex — The index of the inspection to trigger.
  • triggerId — An optional identifier for tracking the trigger.
  • options — Optional parameters for the trigger.

StartContinuous

Starts continuous image acquisition mode.

void StartContinuous();

StopContinuous

Stops continuous image acquisition mode.

void StopContinuous();

IsContinuousMode

Checks whether the vision system is in continuous acquisition mode.

bool IsContinuousMode();

Returns: true if in continuous mode.

SetLightOnOff

Turns the light for a specific inspection on or off.

void SetLightOnOff(int inspectionIndex, bool on);

Parameters:

  • inspectionIndex — The inspection index.
  • ontrue to turn the light on, false to turn it off.

SetLightValue

Sets the light intensity for a specific light channel.

void SetLightValue(int inspectionIndex, int lightChannel, double value);

Parameters:

  • inspectionIndex — The inspection index.
  • lightChannel — The light channel number.
  • value — The light intensity value.

Wait

Waits for the inspection result to be ready.

void Wait(int inspectionIndex, int timeout);
void Wait(string triggerId, int timeout);

Parameters:

  • inspectionIndex — The inspection index.
  • triggerId — The trigger identifier.
  • timeout — Maximum wait time in milliseconds.

WaitGrabEnd

Waits for image acquisition to complete.

void WaitGrabEnd(int inspectionIndex, int timeout);

WaitExposureEnd

Waits for exposure to complete.

void WaitExposureEnd(int inspectionIndex, int timeout);

GetResult

Returns the inspection result as a JSON object.

JObject? GetResult(int inspectionIndex);
JObject? GetResult(string triggerId);

Returns: The inspection result as a JObject, or null.

SaveImage

Saves the captured image to disk.

void SaveImage(string savePath, string? triggerId);
void SaveImage(string savePath);

Parameters:

  • savePath — The file path to save the image.
  • triggerId — Optional trigger identifier for selecting the image.

See Also