dwfpy.digital_output.DigitalOutputChannel
- class DigitalOutputChannel(module, channel)[source]
Bases:
objectRepresents a Digital Output channel.
Methods
Sets the low and high counter values.
Sets the custom data bits.
Sets the initial state and the initial counter.
Sets up the channel.
Sets up the channel as a clock output.
Sets up the channel as a constant output.
Sets up the channel with a custom output.
Sets up the channel as a pulse output.
Sets up the channel as a random output.
Attributes
Gets the maximum supported clock counter value.
Gets the minimum supported clock counter value.
Gets the device.
Gets or sets the divider value.
Gets the maximum supported clock divider value.
Gets the minimum supported clock divider value.
Enables or disables the channel.
Gets the high counter value.
Gets or sets the idle output state.
Gets the supported idle output states.
Gets the channel index.
Gets the initial counter value.
Gets or sets the initial divider value.
Gets the initial state.
Gets or sets the channel label.
Gets the low counter value.
Gets the maximum number of bits.
Gets the Digital Output module.
Gets or sets the output mode.
Gets the supported output modes.
Gets or sets the output type.
Gets the supported output types.
Gets or sets the repetition value.
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 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
- 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
- property output_mode: DigitalOutputMode
Gets or sets the output mode.
- Return type
- 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
- 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_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