wip: modbus ui for webrelay
This commit is contained in:
parent
e2f3ad1ccd
commit
bdfc973137
5 changed files with 992 additions and 649 deletions
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (modbus-test)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (webrelay-modbus)" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
||||||
2
.idea/modbus-test.iml
generated
2
.idea/modbus-test.iml
generated
|
|
@ -4,7 +4,7 @@
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="jdk" jdkName="Python 3.7 (webrelay-modbus)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
138
FaultMonitor.py
138
FaultMonitor.py
|
|
@ -9,27 +9,25 @@ import wx.grid
|
||||||
import wx.propgrid
|
import wx.propgrid
|
||||||
|
|
||||||
import gettext
|
import gettext
|
||||||
gettext.install(None)
|
|
||||||
|
|
||||||
from pubsub import pub
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from registers import regdict
|
|
||||||
|
|
||||||
print('pubsub API version', pub.VERSION_API)
|
|
||||||
|
|
||||||
from pubsub.utils.notification import useNotifyByWriteFile
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
useNotifyByWriteFile(sys.stdout)
|
|
||||||
|
|
||||||
import pprint
|
import pprint
|
||||||
|
|
||||||
|
from pubsub import pub
|
||||||
|
import pubsub.utils.notification
|
||||||
|
|
||||||
|
import easymodbus.modbusClient
|
||||||
|
from registers import regdict
|
||||||
|
|
||||||
from stabiliti import StabilitiController as SC
|
from stabiliti import StabilitiController as SC
|
||||||
from faults import faultInfo
|
from faults import faultInfo
|
||||||
from FaultView import FaultFrame
|
from FaultView import FaultFrame
|
||||||
|
|
||||||
|
print('pubsub API version', pub.VERSION_API)
|
||||||
|
pubsub.utils.notification.useNotifyByWriteFile(sys.stdout)
|
||||||
|
|
||||||
|
|
||||||
class Controller:
|
class Controller:
|
||||||
def __init__(self, view):
|
def __init__(self, view):
|
||||||
self.sc = None
|
self.sc = None
|
||||||
|
|
@ -39,6 +37,8 @@ class Controller:
|
||||||
self.refresh_rate = 2000
|
self.refresh_rate = 2000
|
||||||
self.mode = False
|
self.mode = False
|
||||||
|
|
||||||
|
self.mbclient = None
|
||||||
|
|
||||||
pub.subscribe(self.getFaultInfo, 'fault_selected')
|
pub.subscribe(self.getFaultInfo, 'fault_selected')
|
||||||
pub.subscribe(self.startTimer, 'monitoring_started')
|
pub.subscribe(self.startTimer, 'monitoring_started')
|
||||||
pub.subscribe(self.stopTimer, 'monitoring_stopped')
|
pub.subscribe(self.stopTimer, 'monitoring_stopped')
|
||||||
|
|
@ -58,21 +58,26 @@ class Controller:
|
||||||
self.sc.setUserStop()
|
self.sc.setUserStop()
|
||||||
|
|
||||||
def startTimer(self):
|
def startTimer(self):
|
||||||
|
self.mbclient.connect()
|
||||||
self.timer.Start(self.refresh_rate)
|
self.timer.Start(self.refresh_rate)
|
||||||
|
|
||||||
def stopTimer(self):
|
def stopTimer(self):
|
||||||
|
self.mbclient.close()
|
||||||
self.timer.Stop()
|
self.timer.Stop()
|
||||||
|
|
||||||
def applyNetworkConfigs(self, ncDict):
|
def applyNetworkConfigs(self, ncDict):
|
||||||
if self.sc:
|
if self.mbclient:
|
||||||
self.sc.checkClose()
|
if self.mbclient.is_connected():
|
||||||
|
self.mbclient.close()
|
||||||
|
self.mbclient = easymodbus.modbusClient.ModbusClient(ncDict["ipaddr"], ncDict["port"])
|
||||||
|
self.mbclient.unitidentifier = ncDict["uid"]
|
||||||
self.refresh_rate = ncDict.pop("refresh")
|
self.refresh_rate = ncDict.pop("refresh")
|
||||||
self.sc = SC(**ncDict)
|
|
||||||
|
|
||||||
def resetNetworkConfigs(self):
|
def resetNetworkConfigs(self):
|
||||||
if self.sc:
|
if self.mbclient:
|
||||||
self.sc.checkClose()
|
if self.mbclient.is_connected():
|
||||||
self.sc = None
|
self.mbclient.close()
|
||||||
|
self.mbclient = None
|
||||||
|
|
||||||
def resetPcsRemote(self):
|
def resetPcsRemote(self):
|
||||||
if self.sc:
|
if self.sc:
|
||||||
|
|
@ -86,7 +91,7 @@ class Controller:
|
||||||
|
|
||||||
def getFaultInfo(self, pos):
|
def getFaultInfo(self, pos):
|
||||||
y, x = pos
|
y, x = pos
|
||||||
fid = x + y*8
|
fid = x + y * 8
|
||||||
if 0 <= fid <= 63:
|
if 0 <= fid <= 63:
|
||||||
try:
|
try:
|
||||||
info_text = faultInfo[fid]
|
info_text = faultInfo[fid]
|
||||||
|
|
@ -102,52 +107,35 @@ class Controller:
|
||||||
|
|
||||||
def OnTimer(self, event):
|
def OnTimer(self, event):
|
||||||
# Read registers
|
# Read registers
|
||||||
self.sc.readAllRegisters()
|
relay_status = self.mbclient.read_coils(0,10)
|
||||||
# Process registers
|
# Process registers
|
||||||
# Show Registers
|
# Show Registers
|
||||||
factivity = self.sc.readFaultActivity()
|
|
||||||
foccurence = self.sc.readFaultOccurence()
|
|
||||||
self.view.SetFaultGrid(factivity, foccurence)
|
|
||||||
|
|
||||||
|
for i, rstatus in enumerate(relay_status):
|
||||||
|
if rstatus:
|
||||||
stats = list(range(4))
|
self.view.indicators[i].SetValue("ON")
|
||||||
stats[0], _ = (self.sc.getSystemStatus())
|
self.view.indicators[i].SetBackgroundColour(wx.Colour(0, 255, 0))
|
||||||
stats[1], _ = (self.sc.getPortStatusAC1())
|
else:
|
||||||
stats[2], _ = (self.sc.getPortStatusDC2())
|
self.view.indicators[i].SetValue("OFF")
|
||||||
stats[3], _ = (self.sc.getPortStatusDC3())
|
self.view.indicators[i].SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
|
|
||||||
self.view.update_status(list(map("\n".join, stats)))
|
|
||||||
|
|
||||||
'''
|
|
||||||
for item in self.writeQueue:
|
|
||||||
name, value = item
|
|
||||||
self.sc.write(name, value)
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
class MyFrame(FaultFrame):
|
class MyFrame(FaultFrame):
|
||||||
def __init__(self, *args, **kwds):
|
def __init__(self, *args, **kwds):
|
||||||
FaultFrame.__init__(self, *args, **kwds)
|
FaultFrame.__init__(self, *args, **kwds)
|
||||||
self.property_page = self.property_grid_1.AddPage("Ports")
|
|
||||||
self.property_page_etc = self.property_grid_1.AddPage("Etc")
|
|
||||||
for k in regdict:
|
|
||||||
prop = wx.propgrid.StringProperty(label=k, value="")
|
|
||||||
prop.SetHelpString(str(regdict[k]))
|
|
||||||
if re.search(r'^p[1-3]_', k):
|
|
||||||
self.property_page.Append(prop)
|
|
||||||
else:
|
|
||||||
self.property_page_etc.Append(prop)
|
|
||||||
self.property_page.Sort()
|
|
||||||
self.property_page_etc.Sort()
|
|
||||||
# self.property_page.SetPropertyAttributeAll("Raw", 0)
|
|
||||||
# self.property_page_etc.SetPropertyAttributeAll("Raw", 0)
|
|
||||||
self.property_grid_1.SetPropertyAttributeAll("Units", 0)
|
|
||||||
self.property_grid_1.SetColumnCount(3, self.property_page.GetIndex())
|
|
||||||
self.property_grid_1.SetColumnCount(3, self.property_page_etc.GetIndex())
|
|
||||||
self.property_grid_1.ShowHeader()
|
|
||||||
|
|
||||||
pub.subscribe(self.update_display, 'read_all_registers')
|
pub.subscribe(self.update_display, 'read_all_registers')
|
||||||
|
self.indicators = [
|
||||||
|
self.text_ctrl_1,
|
||||||
|
self.text_ctrl_2,
|
||||||
|
self.text_ctrl_3,
|
||||||
|
self.text_ctrl_4,
|
||||||
|
self.text_ctrl_5,
|
||||||
|
self.text_ctrl_6,
|
||||||
|
self.text_ctrl_7,
|
||||||
|
self.text_ctrl_8,
|
||||||
|
self.text_ctrl_9,
|
||||||
|
self.text_ctrl_10,
|
||||||
|
]
|
||||||
|
|
||||||
def update_status(self, stats):
|
def update_status(self, stats):
|
||||||
self.text_ctrl_system_status.SetValue(stats[0])
|
self.text_ctrl_system_status.SetValue(stats[0])
|
||||||
|
|
@ -156,8 +144,8 @@ class MyFrame(FaultFrame):
|
||||||
self.text_ctrl_dc3_status.SetValue(stats[3])
|
self.text_ctrl_dc3_status.SetValue(stats[3])
|
||||||
|
|
||||||
def update_display(self, reg, info):
|
def update_display(self, reg, info):
|
||||||
ports = {k:v for (k,v) in info.items() if re.search(r'^p[1-3]_', k)}
|
ports = {k: v for (k, v) in info.items() if re.search(r'^p[1-3]_', k)}
|
||||||
etc = {k:v for (k,v) in info.items() if not re.search(r'^p[1-3]_', k)}
|
etc = {k: v for (k, v) in info.items() if not re.search(r'^p[1-3]_', k)}
|
||||||
|
|
||||||
for k, v in ports.items():
|
for k, v in ports.items():
|
||||||
self.property_page.SetPropertyValue(k, str(v.convertValue(reg[v.address])))
|
self.property_page.SetPropertyValue(k, str(v.convertValue(reg[v.address])))
|
||||||
|
|
@ -167,8 +155,6 @@ class MyFrame(FaultFrame):
|
||||||
self.property_page_etc.SetPropertyValue(k, str(v.convertValue(reg[v.address])))
|
self.property_page_etc.SetPropertyValue(k, str(v.convertValue(reg[v.address])))
|
||||||
self.property_page_etc.SetPropertyAttribute(k, "Units", str((reg[v.address])))
|
self.property_page_etc.SetPropertyAttribute(k, "Units", str((reg[v.address])))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def OnFaultSelect(self, event): # wxGlade: MyFrame.<event_handler>
|
def OnFaultSelect(self, event): # wxGlade: MyFrame.<event_handler>
|
||||||
pub.sendMessage("fault_selected", pos=(event.GetRow(), event.GetCol()))
|
pub.sendMessage("fault_selected", pos=(event.GetRow(), event.GetCol()))
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
@ -177,11 +163,11 @@ class MyFrame(FaultFrame):
|
||||||
if len(fActivity) == len(fOccurence) == 64:
|
if len(fActivity) == len(fOccurence) == 64:
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
for j in range(8):
|
for j in range(8):
|
||||||
if fActivity[i*8+j] == '1':
|
if fActivity[i * 8 + j] == '1':
|
||||||
self.fault_grid.SetCellBackgroundColour(i, j, wx.LIGHT_GREY)
|
self.fault_grid.SetCellBackgroundColour(i, j, wx.LIGHT_GREY)
|
||||||
else:
|
else:
|
||||||
self.fault_grid.SetCellBackgroundColour(i, j, wx.WHITE)
|
self.fault_grid.SetCellBackgroundColour(i, j, wx.WHITE)
|
||||||
if fOccurence[i*8+j] == '1':
|
if fOccurence[i * 8 + j] == '1':
|
||||||
self.fault_grid.SetCellValue(i, j, "O")
|
self.fault_grid.SetCellValue(i, j, "O")
|
||||||
else:
|
else:
|
||||||
self.fault_grid.SetCellValue(i, j, "")
|
self.fault_grid.SetCellValue(i, j, "")
|
||||||
|
|
@ -239,24 +225,15 @@ class MyFrame(FaultFrame):
|
||||||
def OnCheckSysOpMode(self, event):
|
def OnCheckSysOpMode(self, event):
|
||||||
pub.sendMessage("check_system_op_mode")
|
pub.sendMessage("check_system_op_mode")
|
||||||
|
|
||||||
def OnOpStart(self, event):
|
def OnRelayOn(self, event):
|
||||||
mode = (self.choice_ac1_control.GetStringSelection(),
|
event.Skip()
|
||||||
self.choice_dc2_control.GetStringSelection(),
|
|
||||||
self.choice_dc3_control.GetStringSelection())
|
def OnRelayOff(self, event):
|
||||||
inputs = {
|
event.Skip()
|
||||||
"p1_real_pwr_setpt": self.text_ctrl_ac1_realpwr.Value,
|
|
||||||
"p1_react_pwr_setpt": self.text_ctrl_ac1_reactpwr.Value,
|
def OnRelayPulse(self, event):
|
||||||
"p2_current_setpt": self.text_ctrl_dc2_current.Value,
|
event.Skip()
|
||||||
"p2_power_setpt": self.text_ctrl_dc2_power.Value,
|
|
||||||
"p2_voltage_setpt": self.text_ctrl_dc2_voltage.Value,
|
|
||||||
"p3_current_setpt": self.text_ctrl_dc3_current.Value,
|
|
||||||
"p3_power_setpt": self.text_ctrl_dc3_power.Value,
|
|
||||||
"p3_voltage_setpt": self.text_ctrl_dc3_voltage.Value,
|
|
||||||
}
|
|
||||||
pub.sendMessage("start_system_op_manual", mode=mode, val=inputs)
|
|
||||||
|
|
||||||
def OnOpStop(self, event):
|
|
||||||
pub.sendMessage("stop_system_op_manual")
|
|
||||||
|
|
||||||
# end of class MyFrame
|
# end of class MyFrame
|
||||||
|
|
||||||
|
|
@ -268,9 +245,12 @@ class MyApp(wx.App):
|
||||||
self.frame.Show()
|
self.frame.Show()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# end of class MyApp
|
# end of class MyApp
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
gettext.install("app") # replace with the appropriate catalog name
|
||||||
|
|
||||||
app = MyApp(0)
|
app = MyApp(0)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
|
|
||||||
350
FaultView.py
350
FaultView.py
|
|
@ -1,11 +1,9 @@
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
#
|
#
|
||||||
# generated by wxGlade 0.9.5 on Tue Feb 18 18:22:15 2020
|
# generated by wxGlade 0.9.6 on Fri Jul 24 15:09:44 2020
|
||||||
#
|
#
|
||||||
|
|
||||||
import wx
|
import wx
|
||||||
import wx.grid
|
|
||||||
import wx.propgrid
|
|
||||||
|
|
||||||
# begin wxGlade: dependencies
|
# begin wxGlade: dependencies
|
||||||
import gettext
|
import gettext
|
||||||
|
|
@ -20,8 +18,8 @@ class FaultFrame(wx.Frame):
|
||||||
# begin wxGlade: FaultFrame.__init__
|
# begin wxGlade: FaultFrame.__init__
|
||||||
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
|
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
|
||||||
wx.Frame.__init__(self, *args, **kwds)
|
wx.Frame.__init__(self, *args, **kwds)
|
||||||
self.SetSize((1099, 729))
|
self.SetSize((411, 480))
|
||||||
self.input_ip = wx.TextCtrl(self, wx.ID_ANY, _("192.168.1.21"))
|
self.input_ip = wx.TextCtrl(self, wx.ID_ANY, _("192.168.1.2"))
|
||||||
self.input_port = wx.TextCtrl(self, wx.ID_ANY, _("502"))
|
self.input_port = wx.TextCtrl(self, wx.ID_ANY, _("502"))
|
||||||
self.input_uid = wx.TextCtrl(self, wx.ID_ANY, _("240"))
|
self.input_uid = wx.TextCtrl(self, wx.ID_ANY, _("240"))
|
||||||
self.input_refresh = wx.TextCtrl(self, wx.ID_ANY, _("2000"))
|
self.input_refresh = wx.TextCtrl(self, wx.ID_ANY, _("2000"))
|
||||||
|
|
@ -29,34 +27,46 @@ class FaultFrame(wx.Frame):
|
||||||
self.apply_button = wx.Button(self, wx.ID_ANY, _("Apply"))
|
self.apply_button = wx.Button(self, wx.ID_ANY, _("Apply"))
|
||||||
self.rreset_button = wx.Button(self, wx.ID_ANY, _("Remote PCS Reset"))
|
self.rreset_button = wx.Button(self, wx.ID_ANY, _("Remote PCS Reset"))
|
||||||
self.button_1 = wx.ToggleButton(self, wx.ID_ANY, _("Start"))
|
self.button_1 = wx.ToggleButton(self, wx.ID_ANY, _("Start"))
|
||||||
self.op_mode_button = wx.Button(self, wx.ID_ANY, _("System OP Mode"))
|
self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.text_op_mode = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
|
self.button_2 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.text_ctrl_system_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.button_3 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.text_ctrl_ac1_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.button_4 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.text_ctrl_dc2_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.text_ctrl_2 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.text_ctrl_dc3_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.button_5 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.fault_grid = wx.grid.Grid(self, wx.ID_ANY, size=(1, 1))
|
self.button_6 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.text_fault_doc = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.button_7 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.text_fault_status = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
|
self.text_ctrl_3 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.panel_1 = wx.Panel(self, wx.ID_ANY)
|
self.button_8 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.button_2 = wx.Button(self.panel_1, wx.ID_ANY, _("Start"))
|
self.button_9 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.button_3 = wx.Button(self.panel_1, wx.ID_ANY, _("Stop"))
|
self.button_10 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.choice_ac1_control = wx.Choice(self.panel_1, wx.ID_ANY, choices=[_("IDLE"), _("NET"), _("GPWR"), _("FPWR")])
|
self.text_ctrl_4 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.text_ctrl_ac1_realpwr = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_11 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.text_ctrl_ac1_reactpwr = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_12 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.choice_dc2_control = wx.Choice(self.panel_1, wx.ID_ANY, choices=[_("IDLE"), _("NET"), _("PV/MPPT"), _("CURR"), _("PWR"), _("VOLT")])
|
self.button_13 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.text_ctrl_dc2_current = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.text_ctrl_5 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.text_ctrl_dc2_power = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_14 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.text_ctrl_dc2_voltage = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_15 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.text_ctrl_7 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
|
self.button_16 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.text_ctrl_8 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
|
self.text_ctrl_6 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.button_4 = wx.Button(self.panel_1, wx.ID_ANY, _("Enable Precharge"))
|
self.button_17 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.button_5 = wx.Button(self.panel_1, wx.ID_ANY, _("Disable Precharge"))
|
self.button_18 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.choice_dc3_control = wx.Choice(self.panel_1, wx.ID_ANY, choices=[_("IDLE"), _("NET"), _("PV/MPPT"), _("CURR"), _("PWR"), _("VOLT")])
|
self.button_19 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
self.text_ctrl_dc3_current = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.text_ctrl_7 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
self.text_ctrl_dc3_power = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_20 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
self.text_ctrl_dc3_voltage = wx.TextCtrl(self.panel_1, wx.ID_ANY, _("0"))
|
self.button_21 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
self.property_grid_1 = wx.propgrid.PropertyGridManager(self, wx.ID_ANY, style=wx.propgrid.PG_DESCRIPTION | wx.propgrid.PG_TOOLBAR)
|
self.button_22 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
|
self.text_ctrl_8 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
|
self.button_23 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
|
self.button_24 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
|
self.button_25 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
|
self.text_ctrl_9 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
|
self.button_26 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
|
self.button_27 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
|
self.button_28 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
|
self.text_ctrl_10 = wx.TextCtrl(self, wx.ID_ANY, _("OFF"), style=wx.BORDER_NONE | wx.TE_CENTRE | wx.TE_READONLY)
|
||||||
|
self.button_29 = wx.Button(self, wx.ID_ANY, _("ON"))
|
||||||
|
self.button_30 = wx.Button(self, wx.ID_ANY, _("OFF"))
|
||||||
|
self.button_31 = wx.Button(self, wx.ID_ANY, _("PULSE"))
|
||||||
|
|
||||||
self.__set_properties()
|
self.__set_properties()
|
||||||
self.__do_layout()
|
self.__do_layout()
|
||||||
|
|
@ -65,10 +75,36 @@ class FaultFrame(wx.Frame):
|
||||||
self.Bind(wx.EVT_BUTTON, self.OnApply, self.apply_button)
|
self.Bind(wx.EVT_BUTTON, self.OnApply, self.apply_button)
|
||||||
self.Bind(wx.EVT_BUTTON, self.OnButtonRemoteReset, self.rreset_button)
|
self.Bind(wx.EVT_BUTTON, self.OnButtonRemoteReset, self.rreset_button)
|
||||||
self.Bind(wx.EVT_TOGGLEBUTTON, self.ToggleMonitoring, self.button_1)
|
self.Bind(wx.EVT_TOGGLEBUTTON, self.ToggleMonitoring, self.button_1)
|
||||||
self.Bind(wx.EVT_BUTTON, self.OnCheckSysOpMode, self.op_mode_button)
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_2)
|
||||||
self.Bind(wx.grid.EVT_GRID_CMD_CELL_LEFT_CLICK, self.OnFaultSelect, self.fault_grid)
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_3)
|
||||||
self.Bind(wx.EVT_BUTTON, self.OnOpStart, self.button_2)
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_4)
|
||||||
self.Bind(wx.EVT_BUTTON, self.OnOpStop, self.button_3)
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_5)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_6)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_7)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_8)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_9)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_10)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_11)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_12)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_13)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_14)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_15)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_16)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_17)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_18)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_19)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_20)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_21)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_22)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_23)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_24)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_25)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_26)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_27)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_28)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOn, self.button_29)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayOff, self.button_30)
|
||||||
|
self.Bind(wx.EVT_BUTTON, self.OnRelayPulse, self.button_31)
|
||||||
# end wxGlade
|
# end wxGlade
|
||||||
|
|
||||||
def __set_properties(self):
|
def __set_properties(self):
|
||||||
|
|
@ -76,50 +112,34 @@ class FaultFrame(wx.Frame):
|
||||||
self.SetTitle(_("PCS Controller"))
|
self.SetTitle(_("PCS Controller"))
|
||||||
self.rreset_button.Enable(False)
|
self.rreset_button.Enable(False)
|
||||||
self.button_1.Enable(False)
|
self.button_1.Enable(False)
|
||||||
self.fault_grid.CreateGrid(8, 8)
|
self.text_ctrl_1.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetRowLabelSize(30)
|
self.text_ctrl_2.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetColLabelSize(30)
|
self.text_ctrl_3.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.EnableEditing(0)
|
self.text_ctrl_4.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.EnableDragColSize(0)
|
self.text_ctrl_5.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.EnableDragRowSize(0)
|
self.text_ctrl_6.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.EnableDragGridSize(0)
|
self.text_ctrl_7.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetColSize(0, 30)
|
self.text_ctrl_8.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetColSize(1, 30)
|
self.text_ctrl_9.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetColSize(2, 30)
|
self.text_ctrl_10.SetBackgroundColour(wx.Colour(255, 0, 0))
|
||||||
self.fault_grid.SetColSize(3, 30)
|
|
||||||
self.fault_grid.SetColSize(4, 30)
|
|
||||||
self.fault_grid.SetColSize(5, 30)
|
|
||||||
self.fault_grid.SetColSize(6, 30)
|
|
||||||
self.fault_grid.SetColSize(7, 30)
|
|
||||||
self.fault_grid.SetRowSize(0, 30)
|
|
||||||
self.fault_grid.SetRowSize(1, 30)
|
|
||||||
self.fault_grid.SetRowSize(2, 30)
|
|
||||||
self.fault_grid.SetRowSize(3, 30)
|
|
||||||
self.fault_grid.SetRowSize(4, 30)
|
|
||||||
self.fault_grid.SetRowSize(5, 30)
|
|
||||||
self.fault_grid.SetRowSize(6, 30)
|
|
||||||
self.fault_grid.SetRowSize(7, 30)
|
|
||||||
self.fault_grid.SetMinSize((270, 270))
|
|
||||||
self.choice_ac1_control.SetSelection(0)
|
|
||||||
self.choice_dc2_control.SetSelection(0)
|
|
||||||
self.choice_dc3_control.SetSelection(0)
|
|
||||||
# end wxGlade
|
# end wxGlade
|
||||||
|
|
||||||
def __do_layout(self):
|
def __do_layout(self):
|
||||||
# begin wxGlade: FaultFrame.__do_layout
|
# begin wxGlade: FaultFrame.__do_layout
|
||||||
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
sizer_2 = wx.BoxSizer(wx.VERTICAL)
|
|
||||||
sizer_11 = wx.StaticBoxSizer(wx.StaticBox(self.panel_1, wx.ID_ANY, _("DC3 Port")), wx.HORIZONTAL)
|
|
||||||
grid_sizer_2 = wx.GridSizer(4, 2, 0, 0)
|
|
||||||
sizer_10 = wx.StaticBoxSizer(wx.StaticBox(self.panel_1, wx.ID_ANY, _("DC2 Port")), wx.HORIZONTAL)
|
|
||||||
grid_sizer_1 = wx.GridSizer(7, 2, 0, 0)
|
|
||||||
sizer_9 = wx.StaticBoxSizer(wx.StaticBox(self.panel_1, wx.ID_ANY, _("AC1 Port")), wx.HORIZONTAL)
|
|
||||||
grid_sizer_3 = wx.GridSizer(3, 2, 0, 0)
|
|
||||||
sizer_5 = wx.StaticBoxSizer(wx.StaticBox(self.panel_1, wx.ID_ANY, _("Manual Mode Control")), wx.HORIZONTAL)
|
|
||||||
sizer_3 = wx.BoxSizer(wx.VERTICAL)
|
|
||||||
sizer_7 = wx.BoxSizer(wx.VERTICAL)
|
sizer_7 = wx.BoxSizer(wx.VERTICAL)
|
||||||
sizer_8 = wx.BoxSizer(wx.VERTICAL)
|
sizer_8 = wx.BoxSizer(wx.VERTICAL)
|
||||||
sizer_4 = wx.GridSizer(7, 2, 0, 0)
|
sizer_14 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_13 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_12 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_11 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_10 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_9 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
sizer_4 = wx.GridSizer(6, 2, 0, 0)
|
||||||
label_1 = wx.StaticText(self, wx.ID_ANY, _("IP Address"))
|
label_1 = wx.StaticText(self, wx.ID_ANY, _("IP Address"))
|
||||||
sizer_4.Add(label_1, 0, 0, 0)
|
sizer_4.Add(label_1, 0, 0, 0)
|
||||||
sizer_4.Add(self.input_ip, 0, 0, 0)
|
sizer_4.Add(self.input_ip, 0, 0, 0)
|
||||||
|
|
@ -136,84 +156,100 @@ class FaultFrame(wx.Frame):
|
||||||
sizer_4.Add(self.apply_button, 0, 0, 0)
|
sizer_4.Add(self.apply_button, 0, 0, 0)
|
||||||
sizer_4.Add(self.rreset_button, 0, 0, 0)
|
sizer_4.Add(self.rreset_button, 0, 0, 0)
|
||||||
sizer_4.Add(self.button_1, 0, 0, 0)
|
sizer_4.Add(self.button_1, 0, 0, 0)
|
||||||
sizer_4.Add(self.op_mode_button, 0, 0, 0)
|
|
||||||
sizer_4.Add(self.text_op_mode, 0, 0, 0)
|
|
||||||
sizer_7.Add(sizer_4, 0, wx.EXPAND, 0)
|
sizer_7.Add(sizer_4, 0, wx.EXPAND, 0)
|
||||||
label_21 = wx.StaticText(self, wx.ID_ANY, _("System Status"))
|
sizer_7.Add((20, 20), 0, wx.EXPAND, 0)
|
||||||
sizer_8.Add(label_21, 0, 0, 0)
|
label_5 = wx.StaticText(self, wx.ID_ANY, _("Relay 1"))
|
||||||
sizer_8.Add(self.text_ctrl_system_status, 1, wx.EXPAND, 0)
|
sizer_2.Add(label_5, 0, 0, 0)
|
||||||
label_22 = wx.StaticText(self, wx.ID_ANY, _("AC1 Status"))
|
sizer_2.Add((20, 20), 0, 0, 0)
|
||||||
sizer_8.Add(label_22, 0, 0, 0)
|
sizer_2.Add(self.text_ctrl_1, 0, 0, 0)
|
||||||
sizer_8.Add(self.text_ctrl_ac1_status, 1, wx.EXPAND, 0)
|
sizer_2.Add((20, 20), 0, 0, 0)
|
||||||
label_23 = wx.StaticText(self, wx.ID_ANY, _("DC2 Statu"))
|
sizer_2.Add(self.button_2, 0, 0, 0)
|
||||||
sizer_8.Add(label_23, 0, 0, 0)
|
sizer_2.Add(self.button_3, 0, 0, 0)
|
||||||
sizer_8.Add(self.text_ctrl_dc2_status, 1, wx.EXPAND, 0)
|
sizer_2.Add(self.button_4, 0, 0, 0)
|
||||||
label_24 = wx.StaticText(self, wx.ID_ANY, _("DC3 Status"))
|
sizer_8.Add(sizer_2, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
sizer_8.Add(label_24, 0, 0, 0)
|
label_6 = wx.StaticText(self, wx.ID_ANY, _("Relay 2"))
|
||||||
sizer_8.Add(self.text_ctrl_dc3_status, 1, wx.EXPAND, 0)
|
sizer_3.Add(label_6, 0, 0, 0)
|
||||||
|
sizer_3.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_3.Add(self.text_ctrl_2, 0, 0, 0)
|
||||||
|
sizer_3.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_3.Add(self.button_5, 0, 0, 0)
|
||||||
|
sizer_3.Add(self.button_6, 0, 0, 0)
|
||||||
|
sizer_3.Add(self.button_7, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_3, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_7 = wx.StaticText(self, wx.ID_ANY, _("Relay 3"))
|
||||||
|
sizer_5.Add(label_7, 0, 0, 0)
|
||||||
|
sizer_5.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_5.Add(self.text_ctrl_3, 0, 0, 0)
|
||||||
|
sizer_5.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_5.Add(self.button_8, 0, 0, 0)
|
||||||
|
sizer_5.Add(self.button_9, 0, 0, 0)
|
||||||
|
sizer_5.Add(self.button_10, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_5, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_8 = wx.StaticText(self, wx.ID_ANY, _("Relay 4"))
|
||||||
|
sizer_6.Add(label_8, 0, 0, 0)
|
||||||
|
sizer_6.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_6.Add(self.text_ctrl_4, 0, 0, 0)
|
||||||
|
sizer_6.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_6.Add(self.button_11, 0, 0, 0)
|
||||||
|
sizer_6.Add(self.button_12, 0, 0, 0)
|
||||||
|
sizer_6.Add(self.button_13, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_6, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_9 = wx.StaticText(self, wx.ID_ANY, _("Relay 5"))
|
||||||
|
sizer_9.Add(label_9, 0, 0, 0)
|
||||||
|
sizer_9.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_9.Add(self.text_ctrl_5, 0, 0, 0)
|
||||||
|
sizer_9.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_9.Add(self.button_14, 0, 0, 0)
|
||||||
|
sizer_9.Add(self.button_15, 0, 0, 0)
|
||||||
|
sizer_9.Add(self.button_16, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_9, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_10 = wx.StaticText(self, wx.ID_ANY, _("Relay 6"))
|
||||||
|
sizer_10.Add(label_10, 0, 0, 0)
|
||||||
|
sizer_10.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_10.Add(self.text_ctrl_6, 0, 0, 0)
|
||||||
|
sizer_10.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_10.Add(self.button_17, 0, 0, 0)
|
||||||
|
sizer_10.Add(self.button_18, 0, 0, 0)
|
||||||
|
sizer_10.Add(self.button_19, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_10, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_11 = wx.StaticText(self, wx.ID_ANY, _("Relay 7"))
|
||||||
|
sizer_11.Add(label_11, 0, 0, 0)
|
||||||
|
sizer_11.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_11.Add(self.text_ctrl_7, 0, 0, 0)
|
||||||
|
sizer_11.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_11.Add(self.button_20, 0, 0, 0)
|
||||||
|
sizer_11.Add(self.button_21, 0, 0, 0)
|
||||||
|
sizer_11.Add(self.button_22, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_11, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_12 = wx.StaticText(self, wx.ID_ANY, _("Relay 8"))
|
||||||
|
sizer_12.Add(label_12, 0, 0, 0)
|
||||||
|
sizer_12.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_12.Add(self.text_ctrl_8, 0, 0, 0)
|
||||||
|
sizer_12.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_12.Add(self.button_23, 0, 0, 0)
|
||||||
|
sizer_12.Add(self.button_24, 0, 0, 0)
|
||||||
|
sizer_12.Add(self.button_25, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_12, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_13 = wx.StaticText(self, wx.ID_ANY, _("Relay 9"))
|
||||||
|
sizer_13.Add(label_13, 0, 0, 0)
|
||||||
|
sizer_13.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_13.Add(self.text_ctrl_9, 0, 0, 0)
|
||||||
|
sizer_13.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_13.Add(self.button_26, 0, 0, 0)
|
||||||
|
sizer_13.Add(self.button_27, 0, 0, 0)
|
||||||
|
sizer_13.Add(self.button_28, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_13, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
|
label_14 = wx.StaticText(self, wx.ID_ANY, _("Relay 10"))
|
||||||
|
sizer_14.Add(label_14, 0, 0, 0)
|
||||||
|
sizer_14.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_14.Add(self.text_ctrl_10, 0, 0, 0)
|
||||||
|
sizer_14.Add((20, 20), 0, 0, 0)
|
||||||
|
sizer_14.Add(self.button_29, 0, 0, 0)
|
||||||
|
sizer_14.Add(self.button_30, 0, 0, 0)
|
||||||
|
sizer_14.Add(self.button_31, 0, 0, 0)
|
||||||
|
sizer_8.Add(sizer_14, 1, wx.ALIGN_CENTER_HORIZONTAL, 0)
|
||||||
sizer_7.Add(sizer_8, 1, wx.EXPAND, 0)
|
sizer_7.Add(sizer_8, 1, wx.EXPAND, 0)
|
||||||
sizer_1.Add(sizer_7, 1, wx.EXPAND, 0)
|
sizer_1.Add(sizer_7, 1, wx.EXPAND, 0)
|
||||||
sizer_3.Add(self.fault_grid, 0, wx.ALIGN_CENTER, 0)
|
|
||||||
label_25 = wx.StaticText(self, wx.ID_ANY, _("Fault Info (Documented)"))
|
|
||||||
sizer_3.Add(label_25, 0, 0, 0)
|
|
||||||
sizer_3.Add(self.text_fault_doc, 1, wx.EXPAND, 0)
|
|
||||||
label_26 = wx.StaticText(self, wx.ID_ANY, _("Fault Status"))
|
|
||||||
sizer_3.Add(label_26, 0, 0, 0)
|
|
||||||
sizer_3.Add(self.text_fault_status, 1, wx.EXPAND, 0)
|
|
||||||
sizer_1.Add(sizer_3, 1, wx.EXPAND, 0)
|
|
||||||
sizer_5.Add(self.button_2, 0, 0, 0)
|
|
||||||
sizer_5.Add(self.button_3, 0, 0, 0)
|
|
||||||
sizer_2.Add(sizer_5, 0, 0, 0)
|
|
||||||
label_8 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Control Method"))
|
|
||||||
grid_sizer_3.Add(label_8, 0, 0, 0)
|
|
||||||
grid_sizer_3.Add(self.choice_ac1_control, 0, 0, 0)
|
|
||||||
label_11 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Real Power Setpoint"))
|
|
||||||
grid_sizer_3.Add(label_11, 0, 0, 0)
|
|
||||||
grid_sizer_3.Add(self.text_ctrl_ac1_realpwr, 0, 0, 0)
|
|
||||||
label_12 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Reactive Power Setpoint"))
|
|
||||||
grid_sizer_3.Add(label_12, 0, 0, 0)
|
|
||||||
grid_sizer_3.Add(self.text_ctrl_ac1_reactpwr, 0, 0, 0)
|
|
||||||
sizer_9.Add(grid_sizer_3, 1, wx.EXPAND, 0)
|
|
||||||
sizer_2.Add(sizer_9, 1, wx.EXPAND, 0)
|
|
||||||
label_9 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Contol Method"))
|
|
||||||
grid_sizer_1.Add(label_9, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.choice_dc2_control, 0, 0, 0)
|
|
||||||
label_19 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Current Setpoint"))
|
|
||||||
grid_sizer_1.Add(label_19, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.text_ctrl_dc2_current, 0, 0, 0)
|
|
||||||
label_13 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Power Setpoint"))
|
|
||||||
grid_sizer_1.Add(label_13, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.text_ctrl_dc2_power, 0, 0, 0)
|
|
||||||
label_14 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Voltage Setpoint"))
|
|
||||||
grid_sizer_1.Add(label_14, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.text_ctrl_dc2_voltage, 0, 0, 0)
|
|
||||||
label_17 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Precharge Limit Low"))
|
|
||||||
grid_sizer_1.Add(label_17, 0, 0, 0)
|
|
||||||
label_18 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Precharge Limit High"))
|
|
||||||
grid_sizer_1.Add(label_18, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.text_ctrl_7, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.text_ctrl_8, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.button_4, 0, 0, 0)
|
|
||||||
grid_sizer_1.Add(self.button_5, 0, 0, 0)
|
|
||||||
sizer_10.Add(grid_sizer_1, 1, wx.EXPAND, 0)
|
|
||||||
sizer_2.Add(sizer_10, 1, wx.EXPAND, 0)
|
|
||||||
label_10 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Control Method"))
|
|
||||||
grid_sizer_2.Add(label_10, 0, 0, 0)
|
|
||||||
grid_sizer_2.Add(self.choice_dc3_control, 0, 0, 0)
|
|
||||||
label_20 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Current Setpoint"))
|
|
||||||
grid_sizer_2.Add(label_20, 0, 0, 0)
|
|
||||||
grid_sizer_2.Add(self.text_ctrl_dc3_current, 0, 0, 0)
|
|
||||||
label_15 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Power Setpoint"))
|
|
||||||
grid_sizer_2.Add(label_15, 0, 0, 0)
|
|
||||||
grid_sizer_2.Add(self.text_ctrl_dc3_power, 0, 0, 0)
|
|
||||||
label_16 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Voltage Setpoint"))
|
|
||||||
grid_sizer_2.Add(label_16, 0, 0, 0)
|
|
||||||
grid_sizer_2.Add(self.text_ctrl_dc3_voltage, 0, 0, 0)
|
|
||||||
sizer_11.Add(grid_sizer_2, 1, wx.ALL | wx.EXPAND, 1)
|
|
||||||
sizer_2.Add(sizer_11, 1, wx.EXPAND, 0)
|
|
||||||
self.panel_1.SetSizer(sizer_2)
|
|
||||||
sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0)
|
|
||||||
sizer_1.Add(self.property_grid_1, 1, wx.EXPAND, 0)
|
|
||||||
self.SetSizer(sizer_1)
|
self.SetSizer(sizer_1)
|
||||||
self.Layout()
|
self.Layout()
|
||||||
# end wxGlade
|
# end wxGlade
|
||||||
|
|
@ -234,20 +270,16 @@ class FaultFrame(wx.Frame):
|
||||||
print("Event handler 'ToggleMonitoring' not implemented!")
|
print("Event handler 'ToggleMonitoring' not implemented!")
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def OnCheckSysOpMode(self, event): # wxGlade: FaultFrame.<event_handler>
|
def OnRelayOn(self, event): # wxGlade: FaultFrame.<event_handler>
|
||||||
print("Event handler 'OnCheckSysOpMode' not implemented!")
|
print("Event handler 'OnRelayOn' not implemented!")
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def OnFaultSelect(self, event): # wxGlade: FaultFrame.<event_handler>
|
def OnRelayOff(self, event): # wxGlade: FaultFrame.<event_handler>
|
||||||
print("Event handler 'OnFaultSelect' not implemented!")
|
print("Event handler 'OnRelayOff' not implemented!")
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
def OnOpStart(self, event): # wxGlade: FaultFrame.<event_handler>
|
def OnRelayPulse(self, event): # wxGlade: FaultFrame.<event_handler>
|
||||||
print("Event handler 'OnOpStart' not implemented!")
|
print("Event handler 'OnRelayPulse' not implemented!")
|
||||||
event.Skip()
|
|
||||||
|
|
||||||
def OnOpStop(self, event): # wxGlade: FaultFrame.<event_handler>
|
|
||||||
print("Event handler 'OnOpStop' not implemented!")
|
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
||||||
# end of class FaultFrame
|
# end of class FaultFrame
|
||||||
|
|
|
||||||
1149
faultView.wxg
1149
faultView.wxg
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue