Skip to content

"OSError: Could not read from flow controller" when setting setpoints on GP firmware #28

Description

@mfeingesicht

While communicating with an Alicat Mass Flow Controller I get the following error when I try to set the flow rate or pressure setpoint :
OSError: Could not read from flow controller. The complete error message from Python is :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Maxime\AppData\Local\Programs\Python\Python310\lib\site-packages\alicat\serial.py", line 274, in set_flow_rate
    self._set_setpoint(flow, retries)
  File "C:\Users\Maxime\AppData\Local\Programs\Python\Python310\lib\site-packages\alicat\serial.py", line 298, in _set_setpoint
    line = self._write_and_read(command, retries)
  File "C:\Users\Maxime\AppData\Local\Programs\Python\Python310\lib\site-packages\alicat\serial.py", line 189, in _write_and_read
    raise IOError("Could not read from flow controller.")
OSError: Could not read from flow controller.

I am able to use get() and set_gas() successfully but not set_flow_rate() or set_pressure(). This happens both with the 0.3.1 and 0.4.0 versions of the package.

The code I currently use is :

from alicat import FlowController
flow_controller = FlowController(port='COM9')
print(flow_controller.get())
flow_controller.set_gas('Air')
flow_controller.set_flow_rate(1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions