Thurlby Thandar Instruments Port Devices Driver
- We Thurlby Thandar Instruments Ltd Glebe Road Huntingdon Cambridgeshire PE29 7DR England declare that the CPX400D & CPX400DP 60V 20A Bench Power Supplies meet the intent of the EMC Directive 2004/108/EC and the Low Voltage Directive 2006/95/EC. Compliance was demonstrated by conformance to the following specifications which have been.
- The ARC interface is an extension of the industry standard RS-232 interface and is exclusive to Thurlby-Thandar instruments. It differs from conventional RS-232 in that it allows multiple instruments (up to 32) to be controlled using the normal RS-232 or RS-422/423 port of a PC.
Table of Contents
- PyVISA and the NI-VISA Library on Windows
- Python and Libusb with Linux
Finding USB Busses and Devices
- For Linux, use lsusb to list usb busses and devices connected to them. The command, lsusb -v will provide much information. Then use lsmod to list the kernel modules loaded. Note that LinuxCommand.Org explains shell commands.
Instrument USB Interfaces
Hello All I have a Thurlby Thandar Instruments PL330DP dual programmable power supply with a GPIB and serial connector on the rear of the unit. I have labview experience but this is the first GPIB device I have used. I need to drive the power supply using the serial cable from the PC.
- The USB test and measurement specifications provide the information necessary to communicate with compliant instruments. The GPIB over USB specifications are commonly used. Perusing these documents, one can readily understand why a dynamic library between Python and libusb or a substantial Python module would be so useful. Once you understand how to achieve communication over USB, then you can send commands and receive data according to the syntax for a particular instrument. An oscilloscope might conform to the Interchangeable Virtual Instruments - Scope Class specifications or the Standard Commands for Programmable Instruments (SCPI).
USB Linux Kernel Drivers
- To understand device drivers in Linux, buy or download for free the Linux Device Driver book. The USB chapter.
- Writing a Simple USB Driver by Greg Kroah-Hartman is illuminating.
- The USBTMC kernel driver is a character device driver for USBTMC compliant instruments and can be downloaded here. This is an attractive solution for low speed communication, but since there is no Python module you will have to use ctypes and read and write to the /dev/usbtmcX files directly.
PyVISA and the NI-VISA Library on Windows
- PyVisa can be used with XP to communicate with this oscilloscope via USB. As the documentation shows, this is accomplished using a LabView Visa compatible DLL.
- This Python program acquires a waveform and performs an FFT using the FFT function in the SciPy or numpy packages. The crude tds1012b.py module provides a few functions and classes for the scope. The programming manual for the tds1000/2000 series explains the command sequences.
Tektronix TDS1012B Digital Oscilloscope
PyVISA and the NI-VISA Library on Linux
- As this informative forum exchange shows, this approach can be problematic, at least for Tektronix oscilloscopes.
PySerial
- The PySerial module provide a simple means to achieve low speed communication using the serial.Serial class with /dev/tty0usb. As an example, channels.py and prologix_usb2gpib.py modules can be used to create a prologix usb to gpib converter object based on the serial.Serial communication channel object. The Prologix USB to GPIB converter uses the FTDI FT232BL USB-Serial (UART) IC to mimic a serial port connection to the GPIB bus, thus requiring the use of the pyserial module. Upon enumeration, the FT232 usb device is claimed by the kernel modules ftdi_sio and usbserial. You can see if these are loaded by running the lsmod command
Python and Libusb with Linux
- Libusb provides user-space access to usb devices, and the PyUSB module provides access through Python. The libusb api can be used in lieu of PyUSB documentation. PyLibUSB seems to be similar but uses ctypes. Together with the libusb api, this is an attractive choice.
- PyUSB can be used to communicate with the prologix device as well, although you have to know much about how the microcontroller uses the IO stream from the FTDI USB chip. The program prologix_pyusb.py finds and claims interface 0 of configuration 1. Note that interface needs to be released from the kernel module that initially claimed the device upon enumeration, presumably ftdi_sio. Also, create or modify /etc/udev/rules.d/11-prologix.rules with GROUP='users' and MODE='0666' so that all users can open the device.
Examples
Other Dynamic Libraries, Libusb and Python
- Libftdi uses libusb to talk to FTDI FT232BM/245BM, FT2232C/D and FT232/245R controllers. This is the open-source version of FTDIs libftd2xx. There is said to be a Python module.
- The LabJack family of USB analog and digital IO devices uses a custom dynamic library to communicate through libusb. Make sure the file /etc/udev/rules.d/10-labjack.rules has GROUP='users' and MODE='0666' so that all users can open the device. With the LabJack disconnected, reload the udev rules using 'udevadm control --reload-rules'. Also, download the source code for exodriver from labjack.com/support and follow the simple installation instructions. Under Linux, the library liblabjack.so (actually a link to the real library liblabjack.so.2.0.1) is in /usr/local/lib, an unusual location. If the 'import LabJackPython' line in a program results in the error 'could not load LabJackUSB driver', do the following. In /etc/ld.so.conf.d create the file labjack.conf. This file has only one line: /usr/local/lib . Then as root, run ldconfig. If in doubt, run 'ldconfig -v | grep labjack', and you should see a statement about liblabjack.so.
Thurlby Thandar Instruments Port Devices Driver Download
Other Dynamic Libraries And Libusb But No Python
- The I2C Tiny USB Project provides a USB interface to an I2C port using the Atmel attiny45.
- The USB Tiny ISP project provides a USB interface to an SPI port using the Atmel ATTINY2313-20PU.
If you run multiple USB devices that operate as virtual RS232 COM ports (the ubiquitous serial port standard) on Windows, you may have run into problems with conflicts between devices. An application may connect to the appropriate device when it’s the only one connected, only to “get confused” if there is another device sharing the PC. Happily, there are a few simple things you can try that will often resolve the problem.
9103s and Arduinos Playing Nice Together
A 9103 Picoammeter and Arduino
To most Windows applications, virtual COM ports (VCPs) all look the same. An application can open a port and and attempt to communicate with the connected device, but since there’s no fixed protocol – each device speaks its own “language”, any message sent can have undetermined effects if the device you’re communicating with is not the one your were expecting. Some applications simply connect to the first COM port available, other’s may provide a way to select the COM port your device is connected to – but you’re still responsible for figuring that out.
When manufacturers produce hardware for PCs they can apply for unique vendor ad product IDs for their device, and there are ways for applications to safely query these. But that only solves part of the problem. Many devices use third-party USB chips and drivers from companies like FTDI, so they share the same IDs. These devices look the same to a Windows client application, or to a person perusing the Device Manager in Control Panel.
RBD’s own 9103 Picoammeter utilizes FTDI’s popular USB VCP chips, as do many versions of the popular Arduino microcontroller boards, so these two sets of devices can be confused by client applications when used on the same PC. And s it turns out, they are often used together. Here are a few tricks for getting these device to play nice together.
Solution 1: Connect Each Device and Run Each Client in Order
Many applications require you to specify the port for the selected device. Others (like Actuel for the 9103) poll the COM ports in numerical order and check and connect to the first available. If these devices first check the vendor and product ID (like the 9103), they will at least skip ports that do not match. But they cannot distinguish between two devices using the same USB chip (like FTDI’s). Setting up a device connection / application order can solve this.
Thurlby Thandar Instruments Port Devices Drivers
In the case of a 9103 / Arduino conflict, remove all other devices, then plug in the 9103 and power it on. Next run the Actuel software. The software will find and take control of the 9103 port, and once assigned, you can safely plug in the next device and run its client.
Another order might make more sense for your particular application. Experiment with your configuration, and there are more than two devices, try getting two working first. Document the process and just make sure it’s followed anytime you reboot / power-on.
Solution 2: Change the COM Port Number for a Particular USB Port
You can force Windows to use a different COM port number than the one automatically assigned. This may help with applications that select the lowest numbered port.
For example, if the 9103 is connected to COM4 and another FTDI device is on COM3, the 9103 client software may incorrectly select the device on COM3. Setting the 9103 to COM2 may allow you to now connect the devices and run the client applications in any order, depending on how those other devices / applications behave. Some experimentation may be necessary.
With the 9103 connected and turned on, run Control Panel / Device Manager, and find the selection for “Ports (COM and LPT)”, click and you should see an entry for “USB Serial Port (COM4)” (the COM# may be different of course). Double-click for properties.
Now select the “Port Settings” tab, and click the “Advanced…” button. From this window you can select a new COM port assignment:
Thurlby Thandar Instruments Port Devices Driver Windows 7
Choosing a COM port for the 9103
Keep in mind that plugging a device into different USB port will change the COM port assigned to it.
Thurlby Thandar Instruments Port Devices Driver
More Info
Of course, you’ll want to ensure you have the latest drivers installed. For FTDI, they can be found here:
If you’re thinking of programming your own serial port application, here’s a quick tutorial at the API level. Many popular languages include code for VCP programming, and third-party libraries are available: