VisionBox Interface Library  1.7.15.0 (2026-04-13)
Loading...
Searching...
No Matches
VIB::CameraTrigger Class Reference
Inheritance diagram for VIB::CameraTrigger:

Detailed Description

This class controls the digital camera trigger output.

Each camera trigger output has two transistors, one for the positive and one for the negative side. Both transistors can be programmed independently. Therefore, the output can be configured in push-pull, open-collector or emitter-follower configuration.

The image below gives a simplified view of the unit:

Camera Trigger unit block diagram

The high-side switch is connected to the power supply voltage of the VisionBox and has a current limiting circuit. For a detailed electrical specification please take a look at the VisionBox Hardware Manual.

The camera trigger output can be connected to different source signals by using the Set() functions, there are two overloaded versions.

The configuration of a trigger output takes the following parameters:

  • The trigger source signal
  • Activity for both transistors for low and high input state
The following example shows how to use a digital input as camera trigger. The Multiplexer is used to connect the input signal:
VIB::CameraTrigger cameraTrigger;
VIB::Multiplexer multiplexer;
unsigned int channel = 0;
// Open the Multiplexer and CameraTrigger devices:
multiplexer.Open();
cameraTrigger.Open(0);
// Connect the digital input 0 to Multiplexer output 0:
// Select Multiplexer output 0 and use push-pull configuration:
This class controls the digital camera trigger output.
Definition VIB_Interface.h:636
@ CAM_TRG_MUX_OUT0
Multiplexer Output 0.
Definition VIB_Interface.h:652
@ CAM_DRIVER_MODE_PUSH_PULL
Push-Pull mode, both transistors are used.
Definition VIB_Interface.h:703
bool Set(unsigned int Channel, TRG_SOURCE Source, DRIVER_MODE DriverMode, bool Invert=false)
Sets trigger output for the specified channel.
Definition CameraTrigger.cpp:109
This class controls the RTCC Multiplexer which connects signal sources and sinks with each other.
Definition VIB_Interface.h:746
@ MUX_SRC_DIG_IN0
DigitalInput unit 0, wire 0.
Definition VIB_Interface.h:759
bool ConnectOutput(unsigned int OutputIndex, Multiplexer::MUX_SOURCE Source)
Selects the source signal for the specified output line.
Definition Multiplexer.cpp:474
bool Open(unsigned int Index=0)
Opens a device.
Definition iDevice.cpp:109
Please note that error checking was removed to keep the code as simple as possible.

Public Types

enum  DRIVER_MODE
 Output driver mode. More...
enum  TRG_SOURCE
 Camera trigger source. More...

Public Member Functions

 CameraTrigger ()
 Default constructor for the device object.
bool GetNumberOfOutputs (unsigned int &NumberOfOutputs)
 Returns number of output channels.
bool Reset ()
 Resets the device to default settings.
bool Set (unsigned int Channel, TRG_SOURCE Source, bool TrgPOff=false, bool TrgPOn=true, bool TrgNOff=false, bool TrgNOn=false)
 Sets trigger output for the specified channel.
bool Set (unsigned int Channel, TRG_SOURCE Source, DRIVER_MODE DriverMode, bool Invert=false)
 Sets trigger output for the specified channel.
bool SetAll (TRG_SOURCE Source, bool TrgPOff=false, bool TrgPOn=true, bool TrgNOff=false, bool TrgNOn=false)
 Sets the trigger output for all channels simultaneously.
Public Member Functions inherited from VIB::iDevice
bool Close ()
 Closes a device.
 iDevice (const iDevice &device)
 The copy constructor makes a copy of the existing device object.
bool isOpen (bool &state)
 Returns the open state of a device object.
bool Open (unsigned int Index=0)
 Opens a device.
iDevice & operator= (const iDevice &device)
 The assignment operator makes a copy of the existing device object.
virtual ~iDevice ()
 Deletes the device object.

Member Enumeration Documentation

◆ DRIVER_MODE

Output driver mode.

Enumerator
CAM_DRIVER_MODE_PUSH_PULL 

Push-Pull mode, both transistors are used.

CAM_DRIVER_MODE_EMITTER_FOLLOWER 

Emitter-follower mode, only the upper transistor is used.

CAM_DRIVER_MODE_OPEN_COLLECTOR 

Open-collector mode, only the lower transistor is used (the output signal is low-active).

◆ TRG_SOURCE

Camera trigger source.

Note
The VisionBox AGE-X1 doesn't have a Multiplexer and therefore uses different source signals than new hardware generations.
Enumerator
CAM_TRG_OFF 

Trigger off.

CAM_TRG_ON 

Trigger on.

CAM_TRG_MUX_OUT0 0x020 

Multiplexer Output 0.

CAM_TRG_MUX_OUT1 0x030 

Multiplexer Output 1.

CAM_TRG_MUX_OUT2 0x040 

Multiplexer Output 2.

CAM_TRG_MUX_OUT3 0x050 

Multiplexer Output 3.

CAM_TRG_MUX_OUT4 0x060 

Multiplexer Output 4.

CAM_TRG_MUX_OUT5 0x070 

Multiplexer Output 5.

CAM_TRG_MUX_OUT6 0x080 

Multiplexer Output 6.

CAM_TRG_MUX_OUT7 0x090 

Multiplexer Output 7.

CAM_TRG_MUX_OUT8 0x0A0 

Multiplexer Output 8.

CAM_TRG_MUX_OUT9 0x0B0 

Multiplexer Output 9.

CAM_TRG_MUX_OUT10 0x0C0 

Multiplexer Output 10.

CAM_TRG_MUX_OUT11 0x0D0 

Multiplexer Output 11.

CAM_TRG_MUX_OUT12 0x0E0 

Multiplexer Output 12.

CAM_TRG_MUX_OUT13 0x0F0 

Multiplexer Output 13.

CAM_TRG_MUX_OUT14 0x100 

Multiplexer Output 14.

CAM_TRG_MUX_OUT15 0x110 

Multiplexer Output 15.

CAM_TRG_MUX_OUT16 0x120 

Multiplexer Output 16.

CAM_TRG_MUX_OUT17 0x130 

Multiplexer Output 17.

CAM_TRG_MUX_OUT18 0x140 

Multiplexer Output 18.

CAM_TRG_MUX_OUT19 0x150 

Multiplexer Output 19.

CAM_TRG_MUX_OUT20 0x160 

Multiplexer Output 20.

CAM_TRG_MUX_OUT21 0x170 

Multiplexer Output 21.

CAM_TRG_MUX_OUT22 0x180 

Multiplexer Output 22.

CAM_TRG_MUX_OUT23 0x190 

Multiplexer Output 23.

CAM_TRG_DIG_IN0 

Digital input 0 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN1  

Digital input 1 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN2  

Digital input 2 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN3  

Digital input 3 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN4  

Digital input 4 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN5  

Digital input 5 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN6  

Digital input 6 (VisionBox AGE-X1 only).

CAM_TRG_DIG_IN7  

Digital input 7 (VisionBox AGE-X1 only).

CAM_TRG_RS422_IN0 10 

RS422 input 0 (VisionBox AGE-X1 only).

CAM_TRG_RS422_IN1 11 

RS422 input 1 (VisionBox AGE-X1 only).

CAM_TRG_RS422_IN2 12 

RS422 input 2 (VisionBox AGE-X1 only).

CAM_TRG_TRIGGEN_OUT0 13 

Trigger Unit Output 0 (VisionBox AGE-X1 only).

CAM_TRG_TRIGGEN_OUT1 14 

Trigger Unit Output 1 (VisionBox AGE-X1 only).

CAM_TRG_TRIGGEN_OUT2 15 

Trigger Unit Output 2 (VisionBox AGE-X1 only).

Constructor & Destructor Documentation

◆ CameraTrigger()

VIB::CameraTrigger::CameraTrigger ( )

Default constructor for the device object.

The device must be opened with Open() before it can be used.

Member Function Documentation

◆ GetNumberOfOutputs()

bool VIB::CameraTrigger::GetNumberOfOutputs ( unsigned int & NumberOfOutputs)

Returns number of output channels.

Parameters
NumberOfOutputsNumber of outputs
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ Reset()

bool VIB::CameraTrigger::Reset ( )

Resets the device to default settings.

All trigger outputs are configured to high impedance state.

Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ Set() [1/2]

bool VIB::CameraTrigger::Set ( unsigned int Channel,
TRG_SOURCE Source,
bool TrgPOff = false,
bool TrgPOn = true,
bool TrgNOff = false,
bool TrgNOn = false )

Sets trigger output for the specified channel.

The default parameters are set for emitter-follower configuration. The following table shows useful parameter combinations:

Driver configurationPolarityParameter
TrgPOff TrgPOn TrgNOff TrgNOn
Push-Pullnormalfalse true true false
inversetrue false false true
Emitter-followernormalfalse true false false
inversetrue false false false
Open-collectornormal (low-active)false false false true
inverse (high-active)false false true false
Parameters
ChannelChannel number, 0 ... (GetNumberOfOutputs() - 1)
SourceTrigger source signal
TrgPOffHigh side switch activity for low input signal
TrgPOnHigh side switch activity for high input signal
TrgNOffLow side switch activity for low input signal
TrgNOnLow side switch activity for high input signal
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ Set() [2/2]

bool VIB::CameraTrigger::Set ( unsigned int Channel,
TRG_SOURCE Source,
DRIVER_MODE DriverMode,
bool Invert = false )

Sets trigger output for the specified channel.

Parameters
ChannelChannel number, 0 ... (GetNumberOfOutputs() - 1)
SourceTrigger source signal
DriverModeDriver mode
InvertPolarity
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ SetAll()

bool VIB::CameraTrigger::SetAll ( TRG_SOURCE Source,
bool TrgPOff = false,
bool TrgPOn = true,
bool TrgNOff = false,
bool TrgNOn = false )

Sets the trigger output for all channels simultaneously.

The function has the same behaviour as calling Set() an all channels, except that all changes are applied simultaneously.

Returns
true for success, use VIBSystem::GetLastErrorString() for an error description