Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for DSInstruments attenuator. Also added trigger freque… #502

Merged
merged 1 commit into from
Mar 1, 2024
Merged
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
37 changes: 36 additions & 1 deletion src/auspex/instruments/dsinstruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Drivers for controling the DS Instruments puresine rf signal generators

__all__ = ['DSInstrumentsSG12000', 'DSInstrumentsSG12000Pro']
__all__ = ['DSInstrumentsSG12000', 'DSInstrumentsSG12000Pro','DAT64H']

from auspex.log import logger
from .instrument import SCPIInstrument, MetaInstrument, StringCommand, FloatCommand, IntCommand, RampCommand, BoolCommand
Expand Down Expand Up @@ -141,3 +141,38 @@ def detect_ext_ref(self):

def temp(self): #Is this working?
return self.interface.query("*TEMPC?")

class DAT64H(SCPIInstrument,metaclass=MakeSettersGetters):

instrument_type = "Tunable Attenuator"
bool_map = {'ON':1, 'OFF':0}
bool_map_inv = {1:'ON', 0:'OFF'}

attenuation = FloatCommand(scpi_string="ATT")
step = FloatCommand(scpi_string="STEP")

def __init__(self, resource_name=None, *args, **kwargs):
super(DAT64H, self).__init__(resource_name, *args, **kwargs)

def connect(self, resource_name=None, interface_type="VISA"):
if resource_name is not None:
self.resource_name = resource_name
super(DAT64H, self).connect(resource_name=self.resource_name, interface_type=interface_type)
self.interface._resource.read_termination = u"\r\n"
self.interface._resource.write_termination = u"\r\n"
self.interface._resource.timeout = 1000
self.interface._resource.baud_rate = 115200

def increment(self):
self.interface.write("INCR")

def decrement(self):
self.interface.write("DECR")

@property
def attenuation(self):
return self.interface.query('ATT?')

@attenuation.setter
def attenuation(self,value):
self.interface.write(f'ATT {value}')
4 changes: 3 additions & 1 deletion src/auspex/instruments/keysight.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ class KeysightM8190A(SCPIInstrument):

continuous_mode = StringCommand(scpi_string=":INIT:CONT:STAT", value_map={True:"1", False:"0"})
gate_mode = StringCommand(scpi_string=":INIT:GATE:STAT", value_map={True:"1", False:"0"})

trigger_frequency = FloatCommand(scpi_string=":ARM:TRIG:FREQ")

def __init__(self, resource_name, *args, **kwargs):
super(KeysightM8190A, self).__init__(resource_name, *args, **kwargs)
self.name = "KeysightM8190A AWG"
Expand Down Expand Up @@ -329,3 +330,4 @@ def advance(self, channel=1):

def trigger(self, channel=1):
self.interface.write(":TRIG:BEG{:d}".format(channel))

Loading