VisionBox .NET Library  1.7.10.0 (2024-04-16)
VIB_NET::DigitalOutput Class Reference
+ Inheritance diagram for VIB_NET::DigitalOutput:

Detailed Description

This class controls the optically isolated output signals.


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

Examples

Public Types

enum  eOUT_SOURCE
 Sources for the Outputs used with SetSource() More...
 

Public Member Functions

 DigitalOutput ()
 Default constructor for the device object More...
 
void Reset ()
 Resets the device to default settings. More...
 
void SetBit (UInt32 BitIndex, Boolean OnOff)
 Sets the state of the specified digital output. More...
 
void SetSource (UInt32 BitIndex, eOUT_SOURCE Source, bool InvertOutput)
 Sets the source for the specified output signal. 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 the number of output channels. More...
 
UInt32 Output [set]
 Sets the state of the digital output signals. 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

◆ eOUT_SOURCE

Sources for the Outputs used with SetSource()

Precondition
Not available on every FPGA Version, needs min v1.0.0.20.
Enumerator
REGISTER 

Value set by Set() or SetBit() function. (default)

MUX_OUT0 

Multiplexer Output 0.

MUX_OUT1 

Multiplexer Output 1.

MUX_OUT2 

Multiplexer Output 2.

MUX_OUT3 

Multiplexer Output 3.

MUX_OUT4 

Multiplexer Output 4.

MUX_OUT5 

Multiplexer Output 5.

MUX_OUT6 

Multiplexer Output 6.

MUX_OUT7 

Multiplexer Output 7.

MUX_OUT8 

Multiplexer Output 8.

MUX_OUT9 

Multiplexer Output 9.

MUX_OUT10 

Multiplexer Output 10.

MUX_OUT11 

Multiplexer Output 11.

MUX_OUT12 

Multiplexer Output 12.

MUX_OUT13 

Multiplexer Output 13.

MUX_OUT14 

Multiplexer Output 14.

MUX_OUT15 

Multiplexer Output 15.

MUX_OUT16 

Multiplexer Output 16.

MUX_OUT17 

Multiplexer Output 17.

MUX_OUT18 

Multiplexer Output 18.

MUX_OUT19 

Multiplexer Output 19.

MUX_OUT20 

Multiplexer Output 20.

MUX_OUT21 

Multiplexer Output 21.

MUX_OUT22 

Multiplexer Output 22.

MUX_OUT23 

Multiplexer Output 23.

Constructor & Destructor Documentation

◆ DigitalOutput()

VIB_NET::DigitalOutput::DigitalOutput ( )

Default constructor for the device object

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

Member Function Documentation

◆ Reset()

void VIB_NET::DigitalOutput::Reset ( )

Resets the device to default settings.

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

◆ SetBit()

void VIB_NET::DigitalOutput::SetBit ( UInt32  BitIndex,
Boolean  OnOff 
)

Sets the state of the specified digital output.

Parameters
BitIndexOutput index, 0 ... (NumberOfOutputs - 1)
OnOffOutput value
Example:
C#: DigInOut_Example.cs
Visual Basic: DigInOut_Example.vb

◆ SetSource()

void VIB_NET::DigitalOutput::SetSource ( UInt32  BitIndex,
DigitalOutput::eOUT_SOURCE  Source,
bool  InvertOutput 
)

Sets the source for the specified output signal.

The power-up value eOUT_SOURCE::REGISTER is used for manual control by using Output and SetBit().

Parameters
BitIndexOutput index, 0 ... (NumberOfOutputs - 1)
SourceSource for the output
InvertOutputPolarity of the output signal
Precondition
  • This function is not available for the VisionBox AGE-X1 and the VisionSensor PV
  • Requires FPGA version ≥ 1.0.0.20

Property Documentation

◆ NumberOfOutputs

VIB_NET::DigitalOutput::NumberOfOutputs
get

Returns the number of output channels.

◆ Output

VIB_NET::DigitalOutput::Output
set

Sets the state of the digital output signals.

The actual number of available outputs is hardware dependent, see NumberOfOutputs.

Parameters
Val
  • Bits 0...15: Binary representation of digital outputs.
  • Bits 16...31: Mask bits: only signals for which the mask bit is set will be changed, all other signals are ignored. Exception: if the upper 16 bits of Val are zero, then all outputs will be set.
Example:
C#:
//change BIT0 & BIT1 to on, all other to off
VIBDevice().Output = 0x3;
//turn BIT1 off, BIT0 stays on
VIBDevice().Output = ( (1<<(16+1)) | 0x00)

◆ Type

VIB_NET::DigitalOutput::Type
get

Returns the device type for the current instance, see eDEVICE_TYPE