stoner_measurement.instruments.simulated.SimulatedMassFlowController¶
- class stoner_measurement.instruments.simulated.SimulatedMassFlowController(transport=None, protocol=None)[source]¶
Bases:
MassFlowControllerSimple simulated mass-flow controller.
- get_capabilities() MassFlowControllerCapabilities[source]¶
Return the static capability descriptor for this driver.
- identify() str[source]¶
Return the instrument identification string (
*IDN?).Sends the standard IEEE 488.2
*IDN?query and returns the response. Instruments that do not support*IDN?should override this method.- Returns:
Identification string returned by the instrument.
- Return type:
(str)
- Raises:
ConnectionError – If the transport is not open.
Examples
>>> from stoner_measurement.instruments.transport import NullTransport >>> from stoner_measurement.instruments.protocol import ScpiProtocol >>> from stoner_measurement.instruments.base_instrument import BaseInstrument >>> t = NullTransport(responses=[b"ACME,Model1,SN001,v1.0\n"]) >>> instr = BaseInstrument(t, ScpiProtocol()) >>> instr.connect() >>> instr.identify() 'ACME,Model1,SN001,v1.0' >>> instr.disconnect()
- read_range(channel: int = 1) float[source]¶
Return the configured full-scale/range value for channel.
- read_unit(channel: int = 1) int | str[source]¶
Return the configured engineering-unit code for channel.