- skip rast if temp already reached
- activate plant an start of rast git-svn-id: http://moon:8086/svn/projects/HendiControl@216 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -100,7 +100,7 @@ class Controller():
|
|||||||
if self.thread != None:
|
if self.thread != None:
|
||||||
self.is_pause = True
|
self.is_pause = True
|
||||||
self.stirrer.deactivate()
|
self.stirrer.deactivate()
|
||||||
self.plant.setPower(0)
|
self.plant.activate(False)
|
||||||
|
|
||||||
def cont(self):
|
def cont(self):
|
||||||
if self.thread != None:
|
if self.thread != None:
|
||||||
@@ -124,16 +124,13 @@ class Controller():
|
|||||||
self.rast(rast)
|
self.rast(rast)
|
||||||
if self.rast_abort:
|
if self.rast_abort:
|
||||||
break
|
break
|
||||||
|
time.sleep(1);
|
||||||
|
|
||||||
if not self.is_restart:
|
if not self.is_restart:
|
||||||
self.receipe_sema.release()
|
self.receipe_sema.release()
|
||||||
|
|
||||||
def rast(self, rast):
|
def rast(self, rast):
|
||||||
|
|
||||||
# Stirrer
|
|
||||||
self.stirrer.activate()
|
|
||||||
self.stirrer.setCycleTime(self.stirrCycleTime)
|
|
||||||
|
|
||||||
# Temperature
|
# Temperature
|
||||||
self.theta = self.plant.getTemperature()
|
self.theta = self.plant.getTemperature()
|
||||||
theta_soll = rast['temp']
|
theta_soll = rast['temp']
|
||||||
@@ -151,7 +148,14 @@ class Controller():
|
|||||||
# ------------------------------
|
# ------------------------------
|
||||||
# The loop
|
# The loop
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
doLoop = True
|
doLoop = theta_soll > self.theta
|
||||||
|
if doLoop:
|
||||||
|
# Stirrer
|
||||||
|
self.stirrer.activate()
|
||||||
|
self.plant.activate(True)
|
||||||
|
|
||||||
|
self.stirrer.setCycleTime(self.stirrCycleTime)
|
||||||
|
|
||||||
useKalman = False
|
useKalman = False
|
||||||
while(doLoop):
|
while(doLoop):
|
||||||
|
|
||||||
@@ -285,3 +289,5 @@ class Controller():
|
|||||||
doLoop = False
|
doLoop = False
|
||||||
|
|
||||||
self.stirrer.deactivate()
|
self.stirrer.deactivate()
|
||||||
|
self.plant.activate(False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user