VisionBox .NET Library
VIB_NET::Multiplexer Class Reference
+ Inheritance diagram for VIB_NET::Multiplexer:

Detailed Description

This class controls the Multiplexer unit which connects signal sources and sinks with each other.

See class VIB::Multiplexer in the VisionBox Interface Library for a detailed description.

Examples

Public Types

enum  eMUX_SOURCE
 Source signal definitions for the Multiplexer More...
 

Public Member Functions

void AbortWaitingForEvent ()
 Aborts all threads waiting for an event and disables all events. More...
 
void ConfigureEvent (UInt32 SensitivityMaskRising, UInt32 SensitivityMaskFalling)
 Configures the sensitivity for Multiplexer events More...
 
void ConnectOutput (UInt32 OutputIndex, VIB_NET::Multiplexer::eMUX_SOURCE Source)
 Selects the source signal for the specified output line. More...
 
void GetEventTime (UInt32 % time_us, Boolean % eventsDropped)
 Reads the event time for the last event. More...
 
 Multiplexer ()
 Default constructor for the device object More...
 
void Reset ()
 Resets the device to default settings. More...
 
void WaitForEvent (UInt32 msTimeout, UInt32 % SignalState, UInt32 % SignalChanged)
 Waits for a Multiplexer event. More...
 
- Public Member Functions inherited from VIB_NET::iDevice
void Close ()
 Closes a device More...
 
bool isOpen ()
 Returns the open state of a device object More...
 
void Open ()
 Opens a device More...
 
void Open (unsigned int Index)
 Opens a device More...
 

Properties

UInt32 NumberOfOutputs [get]
 Returns number of internal trigger lines. More...
 
virtual VIB_NET::eDEVICE_TYPE Type [get]
 Returns the device type for the current instance, see eDEVICE_TYPE More...
 
- Properties inherited from VIB_NET::iDevice
virtual VIB_NET::eDEVICE_TYPE Type [get]
 Returns the device type for the current instance, see eDEVICE_TYPE More...
 

Member Enumeration Documentation

◆ eMUX_SOURCE

Source signal definitions for the Multiplexer

Enumerator
OFF 

static off

ON 

static on

DIG_IN0 

DigitalInput 0.

DIG_IN1 

DigitalInput 1.

DIG_IN2 

DigitalInput 2.

DIG_IN3 

DigitalInput 3.

DIG_IN4 

DigitalInput 4.

DIG_IN5 

DigitalInput 5.

DIG_IN6 

DigitalInput 6.

DIG_IN7 

DigitalInput 7.

STROBE_0 

Strobe signal 0.

STROBE_1 

Strobe signal 1.

STROBE_2 

Strobe signal 2.

STROBE_3 

Strobe signal 3.

SYNC_0 

SYNC Unit 0 Input 0.

SYNC_1 

SYNC Unit 0 Input 1.

SYNC_2 

SYNC Unit 0 Input 2.

SYNC_3 

SYNC Unit 0 Input 3.

TRIGGEN_OUT0 

TriggerGenerator Output 0.

TRIGGEN_OUT1 

TriggerGenerator Output 1.

TRIGGEN_OUT2 

TriggerGenerator Output 2.

TRIGGEN_OUT3 

TriggerGenerator Output 3.

IOSCHEDULER_0_OUT0 

IOScheduler Unit 0 Output 0.

IOSCHEDULER_0_OUT1 

IOScheduler Unit 0 Output 1.

IOSCHEDULER_1_OUT0 

IOScheduler Unit 1 Output 0.

IOSCHEDULER_1_OUT1 

IOScheduler Unit 1 Output 1.

IOSCHEDULER_2_OUT0 

IOScheduler Unit 2 Output 0.

IOSCHEDULER_2_OUT1 

IOScheduler Unit 2 Output 1

IOSCHEDULER_3_OUT0 

IOScheduler Unit 3 Output 0.

IOSCHEDULER_3_OUT1 

IOScheduler Unit 3 Output 1.

SYNC_1_0 

SYNC Unit 1 Input 0.

SYNC_1_1 

SYNC Unit 1 Input 1.

SYNC_1_2 

SYNC Unit 1 Input 2.

SYNC_1_3 

SYNC Unit 1 Input 3.

DIG_1_IN0 

Digital Unit 1 Input 0.

DIG_1_IN1 

Digital Unit 1 Input 1.

DIG_1_IN2 

Digital Unit 1 Input 2.

DIG_1_IN3 

Digital Unit 1 Input 3.

DIG_1_IN4 

Digital Unit 1 Input 4.

DIG_1_IN5 

Digital Unit 1 Input 5.

DIG_1_IN6 

Digital Unit 1 Input 6.

DIG_1_IN7 

Digital Unit 1 Input 7.

STROBE_4 

Strobe signal 4.

STROBE_5 

Strobe signal 5.

STROBE_6 

Strobe signal 6.

STROBE_7 

Strobe signal 7.

STROBE_8 

Strobe signal 8.

STROBE_9 

Strobe signal 9.

SYNC_2_0 

SYNC Unit 2 Input 0.

SYNC_2_1 

SYNC Unit 2 Input 1.

SYNC_2_2 

SYNC Unit 2 Input 2.

SYNC_2_3 

SYNC Unit 2 Input 3.

IOSCHEDULER_4_OUT0 

IOScheduler Unit 4 Output 0.

IOSCHEDULER_4_OUT1 

IOScheduler Unit 4 Output 1.

IOSCHEDULER_5_OUT0 

IOScheduler Unit 5 Output 0.

IOSCHEDULER_5_OUT1 

IOScheduler Unit 5 Output 1.

IOSCHEDULER_6_OUT0 

IOScheduler Unit 6 Output 0.

IOSCHEDULER_6_OUT1 

IOScheduler Unit 6 Output 1.

IOSCHEDULER_7_OUT0 

IOScheduler Unit 7 Output 0.

IOSCHEDULER_7_OUT1 

IOScheduler Unit 7 Output 1.

Constructor & Destructor Documentation

◆ Multiplexer()

VIB_NET::Multiplexer::Multiplexer ( )

Default constructor for the device object

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

Member Function Documentation

◆ AbortWaitingForEvent()

void VIB_NET::Multiplexer::AbortWaitingForEvent ( )

Aborts all threads waiting for an event and disables all events.

The function removes any threads from the wait queue. Furthermore the event configuration is reset to all off.
It will not return before any thread leaves the internal critical area. By using this function you can release/close the device safely after the call. The aborted threads are not allowed to call WaitForEvent() again, until events are configured by calling ConfigureEvent().

◆ ConfigureEvent()

void VIB_NET::Multiplexer::ConfigureEvent ( UInt32  SensitivityMaskRising,
UInt32  SensitivityMaskFalling 
)

Configures the sensitivity for Multiplexer events

The parameters SensitivityMaskRising and SensitivityMaskFalling specify which of the first 16 Multiplexer output lines will be used to generate events. The signal edge can be specified for each line individually.

Parameters
SensitivityMaskRisingBinary representation of Multiplexer signals that triggers an event on the rising edge
SensitivityMaskFallingBinary representation of Multiplexer signals that triggers an event on the falling edge

◆ ConnectOutput()

void VIB_NET::Multiplexer::ConnectOutput ( UInt32  OutputIndex,
VIB_NET::Multiplexer::eMUX_SOURCE  Source 
)

Selects the source signal for the specified output line.

Parameters
OutputIndexOutput number, 0 ... (NumberOfOutputs - 1)
SourceSource for the output
Example:
C#: Multi_Example.cs
Visual Basic: Multi_Example.vb

◆ GetEventTime()

void VIB_NET::Multiplexer::GetEventTime ( UInt32 %  time_us,
Boolean %  eventsDropped 
)

Reads the event time for the last event.

This function can be called after a event is returned by WaitForEvent(). It returns the number of microseconds between occurance of the previous and the current event. It also returns a flag indicating an overflow of the event FIFO.

Restrictions

  • The event FIFO stores a maximum of 256 events together with the time value.
  • ConfigureEvent() starts the time measurement for the first event.
  • The returned time represents a 24-bit value which saturates at ~16.7 seconds.
  • The function cannot be called if another thread is already waiting in WaitForEvent().
Parameters
time_usEvent time in microseconds, 0...0xffffff
eventsDroppedIndicates that events were dropped before this event

◆ Reset()

void VIB_NET::Multiplexer::Reset ( )

Resets the device to default settings.

See also VIB::Multiplexer::Reset().

◆ WaitForEvent()

void VIB_NET::Multiplexer::WaitForEvent ( UInt32  msTimeout,
UInt32 %  SignalState,
UInt32 %  SignalChanged 
)

Waits for a Multiplexer event.

The function waits for multiplexer line events selected with ConfigureEvent().

After a timeout or a call of AbortWaitingForEvent(), the user must configure the events again.

Multiple threads can call this function simultaneously. The first caller returns first with the next event.

Parameters
msTimeoutTimeout in milliseconds, 0xffffffff for infinite timeout
The actual timeout may be twice as high if there are already other threads waiting for an event.
SignalStateAfter sccess, the function returns the current state of the first 16 Multiplexer lines (binary representation).
SignalChangedAfter sccess, the function returns the Multiplexer lines which triggered the event (binary representation).

Property Documentation

◆ NumberOfOutputs

VIB_NET::Multiplexer::NumberOfOutputs
get

Returns number of internal trigger lines.

The count of outputs, depends in combination of hardware type, software library and FPGA version.

Returns
Number of outputs
Example:
C#: Multi_Example.cs
Visual Basic: Multi_Example.vb

◆ Type

VIB_NET::Multiplexer::Type
get

Returns the device type for the current instance, see eDEVICE_TYPE