-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d08baf
commit 8b67281
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
from . import VISAInstrumentDriver | ||
|
||
class HP_83712B_CWG(VISAInstrumentDriver): | ||
''' | ||
HP 83712B Synthesized Continuous Wave Generator | ||
`Manual <https://www.keysight.com/us/en/product/83712B/synthesized-cw-generator-10-mhz-to-20-ghz.html>`_ | ||
''' | ||
|
||
def __init__(self, name='Continuous Wave Generator', address=None, **kwargs): | ||
VISAInstrumentDriver.__init__(self, name=name, address=address, **kwargs) | ||
|
||
def reset(self): | ||
self.write('*RST') | ||
|
||
def enable(self, newState=None): | ||
trueWords = [True, 1, '1', 'ON'] | ||
if newState is not None: | ||
if newState: | ||
self.write(f"OUTP ON") | ||
else: | ||
self.write(f"OUTP OFF") | ||
return self.query("OUTP?") in trueWords | ||
|
||
def frequency(self, newFreq=None): | ||
if newFreq is not None: | ||
self.write(f"FREQ {newFreq}") | ||
return(float(self.query("FREQ?"))) | ||
|
||
# Units of dBm | ||
def power(self, newPower=None): | ||
if newPower is not None: | ||
self.write(f"POW {newPower}") | ||
return(float(self.query("POW?"))) | ||
|
||
|
||
|