29 from threading import Lock |
29 from threading import Lock |
30 |
30 |
31 import wx |
31 import wx |
32 |
32 |
33 from plcopen.structures import * |
33 from plcopen.structures import * |
34 from PLCControler import ITEM_POU, ITEM_PROGRAM, ITEM_FUNCTIONBLOCK |
34 from PLCControler import ITEM_VAR_LOCAL, ITEM_POU, ITEM_PROGRAM, ITEM_FUNCTIONBLOCK |
35 |
35 |
36 from dialogs import * |
36 from dialogs import * |
37 from graphics import * |
37 from graphics import * |
38 from EditorPanel import EditorPanel |
38 from EditorPanel import EditorPanel |
39 |
39 |
1877 else: |
1877 else: |
1878 iec_path = self.GetElementIECPath(self.SelectedElement) |
1878 iec_path = self.GetElementIECPath(self.SelectedElement) |
1879 if iec_path is not None: |
1879 if iec_path is not None: |
1880 if isinstance(self.SelectedElement, Wire): |
1880 if isinstance(self.SelectedElement, Wire): |
1881 if self.SelectedElement.EndConnected is not None: |
1881 if self.SelectedElement.EndConnected is not None: |
1882 var_type = self.SelectedElement.EndConnected.GetType() |
1882 self.ParentWindow.OpenDebugViewer(ITEM_VAR_LOCAL, iec_path, |
1883 if self.Controler.IsOfType(var_type, "ANY_NUM", self.Debug) or\ |
1883 self.SelectedElement.EndConnected.GetType()) |
1884 self.Controler.IsOfType(var_type, "ANY_BIT", self.Debug): |
|
1885 self.ParentWindow.OpenGraphicViewer(iec_path) |
|
1886 else: |
1884 else: |
1887 self.ParentWindow.OpenGraphicViewer(iec_path) |
1885 self.ParentWindow.OpenDebugViewer(ITEM_VAR_LOCAL, iec_path, "BOOL") |
1888 elif event.ControlDown() and not event.ShiftDown(): |
1886 elif event.ControlDown() and not event.ShiftDown(): |
1889 if not isinstance(self.SelectedElement, Graphic_Group): |
1887 if not isinstance(self.SelectedElement, Graphic_Group): |
1890 if isinstance(self.SelectedElement, FBD_Block): |
1888 if isinstance(self.SelectedElement, FBD_Block): |
1891 instance_type = self.SelectedElement.GetType() |
1889 instance_type = self.SelectedElement.GetType() |
1892 else: |
1890 else: |