Name | itech_serial JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | Control ITECH laboratory equipment using a serial port |
upload_time | 2024-07-26 20:21:49 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
itech
it6800
it6811
it8500
it8511
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ITECH serial library for Python
Control ITECH test equipment using a proprietary 26-byte UART protocol.
You'll need to [make your own adapter](https://github.com/blinkinlabs/itech_usb_serial#itech-usb-to-serial-adapter)
to connect your test equipment to your computer, or presumably buy an
isolated one.
Note: If your test equipment has a USB port, use that instead! The -A and -B
variants of some ITECH product lines have an optional USB port, which is
is supported by standard USBTMC libraries such as pyvisa. This library
is intended for devices that only implement a proprietary control protocol
over a TTL serial port.
## Usage
First, install the library from pypi:
pip install itech_serial
Then, assuming you have an IT8511 load, and it is connected to your computer
using a USB-to-serial converter that was identified as /dev/ttyUSB0, you can
open a connection to it like this:
from itech_serial import IT8500
load = IT8500('/dev/ttyUSB0')
During connection, the library will check that the device identify matches a
known string. If you have different equipment that speaks the same protocol
(such as a BK Precision load), please create an issue on GitHub with the
device details and the reported string.
Once the connection is made, you first need to enable remote control to allow
the device to be controlled over serial:
load.control_set_remote()
Next, you can set the device to (for example) a 0.5A constant current load:
load.mode_set('cc')
load.constant_current_set(0.5)
load.enable()
You can then read back the measured voltage and current that the load sees:
print(load.measure)
When you are done, be sure to turn the load off, and (optionally) set the
device control back to local to allow the front panel buttons to work again:
load.disable()
load.control_set_local()
## Identifying a specific USB device
If you know what USB to serial converter is connected to your instrument, you
can use the find_usb() function to locate it by VID, PID, and optionally
serial number:
from itech_serial import find_usb
load = IT8500(find_usb(vid=0x10c4, pid=0xea60, serial_number='00F84E81')[0])
This is especially helpful for situations where you have multiple instruments
connected to a single computer, and need a reliable way to connect to the
correct one.
Raw data
{
"_id": null,
"home_page": null,
"name": "itech_serial",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "itech, it6800, it6811, it8500, it8511",
"author": null,
"author_email": "Matthew Mets <matt@blinkinlabs.com>",
"download_url": "https://files.pythonhosted.org/packages/d4/44/3d34b7a432a6029d2460245b9aabd45e3b3de8508fa70e6149871fe415e8/itech_serial-0.1.4.tar.gz",
"platform": null,
"description": "# ITECH serial library for Python\n\nControl ITECH test equipment using a proprietary 26-byte UART protocol.\n\nYou'll need to [make your own adapter](https://github.com/blinkinlabs/itech_usb_serial#itech-usb-to-serial-adapter)\nto connect your test equipment to your computer, or presumably buy an\nisolated one.\n\nNote: If your test equipment has a USB port, use that instead! The -A and -B\nvariants of some ITECH product lines have an optional USB port, which is\nis supported by standard USBTMC libraries such as pyvisa. This library\nis intended for devices that only implement a proprietary control protocol\nover a TTL serial port.\n\n## Usage\n\nFirst, install the library from pypi:\n\n pip install itech_serial\n\nThen, assuming you have an IT8511 load, and it is connected to your computer\nusing a USB-to-serial converter that was identified as /dev/ttyUSB0, you can\nopen a connection to it like this:\n\n from itech_serial import IT8500\n load = IT8500('/dev/ttyUSB0')\n\nDuring connection, the library will check that the device identify matches a\nknown string. If you have different equipment that speaks the same protocol\n(such as a BK Precision load), please create an issue on GitHub with the\ndevice details and the reported string.\n\nOnce the connection is made, you first need to enable remote control to allow\nthe device to be controlled over serial:\n\n load.control_set_remote()\n\nNext, you can set the device to (for example) a 0.5A constant current load:\n\n load.mode_set('cc')\n load.constant_current_set(0.5)\n load.enable()\n\nYou can then read back the measured voltage and current that the load sees:\n\n print(load.measure)\n\nWhen you are done, be sure to turn the load off, and (optionally) set the\ndevice control back to local to allow the front panel buttons to work again:\n\n load.disable()\n load.control_set_local()\n\n## Identifying a specific USB device\n\nIf you know what USB to serial converter is connected to your instrument, you\ncan use the find_usb() function to locate it by VID, PID, and optionally\nserial number:\n\n from itech_serial import find_usb\n load = IT8500(find_usb(vid=0x10c4, pid=0xea60, serial_number='00F84E81')[0])\n\nThis is especially helpful for situations where you have multiple instruments\nconnected to a single computer, and need a reliable way to connect to the\ncorrect one.\n",
"bugtrack_url": null,
"license": null,
"summary": "Control ITECH laboratory equipment using a serial port",
"version": "0.1.4",
"project_urls": {
"Home": "https://github.com/blinkinlabs/itech_usb_serial"
},
"split_keywords": [
"itech",
" it6800",
" it6811",
" it8500",
" it8511"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8a1e731955354db95e2d7d0b67583776b97f5de7b98459c2e84f7b5e95c79ce3",
"md5": "84da5c77a0150d6fbd74452452db6b63",
"sha256": "7f062952676e54081642dacfb129dab1b8bfdbae97a19c5dc1232a4ca15790c2"
},
"downloads": -1,
"filename": "itech_serial-0.1.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "84da5c77a0150d6fbd74452452db6b63",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 12928,
"upload_time": "2024-07-26T20:21:48",
"upload_time_iso_8601": "2024-07-26T20:21:48.067941Z",
"url": "https://files.pythonhosted.org/packages/8a/1e/731955354db95e2d7d0b67583776b97f5de7b98459c2e84f7b5e95c79ce3/itech_serial-0.1.4-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d4443d34b7a432a6029d2460245b9aabd45e3b3de8508fa70e6149871fe415e8",
"md5": "de5482b852f5dc98fc10ac44c63a8589",
"sha256": "4628865a8a2106151192cc351f61eea00d34b314576fd993360d602bdc057b48"
},
"downloads": -1,
"filename": "itech_serial-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "de5482b852f5dc98fc10ac44c63a8589",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11056,
"upload_time": "2024-07-26T20:21:49",
"upload_time_iso_8601": "2024-07-26T20:21:49.343484Z",
"url": "https://files.pythonhosted.org/packages/d4/44/3d34b7a432a6029d2460245b9aabd45e3b3de8508fa70e6149871fe415e8/itech_serial-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 20:21:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "blinkinlabs",
"github_project": "itech_usb_serial",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "itech_serial"
}