Ejemplo n.º 1
0
def re_measure(cycle=1):
    Temp = Uc = Uc_m = Ic = Ue = Ue_m = Ib = 0.0

    if ag.temperature() >= 50.0:
        print "High temperature! Cooler!!!!"
        ag.stop_output("all")
        ag.state_output()
        while ag.temperature() >= 40.0:
            print "Current Temperature: %.2f, Delay: %d sec" % (ag.temperature(), 60 * DELAY_MEASURE)
            print "Delay"
            for sec in xrange(12 * DELAY_MEASURE):
                print "%d, " % (sec * 5),
                time.sleep(5)

        ag.start_output("all")

    for i in xrange(cycle):
        time.sleep(DELAY_MEASURE)

        Temp += ag.temperature()
        Uc += ag.source_value(2, "volt")
        Uc_m += ag.measure(2, "volt")
        Ic += ag.measure(2, "cur")
        Ue += ag.source_value(1, "volt")
        Ue_m += ag.measure(1, "volt")
        Ib += ag.measure(1, "cur")

    cycle = float(cycle)
    Measurements["Temp"] = Temp / cycle
    Measurements["Uc"] = Uc / cycle
    Measurements["Uc_m"] = Uc_m / cycle
    Measurements["Ic"] = Ic / cycle
    Measurements["Ue"] = Ue / cycle
    Measurements["Ue_m"] = Ue_m / cycle
    Measurements["Ib"] = Ib / cycle
Ejemplo n.º 2
0
def re_measure(cycle=1):
    Temp = Uc = Uc_m = Ic = Ue = Ib = Ib_m = 0.

    if ag.temperature() >= 50.0:
        ag.cooler(36.0)

    for i in xrange(cycle):
        time.sleep( DELAY_MEASURE )
        
        Temp    += ag.temperature()
        Uc      += ag.source_value(2,"volt")
        Uc_m    += ag.measure(2,"volt")
        Ic      += ag.measure(2,"cur")
        Ue      += ag.measure(1,"volt")
        Ib		+= ag.source_value(1,"c")
        Ib_m    += ag.measure(1,"cur")

        

    cycle = float(cycle)
    Measurements["Temp"] = Temp / cycle
    Measurements["Uc"]   = Uc   / cycle
    Measurements["Uc_m"] = Uc_m / cycle
    Measurements["Ic"]   = Ic   / cycle
    Measurements["Ue"]   = Ue   / cycle
    Measurements["Ib_m"] = Ib_m / cycle
    Measurements["Ib"]   = Ib   / cycle
Ejemplo n.º 3
0
def re_measure(cycle=1):
    Temp = Ud = Ud_m = Id = 0.

    if ag.temperature() >= 50.0:
        print "Hi, temperature! Cool!"
        ag.stop_output("all")
        ag.state_output()
        while ag.temperature() >= 40.0:
            print "Current Temperature: %.2f, Delay: %d sec" % ( ag.temperature(),60 * MEASURE_DELAY )
            print "Delay"
            for sec in xrange( 12 * MEASURE_DELAY ):
                print "%d, " % (sec*5),
                time.sleep(5)

        ag.start_output("all")
        

    for i in xrange(cycle):
        time.sleep( MEASURE_DELAY )
        
        Temp    += ag.temperature()
        Ud      += ag.source_value(1,"volt")
        Ud_m    += ag.measure(1,"volt")
        Id      += ag.measure(1,"cur")


        

    cycle = float(cycle)
    Measurements["Temp"] = Temp / cycle
    Measurements["Ud"]   = Ud   / cycle
    Measurements["Ud_m"] = Ud_m / cycle
    Measurements["Id"]   = Id   / cycle