Exemple #1
0
def test_hardware():
    from testlib.equip.nrpz11 import nrpz11
    from testlib.equip.hp11713A import hp11713A
    from testlib.equip.sg6000l import SG6000L
    from config import test_config

    cfg = test_config()

    swt = hp11713A(host=cfg.get('SWTIP'))

    pmLoss = nrpz11(cfg.get('PMLOSS'), timeout=10)
    pmIso = nrpz11(cfg.get('PMISO'), timeout=10)
    sg = SG6000L(port=cfg.get('SGPORT'))
    #    pmLoss.calibrate()
    #    pmIso.calibrate()
    pmLoss.setoffset(0)
    pmIso.setoffset(0)

    tdata = Db(cfg.get('DBFILE'), cfg.get('DBTBL'))
    tdata.de_debug = 1

    c = combiner(pmPwrLoss=pmLoss.avgPower,
                 pmFreqLoss=pmLoss.setfreq,
                 pmPwrIso=pmIso.avgPower,
                 pmFreqIso=pmIso.setfreq,
                 sgFreq=sg.setFreq,
                 swtOn=swt.SwitchOn,
                 swtOff=swt.SwitchOff,
                 dbWrite=tdata.Entry)
    c.initialize()
    c.printCAL()
    c.testSequence(testSeq=c.Seq2X2)
    tdata.Close()
Exemple #2
0
def test_hardware():
    from testlib.equip.nrpz11 import nrpz11
    from testlib.equip.hp11713A import hp11713A
    from testlib.equip.sg6000l import SG6000L
    from config import test_config
    
    cfg = test_config()
   
    swt = hp11713A( host=cfg.get('SWTIP'))
    
    pmLoss = nrpz11(cfg.get('PMLOSS'), timeout=10)
    pmIso  = nrpz11(cfg.get('PMISO' ), timeout=10)
    sg = SG6000L(port=cfg.get('SGPORT'))
#    pmLoss.calibrate()
#    pmIso.calibrate()
    pmLoss.setoffset(0)
    pmIso.setoffset(0)
    
    tdata = Db(cfg.get('DBFILE'), cfg.get('DBTBL'))
    tdata.de_debug = 1
    
    c = combiner(pmPwrLoss=pmLoss.avgPower,
                        pmFreqLoss=pmLoss.setfreq,
                        pmPwrIso=pmIso.avgPower,
                        pmFreqIso=pmIso.setfreq,
                        sgFreq=sg.setFreq,
                        swtOn=swt.SwitchOn,
                        swtOff=swt.SwitchOff,
                        dbWrite=tdata.Entry)
    c.initialize()
    c.printCAL()
    c.testSequence( testSeq=c.Seq2X2)
    tdata.Close()
Exemple #3
0
            combiner.__init__(self,
                                pmPwrLoss=pmLoss.avgPower,
                                pmFreqLoss=pmLoss.setfreq,
                                pmPwrIso=pmIso.avgPower,
                                pmFreqIso=pmIso.setfreq,
                                sgFreq=sg.setFreq,
                                swtOn=swt.SwitchOn,
                                swtOff=swt.SwitchOff)
        else:
            combiner.__init__(self)

    
if __name__ == '__main__':
    gui = GUI("airFiber Combiner Test", 'Combiner')
    rev = Rev()
    cfg = test_config()
    gui.cfgframe.SetswVer( rev.getSwVer() )
    gui.bar.setMaxSeconds( 60+15)
    gui.cfgframe.SetDescription(cfg.get('STATIONID'))

    c = combiner_runtime(cfg=None)
    c.progress = gui.updProgressBar
    
    c.printCAL()
    opid = gui.EnterOperatorID()
    while 1:
            pw = PromptWindow( gui,"**** Ready UUT for test ****",
                               "1) Place board in test fixture\n" + \
                               "2) Connect the cables\n\n",
                               yestxt = "Start Test", notxt = "Exit Program")
            response =  pw.answer.get()
Exemple #4
0
            combiner.__init__(self,
                              pmPwrLoss=pmLoss.avgPower,
                              pmFreqLoss=pmLoss.setfreq,
                              pmPwrIso=pmIso.avgPower,
                              pmFreqIso=pmIso.setfreq,
                              sgFreq=sg.setFreq,
                              swtOn=swt.SwitchOn,
                              swtOff=swt.SwitchOff)
        else:
            combiner.__init__(self)


if __name__ == '__main__':
    gui = GUI("airFiber Combiner Test", 'Combiner')
    rev = Rev()
    cfg = test_config()
    gui.cfgframe.SetswVer(rev.getSwVer())
    gui.bar.setMaxSeconds(60 + 15)
    gui.cfgframe.SetDescription(cfg.get('STATIONID'))

    c = combiner_runtime(cfg=None)
    c.progress = gui.updProgressBar

    c.printCAL()
    opid = gui.EnterOperatorID()
    while 1:
        pw = PromptWindow( gui,"**** Ready UUT for test ****",
                           "1) Place board in test fixture\n" + \
                           "2) Connect the cables\n\n",
                           yestxt = "Start Test", notxt = "Exit Program")
        response = pw.answer.get()