-
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.
Merge pull request #49 from lightwave-lab/josh_staged
Added HP 83712B CWG, added filter controls to Keithley 2606B
- Loading branch information
Showing
2 changed files
with
58 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', "+1"] | ||
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?"))) | ||
|
||
|
||
|
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