Impact Acquire SDK .NET
OutputSignalGeneratorFrameGrabber Class Reference

A class to create complex digital output signals(Device specific interface layout only). More...

Inheritance diagram for OutputSignalGeneratorFrameGrabber:
[legend]

Public Member Functions

int defineLineScanPulse (DigitalOutput output, TDeviceSignalOutputStartEvent pulseStartEvent, int softwareSignalPeriod_pclk, int width_pclk, int polarity, int divider)
 Defines a pulse to trigger line scan cameras.
 
int definePassThroughSignal (DigitalOutput output, String digitalSignal)
 Assing a certain signal to a digital output.
 
int definePassThroughSignal (DigitalOutput output, String digitalSignal, bool boInverted)
 Assing a certain signal to a digital output.
 
int definePassThroughSignal (DigitalOutput output, TDigitalSignal digitalSignal)
 Assing a certain signal to a digital output.
 
int definePassThroughSignal (DigitalOutput output, TDigitalSignal digitalSignal, bool boInverted)
 Assing a certain signal to a digital output.
 
int definePulse (DigitalOutput output, int polarity, int delay, int width)
 Assigns a single pulse to a digital output.
 
int definePulse (DigitalOutput output, int polarity, int delay, int width, PulseStartConfiguration pulseStartConfiguration)
 Assigns a single pulse to a digital output.
 
int definePulseSequence (DigitalOutput output, int startLevel, List< int > sequence)
 Assigns a complex signal to a digital output.
 
int definePulseSequence (DigitalOutput output, int startLevel, List< int > sequence, PulseStartConfiguration pulseStartConfiguration)
 Assigns a complex signal to a digital output.
 
IEnumerable< TgetEnumerable< T > ()
 Returns an enumerator of a certain type that iterates through the collection.
 
IEnumerator< intGetEnumerator ()
 Returns an enumerator that iterates through the collection.
 
int getValidPassThroughSignalCount (DigitalOutput output)
 Returns the number of signals that can be used for pass through signal definitions for a certain digital output pin of this device.
 
int getValidSignalsForPassThroughModes (DigitalOutput output, List< KeyValuePair< String, TDigitalSignal > > sequence)
 Receives a list of valid signals that can be passed directly to a certain digital output pin.
 
 OutputSignalGeneratorFrameGrabber (Device device)
 Constructs a new mv.impact.acquire.OutputSignalGeneratorFrameGrabber object.
 
void restoreDefault ()
 Restores the default for every component of this collection.
 
int undefineSignal (DigitalOutput output)
 Removes the signal definition from the specified output pin.
 

Public Attributes

readonly EnumPropertyI< TDigitalOutputControlModecontrolMode = new EnumPropertyI<TDigitalOutputControlMode>()
 An enumerated integer property defining the general method used to create output signals.
 
readonly EnumPropertyI< TDeviceImageTriggerimageTrigger = new EnumPropertyI<TDeviceImageTrigger>()
 An enumerated integer property defining the general behaviour of created output signals.
 
readonly EnumPropertyI< TDeviceSignalOutputStartEventpulseStartEvent = new EnumPropertyI<TDeviceSignalOutputStartEvent>()
 An enumerated integer property defining the general behaviour of created output signals.
 

Properties

IEnumerable< ComponentcomponentEnumerable [get]
 Returns an enumerator that iterates through the collection.
 
IEnumerable< ComponentListcomponentListEnumerable [get]
 Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.
 
int hObj [get]
 Returns a unique identifier for the component collection referenced by this object.
 

Detailed Description

A class to create complex digital output signals(Device specific interface layout only).

Instances of this class can be used to create more complex digital output related signals like a single pulse or sequence of pulses on a certain pin as a reaction on a signal on one of the digital inputs of a device.

The availability of the features provided by this class heavily depends on the used capture device. Therefore it's crucial to check if a desired feature is available at all. This class either provides the functions needed for these checks or its functions will return appropriate error codes.

Note
If the property mv.impact.acquire.OutputSignalGeneratorFrameGrabber.controlMode is not available NO feature of this class can be used.
If the translation dictionary of mv.impact.acquire.OutputSignalGeneratorFrameGrabber.controlMode does not contain mv.impact.acquire.TDigitalOutputControlMode.docmRTC the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.defineLineScanPulse will NOT be available.
Calling unsupported functions or accessing unsupported features will raise an exception.

Pointers to mv.impact.acquire.DigitalOutput objects MUST be obtained by an instance to a mv.impact.acquire.IOSubSystemFrameGrabber object of the same device.

Examples

int iCnt = io.inputCount;
Console.WriteLine( "Available digital inputs: {0}", iCnt);
for( int d=0; d<iCnt; d++ )
{
Console.WriteLine( io.input(d).description );
}
int oCnt = io.outputCount;
Console.WriteLine( "Available digital outputs: {0}", oCnt);
// set all available digital outputs to high
for( int e=0; e<oCnt; e++ )
{
Console.WriteLine( "Setting {0} to high", pOutput.description);
pOutput.set();
}
// check there is at least one digital output
if (oCnt > 0)
{
OutputSignalGeneratorFrameGrabber osg = new OutputSignalGeneratorFrameGrabber(pDev);
// check if this device supports enhanced signal creation at all
if (osg.controlMode.isValid)
{
// define a simple pulse on the first digital output detected.
// this pulse will be low after 100 us for
// 200us and then switches back to high.
osg.definePulse(io.output(0), 0, 100, 200);
// define a more complex pulse
List<int> v = new List<int>();
v.Add(100);
v.Add(299);
v.Add(666);
osg.definePulseSequence(io.output(0), 0, v);
osg.controlMode.write(TDigitalOutputControlMode.docmSoftware);
osg.imageTrigger.write(TDeviceImageTrigger.ditAfterDigOutSignals);
// check if line scan pulse creation is supported by this device
List<KeyValuePair<String, TDigitalOutputControlMode>> dict = new List<KeyValuePair<string, TDigitalOutputControlMode>>();
osg.controlMode.getTranslationDict(dict);
int dictSize = osg.controlMode.dictSize;
for (int i = 0; i < dictSize; i++)
{
if (dict[i].Value == TDigitalOutputControlMode.docmRTC)
{
// supported -> define some signal
Console.WriteLine("checkGrabberInterface: This device supports RTC control signal creation.");
osg.controlMode.write(TDigitalOutputControlMode.docmRTC);
osg.defineLineScanPulse(io.output(0), TDeviceSignalOutputStartEvent.dsosePeriodically, 100, 100, 1, 1);
}
}
}
}
A class to represent a digital output pin(Device specific interface layout only).
Definition DigitalIO.cs:91
A template class to represent 32 bit integer properties and 32 bit enumerated integer properties.
Definition EnumPropertyI.cs:61
A class to handle the digital inputs and outputs for frame grabber devices (Device specific interface...
Definition IOSubSystemFrameGrabber.cs:26
DigitalOutput output(int nr)
Returns a pointer to a mv.impact.acquire.DigitalOutput object.
Definition IOSubSystem.cs:144

Whenever a signal has been defined for a a certain digital output pin, this pin can no longer controlled using the corresponding functions in the class mv.impact.acquire.DigitalOutput. In order to do that the pin in question must be released using the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal.

Note
This class will only be available if mv.impact.acquire.Device.interfaceLayout is set to mv.impact.acquire.TDeviceInterfaceLayout.dilDeviceSpecific before the device is opened.

Constructor & Destructor Documentation

◆ OutputSignalGeneratorFrameGrabber()

Constructs a new mv.impact.acquire.OutputSignalGeneratorFrameGrabber object.

Parameters
[in]deviceA pointer to a mv.impact.acquire.Device object obtained from a mv.impact.acquire.DeviceManager object.

Member Function Documentation

◆ defineLineScanPulse()

int defineLineScanPulse ( DigitalOutput output,
TDeviceSignalOutputStartEvent pulseStartEvent,
int softwareSignalPeriod_pclk,
int width_pclk,
int polarity,
int divider )
inline

Defines a pulse to trigger line scan cameras.

Calling this function without setting mv.impact.acquire.OutputSignalGeneratorFrameGrabber.controlMode to mv.impact.acquire.TDigitalOutputControlMode.docmRTC will have NO effect.

Note
Not every frame grabber will offer the mv.impact.acquire.TDigitalOutputControlMode.docmRTC mode. Check is the mode is available by reading the properties translation dictionary with the function mv.impact.acquire.EnumPropertyI<T>.getTranslationDict
See also
mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]pulseStartEventDefines the start event for the signal generation. Valid values for this parameter are defined by mv.impact.acquire.TDeviceSignalOutputStartEvent.
[in]softwareSignalPeriod_pclkDefines the frequency for a continuously generated signal if pulseStartEvent is mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInRisingEdge or mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInFallingEdge and is ignored otherwise.
[in]width_pclkThe width of the signal to generate if pulseStartEvent is mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInRisingEdge, mv.impact.acquire.TDeviceSignalOutputStartEvent.dsosePeriodically or mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInFallingEdge and is ignored otherwise.
[in]polarityThe polarity of the signal to generate if pulseStartEvent is mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInRisingEdge, mv.impact.acquire.TDeviceSignalOutputStartEvent.dsosePeriodically or mv.impact.acquire.TDeviceSignalOutputStartEvent.dsoseSyncInFallingEdge and is ignored otherwise. - 0: The signal will be low for width_pclk and high otherwise - 1: The signal will be high for width_pclk and high otherwise
[in]dividerDefines the divider value if pulseStartEvent is mv.impact.acquire.TDeviceSignalOutputStartEvent.dsosePeriodically

◆ definePassThroughSignal() [1/4]

int definePassThroughSignal ( DigitalOutput output,
String digitalSignal )
inline

Assing a certain signal to a digital output.

Some digital input signals or even some internal signals can be passed directly to one or more digital outputs.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]digitalSignalThe string representation of the digital output that shall be passed to the digital output. Valid values for this parameter will be obtained by a call to the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes

◆ definePassThroughSignal() [2/4]

int definePassThroughSignal ( DigitalOutput output,
String digitalSignal,
bool boInverted )
inline

Assing a certain signal to a digital output.

Some digital input signals or even some internal signals can be passed directly to one or more digital outputs.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]digitalSignalThe string representation of the digital output that shall be passed to the digital output. Valid values for this parameter will be obtained by a call to the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes.
[in]boInvertedIf set to true, the signal will be inverted internally before being passed to the output.

◆ definePassThroughSignal() [3/4]

int definePassThroughSignal ( DigitalOutput output,
TDigitalSignal digitalSignal )
inline

Assing a certain signal to a digital output.

Some digital input signals or even some internal signals can be passed directly to one or more digital outputs.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]digitalSignalThe digital signal that shall be passed to the digital output. Valid values for this parameter will be obtained by a call to the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes

◆ definePassThroughSignal() [4/4]

int definePassThroughSignal ( DigitalOutput output,
TDigitalSignal digitalSignal,
bool boInverted )
inline

Assing a certain signal to a digital output.

Some digital input signals or even some internal signals can be passed directly to one or more digital outputs.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]digitalSignalThe digital signal that shall be passed to the digital output. Valid values for this parameter will be obtained by a call to the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes.
[in]boInvertedIf set to true, the signal will be inverted internally before being passed to the output.

◆ definePulse() [1/2]

int definePulse ( DigitalOutput output,
int polarity,
int delay,
int width )
inline

Assigns a single pulse to a digital output.

Whenever a single pulse of a certain duration and polarity shall be generated on a digital output as a reaction on a trigger signal that was either generated by one of digital inputs of the device or software this is the right function to use.

When the signal is generated can be defined by the properties mv.impact.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]polarityThe polarity of the pulse to generate. - 0: The pulse will be low for width_pclk and high otherwise - 1: The pulse will be high for width_pclk and high otherwise
[in]delayThe delay after the trigger event before a signal generation starts
[in]widthThe width of the pulse to generate

◆ definePulse() [2/2]

int definePulse ( DigitalOutput output,
int polarity,
int delay,
int width,
PulseStartConfiguration pulseStartConfiguration )
inline

Assigns a single pulse to a digital output.

Whenever a single pulse of a certain duration and polarity shall be generated on a digital output as a reaction on a trigger signal that was either generated by one of digital inputs of the device or software this is the right function to use.

When the signal is generated can be defined by the properties mv.impact.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]polarityThe polarity of the pulse to generate. - 0: The pulse will be low for width_pclk and high otherwise - 1: The pulse will be high for width_pclk and high otherwise
[in]delayThe delay after the trigger event before a signal generation starts
[in]widthThe width of the pulse to generate
[in]pulseStartConfigurationThe pulse start configuration to be used for this pulse sequence. Not every device will support the use of pulse start configurations. Valid objects that can be passed to this function can be obtained from a call to mv.impact.acquire.IOSubSystem.getPulseStartConfiguration, and mv.impact.acquire.IOSubSystem.pulseStartConfigurationCount. If objects of these type are not supported, pass 0 or ignore this parameter. In that case the property mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger will define the start condition for the signal output.

◆ definePulseSequence() [1/2]

int definePulseSequence ( DigitalOutput output,
int startLevel,
List< int > sequence )
inline

Assigns a complex signal to a digital output.

This function can be used when a complex signal shall be generated on a digital output as a reaction on a trigger signal that was either generated by one of digital inputs of the device or software.

When the signal is generated can be defined by the properties mv.impact.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]startLevelThe start level of the generated signal. - 0: The signal will start with 'low' - 1: The signal will start with 'high'
[in]sequenceAn array of integer values. Each values defines a switch in polarity of the signal after 'x' us. An array containing '1000', '2000' therefore will describe a signal starting with startLevel, switches polarity after 1000 us and then again switches polarity after 2000 us.

◆ definePulseSequence() [2/2]

int definePulseSequence ( DigitalOutput output,
int startLevel,
List< int > sequence,
PulseStartConfiguration pulseStartConfiguration )
inline

Assigns a complex signal to a digital output.

This function can be used when a complex signal shall be generated on a digital output as a reaction on a trigger signal that was either generated by one of digital inputs of the device or software.

When the signal is generated can be defined by the properties mv.impact.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mv.impact.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[in]startLevelThe start level of the generated signal. - 0: The signal will start with 'low' - 1: The signal will start with 'high'
[in]sequenceAn array of integer values. Each values defines a switch in polarity of the signal after 'x' us. An array containing '1000', '2000' therefore will describe a signal starting with startLevel, switches polarity after 1000 us and then again switches polarity after 2000 us.
[in]pulseStartConfigurationThe pulse start configuration to be used for this pulse sequence. Not every device will support the use of pulse start configurations. Valid objects that can be passed to this function can be obtained from a call to mv.impact.acquire.IOSubSystem.getPulseStartConfiguration, and mv.impact.acquire.IOSubSystem.pulseStartConfigurationCount. If objects of these type are not supported, pass 0 or ignore this parameter. In that case the property mv.impact.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger will define the start condition for the signal output.

◆ getEnumerable< T >()

IEnumerable< T > getEnumerable< T > ( )
inlineinherited

Returns an enumerator of a certain type that iterates through the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (Property c in info.getEnumerable<Property>())
{
}
A class to query various general information about the device, its driver and other information.
Definition Info.cs:10
A base class for properties.
Definition Property.cs:109

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ GetEnumerator()

IEnumerator< int > GetEnumerator ( )
inlineinherited

Returns an enumerator that iterates through the collection.

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ getValidPassThroughSignalCount()

int getValidPassThroughSignalCount ( DigitalOutput output)
inline

Returns the number of signals that can be used for pass through signal definitions for a certain digital output pin of this device.

Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.

◆ getValidSignalsForPassThroughModes()

int getValidSignalsForPassThroughModes ( DigitalOutput output,
List< KeyValuePair< String, TDigitalSignal > > sequence )
inline

Receives a list of valid signals that can be passed directly to a certain digital output pin.

Whenever it is necessary to output a certain signal (e.g. a digital input signal connected to the device or an internal digital signal like e.g. a frame valid signal) to a digital output of the device this can be done by a call to the function mv.impact.acquire.OutputSignalGeneratorFrameGrabber.definePassThroughSignal

As the type of signals that a device can send to a digital output depends heavily on the device and even on the digital output as well, this function will return a list of strings and a numerical representation for each signal that can be sent to this digital output.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.
[out]sequenceA reference to a vector that will receive the list of allowed digital signals for this particular digital output pin.

◆ restoreDefault()

void restoreDefault ( )
inlineinherited

Restores the default for every component of this collection.

Calling this function will restore the default value for every component belonging to this collection.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.

◆ undefineSignal()

int undefineSignal ( DigitalOutput output)
inline

Removes the signal definition from the specified output pin.

Whenever a signal has been defined for a a certain digital output pin, this pin can no longer controlled using the corresponding functions in the class mv.impact.acquire.DigitalOutput. This function removes the signal definition and hands back manual control of that digital output to the user.

Returns
Parameters
[in]outputA pointer to a mv.impact.acquire.DigitalOutput object obtained from an instance of the class mv.impact.acquire.IOSubSystemFrameGrabber for this device.

Member Data Documentation

◆ controlMode

An enumerated integer property defining the general method used to create output signals.

This setting always applies to every signal defined. Modifying this property will also change the behaviour of signals already defined.

Valid values for this property are defined by the enumeration mv.impact.acquire.TDigitalOutputControlMode.

When switching to mv.impact.acquire.TDigitalOutputControlMode.docmRTC mode only one signal can be created currently.

Note
Not every frame grabber will offer the mv.impact.acquire.TDigitalOutputControlMode.docmRTC mode. Check if the mode is available by reading the properties translation dictionary with the function mv.impact.acquire.EnumPropertyI<T>.getTranslationDict.

Some devices will offer a more flexible way to define this behaviour. In this case, this property won't be available (a call to the function mv.impact.acquire.Component.isValid will return false). However then calls to mv.impact.acquire.IOSubSystem.pulseStartConfigurationCount and mv.impact.acquire.IOSubSystem.getPulseStartConfiguration will succeed and the objects returned by mv.impact.acquire.IOSubSystem.getPulseStartConfiguration (mv.impact.acquire.PulseStartConfiguration) will provide a more sophisticated way to define the signal output behaviour of a device.

◆ imageTrigger

An enumerated integer property defining the general behaviour of created output signals.

This setting always applies to every signal defined. Modifying this property will also change the behaviour of signals already defined.

Valid values for this property are defined by the enumeration mv.impact.acquire.TDeviceImageTrigger.

◆ pulseStartEvent

An enumerated integer property defining the general behaviour of created output signals.

This setting always applies to every signal defined. Modifying this property will also change the behaviour of signals already defined.

Valid values for this property are defined by the enumeration mv.impact.acquire.TDeviceSignalOutputStartEvent.

Property Documentation

◆ componentEnumerable

IEnumerable<Component> componentEnumerable
getinherited

Returns an enumerator that iterates through the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (Component c in info.componentEnumerable)
{
Console.WriteLine("{0}", c.name);
}
String name
Returns the name of the component referenced by this object.
Definition ComponentAccess.cs:167
A base class to implement access to internal driver components.
Definition Component.cs:133

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ componentListEnumerable

IEnumerable<ComponentList> componentListEnumerable
getinherited

Returns an enumerator that iterates through all the mv.impact.acquire.ComponentList elements in the collection.

This interface will allow to e.g. write code like this:

Info info = new Info(pDev);
foreach (ComponentList cl in info.componentListEnumerable)
{
Console.WriteLine("{0}", cl.name);
}
A class to provide access to component lists.
Definition ComponentList.cs:14

See the frameworks documentation about the System.Collections.IEnumerable interface for more information.

Returns
An enumerator that iterates through the collection

◆ hObj

int hObj
getinherited

Returns a unique identifier for the component collection referenced by this object.

This handle will always reference an object of type mv.impact.acquire.ComponentList.

Returns
A unique identifier for the component referenced by this object.