Пример #1
0
class TestGeneral(unittest.TestCase):
    def setUp(self):  #run before each test
        self.VST = VST().jav_OpenTest(SMW_IP, FSW_IP)
        self.VST.jav_ClrErr()

    def tearDown(self):  #Run after each test
        self.assertEqual(self.VST.SMW.jav_Error()[0], '0')
        self.assertEqual(self.VST.FSW.jav_Error()[0], '0')
        self.VST.jav_Close()

###############################################################################
### <Test>
###############################################################################

    def test_VST_Freq(self):
        self.VST.Set_Freq(1e9)
Пример #2
0
def run(root):
    Instr = VST().jav_Open(root.entryCol.entry0.get(),
                           root.entryCol.entry1.get())  #pylint:disable=E1101
    OFileCSV = FileIO().makeFile(root.entryCol.entry7.get() + 'csv')
    OFileXML = FileIO().makeFile(root.entryCol.entry7.get() + 'xml')

    root.toppWind.writeN('Sweep Begin')
    root.toppWind.writeN(
        f'-{Instr.SMW.Model} {Instr.SMW.Device} {Instr.SMW.Version} ')
    root.toppWind.writeN(
        f'-{Instr.FSW.Model} {Instr.FSW.Device} {Instr.FSW.Version} ')

    ##########################################################
    ### Instrument Settings
    ##########################################################
    FreqStart = int(float(root.entryCol.entry2.get()))
    FreqStop = int(float(root.entryCol.entry3.get()))
    FreqStep = int(float(root.entryCol.entry4.get()))
    fSpan = float(root.entryCol.entry5.get())
    SWM_Out = float(root.entryCol.entry6.get())

    Instr.SMW.Set_RFPwr(SWM_Out)  #Output Power
    Instr.SMW.Set_IQMod('OFF')  #Modulation Off
    Instr.SMW.Set_RFState('ON')  #Turn RF Output on
    Instr.FSW.Set_Channel("Spectrum")
    Instr.FSW.Set_SweepCont(0)
    Instr.FSW.Set_Span(fSpan)

    for freq in range(FreqStart, FreqStop, FreqStep):
        Instr.Set_Freq(freq)
        time.sleep(0.01)
        Instr.FSW.Set_InitImm()
        Instr.FSW.Set_Mkr_Peak()
        Mkr = Instr.FSW.Get_Mkr_XY()
        OFileCSV.write(f'{freq},{Mkr[0]},{Mkr[1]}')
        OFileXML.write(f'  <Point x="{Mkr[0]}" y="{Mkr[1]}"/>')
    Instr.jav_Close()
    root.toppWind.writeN("Sweep Complete")
Пример #3
0
 def test_VST_WLAN(self):
     from rssd.VST.WLAN import VST               #pylint:disable=E0611,E0401
     self.VST = VST()
     self.assertEqual(self.VST.WLAN_MCS,1)
Пример #4
0
 def test_VST_NR5G(self):
     from rssd.VST.NR5G_K144 import VST          #pylint:disable=E0611,E0401
     self.VST = VST()
     self.assertEqual(self.VST.NR_TF,'OFF')
Пример #5
0
 def test_VST_LTE(self):
     from rssd.VST.LTE import VST                #pylint:disable=E0611,E0401
     self.VST = VST()
     self.assertEqual(self.VST.LTE_CC,1)
Пример #6
0
 def test_VST_Common(self):
     from rssd.VST.Common import VST             #pylint:disable=E0611,E0401
     self.VST = VST()
     self.assertEqual(self.VST.Freq,19e9)
Пример #7
0
def IDN(root):
    Instr = VST().jav_Open(root.entryCol.entry0.get(),
                           root.entryCol.entry1.get())  #pylint:disable=E1101
    print(Instr.SMW.query('*IDN?'))
    print(Instr.FSW.query('*IDN?'))
    Instr.jav_Close()
Пример #8
0
 def setUp(self):  #run before each test
     self.VST = VST().jav_OpenTest(SMW_IP, FSW_IP)
     self.VST.jav_ClrErr()