alicat

Python driver and command line tool for Alicat mass flow controllers.

https://github.com/numat/alicat

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords

flow-control flow-controller python
Last synced: 6 months ago · JSON representation

Repository

Python driver and command line tool for Alicat mass flow controllers.

Basic Info
  • Host: GitHub
  • Owner: numat
  • License: gpl-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 167 KB
Statistics
  • Stars: 26
  • Watchers: 10
  • Forks: 35
  • Open Issues: 19
  • Releases: 0
Topics
flow-control flow-controller python
Created almost 11 years ago · Last pushed 7 months ago
Metadata Files
Readme License

README.md

alicat

TCP/Serial driver and command line tool for Alicat mass flow controllers.

If you are using Analyt-MTC flow controllers, go to this repository for more info.

Example Connections

| Type | Usage | | --- | --- | | The standard DB9 cable connected directly to a computer (unix: /dev/ttyS0, windows: COM1). | Good with older computers that still have the connector. | | The cable connected to a computer through a USB converter (unix: /dev/ttyUSB0, windows: COM1). | Good for newer computers and maker boards such as Raspberry Pis. | | Multiple cables connected to one port via a splitter and Alicat's addressing (A-Z). | Good when number of ports is limited. | | Cables routed through a TCP device server (192.168.1.100:23).

Installation

pip install alicat

Usage

Command Line

For basic tasks, this driver includes a command-line interface. Read the help for more.

alicat --help

Python

This uses Python ≥3.5's async/await syntax to asynchronously communicate with an Alicat. For example:

```python import asyncio from alicat import FlowController

async def get(): async with FlowController('ip-address:port') as flowcontroller: print(await flowcontroller.get())

asyncio.run(get()) ```

If the flow controller is communicating on the specified port, this should return a dictionary of the form:

python { 'setpoint': 0.0, # Setpoint, either mass flow rate or pressure 'control_point': 'flow', # Either 'flow' or 'pressure' 'gas': 'Air', # Can be any option in `flow_controller.gases` 'mass_flow': 0.0, # Mass flow (in units specified at time of purchase) 'pressure': 25.46, # Pressure (normally in psia) 'temperature': 23.62, # Temperature (normally in C) 'total_flow': 0.0, # Optional. If totalizer function purchased, will be included 'volumetric_flow': 0.0 # Volumetric flow (in units specified at time of purchase) }

On flow controllers, you can set the flow or pressure setpoints.

python await flow_controller.set_flow_rate(1.0) await flow_controller.set_pressure(20)

Gas Type

You can set the gas type by name or by index. For more on setting by index, see the gas table in your Alicat's manual.

python await flow_controller.set_gas('N2') await flow_controller.set_gas(8)

For firmware 5v and greater, you can create and set gas mixes. Mixes can contain up to five gases and are stored in gas indices 236-255.

python await flow_controller.create_mix(mix_no=236, name="Mix1", gases={'N2': 50, 'O2': 30, 'CO2': 20}) await flow_controller.set_gas(236) await flow_controller.delete_mix(236)

PID Parameters

For flow controllers, read and write PID loop settings for device tuning.

python await flow_controller.set_pid(p=4000, i=4000, d=10, loop_type='PD2I') print(await flow_controller.get_pid()) { 'loop_type': 'PD2I', 'P': '4000', 'I': '4000', 'D': '10', }

Other Features

Additional features include override commands to increase device functionality.

python await flow_controller.lock() # Lock the front display. await flow_controller.unlock() # Unlock the front display. await flow_controller.hold() # Hold the valve in its current position. await flow_controller.cancel_hold() # Cancel the valve hold. await flow_controller.tare_volumetric() # Tare volumetric flow. await flow_controller.tare_pressure() # Tare pressure. await flow_controller.reset_totalizer() # Reset totalizer, if totalizer functionality included.

Addressing

You can have multiple controllers on the same port by using Alicat's A-Z addresses and an RS-232 splitter.

```python flowcontroller1 = FlowController(address='A') flowcontroller2 = FlowController(address='B')

await flowcontroller1.setflowrate(1.0) await flowcontroller2.setflowrate(0.5)

await flowcontroller1.close() # /dev/ttyUSB0 is still open! await flowcontroller2.close() ```

Breaking changes

0.5.0 - Support only asyncio. The last version with synchronous code was 0.4.1. - Rename address/-a to unit/-u to match Alicat's documentation - Rename -u to -ul (for --unlock)

0.4.1 Remove TCP support. Use pip install alicat==0.3.1 if needed

Owner

  • Name: Numat Technologies
  • Login: numat
  • Kind: organization
  • Email: info@numat.com
  • Location: Chicago, IL

Re-imagining how the world stores, separates, and transports gases.

GitHub Events

Total
  • Issues event: 4
  • Watch event: 4
  • Delete event: 17
  • Issue comment event: 9
  • Push event: 24
  • Pull request event: 40
  • Fork event: 6
  • Create event: 17
Last Year
  • Issues event: 4
  • Watch event: 4
  • Delete event: 17
  • Issue comment event: 9
  • Push event: 24
  • Pull request event: 40
  • Fork event: 6
  • Create event: 17

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 199
  • Total Committers: 12
  • Avg Commits per committer: 16.583
  • Development Distribution Score (DDS): 0.638
Past Year
  • Commits: 108
  • Committers: 4
  • Avg Commits per committer: 27.0
  • Development Distribution Score (DDS): 0.417
Top Committers
Name Email Commits
Alex Ruddick a****k@n****m 72
Patrick Fuller p****r@g****m 56
renovate[bot] 2****] 42
Marina Palese m****e@a****l 11
mpalese m****e@a****m 6
Logan Gunthorpe l****g@d****m 4
Alex 5****2 3
lemmarathon l****n@p****m 1
joshMaybell 1****l 1
jamesjeffryes j****s@g****m 1
unidan u****n 1
Brad-Houska 4****a 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 40
  • Total pull requests: 100
  • Average time to close issues: 5 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 27
  • Total pull request authors: 14
  • Average comments per issue: 3.2
  • Average comments per pull request: 0.45
  • Merged pull requests: 91
  • Bot issues: 1
  • Bot pull requests: 78
Past Year
  • Issues: 2
  • Pull requests: 14
  • Average time to close issues: N/A
  • Average time to close pull requests: about 18 hours
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.21
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 11
Top Authors
Issue Authors
  • alexrudd2 (11)
  • patrickfuller (4)
  • pstanley-iss (1)
  • dom-insytesys (1)
  • lemmarathon (1)
  • jpsiegfried (1)
  • ericnallon (1)
  • Syaminaiman (1)
  • RonCarra (1)
  • picarro-jmoreno (1)
  • renovate[bot] (1)
  • brubaked (1)
  • icullen87 (1)
  • LilyGGGGGGG (1)
  • Fratorhe (1)
Pull Request Authors
  • renovate[bot] (110)
  • alexrudd2 (9)
  • avichalk (4)
  • treychaffin (2)
  • andygongexe (1)
  • JamesJeffryes (1)
  • cwayman-celestica (1)
  • acowsik (1)
  • lsgunth (1)
  • Gwen-noya (1)
  • lemmarathon (1)
  • Brad-Houska (1)
  • marinapalese (1)
Top Labels
Issue Labels
enhancement (4) bug (4) help wanted (1)
Pull Request Labels

Dependencies

setup.py pypi
  • pyserial *
.github/workflows/python-package.yml actions
  • actions/checkout b4ffde65f46336ab88eb53be808477a3936bae11 composite
  • actions/setup-python v4 composite