tools for communicating with Bronkhorst MFCs with the API for BM31
Reason this release was yanked:
bug fix in more recent version
Project description
repository for communicating with Bronkhorst MFCs remotely. Intended to be used with Pylatus or similar scripting environment. To install, clone the repository, then run 'pip install -e .' inside. This will create the bronkhorstServer program.
Usage: On the PC connected to the MFCs run bronkhorstServer in a terminal. Options are -c/--com input the com number as an integer (default 1, but check com ports in Device Manager), this will save next time you run so you shouldn't need to input it again. -p/--port port number, (default is value in the script, probably unnecessary to change). A positional argument which can be 'local' or 'remote' (default local). If remote the hostname will be displayed to connect from another computer, otherwise it will be 'localhost'. The port number will also be displayed.
e.g.
bronkhorstServer remote -c 7
To send commands import the MFCclient class and connect function, then run it's methods. Initial arguments are MFC address (will be an integer), the IP address (default localhost) and the port (default is that in the script).
E.g.
from bronkhorstControlbm31.bronkhorstClient import MFCclient
MFCclient(3,'<hostname or ip address>').pollAll()
(this gives information about all MFCs that are connected in a dataframe, the MFC address isn't used and can be anything in this case).
To change setpoint on MFC address 3:
MFCclient(3,'<hostname or ip address>').writeSetpoint(value)
A second server is available for accepting multiple clients:
bronkhorstMultiServer remote
then for the client use multi=True:
MFCclient(3,'<hostname or ip address>', multi=True).pollAll()
There are also 2 other functions in bronkhorstClient called plotLoop() and timePlot() which can be run in conjunction with the bronkhorstMultiServer. Takes host as a required aguement.
I should mention this article https://realpython.com/python-sockets/ and the associated repository which helped me to make this.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bronkhorstcontrolbm31-1.0.0.tar.gz
.
File metadata
- Download URL: bronkhorstcontrolbm31-1.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a64fc3a1b61489cb67acff7995afa43c83e155a116f903337b8929042e4fa153 |
|
MD5 | 995cf98f658063d8e3109a18e4b466e8 |
|
BLAKE2b-256 | 8040f48444702751d1a48095d66a9a35ede5189417e6438bae70858ed93935ee |
File details
Details for the file bronkhorstControlbm31-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: bronkhorstControlbm31-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c5ade5b788474550df33c60248957104176ff9a0d991297b0a41662431a042d |
|
MD5 | 3a36626995c5195989870f3b1e7555ca |
|
BLAKE2b-256 | c3a6ef6c74cb8a9906d4348194e8a2abc780528466bcd13a9b5ce436e5b91572 |