[![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)
[![PyPI](https://img.shields.io/pypi/v/fluke5440b_async)](https://pypi.org/project/fluke5440b_async/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fluke5440b_async)
![PyPI - Status](https://img.shields.io/pypi/status/fluke5440b_async)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
# fluke5440b-async
Python3 asyncio Fluke 5440B driver. This library requires Python [asyncio](https://docs.python.org/3/library/asyncio.html) and asyncio library for the GPIB adapter.
The library is fully type-hinted.
> :warning: The following features are not supported (yet):
> - External calibration: I do not have the means to test this. If you want to help, open a ticket and we can get this done
> - Setting and retrieving DUUT tolerances and errors. I believe this is best done in software on the host computer and not done internally in the calibrator. If you really need that featuer open a ticket.
## Supported GPIB Hardware
| Device |Supported|Tested|Comments|
|-------------------------------------------------------------------------------------|--|--|--|
| [asyncio Prologix GPIB library](https://github.com/PatrickBaus/pyAsyncPrologixGpib) |:heavy_check_mark:|:heavy_check_mark:| |
| [asyncio linux-gpib wrapper](https://github.com/PatrickBaus/pyAsyncGpib) |:heavy_check_mark:|:heavy_check_mark:| |
Tested using Linux, but should work on Mac OSX, Windows or any OS with Python support.
## Documentation
The full documentation can be found on GitHub Pages:
[https://patrickbaus.github.io/pyAsyncFluke5440B/](https://patrickbaus.github.io/pyAsyncFluke5440B/). I use the
[Numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) style for documentation and
[Sphinx](https://www.sphinx-doc.org/en/master/index.html) for compiling it.
# Setup
To install the library in a virtual environment (always use venvs with every project):
```bash
python3 -m venv env # virtual environment, optional
source env/bin/activate # only if the virtual environment is used
pip install fluke5440b-async
```
All examples assume that a GPIB library is installed as well. Either run
```bash
pip install prologix-gpib-async # or alternatively
# pip install async-gpib
```
# Usage
> :warning: The calibrator does not like excessive serial polling. So, when using the Prologix adapter, one might see warnings like this:
> *Got error during waiting: ErrorCode.GPIB_HANDSHAKE_ERROR. If you are using a Prologix adapter, this can be safely ignored at this point.*
> These are harmless and can be ignored.
The library uses an asynchronous context manager to make cleanup easier. You can use either the
context manager syntax or invoke the calls manually:
```python
async with Fluke_5440B(connection=gpib_device) as fluke5440b:
# Add your code here
...
```
```python
try:
fluke5440b = Fluke_5440B(connection=gpib_device)
await fluke5440b.connect()
# your code
finally:
await fluke5440b.disconnect()
```
A simple example for setting the output voltage.
```python
from pyAsyncFluke5440B.Fluke_5440B import Fluke_5440B
from pyAsyncGpib.pyAsyncGpib.AsyncGpib import AsyncGpib
# This example will print voltage data to the console
async def main():
# The default GPIB address is 7.
async with Fluke_5440B(connection=AsyncGpib(name=0, pad=7)) as fluke5440b:
# No need to explicitely bring up the GPIB connection. This will be done by the instrument.
await fluke5440b.set_output(10.0)
await fluke5440b.set_output_enabled(True)
try:
asyncio.run(main(), debug=True)
except KeyboardInterrupt:
# The loop will be canceled on a KeyboardInterrupt by the run() method, we just want to suppress the exception
pass
```
See [examples/](examples/) for more working examples.
## Versioning
I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).
## Authors
* **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)
## License
This project is licensed under the GPL v3 license - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": null,
"name": "fluke5440b-async",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "Fluke 5440B, GPIB, API",
"author": null,
"author_email": "Patrick Baus <patrick.baus@physik.tu-darmstadt.de>",
"download_url": "https://files.pythonhosted.org/packages/55/a3/d5c74d4df81550b614d554bedb97e4e8d24ee274fb9ff14a7b314c6650fe/fluke5440b_async-1.0.3.tar.gz",
"platform": null,
"description": "[![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)\n[![PyPI](https://img.shields.io/pypi/v/fluke5440b_async)](https://pypi.org/project/fluke5440b_async/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fluke5440b_async)\n![PyPI - Status](https://img.shields.io/pypi/status/fluke5440b_async)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)\n[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n# fluke5440b-async\nPython3 asyncio Fluke 5440B driver. This library requires Python [asyncio](https://docs.python.org/3/library/asyncio.html) and asyncio library for the GPIB adapter.\n\nThe library is fully type-hinted.\n\n> :warning: The following features are not supported (yet):\n> - External calibration: I do not have the means to test this. If you want to help, open a ticket and we can get this done\n> - Setting and retrieving DUUT tolerances and errors. I believe this is best done in software on the host computer and not done internally in the calibrator. If you really need that featuer open a ticket.\n\n## Supported GPIB Hardware\n| Device |Supported|Tested|Comments|\n|-------------------------------------------------------------------------------------|--|--|--|\n| [asyncio Prologix GPIB library](https://github.com/PatrickBaus/pyAsyncPrologixGpib) |:heavy_check_mark:|:heavy_check_mark:| |\n| [asyncio linux-gpib wrapper](https://github.com/PatrickBaus/pyAsyncGpib) |:heavy_check_mark:|:heavy_check_mark:| |\n\nTested using Linux, but should work on Mac OSX, Windows or any OS with Python support.\n\n## Documentation\nThe full documentation can be found on GitHub Pages:\n[https://patrickbaus.github.io/pyAsyncFluke5440B/](https://patrickbaus.github.io/pyAsyncFluke5440B/). I use the\n[Numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) style for documentation and\n[Sphinx](https://www.sphinx-doc.org/en/master/index.html) for compiling it.\n\n# Setup\nTo install the library in a virtual environment (always use venvs with every project):\n```bash\npython3 -m venv env # virtual environment, optional\nsource env/bin/activate # only if the virtual environment is used\npip install fluke5440b-async\n```\n\nAll examples assume that a GPIB library is installed as well. Either run\n```bash\npip install prologix-gpib-async # or alternatively\n# pip install async-gpib\n```\n\n# Usage\n> :warning: The calibrator does not like excessive serial polling. So, when using the Prologix adapter, one might see warnings like this:\n> *Got error during waiting: ErrorCode.GPIB_HANDSHAKE_ERROR. If you are using a Prologix adapter, this can be safely ignored at this point.*\n> These are harmless and can be ignored.\n\nThe library uses an asynchronous context manager to make cleanup easier. You can use either the\ncontext manager syntax or invoke the calls manually:\n\n```python\nasync with Fluke_5440B(connection=gpib_device) as fluke5440b:\n # Add your code here\n ...\n```\n\n```python\ntry:\n fluke5440b = Fluke_5440B(connection=gpib_device)\n await fluke5440b.connect()\n # your code\nfinally:\n await fluke5440b.disconnect()\n```\n\n\nA simple example for setting the output voltage.\n```python\nfrom pyAsyncFluke5440B.Fluke_5440B import Fluke_5440B\n\nfrom pyAsyncGpib.pyAsyncGpib.AsyncGpib import AsyncGpib\n\n\n# This example will print voltage data to the console\nasync def main():\n # The default GPIB address is 7.\n async with Fluke_5440B(connection=AsyncGpib(name=0, pad=7)) as fluke5440b:\n # No need to explicitely bring up the GPIB connection. This will be done by the instrument.\n await fluke5440b.set_output(10.0)\n await fluke5440b.set_output_enabled(True)\n\n\ntry:\n asyncio.run(main(), debug=True)\nexcept KeyboardInterrupt:\n # The loop will be canceled on a KeyboardInterrupt by the run() method, we just want to suppress the exception\n pass\n```\n\nSee [examples/](examples/) for more working examples.\n\n## Versioning\n\nI use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).\n\n## Authors\n\n* **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)\n\n## License\n\n\nThis project is licensed under the GPL v3 license - see the [LICENSE](LICENSE) file for details\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 (GPLv3)",
"summary": "A Python asyncio library for the Fluke 5440B voltage calibrator.",
"version": "1.0.3",
"project_urls": {
"Bug Tracker": "https://github.com/PatrickBaus/pyAsyncFluke5440B/issues",
"Download": "https://github.com/PatrickBaus/pyAsyncFluke5440B/releases",
"Homepage": "https://github.com/PatrickBaus/pyAsyncFluke5440B"
},
"split_keywords": [
"fluke 5440b",
" gpib",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "48fa5225e55758d743d9a1dba0b15f41fc122462e5d2918cf6b45d7c8a273a91",
"md5": "8fba6a12510a135bbf1d4e3583becc19",
"sha256": "59127791381b7ae1b275a3c6c066a85f412291d27cd28fb335a170eebb166608"
},
"downloads": -1,
"filename": "fluke5440b_async-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8fba6a12510a135bbf1d4e3583becc19",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 28721,
"upload_time": "2024-06-22T12:58:16",
"upload_time_iso_8601": "2024-06-22T12:58:16.393909Z",
"url": "https://files.pythonhosted.org/packages/48/fa/5225e55758d743d9a1dba0b15f41fc122462e5d2918cf6b45d7c8a273a91/fluke5440b_async-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "55a3d5c74d4df81550b614d554bedb97e4e8d24ee274fb9ff14a7b314c6650fe",
"md5": "1d1c0ff567e328584676cfa4920f8a1c",
"sha256": "5ba388ca2ceab6156fe7a792a9b8dc3a2ac4f807a4c0536168ba568ffcfed49a"
},
"downloads": -1,
"filename": "fluke5440b_async-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "1d1c0ff567e328584676cfa4920f8a1c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 29930,
"upload_time": "2024-06-22T12:58:18",
"upload_time_iso_8601": "2024-06-22T12:58:18.192281Z",
"url": "https://files.pythonhosted.org/packages/55/a3/d5c74d4df81550b614d554bedb97e4e8d24ee274fb9ff14a7b314c6650fe/fluke5440b_async-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-22 12:58:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PatrickBaus",
"github_project": "pyAsyncFluke5440B",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fluke5440b-async"
}