numat / mfc Goto Github PK
View Code? Open in Web Editor NEWPython driver and command line tool for MKS mass flow controllers.
License: GNU General Public License v2.0
Python driver and command line tool for MKS mass flow controllers.
License: GNU General Public License v2.0
/opt/homebrew/lib/python3.9/site-packages/mfc/driver.py:76: DeprecationWarning: read_timeout is deprecated, use timeout argument instead
self.session = aiohttp.ClientSession(read_timeout=self.timeout)
I'm trying to control my MFC using a Raspberry Pi4. I'm able to establish a connection with the MFC, .get( ) function is working, and so is .set_gas( ). But when I try to change the actual flowrate with .set( ), .open( ), or .close( ), I'm getting errors.
When I try to use .set( ) on the command line I get: Could not connect to device
When I try to use it in a script I get:
RuntimeError: Event loop is closed
Unclosed client session
Unclosed connector
Am I missing some sort of previous configuration on the MFC? I'm pretty lost here, so any help is welcome!
Thanks in advance!
Sorry, this isn't an issue, just a question. I was wondering how to switch between analog and digital control. On my 'plot' tab, there are analog & digital radio buttons. I have both analog control and the ethernet cable hooked up, and I switch between the 2 depending on how I want to control. Looking through your code, you talk about checking for analog control and switching to digital - is that what I need or something different? At some point, you mentioned "analog over digital", which doesn't sound like what I have - my analog comes through the 9 pin dsub.
Am I looking for something like this line?
await self._request('flow_setpoint_html', 'mfc.sp_adc_enable=0')
This library is overkill for the driver, especially because flow controllers don't need millisecond-level control (the mechanical response time on the controller is ~100ms).
By constructing the frames ourselves, we can remove the dependency and simplify the install process.
The current approach blocks, taking time away from the controller OS. After implementing #1, we should be able to integrate this driver with an async framework (e.g. tornado, asyncio, twisted).
@patrickfuller
.set(##.#) function is returning NoneType in python script? I can get it to work in command line but is there a way to use .set() within a python script? I am trying to set the flow controller to a particular setpoint but would like to do it in a script.
Thanks for your help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.