Exemplo n.º 1
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.func_list  = self.func_list + [
                           self.Ch1GetCounts,
                           self.Ch2GetCounts,
                           self.Ch1SetInputImp,
                           self.Ch2SetInputImp,
                           self.Ch1InputThreshold,
                           self.Ch2InputThreshold,
                           self.Ch1setManualOrAutoTrigger,
                           self.Ch2setManualOrAutoTrigger,
                           self.dispCh1plusCh2,
                           self.dispCh1divCh2,
                           self.Ch1Pause,
                           self.Ch2Pause,
                           self.Ch1SetCountTime,
                           self.Ch2SetCountTime,
                           ]
        self.label_list = self.label_list + [
                           'Ch1 Get\nCounts',         #1
                           'Ch2 Get\nCounts',         #2
                           'Ch1 Set\nInput Imp',      #3
                           'Ch2 Set\nInput Imp',      #4
                           'Ch1 Set Input\nThresh',   #5
                           'Ch2 Set Input\nThresh',   #6
                           'Ch1 Man/Auto\nTrigger',   #7
                           'Ch2 Man/Auto\nTrigger',   #8
                           'Display\nCh1 + Ch2',      #9 
                           'Display\nCh1 / Ch2',      #10
                           'Ch1 Pause',               #11
                           'Ch2 Pause',               #12
                           'Ch1 Set\nCount Time',     #13
                           'Ch2 Set\nCount Time'      #14
                           ]
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.runStop = 0
        self.write(":STOP")

        self.label_list = self.label_list + [
            ('Run\nStop', self.RunStop, ""),
            ('Set Voltage\nDivision (V)', self.SetVoltDiv,
             "Voltage Division"),  #1
            ('Set Time\nDivision (μs)', self.SetTimeDiv, "Time Division"),  #2
            ('Set Trigger\nLevel', self.SetTriggerLvl, "Trigger Level"),  #3
            ('Measure\nFrequency', self.MeasFreq, ""),  #4
            ('Measure\nVpp', self.MeasVpp, ""),  #5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Measure\nVpp', self.MeasVpp, ""),  # 5
            ('Test', self.RunStop, "")  # 5
        ]

        # Theoretical api instead of using label list above
        # self.register(self.RunStop, 'Run\nStop')
        # self.register(self.SetVoltDiv, 'Set Voltage\nDivision (V)', name = "Voltage Division", sc = True, dc = False, parameter = True)
        # self.register(self.SetVoltDiv, 'Set Time\nDivision (μs)', name = "Time Division", parameter = True)

        for label, function, *_ in self.label_list:
            pub.subscribe(function, self.createTopic(label))
Exemplo n.º 3
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.runStop = 0
        self.write(":STOP")

        # Register functions for use in the interface
        self.register(self.RunStop, 'Run\nStop')
        self.register(self.SetVoltDiv,
                      'Set Voltage\nDivision (V)',
                      parameters=["Voltage Division"])
        self.register(self.SetTimeDiv,
                      'Set Time\nDivision (μs)',
                      parameters=["Time Division"])
Exemplo n.º 4
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.register(self.Ch1Off, 'Ch1 Output\nOff')
        self.register(self.Ch1On, 'Ch1 Output\nOn')
        self.register(self.Ch1Sinusoid, 'Ch1 Waveform\nSinusoidal')
        self.register(self.Ch1Frequency,
                      'Ch1 Frequency\nSet',
                      parameters=["Frequency [Hz]"])
        self.register(self.Ch1VppAmp,
                      'Set Ch1 p-p\nVoltage',
                      parameters=["Amplitude [V]"])
        self.register(self.Ch1VoltageOffset,
                      'Set Ch1 Voltage\nOffset',
                      parameters=["Offset [V]"])
Exemplo n.º 5
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.devComm.write("*CLS; *RST")

        self.devComm.write(":INST:SEL 1")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 2")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 3")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 4")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 1")

        self.ch1OnOff = 0
        self.ch2OnOff = 0
        self.ch3OnOff = 0
        self.ch4OnOff = 0

        self.numTabs = 2

        self.additionalPanels = [(graphPanel, 'Graph Tab')]

        self.register(self.GetModelOption, 'Gets Model\nOption')
        self.register(self.SegmentLength, 'Segment\nLength')
        self.register(self.Tests, 'Tests')
        self.register(
            self.SetOperatingChannel, 'Sets Operating\nChannel'
        )  # not this function used channel input, but we don't handle that yet
        self.register(self.SetStandardSquareWave,
                      'Standard\nSquare Wave',
                      parameters=["Frequency"])
        self.register(self.OutputOnOff, 'Sets Operating\nChannel On/Off', "")
        self.register(self.DeleteAllTraces, 'Deletes\nAll Traces')
        self.register(self.TracePoints, 'Queries\nTrace Points')
        self.register(self.Ch1OnOff, 'Ch1 Output\nOn/Off')
        self.register(self.Ch2OnOff, 'Ch2 Output\nOn/Off')
        self.register(self.SyncChannels, 'Sync\nCh1 and Ch2')
        self.register(self.Ch1TrigIntExt,
                      'Ch1 Trigger\nInt/Ext',
                      parameters=["Ch1 Trigger"])
        self.register(self.Ch2TrigIntExt,
                      'Ch2 Trigger\nInt/Ext',
                      parameters=["Ch1 Trigger"])
        self.register(self.Ch1setWaitTime,
                      'Ch1 Set\nWait Time',
                      parameters=["CH1 Wait Time"])
Exemplo n.º 6
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.label_list = self.label_list + [
            ('Set Delay\nChX-ChY', self.SetDelayChCh, ""),
            ('Set Output\nAmplitude', self.SetAmpCh, "Voltage Division"),  # 1
            ('Set Trigger\nLevel', self.SetTriggerLvl, "Trigger Level")
        ]

        # Theoretical api instead of using label list above
        # self.register(self.RunStop, 'Run\nStop')
        # self.register(self.SetVoltDiv, 'Set Voltage\nDivision (V)', name = "Voltage Division", sc = True, dc = False, parameter = True)
        # self.register(self.SetVoltDiv, 'Set Time\nDivision (μs)', name = "Time Division", parameter = True)

        for label, function, *_ in self.label_list:
            pub.subscribe(function, self.createTopic(label))
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.devComm.write("*CLS; *RST")

        self.devComm.write(":INST:SEL 1")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 2")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 3")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 4")
        self.devComm.write(":OUTPut:STATe OFF")
        self.devComm.write(":INST:SEL 1")

        self.ch1OnOff = 0
        self.ch2OnOff = 0
        self.ch3OnOff = 0
        self.ch4OnOff = 0

        self.numTabs = 2

        self.additionalPanels = [(graphPanel, 'Graph Tab')]

        self.label_list = self.label_list + [
            ('Gets Model\nOption', self.GetModelOption, ""),
            ('Segment\nLength', self.SegmentLength, ""),
            ('Tests', self.Tests, ""),
            ('Sets Operating\nChannel', self.SetOperatingChannel, ""),
            ('Standard\nSquare Wave', self.SetStandardSquareWave, ""),
            ('Sets Operating\nChannel On/Off', self.OutputOnOff, ""),
            ('Deletes\nAll Traces', self.DeleteAllTraces, ""),
            ('Queries\nTrace Points', self.TracePoints, ""),
            ('Ch1 Output\nOn/Off', self.Ch1OnOff, ""),  # 1
            ('Ch2 Output\nOn/Off', self.Ch2OnOff, ""),  # 2
            ('Sync\nCh1 and Ch2', self.SyncChannels, ""),  # 3
            ('Ch1 Trigger\nInt/Ext', self.Ch1TrigIntExt, ""),  # 4
            ('Ch2 Trigger\nInt/Ext', self.Ch2TrigIntExt, ""),  # 5
            ('Ch1 Set\nWait Time', self.Ch1setWaitTime, ""),  # 6
            ('Ch1 Set\nWait Time', self.Ch1setWaitTime, ""),  # 6
            ('Ch1 Set\nWait Time', self.Ch1setWaitTime, ""),  # 6
            ('Ch1 Set\nWait Time', self.Ch1setWaitTime, "")  # 6
        ]

        for label, function, *_ in self.label_list:
            pub.subscribe(function, self.createTopic(label))
Exemplo n.º 8
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.func_list = self.func_list + [
            self.SetWL,
            self.SetOutputPower,
            self.OutputEna,
            self.IsLocked,
            self.IsStable,
        ]
        self.label_list = self.label_list + [
            'Set\nWavelength',  #1
            'Set Output\nPower',  #2
            'Output\n(En/Dis)able',  #3
            'Laser\nLocked?',  #4
            'Laser\nStable?',  #5
        ]
Exemplo n.º 9
0
    def __init__(self, *args):
        devGlobal.__init__(self, *args)

        self.register(self.advTrigMode, 'Enables Adv\nTriggering')

        self.register(self.setCh1Delay,
                      'Set\nDelay',
                      parameters=["Delay [s]"],
                      panel_specific='Ch1 Tab')
        self.register(self.setCh1Width,
                      'Set\nWidth',
                      parameters=["Width [s]"],
                      panel_specific='Ch1 Tab')
        self.register(self.setCh1Amplitude,
                      'Set\nAmplitude',
                      parameters=["Amplitude [V]"],
                      panel_specific='Ch1 Tab')
        self.register(self.setCh1Offset,
                      'Set\nOffset',
                      parameters=["Offset [V]"],
                      panel_specific='Ch1 Tab')
        self.register(self.setCh1Polarity,
                      'Set Polarity\n(1=pos;0=neg)',
                      parameters=["Offset [V]"],
                      panel_specific='Ch1 Tab')

        self.register(self.setCh2Delay,
                      'Sets Ch2\nDelay',
                      parameters=["Delay [s]"],
                      panel_specific='Ch2 Tab')
        self.register(self.setCh3Delay,
                      'Sets Ch3\nDelay',
                      parameters=["Delay [s]"],
                      panel_specific='Ch3 Tab')
        self.register(self.setCh4Delay,
                      'Sets Ch4\nDelay',
                      parameters=["Delay [s]"],
                      panel_specific='Ch4 Tab')

        self.additionalPanels = [
            (specPanel, 'Ch1 Tab'), (specPanel, 'Ch2 Tab'),
            (specPanel, 'Ch3 Tab'), (specPanel, 'Ch4 Tab')
        ]