VisionBox Interface Library
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:635
@ CAM_TRG_MUX_OUT0
Multiplexer Output 0.
Definition VIB_Interface.h:651
@ CAM_DRIVER_MODE_PUSH_PULL
Push-Pull mode, both transistors are used.
Definition VIB_Interface.h:702
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:745
@ MUX_SRC_DIG_IN0
DigitalInput unit 0, wire 0.
Definition VIB_Interface.h:758
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.
iDeviceoperator= (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 

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 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