VisionBox Interface Library  1.7.10.0 (2024-04-16)
Device Factory

Detailed Description

The class VIBSystem can be used as the factory for Devices.

A VIBSystem object is associated with a specific hardware component like the mainboard or an extension card.

The factory is created by calling the static function VIBSystem::CreateInstance(). The factory method VIBSystem::OpenDevice() can then be used to create and open device objects. The method VIBSystem::CloseDevice() closes and deletes the device object.

There are overloaded functions for creating the factory. One accepts the generic system type eSystemType as argument. Alternatively, the argument eHardwareType can be used to refer to a specific hardware component.

Example:

VIB::VIBSystem *pVIBSystem = NULL;
VIB::DigitalInput *pDigitalInput = NULL;
// open the factory for the mainboard
// Open the second DigitaInput device on the mainboard
pVIBSystem->OpenDevice(&pDigitalInput, 1);
// Use the device
pDigitalInput->ConfigureDebounceTime(1000, 1000);
// Close the device
pVIBSystem->CloseDevice(pDigitalInput);
// Close the factory
pVIBSystem->DeleteInstance(pVIBSystem);

The following table lists the supported hardware components and associated hardware types and system types:

Supported hardware components
Platform Hardware component eHardwareType eSystemType
VisionBox AGE-X1 Mainboard with RTCC HWT_AGEX SYST_BASEBOARD
VisionBox AGE-X2 Mainboard with RTCC HWT_AGEX2 SYST_BASEBOARD
Smart NIC HWT_AGEX2_POETOE SYST_NETWORK
Camera Link HWT_AGEX2_CL SYST_CL
VisionBox AGE-X3 I/O board with RTCC HWT_AGEX3 SYST_BASEBOARD
VisionBox AGE-X4[1] Mainboard without RTCC HWT_AGEX4 SYST_BASEBOARD
VisionBox AGE-X5 Mainboard with RTCC HWT_AGEX5 SYST_BASEBOARD
Smart NIC HWT_AGEX5_POETOE SYST_NETWORK
Camera Link HWT_AGEX5_CL SYST_CL
VisionBox LE MANS [1] Mainboard with RTCC HWT_LEMANS SYST_BASEBOARD
VisionBox DAYTONA Mainboard with RTCC HWT_DAYTONA SYST_BASEBOARD
VisionBox AI Mainboard with RTCC HWT_AI SYST_BASEBOARD
VisionBoards (PCIe cards) Machine Vision Controller (RTCC) HWT_MVC0 SYST_INTERNAL_PCI
Smart NIC HWT_PCIE_POETOE SYST_NETWORK
Camera Link card HWT_PCIE_CL SYST_CL
VisionCam XM Camera with RTCC HWT_VCXM SYST_BASEBOARD
VisionCam XM2 Camera with RTCC HWT_VCXM2 SYST_BASEBOARD
VisionSensor PV (1/2) Camera without RTCC HWT_VSPV SYST_BASEBOARD
VisionSensor PV3 Camera without RTCC HWT_VSPV3 SYST_BASEBOARD
VisionSensor PV3 + I/O Expansion Camera with external RTCC SYST_BASEBOARD
Machine Vision Manager 1 USB device with RTCC HWT_MVM0 SYST_EXTERNAL_USB
Machine Vision Manager 2 USB device with RTCC HWT_MVM2 SYST_EXTERNAL_USB

  1. The VisionBox AGE-X4 and the VisionBox LE MANS additionally use VisionBoards.
    The VisionBox AGE-X4 normally contains a PCIe Machine Vision Controller card, because the RTCC is not present on the mainboard.
Note
  • Also take a look at Open devices using the Open() method which describes a more simple method.
  • Mixing the device's Open() / Close() API with the factory's OpenDevice() / CloseDevice() API is not allowed.
  • Unlike device objects, factory objects can be created multiple times for the same hardware component simultaneously.
  • After opening a device with the factory, the factory can be closed and the device remains available. The device can be closed by reopening the factory.
  • If a USB device is unplugged, all device indexes remain constant and unique until all processes have stopped using the library. Therefore, it is possible that a gap is created when a device with a lower number is unplugged.

The factory hides any hardware related implementation details. Therefore, the same programming interface can be used with different hardware platforms and operating systems. To enable generic applications, the available devices can be determined at runtime by calling GetDeviceInfo().

Each hardware component can provide multiple devices of the same type and each device can have multiple I/O channels.
For example, the VisionBox AGE-X1 has a single CameraTrigger device which controls two output channels.
The VisionBox AGE-X2 "Tiger" has four CameraTrigger devices, but each device has only one output channel.
The number of channels can be requested with CameraTrigger::GetNumberOfOutputs() or similar member functions for other devices.

The following image shows the internal structure of the VisionBox AGE-X2 with a Camera Link interface:

VisionBox AGEX-2

Most devices are controlled by the mainboard component (SYST_BASEBOARD) which provides the RTCC (FPGA).
The VisionBox additionally includes a Camera Link card. In order to use the CameraLinkIn device, the VIBSystem factory has to be created with the system type SYST_CL.

Also note that the Multiplexer signals are also available to the Camera Link card as signal source for CameraLinkIn::ConfigureCC().
In the opposite direction, the RS-422 input signals are sent to the main FPGA as source for the Multiplexer or other devices.

The following example shows a VisionBox AGEX-4 with three PCIe cards: one Machine Vision Controller and two PoE/ToE cards:

VisionBox AGEX-4

This hardware configuration has four hardware entities. Please note that the mainboard only has a Service device, most devices are controlled by the Machine Vision Controller (SYST_INTERNAL_PCI).

Classes

class  VIB::VIBSystem
 The factory for devices. More...
 
VIB::SYST_BASEBOARD
@ SYST_BASEBOARD
Definition: VIB_Interface.h:112
VIB::VIBSystem::CreateInstance
static bool CreateInstance(VIBSystem **ppVIBSystem)
Creates a factory instance for the mainboard.
Definition: VIBSystem.cpp:105
VIB::VIBSystem::CloseDevice
bool CloseDevice(iDevice *pDevice)
Closes a device.
Definition: VIBSystem.cpp:856
VIB::VIBSystem::DeleteInstance
static bool DeleteInstance(VIBSystem *pObj)
Releases the device object.
Definition: VIBSystem.cpp:199
VIB::DigitalInput::ConfigureDebounceTime
bool ConfigureDebounceTime(unsigned int nsLow, unsigned int nsHigh)
Sets debouncing time for the digital input signals.
Definition: DigitalInput.cpp:231
VIB::VIBSystem::OpenDevice
bool OpenDevice(eDeviceType Type, int Index, iDevice **ppNewDevice)
Opens a device and returns a new device object.
Definition: VIBSystem.cpp:455
VIB::DigitalInput
This class controls a group of digital input signals.
Definition: VIB_Interface.h:439
VIB::VIBSystem
The factory for devices.
Definition: VIB_Interface.h:219