17 <variable name="TaxisMinus" type="BOOL"/> |
17 <variable name="TaxisMinus" type="BOOL"/> |
18 <variable name="XaxisPlus" type="BOOL"/> |
18 <variable name="XaxisPlus" type="BOOL"/> |
19 <variable name="YaxisPlus" type="BOOL"/> |
19 <variable name="YaxisPlus" type="BOOL"/> |
20 <variable name="ZaxisPlus" type="BOOL"/> |
20 <variable name="ZaxisPlus" type="BOOL"/> |
21 <variable name="TaxisPlus" type="BOOL"/> |
21 <variable name="TaxisPlus" type="BOOL"/> |
|
22 <variable name="DrawTestBtn" type="BOOL"/> |
|
23 <variable name="DrawTestBtn2" type="BOOL"/> |
22 </variables> |
24 </variables> |
23 <globals> |
25 <globals> |
24 <xhtml:p><![CDATA[ |
26 <xhtml:p><![CDATA[ |
25 import ctypes |
27 import ctypes |
26 import wx, sys |
28 import wx, sys |
100 lambda btname: MakeButtonFunc(self, sizer, btname), ActionButtons) |
102 lambda btname: MakeButtonFunc(self, sizer, btname), ActionButtons) |
101 self.axis_buttons = map( |
103 self.axis_buttons = map( |
102 lambda axis:( MakeButtonFunc(self, sizer, axis+"axisMinus"), |
104 lambda axis:( MakeButtonFunc(self, sizer, axis+"axisMinus"), |
103 MakeButtonFunc(self, sizer, axis+"axisPlus")), |
105 MakeButtonFunc(self, sizer, axis+"axisPlus")), |
104 AxisList) |
106 AxisList) |
|
107 |
|
108 |
105 # self.timer = wx.Timer(self, -1) |
109 # self.timer = wx.Timer(self, -1) |
106 # self.Bind(wx.EVT_TIMER, self.UpdatePositions, self.timer) |
110 # self.Bind(wx.EVT_TIMER, self.UpdatePositions, self.timer) |
107 # self.ShowFullScreen(True,wx.FULLSCREEN_ALL) |
111 # self.ShowFullScreen(True,wx.FULLSCREEN_ALL) |
108 # wx.CallAfter(self.timer.Start,200) |
112 # wx.CallAfter(self.timer.Start,200) |
109 |
113 |
110 Class_wxglade_hmi.__init__ = Init |
114 Class_wxglade_hmi.__init__ = Init |
111 |
115 |
112 def SetPLCGlobalVar(self, evt): |
116 def SetPLCTestBtnGlobalVar(self, evt): |
113 tglbtname = evt.GetEventObject().GetName() |
117 setattr(PLCGlobals, "DrawTestBtn", evt.GetEventObject().GetValue()) |
114 setattr(PLCGlobals, tglbtname, evt.GetEventObject().GetValue()) |
118 |
|
119 def SetPLCTestBtn2GlobalVar(self, evt): |
|
120 setattr(PLCGlobals, "DrawTestBtn2", evt.GetEventObject().GetValue()) |
115 |
121 |
116 ]]></xhtml:p> |
122 ]]></xhtml:p> |
117 </globals> |
123 </globals> |
118 <init> |
124 <init> |
119 <xhtml:p><![CDATA[ |
125 <xhtml:p><![CDATA[ |