Closed pstanley-iss closed 1 year ago
I had assumed that it had to do with the custom mix, but when I switched to a standard gas (Ar), I get the same error. Using Python 3.9, Alicat v0.4.0, MFC firmware 8v33.0-R23
Your description says "MFC", which I take to mean "Mass Flow Controller."
Is your code using the FlowMeter
class or FlowController
?
FlowController.
Set-up code:
from alicat import FlowController
mfc = '/dev/serial/by-id/usb-FTDI_USB-RS232_Cable_AU05812G-if00-port0'
flow_controller2 = FlowController(port=mfc)
OK. I cannot troubleshoot this on real hardware for a while.
However, what happens if you try changing line 126 of serial.py
?
from: {k: (v if k == self.keys[-1] else float(v))
to: {k: (v if k == self.keys[-1] or isinstance(v, str) else float(v))
That resolves the issue. All data looks correct.
OK, great! Please let me know if anything else is broken. I can prepare an updated release for PyPI soon. ~There are some other changes I need to do by early March anyway (upstream pymodbus
is breaking API in the upcoming 3.2.0
release)~
@pstanley-iss
I realized that we've ripped out the changes I needed to make in March, so I released this fix on PyPI for you: https://pypi.org/project/alicat/0.4.1/
I am trying to communicate with an MFC which is using a custom mix of gas. I set up the mix on the MFC, but when reading the device via serial, I get the following error: