Difference: ControlPowerSupply (7 vs. 8)

Revision 82016-11-02 - TomErikHaugen

Line: 1 to 1
 
META TOPICPARENT name="UsingHighVoltage"

Controlling the Power Supplies Through the Computer

Line: 22 to 22
 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

Code for Control

Changed:
<
<
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 SerialCommands.py 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 Console.py which takes input from the user, interprets them and then runs the relevant script. It offers tab completion and help with the different commands (tells you what commands it accepts and the arguments that those commands take).
>
>
There is a large collection of scripts written for serial communication with the power supplies and the Arduino. These have all been written together in the python module SerialCommands.py.txt. There is another module of root scripts for quick data analysis that is still being implemented RootCommands.py. Lastly to make the interface with these sets of scripts much easier a third script has been written, Console.py.txt. This is the program that should be run and should be able to do all of the interfacing with the power supplies and Arduino that is necessary.
 
Changed:
<
<
To get help in Console.py enter help, to get help with a certain command enter [name of command] -h. Arguments for commands are entered with flags, each flag is seperated with a space then the corresponding value is after that flag with another space, for example
>
>
SerialCommands.py
 
Changed:
<
<
read_arduino -f Arduino_Data.dat_ would read the arduino data then save it to the file Arduino_Data.dat
>
>
This is the raw code that is a combination of the scripts for the power supplies and the scripts for the Arduino. All of the communication is done through serial ports, and most of the functions defined in this module take the serial port as an argument (this is so that it does not need to be reopened with every function).
 
Changed:
<
<
Some flags/arguments are optional. These are all listed under the specific help for that command
>
>
RootCommands.py

This is a small set of Root macros (written in python). Currently it only features functions that read the raw data files and converts the .dat files into .root files (with a TTree). Each of these files takes 2 inputs, the name of the .dat file, and what to name the new .root file.

Console.py

This is the more complicated function. It establishes the serial port for communication between the computer and the power supplies. It then queries the user for an input. To get help in Console.py enter help, to get help with a certain command enter [name of command] -h. Arguments for commands are entered with flags, each flag is separated with a space then the corresponding value is after that flag with another space, for example

read_arduino -f Arduino_Data.dat_ would read the Arduino data then save it to the file Arduino_Data.dat

Some flags/arguments are optional. These are all listed under the specific help for that command (the flag will be listed in brackets). for example the previous command could also be given as:

read_arduino

This would read the serial port for the Arduino and save the data to a default filename that is generated using the date.

  If you prefer to avoid the Console.py interface then you can do this:
  1. run python
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback