-
Notifications
You must be signed in to change notification settings - Fork 30
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
Pull request for Alicat Python Library #15
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
16b8bbb
alicat/serial.py
02543a4
alicat/serial.py
73c7eb6
alicat/__init__.py
8e45ec1
alicat/serial.py
ba4824a
alicat/serial.py
205bae3
alicat/serial.py
e622141
Update README.md
marinapalese fe3006a
alicat/serial.py
600de27
Merge branch 'master' of https://github.com/marinapalese/alicat
a53d044
serial.py
c184e3c
added support for pressure
35cb352
added support for pressure devices
d4a4a0e
added pressure support
ce11b04
Merge branch 'numat:master' into master
marinapalese 590e69d
Updated install
marinapalese dcbf2e3
alicat/serial.py
marinapalese d486169
alicat/serial.py
marinapalese 3d791c1
alicat/serial.py
marinapalese 26adb66
alicat/__init__.py
marinapalese File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,13 +24,10 @@ Example Connections | |
|
||
Installation | ||
============ | ||
|
||
``` | ||
pip install alicat | ||
``` | ||
|
||
If you don't like pip, you can also install from source: | ||
|
||
``` | ||
git clone https://github.com/numat/alicat.git | ||
cd alicat | ||
|
@@ -80,10 +77,48 @@ You can also set the gas type and flow rate / pressure. | |
|
||
```python | ||
flow_controller.set_gas('N2') | ||
flow_controller.set_gas(8) # Optionally set a gas by its number; find the full gas table in the Alicat manual. | ||
flow_controller.set_flow_rate(1.0) | ||
flow_controller.set_pressure(20) | ||
``` | ||
|
||
For firmware 5v and greater, create and set gas mixes using COMPOSER software loaded into the device. Mixes can contain up to five gases, and are stored in gas indices 236-255. | ||
|
||
```python | ||
flow_controller.create_mix(mix_no=236, name="Mix1", gases={'N2': 50, 'O2': 30, 'CO2': 20}) | ||
flow_controller.set_gas(236) | ||
flow_controller.delete_mix(236) | ||
``` | ||
|
||
Additional features include override commands to increase device functionality. | ||
|
||
```python | ||
flow_controller.lock() # Lock the front display. | ||
flow_controller.unlock() # Unlock the front display. | ||
flow_controller.hold() # Hold the valve in its current position. | ||
flow_controller.cancel_hold() # Cancel the valve hold. | ||
flow_controller.tare_volumetric() # Tare volumetric hold. | ||
flow_controller.tare_pressure() # Tare pressure. | ||
flow_controller.reset_tot() # Reset totalizer, if totalizer functionality included. | ||
``` | ||
|
||
For flow controllers, read and write PID loop settings for device tuning. | ||
|
||
```python | ||
flow_controller.write_PID_looptype("PD2I") | ||
flow_controller.write_PID_P(4000) | ||
flow_controller.write_PID_D(10) | ||
flow_controller.write_PID_I(4000) | ||
print(flow_controller.read_PID()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also cool! I've been meaning to add PID tweaking to this code since day 1, so it's great to see it here. |
||
|
||
>>>{ | ||
'loop_type': 'PD2I', | ||
'P': '4000', | ||
'D': '10', | ||
'I': '4000' | ||
} | ||
``` | ||
|
||
### Alicat Addressing | ||
|
||
You can have multiple controllers on the same port by using Alicat's `A`-`D` addresses | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool!!