diff --git a/POCloud_Driver/Channel.py b/POCloud_Driver/Channel.py new file mode 100644 index 0000000..adb6680 --- /dev/null +++ b/POCloud_Driver/Channel.py @@ -0,0 +1,287 @@ +"""Define Meshify channel class.""" +from pycomm.ab_comm.clx import Driver as ClxDriver +from pycomm.cip.cip_base import CommError, DataError +import time + + +def binarray(intval): + """Split an integer into its bits.""" + bin_string = '{0:08b}'.format(intval) + bin_arr = [i for i in bin_string] + bin_arr.reverse() + return bin_arr + + +def read_tag(addr, tag, plc_type="CLX"): + """Read a tag from the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + try: + if c.open(addr, direct_connection=direct): + try: + v = c.read_tag(tag) + return v + except DataError as e: + c.close() + print("Data Error during readTag({}, {}): {}".format(addr, tag, e)) + except CommError: + # err = c.get_status() + c.close() + print("Could not connect during readTag({}, {})".format(addr, tag)) + # print err + except AttributeError as e: + c.close() + print("AttributeError during readTag({}, {}): \n{}".format(addr, tag, e)) + c.close() + return False + + +def read_array(addr, tag, start, end, plc_type="CLX"): + """Read an array from the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + if c.open(addr, direct_connection=direct): + arr_vals = [] + try: + for i in range(start, end): + tag_w_index = tag + "[{}]".format(i) + v = c.read_tag(tag_w_index) + # print('{} - {}'.format(tag_w_index, v)) + arr_vals.append(round(v[0], 4)) + # print(v) + if len(arr_vals) > 0: + return arr_vals + else: + print("No length for {}".format(addr)) + return False + except Exception: + print("Error during readArray({}, {}, {}, {})".format(addr, tag, start, end)) + err = c.get_status() + c.close() + print err + pass + c.close() + + +def write_tag(addr, tag, val, plc_type="CLX"): + """Write a tag value to the PLC.""" + direct = plc_type == "Micro800" + c = ClxDriver() + if c.open(addr, direct_connection=direct): + try: + cv = c.read_tag(tag) + print(cv) + wt = c.write_tag(tag, val, cv[1]) + return wt + except Exception: + print("Error during writeTag({}, {}, {})".format(addr, tag, val)) + err = c.get_status() + c.close() + print err + c.close() + + +class Channel(object): + """Holds the configuration for a Meshify channel.""" + + def __init__(self, mesh_name, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False): + """Initialize the channel.""" + self.mesh_name = mesh_name + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + + def __str__(self): + """Create a string for the channel.""" + return "{}\nvalue: {}, last_send_time: {}".format(self.mesh_name, self.value, self.last_send_time) + + def check(self, new_value, force_send=False): + """Check to see if the new_value needs to be stored.""" + send_needed = False + send_reason = "" + if self.data_type == 'BOOL' or self.data_type == 'STRING': + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif not (self.value == new_value): + if self.map_: + if not self.value == self.map_[new_value]: + send_needed = True + send_reason = "value change" + else: + send_needed = True + send_reason = "value change" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + else: + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif abs(self.value - new_value) > self.chg_threshold: + send_needed = True + send_reason = "change threshold" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + if send_needed: + self.last_value = self.value + if self.map_: + try: + self.value = self.map_[new_value] + except KeyError: + print("Cannot find a map value for {} in {} for {}".format(new_value, self.map_, self.mesh_name)) + self.value = new_value + else: + self.value = new_value + self.last_send_time = time.time() + print("Sending {} for {} - {}".format(self.value, self.mesh_name, send_reason)) + return send_needed + + def read(self): + """Read the value.""" + pass + + +def identity(sent): + """Return exactly what was sent to it.""" + return sent + + +class ModbusChannel(Channel): + """Modbus channel object.""" + + def __init__(self, mesh_name, register_number, data_type, chg_threshold, guarantee_sec, channel_size=1, map_=False, write_enabled=False, transformFn=identity): + """Initialize the channel.""" + super(ModbusChannel, self).__init__(mesh_name, data_type, chg_threshold, guarantee_sec, map_, write_enabled) + self.mesh_name = mesh_name + self.register_number = register_number + self.channel_size = channel_size + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + self.transformFn = transformFn + + def read(self, mbsvalue): + """Return the transformed read value.""" + return self.transformFn(mbsvalue) + + +class PLCChannel(Channel): + """PLC Channel Object.""" + + def __init__(self, ip, mesh_name, plc_tag, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False, plc_type='CLX'): + """Initialize the channel.""" + super(PLCChannel, self).__init__(mesh_name, data_type, chg_threshold, guarantee_sec, map_, write_enabled) + self.plc_ip = ip + self.mesh_name = mesh_name + self.plc_tag = plc_tag + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + self.plc_type = plc_type + + def read(self): + """Read the value.""" + plc_value = None + if self.plc_tag and self.plc_ip: + read_value = read_tag(self.plc_ip, self.plc_tag, plc_type=self.plc_type) + if read_value: + plc_value = read_value[0] + + return plc_value + + +class BoolArrayChannels(Channel): + """Hold the configuration for a set of boolean array channels.""" + + def __init__(self, ip, mesh_name, plc_tag, data_type, chg_threshold, guarantee_sec, map_=False, write_enabled=False): + """Initialize the channel.""" + self.plc_ip = ip + self.mesh_name = mesh_name + self.plc_tag = plc_tag + self.data_type = data_type + self.last_value = None + self.value = None + self.last_send_time = 0 + self.chg_threshold = chg_threshold + self.guarantee_sec = guarantee_sec + self.map_ = map_ + self.write_enabled = write_enabled + + def compare_values(self, new_val_dict): + """Compare new values to old values to see if the values need storing.""" + send = False + for idx in new_val_dict: + try: + if new_val_dict[idx] != self.last_value[idx]: + send = True + except KeyError: + print("Key Error in self.compare_values for index {}".format(idx)) + send = True + return send + + def read(self, force_send=False): + """Read the value and check to see if needs to be stored.""" + send_needed = False + send_reason = "" + if self.plc_tag: + v = read_tag(self.plc_ip, self.plc_tag) + if v: + bool_arr = binarray(v[0]) + new_val = {} + for idx in self.map_: + try: + new_val[self.map_[idx]] = bool_arr[idx] + except KeyError: + print("Not able to get value for index {}".format(idx)) + + if self.last_send_time == 0: + send_needed = True + send_reason = "no send time" + elif self.value is None: + send_needed = True + send_reason = "no value" + elif self.compare_values(new_val): + send_needed = True + send_reason = "value change" + elif (time.time() - self.last_send_time) > self.guarantee_sec: + send_needed = True + send_reason = "guarantee sec" + elif force_send: + send_needed = True + send_reason = "forced" + + if send_needed: + self.value = new_val + self.last_value = self.value + self.last_send_time = time.time() + print("Sending {} for {} - {}".format(self.value, self.mesh_name, send_reason)) + return send_needed diff --git a/POCloud_Driver/channels.txt b/POCloud_Driver/channels.txt deleted file mode 100644 index c2234a7..0000000 --- a/POCloud_Driver/channels.txt +++ /dev/null @@ -1 +0,0 @@ -[] - automode - BOOL - read only [] - cfgcflasetting - REAL - WRITEABLE [] - cfgcleartripcountafter - DINT - WRITEABLE [] - cfgctripenablecontrol - UINT - WRITEABLE [] - cfgcwarningenablecontrol - UINT - WRITEABLE [] - cfggfgroundfaultinhibittime - USINT - WRITEABLE [] - cfggfgroundfaulttripdelay - REAL - WRITEABLE [] - cfggfgroundfaulttriplevel - REAL - WRITEABLE [] - cfggfgroundfaultwarningdelay - REAL - WRITEABLE [] - cfggfgroundfaultwarninglevel - REAL - WRITEABLE [] - cfgictprimary - UINT - WRITEABLE [] - cfgictsecondary - UINT - WRITEABLE [] - cfgicurrentimbalanceinhibittim - USINT - WRITEABLE [] - cfgicurrentimbalancetripdelay - USINT - WRITEABLE [] - cfgicurrentimbalancetriplevel - USINT - WRITEABLE [] - cfgicurrentimbalancewarninglev - USINT - WRITEABLE [] - cfgijaminhibittime - USINT - WRITEABLE [] - cfgijamtripdelay - USINT - WRITEABLE [] - cfgijamtriplevel - UINT - read only [] - cfgijamwarninglevel - UINT - WRITEABLE [] - cfgilinelossinhibittime - USINT - WRITEABLE [] - cfgilinelosstripdelay - REAL - WRITEABLE [] - cfgiovercurrentinhibittime - USINT - WRITEABLE [] - cfgiovercurrenttripdelay - REAL - WRITEABLE [] - cfgiovercurrenttriplevel - USINT - WRITEABLE [] - cfgiovercurrentwarninglevel - USINT - WRITEABLE [] - cfgistallenabledtime - USINT - WRITEABLE [] - cfgistalltriplevel - UINT - WRITEABLE [] - cfgiundercurrentinhibittime - USINT - WRITEABLE [] - cfgiundercurrenttripdelay - REAL - WRITEABLE [] - cfgiundercurrenttriplevel - USINT - WRITEABLE [] - cfgiundercurrentwarninglevel - USINT - WRITEABLE [] - cfgiunderloadinhibittime - USINT - WRITEABLE [] - cfgiunderloadtripdelay - REAL - WRITEABLE [] - cfgiunderloadtriplevel - USINT - WRITEABLE [] - cfgiunderloadwarninglevel - USINT - WRITEABLE [] - cfgoverloadtripcountlimit - DINT - WRITEABLE [] - cfgplphaselossinhibittime - USINT - WRITEABLE [] - cfgplphaselosstripdelay - REAL - WRITEABLE [] - cfgread - BOOL - WRITEABLE [] - cfgspecificgravity - REAL - WRITEABLE [] - cfgtcuolresetlevel - USINT - read only [] - cfgtcuolwarninglevel - USINT - read only [] - cfgtcutripclass - USINT - WRITEABLE [] - cfgtimermodeenabled - BOOL - WRITEABLE [] - cfgtimerruntime - DINT - WRITEABLE [] - cfgtimerwaittime - DINT - WRITEABLE [] - cfgtripcountlimit - DINT - WRITEABLE [] - cfgvoverfrequencyinhibittime - USINT - WRITEABLE [] - cfgvoverfrequencytripdelay - REAL - WRITEABLE [] - cfgvoverfrequencytriplevel - USINT - WRITEABLE [] - cfgvoverfrequencywarninglevel - USINT - WRITEABLE [] - cfgvovervoltageinhibittime - USINT - WRITEABLE [] - cfgvovervoltagetripdelay - REAL - WRITEABLE [] - cfgvovervoltagetriplevel - REAL - WRITEABLE [] - cfgvovervoltagewarninglevel - REAL - WRITEABLE [] - cfgvphaserotationinhibittime - USINT - WRITEABLE [] - cfgvphaserotationtriptype - USINT - WRITEABLE [] - cfgvptprimary - UINT - WRITEABLE [] - cfgvptsecondary - UINT - WRITEABLE [] - cfgvunderfrequencyinhibittime - USINT - WRITEABLE [] - cfgvunderfrequencytripdelay - REAL - WRITEABLE [] - cfgvunderfrequencytriplevel - USINT - WRITEABLE [] - cfgvunderfrequencywarninglevel - USINT - WRITEABLE [] - cfgvundervoltageinhibittime - USINT - WRITEABLE [] - cfgvundervoltagetripdelay - REAL - WRITEABLE [] - cfgvundervoltagetriplevel - REAL - WRITEABLE [] - cfgvundervoltagewarninglevel - REAL - WRITEABLE [] - cfgvvoltageimbalanceinhibittim - USINT - WRITEABLE [] - cfgvvoltageimbalancetripdelay - REAL - WRITEABLE [] - cfgvvoltageimbalancetriplevel - USINT - WRITEABLE [] - cfgvvoltageimbalancewarninglev - USINT - WRITEABLE [] - cfgvvoltagemode - USINT - WRITEABLE [] - cfgwrite - BOOL - WRITEABLE [] - contactorstatus - BOOL - read only [] - dhdownholestatusint - UINT - read only [] - dhfluidlevel - REAL - read only [] - dhintakepressure - REAL - read only [] - dhintaketemperature - REAL - read only [] - dhmaxintakepressureforever - UINT - read only [] - dhmaxintakepressurestartup - UINT - read only [] - dhmaxintaketemperatureforever - REAL - read only [] - dhmaxintaketemperaturestartup - REAL - read only [] - dhnumchannels - UINT - read only [] - dhpsirating - UINT - read only [] - dhtooltype - UINT - read only [] - dhtoolvoltage - UINT - read only [] - downholetoolenabled - BOOL - read only [] - downtimetimeparameter - DINT - WRITEABLE [] - downtimetimeparameterol - DINT - WRITEABLE [] - e300averagecurrent - REAL - read only [] - e300averagellvoltage - REAL - read only [] - e300averagelnvoltage - REAL - read only [] - e300kwh - REAL - read only [] - e300kwhregen - REAL - read only [] - e300l1apparentpower - REAL - read only [] - e300l1current - REAL - read only [] - e300l1l2voltage - REAL - read only [] - e300l1nvoltage - REAL - read only [] - e300l1reactivepower - REAL - read only [] - e300l1realpower - REAL - read only [] - e300l1truepowerfactor - REAL - read only [] - e300l2apparentpower - REAL - read only [] - e300l2current - REAL - read only [] - e300l2l3voltage - REAL - read only [] - e300l2nvoltage - REAL - read only [] - e300l2reactivepower - REAL - read only [] - e300l2realpower - REAL - read only [] - e300l2truepowerfactor - REAL - read only [] - e300l3apparentpower - REAL - read only [] - e300l3current - REAL - read only [] - e300l3l1voltage - REAL - read only [] - e300l3nvoltage - REAL - read only [] - e300l3reactivepower - REAL - read only [] - e300l3realpower - REAL - read only [] - e300l3truepowerfactor - REAL - read only [] - e300linefrequency - REAL - read only [] - e300percentcurrentunbalance - REAL - read only [] - e300percentvoltageunbalance - REAL - read only [] - e300threephasetruepowerfactor - REAL - read only [] - e300totalapparentpower - REAL - read only [] - e300totalreactivepower - REAL - read only [] - e300totalrealpower - REAL - read only [] - handmode - BOOL - read only [] - overloadtrip - BOOL - read only [] - pressurealarmdelay - UDINT - WRITEABLE [] - pressurealarmstartupdelay - DINT - WRITEABLE [] - pressureeumax - REAL - WRITEABLE [] - pressureeumin - REAL - WRITEABLE [] - pressurehi - BOOL - read only [] - pressurehisp - REAL - WRITEABLE [] - pressurein - REAL - read only [] - pressurelo - BOOL - read only [] - pressurelosp - REAL - WRITEABLE [] - pressureok - BOOL - read only [] - pressureshutdown - REAL - WRITEABLE [] - pressureshutdownenabled - BOOL - WRITEABLE [] - pressurestartup - REAL - WRITEABLE [] - pressurestartupenabled - BOOL - WRITEABLE [] - pressureswitchenabled - BOOL - WRITEABLE [] - pressuretransducerenabled - BOOL - WRITEABLE [] - rpmode - BOOL - read only [] - rppressure - BOOL - read only [] - rptemperature - BOOL - read only [] - rptrip - BOOL - read only [] - rptubingpressure - BOOL - read only [] - runpermissive - BOOL - read only [] - shutdowntime - DINT - read only [] - spmode - BOOL - read only [] - sppressure - BOOL - read only [] - sptemperature - BOOL - read only [] - sptrip - BOOL - read only [] - spvoltage - BOOL - read only [] - startbutton - BOOL - read only [] - startcommand - BOOL - WRITEABLE [] - startpermissive - BOOL - read only [] - stopcommand - BOOL - WRITEABLE [] - tempshutdown - REAL - WRITEABLE [] - tempshutdownenabled - BOOL - WRITEABLE [] - tempstartup - REAL - WRITEABLE [] - tempstartupenabled - BOOL - WRITEABLE [] - testmode - BOOL - read only [] - tripenabledicurrentimbalance - BOOL - WRITEABLE [] - tripenabledigroundfault - BOOL - WRITEABLE [] - tripenabledijam - BOOL - WRITEABLE [] - tripenabledilineloss - BOOL - WRITEABLE [] - tripenablediovercurrent - BOOL - WRITEABLE [] - tripenabledioverload - BOOL - WRITEABLE [] - tripenablediphaseloss - BOOL - WRITEABLE [] - tripenabledistall - BOOL - WRITEABLE [] - tripenablediundercurrent - BOOL - WRITEABLE [] - tripenablediunderload - BOOL - WRITEABLE [] - tripenablevoverfrequency - BOOL - WRITEABLE [] - tripenablevovervoltage - BOOL - WRITEABLE [] - tripenablevphaserotation - BOOL - WRITEABLE [] - tripenablevunderfrequency - BOOL - WRITEABLE [] - tripenablevundervoltage - BOOL - WRITEABLE [] - tripenablevvoltageunbalance - BOOL - WRITEABLE [] - tripresetcmd - BOOL - WRITEABLE [] - tripstatus - BOOL - read only [] - tripstatuscontrolint - UINT - read only [] - tripstatuscurrentint - UINT - read only [] - tripstatuspowerint - UINT - read only [] - tripstatusvoltageint - UINT - read only [] - valoverloadtripcount - DINT - read only [] - valtripcount - DINT - read only [] - voltageok - BOOL - read only [] - warningenabledicurrentimbalanc - BOOL - WRITEABLE [] - warningenabledigroundfault - BOOL - WRITEABLE [] - warningenabledijam - BOOL - WRITEABLE [] - warningenabledilineloss - BOOL - WRITEABLE [] - warningenablediovercurrent - BOOL - WRITEABLE [] - warningenabledioverload - BOOL - WRITEABLE [] - warningenablediphaseloss - BOOL - WRITEABLE [] - warningenabledistall - BOOL - WRITEABLE [] - warningenablediundercurrent - BOOL - WRITEABLE [] - warningenablediunderload - BOOL - WRITEABLE [] - warningenablevoverfrequency - BOOL - WRITEABLE [] - warningenablevovervoltage - BOOL - WRITEABLE [] - warningenablevphaserotation - BOOL - WRITEABLE [] - warningenablevunderfrequency - BOOL - WRITEABLE [] - warningenablevundervoltage - BOOL - WRITEABLE [] - warningenablevvoltageunbalance - BOOL - WRITEABLE [] - warningstatus - BOOL - read only [] - warningstatuscontrolint - UINT - read only [] - warningstatuscurrentint - UINT - read only [] - warningstatuspowerint - UINT - read only [] - warningstatusvoltageint - UINT - read only \ No newline at end of file diff --git a/POCloud_Driver/config.txt b/POCloud_Driver/config.txt index 15108ab..2debc15 100644 --- a/POCloud_Driver/config.txt +++ b/POCloud_Driver/config.txt @@ -1,12 +1,12 @@ { - -"driverFileName":"ipp.py", -"deviceName":"ipp", -"driverId":"0090", -"releaseVersion":"8", -"files": { - "file1":"ipp.py", - "file2":"micro800.py" - } - + "files": { + "file3": "Channel.py", + "file2": "utilities.py", + "file1": "ipp.py", + "file4": "maps.py" + }, + "deviceName": "ipp", + "driverId": "0090", + "releaseVersion": "9", + "driverFileName": "ipp.py" } diff --git a/POCloud_Driver/driverConfig.json b/POCloud_Driver/driverConfig.json new file mode 100644 index 0000000..1789e59 --- /dev/null +++ b/POCloud_Driver/driverConfig.json @@ -0,0 +1,12 @@ +{ + "name": "ipp", + "driverFilename": "ipp.py", + "driverId": "0090", + "additionalDriverFiles": [ + "utilities.py", + "Channel.py", + "maps.py" + ], + "version": 9, + "s3BucketName": "ipp" +} \ No newline at end of file diff --git a/POCloud_Driver/getChannels.py b/POCloud_Driver/getChannels.py deleted file mode 100644 index 18a4b29..0000000 --- a/POCloud_Driver/getChannels.py +++ /dev/null @@ -1,20 +0,0 @@ -import pickle -with open('testPickle.p', 'rb') as ch_f: - channels = pickle.load(ch_f) -out = [] -for x in channels.keys(): - chName = x - dType = channels[x]['data_type'] - if dType == 'REAL': - dType = "float" - elif dType[-3:] == "INT": - dType = "integer" - elif dType == "BOOL": - dType = "boolean" - else: - print dType - - out.append("{0} - {1}".format(chName, dType)) - -for a in sorted(out): - print a diff --git a/POCloud_Driver/ipp.py b/POCloud_Driver/ipp.py index 8091c01..c755de8 100644 --- a/POCloud_Driver/ipp.py +++ b/POCloud_Driver/ipp.py @@ -1,538 +1,316 @@ -#!/usr/bin/python +"""Driver for ipp""" import threading -import traceback -import time -import json -import socket -import os +import sys from device_base import deviceBase -import micro800 as u800 +from Channel import PLCChannel +from utilities import get_public_ip_address +from maps import * +import time +import logging -addr = '10.20.4.5' -channels = {} -version = "8" +_ = None +# LOGGING SETUP +from logging.handlers import RotatingFileHandler -e300_current = { - 0: 'None', - 1: 'Overload', - 2: 'Phase Loss', - 4: 'Ground Fault', - 8: 'Stall', - 16: 'Jam', - 32: 'Underload', - 64: 'Current Imbalance', - 128: 'L1 Undercurrent', - 256: 'L2 Undercurrent', - 512: 'L3 Undercurrent', - 1024: 'L1 Overcurrent', - 2048: 'L2 Overcurrent', - 4096: 'L3 Overcurrent', - 8192: 'L1 Line Loss', - 16384: 'L2 Line Loss', - 32768: 'L3 Line Loss' -} +log_formatter = logging.Formatter('%(asctime)s %(levelname)s %(funcName)s(%(lineno)d) %(message)s') +logFile = './ipp.log' +my_handler = RotatingFileHandler(logFile, mode='a', maxBytes=500*1024, backupCount=2, encoding=None, delay=0) +my_handler.setFormatter(log_formatter) +my_handler.setLevel(logging.INFO) +logger = logging.getLogger('ipp') +logger.setLevel(logging.INFO) +logger.addHandler(my_handler) -e300_voltage = { - 0: 'None', - 1: 'Undervoltage', - 2: 'Overvoltage', - 4: 'Voltage Unbalance', - 8: 'Phase Rotation', - 16: 'Overfrequency' -} +console_out = logging.StreamHandler(sys.stdout) +console_out.setFormatter(log_formatter) +logger.addHandler(console_out) -e300_control = { - 0: 'None', - 1: 'Test Trip', - 2: 'DLX Trip', - 4: 'PTC Trip', - 8: 'Operator Station Trip', - 16: 'Remote Trip', - 32: 'Blocked Start Trip', - 64: 'Hardware Fault Trip', - 128: 'Config Trip', - 256: 'Option Match Trip', - 512: 'DLX FB Timeout Trip', - 1024: 'Expansion Bus Trip', - 2048: 'Reserved', - 4096: 'Reserved', - 8192: 'NVS Trip', - 16384: 'Test Mode Trip' -} +logger.info("ipp startup") -e300_power = { - 0: 'None', - 1: 'Under kW', - 2: 'Over kW', - 4: 'Under kVAR Consumed', - 8: 'Over kVAR Consumed', - 16: 'Under kVAR Generated', - 32: 'Over kVAR Generated', - 64: 'Under kVA', - 128: 'Over kVA', - 256: 'Under PF Lag', - 512: 'Over PF Lag', - 1024: 'Under PF Lead', - 2048: 'Over PF Lead' -} - -device_status = { - 1: "Startup", - 2: "Not ready to start", - 3: "Ready to start", - 4: "Lost run permissive", - 5: "Not able to restart - Overload Limit", - 6: "Not able to restart - Trip Limit", - 7: "Waiting to attempt restart", - 8: "Waiting to attempt restart (Overload)", - 9: "Running", - 10: "User stopped", - 11: "Waiting to start (Timer Mode)" -} - - -class Channel(): - def read(self): - valData = u800.readMicroTag(self.device_addr, self.tag) - if valData: - nowVal = valData[0] - if self.map_obj: - nowVal = self.map_obj[nowVal] - self.data_type = valData[1] - if (self.data_type == "BOOL") or (type(nowVal) is str) or (type(nowVal) is str): - if self.last_value == "": - self.sendFn(self.name, nowVal, 0) - self.last_time_uploaded = time.time() - self.last_value = nowVal - elif (not (self.last_value == nowVal)) or ((time.time() - self.last_time_uploaded) > self.max_time_between_uploads): - self.sendFn(self.name, nowVal, 0) - self.last_time_uploaded = time.time() - self.last_value = nowVal - elif (self.data_type == "REAL") or (self.data_type[-3:] == "INT"): - if self.last_value == "": - self.sendFn(self.name, nowVal, 0) - self.last_time_uploaded = time.time() - self.last_value = nowVal - elif (abs(self.last_value - nowVal) > self.change_threshold) or ((time.time() - self.last_time_uploaded) > self.max_time_between_uploads): - self.sendFn(self.name, nowVal, 0) - self.last_time_uploaded = time.time() - self.last_value = nowVal - return True - return False - - def __init__(self, name, tag, max_time_between_uploads, sendFn, change_threshold=0.0, e300_param=False, writeable=False, map_obj=None): - global addr - self.name = name - self.tag = tag - self.data_type = '' - self.last_value = '' - self.last_time_uploaded = 0 - self.change_threshold = change_threshold - self.max_time_between_uploads = int(max_time_between_uploads) - self.sendFn = sendFn - self.device_addr = addr - self.writeable = bool(writeable) - self.map_obj = map_obj - self.e300_param = e300_param - self.read() - - def write(self, val, handshake=None, handshake_val=None): - if self.writeable: - if not self.e300_param: - if handshake is None: - if u800.writeMicroTag(self.device_addr, self.tag, val): - self.sendFn(self.name, val, time.time()) - self.last_value = val - return True - else: - return False - else: - return u800.writeMicroTag(self.device_addr, self.tag, val, handshake=handshake, handshake_val=handshake_val) - else: - if u800.writeMicroTag(self.device_addr, self.tag, val): - if u800.writeMicroTag(self.device_addr, "write_E300", 1): - self.sendFn(self.name, val, time.time()) - self.last_value = val - return True - return False - - else: - print("NOT ALLOWED TO WRITE TO {}".format(self.name)) - return False +# GLOBAL VARIABLES +WATCHDOG_SEND_PERIOD = 3600 # Seconds, the longest amount of time before sending the watchdog status +PLC_IP_ADDRESS = "10.20.4.5" +CHANNELS = [ + PLCChannel(PLC_IP_ADDRESS, 'alarmdhpressure', 'alarm_DHPressure', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'alarmdhtemperature', 'alarm_DHTemperature', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'alarme300', 'alarm_E300', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'alarmtubingpressure', 'alarm_TubingPressure', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'automode', 'Auto_Mode', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'cfgcflasetting', 'cfg_C_FLASetting', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgcleartripcountafter', 'cfg_ClearTripCountAfter', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgdhsensordisttointake', 'cfg_DHSensorDistToIntake', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfggfgroundfaultinhibittime', 'cfg_GF_GroundFaultInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfggfgroundfaulttripdelay', 'cfg_GF_GroundFaultTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfggfgroundfaulttriplevel', 'cfg_GF_GroundFaultTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfggfgroundfaultwarningdelay', 'cfg_GF_GroundFaultWarningDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfggfgroundfaultwarninglevel', 'cfg_GF_GroundFaultWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgictprimary', 'cfg_I_CTPrimary', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgictsecondary', 'cfg_I_CTSecondary', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgicurrentimbalanceinhibittim', 'cfg_I_CurrentImbalanceInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgicurrentimbalancetripdelay', 'cfg_I_CurrentImbalanceTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgicurrentimbalancetriplevel', 'cfg_I_CurrentImbalanceTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgicurrentimbalancewarninglev', 'cfg_I_CurrentImbalanceWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgijaminhibittime', 'cfg_I_JamInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgijamtripdelay', 'cfg_I_JamTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgijamtriplevel', 'cfg_I_JamTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgijamwarninglevel', 'cfg_I_JamWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgilinelossinhibittime', 'cfg_I_LineLossInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgilinelosstripdelay', 'cfg_I_LineLossTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiovercurrentinhibittime', 'cfg_I_OvercurrentInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiovercurrenttripdelay', 'cfg_I_OvercurrentTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiovercurrenttriplevel', 'cfg_I_OvercurrentTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiovercurrentwarninglevel', 'cfg_I_OvercurrentWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgistallenabledtime', 'cfg_I_StallEnabledTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgistalltriplevel', 'cfg_I_StallTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiundercurrentinhibittime', 'cfg_I_UndercurrentInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiundercurrenttripdelay', 'cfg_I_UndercurrentTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiundercurrenttriplevel', 'cfg_I_UndercurrentTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiundercurrentwarninglevel', 'cfg_I_UndercurrentWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiunderloadinhibittime', 'cfg_I_UnderloadInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiunderloadtripdelay', 'cfg_I_UnderloadTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiunderloadtriplevel', 'cfg_I_UnderloadTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgiunderloadwarninglevel', 'cfg_I_UnderloadWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgoverloadtripcountlimit', 'cfg_OverloadTripCountLimit', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgplphaselossinhibittime', 'cfg_PL_PhaseLossInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgplphaselosstripdelay', 'cfg_PL_PhaseLossTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgread', 'cfg_READ', 'REAL', 0.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgspecificgravity', 'cfg_SpecificGravity', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtcuolresetlevel', 'cfg_TCU_OLResetLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtcuolwarninglevel', 'cfg_TCU_OLWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtcutripclass', 'cfg_TCU_TripClass', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtimermodeenabled', 'cfg_TimerModeEnabled', 'REAL', 0.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtimerruntime', 'cfg_TimerRunTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtimerwaittime', 'cfg_TimerWaitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgtripcountlimit', 'cfg_TripCountLimit', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvoverfrequencyinhibittime', 'cfg_V_OverfrequencyInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvoverfrequencytripdelay', 'cfg_V_OverfrequencyTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvoverfrequencytriplevel', 'cfg_V_OverfrequencyTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvoverfrequencywarninglevel', 'cfg_V_OverfrequencyWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvovervoltageinhibittime', 'cfg_V_OvervoltageInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvovervoltagetripdelay', 'cfg_V_OvervoltageTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvovervoltagetriplevel', 'cfg_V_OvervoltageTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvovervoltagewarninglevel', 'cfg_V_OvervoltageWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvphaserotationinhibittime', 'cfg_V_PhaseRotationInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvphaserotationtriptype', 'cfg_V_PhaseRotationTripType', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvptprimary', 'cfg_V_PTPrimary', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvptsecondary', 'cfg_V_PTSecondary', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvunderfrequencyinhibittime', 'cfg_V_UnderfrequencyInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvunderfrequencytripdelay', 'cfg_V_UnderfrequencyTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvunderfrequencytriplevel', 'cfg_V_UnderfrequencyTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvunderfrequencywarninglevel', 'cfg_V_UnderfrequencyWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvundervoltageinhibittime', 'cfg_V_UndervoltageInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvundervoltagetripdelay', 'cfg_V_UndervoltageTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvundervoltagetriplevel', 'cfg_V_UndervoltageTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvundervoltagewarninglevel', 'cfg_V_UndervoltageWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvvoltageimbalanceinhibittim', 'cfg_V_VoltageImbalanceInhibitTime', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvvoltageimbalancetripdelay', 'cfg_V_VoltageImbalanceTripDelay', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvvoltageimbalancetriplevel', 'cfg_V_VoltageImbalanceTripLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvvoltageimbalancewarninglev', 'cfg_V_VoltageImbalanceWarningLevel', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgvvoltagemode', 'cfg_V_VoltageMode', 'REAL', 1.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'cfgwrite', 'cfg_WRITE', 'REAL', 0.0, 86400, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'contactorstatus', 'Contactor_Status', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'devicestatus', 'Device_Status_INT', 'STRING', 0.0, 3600, plc_type='Micro800', map_=map_device_status), + PLCChannel(PLC_IP_ADDRESS, 'dhdownholestatusint', 'DH_DownholeStatus_INT', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhfluidlevel', 'DH_Fluid_Level', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhintakepressure', 'DH_IntakePressure', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhintaketemperature', 'DH_IntakeTemperature', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhmaxintakepressureforever', 'DH_MaxIntakePressure_Forever', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhmaxintakepressurestartup', 'DH_MaxIntakePressure_Startup', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhmaxintaketemperatureforever', 'DH_MaxIntakeTemperature_Forever', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhmaxintaketemperaturestartup', 'DH_MaxIntakeTemperature_Startup', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhnumchannels', 'DH_NumChannels', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhpsirating', 'DH_PSIRating', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhtooltype', 'DH_ToolType', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'dhtoolvoltage', 'DH_ToolVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'downholetoolenabled', 'Downhole_Tool_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'downtimetimeparameter', 'Downtime_Time_Parameter', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'downtimetimeparameterol', 'Downtime_Time_Parameter_OL', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'e300averagecurrent', 'E300_AverageCurrent', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300averagellvoltage', 'E300_AverageLLVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300averagelnvoltage', 'E300_AverageLNVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300kwh', 'E300_kWh', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300kwhregen', 'E300_kWh_Regen', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1apparentpower', 'E300_L1ApparentPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1current', 'E300_L1Current', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1l2voltage', 'E300_L1L2Voltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1nvoltage', 'E300_L1NVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1reactivepower', 'E300_L1ReactivePower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1realpower', 'E300_L1RealPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l1truepowerfactor', 'E300_L1TruePowerFactor', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2apparentpower', 'E300_L2ApparentPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2current', 'E300_L2Current', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2l3voltage', 'E300_L2L3Voltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2nvoltage', 'E300_L2NVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2reactivepower', 'E300_L2ReactivePower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2realpower', 'E300_L2RealPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l2truepowerfactor', 'E300_L2TruePowerFactor', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3apparentpower', 'E300_L3ApparentPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3current', 'E300_L3Current', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3l1voltage', 'E300_L3L1Voltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3nvoltage', 'E300_L3NVoltage', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3reactivepower', 'E300_L3ReactivePower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3realpower', 'E300_L3RealPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300l3truepowerfactor', 'E300_L3TruePowerFactor', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300linefrequency', 'E300_LineFrequency', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300percentcurrentunbalance', 'E300_PercentCurrentUnbalance', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300percentvoltageunbalance', 'E300_PercentVoltageUnbalance', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300threephasetruepowerfactor', 'E300_ThreePhaseTruePowerFactor', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300totalapparentpower', 'E300_TotalApparentPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300totalreactivepower', 'E300_TotalReactivePower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'e300totalrealpower', 'E300_TotalRealPower', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'flowrate', 'Flowrate', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'flowtoday', 'Flow_Today', 'REAL', 100.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'flowyesterday', 'Flow_Yesterday', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'handmode', 'Hand_Mode', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'overloadtrip', 'OverloadTrip', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'pressurealarmdelay', 'Pressure_Alarm_Delay', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressurealarmstartupdelay', 'Pressure_Alarm_Startup_Delay', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressureeumax', 'Pressure_EU_Max', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressureeumin', 'Pressure_EU_Min', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressurehi', 'Pressure_Hi', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'pressurehisp', 'Pressure_Hi_SP', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressurein', 'Pressure_In', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'pressurelo', 'Pressure_Lo', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'pressurelosp', 'Pressure_Lo_SP', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressureok', 'Pressure_OK', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'pressureshutdown', 'Pressure_Shutdown', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressureshutdownenabled', 'Pressure_Shutdown_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressurestartup', 'Pressure_Startup', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressurestartupenabled', 'Pressure_Startup_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressureswitchenabled', 'Pressure_Switch_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'pressuretransducerenabled', 'Pressure_Transducer_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'rpmode', 'RP_Mode', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'rppressure', 'RP_Pressure', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'rptemperature', 'RP_Temperature', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'rptrip', 'RP_Trip', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'rptubingpressure', 'RP_TubingPressure', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'runpermissive', 'Run_Permissive', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'spmode', 'SP_Mode', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'sppressure', 'SP_Pressure', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'sptemperature', 'SP_Temperature', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'sptrip', 'SP_Trip', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'spvoltage', 'SP_Voltage', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'startbutton', 'Start_Button', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'startcommand', 'Start_Command', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'startpermissive', 'Start_Permissive', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'stopcommand', 'Stop_Command', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tempshutdown', 'Temp_Shutdown', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tempshutdownenabled', 'Temp_Shutdown_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tempstartup', 'Temp_Startup', 'REAL', 1.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tempstartupenabled', 'Temp_Startup_Enabled', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'testmode', 'Test_Mode', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledicurrentimbalance', 'TripEnabled_I_CurrentImbalance', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledigroundfault', 'TripEnabled_I_GroundFault', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledijam', 'TripEnabled_I_Jam', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledilineloss', 'TripEnabled_I_LineLoss', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablediovercurrent', 'TripEnabled_I_Overcurrent', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledioverload', 'TripEnabled_I_Overload', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablediphaseloss', 'TripEnabled_I_PhaseLoss', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenabledistall', 'TripEnabled_I_Stall', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablediundercurrent', 'TripEnabled_I_Undercurrent', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablediunderload', 'TripEnabled_I_Underload', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevoverfrequency', 'TripEnable_V_Overfrequency', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevovervoltage', 'TripEnable_V_Overvoltage', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevphaserotation', 'TripEnable_V_PhaseRotation', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevunderfrequency', 'TripEnable_V_Underfrequency', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevundervoltage', 'TripEnable_V_Undervoltage', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripenablevvoltageunbalance', 'TripEnable_V_VoltageUnbalance', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripresetcmd', 'TripResetCmd', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'tripstatus', 'TripStatus', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'tripstatuscontrolint', 'TripStatusControl_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_control), + PLCChannel(PLC_IP_ADDRESS, 'tripstatuscurrentint', 'TripStatusCurrent_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_current), + PLCChannel(PLC_IP_ADDRESS, 'tripstatuspowerint', 'TripStatusPower_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_power), + PLCChannel(PLC_IP_ADDRESS, 'tripstatusvoltageint', 'TripStatusVoltage_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_voltage), + PLCChannel(PLC_IP_ADDRESS, 'valoverloadtripcount', 'val_OverloadTripCount', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'valtripcount', 'val_TripCount', 'REAL', 1.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'voltageok', 'VoltageOK', 'REAL', 0.0, 3600, plc_type='Micro800'), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledicurrentimbalanc', 'WarningEnabled_I_CurrentImbalance', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledigroundfault', 'WarningEnabled_I_GroundFault', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledijam', 'WarningEnabled_I_Jam', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledilineloss', 'WarningEnabled_I_LineLoss', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablediovercurrent', 'WarningEnabled_I_Overcurrent', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledioverload', 'WarningEnabled_I_Overload', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablediphaseloss', 'WarningEnabled_I_PhaseLoss', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenabledistall', 'WarningEnabled_I_Stall', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablediundercurrent', 'WarningEnabled_I_Undercurrent', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablediunderload', 'WarningEnabled_I_Underload', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevoverfrequency', 'WarningEnable_V_Overfrequency', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevovervoltage', 'WarningEnable_V_Overvoltage', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevphaserotation', 'WarningEnable_V_PhaseRotation', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevunderfrequency', 'WarningEnable_V_Underfrequency', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevundervoltage', 'WarningEnable_V_Undervoltage', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningenablevvoltageunbalance', 'WarningEnable_V_VoltageUnbalance', 'REAL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningstatus', 'WarningStatus', 'BOOL', 0.0, 3600, plc_type='Micro800', write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningstatuscontrolint', 'WarningStatusControl_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_control, write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningstatuscurrentint', 'WarningStatusCurrent_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_current, write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningstatuspowerint', 'WarningStatusPower_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_power, write_enabled=True), + PLCChannel(PLC_IP_ADDRESS, 'warningstatusvoltageint', 'WarningStatusVoltage_INT', 'STRING', 1.0, 3600, plc_type='Micro800', map_=map_e300_voltage, write_enabled=True) +] class start(threading.Thread, deviceBase): - def writeTag_WriteE300(self, addr, tag, val): - write_tag = u800.writeMicroTag(addr, tag, val) - write_e300 = u800.writeMicroTag(addr, "write_E300", 1) - return write_tag and write_e300 + """Start class required by Meshify.""" - def updateGPS(self): - gps = self.mcu.gps - print("GPS found me at {0}".format(gps)) - self.sendtodb("gps", gps, 0) + def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None): + """Initialize the driver.""" + threading.Thread.__init__(self) + deviceBase.__init__(self, name=name, number=number, mac=mac, Q=Q, mcu=mcu, companyId=companyId, offset=offset, mqtt=mqtt, Nodes=Nodes) - def setupChannels(self): - global channels - channels = { - 'automode': Channel('automode', 'Auto_Mode', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'alarmdhpressure': Channel('alarmdhpressure', 'alarm_DHPressure', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'alarmdhtemperature': Channel('alarmdhtemperature', 'alarm_DHTemperature', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'alarme300': Channel('alarme300', 'alarm_E300', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - '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), - 'cfggfgroundfaultwarningdelay': Channel('cfggfgroundfaultwarningdelay', 'cfg_GF_GroundFaultWarningDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfggfgroundfaultwarninglevel': Channel('cfggfgroundfaultwarninglevel', 'cfg_GF_GroundFaultWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgictprimary': Channel('cfgictprimary', 'cfg_I_CTPrimary', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgictsecondary': Channel('cfgictsecondary', 'cfg_I_CTSecondary', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgicurrentimbalanceinhibittim': Channel('cfgicurrentimbalanceinhibittim', 'cfg_I_CurrentImbalanceInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgicurrentimbalancetripdelay': Channel('cfgicurrentimbalancetripdelay', 'cfg_I_CurrentImbalanceTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgicurrentimbalancetriplevel': Channel('cfgicurrentimbalancetriplevel', 'cfg_I_CurrentImbalanceTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgicurrentimbalancewarninglev': Channel('cfgicurrentimbalancewarninglev', 'cfg_I_CurrentImbalanceWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgijaminhibittime': Channel('cfgijaminhibittime', 'cfg_I_JamInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgijamtripdelay': Channel('cfgijamtripdelay', 'cfg_I_JamTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgijamtriplevel': Channel('cfgijamtriplevel', 'cfg_I_JamTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgijamwarninglevel': Channel('cfgijamwarninglevel', 'cfg_I_JamWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgilinelossinhibittime': Channel('cfgilinelossinhibittime', 'cfg_I_LineLossInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgilinelosstripdelay': Channel('cfgilinelosstripdelay', 'cfg_I_LineLossTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiovercurrentinhibittime': Channel('cfgiovercurrentinhibittime', 'cfg_I_OvercurrentInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiovercurrenttripdelay': Channel('cfgiovercurrenttripdelay', 'cfg_I_OvercurrentTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiovercurrenttriplevel': Channel('cfgiovercurrenttriplevel', 'cfg_I_OvercurrentTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiovercurrentwarninglevel': Channel('cfgiovercurrentwarninglevel', 'cfg_I_OvercurrentWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgistallenabledtime': Channel('cfgistallenabledtime', 'cfg_I_StallEnabledTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgistalltriplevel': Channel('cfgistalltriplevel', 'cfg_I_StallTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiundercurrentinhibittime': Channel('cfgiundercurrentinhibittime', 'cfg_I_UndercurrentInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiundercurrenttripdelay': Channel('cfgiundercurrenttripdelay', 'cfg_I_UndercurrentTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiundercurrenttriplevel': Channel('cfgiundercurrenttriplevel', 'cfg_I_UndercurrentTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiundercurrentwarninglevel': Channel('cfgiundercurrentwarninglevel', 'cfg_I_UndercurrentWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiunderloadinhibittime': Channel('cfgiunderloadinhibittime', 'cfg_I_UnderloadInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiunderloadtripdelay': Channel('cfgiunderloadtripdelay', 'cfg_I_UnderloadTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiunderloadtriplevel': Channel('cfgiunderloadtriplevel', 'cfg_I_UnderloadTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgiunderloadwarninglevel': Channel('cfgiunderloadwarninglevel', 'cfg_I_UnderloadWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgoverloadtripcountlimit': Channel('cfgoverloadtripcountlimit', 'cfg_OverloadTripCountLimit', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'cfgplphaselossinhibittime': Channel('cfgplphaselossinhibittime', 'cfg_PL_PhaseLossInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgplphaselosstripdelay': Channel('cfgplphaselosstripdelay', 'cfg_PL_PhaseLossTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgread': Channel('cfgread', 'cfg_READ', 86400, self.sendtodbJSON, writeable=True, e300_param=False), - 'cfgspecificgravity': Channel('cfgspecificgravity', 'cfg_SpecificGravity', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'cfgtcuolresetlevel': Channel('cfgtcuolresetlevel', 'cfg_TCU_OLResetLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgtcuolwarninglevel': Channel('cfgtcuolwarninglevel', 'cfg_TCU_OLWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgtcutripclass': Channel('cfgtcutripclass', 'cfg_TCU_TripClass', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgtimermodeenabled': Channel('cfgtimermodeenabled', 'cfg_TimerModeEnabled', 86400, self.sendtodbJSON, writeable=True, e300_param=False), - 'cfgtimerruntime': Channel('cfgtimerruntime', 'cfg_TimerRunTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'cfgtimerwaittime': Channel('cfgtimerwaittime', 'cfg_TimerWaitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'cfgtripcountlimit': Channel('cfgtripcountlimit', 'cfg_TripCountLimit', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'cfgvoverfrequencyinhibittime': Channel('cfgvoverfrequencyinhibittime', 'cfg_V_OverfrequencyInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvoverfrequencytripdelay': Channel('cfgvoverfrequencytripdelay', 'cfg_V_OverfrequencyTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvoverfrequencytriplevel': Channel('cfgvoverfrequencytriplevel', 'cfg_V_OverfrequencyTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvoverfrequencywarninglevel': Channel('cfgvoverfrequencywarninglevel', 'cfg_V_OverfrequencyWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvovervoltageinhibittime': Channel('cfgvovervoltageinhibittime', 'cfg_V_OvervoltageInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvovervoltagetripdelay': Channel('cfgvovervoltagetripdelay', 'cfg_V_OvervoltageTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvovervoltagetriplevel': Channel('cfgvovervoltagetriplevel', 'cfg_V_OvervoltageTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvovervoltagewarninglevel': Channel('cfgvovervoltagewarninglevel', 'cfg_V_OvervoltageWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvphaserotationinhibittime': Channel('cfgvphaserotationinhibittime', 'cfg_V_PhaseRotationInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvphaserotationtriptype': Channel('cfgvphaserotationtriptype', 'cfg_V_PhaseRotationTripType', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvptprimary': Channel('cfgvptprimary', 'cfg_V_PTPrimary', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvptsecondary': Channel('cfgvptsecondary', 'cfg_V_PTSecondary', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvunderfrequencyinhibittime': Channel('cfgvunderfrequencyinhibittime', 'cfg_V_UnderfrequencyInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvunderfrequencytripdelay': Channel('cfgvunderfrequencytripdelay', 'cfg_V_UnderfrequencyTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvunderfrequencytriplevel': Channel('cfgvunderfrequencytriplevel', 'cfg_V_UnderfrequencyTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvunderfrequencywarninglevel': Channel('cfgvunderfrequencywarninglevel', 'cfg_V_UnderfrequencyWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvundervoltageinhibittime': Channel('cfgvundervoltageinhibittime', 'cfg_V_UndervoltageInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvundervoltagetripdelay': Channel('cfgvundervoltagetripdelay', 'cfg_V_UndervoltageTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvundervoltagetriplevel': Channel('cfgvundervoltagetriplevel', 'cfg_V_UndervoltageTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvundervoltagewarninglevel': Channel('cfgvundervoltagewarninglevel', 'cfg_V_UndervoltageWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvvoltageimbalanceinhibittim': Channel('cfgvvoltageimbalanceinhibittim', 'cfg_V_VoltageImbalanceInhibitTime', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvvoltageimbalancetripdelay': Channel('cfgvvoltageimbalancetripdelay', 'cfg_V_VoltageImbalanceTripDelay', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvvoltageimbalancetriplevel': Channel('cfgvvoltageimbalancetriplevel', 'cfg_V_VoltageImbalanceTripLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvvoltageimbalancewarninglev': Channel('cfgvvoltageimbalancewarninglev', 'cfg_V_VoltageImbalanceWarningLevel', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgvvoltagemode': Channel('cfgvvoltagemode', 'cfg_V_VoltageMode', 86400, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=True), - 'cfgwrite': Channel('cfgwrite', 'cfg_WRITE', 86400, self.sendtodbJSON, writeable=True, e300_param=False), - 'contactorstatus': Channel('contactorstatus', 'Contactor_Status', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'devicestatus': Channel('devicestatus', 'Device_Status_INT', 3600, self.sendtodb, writeable=False, e300_param=False, map_obj=device_status), - 'dhdownholestatusint': Channel('dhdownholestatusint', 'DH_DownholeStatus_INT', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhfluidlevel': Channel('dhfluidlevel', 'DH_Fluid_Level', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhintakepressure': Channel('dhintakepressure', 'DH_IntakePressure', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhintaketemperature': Channel('dhintaketemperature', 'DH_IntakeTemperature', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhmaxintakepressureforever': Channel('dhmaxintakepressureforever', 'DH_MaxIntakePressure_Forever', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhmaxintakepressurestartup': Channel('dhmaxintakepressurestartup', 'DH_MaxIntakePressure_Startup', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhmaxintaketemperatureforever': Channel('dhmaxintaketemperatureforever', 'DH_MaxIntakeTemperature_Forever', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhmaxintaketemperaturestartup': Channel('dhmaxintaketemperaturestartup', 'DH_MaxIntakeTemperature_Startup', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhnumchannels': Channel('dhnumchannels', 'DH_NumChannels', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhpsirating': Channel('dhpsirating', 'DH_PSIRating', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhtooltype': Channel('dhtooltype', 'DH_ToolType', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'dhtoolvoltage': Channel('dhtoolvoltage', 'DH_ToolVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'downholetoolenabled': Channel('downholetoolenabled', 'Downhole_Tool_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'downtimetimeparameter': Channel('downtimetimeparameter', 'Downtime_Time_Parameter', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'downtimetimeparameterol': Channel('downtimetimeparameterol', 'Downtime_Time_Parameter_OL', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'e300averagecurrent': Channel('e300averagecurrent', 'E300_AverageCurrent', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300averagellvoltage': Channel('e300averagellvoltage', 'E300_AverageLLVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300averagelnvoltage': Channel('e300averagelnvoltage', 'E300_AverageLNVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300kwh': Channel('e300kwh', 'E300_kWh', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300kwhregen': Channel('e300kwhregen', 'E300_kWh_Regen', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1apparentpower': Channel('e300l1apparentpower', 'E300_L1ApparentPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1current': Channel('e300l1current', 'E300_L1Current', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1l2voltage': Channel('e300l1l2voltage', 'E300_L1L2Voltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1nvoltage': Channel('e300l1nvoltage', 'E300_L1NVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1reactivepower': Channel('e300l1reactivepower', 'E300_L1ReactivePower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1realpower': Channel('e300l1realpower', 'E300_L1RealPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l1truepowerfactor': Channel('e300l1truepowerfactor', 'E300_L1TruePowerFactor', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2apparentpower': Channel('e300l2apparentpower', 'E300_L2ApparentPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2current': Channel('e300l2current', 'E300_L2Current', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2l3voltage': Channel('e300l2l3voltage', 'E300_L2L3Voltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2nvoltage': Channel('e300l2nvoltage', 'E300_L2NVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2reactivepower': Channel('e300l2reactivepower', 'E300_L2ReactivePower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2realpower': Channel('e300l2realpower', 'E300_L2RealPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l2truepowerfactor': Channel('e300l2truepowerfactor', 'E300_L2TruePowerFactor', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3apparentpower': Channel('e300l3apparentpower', 'E300_L3ApparentPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3current': Channel('e300l3current', 'E300_L3Current', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3l1voltage': Channel('e300l3l1voltage', 'E300_L3L1Voltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3nvoltage': Channel('e300l3nvoltage', 'E300_L3NVoltage', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3reactivepower': Channel('e300l3reactivepower', 'E300_L3ReactivePower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3realpower': Channel('e300l3realpower', 'E300_L3RealPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300l3truepowerfactor': Channel('e300l3truepowerfactor', 'E300_L3TruePowerFactor', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300linefrequency': Channel('e300linefrequency', 'E300_LineFrequency', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300percentcurrentunbalance': Channel('e300percentcurrentunbalance', 'E300_PercentCurrentUnbalance', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300percentvoltageunbalance': Channel('e300percentvoltageunbalance', 'E300_PercentVoltageUnbalance', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300threephasetruepowerfactor': Channel('e300threephasetruepowerfactor', 'E300_ThreePhaseTruePowerFactor', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300totalapparentpower': Channel('e300totalapparentpower', 'E300_TotalApparentPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300totalreactivepower': Channel('e300totalreactivepower', 'E300_TotalReactivePower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'e300totalrealpower': Channel('e300totalrealpower', 'E300_TotalRealPower', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'flowrate': Channel('flowrate', 'Flowrate', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'handmode': Channel('handmode', 'Hand_Mode', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'overloadtrip': Channel('overloadtrip', 'OverloadTrip', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'pressurealarmdelay': Channel('pressurealarmdelay', 'Pressure_Alarm_Delay', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressurealarmstartupdelay': Channel('pressurealarmstartupdelay', 'Pressure_Alarm_Startup_Delay', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressureeumax': Channel('pressureeumax', 'Pressure_EU_Max', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressureeumin': Channel('pressureeumin', 'Pressure_EU_Min', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressurehi': Channel('pressurehi', 'Pressure_Hi', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'pressurehisp': Channel('pressurehisp', 'Pressure_Hi_SP', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressurein': Channel('pressurein', 'Pressure_In', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'pressurelo': Channel('pressurelo', 'Pressure_Lo', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'pressurelosp': Channel('pressurelosp', 'Pressure_Lo_SP', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressureok': Channel('pressureok', 'Pressure_OK', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'pressureshutdown': Channel('pressureshutdown', 'Pressure_Shutdown', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressureshutdownenabled': Channel('pressureshutdownenabled', 'Pressure_Shutdown_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'pressurestartup': Channel('pressurestartup', 'Pressure_Startup', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'pressurestartupenabled': Channel('pressurestartupenabled', 'Pressure_Startup_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'pressureswitchenabled': Channel('pressureswitchenabled', 'Pressure_Switch_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'pressuretransducerenabled': Channel('pressuretransducerenabled', 'Pressure_Transducer_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'rpmode': Channel('rpmode', 'RP_Mode', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'rppressure': Channel('rppressure', 'RP_Pressure', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'rptemperature': Channel('rptemperature', 'RP_Temperature', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'rptrip': Channel('rptrip', 'RP_Trip', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'rptubingpressure': Channel('rptubingpressure', 'RP_TubingPressure', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'runpermissive': Channel('runpermissive', 'Run_Permissive', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'spmode': Channel('spmode', 'SP_Mode', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'sppressure': Channel('sppressure', 'SP_Pressure', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'sptemperature': Channel('sptemperature', 'SP_Temperature', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'sptrip': Channel('sptrip', 'SP_Trip', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'spvoltage': Channel('spvoltage', 'SP_Voltage', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'startbutton': Channel('startbutton', 'Start_Button', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'startcommand': Channel('startcommand', 'Start_Command', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'startpermissive': Channel('startpermissive', 'Start_Permissive', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'stopcommand': Channel('stopcommand', 'Stop_Command', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tempshutdown': Channel('tempshutdown', 'Temp_Shutdown', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'tempshutdownenabled': Channel('tempshutdownenabled', 'Temp_Shutdown_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tempstartup': Channel('tempstartup', 'Temp_Startup', 3600, self.sendtodbJSON, writeable=True, change_threshold=1.0, e300_param=False), - 'tempstartupenabled': Channel('tempstartupenabled', 'Temp_Startup_Enabled', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'testmode': Channel('testmode', 'Test_Mode', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'tripenabledicurrentimbalance': Channel('tripenabledicurrentimbalance', 'TripEnabled_I_CurrentImbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenabledigroundfault': Channel('tripenabledigroundfault', 'TripEnabled_I_GroundFault', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenabledijam': Channel('tripenabledijam', 'TripEnabled_I_Jam', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenabledilineloss': Channel('tripenabledilineloss', 'TripEnabled_I_LineLoss', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablediovercurrent': Channel('tripenablediovercurrent', 'TripEnabled_I_Overcurrent', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenabledioverload': Channel('tripenabledioverload', 'TripEnabled_I_Overload', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablediphaseloss': Channel('tripenablediphaseloss', 'TripEnabled_I_PhaseLoss', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenabledistall': Channel('tripenabledistall', 'TripEnabled_I_Stall', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablediundercurrent': Channel('tripenablediundercurrent', 'TripEnabled_I_Undercurrent', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablediunderload': Channel('tripenablediunderload', 'TripEnabled_I_Underload', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevoverfrequency': Channel('tripenablevoverfrequency', 'TripEnable_V_Overfrequency', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevovervoltage': Channel('tripenablevovervoltage', 'TripEnable_V_Overvoltage', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevphaserotation': Channel('tripenablevphaserotation', 'TripEnable_V_PhaseRotation', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevunderfrequency': Channel('tripenablevunderfrequency', 'TripEnable_V_Underfrequency', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevundervoltage': Channel('tripenablevundervoltage', 'TripEnable_V_Undervoltage', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripenablevvoltageunbalance': Channel('tripenablevvoltageunbalance', 'TripEnable_V_VoltageUnbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripresetcmd': Channel('tripresetcmd', 'TripResetCmd', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'tripstatus': Channel('tripstatus', 'TripStatus', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'tripstatuscontrolint': Channel('tripstatuscontrolint', 'TripStatusControl_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_control), - 'tripstatuscurrentint': Channel('tripstatuscurrentint', 'TripStatusCurrent_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_current), - 'tripstatuspowerint': Channel('tripstatuspowerint', 'TripStatusPower_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_power), - 'tripstatusvoltageint': Channel('tripstatusvoltageint', 'TripStatusVoltage_INT', 3600, self.sendtodb, writeable=False, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), - 'valoverloadtripcount': Channel('valoverloadtripcount', 'val_OverloadTripCount', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'valtripcount': Channel('valtripcount', 'val_TripCount', 3600, self.sendtodbJSON, writeable=False, change_threshold=1.0, e300_param=False), - 'voltageok': Channel('voltageok', 'VoltageOK', 3600, self.sendtodbJSON, writeable=False, e300_param=False), - 'warningenabledicurrentimbalanc': Channel('warningenabledicurrentimbalanc', 'WarningEnabled_I_CurrentImbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenabledigroundfault': Channel('warningenabledigroundfault', 'WarningEnabled_I_GroundFault', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenabledijam': Channel('warningenabledijam', 'WarningEnabled_I_Jam', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenabledilineloss': Channel('warningenabledilineloss', 'WarningEnabled_I_LineLoss', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablediovercurrent': Channel('warningenablediovercurrent', 'WarningEnabled_I_Overcurrent', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenabledioverload': Channel('warningenabledioverload', 'WarningEnabled_I_Overload', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablediphaseloss': Channel('warningenablediphaseloss', 'WarningEnabled_I_PhaseLoss', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenabledistall': Channel('warningenabledistall', 'WarningEnabled_I_Stall', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablediundercurrent': Channel('warningenablediundercurrent', 'WarningEnabled_I_Undercurrent', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablediunderload': Channel('warningenablediunderload', 'WarningEnabled_I_Underload', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevoverfrequency': Channel('warningenablevoverfrequency', 'WarningEnable_V_Overfrequency', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevovervoltage': Channel('warningenablevovervoltage', 'WarningEnable_V_Overvoltage', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevphaserotation': Channel('warningenablevphaserotation', 'WarningEnable_V_PhaseRotation', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevunderfrequency': Channel('warningenablevunderfrequency', 'WarningEnable_V_Underfrequency', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevundervoltage': Channel('warningenablevundervoltage', 'WarningEnable_V_Undervoltage', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningenablevvoltageunbalance': Channel('warningenablevvoltageunbalance', 'WarningEnable_V_VoltageUnbalance', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningstatus': Channel('warningstatus', 'WarningStatus', 3600, self.sendtodbJSON, writeable=True, e300_param=False), - 'warningstatuscontrolint': Channel('warningstatuscontrolint', 'WarningStatusControl_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_control), - 'warningstatuscurrentint': Channel('warningstatuscurrentint', 'WarningStatusCurrent_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_current), - 'warningstatuspowerint': Channel('warningstatuspowerint', 'WarningStatusPower_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_power), - 'warningstatusvoltageint': Channel('warningstatusvoltageint', 'WarningStatusVoltage_INT', 3600, self.sendtodb, writeable=True, change_threshold=1.0, e300_param=False, map_obj=e300_voltage), - } + self.daemon = True + self.version = "9" + self.finished = threading.Event() + self.forceSend = False + threading.Thread.start(self) - def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None): - global addr, version - threading.Thread.__init__(self) - deviceBase.__init__(self, name=name, number=number, mac=mac, Q=Q, mcu=mcu, companyId=companyId, offset=offset, mqtt=mqtt, Nodes=Nodes) + # this is a required function for all drivers, its goal is to upload some piece of data + # about your device so it can be seen on the web + def register(self): + """Register the driver.""" + pass - self.daemon = True - self.version = version - self.device_address = addr - if os.path.exists('./plcaddr.json'): - with open('plcaddr.json', "rb") as addr_file: - data = json.loads(addr_file.read()) - if data['plc_address']: - try: - socket.inet_aton(data['plc_address']) - addr = data['plc_address'] - self.device_address = addr - print("USING {} AS PLC IP ADDRESS (FROM JSON)".format(addr)) - except: - print("plc_address exists in plcaddr.json, but it's not a valid ip address") - else: - print("no plc_address in plcaddr.json") - else: - 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) + def run(self): + """Actually run the driver.""" + wait_sec = 30 + for i in range(0, wait_sec): + print("ipp driver will start in {} seconds".format(wait_sec - i)) + time.sleep(1) + logger.info("BOOM! Starting ipp driver...") - self.finished = threading.Event() - threading.Thread.start(self) - self.sendtodbJSON("plcipaddress", self.device_address, 0) - try: - self.setupChannels() - except: - print("Unable to initialize channels...") - traceback.print_exc() - self.e300_warning = "" - self.e300_trip = "" - # self.updateGPS() + public_ip_address = get_public_ip_address() + self.sendtodb('public_ip_address', public_ip_address, 0) - # this is a required function for all drivers, its goal is to upload some piece of data - # about your device so it can be seen on the web - def register(self): - self.channels["status"]["last_value"] = "" + send_loops = 0 + watchdog_loops = 0 + watchdog_check_after = 5000 + while True: + if self.forceSend: + logger.warning("FORCE SEND: TRUE") - def run(self): - global channels - print("****************\n*************\nEXECUTING RUN\n********************\n****************") - self.runLoopStatus = "" - last_OK_state = 0 - while True: - if len(channels) > 0: - try: - for i in channels: - channels[i].read() - runLoopStatus = i - time.sleep(0.25) + for c in CHANNELS: + v = c.read() + if c.check(v, self.forceSend): + self.sendtodb(c.mesh_name, c.value, 0) - if not (channels['tripstatuscurrentint'].last_value == "None"): - if not (self.e300_trip == channels['tripstatuscurrentint'].last_value): - self.e300_trip = channels['tripstatuscurrentint'].last_value - self.sendtodb("e300tripstatus", self.e300_trip, time.time()) - elif not (channels['tripstatusvoltageint'].last_value == "None"): - if not (self.e300_trip == channels['tripstatusvoltageint'].last_value): - self.e300_trip = channels['tripstatusvoltageint'].last_value - self.sendtodb("e300tripstatus", self.e300_trip, time.time()) - elif not (channels['tripstatuscontrolint'].last_value == "None"): - if not (self.e300_trip == channels['tripstatuscontrolint'].last_value): - self.e300_trip = channels['tripstatuscontrolint'].last_value - self.sendtodb("e300tripstatus", self.e300_trip, time.time()) - elif not (channels['tripstatuspowerint'].last_value == "None"): - if not (self.e300_trip == channels['tripstatuspowerint'].last_value): - self.e300_trip = channels['tripstatuspowerint'].last_value - self.sendtodb("e300tripstatus", self.e300_trip, time.time()) - else: - if not (self.e300_trip == "None"): - self.e300_trip = "None" - # self.sendtodb("e300tripstatus", self.e300_trip, time.time()) + if self.forceSend: + if send_loops > 2: + logger.warning("Turning off forceSend") + self.forceSend = False + send_loops = 0 + else: + send_loops += 1 - if not (channels['warningstatuscurrentint'].last_value == "None"): - if not (self.e300_warning == channels['warningstatuscurrentint'].last_value): - self.e300_warning = channels['warningstatuscurrentint'].last_value - self.sendtodb("e300warningstatus", self.e300_warning, time.time()) - elif not (channels['warningstatusvoltageint'].last_value == "None"): - if not (self.e300_warning == channels['warningstatusvoltageint'].last_value): - self.e300_warning = channels['warningstatusvoltageint'].last_value - self.sendtodb("e300warningstatus", self.e300_warning, time.time()) - elif not (channels['warningstatuscontrolint'].last_value == "None"): - if not (self.e300_warning == channels['warningstatuscontrolint'].last_value): - self.e300_warning = channels['warningstatuscontrolint'].last_value - self.sendtodb("e300warningstatus", self.e300_warning, time.time()) - elif not (channels['warningstatuspowerint'].last_value == "None"): - if not (self.e300_warning == channels['warningstatuspowerint'].last_value): - self.e300_warning = channels['warningstatuspowerint'].last_value - self.sendtodb("e300warningstatus", self.e300_warning, time.time()) - else: - if not (self.e300_warning == "None"): - self.e300_warning = "None" - # self.sendtodb("e300warningstatus", self.e300_warning, time.time()) + watchdog_loops += 1 + if (watchdog_loops >= watchdog_check_after): + test_public_ip = get_public_ip_address() + if not test_public_ip == public_ip_address: + self.sendtodb('public_ip_address', test_public_ip, 0) + public_ip_address = test_public_ip + watchdog_loops = 0 + time.sleep(10) - runLoopStatus = "Complete" - OK_state = 1 - if not OK_state == last_OK_state: - self.sendtodbJSON("driver_ok", OK_state, 0) - last_OK_state = OK_state - time.sleep(10) - except Exception, e: - OK_state = 0 - if not OK_state == last_OK_state: - self.sendtodbJSON("driver_ok", OK_state, 0) - last_OK_state = OK_state - sleep_timer = 30 - print "Error during {0} of run loop: {1}\nWill try again in {2} seconds...".format(runLoopStatus, e, sleep_timer) - time.sleep(sleep_timer) - else: - print("Apparently no channels... length shows {0}".format(len(channels))) - self.setupChannels() - time.sleep(30) - - def ipp_sync(self, name, value): - self.sendtodb("connected", "true", 0) - return True - - def genericSet(self, name, value, id): - global channels - try: - print("Trying to set {} to {}".format(channels[name].tag, value)) - return channels[name].write(value) - except Exception, e: - print("Exception during genericSet: {}".format(e)) - - def ipp_plcipaddress(self, name, value): - global addr - value_ascii = value.encode('ascii', 'ignore') - try: - socket.inet_aton(value_ascii) - addr = value_ascii - self.device_address = addr - with open("plcaddr.json", "wb") as addr_file: - json.dump({"plc_address": addr}, addr_file) - print("Set PLC IP Address to {}".format(addr)) - self.sendtodb("plcipaddress", addr, 0) - return True - except Exception, e: - r = "Unable to set PLC IP address to {}: {}".format(value_ascii, e) - print(r) - return r + def ipp_sync(self, name, value): + """Sync all data from the driver.""" + self.sendtodb("connected", "true", 0) + return True diff --git a/POCloud_Driver/maps.py b/POCloud_Driver/maps.py new file mode 100644 index 0000000..d5a7502 --- /dev/null +++ b/POCloud_Driver/maps.py @@ -0,0 +1,77 @@ +map_e300_current = { + 0: 'None', + 1: 'Overload', + 2: 'Phase Loss', + 4: 'Ground Fault', + 8: 'Stall', + 16: 'Jam', + 32: 'Underload', + 64: 'Current Imbalance', + 128: 'L1 Undercurrent', + 256: 'L2 Undercurrent', + 512: 'L3 Undercurrent', + 1024: 'L1 Overcurrent', + 2048: 'L2 Overcurrent', + 4096: 'L3 Overcurrent', + 8192: 'L1 Line Loss', + 16384: 'L2 Line Loss', + 32768: 'L3 Line Loss' +} + +map_e300_voltage = { + 0: 'None', + 1: 'Undervoltage', + 2: 'Overvoltage', + 4: 'Voltage Unbalance', + 8: 'Phase Rotation', + 16: 'Overfrequency' +} + +map_e300_control = { + 0: 'None', + 1: 'Test Trip', + 2: 'DLX Trip', + 4: 'PTC Trip', + 8: 'Operator Station Trip', + 16: 'Remote Trip', + 32: 'Blocked Start Trip', + 64: 'Hardware Fault Trip', + 128: 'Config Trip', + 256: 'Option Match Trip', + 512: 'DLX FB Timeout Trip', + 1024: 'Expansion Bus Trip', + 2048: 'Reserved', + 4096: 'Reserved', + 8192: 'NVS Trip', + 16384: 'Test Mode Trip' +} + +map_e300_power = { + 0: 'None', + 1: 'Under kW', + 2: 'Over kW', + 4: 'Under kVAR Consumed', + 8: 'Over kVAR Consumed', + 16: 'Under kVAR Generated', + 32: 'Over kVAR Generated', + 64: 'Under kVA', + 128: 'Over kVA', + 256: 'Under PF Lag', + 512: 'Over PF Lag', + 1024: 'Under PF Lead', + 2048: 'Over PF Lead' +} + +map_device_status = { + 1: "Startup", + 2: "Not ready to start", + 3: "Ready to start", + 4: "Lost run permissive", + 5: "Not able to restart - Overload Limit", + 6: "Not able to restart - Trip Limit", + 7: "Waiting to attempt restart", + 8: "Waiting to attempt restart (Overload)", + 9: "Running", + 10: "User stopped", + 11: "Waiting to start (Timer Mode)" +} diff --git a/POCloud_Driver/micro800.py b/POCloud_Driver/micro800.py deleted file mode 100644 index fd9e885..0000000 --- a/POCloud_Driver/micro800.py +++ /dev/null @@ -1,119 +0,0 @@ -from pycomm.ab_comm.clx import Driver as plcDriver -import sys - - -def readMicroTag(addr, tag): - addr = str(addr) - tag = str(tag) - c = plcDriver() - if c.open(addr, True): - try: - v = c.read_tag(tag) - # print(v) - return v - except Exception: - err = c.get_status() - c.close() - print "{} on reading {} from {}".format(err, tag, addr) - pass - c.close() - - -def getTagType(addr, tag): - addr = str(addr) - tag = str(tag) - c = plcDriver() - if c.open(addr, True): - try: - return c.read_tag(tag)[1] - except Exception: - err = c.get_status() - c.close() - print err - pass - c.close() - - -def write(addr, tag, val, t): - addr = str(addr) - tag = str(tag) - c = plcDriver() - if c.open(addr, True): - try: - wt = c.write_tag(tag, val, t) - return wt - except Exception: - err = c.get_status() - c.close() - print("Write Error: {} setting {} at {} to {} type {}".format(err, tag, addr, val, t)) - return False - c.close() - - -def closeEnough(a, b): - return abs(a - b) <= 0.001 - - -def writeMicroTag(addr, tag, val, handshake=None, handshake_val=None): - addr = str(addr) - tag = str(tag) - print("handshake: {}, handshake_val: {}".format(handshake, handshake_val)) - chk_tag = tag - if not(handshake is None) and not(handshake == "None"): - chk_tag = str(handshake) - print("Handshake tag passed, using {}".format(chk_tag)) - chk_val = val - if not (handshake_val is None) and not(handshake_val == "None"): - chk_val = handshake_val - print("Handshake value passed, using {}".format(chk_val)) - attempts_allowed = 5 - attempts = 1 - - while attempts <= attempts_allowed: - try: - attempts = attempts + 1 - cv = readMicroTag(addr, tag) - print("Val Before Write: {}".format(cv)) - if cv: - if cv[1] == "REAL": - val = float(val) - chk_val = float(chk_val) - else: - val = int(val) - chk_val = int(chk_val) - wt = write(addr, tag, val, cv[1]) - if wt: - print("write: {}".format(wt)) - chk = readMicroTag(addr, chk_tag) - if chk: - print("chk: {}, chk_val: {}".format(chk, chk_val)) - if closeEnough(chk[0], chk_val): - return True - except Exception as e: - print e - return False - - -def readMicroTagList(addr, tList): - addr = str(addr) - c = plcDriver() - if c.open(addr, True): - vals = [] - try: - for t in tList: - v = c.read_tag(t) - vals.append({"tag": t, "val": v[0], "type": v[1]}) - # print(v) - # print("{0} - {1}".format(t, v)) - except Exception: - err = c.get_status() - c.close() - print err - pass - c.close() - return vals -if __name__ == '__main__': - if len(sys.argv) > 2: - print(readMicroTag(sys.argv[1], sys.argv[2])) - else: - print ("Did not pass a target and tag name.") diff --git a/POCloud_Driver/modbusMap.json b/POCloud_Driver/modbusMap.json deleted file mode 100644 index 061984f..0000000 --- a/POCloud_Driver/modbusMap.json +++ /dev/null @@ -1,405 +0,0 @@ -{"ID":null,"name":"Doe","first-name":"John","age":25,"hobbies":["reading","cinema",{"sports":["volley-ball","badminton"]}],"address":{}} -{ - - "1":{ - "c":"ETHERNET/IP", - "b":"10.20.158.3", - "addresses":{ - "300":{ - "2-2":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"cfgspmtarget", - "un":"1", - "dn":"henryhyd", - "da":"300", - "lrt":1471892551.0022135, - "r":"0-20", - "a":"cfg_SPMTarget", - "c":"0", - "misc_u":"SPM", - "f":"1", - "mrt":"15", - "m":"none", - "m1ch":"2-2", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-3":{ - "bytary":null, - "vm":{ - }, - "ct":"number", - "le":"16", - "grp":"3600", - "la":0, - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471974386.0297532, - "r":"0-1", - "a":"cmd_Run", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-3", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-1":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"stsenginerunning", - "un":"1", - "dn":"henryhyd", - "da":"300", - "lrt":1468878718.76403, - "r":"0-1", - "a":"sts_EngineRunning", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-1", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-6":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892533.1567128, - "r":"0-1", - "a":"cmd_EngineStart", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-6", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-7":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892513.008441, - "r":"0-1", - "a":"cmd_EngineStop", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-7", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-4":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892514.166909, - "r":"0-150", - "a":"val_EngineOilPressure", - "c":"0", - "misc_u":" PSI", - "f":"1", - "mrt":"10", - "m":"none", - "m1ch":"2-4", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-5":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892558.0009384, - "r":"0-500", - "a":"time_EngineHourMeter", - "c":"0", - "misc_u":"Hours", - "f":"1", - "mrt":"60", - "m":"none", - "m1ch":"2-5", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-8":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892537.8492658, - "r":"0-1", - "a":"cmd_Start", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-8", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-9":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"", - "un":"", - "dn":"M1", - "da":"300", - "lrt":1471892538.997888, - "r":"0-1", - "a":"cmd_Stop", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"1", - "m":"none", - "m1ch":"2-9", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-14":{ - "bytary":null, - "vm":{ - "1":"Starting", - "0":"Stopped", - "3":"Stopping", - "2":"Running" - }, - "ct":"number", - "le":"16", - "grp":"3600", - "la":"", - "chn":"stsengineint", - "un":"1", - "dn":"henryhyd", - "da":"300", - "lrt":1471892540.141906, - "r":"0-5", - "a":"sts_EngineINT", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"10", - "m":"none", - "m1ch":"2-14", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-10":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"3500", - "la":0, - "chn":"automode", - "un":"1", - "dn":"ipp", - "da":"300", - "lrt":1471974396.231401, - "r":"0-1", - "a":"Auto_Mode", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"60", - "m":"none", - "m1ch":"2-10", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-11":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"86400", - "la":0.0, - "chn":"cfgcflasetting", - "un":"1", - "dn":"ipp", - "da":"300", - "lrt":1471974397.360571, - "r":"0-200", - "a":"cfg_C_FLASetting", - "c":"0", - "misc_u":"A", - "f":"1", - "mrt":"60", - "m":"none", - "m1ch":"2-11", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-12":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"86400", - "la":60, - "chn":"cfgcleartripcountafter", - "un":"1", - "dn":"ipp", - "da":"300", - "lrt":1471974398.501199, - "r":"0-3600", - "a":"cfg_ClearTripCountAfter", - "c":"0", - "misc_u":"sec", - "f":"1", - "mrt":"60", - "m":"none", - "m1ch":"2-12", - "s":"On", - "mv":"0", - "t":"int" - }, - "2-13":{ - "bytary":null, - "vm":null, - "ct":"number", - "le":"16", - "grp":"86400", - "la":0, - "chn":"cfggfgroundfaultinhibittime", - "un":"1", - "dn":"ipp", - "da":"300", - "lrt":1471974399.6202452, - "r":"0-100", - "a":"cfg_GF_GroundFaultInhibitTime", - "c":"0", - "misc_u":"sec", - "f":"1", - "mrt":"60", - "m":"none", - "m1ch":"2-13", - "s":"On", - "mv":"0", - "t":"int" - } - } - }, - "f":"Off", - "p":"", - "s":"1" - }, - "2":{ - "c":"ETHERNET/IP", - "b":"10.20.158.3", - "addresses":{ - "300":{ - "4-1":{ - "bytary":null, - "vm":{ - "11":"Waiting to start (Timer Mode)", - "10":"User stopped", - "1":"Startup", - "3":"Ready to start", - "2":"Not ready to start", - "5":"Not able to restart - Overload Limit", - "4":"Lost run permissive", - "7":"Waiting to attempt restart", - "6":"Not able to restart - Trip Limit", - "9":"Running", - "8":"Waiting to attempt restart (Overload)" - }, - "ct":"number", - "le":"16", - "grp":"3600", - "la":0, - "chn":"devicestatus", - "un":"1", - "dn":"M1", - "da":"300", - "lrt":1471974334.856273, - "r":"", - "a":"Device_Status_INT", - "c":"0", - "misc_u":"", - "f":"1", - "mrt":"5", - "m":"none", - "m1ch":"4-1", - "s":"On", - "mv":"0", - "t":"int" - } - } - }, - "f":"Off", - "p":"", - "s":"1" - } - -} diff --git a/POCloud_Driver/modbusMap.p b/POCloud_Driver/modbusMap.p deleted file mode 100644 index e7f0096..0000000 --- a/POCloud_Driver/modbusMap.p +++ /dev/null @@ -1,1228 +0,0 @@ -(dp0 -S'1' -p1 -(dp2 -S'c' -p3 -VETHERNET/IP -p4 -sS'b' -p5 -V10.20.158.3 -p6 -sS'addresses' -p7 -(dp8 -V300 -p9 -(dp10 -V2-2 -p11 -(dp12 -Vbytary -p13 -NsVvm -p14 -NsVct -p15 -Vnumber -p16 -sVle -p17 -V16 -p18 -sVgrp -p19 -V3600 -p20 -sVla -p21 -S'' -p22 -sVchn -p23 -Vcfgspmtarget -p24 -sVun -p25 -V1 -p26 -sVdn -p27 -Vhenryhyd -p28 -sVda -p29 -V300 -p30 -sVlrt -p31 -F1471892551.0022134 -sVr -p32 -V0-20 -p33 -sVa -p34 -Vcfg_SPMTarget -p35 -sVc -p36 -V0 -p37 -sVmisc_u -p38 -VSPM -p39 -sVf -p40 -g26 -sVmrt -p41 -V15 -p42 -sVm -p43 -Vnone -p44 -sVm1ch -p45 -g11 -sVs -p46 -VOn -p47 -sVmv -p48 -g37 -sVt -p49 -Vint -p50 -ssV2-3 -p51 -(dp52 -Vbytary -p53 -NsVvm -p54 -(dp55 -sVct -p56 -Vnumber -p57 -sVle -p58 -V16 -p59 -sVgrp -p60 -V3600 -p61 -sVla -p62 -I0 -sVchn -p63 -V -p64 -sVun -p65 -g64 -sVdn -p66 -VM1 -p67 -sVda -p68 -V300 -p69 -sVlrt -p70 -F1471974386.0297531 -sVr -p71 -V0-1 -p72 -sVa -p73 -Vcmd_Run -p74 -sVc -p75 -V0 -p76 -sVmisc_u -p77 -g64 -sVf -p78 -V1 -p79 -sVmrt -p80 -g79 -sVm -p81 -Vnone -p82 -sVm1ch -p83 -g51 -sVs -p84 -VOn -p85 -sVmv -p86 -g76 -sVt -p87 -Vint -p88 -ssV2-1 -p89 -(dp90 -Vbytary -p91 -NsVvm -p92 -NsVct -p93 -Vnumber -p94 -sVle -p95 -V16 -p96 -sVgrp -p97 -V3600 -p98 -sVla -p99 -g22 -sVchn -p100 -Vstsenginerunning -p101 -sVun -p102 -V1 -p103 -sVdn -p104 -Vhenryhyd -p105 -sVda -p106 -V300 -p107 -sVlrt -p108 -F1468878718.76403 -sVr -p109 -V0-1 -p110 -sVa -p111 -Vsts_EngineRunning -p112 -sVc -p113 -V0 -p114 -sVmisc_u -p115 -g64 -sVf -p116 -g103 -sVmrt -p117 -g103 -sVm -p118 -Vnone -p119 -sVm1ch -p120 -g89 -sVs -p121 -VOn -p122 -sVmv -p123 -g114 -sVt -p124 -Vint -p125 -ssV2-6 -p126 -(dp127 -Vbytary -p128 -NsVvm -p129 -NsVct -p130 -Vnumber -p131 -sVle -p132 -V16 -p133 -sVgrp -p134 -V3600 -p135 -sVla -p136 -g22 -sVchn -p137 -g64 -sVun -p138 -g64 -sVdn -p139 -VM1 -p140 -sVda -p141 -V300 -p142 -sVlrt -p143 -F1471892533.1567127 -sg71 -V0-1 -p144 -sg73 -Vcmd_EngineStart -p145 -sg75 -g76 -sVmisc_u -p146 -g64 -sg78 -g79 -sVmrt -p147 -g79 -sg81 -Vnone -p148 -sS'm1ch' -p149 -g126 -sg84 -VOn -p150 -sVmv -p151 -g76 -sg87 -Vint -p152 -ssV2-7 -p153 -(dp154 -Vbytary -p155 -NsVvm -p156 -NsVct -p157 -Vnumber -p158 -sVle -p159 -V16 -p160 -sVgrp -p161 -V3600 -p162 -sVla -p163 -g22 -sVchn -p164 -g64 -sVun -p165 -g64 -sVdn -p166 -VM1 -p167 -sVda -p168 -V300 -p169 -sVlrt -p170 -F1471892513.008441 -sg71 -V0-1 -p171 -sg73 -Vcmd_EngineStop -p172 -sg75 -g76 -sVmisc_u -p173 -g64 -sg78 -g79 -sVmrt -p174 -g79 -sg81 -Vnone -p175 -sg149 -g153 -sg84 -VOn -p176 -sVmv -p177 -g76 -sg87 -Vint -p178 -ssV2-4 -p179 -(dp180 -Vbytary -p181 -NsVvm -p182 -NsVct -p183 -Vnumber -p184 -sVle -p185 -V16 -p186 -sVgrp -p187 -V3600 -p188 -sVla -p189 -g22 -sVchn -p190 -g64 -sVun -p191 -g64 -sVdn -p192 -VM1 -p193 -sVda -p194 -V300 -p195 -sVlrt -p196 -F1471892514.1669089 -sg71 -V0-150 -p197 -sg73 -Vval_EngineOilPressure -p198 -sg75 -g76 -sVmisc_u -p199 -V PSI -p200 -sg78 -g79 -sVmrt -p201 -V10 -p202 -sg81 -Vnone -p203 -sg149 -g179 -sg84 -VOn -p204 -sVmv -p205 -g76 -sg87 -Vint -p206 -ssV2-5 -p207 -(dp208 -Vbytary -p209 -NsVvm -p210 -NsVct -p211 -Vnumber -p212 -sVle -p213 -V16 -p214 -sVgrp -p215 -V3600 -p216 -sVla -p217 -g22 -sVchn -p218 -g64 -sVun -p219 -g64 -sVdn -p220 -VM1 -p221 -sVda -p222 -V300 -p223 -sVlrt -p224 -F1471892558.0009383 -sg71 -V0-500 -p225 -sg73 -Vtime_EngineHourMeter -p226 -sg75 -g76 -sVmisc_u -p227 -VHours -p228 -sg78 -g79 -sVmrt -p229 -V60 -p230 -sg81 -Vnone -p231 -sg149 -g207 -sg84 -VOn -p232 -sVmv -p233 -g76 -sg87 -Vint -p234 -ssV2-8 -p235 -(dp236 -Vbytary -p237 -NsVvm -p238 -NsVct -p239 -Vnumber -p240 -sVle -p241 -V16 -p242 -sVgrp -p243 -V3600 -p244 -sVla -p245 -g22 -sVchn -p246 -g64 -sVun -p247 -g64 -sVdn -p248 -VM1 -p249 -sVda -p250 -V300 -p251 -sVlrt -p252 -F1471892537.8492659 -sg71 -V0-1 -p253 -sg73 -Vcmd_Start -p254 -sg75 -g76 -sVmisc_u -p255 -g64 -sg78 -g79 -sVmrt -p256 -g79 -sg81 -Vnone -p257 -sg149 -g235 -sg84 -VOn -p258 -sVmv -p259 -g76 -sg87 -Vint -p260 -ssV2-9 -p261 -(dp262 -Vbytary -p263 -NsVvm -p264 -NsVct -p265 -Vnumber -p266 -sVle -p267 -V16 -p268 -sVgrp -p269 -V3600 -p270 -sVla -p271 -g22 -sVchn -p272 -g64 -sVun -p273 -g64 -sVdn -p274 -VM1 -p275 -sVda -p276 -V300 -p277 -sVlrt -p278 -F1471892538.997888 -sg71 -V0-1 -p279 -sg73 -Vcmd_Stop -p280 -sg75 -g76 -sVmisc_u -p281 -g64 -sg78 -g79 -sVmrt -p282 -g79 -sg81 -Vnone -p283 -sg149 -g261 -sg84 -VOn -p284 -sVmv -p285 -g76 -sg87 -Vint -p286 -ssV2-14 -p287 -(dp288 -Vbytary -p289 -NsVvm -p290 -(dp291 -V1 -p292 -VStarting -p293 -sV0 -p294 -VStopped -p295 -sV3 -p296 -VStopping -p297 -sV2 -p298 -VRunning -p299 -ssVct -p300 -Vnumber -p301 -sVle -p302 -V16 -p303 -sVgrp -p304 -V3600 -p305 -sVla -p306 -g22 -sVchn -p307 -Vstsengineint -p308 -sVun -p309 -g292 -sVdn -p310 -Vhenryhyd -p311 -sVda -p312 -V300 -p313 -sVlrt -p314 -F1471892540.1419061 -sVr -p315 -V0-5 -p316 -sVa -p317 -Vsts_EngineINT -p318 -sVc -p319 -g294 -sVmisc_u -p320 -g64 -sVf -p321 -g292 -sVmrt -p322 -V10 -p323 -sVm -p324 -Vnone -p325 -sS'm1ch' -p326 -g287 -sVs -p327 -VOn -p328 -sVmv -p329 -g294 -sVt -p330 -Vint -p331 -ssV2-10 -p332 -(dp333 -Vbytary -p334 -NsVvm -p335 -NsVct -p336 -Vnumber -p337 -sVle -p338 -V16 -p339 -sVgrp -p340 -V3500 -p341 -sVla -p342 -I0 -sVchn -p343 -Vautomode -p344 -sVun -p345 -V1 -p346 -sVdn -p347 -Vipp -p348 -sVda -p349 -V300 -p350 -sVlrt -p351 -F1471974396.231401 -sVr -p352 -V0-1 -p353 -sVa -p354 -VAuto_Mode -p355 -sVc -p356 -V0 -p357 -sVmisc_u -p358 -g64 -sVf -p359 -g346 -sVmrt -p360 -V60 -p361 -sVm -p362 -Vnone -p363 -sS'm1ch' -p364 -g332 -sVs -p365 -VOn -p366 -sVmv -p367 -g357 -sVt -p368 -Vint -p369 -ssV2-11 -p370 -(dp371 -Vbytary -p372 -NsVvm -p373 -NsVct -p374 -Vnumber -p375 -sVle -p376 -V16 -p377 -sVgrp -p378 -V86400 -p379 -sVla -p380 -F0.0 -sVchn -p381 -Vcfgcflasetting -p382 -sVun -p383 -g346 -sVdn -p384 -Vipp -p385 -sVda -p386 -V300 -p387 -sVlrt -p388 -F1471974397.360571 -sg352 -V0-200 -p389 -sg354 -Vcfg_C_FLASetting -p390 -sg356 -g357 -sVmisc_u -p391 -VA -p392 -sg359 -g346 -sVmrt -p393 -V60 -p394 -sg362 -Vnone -p395 -sg364 -g370 -sg365 -VOn -p396 -sVmv -p397 -g357 -sg368 -Vint -p398 -ssV2-12 -p399 -(dp400 -Vbytary -p401 -NsVvm -p402 -NsVct -p403 -Vnumber -p404 -sVle -p405 -V16 -p406 -sVgrp -p407 -V86400 -p408 -sVla -p409 -I60 -sVchn -p410 -Vcfgcleartripcountafter -p411 -sVun -p412 -g346 -sVdn -p413 -Vipp -p414 -sVda -p415 -V300 -p416 -sVlrt -p417 -F1471974398.5011989 -sg352 -V0-3600 -p418 -sg354 -Vcfg_ClearTripCountAfter -p419 -sg356 -g357 -sVmisc_u -p420 -Vsec -p421 -sg359 -g346 -sVmrt -p422 -V60 -p423 -sg362 -Vnone -p424 -sg364 -g399 -sg365 -VOn -p425 -sVmv -p426 -g357 -sg368 -Vint -p427 -ssV2-13 -p428 -(dp429 -Vbytary -p430 -NsVvm -p431 -NsVct -p432 -Vnumber -p433 -sVle -p434 -V16 -p435 -sVgrp -p436 -V86400 -p437 -sVla -p438 -I0 -sVchn -p439 -Vcfggfgroundfaultinhibittime -p440 -sVun -p441 -g346 -sVdn -p442 -Vipp -p443 -sVda -p444 -V300 -p445 -sVlrt -p446 -F1471974399.6202451 -sg352 -V0-100 -p447 -sg354 -Vcfg_GF_GroundFaultInhibitTime -p448 -sg356 -g357 -sVmisc_u -p449 -Vsec -p450 -sg359 -g346 -sVmrt -p451 -V60 -p452 -sg362 -Vnone -p453 -sg364 -g428 -sg365 -VOn -p454 -sVmv -p455 -g357 -sg368 -Vint -p456 -ssssS'f' -p457 -VOff -p458 -sS'p' -p459 -g64 -sS's' -p460 -V1 -p461 -ssS'2' -p462 -(dp463 -g3 -VETHERNET/IP -p464 -sg5 -V10.20.158.3 -p465 -sg7 -(dp466 -V300 -p467 -(dp468 -V4-1 -p469 -(dp470 -Vbytary -p471 -NsVvm -p472 -(dp473 -V11 -p474 -VWaiting to start (Timer Mode) -p475 -sV10 -p476 -VUser stopped -p477 -sg461 -VStartup -p478 -sV3 -p479 -VReady to start -p480 -sV2 -p481 -VNot ready to start -p482 -sV5 -p483 -VNot able to restart - Overload Limit -p484 -sV4 -p485 -VLost run permissive -p486 -sV7 -p487 -VWaiting to attempt restart -p488 -sV6 -p489 -VNot able to restart - Trip Limit -p490 -sV9 -p491 -VRunning -p492 -sV8 -p493 -VWaiting to attempt restart (Overload) -p494 -ssVct -p495 -Vnumber -p496 -sVle -p497 -V16 -p498 -sVgrp -p499 -V3600 -p500 -sVla -p501 -I0 -sVchn -p502 -Vdevicestatus -p503 -sVun -p504 -g461 -sVdn -p505 -VM1 -p506 -sVda -p507 -g467 -sVlrt -p508 -F1471974334.8562729 -sVr -p509 -g64 -sVa -p510 -VDevice_Status_INT -p511 -sVc -p512 -V0 -p513 -sVmisc_u -p514 -g64 -sVf -p515 -g461 -sVmrt -p516 -g483 -sVm -p517 -Vnone -p518 -sVm1ch -p519 -g469 -sVs -p520 -VOn -p521 -sVmv -p522 -g513 -sVt -p523 -Vint -p524 -ssssg457 -VOff -p525 -sg459 -g64 -sg460 -g461 -ss. \ No newline at end of file diff --git a/POCloud_Driver/modbusMap.py b/POCloud_Driver/modbusMap.py deleted file mode 100644 index aa7d27f..0000000 --- a/POCloud_Driver/modbusMap.py +++ /dev/null @@ -1,115 +0,0 @@ -modbusMap = { - '1': { - 'c': u'ETHERNET/IP', - 'b': u'10.20.4.5', - 'addresses': { - u'300': { - u'2-3': { - u'bytary': None, - u'vm': None, - u'ct': u'number', - u'le': u'16', - u'grp': u'3600', - u'la': 0, - u'chn': - u'automode', - u'un': u'1', - u'dn': u'M1', - u'da': u'300', - u'lrt': 1468595216.996952, - u'r': u'0-1', - u'a': u'Auto_Mode', - u'c': u'0.5', - u'misc_u': u'', - u'f': u'1', - u'mrt': u'60', - u'm': u'none', - 'm1ch': u'2-3', - u's': u'On', - u'mv': u'0', - u't': u'int' - }, u'2-1': { - u'bytary': None, - u'vm': None, - u'ct': u'number', - u'le': u'16', - u'grp': u'86400', - u'la': None, - u'chn': u'cfggfgroundfaultinhibittime', - u'un': u'1', - u'dn': u'M1', - u'da': u'300', - u'lrt': u'0', - u'r': u'0-100', - u'a': u'cfg_GF_GroundFaultInhibitTime', - u'c': u'0', - u'misc_u': u'sec', - u'f': u'1', - u'mrt': u'60', - u'm': u'none', - 'm1ch': u'2-1', - u's': u'On', - u'mv': u'0', - u't': u'int' - }, u'2-4': { - u'bytary': None, - u'vm': None, - u'ct': u'number', - u'le': u'16', - u'grp': u'86400', - u'la': 10.0, - u'chn': u'cfgcflasetting', - u'un': u'1', - u'dn': u'M1', - u'da': u'300', - u'lrt': 1468595218.131659, - u'r': u'0-200', - u'a': u'cfg_C_FLASetting', - u'c': u'0.5', - u'misc_u': u'A', - u'f': u'1', - u'mrt': u'60', - u'm': u'none', - 'm1ch': u'2-4', - u's': u'On', - u'mv': u'0', - u't': u'int' - }, u'2-5': { - u'bytary': None, - u'vm': None, - u'ct': u'number', - u'le': u'16', - u'grp': u'86400', - u'la': 60, - u'chn': u'cfgcleartripcountafter', - u'un': u'1', - u'dn': u'M1', - u'da': u'300', - u'lrt': 1468595210.837538, - u'r': u'0-86400', - u'a': u'cfg_ClearTripCountAfter', - u'c': u'0', - u'misc_u': u'sec', - u'f': u'1', - u'mrt': u'60', - u'm': u'none', - 'm1ch': u'2-5', - u's': u'On', - u'mv': u'0', - u't': u'int' - } - } - }, - 'f': u'Off', - 'p': u'', - 's': u'1' - }, - '2': { - 'c': u'none', - 'b': u'9600', - 'addresses': {}, - 'f': u'Off', - 'p': u'none', - 's': u'1' - } -} diff --git a/POCloud_Driver/parseTags.py b/POCloud_Driver/parseTags.py deleted file mode 100644 index e8710ab..0000000 --- a/POCloud_Driver/parseTags.py +++ /dev/null @@ -1,348 +0,0 @@ -import xml.etree.ElementTree as ET -tree = ET.parse('tags.xml') -root = tree.getroot() - -channels = {} -unreadable_channels = {} -ignored_channels = {} -writeable_channels = {} - -ignore_tags = [ - "cmd_Run", - "cmd_TimerRun", - "DH_DischargePressure", - "DH_DischargeTemperature", - "DH_VibrationX", - "DH_VibrationY", - "DH_WindingTemperature", - "DigitalInput_Status_0", - "DigitalInput_Status_1", - "DigitalInput_Status_2", - "DigitalInput_Status_3", - "DigitalInput_Status_4", - "DigitalInput_Status_5", - "E300_Config_Buffer", - "E300_OUTPUT_NUMBER", - "E300_OUTPUT_SET_CORRECTLY", - "E300_Output_Enable", - "E300_Output_Toggled", - "E300_SCAN_RATE", - "Enable_IO_Read", - "Pressure_OOT_Scans", - "Pressure_OOT_Seconds", - "Restart_Allowed", - "Restart_Command", - "Run_Time", - "Shutdown_Time" - "Start_Button", - "Start_Time", - "Start_Time_Set", - "sts_TimerRunTimeSet", - "sts_TimerCycleActive", - "sts_TimerWaitTimeSet", - "sts_TripCountIncreased", - "time_CurrentTime", - "time_TimerRunTime", - "time_TimerWaitTime", - "Time_Until_Startup", - "timer_RunTimeLeft", - "timer_WaitTimeLeft", - "TripResetWriteStatus", - "cfg_I_L1LossTripDelay", # Individual Line tags handled by generic Line tags - "cfg_I_L1_OvercurrentTripDelay", - "cfg_I_L1_OvercurrentTripLevel", - "cfg_I_L1_OvercurrentWarningLevel", - "cfg_I_L1_UndercurrentTripDelay", - "cfg_I_L1_UndercurrentTripLevel", - "cfg_I_L1_UndercurrentWarningLevel", - "cfg_I_L2LossTripDelay", - "cfg_I_L2_OvercurrentTripDelay", - "cfg_I_L2_OvercurrentTripLevel", - "cfg_I_L2_OvercurrentWarningLevel", - "cfg_I_L2_UndercurrentTripDelay", - "cfg_I_L2_UndercurrentTripLevel", - "cfg_I_L2_UndercurrentWarningLevel", - "cfg_I_L3LossTripDelay", - "cfg_I_L3_OvercurrentTripDelay", - "cfg_I_L3_OvercurrentTripLevel", - "cfg_I_L3_OvercurrentWarningLevel", - "cfg_I_L3_UndercurrentTripDelay", - "cfg_I_L3_UndercurrentTripLevel", - "cfg_I_L3_UndercurrentWarningLevel", - "cfg_I_TripEnableCurrent", # Enables get build by the enable bits - "cfg_I_WarningEnableCurrent", - "cfg_P_OverApparentPowerInhibitTime", # We're not going to worry about the power configuration for this panel - "cfg_P_OverApparentPowerTripDelay", - "cfg_P_OverApparentPowerTripLevel", - "cfg_P_OverApparentPowerWarningLevel", - "cfg_P_OverPowerFactorLagInhibitTime", - "cfg_P_OverPowerFactorLagTripDelay", - "cfg_P_OverPowerFactorLagTripLevel", - "cfg_P_OverPowerFactorLagWarningLevel", - "cfg_P_OverPowerFactorLeadInhibitTime", - "cfg_P_OverPowerFactorLeadTripDelay", - "cfg_P_OverPowerFactorLeadTripLevel", - "cfg_P_OverPowerFactorLeadWarningLevel", - "cfg_P_OverReactiveConsumedInhibitTime", - "cfg_P_OverReactiveConsumedTripDelay", - "cfg_P_OverReactiveConsumedTripLevel", - "cfg_P_OverReactiveConsumedWarningLevel", - "cfg_P_OverReactiveGeneratedInhibitTime", - "cfg_P_OverReactiveGeneratedTripDelay", - "cfg_P_OverReactiveGeneratedTripLevel", - "cfg_P_OverReactiveGeneratedWarningLevel", - "cfg_P_OverRealPowerInhibitTime", - "cfg_P_OverRealPowerTripDelay", - "cfg_P_OverRealPowerTripLevel", - "cfg_P_OverRealPowerWarningLevel", - "cfg_P_TripEnablePower", - "cfg_P_UnderApparentPowerInhibitTime", - "cfg_P_UnderApparentPowerTripDelay", - "cfg_P_UnderApparentPowerTripLevel", - "cfg_P_UnderApparentPowerWarningLevel", - "cfg_P_UnderPowerFactorLagInhibitTime", - "cfg_P_UnderPowerFactorLagTripDelay", - "cfg_P_UnderPowerFactorLagTripLevel", - "cfg_P_UnderPowerFactorLagWarningLevel", - "cfg_P_UnderPowerFactorLeadInhibitTime", - "cfg_P_UnderPowerFactorLeadTripDelay", - "cfg_P_UnderPowerFactorLeadTripLevel", - "cfg_P_UnderPowerFactorLeadWarningLevel", - "cfg_P_UnderReactiveConsumedInhibitTime", - "cfg_P_UnderReactiveConsumedTripDelay", - "cfg_P_UnderReactiveConsumedTripLevel", - "cfg_P_UnderReactiveConsumedWarningLevel", - "cfg_P_UnderReactiveGeneratedInhibitTime", - "cfg_P_UnderReactiveGeneratedTripDelay", - "cfg_P_UnderReactiveGeneratedTripLevel", - "cfg_P_UnderReactiveGeneratedWarningLevel", - "cfg_P_UnderRealPowerInhibitTime", - "cfg_P_UnderRealPowerTripDelay", - "cfg_P_UnderRealPowerTripLevel", - "cfg_P_UnderRealPowerWarningLevel", - "cfg_P_WarningEnablePower", - "cfg_V_TripEnableVoltage", - "cfg_V_WarningEnableVoltage" -] - -writeable_tags = [ - "cfg_C_FLASetting", - "cfg_C_TripEnableControl", - "cfg_C_WarningEnableControl", - "cfg_ClearTripCountAfter", - "cfg_GF_GroundFaultInhibitTime", - "cfg_GF_GroundFaultTripDelay", - "cfg_GF_GroundFaultTripLevel", - "cfg_GF_GroundFaultWarningDelay", - "cfg_GF_GroundFaultWarningLevel", - "cfg_I_CTPrimary", - "cfg_I_CTSecondary", - "cfg_I_CurrentImbalanceInhibitTime", - "cfg_I_CurrentImbalanceTripDelay", - "cfg_I_CurrentImbalanceTripLevel", - "cfg_I_CurrentImbalanceWarningLevel", - "cfg_I_JamInhibitTime", - "cfg_I_JamTripDelay", - "cfg_I_JamWarningLevel", - "cfg_I_LineLossInhibitTime", - "cfg_I_LineLossTripDelay", - "cfg_I_OvercurrentInhibitTime", - "cfg_I_OvercurrentTripDelay", - "cfg_I_OvercurrentTripLevel", - "cfg_I_OvercurrentWarningLevel", - "cfg_I_StallEnabledTime", - "cfg_I_StallTripLevel", - "cfg_I_UndercurrentInhibitTime", - "cfg_I_UndercurrentTripDelay", - "cfg_I_UndercurrentTripLevel", - "cfg_I_UndercurrentWarningLevel", - "cfg_I_UnderloadInhibitTime", - "cfg_I_UnderloadTripDelay", - "cfg_I_UnderloadTripLevel", - "cfg_I_UnderloadWarningLevel", - "cfg_OverloadTripCountLimit", - "cfg_PL_PhaseLossInhibitTime", - "cfg_PL_PhaseLossTripDelay", - "cfg_READ", - "cfg_SpecificGravity", - "cfg_TCU_TripClass", - "cfg_TimerModeEnabled", - "cfg_TimerRunTime", - "cfg_TimerWaitTime", - "cfg_TripCountLimit", - "cfg_V_OverfrequencyInhibitTime", - "cfg_V_OverfrequencyTripDelay", - "cfg_V_OverfrequencyTripLevel", - "cfg_V_OverfrequencyWarningLevel", - "cfg_V_OvervoltageInhibitTime", - "cfg_V_OvervoltageTripDelay", - "cfg_V_OvervoltageTripLevel", - "cfg_V_OvervoltageWarningLevel", - "cfg_V_PTPrimary", - "cfg_V_PTSecondary", - "cfg_V_PhaseRotationInhibitTime", - "cfg_V_PhaseRotationTripType", - "cfg_V_UnderfrequencyInhibitTime", - "cfg_V_UnderfrequencyTripDelay", - "cfg_V_UnderfrequencyTripLevel", - "cfg_V_UnderfrequencyWarningLevel", - "cfg_V_UndervoltageInhibitTime", - "cfg_V_UndervoltageTripDelay", - "cfg_V_UndervoltageTripLevel", - "cfg_V_UndervoltageWarningLevel", - "cfg_V_VoltageImbalanceInhibitTime", - "cfg_V_VoltageImbalanceTripDelay", - "cfg_V_VoltageImbalanceTripLevel", - "cfg_V_VoltageImbalanceWarningLevel", - "cfg_V_VoltageMode", - "cfg_WRITE", - "Downtime_Time_Parameter", - "Downtime_Time_Parameter_OL", - "Downhole_Tool_Enabled", - "Pressure_Alarm_Delay", - "Pressure_Alarm_Startup_Delay", - "Pressure_EU_Max", - "Pressure_EU_Min", - "Pressure_Hi_SP", - "Pressure_Lo_SP", - "Pressure_Shutdown", - "Pressure_Shutdown_Enabled", - "Pressure_Startup", - "Pressure_Startup_Enabled", - "Pressure_Switch_Enabled", - "Pressure_Transducer_Enabled", - "Start_Command", - "Stop_Command", - "Temp_Shutdown", - "Temp_Shutdown_Enabled", - "Temp_Startup", - "Temp_Startup_Enabled", - "TripEnable_V_Overfrequency", - "TripEnable_V_Overvoltage", - "TripEnable_V_PhaseRotation", - "TripEnable_V_Underfrequency", - "TripEnable_V_Undervoltage", - "TripEnable_V_VoltageUnbalance", - "TripEnabled_I_CurrentImbalance", - "TripEnabled_I_GroundFault", - "TripEnabled_I_Jam", - "TripEnabled_I_LineLoss", - "TripEnabled_I_Overcurrent", - "TripEnabled_I_Overload", - "TripEnabled_I_PhaseLoss", - "TripEnabled_I_Stall", - "TripEnabled_I_Undercurrent", - "TripEnabled_I_Underload", - "TripResetCmd", - "WarningEnable_V_Overfrequency", - "WarningEnable_V_Overvoltage", - "WarningEnable_V_PhaseRotation", - "WarningEnable_V_Underfrequency", - "WarningEnable_V_Undervoltage", - "WarningEnable_V_VoltageUnbalance", - "WarningEnabled_I_CurrentImbalance", - "WarningEnabled_I_GroundFault", - "WarningEnabled_I_Jam", - "WarningEnabled_I_LineLoss", - "WarningEnabled_I_Overcurrent", - "WarningEnabled_I_Overload", - "WarningEnabled_I_PhaseLoss", - "WarningEnabled_I_Stall", - "WarningEnabled_I_Undercurrent", - "WarningEnabled_I_Underload", - - -] - - -for child in root: - try: - tagName = child[1].text - tagType = child[2].text - struct = { - 'tag': tagName, - "last_value": "", - "data_type": tagType, - "change_amount": .5, - "last_time_uploaded": 0, - "max_time_between_uploads": 3600 - } - if tagName in writeable_tags: - struct['read_only'] = False - else: - struct['read_only'] = True - - if tagName[0:3] == "cfg": - struct['max_time_between_uploads'] = 86400 - - chName = tagName.replace("_", "") # Channel names cannot have underscores - chName = chName.lower() # Channel names should all start wth a lowercase letter - - if len(chName) > 30: - chName = chName[0:30] - - if tagName not in ignore_tags: - if tagType == "BOOL": - struct['change_amount'] = None - channels[chName] = struct - elif tagType == "REAL" or tagType[-3:] == "INT": - channels[chName] = struct - else: - unreadable_channels[chName] = struct - else: - ignored_channels[chName] = struct - - if struct['read_only'] is False: - writeable_channels[chName] = struct - except Exception, e: - print "oops: {}".format(e) - -with open('ipp_channels_setup.py', 'wb') as txtFile: - txtFile.write("import pickle\r\r") - txtFile.write("channels = {\r") - for x in sorted(channels): - c = channels[x] - txtFile.write("\t'{}': {{\r".format(x)) - txtFile.write("\t\t'data_type': '{}',\r".format(c['data_type'])) - txtFile.write("\t\t'change_amount': {},\r".format(c['change_amount'])) - txtFile.write("\t\t'max_time_between_uploads': {},\r".format(c['max_time_between_uploads'])) - txtFile.write("\t\t'tag': '{}',\r".format(c['tag'])) - txtFile.write("\t\t'last_time_uploaded': {},\r".format(c['last_time_uploaded'])) - txtFile.write("\t\t'last_value': '{}',\r".format(c['last_value'])) - txtFile.write("\t},\r") - - txtFile.write("}\r") - txtFile.write("\rwith open('ipp_channels.p', 'wb') as ch_f:\r") - txtFile.write("\tpickle.dump(channels, ch_f)\r\r") - -with open('channels.txt', 'wb') as ch_txt: - for x in sorted(channels): - c = channels[x] - rw = 'read only' - if c['read_only'] is False: - rw = "WRITEABLE" - ch_txt.write('[] - {} - {} - {}\r'.format(x, c['data_type'], rw)) - -print("UNREADABLE CHANNELS: ") -for y in sorted(unreadable_channels): - print("{} - {}".format(unreadable_channels[y]['data_type'], y)) - -print("") -print("") -print("") -print("IGNORED CHANNELS: ") -for z in sorted(ignored_channels): - print("{} - {}".format(z, ignored_channels[z]['data_type'])) - -with open('writeFunctions.txt', 'wb') as wftxt: - for a in sorted(writeable_channels): - c = writeable_channels[a] - wftxt.write("def ipp_{0}(self, name, value):\r".format(a.replace("_", "").lower())) - wftxt.write("\tprint('trying to set {0} to {{}}'.format(value))\r".format(c['tag'])) - if c['data_type'] == 'REAL': - wftxt.write("\treturn u800.writeMicroTag(addr, '{0}', float(value))\r".format(c['tag'])) - elif (c['data_type'] == 'BOOL') or (c['data_type'][-3:] == "INT"): - wftxt.write("\treturn u800.writeMicroTag(addr, '{0}', int(value))\r".format(c['tag'])) - else: - print("!!!! DIDNT WORK FOR {0}".format(c)) - wftxt.write("\r") diff --git a/POCloud_Driver/tags.xml b/POCloud_Driver/tags.xml deleted file mode 100644 index 8031890..0000000 --- a/POCloud_Driver/tags.xml +++ /dev/null @@ -1,8856 +0,0 @@ - - - - Controller.Micro820.Micro820.DH_IntakeTemperature - DH_IntakeTemperature - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.DH_IntakePressure - DH_IntakePressure - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.DH_WindingTemperature - DH_WindingTemperature - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 186 - - - Controller.Micro820.Micro820.DH_DischargeTemperature - DH_DischargeTemperature - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_DischargePressure - DH_DischargePressure - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_VibrationX - DH_VibrationX - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 310 - - - Controller.Micro820.Micro820.DH_VibrationY - DH_VibrationY - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_DownholeStatus - DH_DownholeStatus - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'OK' - - - Controller.Micro820.Micro820.ModbusCycleTime - ModbusCycleTime - TIME - - - - - T#20s - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - T#20s - - - Controller.Micro820.Micro820.ModbusCycleTimeElapsed - ModbusCycleTimeElapsed - TIME - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - T#4s575ms - - - Controller.Micro820.Micro820.E300_IP_ADDRESS - E300_IP_ADDRESS - STRING - - - 80 - '10.20.4.9' - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - '10.20.4.9' - - - Controller.Micro820.Micro820.E300_SCAN_RATE - E300_SCAN_RATE - UINT - - - - - 1000 - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - 1000 - - - Controller.Micro820.Micro820.E300_OUTPUT_NUMBER - E300_OUTPUT_NUMBER - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cmd_Run - cmd_Run - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.E300_OUTPUT_SET_CORRECTLY - E300_OUTPUT_SET_CORRECTLY - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.E300 - E300 - CIPEEOBJ_ATTRIBS - - - - - - - Var - ReadWrite - False - - - - - ... - ... - False - - - - - 0.049,0.0,0.049,0.087,0.0,0.087,0.119,0.0,60.0,9(0.0),481.2,481.3,481.1,481.2,17(0.0),'ABC' - - - Controller.Micro820.Micro820.E300_SELECTED_OUTPUT - E300_SELECTED_OUTPUT - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'OutputPt00' - - - Controller.Micro820.Micro820.DigitalInput_Status_0 - DigitalInput_Status_0 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.DigitalInput_Status_1 - DigitalInput_Status_1 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.DigitalInput_Status_2 - DigitalInput_Status_2 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.DigitalInput_Status_3 - DigitalInput_Status_3 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Start_Command - Start_Command - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Stop_Command - Stop_Command - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Start_Permissive - Start_Permissive - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Run_Permissive - Run_Permissive - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Enable_IO_Read - Enable_IO_Read - BOOL - - - - - TRUE - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.DigitalInput_Status_5 - DigitalInput_Status_5 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.DigitalInput_Status_4 - DigitalInput_Status_4 - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Temp_Shutdown - Temp_Shutdown - REAL - - - - - 75.0 - Var - ReadWrite - True - Temperature at which to stop the pump - - - OFFLINE - OFFLINE - False - - - - - 75.0 - - - Controller.Micro820.Micro820.Temp_Startup - Temp_Startup - REAL - - - - - 75.0 - Var - ReadWrite - True - Temperature at which to startup the pump - - - OFFLINE - OFFLINE - False - - - - - 75.0 - - - Controller.Micro820.Micro820.Temp_Shutdown_Enabled - Temp_Shutdown_Enabled - BOOL - - - - - TRUE - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Temp_Startup_Enabled - Temp_Startup_Enabled - BOOL - - - - - TRUE - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_Shutdown - Pressure_Shutdown - REAL - - - - - - - Var - ReadWrite - True - Pressure at which to shutdown the pump - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Pressure_Startup - Pressure_Startup - REAL - - - - - - - Var - ReadWrite - True - Pressure at which to startup the pump - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Pressure_Shutdown_Enabled - Pressure_Shutdown_Enabled - BOOL - - - - - TRUE - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_Startup_Enabled - Pressure_Startup_Enabled - BOOL - - - - - TRUE - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Downtime_Timer - Downtime_Timer - TON - - - - - ,,,T#0s - Var - ReadWrite - False - Time to remain shutdown after permissive goes false - - - ... - ... - False - - - - - FALSE,T#0s,FALSE,T#0s,T#0s,FALSE - - - Controller.Micro820.Micro820.Downtime_Time_Parameter - Downtime_Time_Parameter - DINT - - - - - 600 - Var - ReadWrite - True - Number of seconds to remain shutdown - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Device_Status - Device_Status - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'Not ready to start' - - - Controller.Micro820.Micro820.Shutdown_Time - Shutdown_Time - DINT - - - - - - - Var - ReadWrite - False - Time when the unit stopped - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Restart_Command - Restart_Command - BOOL - - - - - - - Var - ReadWrite - False - It has been enough time that the device is ready to start up - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Time_Until_Startup - Time_Until_Startup - DINT - - - - - - - Var - ReadWrite - False - Time Until the unit can restart - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Restart_Allowed - Restart_Allowed - BOOL - - - - - - - Var - ReadWrite - False - Set by the program. Resetting automatically is allowed - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.E300_kWh - E300_kWh - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.049 - - - Controller.Micro820.Micro820.E300_kWh_Regen - E300_kWh_Regen - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Modbus_Read0 - Modbus_Read0 - MODBUSLOCADDR - - - - - - - Var - ReadWrite - False - - - - - ... - ... - False - - - - - 125(0) - - - Controller.Micro820.Micro820.Modbus_Read1000 - Modbus_Read1000 - MODBUSLOCADDR - - - - - - - Var - ReadWrite - False - - - - - ... - ... - False - - - - - 125(0) - - - Controller.Micro820.Micro820.DH_NumChannels - DH_NumChannels - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_ToolVoltage - DH_ToolVoltage - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_MaxIntakeTemperature_Startup - DH_MaxIntakeTemperature_Startup - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.DH_MaxIntakePressure_Startup - DH_MaxIntakePressure_Startup - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_ToolType - DH_ToolType - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_PSIRating - DH_PSIRating - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_MaxIntakeTemperature_Forever - DH_MaxIntakeTemperature_Forever - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.DH_MaxIntakePressure_Forever - DH_MaxIntakePressure_Forever - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.DH_DownholeStatus_INT - DH_DownholeStatus_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.Hand_Mode - Hand_Mode - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Auto_Mode - Auto_Mode - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Start_Button - Start_Button - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Contactor_Status - Contactor_Status - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.cfg_C_FLASetting - cfg_C_FLASetting - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10.0 - - - Controller.Micro820.Micro820.cfg_TCU_TripClass - cfg_TCU_TripClass - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_TCU_OLResetLevel - cfg_TCU_OLResetLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 75 - - - Controller.Micro820.Micro820.cfg_TCU_OLWarningLevel - cfg_TCU_OLWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 85 - - - Controller.Micro820.Micro820.cfg_I_TripEnableCurrent - cfg_I_TripEnableCurrent - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 3 - - - Controller.Micro820.Micro820.cfg_V_TripEnableVoltage - cfg_V_TripEnableVoltage - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_P_TripEnablePower - cfg_P_TripEnablePower - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_C_TripEnableControl - cfg_C_TripEnableControl - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 8393 - - - Controller.Micro820.Micro820.cfg_I_WarningEnableCurrent - cfg_I_WarningEnableCurrent - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_V_WarningEnableVoltage - cfg_V_WarningEnableVoltage - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_P_WarningEnablePower - cfg_P_WarningEnablePower - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_C_WarningEnableControl - cfg_C_WarningEnableControl - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_PL_PhaseLossInhibitTime - cfg_PL_PhaseLossInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_PL_PhaseLossTripDelay - cfg_PL_PhaseLossTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_GF_GroundFaultInhibitTime - cfg_GF_GroundFaultInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_GF_GroundFaultTripDelay - cfg_GF_GroundFaultTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.5 - - - Controller.Micro820.Micro820.cfg_GF_GroundFaultTripLevel - cfg_GF_GroundFaultTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 2.5 - - - Controller.Micro820.Micro820.cfg_GF_GroundFaultWarningDelay - cfg_GF_GroundFaultWarningDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_GF_GroundFaultWarningLevel - cfg_GF_GroundFaultWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 2.0 - - - Controller.Micro820.Micro820.cfg_I_StallEnabledTime - cfg_I_StallEnabledTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_StallTripLevel - cfg_I_StallTripLevel - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 600 - - - Controller.Micro820.Micro820.cfg_I_JamInhibitTime - cfg_I_JamInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_JamTripDelay - cfg_I_JamTripDelay - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 50 - - - Controller.Micro820.Micro820.cfg_I_JamTripLevel - cfg_I_JamTripLevel - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 250 - - - Controller.Micro820.Micro820.cfg_I_JamWarningLevel - cfg_I_JamWarningLevel - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 150 - - - Controller.Micro820.Micro820.cfg_I_UnderloadInhibitTime - cfg_I_UnderloadInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_UnderloadTripDelay - cfg_I_UnderloadTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 5.0 - - - Controller.Micro820.Micro820.cfg_I_UnderloadTripLevel - cfg_I_UnderloadTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 50 - - - Controller.Micro820.Micro820.cfg_I_UnderloadWarningLevel - cfg_I_UnderloadWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 70 - - - Controller.Micro820.Micro820.cfg_I_CurrentImbalanceInhibitTime - cfg_I_CurrentImbalanceInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_CurrentImbalanceTripDelay - cfg_I_CurrentImbalanceTripDelay - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 50 - - - Controller.Micro820.Micro820.cfg_I_CurrentImbalanceTripLevel - cfg_I_CurrentImbalanceTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 35 - - - Controller.Micro820.Micro820.cfg_I_CurrentImbalanceWarningLevel - cfg_I_CurrentImbalanceWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 20 - - - Controller.Micro820.Micro820.cfg_I_CTPrimary - cfg_I_CTPrimary - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 5 - - - Controller.Micro820.Micro820.cfg_I_CTSecondary - cfg_I_CTSecondary - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 5 - - - Controller.Micro820.Micro820.cfg_I_UndercurrentInhibitTime - cfg_I_UndercurrentInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_L1_UndercurrentTripDelay - cfg_I_L1_UndercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L1_UndercurrentTripLevel - cfg_I_L1_UndercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 35 - - - Controller.Micro820.Micro820.cfg_I_L1_UndercurrentWarningLevel - cfg_I_L1_UndercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 40 - - - Controller.Micro820.Micro820.cfg_I_L2_UndercurrentTripDelay - cfg_I_L2_UndercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L2_UndercurrentTripLevel - cfg_I_L2_UndercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 35 - - - Controller.Micro820.Micro820.cfg_I_L2_UndercurrentWarningLevel - cfg_I_L2_UndercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 40 - - - Controller.Micro820.Micro820.cfg_I_L3_UndercurrentTripDelay - cfg_I_L3_UndercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L3_UndercurrentTripLevel - cfg_I_L3_UndercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 35 - - - Controller.Micro820.Micro820.cfg_I_L3_UndercurrentWarningLevel - cfg_I_L3_UndercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 40 - - - Controller.Micro820.Micro820.cfg_I_OvercurrentInhibitTime - cfg_I_OvercurrentInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_L1_OvercurrentTripDelay - cfg_I_L1_OvercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L1_OvercurrentTripLevel - cfg_I_L1_OvercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 100 - - - Controller.Micro820.Micro820.cfg_I_L1_OvercurrentWarningLevel - cfg_I_L1_OvercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.cfg_I_L2_OvercurrentTripDelay - cfg_I_L2_OvercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L2_OvercurrentTripLevel - cfg_I_L2_OvercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 100 - - - Controller.Micro820.Micro820.cfg_I_L2_OvercurrentWarningLevel - cfg_I_L2_OvercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.cfg_I_L3_OvercurrentTripDelay - cfg_I_L3_OvercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L3_OvercurrentTripLevel - cfg_I_L3_OvercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 100 - - - Controller.Micro820.Micro820.cfg_I_L3_OvercurrentWarningLevel - cfg_I_L3_OvercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.cfg_I_LineLossInhibitTime - cfg_I_LineLossInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_I_L1LossTripDelay - cfg_I_L1LossTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L2LossTripDelay - cfg_I_L2LossTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_L3LossTripDelay - cfg_I_L3LossTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_VoltageMode - cfg_V_VoltageMode - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_V_PTPrimary - cfg_V_PTPrimary - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 480 - - - Controller.Micro820.Micro820.cfg_V_PTSecondary - cfg_V_PTSecondary - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 480 - - - Controller.Micro820.Micro820.cfg_V_UndervoltageInhibitTime - cfg_V_UndervoltageInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_UndervoltageTripDelay - cfg_V_UndervoltageTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_UndervoltageTripLevel - cfg_V_UndervoltageTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 100.0 - - - Controller.Micro820.Micro820.cfg_V_UndervoltageWarningLevel - cfg_V_UndervoltageWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 400.0 - - - Controller.Micro820.Micro820.cfg_V_OvervoltageInhibitTime - cfg_V_OvervoltageInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_OvervoltageTripDelay - cfg_V_OvervoltageTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_OvervoltageTripLevel - cfg_V_OvervoltageTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 500.0 - - - Controller.Micro820.Micro820.cfg_V_OvervoltageWarningLevel - cfg_V_OvervoltageWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 490.0 - - - Controller.Micro820.Micro820.cfg_V_PhaseRotationInhibitTime - cfg_V_PhaseRotationInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_PhaseRotationTripType - cfg_V_PhaseRotationTripType - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.cfg_V_VoltageImbalanceInhibitTime - cfg_V_VoltageImbalanceInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_VoltageImbalanceTripDelay - cfg_V_VoltageImbalanceTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_VoltageImbalanceTripLevel - cfg_V_VoltageImbalanceTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 15 - - - Controller.Micro820.Micro820.cfg_V_VoltageImbalanceWarningLevel - cfg_V_VoltageImbalanceWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_UnderfrequencyInhibitTime - cfg_V_UnderfrequencyInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_UnderfrequencyTripDelay - cfg_V_UnderfrequencyTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_UnderfrequencyTripLevel - cfg_V_UnderfrequencyTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 57 - - - Controller.Micro820.Micro820.cfg_V_UnderfrequencyWarningLevel - cfg_V_UnderfrequencyWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 58 - - - Controller.Micro820.Micro820.cfg_V_OverfrequencyInhibitTime - cfg_V_OverfrequencyInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_V_OverfrequencyTripDelay - cfg_V_OverfrequencyTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_V_OverfrequencyTripLevel - cfg_V_OverfrequencyTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 63 - - - Controller.Micro820.Micro820.cfg_V_OverfrequencyWarningLevel - cfg_V_OverfrequencyWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 62 - - - Controller.Micro820.Micro820.cfg_P_UnderRealPowerInhibitTime - cfg_P_UnderRealPowerInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderRealPowerTripDelay - cfg_P_UnderRealPowerTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderRealPowerTripLevel - cfg_P_UnderRealPowerTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderRealPowerWarningLevel - cfg_P_UnderRealPowerWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverRealPowerInhibitTime - cfg_P_OverRealPowerInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverRealPowerTripDelay - cfg_P_OverRealPowerTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_OverRealPowerTripLevel - cfg_P_OverRealPowerTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverRealPowerWarningLevel - cfg_P_OverRealPowerWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveConsumedInhibitTime - cfg_P_UnderReactiveConsumedInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveConsumedTripDelay - cfg_P_UnderReactiveConsumedTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveConsumedTripLevel - cfg_P_UnderReactiveConsumedTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveConsumedWarningLevel - cfg_P_UnderReactiveConsumedWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveConsumedInhibitTime - cfg_P_OverReactiveConsumedInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveConsumedTripDelay - cfg_P_OverReactiveConsumedTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveConsumedTripLevel - cfg_P_OverReactiveConsumedTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveConsumedWarningLevel - cfg_P_OverReactiveConsumedWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveGeneratedInhibitTime - cfg_P_UnderReactiveGeneratedInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveGeneratedTripDelay - cfg_P_UnderReactiveGeneratedTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveGeneratedTripLevel - cfg_P_UnderReactiveGeneratedTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderReactiveGeneratedWarningLevel - cfg_P_UnderReactiveGeneratedWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveGeneratedInhibitTime - cfg_P_OverReactiveGeneratedInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveGeneratedTripDelay - cfg_P_OverReactiveGeneratedTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveGeneratedTripLevel - cfg_P_OverReactiveGeneratedTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverReactiveGeneratedWarningLevel - cfg_P_OverReactiveGeneratedWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderApparentPowerInhibitTime - cfg_P_UnderApparentPowerInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderApparentPowerTripDelay - cfg_P_UnderApparentPowerTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderApparentPowerTripLevel - cfg_P_UnderApparentPowerTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderApparentPowerWarningLevel - cfg_P_UnderApparentPowerWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverApparentPowerInhibitTime - cfg_P_OverApparentPowerInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverApparentPowerTripDelay - cfg_P_OverApparentPowerTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_OverApparentPowerTripLevel - cfg_P_OverApparentPowerTripLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_OverApparentPowerWarningLevel - cfg_P_OverApparentPowerWarningLevel - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLagInhibitTime - cfg_P_UnderPowerFactorLagInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLagTripDelay - cfg_P_UnderPowerFactorLagTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLagTripLevel - cfg_P_UnderPowerFactorLagTripLevel - SINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - -90 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLagWarningLevel - cfg_P_UnderPowerFactorLagWarningLevel - SINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - -95 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLagInhibitTime - cfg_P_OverPowerFactorLagInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLagTripDelay - cfg_P_OverPowerFactorLagTripDelay - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLagTripLevel - cfg_P_OverPowerFactorLagTripLevel - SINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - -95 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLagWarningLevel - cfg_P_OverPowerFactorLagWarningLevel - SINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - -90 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLeadInhibitTime - cfg_P_UnderPowerFactorLeadInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLeadTripDelay - cfg_P_UnderPowerFactorLeadTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLeadTripLevel - cfg_P_UnderPowerFactorLeadTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.cfg_P_UnderPowerFactorLeadWarningLevel - cfg_P_UnderPowerFactorLeadWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 95 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLeadInhibitTime - cfg_P_OverPowerFactorLeadInhibitTime - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 10 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLeadTripDelay - cfg_P_OverPowerFactorLeadTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLeadTripLevel - cfg_P_OverPowerFactorLeadTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 95 - - - Controller.Micro820.Micro820.cfg_P_OverPowerFactorLeadWarningLevel - cfg_P_OverPowerFactorLeadWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.E300_Config_Buffer - E300_Config_Buffer - USINT - [1..409] - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0,2(2),0,232,3,2(0),232,3,2(0),10,18,75,85,3,11(0),201,32,6(0),4(255),63,0,63,0,255,15,255,15,255,39,255,31,255,15,255,15,8(0),32,5(0),2,0,88,2,4(0),244,1,16,39,100,0,1,10,5,0,250,0,200,2(0),2(10),0,88,2,10,50,250,0,150,0,10,2(50),70,10,50,35,20,5,0,5,0,2(10),35,40,10,35,40,10,35,40,2(10),100,90,10,100,90,10,100,90,4(10),24(0),224,1,224,1,0,3(10),232,3,160,15,2(10),136,19,36,19,2(10),15,3(10),57,58,2(10),63,62,15,1,4(10),16(0),4(10),16(0),4(10),16(0),4(10),16(0),2(10),166,161,2(10),161,166,2(10),90,95,2(10),95,90,1,0,50,0,2,0,3,0,51,0,52,0,38,0,39,0,44,1,2(0),3(10),21(0),3(10),21(0),3(10),21(0),3(10),22(0) - - - Controller.Micro820.Micro820.cfg_READ - cfg_READ - BOOL - - - - - - - Var - ReadWrite - False - Read the configuration data from the E300 - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.cfg_WRITE - cfg_WRITE - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripResetWriteStatus - TripResetWriteStatus - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripResetCmd - TripResetCmd - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripStatusCurrent - TripStatusCurrent - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.TripStatusVoltage - TripStatusVoltage - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.TripStatusPower - TripStatusPower - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.TripStatusControl - TripStatusControl - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.WarningStatusCurrent - WarningStatusCurrent - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.WarningStatusVoltage - WarningStatusVoltage - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.WarningStatusPower - WarningStatusPower - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.WarningStatusControl - WarningStatusControl - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 'None' - - - Controller.Micro820.Micro820.OverloadTrip - OverloadTrip - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripStatus - TripStatus - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningStatus - WarningStatus - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripStatusCurrent_INT - TripStatusCurrent_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.TripStatusVoltage_INT - TripStatusVoltage_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.TripStatusPower_INT - TripStatusPower_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.TripStatusControl_INT - TripStatusControl_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.WarningStatusCurrent_INT - WarningStatusCurrent_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.WarningStatusVoltage_INT - WarningStatusVoltage_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.WarningStatusPower_INT - WarningStatusPower_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.WarningStatusControl_INT - WarningStatusControl_INT - UINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.Downtime_Time_Parameter_OL - Downtime_Time_Parameter_OL - DINT - - - - - 600 - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Time_Until_Startup_String - Time_Until_Startup_String - STRING - - - 80 - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Test_Mode - Test_Mode - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.cfg_I_UndercurrentTripDelay - cfg_I_UndercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_UndercurrentTripLevel - cfg_I_UndercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 35 - - - Controller.Micro820.Micro820.cfg_I_UndercurrentWarningLevel - cfg_I_UndercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 40 - - - Controller.Micro820.Micro820.cfg_I_OvercurrentTripLevel - cfg_I_OvercurrentTripLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 100 - - - Controller.Micro820.Micro820.cfg_I_OvercurrentWarningLevel - cfg_I_OvercurrentWarningLevel - USINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 90 - - - Controller.Micro820.Micro820.cfg_I_LineLossTripDelay - cfg_I_LineLossTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.cfg_I_OvercurrentTripDelay - cfg_I_OvercurrentTripDelay - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 1.0 - - - Controller.Micro820.Micro820.VoltageOK - VoltageOK - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.TripEnabled_I_Overload - TripEnabled_I_Overload - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.TripEnabled_I_GroundFault - TripEnabled_I_GroundFault - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_Stall - TripEnabled_I_Stall - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_Jam - TripEnabled_I_Jam - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_Underload - TripEnabled_I_Underload - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_CurrentImbalance - TripEnabled_I_CurrentImbalance - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_PhaseLoss - TripEnabled_I_PhaseLoss - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.TripEnabled_I_Undercurrent - TripEnabled_I_Undercurrent - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_Overcurrent - TripEnabled_I_Overcurrent - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Overload - WarningEnabled_I_Overload - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_GroundFault - WarningEnabled_I_GroundFault - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Stall - WarningEnabled_I_Stall - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Jam - WarningEnabled_I_Jam - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Underload - WarningEnabled_I_Underload - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_CurrentImbalance - WarningEnabled_I_CurrentImbalance - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_PhaseLoss - WarningEnabled_I_PhaseLoss - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Undercurrent - WarningEnabled_I_Undercurrent - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_Overcurrent - WarningEnabled_I_Overcurrent - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnabled_I_LineLoss - WarningEnabled_I_LineLoss - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_Undervoltage - TripEnable_V_Undervoltage - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_Overvoltage - TripEnable_V_Overvoltage - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_VoltageUnbalance - TripEnable_V_VoltageUnbalance - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_PhaseRotation - TripEnable_V_PhaseRotation - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_Underfrequency - TripEnable_V_Underfrequency - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnable_V_Overfrequency - TripEnable_V_Overfrequency - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_Undervoltage - WarningEnable_V_Undervoltage - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_Overvoltage - WarningEnable_V_Overvoltage - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_VoltageUnbalance - WarningEnable_V_VoltageUnbalance - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_PhaseRotation - WarningEnable_V_PhaseRotation - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_Underfrequency - WarningEnable_V_Underfrequency - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.WarningEnable_V_Overfrequency - WarningEnable_V_Overfrequency - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.TripEnabled_I_LineLoss - TripEnabled_I_LineLoss - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_Switch_Enabled - Pressure_Switch_Enabled - BOOL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Downhole_Tool_Enabled - Downhole_Tool_Enabled - BOOL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.Clear_Trip_Cycle - Clear_Trip_Cycle - TIME - - - - - T#15s - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - T#15s - - - Controller.Micro820.Micro820.E300_LineFrequency - E300_LineFrequency - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 60.0 - - - Controller.Micro820.Micro820.E300_L1Current - E300_L1Current - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2Current - E300_L2Current - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3Current - E300_L3Current - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_AverageCurrent - E300_AverageCurrent - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_PercentCurrentUnbalance - E300_PercentCurrentUnbalance - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1NVoltage - E300_L1NVoltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2NVoltage - E300_L2NVoltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3NVoltage - E300_L3NVoltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_AverageLNVoltage - E300_AverageLNVoltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1L2Voltage - E300_L1L2Voltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 481.2 - - - Controller.Micro820.Micro820.E300_L2L3Voltage - E300_L2L3Voltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 481.3 - - - Controller.Micro820.Micro820.E300_L3L1Voltage - E300_L3L1Voltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 481.1 - - - Controller.Micro820.Micro820.E300_AverageLLVoltage - E300_AverageLLVoltage - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 481.2 - - - Controller.Micro820.Micro820.E300_PercentVoltageUnbalance - E300_PercentVoltageUnbalance - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1RealPower - E300_L1RealPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2RealPower - E300_L2RealPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3RealPower - E300_L3RealPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_TotalRealPower - E300_TotalRealPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1ReactivePower - E300_L1ReactivePower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2ReactivePower - E300_L2ReactivePower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3ReactivePower - E300_L3ReactivePower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_TotalReactivePower - E300_TotalReactivePower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1ApparentPower - E300_L1ApparentPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2ApparentPower - E300_L2ApparentPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3ApparentPower - E300_L3ApparentPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_TotalApparentPower - E300_TotalApparentPower - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L1TruePowerFactor - E300_L1TruePowerFactor - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L2TruePowerFactor - E300_L2TruePowerFactor - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_L3TruePowerFactor - E300_L3TruePowerFactor - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.E300_ThreePhaseTruePowerFactor - E300_ThreePhaseTruePowerFactor - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Pressure_Transducer_Enabled - Pressure_Transducer_Enabled - BOOL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_In - Pressure_In - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 300.0 - - - Controller.Micro820.Micro820.Pressure_Hi - Pressure_Hi - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_Lo - Pressure_Lo - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.Pressure_Hi_SP - Pressure_Hi_SP - REAL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Pressure_Lo_SP - Pressure_Lo_SP - REAL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Start_Time - Start_Time - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Pressure_Alarm_Startup_Delay - Pressure_Alarm_Startup_Delay - DINT - - - - - 30 - Var - ReadWrite - True - in seconds - - - OFFLINE - OFFLINE - False - - - - - 30 - - - Controller.Micro820.Micro820.Pressure_OK - Pressure_OK - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - TRUE - - - Controller.Micro820.Micro820.Pressure_OOT_Scans - Pressure_OOT_Scans - UDINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.Pressure_OOT_Seconds - Pressure_OOT_Seconds - UDINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - 0 - - - Controller.Micro820.Micro820.Pressure_Alarm_Delay - Pressure_Alarm_Delay - UDINT - - - - - 15 - Var - ReadWrite - False - in Sec - - - OFFLINE - OFFLINE - False - - - - - 15 - - - Controller.Micro820.Micro820.Run_Time - Run_Time - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.Pressure_EU_Min - Pressure_EU_Min - REAL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - 0.0 - - - Controller.Micro820.Micro820.Pressure_EU_Max - Pressure_EU_Max - REAL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - 300.0 - - - Controller.Micro820.Micro820.Start_Time_Set - Start_Time_Set - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - FALSE - - - Controller.Micro820.Micro820.DH_Fluid_Level - DH_Fluid_Level - REAL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.SP_Pressure - SP_Pressure - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.E300_Output_Enable - E300_Output_Enable - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.E300_Output_Toggled - E300_Output_Toggled - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_SpecificGravity - cfg_SpecificGravity - REAL - - - - - 1.0 - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.time_CurrentTime - time_CurrentTime - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.sts_TimerCycleActive - sts_TimerCycleActive - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_TimerModeEnabled - cfg_TimerModeEnabled - BOOL - - - - - - - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_TimerRunTime - cfg_TimerRunTime - DINT - - - - - 45 - Var - ReadWrite - True - in Minutes - - - OFFLINE - OFFLINE - False - - - - - 45 - - - Controller.Micro820.Micro820.SP_Temperature - SP_Temperature - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.SP_Voltage - SP_Voltage - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.SP_Trip - SP_Trip - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.SP_Mode - SP_Mode - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.RP_TubingPressure - RP_TubingPressure - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.RP_Pressure - RP_Pressure - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.RP_Temperature - RP_Temperature - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.RP_Trip - RP_Trip - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.RP_Mode - RP_Mode - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.timer_RunTimeLeft - timer_RunTimeLeft - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_TimerWaitTime - cfg_TimerWaitTime - DINT - - - - - 15 - Var - ReadWrite - True - in Minutes - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.timer_WaitTimeLeft - timer_WaitTimeLeft - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cmd_TimerRun - cmd_TimerRun - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.sts_TripCountIncreased - sts_TripCountIncreased - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.sts_TimerRunTimeSet - sts_TimerRunTimeSet - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.time_TimerRunTime - time_TimerRunTime - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.sts_TimerWaitTimeSet - sts_TimerWaitTimeSet - BOOL - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.time_TimerWaitTime - time_TimerWaitTime - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.val_OverloadTripCount - val_OverloadTripCount - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.val_TripCount - val_TripCount - DINT - - - - - - - Var - ReadWrite - False - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_OverloadTripCountLimit - cfg_OverloadTripCountLimit - DINT - - - - - 0 - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_TripCountLimit - cfg_TripCountLimit - DINT - - - - - 5 - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - - - - - Controller.Micro820.Micro820.cfg_ClearTripCountAfter - cfg_ClearTripCountAfter - DINT - - - - - 60 - Var - ReadWrite - True - - - - - OFFLINE - OFFLINE - False - - - - - - - - diff --git a/POCloud_Driver/unpickle.py b/POCloud_Driver/unpickle.py deleted file mode 100644 index 4d57f57..0000000 --- a/POCloud_Driver/unpickle.py +++ /dev/null @@ -1,6 +0,0 @@ -import pickle -import json - -modbus_map = pickle.load(open('modbusMap.p', 'rb')) -with open('modbusMap.json', 'w') as fp: - json.dump(modbus_map, fp) diff --git a/POCloud_Driver/utilities.py b/POCloud_Driver/utilities.py new file mode 100644 index 0000000..58c7ab0 --- /dev/null +++ b/POCloud_Driver/utilities.py @@ -0,0 +1,51 @@ +"""Utility functions for the driver.""" +import socket +import struct + + +def get_public_ip_address(): + """Find the public IP Address of the host device.""" + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + s.connect(("8.8.8.8", 80)) + ip = s.getsockname()[0] + s.close() + return ip + + +def int_to_float16(int_to_convert): + """Convert integer into float16 representation.""" + bin_rep = ('0' * 16 + '{0:b}'.format(int_to_convert))[-16:] + sign = 1.0 + if int(bin_rep[0]) == 1: + sign = -1.0 + exponent = float(int(bin_rep[1:6], 2)) + fraction = float(int(bin_rep[6:17], 2)) + + if exponent == float(0b00000): + return sign * 2 ** -14 * fraction / (2.0 ** 10.0) + elif exponent == float(0b11111): + if fraction == 0: + return sign * float("inf") + else: + return float("NaN") + else: + frac_part = 1.0 + fraction / (2.0 ** 10.0) + return sign * (2 ** (exponent - 15)) * frac_part + + +def ints_to_float(int1, int2): + """Convert 2 registers into a floating point number.""" + mypack = struct.pack('>HH', int1, int2) + f = struct.unpack('>f', mypack) + print("[{}, {}] >> {}".format(int1, int2, f[0])) + return f[0] + + +def degf_to_degc(temp_f): + """Convert deg F to deg C.""" + return (temp_f - 32.0) * (5.0/9.0) + + +def degc_to_degf(temp_c): + """Convert deg C to deg F.""" + return temp_c * 1.8 + 32.0 diff --git a/POCloud_Driver/writeFunctions.txt b/POCloud_Driver/writeFunctions.txt deleted file mode 100644 index 44ae96b..0000000 --- a/POCloud_Driver/writeFunctions.txt +++ /dev/null @@ -1 +0,0 @@ -def ipp_cfgcflasetting(self, name, value): print('trying to set cfg_C_FLASetting to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_C_FLASetting', float(value)) def ipp_cfgcleartripcountafter(self, name, value): print('trying to set cfg_ClearTripCountAfter to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_ClearTripCountAfter', int(value)) def ipp_cfgctripenablecontrol(self, name, value): print('trying to set cfg_C_TripEnableControl to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_C_TripEnableControl', int(value)) def ipp_cfgcwarningenablecontrol(self, name, value): print('trying to set cfg_C_WarningEnableControl to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_C_WarningEnableControl', int(value)) def ipp_cfggfgroundfaultinhibittime(self, name, value): print('trying to set cfg_GF_GroundFaultInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_GF_GroundFaultInhibitTime', int(value)) def ipp_cfggfgroundfaulttripdelay(self, name, value): print('trying to set cfg_GF_GroundFaultTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_GF_GroundFaultTripDelay', float(value)) def ipp_cfggfgroundfaulttriplevel(self, name, value): print('trying to set cfg_GF_GroundFaultTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_GF_GroundFaultTripLevel', float(value)) def ipp_cfggfgroundfaultwarningdelay(self, name, value): print('trying to set cfg_GF_GroundFaultWarningDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_GF_GroundFaultWarningDelay', float(value)) def ipp_cfggfgroundfaultwarninglevel(self, name, value): print('trying to set cfg_GF_GroundFaultWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_GF_GroundFaultWarningLevel', float(value)) def ipp_cfgictprimary(self, name, value): print('trying to set cfg_I_CTPrimary to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CTPrimary', int(value)) def ipp_cfgictsecondary(self, name, value): print('trying to set cfg_I_CTSecondary to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CTSecondary', int(value)) def ipp_cfgicurrentimbalanceinhibittim(self, name, value): print('trying to set cfg_I_CurrentImbalanceInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CurrentImbalanceInhibitTime', int(value)) def ipp_cfgicurrentimbalancetripdelay(self, name, value): print('trying to set cfg_I_CurrentImbalanceTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CurrentImbalanceTripDelay', int(value)) def ipp_cfgicurrentimbalancetriplevel(self, name, value): print('trying to set cfg_I_CurrentImbalanceTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CurrentImbalanceTripLevel', int(value)) def ipp_cfgicurrentimbalancewarninglev(self, name, value): print('trying to set cfg_I_CurrentImbalanceWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_CurrentImbalanceWarningLevel', int(value)) def ipp_cfgijaminhibittime(self, name, value): print('trying to set cfg_I_JamInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_JamInhibitTime', int(value)) def ipp_cfgijamtripdelay(self, name, value): print('trying to set cfg_I_JamTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_JamTripDelay', int(value)) def ipp_cfgijamwarninglevel(self, name, value): print('trying to set cfg_I_JamWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_JamWarningLevel', int(value)) def ipp_cfgilinelossinhibittime(self, name, value): print('trying to set cfg_I_LineLossInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_LineLossInhibitTime', int(value)) def ipp_cfgilinelosstripdelay(self, name, value): print('trying to set cfg_I_LineLossTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_LineLossTripDelay', float(value)) def ipp_cfgiovercurrentinhibittime(self, name, value): print('trying to set cfg_I_OvercurrentInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_OvercurrentInhibitTime', int(value)) def ipp_cfgiovercurrenttripdelay(self, name, value): print('trying to set cfg_I_OvercurrentTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_OvercurrentTripDelay', float(value)) def ipp_cfgiovercurrenttriplevel(self, name, value): print('trying to set cfg_I_OvercurrentTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_OvercurrentTripLevel', int(value)) def ipp_cfgiovercurrentwarninglevel(self, name, value): print('trying to set cfg_I_OvercurrentWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_OvercurrentWarningLevel', int(value)) def ipp_cfgistallenabledtime(self, name, value): print('trying to set cfg_I_StallEnabledTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_StallEnabledTime', int(value)) def ipp_cfgistalltriplevel(self, name, value): print('trying to set cfg_I_StallTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_StallTripLevel', int(value)) def ipp_cfgiundercurrentinhibittime(self, name, value): print('trying to set cfg_I_UndercurrentInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UndercurrentInhibitTime', int(value)) def ipp_cfgiundercurrenttripdelay(self, name, value): print('trying to set cfg_I_UndercurrentTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UndercurrentTripDelay', float(value)) def ipp_cfgiundercurrenttriplevel(self, name, value): print('trying to set cfg_I_UndercurrentTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UndercurrentTripLevel', int(value)) def ipp_cfgiundercurrentwarninglevel(self, name, value): print('trying to set cfg_I_UndercurrentWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UndercurrentWarningLevel', int(value)) def ipp_cfgiunderloadinhibittime(self, name, value): print('trying to set cfg_I_UnderloadInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UnderloadInhibitTime', int(value)) def ipp_cfgiunderloadtripdelay(self, name, value): print('trying to set cfg_I_UnderloadTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UnderloadTripDelay', float(value)) def ipp_cfgiunderloadtriplevel(self, name, value): print('trying to set cfg_I_UnderloadTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UnderloadTripLevel', int(value)) def ipp_cfgiunderloadwarninglevel(self, name, value): print('trying to set cfg_I_UnderloadWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_I_UnderloadWarningLevel', int(value)) def ipp_cfgoverloadtripcountlimit(self, name, value): print('trying to set cfg_OverloadTripCountLimit to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_OverloadTripCountLimit', int(value)) def ipp_cfgplphaselossinhibittime(self, name, value): print('trying to set cfg_PL_PhaseLossInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_PL_PhaseLossInhibitTime', int(value)) def ipp_cfgplphaselosstripdelay(self, name, value): print('trying to set cfg_PL_PhaseLossTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_PL_PhaseLossTripDelay', float(value)) def ipp_cfgread(self, name, value): print('trying to set cfg_READ to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_READ', int(value)) def ipp_cfgspecificgravity(self, name, value): print('trying to set cfg_SpecificGravity to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_SpecificGravity', float(value)) def ipp_cfgtcutripclass(self, name, value): print('trying to set cfg_TCU_TripClass to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_TCU_TripClass', int(value)) def ipp_cfgtimermodeenabled(self, name, value): print('trying to set cfg_TimerModeEnabled to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_TimerModeEnabled', int(value)) def ipp_cfgtimerruntime(self, name, value): print('trying to set cfg_TimerRunTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_TimerRunTime', int(value)) def ipp_cfgtimerwaittime(self, name, value): print('trying to set cfg_TimerWaitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_TimerWaitTime', int(value)) def ipp_cfgtripcountlimit(self, name, value): print('trying to set cfg_TripCountLimit to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_TripCountLimit', int(value)) def ipp_cfgvoverfrequencyinhibittime(self, name, value): print('trying to set cfg_V_OverfrequencyInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OverfrequencyInhibitTime', int(value)) def ipp_cfgvoverfrequencytripdelay(self, name, value): print('trying to set cfg_V_OverfrequencyTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OverfrequencyTripDelay', float(value)) def ipp_cfgvoverfrequencytriplevel(self, name, value): print('trying to set cfg_V_OverfrequencyTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OverfrequencyTripLevel', int(value)) def ipp_cfgvoverfrequencywarninglevel(self, name, value): print('trying to set cfg_V_OverfrequencyWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OverfrequencyWarningLevel', int(value)) def ipp_cfgvovervoltageinhibittime(self, name, value): print('trying to set cfg_V_OvervoltageInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OvervoltageInhibitTime', int(value)) def ipp_cfgvovervoltagetripdelay(self, name, value): print('trying to set cfg_V_OvervoltageTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OvervoltageTripDelay', float(value)) def ipp_cfgvovervoltagetriplevel(self, name, value): print('trying to set cfg_V_OvervoltageTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OvervoltageTripLevel', float(value)) def ipp_cfgvovervoltagewarninglevel(self, name, value): print('trying to set cfg_V_OvervoltageWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_OvervoltageWarningLevel', float(value)) def ipp_cfgvphaserotationinhibittime(self, name, value): print('trying to set cfg_V_PhaseRotationInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_PhaseRotationInhibitTime', int(value)) def ipp_cfgvphaserotationtriptype(self, name, value): print('trying to set cfg_V_PhaseRotationTripType to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_PhaseRotationTripType', int(value)) def ipp_cfgvptprimary(self, name, value): print('trying to set cfg_V_PTPrimary to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_PTPrimary', int(value)) def ipp_cfgvptsecondary(self, name, value): print('trying to set cfg_V_PTSecondary to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_PTSecondary', int(value)) def ipp_cfgvunderfrequencyinhibittime(self, name, value): print('trying to set cfg_V_UnderfrequencyInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UnderfrequencyInhibitTime', int(value)) def ipp_cfgvunderfrequencytripdelay(self, name, value): print('trying to set cfg_V_UnderfrequencyTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UnderfrequencyTripDelay', float(value)) def ipp_cfgvunderfrequencytriplevel(self, name, value): print('trying to set cfg_V_UnderfrequencyTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UnderfrequencyTripLevel', int(value)) def ipp_cfgvunderfrequencywarninglevel(self, name, value): print('trying to set cfg_V_UnderfrequencyWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UnderfrequencyWarningLevel', int(value)) def ipp_cfgvundervoltageinhibittime(self, name, value): print('trying to set cfg_V_UndervoltageInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UndervoltageInhibitTime', int(value)) def ipp_cfgvundervoltagetripdelay(self, name, value): print('trying to set cfg_V_UndervoltageTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UndervoltageTripDelay', float(value)) def ipp_cfgvundervoltagetriplevel(self, name, value): print('trying to set cfg_V_UndervoltageTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UndervoltageTripLevel', float(value)) def ipp_cfgvundervoltagewarninglevel(self, name, value): print('trying to set cfg_V_UndervoltageWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_UndervoltageWarningLevel', float(value)) def ipp_cfgvvoltageimbalanceinhibittim(self, name, value): print('trying to set cfg_V_VoltageImbalanceInhibitTime to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_VoltageImbalanceInhibitTime', int(value)) def ipp_cfgvvoltageimbalancetripdelay(self, name, value): print('trying to set cfg_V_VoltageImbalanceTripDelay to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_VoltageImbalanceTripDelay', float(value)) def ipp_cfgvvoltageimbalancetriplevel(self, name, value): print('trying to set cfg_V_VoltageImbalanceTripLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_VoltageImbalanceTripLevel', int(value)) def ipp_cfgvvoltageimbalancewarninglev(self, name, value): print('trying to set cfg_V_VoltageImbalanceWarningLevel to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_VoltageImbalanceWarningLevel', int(value)) def ipp_cfgvvoltagemode(self, name, value): print('trying to set cfg_V_VoltageMode to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_V_VoltageMode', int(value)) def ipp_cfgwrite(self, name, value): print('trying to set cfg_WRITE to {}'.format(value)) return u800.writeMicroTag(addr, 'cfg_WRITE', int(value)) def ipp_downtimetimeparameter(self, name, value): print('trying to set Downtime_Time_Parameter to {}'.format(value)) return u800.writeMicroTag(addr, 'Downtime_Time_Parameter', int(value)) def ipp_downtimetimeparameterol(self, name, value): print('trying to set Downtime_Time_Parameter_OL to {}'.format(value)) return u800.writeMicroTag(addr, 'Downtime_Time_Parameter_OL', int(value)) def ipp_pressurealarmdelay(self, name, value): print('trying to set Pressure_Alarm_Delay to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Alarm_Delay', int(value)) def ipp_pressurealarmstartupdelay(self, name, value): print('trying to set Pressure_Alarm_Startup_Delay to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Alarm_Startup_Delay', int(value)) def ipp_pressureeumax(self, name, value): print('trying to set Pressure_EU_Max to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_EU_Max', float(value)) def ipp_pressureeumin(self, name, value): print('trying to set Pressure_EU_Min to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_EU_Min', float(value)) def ipp_pressurehisp(self, name, value): print('trying to set Pressure_Hi_SP to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Hi_SP', float(value)) def ipp_pressurelosp(self, name, value): print('trying to set Pressure_Lo_SP to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Lo_SP', float(value)) def ipp_pressureshutdown(self, name, value): print('trying to set Pressure_Shutdown to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Shutdown', float(value)) def ipp_pressureshutdownenabled(self, name, value): print('trying to set Pressure_Shutdown_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Shutdown_Enabled', int(value)) def ipp_pressurestartup(self, name, value): print('trying to set Pressure_Startup to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Startup', float(value)) def ipp_pressurestartupenabled(self, name, value): print('trying to set Pressure_Startup_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Startup_Enabled', int(value)) def ipp_pressureswitchenabled(self, name, value): print('trying to set Pressure_Switch_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Switch_Enabled', int(value)) def ipp_pressuretransducerenabled(self, name, value): print('trying to set Pressure_Transducer_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Pressure_Transducer_Enabled', int(value)) def ipp_startcommand(self, name, value): print('trying to set Start_Command to {}'.format(value)) return u800.writeMicroTag(addr, 'Start_Command', int(value)) def ipp_stopcommand(self, name, value): print('trying to set Stop_Command to {}'.format(value)) return u800.writeMicroTag(addr, 'Stop_Command', int(value)) def ipp_tempshutdown(self, name, value): print('trying to set Temp_Shutdown to {}'.format(value)) return u800.writeMicroTag(addr, 'Temp_Shutdown', float(value)) def ipp_tempshutdownenabled(self, name, value): print('trying to set Temp_Shutdown_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Temp_Shutdown_Enabled', int(value)) def ipp_tempstartup(self, name, value): print('trying to set Temp_Startup to {}'.format(value)) return u800.writeMicroTag(addr, 'Temp_Startup', float(value)) def ipp_tempstartupenabled(self, name, value): print('trying to set Temp_Startup_Enabled to {}'.format(value)) return u800.writeMicroTag(addr, 'Temp_Startup_Enabled', int(value)) def ipp_tripenabledicurrentimbalance(self, name, value): print('trying to set TripEnabled_I_CurrentImbalance to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_CurrentImbalance', int(value)) def ipp_tripenabledigroundfault(self, name, value): print('trying to set TripEnabled_I_GroundFault to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_GroundFault', int(value)) def ipp_tripenabledijam(self, name, value): print('trying to set TripEnabled_I_Jam to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Jam', int(value)) def ipp_tripenabledilineloss(self, name, value): print('trying to set TripEnabled_I_LineLoss to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_LineLoss', int(value)) def ipp_tripenablediovercurrent(self, name, value): print('trying to set TripEnabled_I_Overcurrent to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Overcurrent', int(value)) def ipp_tripenabledioverload(self, name, value): print('trying to set TripEnabled_I_Overload to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Overload', int(value)) def ipp_tripenablediphaseloss(self, name, value): print('trying to set TripEnabled_I_PhaseLoss to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_PhaseLoss', int(value)) def ipp_tripenabledistall(self, name, value): print('trying to set TripEnabled_I_Stall to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Stall', int(value)) def ipp_tripenablediundercurrent(self, name, value): print('trying to set TripEnabled_I_Undercurrent to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Undercurrent', int(value)) def ipp_tripenablediunderload(self, name, value): print('trying to set TripEnabled_I_Underload to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnabled_I_Underload', int(value)) def ipp_tripenablevoverfrequency(self, name, value): print('trying to set TripEnable_V_Overfrequency to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_Overfrequency', int(value)) def ipp_tripenablevovervoltage(self, name, value): print('trying to set TripEnable_V_Overvoltage to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_Overvoltage', int(value)) def ipp_tripenablevphaserotation(self, name, value): print('trying to set TripEnable_V_PhaseRotation to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_PhaseRotation', int(value)) def ipp_tripenablevunderfrequency(self, name, value): print('trying to set TripEnable_V_Underfrequency to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_Underfrequency', int(value)) def ipp_tripenablevundervoltage(self, name, value): print('trying to set TripEnable_V_Undervoltage to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_Undervoltage', int(value)) def ipp_tripenablevvoltageunbalance(self, name, value): print('trying to set TripEnable_V_VoltageUnbalance to {}'.format(value)) return u800.writeMicroTag(addr, 'TripEnable_V_VoltageUnbalance', int(value)) def ipp_tripresetcmd(self, name, value): print('trying to set TripResetCmd to {}'.format(value)) return u800.writeMicroTag(addr, 'TripResetCmd', int(value)) def ipp_warningenabledicurrentimbalanc(self, name, value): print('trying to set WarningEnabled_I_CurrentImbalance to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_CurrentImbalance', int(value)) def ipp_warningenabledigroundfault(self, name, value): print('trying to set WarningEnabled_I_GroundFault to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_GroundFault', int(value)) def ipp_warningenabledijam(self, name, value): print('trying to set WarningEnabled_I_Jam to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Jam', int(value)) def ipp_warningenabledilineloss(self, name, value): print('trying to set WarningEnabled_I_LineLoss to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_LineLoss', int(value)) def ipp_warningenablediovercurrent(self, name, value): print('trying to set WarningEnabled_I_Overcurrent to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Overcurrent', int(value)) def ipp_warningenabledioverload(self, name, value): print('trying to set WarningEnabled_I_Overload to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Overload', int(value)) def ipp_warningenablediphaseloss(self, name, value): print('trying to set WarningEnabled_I_PhaseLoss to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_PhaseLoss', int(value)) def ipp_warningenabledistall(self, name, value): print('trying to set WarningEnabled_I_Stall to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Stall', int(value)) def ipp_warningenablediundercurrent(self, name, value): print('trying to set WarningEnabled_I_Undercurrent to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Undercurrent', int(value)) def ipp_warningenablediunderload(self, name, value): print('trying to set WarningEnabled_I_Underload to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnabled_I_Underload', int(value)) def ipp_warningenablevoverfrequency(self, name, value): print('trying to set WarningEnable_V_Overfrequency to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_Overfrequency', int(value)) def ipp_warningenablevovervoltage(self, name, value): print('trying to set WarningEnable_V_Overvoltage to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_Overvoltage', int(value)) def ipp_warningenablevphaserotation(self, name, value): print('trying to set WarningEnable_V_PhaseRotation to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_PhaseRotation', int(value)) def ipp_warningenablevunderfrequency(self, name, value): print('trying to set WarningEnable_V_Underfrequency to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_Underfrequency', int(value)) def ipp_warningenablevundervoltage(self, name, value): print('trying to set WarningEnable_V_Undervoltage to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_Undervoltage', int(value)) def ipp_warningenablevvoltageunbalance(self, name, value): print('trying to set WarningEnable_V_VoltageUnbalance to {}'.format(value)) return u800.writeMicroTag(addr, 'WarningEnable_V_VoltageUnbalance', int(value)) \ No newline at end of file diff --git a/POCloud_Driver/modbusMap.txt b/UserAccess.CCW.tmp similarity index 100% rename from POCloud_Driver/modbusMap.txt rename to UserAccess.CCW.tmp