class QuickSynDDS(StaticDDS):
    """A StaticDDS that supports only frequency control, with no phase or amplitude control."""
    description = 'PhaseMatrix QuickSyn DDS'
    allowed_children = [StaticAnalogQuantity,StaticDigitalOut]
    generation = 2
    
    @set_passed_properties()    
    def __init__(self, name, parent_device, connection, freq_limits = None, freq_conv_class = None,freq_conv_params = {}):
        Device.__init__(self,name,parent_device,connection)
        self.frequency = StaticAnalogQuantity(self.name+'_freq',self,'freq',freq_limits,freq_conv_class,freq_conv_params)
        self.frequency.default_value = 0.5e9
        self.gate = StaticDigitalOut(self.name+'_gate',self,'gate')
            
    def setamp(self,value,units=None):
        raise LabscriptError('QuickSyn does not support amplitude control')
        
    def setphase(self,value,units=None):
        raise LabscriptError('QuickSyn does not support phase control')
            
    def enable(self):       
        """overridden from StaticDDS so as not to provide time resolution -
        output can be enabled or disabled only at the start of the shot"""
        self.gate.go_high()
                            
    def disable(self):
        """overridden from StaticDDS so as not to provide time resolution -
        output can be enabled or disabled only at the start of the shot"""
        self.gate.go_low()
class QuickSynDDS(StaticDDS):
    """A StaticDDS that supports only frequency control, with no phase or amplitude control."""
    description = 'PhaseMatrix QuickSyn DDS'
    allowed_children = [StaticAnalogQuantity,StaticDigitalOut]
    generation = 2
    def __init__(self, name, parent_device, connection, freq_limits = None, freq_conv_class = None,freq_conv_params = {}):
        self.clock_type = parent_device.clock_type
        Device.__init__(self,name,parent_device,connection)
        self.frequency = StaticAnalogQuantity(self.name+'_freq',self,'freq',freq_limits,freq_conv_class,freq_conv_params)
        self.frequency.default_value = 0.5e9
        self.gate = StaticDigitalOut(self.name+'_gate',self,'gate')
            
    def setamp(self,value,units=None):
        raise LabscriptError('QuickSyn does not support amplitude control')
        
    def setphase(self,value,units=None):
        raise LabscriptError('QuickSyn does not support phase control')
            
    def enable(self):       
        """overridden from StaticDDS so as not to provide time resolution -
        output can be enabled or disabled only at the start of the shot"""
        self.gate.go_high()
                            
    def disable(self):
        """overridden from StaticDDS so as not to provide time resolution -
        output can be enabled or disabled only at the start of the shot"""
        self.gate.go_low()
Exemplo n.º 3
0
 def __init__(self,
              name,
              parent_device,
              connection,
              freq_limits=None,
              freq_conv_class=None,
              freq_conv_params={}):
     Device.__init__(self, name, parent_device, connection)
     self.frequency = StaticAnalogQuantity(self.name + '_freq', self,
                                           'freq', freq_limits,
                                           freq_conv_class,
                                           freq_conv_params)
     self.frequency.default_value = 0.5e9
     self.gate = StaticDigitalOut(self.name + '_gate', self, 'gate')
 def __init__(self, name, parent_device, connection, freq_limits = None, freq_conv_class = None,freq_conv_params = {}):
     Device.__init__(self,name,parent_device,connection)
     self.frequency = StaticAnalogQuantity(self.name+'_freq',self,'freq',freq_limits,freq_conv_class,freq_conv_params)
     self.frequency.default_value = 0.5e9
     self.gate = StaticDigitalOut(self.name+'_gate',self,'gate')
PulseBlasterUSB('pulseblaster')
ClockLine('output_clock', pulseblaster.pseudoclock, 'flag 0')
ClockLine('acq_trigger', pulseblaster.pseudoclock, 'flag 1')
NI_PCI_6733('Dev1', output_clock, clock_terminal='PFI0')
NI_USB_6008('Dev3', acq_trigger, 'PFI0', acquisition_rate=5000)

AnalogOut('ao0', Dev1, 'ao0')
AnalogOut('ao1', Dev1, 'ao1')

# DigitalOut('do0', Dev1, 'port0/line0')
# DigitalOut('do1', Dev1, 'port0/line1')

StaticAnalogOut('static_ao0', Dev3, 'ao0')
StaticAnalogOut('static_ao1', Dev3, 'ao1')

StaticDigitalOut('static_do0', Dev3, 'port0/line0')
StaticDigitalOut('static_do1', Dev3, 'port1/line1')

AnalogIn('ai0', Dev3, 'ai0')
AnalogIn('ai1', Dev3, 'ai1')

WaitMonitor(
    'wait_monitor',
    parent_device=pulseblaster.direct_outputs,
    connection='flag 2',
    acquisition_device=Dev1,
    acquisition_connection='Ctr0',
    timeout_device=Dev1,
    timeout_connection='port0/line0'
)