-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Travis Collins <[email protected]>
- Loading branch information
Showing
7 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
powersupply: | ||
address: "TCPIP::192.168.10.31::inst0::INSTR" | ||
type: E36233A | ||
specan: | ||
address: "TCPIP::192.168.10.21::inst0::INSTR" | ||
type: N9040B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .sma100a import SMA100A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import logging | ||
|
||
import pyvisa | ||
from bench.common import Common | ||
|
||
class SMA100A(Common): | ||
"""Rohde & Schwarz SMA100A Signal Generator""" | ||
|
||
id = "SMA100A" | ||
"""Substring returned by IDN query to identify the device""" | ||
|
||
def _post_init_(self, address: str = None, use_config_file=False) -> None: | ||
pass | ||
|
||
@property | ||
def frequency(self): | ||
"""Get Frequency in Hz""" | ||
return float(self._instr.query('SOUR:FREQ:CW?')) | ||
|
||
@frequency.setter | ||
def frequency(self, value:float): | ||
"""Set Frequency in Hz""" | ||
self._instr.write(f'FREQ {value}') | ||
|
||
@property | ||
def level(self): | ||
"""Get output power level in dBm""" | ||
return float(self._instr.query('SOUR:POW:POW?')) | ||
|
||
@level.setter | ||
def level(self, value): | ||
"""Set output power level in dBm""" | ||
self._instr.write(f'POW {value}') | ||
|
||
@property | ||
def output_enable(self): | ||
"""Get output state""" | ||
return bool(self._instr.query('Output1:STATe?')) | ||
|
||
@output_enable.setter | ||
def output_enable(self, value:bool): | ||
"""Set output state (True == On, False == Off)""" | ||
value = "1" if value else "0" | ||
self._instr.write(f'Output1:STATe {value}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Dependencies | ||
|
||
## Keysight | ||
|
||
Its recommended you install the IO Libraries and Drivers to communicate with instruments. | ||
- [IO Libraries Suite Downloads](https://www.keysight.com/us/en/lib/software-detail/computer-software/io-libraries-suite-downloads-2175637.html) |