Impact Acquire SDK Python
IOSubSystemBlueFOX Class Reference

A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface layout only). More...

Inheritance diagram for IOSubSystemBlueFOX:
[legend]

Public Member Functions

 __init__ (self, pDev)
 Constructs a new mvIMPACT.acquire.IOSubSystemBlueFOX object.
 getInput (self, nr)
 Returns a const pointer to a mvIMPACT.acquire.DigitalInput object.
 getInputCount (self)
 Returns the number of mvIMPACT.acquire.DigitalInput s available for the mvIMPACT.acquire.Device associated with this object.
 getOutput (self, nr)
 Returns a pointer to a mvIMPACT.acquire.DigitalOutput object.
 getOutputCount (self)
 Returns the number of digital outputs available for the mvIMPACT.acquire.Device associated with this object.
 getPulseStartConfiguration (self, nr)
 Returns a pointer to a mvIMPACT.acquire.PulseStartConfiguration associated with this device.
 getPulseStartConfigurationCount (self)
 Returns the number of mvIMPACT.acquire.PulseStartConfiguration objects available for the mvIMPACT.acquire.Device associated with this object.
 getRTCtrProgram (self, nr)
 Returns a pointer to a mvIMPACT.acquire.RTCtrProgram associated with this device.
 getRTCtrProgramCount (self)
 Returns the number of mvIMPACT.acquire.RTCtrProgram s available for the mvIMPACT.acquire.Device associated with this object.
 readInputRegister (self)
 Returns the current state of the digital input register.
 readInputRegisterAtomic (self)
 Returns the current state of the digital input register.
 readOutputRegister (self)
 Returns the current state of the digital output register.
 readOutputRegisterAtomic (self)
 Returns the current state of the digital output register.
 writeOutputRegister (self, *args)
 Alters the state of the digital output register.
 writeOutputRegisterAtomic (self, *args)
 Alters the state of the digital output register.

Properties

 digitalInputThreshold = property(lib_mvIMPACT_acquire.IOSubSystemBlueFOX_digitalInputThreshold_get, doc=)
 An enumerated integer property defining the threshold for the digital inputs in Volt.
 inputCount = property (getInputCount, None, None, None)
 An integer property (read-only) which holds the number of mvIMPACT.acquire.DigitalInput s available for the mvIMPACT.acquire.Device associated with this object.
 outputCount = property (getOutputCount, None, None, None)
 An integer property (read-only) which holds the number of digital outputs available for the mvIMPACT.acquire.Device associated with this object.
 pulseStartConfigurationCount = property (getPulseStartConfigurationCount, None, None, None)
 An integer property (read-only) which holds the number of mvIMPACT.acquire.PulseStartConfiguration objects available for the mvIMPACT.acquire.Device associated with this object.
 RTCtrProgramCount = property (getRTCtrProgramCount, None, None, None)
 An integer property (read-only) which holds the number of mvIMPACT.acquire.RTCtrProgram s available for the mvIMPACT.acquire.Device associated with this object.
 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

Detailed Description

A class to handle the digital inputs and outputs for mvBlueFOX USB cameras(Device specific interface layout only).

def doSomeIOStuff(pBF):
bfIOs = acquire.IOSubSystemBlueFOX(pBF)
print("output 0 was " + str(bfIOs.getOutput(0).get()) + " and is now(after flipping) ")
bfIOs.getOutput(0).flip()
print(bfIOs.getOutput(0).get())
print("input threshold(" + bfIOs.digitalInputThreshold.readS() + ") set to " + str(acquire.bfdit10V))
if(bfIOs.digitalInputThreshold.isWriteable): # mvBlueFOX-M doesn't support modifying the input threshold
bfIOs.digitalInputThreshold.write(acquire.bfdit10V)
print("input threshold is now " + bfIOs.digitalInputThreshold.readS())
print("input 0 is " + str(bfIOs.getInput(0).get()))
time.sleep(5) # wait for 5 seconds
print("input 0 is " + str(bfIOs.getInput(0).get()))
time.sleep(5) # wait for 5 seconds
print("input 0 is " + str(bfIOs.getInput(0).get()))
# switch on digital out 0 and 1 (3 = 00000011 binary)
bfIOs.writeOutputRegister(3)
print("outputs: " + str(bfIOs.readOutputRegister()) + ", inputs: " + str(bfIOs.readInputRegister()))
# the next line will reset bit 0 only, resulting in output 1 to remain high
# as the mask parameter of '1' defines that only the LSB of the register will be
# affected by the first parameter of the function call
bfIOs.writeOutputRegister(0, 1)
print("outputs: " + str(bfIOs.readOutputRegister()) + ", inputs " + str(bfIOs.readInputRegister()))
Note
The mvBlueFOX defines an additional property mvIMPACT.acquire.CameraSettingsBlueFOX.flashMode. This might affect the state of the digital outputs as well.

If a digital output is defined to be 'logic 0' but the flash mode is switched on for the same digital output, the output will be high during the expose time of the camera sensor. If a digital output is defined to be 'logic 1' the output will be high all the time.

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.IOSubSystemBlueFOX object.

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

Member Function Documentation

◆ getInput()

getInput ( self,
nr )
inherited

Returns a const pointer to a mvIMPACT.acquire.DigitalInput object.

Note
The possibility to access the digital inputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mvIMPACT.acquire.IOSubSystem.readInputRegister.
Parameters
nr[in] The number of the digital input.

◆ getInputCount()

getInputCount ( self)
inherited

Returns the number of mvIMPACT.acquire.DigitalInput s available for the mvIMPACT.acquire.Device associated with this object.

◆ getOutput()

getOutput ( self,
nr )
inherited

Returns a pointer to a mvIMPACT.acquire.DigitalOutput object.

Note
The possibility to access the digital outputs of a device as single objects is just provided for convenience. The same thing can be achieved by calling the function mvIMPACT.acquire.IOSubSystem.writeOutputRegister with the corresponding bit mask.
Parameters
nr[in] The number of the digital output.

◆ getOutputCount()

getOutputCount ( self)
inherited

Returns the number of digital outputs available for the mvIMPACT.acquire.Device associated with this object.

◆ getPulseStartConfiguration()

getPulseStartConfiguration ( self,
nr )
inherited

Returns a pointer to a mvIMPACT.acquire.PulseStartConfiguration associated with this device.

Parameters
nr[in] The number of the pulse start configuration to return

◆ getPulseStartConfigurationCount()

getPulseStartConfigurationCount ( self)
inherited

Returns the number of mvIMPACT.acquire.PulseStartConfiguration objects available for the mvIMPACT.acquire.Device associated with this object.

◆ getRTCtrProgram()

getRTCtrProgram ( self,
nr )
inherited

Returns a pointer to a mvIMPACT.acquire.RTCtrProgram associated with this device.

Parameters
nr[in] The number of the real time controller program to return

◆ getRTCtrProgramCount()

getRTCtrProgramCount ( self)
inherited

Returns the number of mvIMPACT.acquire.RTCtrProgram s available for the mvIMPACT.acquire.Device associated with this object.

◆ readInputRegister()

readInputRegister ( self)
inherited

Returns the current state of the digital input register.

This function can be used to read all digital inputs as a single value. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital inputs 0 and 1 are currently have a voltage considered as logical '1' applied to them.

◆ readInputRegisterAtomic()

readInputRegisterAtomic ( self)

Returns the current state of the digital input register.

This function can be used to read all digital inputs as a single value at the same time. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital inputs 0 and 1 are currently have a voltage considered as logical '1' applied to them.

◆ readOutputRegister()

readOutputRegister ( self)
inherited

Returns the current state of the digital output register.

This function can be used to read all digital outputs as a single value. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital output 0 and 1 are currently set to high.

◆ readOutputRegisterAtomic()

readOutputRegisterAtomic ( self)

Returns the current state of the digital output register.

This function can be used to read all digital outputs as a single value at the same time. Each bit represents the status of one digital output pin.

EXAMPLE

A value of '3' returned by this function means that digital output 0 and 1 are currently set to high.

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

◆ writeOutputRegisterAtomic()

writeOutputRegisterAtomic ( 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 at the same time. 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.

Property Documentation

◆ digitalInputThreshold

digitalInputThreshold = property(lib_mvIMPACT_acquire.IOSubSystemBlueFOX_digitalInputThreshold_get, doc=)
static

An enumerated integer property defining the threshold for the digital inputs in Volt.

If a voltage applied to the digital input lies above the threshold this pin will be considered as 'logic 1' otherwise it will be considered as 'logic 0'.

Valid values for this property may be: mvIMPACT.acquire.bfdit2V, mvIMPACT.acquire.bfdit10V.

Note
This property is read-only for mvBlueFOX-M devices and will always be 2V.

◆ inputCount

inputCount = property (getInputCount, None, None, None)
staticinherited

An integer property (read-only) which holds the number of mvIMPACT.acquire.DigitalInput s available for the mvIMPACT.acquire.Device associated with this object.

See mvIMPACT.acquire.IOSubSystem.getInputCount()

◆ outputCount

outputCount = property (getOutputCount, None, None, None)
staticinherited

An integer property (read-only) which holds the number of digital outputs available for the mvIMPACT.acquire.Device associated with this object.

See mvIMPACT.acquire.IOSubSystem.getOutputCount()

◆ pulseStartConfigurationCount

pulseStartConfigurationCount = property (getPulseStartConfigurationCount, None, None, None)
staticinherited

An integer property (read-only) which holds the number of mvIMPACT.acquire.PulseStartConfiguration objects available for the mvIMPACT.acquire.Device associated with this object.

See mvIMPACT.acquire.IOSubSystem.getPulseStartConfigurationCount()

◆ RTCtrProgramCount

RTCtrProgramCount = property (getRTCtrProgramCount, None, None, None)
staticinherited

An integer property (read-only) which holds the number of mvIMPACT.acquire.RTCtrProgram s available for the mvIMPACT.acquire.Device associated with this object.

See mvIMPACT.acquire.IOSubSystem.getRTCtrProgramCount()

◆ thisown

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