DewesoftX#
- class DewesoftX(dxd_name: str | None = None)[source]#
Bases:
DAQDriverBaseStreams live sync and async channels from a running DewesoftX instance over DCOM.
Attributes
Frozen snapshot of configured AI channels, keyed by alias.
Frozen snapshot of configured AO channels, keyed by alias.
Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays).
Frozen snapshot of configured DI channels, keyed by alias.
Frozen snapshot of configured DO channels, keyed by alias.
Frozen snapshot of configured relay channels, keyed by alias.
Methods
Drop the COM references; the configured channels survive, and the next open() rebinds them.
Close the relay (connect the circuit).
Deprecated: implement
configure_ai_voltage_channelinstead.Same binding as voltage: DewesoftX channels carry their own units, so the HAL type only labels the alias.
Require the requested rate to be DewesoftX's own: InstroDAQ derives the batch size and buffer from it.
Same binding as voltage; tc_type and CJC settings are ignored because DewesoftX owns sensor setup.
Bind an existing DewesoftX channel by name; DewesoftX owns all channel setup.
Deprecated: implement
configure_ao_voltage_channelinstead.Register an AO current channel.
Register an AO voltage channel.
Parse, program, and register a DI line channel.
Parse, program, and register a DI port channel.
Parse, program, and register a DO line channel.
Parse, program, and register a DO port channel.
Build a
RelayChannelforphysical_channel(e.g."3101"= slot 3 / channel 101).Block until
samples_per_channelnew samples arrive on every sync channel, then drain.The device's rate captured at configure time; None before configure_ai_sample_rate().
Attach to the running DewesoftX instance.
Open the relay (disconnect the circuit).
Drain every new sample from each bound channel.
Sample a single DI line.
Sample a multi-line DI port.
Listen for a session an operator starts, or with
start_storing_session=Truestart one here.Leave the running session alone, or with
stop_storing_session=Truestop it.Write
valueto AOchannel.Drive a single DO line.
Drive a multi-line DO port.
- close() None[source]#
Drop the COM references; the configured channels survive, and the next open() rebinds them.
- start(**kwargs) None[source]#
Listen for a session an operator starts, or with
start_storing_session=Truestart one here.
- stop(**kwargs) None[source]#
Leave the running session alone, or with
stop_storing_session=Truestop it.
- configure_ai_voltage_channel(
- channel: AnalogVoltageChannel,
Bind an existing DewesoftX channel by name; DewesoftX owns all channel setup.
- configure_ai_current_channel(
- channel: AnalogCurrentChannel,
Same binding as voltage: DewesoftX channels carry their own units, so the HAL type only labels the alias.
- configure_ai_thermocouple_channel(
- channel: AnalogThermocoupleChannel,
Same binding as voltage; tc_type and CJC settings are ignored because DewesoftX owns sensor setup.
- configure_ai_channel(
- channel: AnalogChannel,
Deprecated: implement
configure_ai_voltage_channelinstead.
- configure_ai_hw_timing(
- hw_timing_config: HWTimingConfig,
Require the requested rate to be DewesoftX’s own: InstroDAQ derives the batch size and buffer from it.
- get_actual_sample_rate() float | None[source]#
The device’s rate captured at configure time; None before configure_ai_sample_rate().
- fetch_analog() DewesoftXData[source]#
Block until
samples_per_channelnew samples arrive on every sync channel, then drain.
- write_digital_line(
- channel: DigitalChannel,
- data: int,
Drive a single DO line.
datais 0 or 1 (active-lowchannel.logicis handled in the driver).
- read_digital_line(
- channel: DigitalChannel,
Sample a single DI line. Returns 0 or 1 after applying
channel.logic.
- write_digital_port(
- channel: DigitalChannel,
- data: int,
Drive a multi-line DO port.
datais an N-bit integer; biticontrols linei.
- read_digital_port(
- channel: DigitalChannel,
Sample a multi-line DI port. Returns an N-bit integer; bit
ireflects linei.
- property ai_channels: Mapping[str, AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel]#
Frozen snapshot of configured AI channels, keyed by alias.
- property ai_hw_timing_config: HWTimingConfig | None#
- property ao_channels: Mapping[str, AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel]#
Frozen snapshot of configured AO channels, keyed by alias.
- property ao_hw_timing_config: HWTimingConfig | None#
- property channels: tuple[DAQChannel, ...]#
Frozen snapshot of all configured AI/AO/DI/DO channels (excludes relays).
- close_relay(channel: RelayChannel)#
Close the relay (connect the circuit). Override if the driver supports relays.
- configure_ao_channel(channel: AnalogChannel)#
Deprecated: implement
configure_ao_voltage_channelinstead.
- configure_ao_current_channel(
- channel: AnalogCurrentChannel,
Register an AO current channel. Override if the driver supports analog current output.
- configure_ao_voltage_channel(
- channel: AnalogVoltageChannel,
Register an AO voltage channel. Override if the driver supports analog voltage output.
- configure_di_port_channel(
- physical_channel: str,
- logic: Logic,
- port_width: DigitalPortWidth,
- logic_level: float | None = None,
- alias: str | None = None,
Parse, program, and register a DI port channel. Override if the driver supports port-mode digital input.
- configure_do_port_channel(
- physical_channel: str,
- logic: Logic,
- port_width: DigitalPortWidth,
- logic_level: float | None = None,
- alias: str | None = None,
Parse, program, and register a DO port channel. Override if the driver supports port-mode digital output.
- define_relay_channel( ) RelayChannel#
Build a
RelayChannelforphysical_channel(e.g."3101"= slot 3 / channel 101).Default implementation suits the Keysight 34980A’s slot/channel addressing; override if the driver needs different parsing. Overrides must also record the resulting channel on
self._relay_channels.
- property di_channels: Mapping[str, DigitalChannel]#
Frozen snapshot of configured DI channels, keyed by alias.
- property di_hw_timing_config: HWTimingConfig | None#
- property do_channels: Mapping[str, DigitalChannel]#
Frozen snapshot of configured DO channels, keyed by alias.
- property do_hw_timing_config: HWTimingConfig | None#
- open_relay(channel: RelayChannel)#
Open the relay (disconnect the circuit). Override if the driver supports relays.
- property relay_channels: Mapping[str, RelayChannel]#
Frozen snapshot of configured relay channels, keyed by alias.
- write_analog_value(
- channel: AnalogChannel | AnalogVoltageChannel | AnalogCurrentChannel | AnalogThermocoupleChannel,
- value: float,
Write
valueto AOchannel. Override if the driver supports analog output.