Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Calibration
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Calibration
Commits
090018e7
Commit
090018e7
authored
Apr 06, 2023
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Keysight E36313A Triple Output Programmable DC Power Supply
parent
c3553f31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
0 deletions
+116
-0
Keysight_E36313A.py
sw/lib/Keysight_E36313A.py
+116
-0
No files found.
sw/lib/Keysight_E36313A.py
0 → 100644
View file @
090018e7
#!/usr/bin/python
"""
Keysight E36313A Power Supply remote control
-------------------------------------------------------------------------------
Copyright (C) 2023 Peter Jansweijer, 'stolen' from Tjeerd Pinkert and freely
adjusted
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
-------------------------------------------------------------------------------
Usage:
Keysight_36313A.py <IP#>
Keysight_36313A.py -h | --help
IP IP number of the Waveform Generator
(for example: 192.168.32.242 which is its DevNet IP number)
Options:
-h --help Show this screen.
"""
import
os
import
sys
import
time
import
scipy
import
struct
import
datetime
import
pdb
#TJP: installed from web python-vxi Alex
import
vxi11
import
matplotlib.pyplot
as
plt
############################################################################
###########################################################################
def
e36313A_init
(
pwr_sup
):
"""
Initialize the Power Supply for Channel 2, 12V output
pws_sup -- instance of python-vxi connected to the Power Supply
"""
# Configure Channel 2 for 12V output with 1A current limit
pwr_sup
.
write
(
"APPLy CH2, 12, 1.0"
)
return
###########################################################################
def
e36313A_enable
(
pwr_sup
,
enable
):
"""
Yes/No enable the output of CHannel2
pws_sup -- instance of python-vxi connected to the Power Supply
enable -- Boolean
"""
if
(
enable
):
pwr_sup
.
write
(
"OUTPut ON ,(@2)"
)
else
:
pwr_sup
.
write
(
"OUTPut OFF ,(@2)"
)
return
############################################################################
##
## If run from commandline, we can test the library
##
"""
Usage:
Keysight_36313A.py <IP#>
Keysight_36313A.py -h | --help
IP IP number of the Waveform Generator
(for example: 192.168.32.137 which is its DevNet IP number)
Options:
-h --help Show this screen.
"""
if
__name__
==
"__main__"
:
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"ip"
,
help
=
"IP-Number of the Waveform Generator"
)
args
=
parser
.
parse_args
()
print
(
"Use E36313A IP address: "
+
str
(
args
.
ip
))
pwr_sup
=
vxi11
.
Instrument
(
args
.
ip
)
#pwr_sup = vxi11.Instrument("192.168.32.234")
print
(
pwr_sup
.
ask
(
"*IDN?"
))
# Returns 'Keysight Technologies,E36313A,MY59001539,2.0.8-1.0.4-1.12'
e36313A_init
(
pwr_sup
)
sys
.
exit
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment