bendev - Python module to control Bentham SCPI devices

Basic Usage

bendev devices can be instantiated in context managers:

 

>>> import bendev
>>> with bendev.Device() as dev:
...     print(dev.query("*IDN?"))
"Bentham Instruments Ltd.","MSH150_RD_Direct","99999/9","1.2.53"

 

or normally:

 

>>> import bendev
>>> my_tls = bendev.Device()
>>> my_tls.write("SYSTEM:REMOTE")
>>> my_tls.query("MONO:GOTO? 555")
"1"

 

Devices can be opened by serial number, product string or manufacturer string:

 

>>> import bendev
>>> device_a = bendev.Device(serial_number="99999/9")
>>> device_b = bendev.Device(product_string="TLS120Xe")
>>> device_c = bendev.Device(manufacturer_string="Bentham")

 

For product_string and manufacturer_string, it is sufficient if the given substring is present in the device descriptor. The serial_number has to be exact. manufacturer_string defaults to "Bentham".

The package can also tell you what devices are connected:

 

>>> import bendev
>>> devs=bendev.list_connected_devices(verbose=True)
Connected Devices:
Device 18: Bentham Instruments, TLS120Xe, ...

 

For the precise commands to send, please refer to your product's communication manual.

Further usage information is built into the package and can be viewed in the python console using the command:

 

>>> import bendev
>>> help(bendev)

Share this:

The Bentham Standard

We’re with you from the first call to the final result

Call us on +44 118 975 1355 or email us