From 647c462426a9dd90acf4c383a0092de856f105b1 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Fri, 9 Jun 2017 09:46:01 -0500 Subject: [PATCH] Fixes maps and adds schedule page --- POCloud/HTML/Schedule.html | 66 ++++++++++++++++++++++++++++++++++++++ POCloud/Maps.py | 3 +- POCloud/advvfdipp.py | 4 +-- 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 POCloud/HTML/Schedule.html diff --git a/POCloud/HTML/Schedule.html b/POCloud/HTML/Schedule.html new file mode 100644 index 0000000..f617d00 --- /dev/null +++ b/POCloud/HTML/Schedule.html @@ -0,0 +1,66 @@ +
+
+

Production Scheduler: <%=channels["advvfdipp.sch_enabled"].value %>

+

Upcoming Schedule

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
IDControl ModeCompletion ParameterTarget ValueActual Value
+
+
+
+
+ +
+
+

Previously Scheduled Runs

+
+ + + + + + + + + + + + + +
IDControl ModeCompletion ParameterTarget ValueActual ValueTotal BBL
+
+
+
+ + diff --git a/POCloud/Maps.py b/POCloud/Maps.py index c029a7b..3286759 100644 --- a/POCloud/Maps.py +++ b/POCloud/Maps.py @@ -45,5 +45,6 @@ adv_vfd_ipp_map = { 4: "Tubing Pressure", 5: "Time", }, - 'completion_comparison': {0: ">", 1: "<"} + 'completion_comparison': {0: ">", 1: "<"}, + 'enable_disable': {0: "Disabled", 1: "Enabled"} } diff --git a/POCloud/advvfdipp.py b/POCloud/advvfdipp.py index e3b82f4..0d5e2e5 100644 --- a/POCloud/advvfdipp.py +++ b/POCloud/advvfdipp.py @@ -68,7 +68,7 @@ channels = [ Channel(plc_ip_address, "temperatureshutdownlimit", "AIn_IntakeTemperature.Val_HiLim", "REAL", 0.5, 14400), Channel(plc_ip_address, "temperaturestartuplimit", "AIn_IntakeTemperature.Val_LoLim", "REAL", 0.5, 14400), Channel(plc_ip_address, "sensorheight", "cfg_DHSensorDistToIntake", "REAL", 0.5, 14400), - Channel(plc_ip_address, "sch_enabled", "sch_enabled", "BOOL", _, 3600) + Channel(plc_ip_address, "sch_enabled", "sch_enabled", "STRING", _, 3600, map_=maps['enable_disable']) ] scheduler_history = [ @@ -134,7 +134,7 @@ class start(threading.Thread, deviceBase): for sch_s in scheduler_schedule: if sch_s.read(self.forceSend): - self.sendtodbJSON("run_schedule", json.dumps(sch_s.jsonify()), 0) + self.sendtodbJSON("run_schedule_{}".format(sch_s.index_), json.dumps(sch_s.jsonify()), 0) print("advvfdipp driver still alive...") if self.forceSend: