dwfpy.digital_output.DigitalOutputChannel

class DigitalOutputChannel(module, channel)[source]

Bases: object

Represents a Digital Output channel.

Methods

set_counter

Sets the low and high counter values.

set_custom_bits

Sets the custom data bits.

set_initial_state_and_counter

Sets the initial state and the initial counter.

setup

Sets up the channel.

setup_clock

Sets up the channel as a clock output.

setup_constant

Sets up the channel as a constant output.

setup_custom

Sets up the channel with a custom output.

setup_pulse

Sets up the channel as a pulse output.

setup_random

Sets up the channel as a random output.

Attributes

counter_max

Gets the maximum supported clock counter value.

counter_min

Gets the minimum supported clock counter value.

device

Gets the device.

divider

Gets or sets the divider value.

divider_max

Gets the maximum supported clock divider value.

divider_min

Gets the minimum supported clock divider value.

enabled

Enables or disables the channel.

high_counter

Gets the high counter value.

idle_state

Gets or sets the idle output state.

idle_state_info

Gets the supported idle output states.

index

Gets the channel index.

initial_counter

Gets the initial counter value.

initial_divider

Gets or sets the initial divider value.

initial_state

Gets the initial state.

label

Gets or sets the channel label.

low_counter

Gets the low counter value.

max_bits

Gets the maximum number of bits.

module

Gets the Digital Output module.

output_mode

Gets or sets the output mode.

output_mode_info

Gets the supported output modes.

output_type

Gets or sets the output type.

output_type_info

Gets the supported output types.

repetition

Gets or sets the repetition value.

repetition_max

Gets the maximum repetition value.

property counter_max: int

Gets the maximum supported clock counter value.

Return type

int

property counter_min: int

Gets the minimum supported clock counter value.

Return type

int

property device: Device

Gets the device.

Return type

Device

property divider: int

Gets or sets the divider value.

Return type

int

property divider_max: int

Gets the maximum supported clock divider value.

Return type

int

property divider_min: int

Gets the minimum supported clock divider value.

Return type

int

property enabled: bool

Enables or disables the channel.

Return type

bool

property high_counter: int

Gets the high counter value.

Return type

int

property idle_state: DigitalOutputIdle

Gets or sets the idle output state.

Return type

DigitalOutputIdle

property idle_state_info: Tuple[DigitalOutputIdle, ...]

Gets the supported idle output states.

Return type

Tuple[DigitalOutputIdle, ...]

property index: int

Gets the channel index.

Return type

int

property initial_counter: int

Gets the initial counter value.

Return type

int

property initial_divider: int

Gets or sets the initial divider value.

Return type

int

property initial_state: bool

Gets the initial state.

Return type

bool

property label: str

Gets or sets the channel label.

Return type

str

property low_counter: int

Gets the low counter value.

Return type

int

property max_bits: int

Gets the maximum number of bits.

Return type

int

property module: DigitalOutput

Gets the Digital Output module.

Return type

DigitalOutput

property output_mode: DigitalOutputMode

Gets or sets the output mode.

Return type

DigitalOutputMode

property output_mode_info: Tuple[DigitalOutputMode, ...]

Gets the supported output modes.

Return type

Tuple[DigitalOutputMode, ...]

property output_type: DigitalOutputType

Gets or sets the output type.

Return type

DigitalOutputType

property output_type_info: Tuple[DigitalOutputType, ...]

Gets the supported output types.

Return type

Tuple[DigitalOutputType, ...]

property repetition: int

Gets or sets the repetition value.

Return type

int

property repetition_max: int

Gets the maximum repetition value.

Return type

int

set_counter(low, high)[source]

Sets the low and high counter values.

Return type

None

set_custom_bits(data)[source]

Sets the custom data bits.

Return type

None

set_initial_state_and_counter(state, counter)[source]

Sets the initial state and the initial counter.

Return type

None

setup(output_type=None, output_mode=None, divider=None, low_counter=None, high_counter=None, initial_divider=None, initial_counter=None, initial_state=None, idle_state=None, repetition=None, enabled=True, configure=False, start=False)[source]

Sets up the channel.

output_typestr, optional

The output type. Can be ‘pulse’, ‘custom’, ‘random’, ‘rom’, ‘state’, or ‘play’.

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

dividerint, optional

The divider value.

low_counterint, optional

The low counter value.

high_counterint, optional

The high counter value.

initial_dividerint, optional

The initial divider value.

initial_counterint, optional

The initial counter value.

initial_statestr or bool, optional

The initial output state. Can be ‘low’ or ‘high’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

repetitionint, optional

The repetition value. Set to 0 for unlimited repetitions.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None

setup_clock(frequency, duty_cycle=50, phase=0, delay=0, repetition=0, output_mode=None, idle_state=None, enabled=True, configure=False, start=False)[source]

Sets up the channel as a clock output.

frequencyfloat

The frequency in Hz.

duty_cyclefloat, optional

The duty-cycle in percent (default 50).

phasefloat, optional

The phase in degrees (default 0).

delayfloat, optional

The delay in seconds (default 0).

repetitionint, optional

The repetition count. Set to 0 for unlimited repetitions (default).

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None

setup_constant(value, output_mode=None, idle_state=None, enabled=True, configure=False, start=False)[source]

Sets up the channel as a constant output.

valuestr or bool

The constant output value. Can be ‘low’ or ‘high’.

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None

setup_custom(frequency, data, delay=0, repetition=0, output_mode=None, idle_state=None, enabled=True, configure=False, start=False)[source]

Sets up the channel with a custom output.

frequencyfloat

The bit rate in bits/second.

data[int]

An array containing the pattern of ones and zeros.

delayfloat, optional

The delay in seconds (default 0).

repetitionint, optional

The repetition count. Set to 0 for unlimited repetitions (default).

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None

setup_pulse(low, high, delay=0, repetition=0, output_mode=None, initial_state=None, idle_state=None, enabled=True, configure=False, start=False)[source]

Sets up the channel as a pulse output.

lowfloat

The duration of the low state in seconds.

highfloat

The duration of the high state in seconds.

delayfloat, optional

The initial delay in seconds (default 0).

repetitionint, optional

The repetition count. Set to 0 for unlimited repetitions (default).

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

initial_statestr or bool, optional

The initial output state. Can be ‘low’ or ‘high’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None

setup_random(frequency, delay=0, repetition=0, output_mode=None, idle_state=None, enabled=True, configure=False, start=False)[source]

Sets up the channel as a random output.

frequencyfloat

The bit rate in bits/second.

delayfloat, optional

The delay in seconds (default 0).

repetitionint, optional

The repetition count. Set to 0 for unlimited repetitions (default).

output_modestr, optional

The output mode. Can be ‘push-pull’, ‘open-drain’, ‘open-source’, or ‘three-state’.

idle_statestr or DigitalOutputIdle, optional

The output idle state. Can be ‘initial’, ‘low’, ‘high’, or ‘z’.

enabledbool, optional

If True, then the channel is enabled (default True).

configurebool, optional

If True, then the instrument is configured (default False).

startbool, optional

If True, then the instrument is started (default False).

Return type

None