-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"OSError: Could not read control point" when calling flow_controller.get() and totalizer #101
Comments
Sorry to hear you're having problems, and thanks for the report. I can think of two possible causes:
You are correct, that's unrelated. Good job checking! |
Regarding (2), how is your serial setup? Do you have a physical serial port for In either case, are the serial settings (baud, parity, etc) set up correctly? I don't use Windows so I can't give you specific directions, but you should be able to change the settings in Device Manager. Something like the below images (from Google) You may want to troubleshoot with a serial terminal program. Personally, I use CoolTerm. Good luck! |
@alexrudd2
It doesn't seem to be the problem in serial |
Thank for for the further details. This is not a problem I've seen before, but I have a guess. Your code is setting up and tearing down the connection and the From the
StackOverflow has a longer explanation. Here's a proposed rewrite, based on the README example: async def get():
async with FlowController('COM11', 'B') as MFC2:
while True:
readings_2 = await MFC2.get())
i = i +1
print(i, readings_2)
asyncio.sleep(0.5)
asyncio.run(get()) Note Please let me know if this approach works for you. :) |
This driver can read Modbus TCP/IP directly. In other words, you shouldn't need virtual COM port driver. Once you are running, consider switching.
|
@alexrudd2 |
Hi, I was simply just logging the "mass_flow" by calling
It has been continously running for while, but alsway interupped by "OSError: Could not read control point."
It has happened for "reset_totalizer" function, too. Then I used
try:
asyncio.run(reset_totalizer(MFC2))
except OSError:
continue
to ignore it, though I am not sure it's the best way to do so. But it bypassed the error.
But now it occurs at "asyncio.run(get_mfc()" that I cannot bypass it.
I read another thread about the same OSError, but on GP firmware. My firmware is 10v09.0-R24.
The text was updated successfully, but these errors were encountered: