Ejemplo n.º 1
0
def runGPID():
    gPIDInstance = gPID.gPID()
    gPIDInstance.ChangeSetPoint(40.0)
    while True:
        getCFPval = float(GP.getcFP())
        next_PV = gPIDInstance.Compute(getCFPval)
        print "Present Temp: "+ str(getCFPval) + "| nextPV: "+str(next_PV)
        GP.HeaterControl(next_PV)
        time.sleep(1)
Ejemplo n.º 2
0
def runGPID():
    gPIDInstance = gPID.gPID()
    gPIDInstance.ChangeSetPoint(40.0)
    while True:
        getCFPval = float(GP.getcFP())
        next_PV = gPIDInstance.Compute(getCFPval)
        print "Present Temp: " + str(getCFPval) + "| nextPV: " + str(next_PV)
        GP.HeaterControl(next_PV)
        time.sleep(1)
Ejemplo n.º 3
0
 def UpdateVars(self):
     #Update the temperature variables!
     self.TemperatureData.append(GP.getcFP())
     self.TemperatureData.pop(0)
     self.TrailAvg = np.average(self.TemperatureData[:self.step])
     self.LeadAvg = np.average(self.TemperatureData[-self.step:])
     #Update Pressure Variable
     #self.Pressure = GP.getPressure()
     #Call stability check
     
     reactor.callWhenRunning(self.StabilityWrapper)
     #get PID Value
     PIDValue = self.gPID.Compute(float(self.LeadAvg))
     
     if int(PIDValue) != int(self.PIDVal) :
         #write PID Value
         GP.HeaterControl(PIDValue)
         self.PIDVal = PIDValue
Ejemplo n.º 4
0
    def UpdateVars(self):
        #Update the temperature variables!
        self.TemperatureData.append(GP.getcFP())
        self.TemperatureData.pop(0)
        self.TrailAvg = np.average(self.TemperatureData[:self.step])
        self.LeadAvg = np.average(self.TemperatureData[-self.step:])
        #Update Pressure Variable
        #self.Pressure = GP.getPressure()
        #Call stability check

        reactor.callWhenRunning(self.StabilityWrapper)
        #get PID Value
        PIDValue = self.gPID.Compute(float(self.LeadAvg))

        if int(PIDValue) != int(self.PIDVal):
            #write PID Value
            GP.HeaterControl(PIDValue)
            self.PIDVal = PIDValue
Ejemplo n.º 5
0
 def Initialize(self):
     self.TemperatureData += [float(GP.getcFP())] * self.BoxCarSize()
Ejemplo n.º 6
0
 def Initialize(self):
     self.TemperatureData += [float(GP.getcFP())] * self.BoxCarSize()