Skip to main content

Control ITECH laboratory equipment using a serial port

Project description

ITECH serial library for Python

Control ITECH test equipment using a proprietary 26-byte UART protocol.

You'll need to make your own 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itech_serial-0.1.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

itech_serial-0.1.4-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file itech_serial-0.1.4.tar.gz.

File metadata

  • Download URL: itech_serial-0.1.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for itech_serial-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4628865a8a2106151192cc351f61eea00d34b314576fd993360d602bdc057b48
MD5 de5482b852f5dc98fc10ac44c63a8589
BLAKE2b-256 d4443d34b7a432a6029d2460245b9aabd45e3b3de8508fa70e6149871fe415e8

See more details on using hashes here.

File details

Details for the file itech_serial-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for itech_serial-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7f062952676e54081642dacfb129dab1b8bfdbae97a19c5dc1232a4ca15790c2
MD5 84da5c77a0150d6fbd74452452db6b63
BLAKE2b-256 8a1e731955354db95e2d7d0b67583776b97f5de7b98459c2e84f7b5e95c79ce3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page