Skip to content

Commit

Permalink
add validators
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbarrier committed Aug 31, 2023
1 parent e22470a commit 43fd32b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions qcodes_contrib_drivers/drivers/RohdeSchwarz/SMB100A.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
https://www.rohde-schwarz.com/us/products/test-and-measurement/analog-signal-generators/rs-smb100a-microwave-signal-generator_63493-9379.html
Authors:
Julien Barrier, <[email protected]>
Future improvements:
add modulation functions
Julien Barrier <[email protected]>, 2023
"""
import logging
from typing import Any
Expand All @@ -25,8 +22,8 @@ class RohdeSchwarz_SMB100A(VisaInstrument):
status: beta-version
Args:
name (str): name for the instrument
address (str): Visa resource name to connect
name: name for the instrument
address: Visa resource name to connect
"""
def __init__(self, name: str, address: str, **kwargs: Any) -> None:
super().__init__(name, address, terminator='\n', **kwargs)
Expand Down Expand Up @@ -70,6 +67,7 @@ def __init__(self, name: str, address: str, **kwargs: Any) -> None:
get_cmd=':OUTP:STAT?',
set_cmd=':OUTP:STAT {}',
val_mapping=create_on_off_val_mapping(on_val='1', off_val='0'),
vals=vals.Ints(0, 1),
instrument=self
)

Expand All @@ -79,6 +77,7 @@ def __init__(self, name: str, address: str, **kwargs: Any) -> None:
get_cmd=':SOUR:PULM:STAT?',
set_cmd=':SOUR:PULM:STAT {}',
val_mapping=create_on_off_val_mapping(on_val='1', off_val='0'),
vals=vals.Ints(0, 1),
instrument=self
)

Expand Down

0 comments on commit 43fd32b

Please sign in to comment.