Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Instrument standard from the [IVI foundation](http://www.ivifoundation.org/).
* DC Power Supplies (dcpwr):
* Agilent E3600A series
* Agilent 603xA series
* B&K Precision 9130B series
* Chroma 62000P series
* Rigol DP800 series
* Rigol DP1000 series
Expand Down
1 change: 1 addition & 0 deletions ivi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
# IVI drivers
"agilent",
"anritsu",
"bkprecision",
"dicon",
"chroma",
"colby",
Expand Down
1 change: 1 addition & 0 deletions ivi/agilent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
# Source measure units
from .agilentU2722A import agilentU2722A
from .agilentU2723A import agilentU2723A
from .agilentB2901A import agilentB2901A

# RF Power Meters
from .agilent436A import agilent436A
Expand Down
120 changes: 120 additions & 0 deletions ivi/agilent/agilentB2900A.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
"""

Python Interchangeable Virtual Instrument Library

Copyright (c) 2012-2020 Alex Forencich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

from .. import extra
from .. import ivi
from .. import scpi

class agilentB2900A(
scpi.dcpwr.Base,
scpi.dcpwr.Measurement):
"Agilent/Keysight generic IVI DC power supply driver"

def __init__(self, *args, **kwargs):
self.__dict__.setdefault('_instrument_id', '')

super().__init__(*args, **kwargs)

self._add_property('outputs[].mode',
self._get_output_mode,
self._set_output_mode,
None,
ivi.Doc("""
Select source output mode.

Values

* 'current' - Select current source mode.
* 'voltage' - Select voltage source mode.
"""))

self._output_count = 0

self._output_spec = []

self._identity_description = "Agilent/Keysight generic IVI DC power supply driver"
self._identity_identifier = ""
self._identity_revision = ""
self._identity_vendor = ""
self._identity_instrument_manufacturer = "Agilent"
self._identity_instrument_model = ""
self._identity_instrument_firmware_revision = ""
self._identity_specification_major_version = 1
self._identity_specification_minor_version = 0
self._identity_supported_instrument_models = []

self._init_outputs()

def _init_outputs(self):
try:
super()._init_outputs()
except AttributeError:
pass

self._output_mode = list()
for i in range(self._output_count):
self._output_mode.append('voltage')

def _set_output_current_limit(self, index, value):
super()._set_output_current_limit(index, value)
if not self._driver_operation_simulate:
self._write("sense:current:protection:level %.6f" % value)

def _set_output_voltage_level(self, index, value):
super()._set_output_voltage_level(index, value)
if not self._driver_operation_simulate:
self._write("sense:voltage:protection:level %.6f" % value)

def _get_output_mode(self, index):
index = ivi.get_index(self._output_name, index)
if not self._driver_operation_simulate and not self._get_cache_valid(index=index):
if self._output_count > 1:
self._write("instrument:nselect %d" % (index+1))
_value = self._ask("source:function:mode?")
if _value == 'VOLT':
self._output_mode[index] = 'voltage'
elif _value == 'CURR':
self._output_mode[index] = 'current'
else:
raise ivi.ValueNotSupportedException()
self._set_cache_valid(index=index)
return self._output_mode[index]

def _set_output_mode(self, index, value):
index = ivi.get_index(self._output_name, index)
if value == 'voltage':
_value = 'VOLT'
elif value == 'current':
_value = 'CURR'
else:
raise ivi.ValueNotSupportedException()
if not self._driver_operation_simulate:
if self._output_count > 1:
self._write("instrument:nselect %d" % (index+1))
self._write("source:function:mode %s" % _value)
self._output_mode[index] = value
self._set_cache_valid(index=index)

54 changes: 54 additions & 0 deletions ivi/agilent/agilentB2901A.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""

Python Interchangeable Virtual Instrument Library

Copyright (c) 2012-2020 Alex Forencich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

from .agilentB2900A import agilentB2900A

class agilentB2901A(agilentB2900A):
"Agilent/Keysight generic IVI DC power supply driver"

def __init__(self, *args, **kwargs):
self.__dict__.setdefault('_instrument_id', 'B2901A')

super().__init__(*args, **kwargs)

self._output_count = 1

self._output_spec = [
{
'range': {
'P': (200.0, 10.0)
},
'ovp_max': 210.0,
'ocp_max': 10.0,
'voltage_max': 200.0,
'current_max': 10.0
}
]

self._identity_description = "Keysight B2901A IVI DC power supply driver"
self._identity_supported_instrument_models = ['B2901A']

self._init_outputs()
30 changes: 30 additions & 0 deletions ivi/bkprecision/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""

Python Interchangeable Virtual Instrument Library

Copyright (c) 2013-2020 Alex Forencich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

# DC Power Supplies
# 9130B series
from .bkprecision9130B import bkprecision9130B
from .bkprecision9132B import bkprecision9132B
77 changes: 77 additions & 0 deletions ivi/bkprecision/bkprecision9130B.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
"""

Python Interchangeable Virtual Instrument Library

Copyright (c) 2013-2020 Alex Forencich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

from .bkprecisionBaseDCPwr import *

class bkprecision9130B(bkprecisionBaseDCPwr):
"B&K Precision series IVI DC power supply driver"

def __init__(self, *args, **kwargs):
self.__dict__.setdefault('_instrument_id', '')

super(bkprecision9130B, self).__init__(*args, **kwargs)

self._output_count = 3

self._output_spec = [
{
'range': {
'P30V': (30.0, 3.0)
},
'ovp_max': 30.0,
'ocp_max': 3.0,
'voltage_max': 30.0,
'current_max': 3.0
},
{
'range': {
'P30V': (30.0, 3.0)
},
'ovp_max': 30.0,
'ocp_max': 3.0,
'voltage_max': 30.0,
'current_max': 3.0
},
{
'range': {
'P5V': (5.0, 3.0)
},
'ovp_max': 5.0,
'ocp_max': 3.0,
'voltage_max': 5.0,
'current_max': 3.0
}
]

self._identity_description = "B&K Precision 9130B series IVI DC power supply driver"
self._identity_specification_major_version = 1
self._identity_specification_minor_version = 0
self._identity_supported_instrument_models = ['9130B', '9131B', '9132B']

self._init_outputs()



77 changes: 77 additions & 0 deletions ivi/bkprecision/bkprecision9132B.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
"""

Python Interchangeable Virtual Instrument Library

Copyright (c) 2013-2020 Alex Forencich

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

"""

from .bkprecision9130B import *

class bkprecision9132B(bkprecision9130B):
"B&K Precision series IVI DC power supply driver"

def __init__(self, *args, **kwargs):
self.__dict__.setdefault('_instrument_id', '')

super(bkprecision9132B, self).__init__(*args, **kwargs)

self._output_count = 3

self._output_spec = [
{
'range': {
'P30V': (60.0, 3.0)
},
'ovp_max': 61.0,
'ocp_max': 3.1,
'voltage_max': 60.0,
'current_max': 3.0
},
{
'range': {
'P30V': (60.0, 3.0)
},
'ovp_max': 61.0,
'ocp_max': 3.1,
'voltage_max': 60.0,
'current_max': 3.0
},
{
'range': {
'P5V': (5.0, 3.0)
},
'ovp_max': 5.0,
'ocp_max': 3.0,
'voltage_max': 5.0,
'current_max': 3.0
}
]

self._identity_description = "B&K Precision 9132B IVI DC power supply driver"
self._identity_specification_major_version = 1
self._identity_specification_minor_version = 0
self._identity_supported_instrument_models = ['9132B']

self._init_outputs()



Loading