Fixed some non-default IP address issues

This commit is contained in:
Patrick McDonagh
2016-04-25 16:09:24 -05:00
parent 133f0c36ad
commit 56c433545a
3 changed files with 13 additions and 13 deletions

View File

@@ -133,7 +133,7 @@ welltest_tags = {} # Tags stored at well test submit
bit_tags = {}
safety_tags = {}
custom_tags = {}
status = Status('run_status', 'Pump.Run_Status', 0, 'STRING', 0, 3600, mapFn=maps['statusMap'])
status = Status('run_status', 'Pump.Run_Status', 0, 'STRING', 0, 3600, mapFn=maps['statusMap'], ip_address=configProperties['PLC_IP_ADDRESS'])
def setupTags():

View File

@@ -130,7 +130,7 @@ welltest_tags = {} # Tags stored at well test submit
bit_tags = {}
safety_tags = {}
custom_tags = {}
status = Status('run_status', 'Pump.Run_Status', 0, 'STRING', 0, 3600, mapFn=maps['statusMap'])
status = Status('run_status', 'Pump.Run_Status', 0, 'STRING', 0, 3600, mapFn=maps['statusMap'], ip_address=configProperties['PLC_IP_ADDRESS'])
def setupTags():
@@ -145,29 +145,29 @@ def setupTags():
print(x)
if str(x[1]) == 'stroke':
if x[7]:
stroke_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])])
stroke_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])], ip_address=configProperties['PLC_IP_ADDRESS'])
else:
stroke_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5])
stroke_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], ip_address=configProperties['PLC_IP_ADDRESS'])
elif str(x[1]) == 'history':
if x[7]:
history_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])])
history_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])], ip_address=configProperties['PLC_IP_ADDRESS'])
else:
history_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5])
history_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], ip_address=configProperties['PLC_IP_ADDRESS'])
elif str(x[1]) == 'gaugeoff':
if x[7]:
gaugeoff_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])])
gaugeoff_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])], ip_address=configProperties['PLC_IP_ADDRESS'])
else:
gaugeoff_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5])
gaugeoff_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], ip_address=configProperties['PLC_IP_ADDRESS'])
elif str(x[1]) == 'welltest':
if x[7]:
welltest_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])])
welltest_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])], ip_address=configProperties['PLC_IP_ADDRESS'])
else:
welltest_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5])
welltest_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], ip_address=configProperties['PLC_IP_ADDRESS'])
elif str(x[1]) == 'custom':
if x[7]:
custom_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])])
custom_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], mapFn=maps[str(x[7])], ip_address=configProperties['PLC_IP_ADDRESS'])
else:
custom_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5])
custom_tags[x[0]] = Tag(str(x[0]), str(x[2]), x[6], str(x[3]), x[4], x[5], ip_address=configProperties['PLC_IP_ADDRESS'])
with con:
cur = con.cursor()

View File

@@ -1,4 +1,4 @@
echo "Setting database type to MySQL"
echo "Setting database type to SQLite"
cp dbSQLite/dataLogger_SQLite.py dataLogger.py
cp dbSQLite/readConfig_SQLite.py readConfig.py