Completes IPP-67. Adds Device_Status_INT to PLC, should be mapped to IPP Driver
This commit is contained in:
@@ -73,6 +73,20 @@ e300_power = {
|
||||
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):
|
||||
@@ -231,6 +245,7 @@ class start(threading.Thread, deviceBase):
|
||||
'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.sendtodbJSON, 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),
|
||||
|
||||
405
POCloud_Driver/modbusMap.json
Normal file
405
POCloud_Driver/modbusMap.json
Normal file
@@ -0,0 +1,405 @@
|
||||
{"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"
|
||||
}
|
||||
|
||||
}
|
||||
1228
POCloud_Driver/modbusMap.p
Normal file
1228
POCloud_Driver/modbusMap.p
Normal file
File diff suppressed because it is too large
Load Diff
0
POCloud_Driver/modbusMap.txt
Normal file
0
POCloud_Driver/modbusMap.txt
Normal file
6
POCloud_Driver/unpickle.py
Normal file
6
POCloud_Driver/unpickle.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import pickle
|
||||
import json
|
||||
|
||||
modbus_map = pickle.load(open('modbusMap.p', 'rb'))
|
||||
with open('modbusMap.json', 'w') as fp:
|
||||
json.dump(modbus_map, fp)
|
||||
Reference in New Issue
Block a user