diff --git a/PID Loop Testing/test_pid.py b/PID Loop Testing/test_pid.py new file mode 100644 index 0000000..ccd4c0b --- /dev/null +++ b/PID Loop Testing/test_pid.py @@ -0,0 +1,4 @@ +"""Simulate a water well.""" + + +flowrate_in = 100 # GPM, typically unknown and changing diff --git a/POCloud/HTML/Configuration.html b/POCloud/HTML/Configuration.html index 54e3bcd..75f2192 100644 --- a/POCloud/HTML/Configuration.html +++ b/POCloud/HTML/Configuration.html @@ -8,32 +8,31 @@ - Start - + data-confirm-message="Are you sure you want to remotely start the well?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'cmd_Start', 'val': 1}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated confirmstatic pad15"> + Start
- Stop + data-confirm-message="Are you sure you want to remotely stop the well?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'cmd_Stop', 'val': 1}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated confirmstatic pad15"> + Stop
@@ -42,171 +41,187 @@

PID Settings

-
-
-

Flow Setpoint - <% if (channels["advvfdipp.pidcontrolmode"].value == "Flow"){ %> - ACTIVE - <% } %> -

-
-
- +
+
+

Flow Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Flow"){ %> + ACTIVE + <% } %> +

+ +
+ -
- + - send - + data-staticsend="{'tag': 'cfg_PID_FlowSP', 'val': <%=channels['advvfdipp.flowsetpoint'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated confirmstatic material-icons">send + +
+
+
- Activate Flow Control + style="width:95%" + data-confirm-message="Are you sure you want to activate Flow Control Mode?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'cfg_PID_Flow', 'val': 1}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic"> + Activate Flow Control
-
-
-

Fluid Level Setpoint - <% if (channels["advvfdipp.pidcontrolmode"].value == "Fluid Level"){ %> - ACTIVE - <% } %> -

-
-
- +
+
+

Fluid Level Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Fluid Level"){ %> + ACTIVE + <% } %> +

+ +
+ -
- + - send - + data-staticsend="{'tag': 'cfg_PID_FluidLevelSP', 'val': <%=channels['advvfdipp.fluidlevelsetpoint'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send + +
+
+
-
-
-

Tubing Pressure Setpoint - <% if (channels["advvfdipp.pidcontrolmode"].value == "Tubing Pressure"){ %> - ACTIVE - <% } %> -

-
-
- +
+
+

Tubing Pressure Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Tubing Pressure"){ %> + ACTIVE + <% } %> +

+ +
+ -
- + - send - + data-staticsend="{'tag': 'cfg_PID_TubingPressureSP', 'val': <%=channels['advvfdipp.tubingpressuresetpoint'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send + +
+
+
-
-
-

Manual Frequency Setpoint - <% if (channels["advvfdipp.pidcontrolmode"].value == "Manual"){ %> - ACTIVE - <% } %> -

-
-
- +
+
+

Manual Frequency Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Manual"){ %> + ACTIVE + <% } %> +

+ +
+ -
- + - send - + data-staticsend="{'tag': 'cfg_PID_ManualFrequencySP', 'val': <%=channels['advvfdipp.manualfrequencysetpoint'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send + +
+
+
- Activate Manual Control + data-staticsend="{'tag': 'cfg_PID_Manual', 'val': 1}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic"> + Activate Manual Frequency Control
@@ -222,21 +237,21 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.pressureshutdownlimit'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'AIn_IntakePressure.PSet_LoLim', 'val': <%=channels['advvfdipp.pressureshutdownlimit'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send
@@ -247,21 +262,21 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.pressurestartuplimit'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'AIn_IntakePressure.PSet_HiLim', 'val': <%=channels['advvfdipp.pressurestartuplimit'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send
@@ -272,21 +287,21 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.temperatureshutdownlimit'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'AIn_IntakeTemperature.PSet_HiLim', 'val': <%=channels['advvfdipp.temperatureshutdownlimit'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send
@@ -297,21 +312,21 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.temperaturestartuplimit'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'AIn_IntakeTemperature.PSet_LoLim', 'val': <%=channels['advvfdipp.temperaturestartuplimit'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send
@@ -328,21 +343,21 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.fluidspecificgravity'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'cfg_FluidSpecificGravity', 'val': <%=channels['advvfdipp.fluidspecificgravity'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send
@@ -353,21 +368,77 @@
+ type="number" + step="any" + value="<%=channels['advvfdipp.sensorheight'].value %>">
- send + data-confirm-message="Are you sure you want to do this?" + data-refreshpause="1" + data-command="" + data-staticsend="{'tag': 'cfg_DHSensorDistToIntake', 'val': <%=channels['advvfdipp.sensorheight'].value %>}" + data-channelId="<%= channels["advvfdipp.writeplctag"].channelId %>" + data-techname="<%=channels["advvfdipp.writeplctag"].techName %>" + data-name="<%= channels["advvfdipp.writeplctag"].name%>" + data-nodechannelcurrentId="<%= channels["advvfdipp.writeplctag"].nodechannelcurrentId %>" + id="<%= channels["advvfdipp.writeplctag"].channelId %>" + class="btn btn-large btn-theme animated setstatic material-icons">send +
+ + + + +
+
+

Motor Parameters

+
+ +
+ +
+ +
+
@@ -375,63 +446,66 @@ diff --git a/POCloud/HTML/ConfigurationNew.html b/POCloud/HTML/ConfigurationNew.html deleted file mode 100644 index 75f2192..0000000 --- a/POCloud/HTML/ConfigurationNew.html +++ /dev/null @@ -1,511 +0,0 @@ - - -
-
-

Control

-
- - -
- -
-
-

PID Settings

-
- - - - - - - -
- -
-
-

Shutdown Parameters

-
- -
- -
- -
- -
- -
- -
- -
- -
-
- -
-
-

Well Parameters

-
- -
- -
- -
- -
-
- -
-
-

Motor Parameters

-
- -
- -
- -
- -
-
- - - - diff --git a/POCloud/HTML/ConfigurationOLD.html b/POCloud/HTML/ConfigurationOLD.html new file mode 100644 index 0000000..54e3bcd --- /dev/null +++ b/POCloud/HTML/ConfigurationOLD.html @@ -0,0 +1,437 @@ + + +
+
+

Control

+
+
+ + + + Start + +
+
+ + Stop + +
+
+ +
+
+

PID Settings

+
+
+
+

Flow Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Flow"){ %> + ACTIVE + <% } %> +

+
+
+ +
+ + send +
+ + Activate Flow Control +
+
+ +
+
+

Fluid Level Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Fluid Level"){ %> + ACTIVE + <% } %> +

+
+
+ +
+ + send +
+ + Activate Fluid Level Control +
+
+ +
+
+

Tubing Pressure Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Tubing Pressure"){ %> + ACTIVE + <% } %> +

+
+
+ +
+ + send +
+ + Activate Tubing Pressure Control +
+
+ +
+
+

Manual Frequency Setpoint + <% if (channels["advvfdipp.pidcontrolmode"].value == "Manual"){ %> + ACTIVE + <% } %> +

+
+
+ +
+ + send +
+ + Activate Manual Control +
+
+
+ +
+
+

Shutdown Parameters

+
+ +
+
+

Pressure Shutdown Limit

+
+
+ +
+ + send +
+
+
+ +
+
+

Pressure Startup Limit

+
+
+ +
+ + send +
+
+
+ +
+
+

Temperature Shutdown Limit

+
+
+ +
+ + send +
+
+
+ +
+
+

Temperature Startup Limit

+
+
+ +
+ + send +
+
+
+
+ +
+
+

Well Parameters

+
+ +
+
+

Specific Gravity

+
+
+ +
+ + send +
+
+
+ +
+
+

Sensor Height

+
+
+ +
+ + send +
+
+
+
+ + + +