VisionBox Interface Library  1.7.10.0 (2024-05-13)
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
+Example code
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:
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 More...
 
bool GetNumberOfOutputs (unsigned int &NumberOfOutputs)
 Returns number of output channels. More...
 
bool Reset ()
 Resets the device to default settings. More...
 
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 More...
 
bool Set (unsigned int Channel, TRG_SOURCE Source, DRIVER_MODE DriverMode, bool Invert=false)
 Sets trigger output for the specified channel More...
 
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 More...
 
- Public Member Functions inherited from VIB::iDevice
bool Close ()
 Closes a device More...
 
 iDevice (const iDevice &device)
 The copy constructor makes a copy of the existing device object More...
 
bool isOpen (bool &state)
 Returns the open state of a device object More...
 
bool Open (unsigned int Index=0)
 Opens a device More...
 
iDeviceoperator= (const iDevice &device)
 The assignment operator makes a copy of the existing device object More...
 
virtual ~iDevice ()
 Deletes the device object More...
 

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 

Multiplexer Output 0.

CAM_TRG_MUX_OUT1 

Multiplexer Output 1.

CAM_TRG_MUX_OUT2 

Multiplexer Output 2.

CAM_TRG_MUX_OUT3 

Multiplexer Output 3.

CAM_TRG_MUX_OUT4 

Multiplexer Output 4.

CAM_TRG_MUX_OUT5 

Multiplexer Output 5.

CAM_TRG_MUX_OUT6 

Multiplexer Output 6.

CAM_TRG_MUX_OUT7 

Multiplexer Output 7.

CAM_TRG_MUX_OUT8 

Multiplexer Output 8.

CAM_TRG_MUX_OUT9 

Multiplexer Output 9.

CAM_TRG_MUX_OUT10 

Multiplexer Output 10.

CAM_TRG_MUX_OUT11 

Multiplexer Output 11.

CAM_TRG_MUX_OUT12 

Multiplexer Output 12.

CAM_TRG_MUX_OUT13 

Multiplexer Output 13.

CAM_TRG_MUX_OUT14 

Multiplexer Output 14.

CAM_TRG_MUX_OUT15 

Multiplexer Output 15.

CAM_TRG_MUX_OUT16 

Multiplexer Output 16.

CAM_TRG_MUX_OUT17 

Multiplexer Output 17.

CAM_TRG_MUX_OUT18 

Multiplexer Output 18.

CAM_TRG_MUX_OUT19 

Multiplexer Output 19.

CAM_TRG_MUX_OUT20 

Multiplexer Output 20.

CAM_TRG_MUX_OUT21 

Multiplexer Output 21.

CAM_TRG_MUX_OUT22 

Multiplexer Output 22.

CAM_TRG_MUX_OUT23 

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 

RS422 input 0 (VisionBox AGE-X1 only)

CAM_TRG_RS422_IN1 

RS422 input 1 (VisionBox AGE-X1 only)

CAM_TRG_RS422_IN2 

RS422 input 2 (VisionBox AGE-X1 only)

CAM_TRG_TRIGGEN_OUT0 

Trigger Unit Output 0 (VisionBox AGE-X1 only)

CAM_TRG_TRIGGEN_OUT1 

Trigger Unit Output 1 (VisionBox AGE-X1 only)

CAM_TRG_TRIGGEN_OUT2 

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 configuration Polarity Parameter
TrgPOff TrgPOn TrgNOff TrgNOn
Push-Pull normal false true true false
inverse true false false true
Emitter-follower normal false true false false
inverse true false false false
Open-collector normal (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
VIB::Multiplexer::MUX_SRC_DIG_IN0
@ MUX_SRC_DIG_IN0
DigitalInput unit 0, wire 0.
Definition: VIB_Interface.h:754
VIB::Multiplexer::ConnectOutput
bool ConnectOutput(unsigned int OutputIndex, Multiplexer::MUX_SOURCE Source)
Selects the source signal for the specified output line.
Definition: Multiplexer.cpp:447
VIB::CameraTrigger
This class controls the digital camera trigger output.
Definition: VIB_Interface.h:631
VIB::CameraTrigger::Set
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
VIB::Multiplexer
This class controls the Multiplexer unit which connects signal sources and sinks with each other.
Definition: VIB_Interface.h:741
VIB::CameraTrigger::CAM_TRG_MUX_OUT0
@ CAM_TRG_MUX_OUT0
Multiplexer Output 0.
Definition: VIB_Interface.h:647
VIB::CameraTrigger::CAM_DRIVER_MODE_PUSH_PULL
@ CAM_DRIVER_MODE_PUSH_PULL
Push-Pull mode, both transistors are used.
Definition: VIB_Interface.h:698
VIB::iDevice::Open
bool Open(unsigned int Index=0)
Opens a device
Definition: iDevice.cpp:109