- log data
- log raw temp


git-svn-id: http://moon:8086/svn/projects/HendiControl@240 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
2019-04-15 17:52:38 +00:00
parent 4c663ad0da
commit 123a4cad8b
2 changed files with 20 additions and 6 deletions
+15 -3
View File
@@ -11,9 +11,21 @@ from matplotlib.pyplot import figure, clf, plot, xlabel, ylabel, xlim, ylim, tit
def results_plot(self):
fp = open("results.dat", 'w')
for n in range(0, len(self.time_v)):
d = self.time_v[n]
v1 = self.theta_raw_v[n]
v2 = self.theta_k_v[n]
v3 = self.power_v[n]
v4 = self.error_v[n]
v5 = self.heatrate_k_v[n]
fp.write("{:6.3f} {:6.3f} {:6.3f} {:6.3f} {:6.3f}\n".format(d, v1, v2, v3, v4, v5))
fp.close()
figure(1)
subplot(4, 1, 1)
plot(self.time_v, self.theta_k_v, 'r-', linewidth=1)
plot(self.time_v, self.theta_raw_v, 'g-', self.time_v, self.theta_k_v, 'r-', linewidth=1)
title('Temperature')
grid(True)
ylabel('°C')
@@ -56,7 +68,7 @@ if __name__ == '__main__':
signal.signal(signal.SIGCONT, handler)
signal.signal(signal.SIGHUP, handler)
fp = open("brewpi.json")
fp = open("brewpi_sprung.json")
configJson = json.load(fp)
plant_class = globals()[configJson["Controller"]['plant_name']]
@@ -66,7 +78,7 @@ if __name__ == '__main__':
ablauf = Controller(configJson["Controller"], plant, ruehrer)
fp = open("Rezept-001.json")
fp = open("Rezept-Sprung.json")
recipeJson = json.load(fp)
ablauf.start(recipeJson)