Impact Acquire SDK Python
OutputSignalGeneratorFrameGrabber Class Reference

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

Inheritance diagram for OutputSignalGeneratorFrameGrabber:
[legend]

Public Member Functions

 __init__ (self, src)
 Constructs a new mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber from an existing one.
 
 defineLineScanPulse (self, pOutput, pulseStartEventValue, softwareSignalPeriod_pclk, width_pclk, polarity, divider)
 Defines a pulse to trigger line scan cameras.
 
 definePassThroughSignal (self, *args)
 Assigns a certain signal to a digital output.
 
 definePulse (self, pOutput, polarity, delay, width, pPulseStartConfiguration=None)
 Assigns a single pulse to a digital output.
 
 definePulseSequence (self, pOutput, startLevel, sequence, pPulseStartConfiguration=None)
 Assigns a complex signal to a digital output.
 
 getValidPassThroughSignalCount (self, pOutput)
 Returns the number of signals that can be used for pass through signal definitions for a certain digital output pin of this device.
 
 getValidPassThroughSignalString (self, pOutput, index=0)
 Receives a valid string representation of a signal that can be passed directly to a certain digital output pin.
 
 getValidPassThroughSignalValue (self, pOutput, index=0)
 Receives a valid signal that can be passed directly to a certain digital output pin.
 
 getValidSignalsForPassThroughModes (self, pOutput, sequence)
 Receives a list of valid signals that can be passed directly to a certain digital output pin.
 
 undefineSignal (self, pOutput)
 Removes the signal definition from the specified output pin.
 

Properties

 controlMode = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_controlMode_get, doc=)
 An enumerated integer property defining the general method used to create output signals.
 
 imageTrigger = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_imageTrigger_get, doc=)
 An enumerated integer property defining the general behaviour of created output signals.
 
 pulseStartEvent = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_pulseStartEvent_get, doc=)
 An enumerated integer property defining the general behaviour of created output signals.
 
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

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

Deprecated
Beginning with the release of 3.0.0 of Impact Acquire everything specifically related to frame grabber boards will be considered as deprecated and might be removed without further notice!

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 mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.controlMode is not available NO feature of this class can be used.
If the translation dictionary of mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.controlMode does not contain mvIMPACT.acquire.docmRTC the function mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.defineLineScanPulse will NOT be available.
Calling unsupported functions or accessing unsupported features will raise an exception.

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

def setUpIOs(pDev):
# The next line will raise an exception if the device is not operated
# in interface layout 'dilDeviceSpecific' or is not a frame grabber! This
# should therefore be wrapped in an exception handler if in doubt!
io = acquire.IOSubSystemFrameGrabber(pDev)
iCnt = io.getInputCount()
print("available digital inputs: " + str(iCnt))
for x in range(iCnt):
print(io.getInput(d).getDescription())
oCnt = io.getOutputCount()
print("available digital outputs: " + str(oCnt))
# set all available digital outputs to high
for e in range(oCnt):
pOutput = io.getOutput(e)
print("setting " + pOutput.getDescription() + " to high")
pOutput.state = True
# check there is at least one digital output
if oCnt > 0:
osg = acquire.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.getOutput(0), 0, 100, 200)
# define a more complex pulse
v = []
v[0] = 100
v[1] = 299
v[1] = 666
osg.definePulseSequence(io.getOutput(0), 0, v)
osg.controlMode.write(acquire.docmSoftware)
osg.imageTrigger.write(acquire.ditAfterDigOutSignals)
# check if line scan pulse creation is supported by this device
dict = {None:None}
osg.controlMode.getTranslationDict(dict)
dictSize = osg.controlMode.dictSize
for i in range(dictSize):
if dict[i].second == acquire.docmRTC:
# supported -> define some signal
print("checkGrabberInterface: This device supports RTC control signal creation.")
osg.controlMode.write(acquire.docmRTC)
osg.defineLineScanPulse(io.getOutput(0), acquire.dsosePeriodically, 100, 100, 1, 1)

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 mvIMPACT.acquire.DigitalOutput. In order to do that the pin in question must be released using the function mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal.

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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
src )

Constructs a new mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber from an existing one.

Parameters
src[in] A constant reference to the mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber object, this object shall be created from

Member Function Documentation

◆ defineLineScanPulse()

defineLineScanPulse ( self,
pOutput,
pulseStartEventValue,
softwareSignalPeriod_pclk,
width_pclk,
polarity,
divider )

Defines a pulse to trigger line scan cameras.

Calling this function without setting mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.controlMode to mvIMPACT.acquire.docmRTC will have NO effect.

Note
Not every frame grabber will offer the mvIMPACT.acquire.docmRTC mode. Check is the mode is available by reading the properties translation dictionary with the functions mvIMPACT.acquire.PropertyIDigitalOutputControlMode.getTranslationDictString and mvIMPACT.acquire.PropertyIDigitalOutputControlMode.getTranslationDictValue. The detailed description of this class might contain source code examples for the language you are working with.
See also
mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
pulseStartEventValue[in] Defines the start event for the signal generation. Valid values for this parameter are defined by mvIMPACT.acquire.TDeviceSignalOutputStartEvent.
softwareSignalPeriod_pclk[in] Defines the frequency for a continuously generated signal if pulseStartEventValue is mvIMPACT.acquire.dsoseSyncInRisingEdge or mvIMPACT.acquire.dsoseSyncInFallingEdge and is ignored otherwise.
width_pclk[in] The width of the signal to generate if pulseStartEventValue is mvIMPACT.acquire.dsoseSyncInRisingEdge, mvIMPACT.acquire.dsosePeriodically or mvIMPACT.acquire.dsoseSyncInFallingEdge and is ignored otherwise.
polarity[in] The polarity of the signal to generate if pulseStartEventValue is mvIMPACT.acquire.dsoseSyncInRisingEdge, mvIMPACT.acquire.dsosePeriodically or mvIMPACT.acquire.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
    Parameters
    divider[in] Defines the divider value if pulseStartEventValue is mvIMPACT.acquire.dsosePeriodically

◆ definePassThroughSignal()

definePassThroughSignal ( self,
* args )

Assigns a certain signal to a digital output.

OVERLOAD 1:

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

Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
digitalSignal[in] The digital signal that shall be passed to the digital output. Valid values for this parameter will be obtained by a call to the function mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes.
boInverted[in] If set to true, the signal will be inverted internally before being passed to the output.

OVERLOAD 2: Assigning 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
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
digitalSignal[in] The 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 mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes.
boInverted[in] If set to true, the signal will be inverted internally before being passed to the output.

OVERLOAD 3: Assigning 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
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
digitalSignal[in] The 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 mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidSignalsForPassThroughModes.
boInverted[in] If set to true, the signal will be inverted internally before being passed to the output.

◆ definePulse()

definePulse ( self,
pOutput,
polarity,
delay,
width,
pPulseStartConfiguration = None )

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 mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
polarity[in] The polarity of the pulse to generate.

◆ definePulseSequence()

definePulseSequence ( self,
pOutput,
startLevel,
sequence,
pPulseStartConfiguration = None )

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 mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.pulseStartEvent and mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger.

See also
mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.undefineSignal
Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
startLevel[in] The start level of the generated signal.
  • 0: The signal will start with 'low'
  • 1: The signal will start with 'high'
    Parameters
    sequence[in] An 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.
    pPulseStartConfiguration[in] The 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 mvIMPACT.acquire.IOSubSystem.getPulseStartConfiguration, and mvIMPACT.acquire.IOSubSystem.getPulseStartConfigurationCount. If objects of these type are not supported, pass 0 or ignore this parameter. In that case the property mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.imageTrigger will define the start condition for the signal output.

◆ getValidPassThroughSignalCount()

getValidPassThroughSignalCount ( self,
pOutput )

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

Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.

◆ getValidPassThroughSignalString()

getValidPassThroughSignalString ( self,
pOutput,
index = 0 )

Receives a valid string representation of a signal 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 mvIMPACT.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 together with the function mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalString can be used to query a list of strings and a numerical representation for each signal that can be sent to this digital output.

Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
index[in] The index of the entry to read from the property. The find out the last valid value for this parameter call mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalCount

◆ getValidPassThroughSignalValue()

getValidPassThroughSignalValue ( self,
pOutput,
index = 0 )

Receives a valid signal 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 mvIMPACT.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 together with the function mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalString can be used to query a list of strings and a numerical representation for each signal that can be sent to this digital output.

Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
index[in] The index of the entry to read from the property. The find out the last valid value for this parameter call mvIMPACT.acquire.OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalCount

◆ getValidSignalsForPassThroughModes()

getValidSignalsForPassThroughModes ( self,
pOutput,
sequence )

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

Note
This function is much more efficient than calling OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalValue and OutputSignalGeneratorFrameGrabber.getValidPassThroughSignalString and therefore this function should be called whenever all entries are required.
Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.
sequence[out] A reference to a vector that will receive the list of allowed digital signals for this particular digital output pin.

◆ undefineSignal()

undefineSignal ( self,
pOutput )

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 mvIMPACT.acquire.DigitalOutput. This function removes the signal definition and hands back manual control of that digital output to the user.

Returns
Parameters
pOutput[in] A pointer to a mvIMPACT.acquire.DigitalOutput object obtained from an instance of the class mvIMPACT.acquire.IOSubSystemFrameGrabber for this device.

Property Documentation

◆ controlMode

controlMode = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_controlMode_get, doc=)
static

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 may be: mvIMPACT.acquire.docmSoftware, mvIMPACT.acquire.docmRTC.

When switching to mvIMPACT.acquire.docmRTC mode only one signal can be created currently.

Note
Not every frame grabber will offer the mvIMPACT.acquire.docmRTC mode. Check if the mode is available by reading the properties translation dictionary with the functions mvIMPACT.acquire.PropertyIDigitalOutputControlMode.getTranslationDictString and mvIMPACT.acquire.PropertyIDigitalOutputControlMode.getTranslationDictValue.

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 mvIMPACT.acquire.Component.isValid will return false). However then calls to mvIMPACT.acquire.IOSubSystem.getPulseStartConfigurationCount and mvIMPACT.acquire.IOSubSystem.getPulseStartConfiguration will succeed and the objects returned by mvIMPACT.acquire.IOSubSystem.getPulseStartConfiguration (mvIMPACT.acquire.PulseStartConfiguration) will provide a more sophisticated way to define the signal output behaviour of a device.

◆ imageTrigger

imageTrigger = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_imageTrigger_get, doc=)
static

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 may be: mvIMPACT.acquire.ditImmediately, mvIMPACT.acquire.ditAfterDigOutSignals.

◆ pulseStartEvent

pulseStartEvent = property(lib_mvIMPACT_acquire.OutputSignalGeneratorFrameGrabber_pulseStartEvent_get, doc=)
static

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static