Fixed some non-default IP address issues
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user