From 919f45ac2034cc00968afb742e231a3b3d545c9f Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Tue, 8 Nov 2016 15:15:22 -0600 Subject: [PATCH] Completes IPP-151. Adds configuration for sensor height and Specific Gravity. Increments driver version to 8 --- POCloud_Driver/HTML/Configuration.html | 31 +++++++++++++++++++++++--- POCloud_Driver/config.txt | 2 +- POCloud_Driver/ipp.py | 6 ++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/POCloud_Driver/HTML/Configuration.html b/POCloud_Driver/HTML/Configuration.html index be6145b..523ceec 100644 --- a/POCloud_Driver/HTML/Configuration.html +++ b/POCloud_Driver/HTML/Configuration.html @@ -31,14 +31,13 @@ Stop Command -

VFD CONFIGURATION

+

EQUIPMENT CONFIGURATION

-

MOTOR CONFIGURATION

- + + + + + + + + + + +
Motor FLA (A)

Motor FLA (A)

">

Sensor Height (ft.)

+ " + type="number" step="any" + id="<%= channels["ipp.cfgdhsensordisttointake"].channelId %>" + value="<%=channels["ipp.cfgdhsensordisttointake"].value %>"> +

Fluid Specific Gravity

+ " + type="number" step="any" + id="<%= channels["ipp.cfgspecificgravity"].channelId %>" + value="<%=channels["ipp.cfgspecificgravity"].value %>"> +
diff --git a/POCloud_Driver/config.txt b/POCloud_Driver/config.txt index e35c33c..15108ab 100644 --- a/POCloud_Driver/config.txt +++ b/POCloud_Driver/config.txt @@ -3,7 +3,7 @@ "driverFileName":"ipp.py", "deviceName":"ipp", "driverId":"0090", -"releaseVersion":"7", +"releaseVersion":"8", "files": { "file1":"ipp.py", "file2":"micro800.py" diff --git a/POCloud_Driver/ipp.py b/POCloud_Driver/ipp.py index 4eee9c1..8091c01 100644 --- a/POCloud_Driver/ipp.py +++ b/POCloud_Driver/ipp.py @@ -11,7 +11,7 @@ import micro800 as u800 addr = '10.20.4.5' channels = {} -version = "7" +version = "8" e300_current = { @@ -184,6 +184,7 @@ class start(threading.Thread, deviceBase): 'alarmtubingpressure': Channel('alarmtubingpressure', 'alarm_TubingPressure', 3600, self.sendtodbJSON, writeable=False, e300_param=False), 'cfgcflasetting': Channel('cfgcflasetting', 'cfg_C_FLASetting', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), 'cfgcleartripcountafter': Channel('cfgcleartripcountafter', 'cfg_ClearTripCountAfter', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), + 'cfgdhsensordisttointake': Channel('cfgdhsensordisttointake', 'cfg_DHSensorDistToIntake', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), 'cfggfgroundfaultinhibittime': Channel('cfggfgroundfaultinhibittime', 'cfg_GF_GroundFaultInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), 'cfggfgroundfaulttripdelay': Channel('cfggfgroundfaulttripdelay', 'cfg_GF_GroundFaultTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), 'cfggfgroundfaulttriplevel': Channel('cfggfgroundfaulttriplevel', 'cfg_GF_GroundFaultTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), @@ -415,7 +416,7 @@ class start(threading.Thread, deviceBase): print("No stored plcaddr.json file. Let's create one...'") with open("plcaddr.json", "wb") as addr_file: json.dump({"plc_address": addr}, addr_file) - + self.finished = threading.Event() threading.Thread.start(self) self.sendtodbJSON("plcipaddress", self.device_address, 0) @@ -535,4 +536,3 @@ class start(threading.Thread, deviceBase): r = "Unable to set PLC IP address to {}: {}".format(value_ascii, e) print(r) return r -