610 lines
30 KiB
Python
610 lines
30 KiB
Python
#!/usr/bin/python
|
|
|
|
import threading
|
|
import time
|
|
import pickle
|
|
from device_base import deviceBase
|
|
import micro800 as u800
|
|
|
|
min_upload_time = 30
|
|
addr = '10.20.4.5'
|
|
|
|
|
|
class start(threading.Thread, deviceBase):
|
|
channels = {}
|
|
|
|
def updateGPS(self):
|
|
gps = self.mcu.gps
|
|
print("GPS found me at {0}".format(gps))
|
|
self.sendtodb("gps", gps, 0)
|
|
|
|
def setupChannels(self):
|
|
with open('drivers/ipp_channels.p', 'rb') as ch_f:
|
|
self.channels = pickle.load(ch_f)
|
|
print("Channel List\n================")
|
|
for x in self.channels.keys():
|
|
print x
|
|
print("================")
|
|
|
|
def __init__(self, name=None, number=None, mac=None, Q=None, mcu=None, companyId=None, offset=None, mqtt=None, Nodes=None):
|
|
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)
|
|
|
|
self.daemon = True
|
|
self.version = "2"
|
|
self.device_address = addr
|
|
self.finished = threading.Event()
|
|
threading.Thread.start(self)
|
|
self.sendtodbJSON("device_address", self.device_address, 0)
|
|
self.setupChannels()
|
|
# self.updateGPS()
|
|
|
|
# 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"] = ""
|
|
|
|
def run(self):
|
|
print("****************\n*************\nEXECUTING RUN\n********************\n****************")
|
|
self.runLoopStatus = ""
|
|
last_OK_state = 0
|
|
while True:
|
|
if len(self.channels) > 0:
|
|
try:
|
|
for i in self.channels:
|
|
runLoopStatus = i
|
|
# print("reading {0}".format(i))
|
|
valData = u800.readMicroTag(self.device_address, self.channels[i]['tag'])
|
|
# print(valData)
|
|
if valData:
|
|
nowVal = round(valData[0], 4)
|
|
ch = self.channels[i]
|
|
if ch['data_type'] == "BOOL":
|
|
if ch['last_value'] == "":
|
|
self.sendtodbJSON(i, nowVal, 0)
|
|
ch['last_time_uploaded'] = time.time()
|
|
ch['last_value'] = nowVal
|
|
elif (not (ch['last_value'] == nowVal)) or ((time.time() - ch['last_time_uploaded']) > ch['max_time_between_uploads']):
|
|
self.sendtodbJSON(i, nowVal, 0)
|
|
ch['last_time_uploaded'] = time.time()
|
|
ch['last_value'] = nowVal
|
|
if (ch['data_type'] == "REAL") or (ch['data_type'][-3:] == "INT"):
|
|
if ch['last_value'] == "":
|
|
self.sendtodbJSON(i, nowVal, 0)
|
|
ch['last_time_uploaded'] = time.time()
|
|
ch['last_value'] = nowVal
|
|
elif (abs(ch['last_value'] - nowVal) > ch['change_amount']) or ((time.time() - ch['last_time_uploaded']) > ch['max_time_between_uploads']):
|
|
self.sendtodbJSON(i, nowVal, 0)
|
|
ch['last_time_uploaded'] = time.time()
|
|
ch['last_value'] = nowVal
|
|
|
|
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 self.channels... length shows {0}".format(len(self.channels)))
|
|
print self.channels
|
|
self.setupChannels()
|
|
time.sleep(30)
|
|
|
|
def write_vfdconfig(self):
|
|
print("Writing config to drive")
|
|
return u800.writeMicroTag(addr, 'VFD_Write', 1)
|
|
|
|
def vfdipp_sync(self, name, value):
|
|
self.sendtodb("connected", "true", 0)
|
|
return True
|
|
|
|
def vfdipp_address(self, name, value):
|
|
self.device_address = value
|
|
return True
|
|
|
|
def vfdipp_gpsUpdate(self, name, value):
|
|
self.updateGPS()
|
|
return True
|
|
|
|
# ======== AUTOMATICALLY GENERATED TAG WRITE FUNCTIONS BELOW HERE ===========
|
|
|
|
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))
|