DvG_Devices¶
Collection of I/O interfaces to communicate with microcontroller boards and laboratory devices, with optional PyQt/PySide multithread support and graphical user-interfaces.
Supports PyQt5, PyQt6, PySide2 and PySide6.
- Documentation: https://python-dvg-devices.readthedocs.io
- Github: https://github.com/Dennis-van-Gils/python-dvg-devices
- PyPI: https://pypi.org/project/dvg-devices
Installation:
pip install dvg-devices
To be able to run the several provided graphical user-interfaces, one has to
install an additional Qt-library. This can be either PyQt5, PyQt6, PySide2 or
PySide6. My personal recommendation is PyQt5 for Python <= 3.7,
and PySide6 for Python >= 3.8. Pick one:
pip install pyqt5
pip install pyqt6
pip install pyside2
pip install pyside6
If you wish to interface with an GPIB device you need to additionally install a Visa backend. See https://pyvisa.readthedocs.io/en/latest/introduction/getting.html
Supported devices¶
Arduino, ESP32, etc Microcontroller (serial/telnet) Aim TTi QL series II Power supply Bronkhorst EL-FLOW Mass flow controller Julabo circulator Recirculating bath Keysight 3497xA Digital multimeter Keysight N8700 Power supply Novanta IMS MDrive Stepper motor controller Parker Compax3 Servo controller Picotech PT104 Temperature logger PolyScience PD Recirculating bath ThermoFisher ThermoFlex Chiller Xylem Hydrovar HVL Variable speed pump controller
Highlights¶
- Class
SerialDevice()offering higher-level general I/O methods for a serial device, such asauto_connect(),write()andquery(). - Class
Arduino()which wraps aroundSerialDevice(). In combination with DvG_StreamCommand it allows for automatically connecting to your Arduino(-like) device and for easy serial I/O communication. - Class
TelnetServerDevice()offering higher-level general I/O methods for e.g. an ESP32 microcontroller. - Separate PyQt/PySide interfaces are provided for each of these devices, offering out-of-the-box multithreaded data acquisition and communication. It relies on DvG_QDeviceIO.
- Ready-to-run PyQt/PySide demos to directly control many of the supported devices with a graphical user-interface.
Examples¶
SerialDevice
from dvg_devices.BaseDevice import SerialDevice dev = SerialDevice() dev.connect_at_port(port="COM3") success, reply = dev.query("My query command")
TelnetServerDevice
from dvg_devices.BaseDevice import TelnetServerDevice dev = TelnetServerDevice() dev.connect(host="10.10.100.2", port=23) success, reply = dev.query("My query command")
API
- SerialDevice
SerialDevice- Methods
SerialDevice.set_ID_validation_query()SerialDevice.set_read_termination()SerialDevice.set_write_termination()SerialDevice.readline()SerialDevice.write()SerialDevice.query()SerialDevice.query_bytes()SerialDevice.query_ascii_values()SerialDevice.connect_at_port()SerialDevice.scan_ports()SerialDevice.auto_connect()SerialDevice.close()
- TelnetServerDevice
- Arduino
Other