Impact Acquire SDK Python
IOSubSystemCommon Class Reference

A base class to handle the digital inputs and outputs for devices (Device specific interface layout only). More...

Inheritance diagram for IOSubSystemCommon:
[legend]

Public Member Functions

 __init__ (self, pDev)
 Constructs a new mvIMPACT.acquire.IOSubSystemCommon object.
 
 writeOutputRegister (self, *args)
 Alters the state of the digital output register.
 

Properties

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

Detailed Description

A base class to handle the digital inputs and outputs for devices (Device specific interface layout only).

This class provides a convenient basic access to the digital inputs and outputs of almost every device supported by this interface.

Note
This class may NOT be used for mvBlueFOX devices.
The number of digital inputs and outputs available will vary significantly from device to device. Some devices might not even have digital inputs and/or digital outputs. Therefore it's crucial to check for available pins before using them. The corresponding functions to do that can be found in the base class mvIMPACT.acquire.IOSubSystem.
def listIOPins(pDev):
io = acquire.IOSubSystemCommon(pDev)
iCnt = io.getInputCount()
print("available digital inputs: " + str(iCnt))
for d in range(iCnt):
print(io.getInput(d).getDescription())
oCnt = io.getOutputCount()
print("available digital outputs: " + str(oCnt))
for e in range(oCnt):
pOutput = io.getOutput(e)
print("setting " + pOutput.getDescription() + " to high")
# set this output to logic '1'
pOutput.state = True
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,
pDev )

Constructs a new mvIMPACT.acquire.IOSubSystemCommon object.

Parameters
pDev[in] A pointer to a mvIMPACT.acquire.Device object obtained from a mvIMPACT.acquire.DeviceManager object.

Reimplemented from IOSubSystem.

Reimplemented in IOSubSystemFrameGrabber.

Member Function Documentation

◆ writeOutputRegister()

writeOutputRegister ( self,
* args )

Alters the state of the digital output register.

This function can be used to alter the state of certain (or all) digital outputs with a single function call. By working with the parameter mask certain bits can remain unaffected.

EXAMPLE

If the previous state of a digital output register was '5', which means that outputs 0 and 2 are set to high a call to mvIMPACT.acquire.IOSubSystem.writeOutputRegister with value set to 2 and mask set to 3 would result in '6' as the new value for the output register. Pin 2 will remain unaffected, as mask states just to modify pin 0 and 1 ( 3 = 00000011 binary ).

Parameters
value[in] The value to be applied to the output register
mask[in] The mask to specify which pins to modify. A bit set to '1' in this parameter means that the state of this output has to adopt its style according to the value in value.

Reimplemented from IOSubSystem.

Property Documentation

◆ thisown

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