Controlling the Power Supplies Through the Computer

Both the Keithley (High Voltage source) and the Keysight (LV and LVDS power supply) can be controlled through the computer. They are connected to each other and the computer through a GPIB connector bus, then controlled from python scripts (temporarily in ~/Desktop/Haugen/New_Scripts). These are based heavily on the scripts from timon and allow for powering on, powering off, ramping high voltage, performing an IV scan, and recording the data. There is documentation for the connector here.

The communication happens through a serial port name /dev/ttyUSB0

Each device on the bus has to have a unique ID number between 0-30. I have set the Keysight supply to be ID 05, and the Keithley supply to be ID 10.

To change the ID:

  • Keysight:
    • press the I/O config button
    • Select HPIB / 488 (if the screen shows this press I/O Config again, if not scroll the adjust wheel till it does)
    • set the address
  • Keysight:
    • Press MENU
    • select COMMUNICATION
    • select GPIB
    • set the address
    • select GPIB protocol (SCPI)
While remote control through the GPIB connector is on, none of the buttons on either of the power supplies will be useable. Local control can be regained on either supply by pressing the "local" button

-- Tom-Erik Haugen - 2016-10-21

Code for Control

A whole bunch of code is written for interfacing with the power supplies. These have all been written in python and combined into one library called this is also currently in the directory ~/Desktop/Haugen/New_Scripts. This library is sort of a collection of raw code and it has a lot of different procedures that can be run. To actually run any of these scripts it is best to run which takes input from the user, interprets them and then runs the relevant script. This is still being written but is useful for interfacing with the power supplies and arduino, and it offers tab completion and help with the different commands (tells you what commands it accepts and the arguments that those commands take). This is still a work in progress though and is not fully implemented yet.

If you prefer to avoid the interface then you can do this:

  1. run python
  2. import SerialCommands as ser
  3. run whatever command you want, for example to power on enter ser.Power_On()


Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatEXT Makefile r1 manage 0.8 K 2016-10-21 - 22:54 TomErikHaugen  
C source code filecpp SerialCom.cpp r1 manage 1.8 K 2016-10-21 - 22:54 TomErikHaugen  
Header fileh SerialCom.h r1 manage 0.7 K 2016-10-21 - 22:54 TomErikHaugen  
Unknown file formatcxx power_off.cxx r1 manage 2.3 K 2016-10-21 - 22:54 TomErikHaugen  
Unknown file formatcxx power_on.cxx r1 manage 4.2 K 2016-10-21 - 22:54 TomErikHaugen  
Unknown file formatcxx start_mon.cxx r1 manage 3.7 K 2016-10-21 - 22:54 TomErikHaugen  
Edit | Attach | Watch | Print version | History: r11 | r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r5 - 2016-10-26 - TomErikHaugen
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback