Difference: ControlPowerSupply (6 vs. 7)

Revision 72016-10-28 - TomErikHaugen

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

Controlling the Power Supplies Through the Computer

Line: 20 to 20
 
    • 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
Deleted:
<
<
-- 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 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).

Line: 36 to 33
 If you prefer to avoid the Console.py interface then you can do this:
  1. run python
  2. import SerialCommands as ser
Changed:
<
<
  1. run whatever command you want, for example to power on enter ser.Power_On()
>
>
  1. open the serial port (s = ser.Open_Serial('/dev/ttyUSB0', 115200))
  2. run whatever command you want, for example to power on enter ser.Power_On(s,1.5,4.2). Almost all of the commands take the serial port as an argument
-- Tom-Erik Haugen - 2016-10-21
 

Comments

Line: 48 to 47
 
META FILEATTACHMENT attachment="SerialCom.cpp" attr="" comment="" date="1477090488" name="SerialCom.cpp" path="SerialCom.cpp" size="1871" user="TomErikHaugen" version="1"
META FILEATTACHMENT attachment="SerialCom.h" attr="" comment="" date="1477090488" name="SerialCom.h" path="SerialCom.h" size="703" user="TomErikHaugen" version="1"
META FILEATTACHMENT attachment="start_mon.cxx" attr="" comment="" date="1477090488" name="start_mon.cxx" path="start_mon.cxx" size="3780" user="TomErikHaugen" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="Console.py.txt" attr="" comment="" date="1477687002" name="Console.py.txt" path="Console.py.txt" size="9070" user="TomErikHaugen" version="1"
META FILEATTACHMENT attachment="SerialCommands.py.txt" attr="" comment="" date="1477687002" name="SerialCommands.py.txt" path="SerialCommands.py.txt" size="7844" user="TomErikHaugen" version="1"
>
>
META FILEATTACHMENT attachment="Console.py.txt" attr="" comment="" date="1477695264" name="Console.py.txt" path="Console.py.txt" size="9244" user="TomErikHaugen" version="2"
META FILEATTACHMENT attachment="SerialCommands.py.txt" attr="" comment="" date="1477695282" name="SerialCommands.py.txt" path="SerialCommands.py.txt" size="8637" user="TomErikHaugen" version="2"
 
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