dwfpy.digital_io.DigitalIo

class DigitalIo(device)[source]

Bases: object

Digital IO module.

Methods

configure

Configures the instrument.

read_status

Reads the status and input values of the device.

reset

Resets and configures all instrument parameters to default values.

Attributes

channels

Gets a collection of Digital IO channels.

device

Gets the device.

input_state

Gets the input state of all pins as a bit-mask.

input_state_mask

Gets the pins that can be read from as a bit-mask.

output_enable

Enables or disables the specified pins as an output via a bit-mask.

output_enable_mask

Gets the pins that can be enabled as an output as a bit-mask.

output_state

Gets or sets the ouput state of all pins via a bit-mask.

output_state_mask

Gets the pins that can be written to as a bit-mask.

property channels: Tuple[DigitalIoChannel, ...]

Gets a collection of Digital IO channels.

Return type

Tuple[DigitalIoChannel, ...]

configure()[source]

Configures the instrument.

Return type

None

property device: Device

Gets the device.

Return type

Device

property input_state: int

Gets the input state of all pins as a bit-mask. Before calling this function, call the ‘read_status()’ function to read the Digital I/O states from the device.

Return type

int

property input_state_mask: int

Gets the pins that can be read from as a bit-mask.

Return type

int

property output_enable: int

Enables or disables the specified pins as an output via a bit-mask.

Return type

int

property output_enable_mask: int

Gets the pins that can be enabled as an output as a bit-mask.

Return type

int

property output_state: int

Gets or sets the ouput state of all pins via a bit-mask.

Return type

int

property output_state_mask: int

Gets the pins that can be written to as a bit-mask.

Return type

int

read_status()[source]

Reads the status and input values of the device.

Return type

None

reset()[source]

Resets and configures all instrument parameters to default values.

Return type

None