VisionBox Interface Library (2021-12-10)

Detailed Description

Device classes are used to provide acess to the actual components of a system.

All device classes inherit the interface iDevice. Each device class has its own set of methods for accessing the device specific functions. See Classes section below for all supported device classes.

Each device instance is associated with a physical component or functional unit. These devices are provided by different hardware entities like the mainboard or extension cards. See Hardware support for an overview of the supported devices for the different hardware platforms.

Each hardware entity can provide multiple devices of the same type and each device can have multiple channels. For example:
A VisionBox mainboard with two digital I/O modules provides two DigitalInput and two DigitalOutput devices. Each device may provide eight input and output signals.

  • After a device is closed, the RTCC / FPGA logic remains operating in the last state for most devices. For example, the existing Multiplexer connections stay active until reboot, or until the Multiplexer gets reconfigured. Exception: the Strobe and IOScheduler devices will be deactivated after the device is closed.
  • Many devices can be reset explicitly by calling the Reset() method.
  • If a USB device is unplugged, all device indexes remain constant and unique, until all programs have stopped using the library. Therefore, it is possible that a gap is created when a device with a lower number is unplugged.

Opening and closing devices

Device objects for a specific hardware component can be opened only once at a time, except for the Service device. This is guaranteed across all processes on the system.

There are two ways to open and close device objects:

Mixing the device's Open() / Close() API with the factory's VIBSystem API is not allowed for the same device object.

Open devices using the Open() method

After a device object is created with the default constructor, the member function Open() has to be called before the device can be used. The Index parameter specifies the component for the given device type across all hardware entities.

The device can be closed manually with the function Close(), or automatically by the object destructor.


// Create the device object (not opened yet)
VIB::DigitalInput digitalInput;
// Open the second DigitaInput device on the system
// Use the device specific methods
digitalInput.ConfigureDebounceTime(1000, 1000);
} // The device automatically gets closed when the object is destructed

The hardware entities are enumerated in the following order for determining the Index parameter with Open():

For example, consider a VisionBox with one digital I/O module provided by the mainboard and two digital I/O modules provided by the Machine Vision Controller. The Index parameter for DigitalInput::Open() corresponds to the following components:

Open devices using the VIBSystem factory

See page Device Factory for a detailed description.


class  VIB::CameraLinkIn
 This class represents the Camera Link grabber module. More...
class  VIB::CameraTrigger
 This class controls the digital camera trigger output. More...
class  VIB::DigitalInput
 This class controls a group of digital input signals. More...
class  VIB::DigitalOutput
 This class controls a group of digital output signals. More...
class  VIB::IOScheduler
 This class controls the I/O Scheduler which allows to store and emit output signals in hard real-time. More...
class  VIB::LCD
 This class controls the status display of the Machine Vision Controller. More...
class  VIB::Led
 This class controls the status LEDs. More...
class  VIB::Multiplexer
 This class controls the Multiplexer unit which connects signal sources and sinks with each other. More...
class  VIB::PowerOverEthernet
 This class represents the PowerOverEthernet (PoE) module, which allows gathering information about the current state of attached PoE devices. More...
class  VIB::Rs232
 This class represents the RS-232 interface which allows sending and receiving data over a RS-232 port. More...
class  VIB::Rs422
 This class controls the RS-422 interface. More...
class  VIB::Service
 This class contains functions associated with the hardware component (serial number, system temperature, watchdog, firmware updates). More...
class  VIB::Strobe
 This class controlls the LED Strobe Controller. More...
class  VIB::TriggerGenerator
 This class controls the FPGA Trigger Unit. More...
class  VIB::TriggerOverEthernet
 This class represents the TriggerOverEthernet (ToE) module which allows the generation of GigE Action Commands. More...
bool ConfigureDebounceTime(unsigned int nsLow, unsigned int nsHigh)
Sets debouncing time for the digital input signals.
Definition: DigitalInput.cpp:254
This class controls a group of digital input signals.
Definition: VIB_Interface.h:432
bool Open(unsigned int Index=0)
Opens a device
Definition: iDevice.cpp:109