merge
2017-03-24, Mario de Sousa
--- a/.hgignore Sun Mar 05 00:38:25 2017 +0000
+++ b/.hgignore Fri Mar 24 12:07:47 2017 +0000
@@ -4,9 +4,14 @@
--- a/Beremiz.py Sun Mar 05 00:38:25 2017 +0000
+++ b/Beremiz.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,27 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -31,18 +30,33 @@
from types import ListType
beremiz_dir = os.path.dirname(os.path.realpath(__file__))
+if __name__ == '__main__': + wxversion.select(['2.8', '3.0']) from wx.lib.agw.advancedsplash import AdvancedSplash
return os.path.join(beremiz_dir,*args)
+ bmp = wx.Image(Bpath("images", "splash.png")).ConvertToBitmap() + #splash=AdvancedSplash(None, bitmap=bmp, style=wx.SPLASH_CENTRE_ON_SCREEN, timeout=4000) + splash = AdvancedSplash(None, bitmap=bmp) + # even the events generated by splash themself during showing if __name__ == '__main__':
print "\nUsage of Beremiz.py :"
@@ -84,18 +98,24 @@
__builtin__.__dict__["BMZ_DBG"] = False
- app = wx.PySimpleApp(redirect=BMZ_DBG)
+ if wx.VERSION >= (3, 0, 0): + app = wx.App(redirect=BMZ_DBG) + app = wx.PySimpleApp(redirect=BMZ_DBG) app.SetAppName('beremiz')
- wx.InitAllImageHandlers()
+ if wx.VERSION < (3, 0, 0): + wx.InitAllImageHandlers() - bmp = wx.Image(Bpath("images", "splash.png")).ConvertToBitmap()
- #splash=AdvancedSplash(None, bitmap=bmp, style=wx.SPLASH_CENTRE_ON_SCREEN, timeout=4000)
- splash=AdvancedSplash(None, bitmap=bmp)
+ splash = ShowSplashScreen() + # load internatialization files + from util.misc import InstallLocalRessources + InstallLocalRessources(beremiz_dir) if updateinfo_url is not None:
- updateinfo = "Fetching %s" % updateinfo_url
+ updateinfo = _("Fetching %s") % updateinfo_url # warn for possible updates
@@ -103,7 +123,7 @@
updateinfo = urllib2.urlopen(updateinfo_url,None).read()
- updateinfo = "update info unavailable."
+ updateinfo = _("update info unavailable.") from threading import Thread
splash.SetText(text=updateinfo)
@@ -114,9 +134,6 @@
splash.SetText(text=updateinfo)
- from util.misc import InstallLocalRessources
- InstallLocalRessources(beremiz_dir)
for extfilename in extensions:
from util.TranslationCatalogs import AddCatalog
@@ -142,6 +159,8 @@
from util.ProcessLogger import ProcessLogger
from controls.LogViewer import LogViewer
from controls.CustomStyledTextCtrl import CustomStyledTextCtrl
+from controls import EnhancedStatusBar as esb +from dialogs.AboutDialog import ShowAboutDialog from PLCControler import LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY, ITEM_PROJECT, ITEM_RESOURCE
from ProjectController import ProjectController, GetAddMenuItems, MATIEC_ERROR_MODEL, ITEM_CONFNODE
@@ -231,12 +250,14 @@
# adding text. It seems that text modifications, even
# programmatically, are disabled in StyledTextCtrl when read
+ start_pos = self.output.GetLength() self.output.SetReadOnly(False)
self.output.AppendText(s)
self.output.SetReadOnly(True)
+ text_len = self.output.GetLength() - start_pos if style != self.black_white:
- self.output.SetStyling(len(s), style)
+ self.output.SetStyling(text_len, style) @@ -377,6 +398,11 @@
self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID)
accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL|wx.ACCEL_ALT, ord('I'), inspectorID)]
+ self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=keyID) + accels += [wx.AcceleratorEntry(wx.ACCEL_NORMAL, wx.WXK_F12, keyID)] for method,shortcut in [("Stop", wx.WXK_F4),
@@ -440,11 +466,28 @@
- self.ConnectionStatusBar = wx.StatusBar(self, style=wx.ST_SIZEGRIP)
+ self.ConnectionStatusBar = esb.EnhancedStatusBar(self, style=wx.ST_SIZEGRIP) self._init_coll_ConnectionStatusBar_Fields(self.ConnectionStatusBar)
+ self.ProgressStatusBar = wx.Gauge(self.ConnectionStatusBar, -1, range = 100) + self.ConnectionStatusBar.AddWidget(self.ProgressStatusBar, esb.ESB_EXACT_FIT, esb.ESB_EXACT_FIT, 2) + self.ProgressStatusBar.Hide() self.SetStatusBar(self.ConnectionStatusBar)
+ def __init_execute_path(self): + # on windows, desktop shortcut launches Beremiz.py + # with working dir set to mingw/bin. + # then we prefix CWD to PATH in order to ensure that + # commands invoked by build process by default are + os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] def __init__(self, parent, projectOpen=None, buildpath=None, ctr=None, debug=True):
+ # Add beremiz's icon in top left corner of the frame + self.icon = wx.Icon(Bpath("images", "brz.ico"), wx.BITMAP_TYPE_ICO) + self.__init_execute_path() IDEFrame.__init__(self, parent, debug)
self.Log = LogPseudoFile(self.LogConsole,self.SelectTab)
@@ -473,16 +516,13 @@
("Extension", ITEM_CONFNODE)]:
self.TreeImageDict[itemtype] = self.TreeImageList.Add(GetBitmap(imgname))
- # Add beremiz's icon in top left corner of the frame
- self.SetIcon(wx.Icon(Bpath("images", "brz.ico"), wx.BITMAP_TYPE_ICO))
if projectOpen is not None:
projectOpen = DecodeFileSystemPath(projectOpen, False)
if projectOpen is not None and os.path.isdir(projectOpen):
self.CTR = ProjectController(self, self.Log)
self.Controler = self.CTR
- result = self.CTR.LoadProject(projectOpen, buildpath)
+ result, err = self.CTR.LoadProject(projectOpen, buildpath) self.LibraryPanel.SetController(self.Controler)
self.ProjectTree.Enable(True)
@@ -534,7 +574,7 @@
{False : "-x 0", True :"-x 1"}[taskbaricon],
self.local_runtime_tmpdir),
- timeout=500, keyword = "working",
+ timeout=500, keyword = self.local_runtime_tmpdir, cwd = self.local_runtime_tmpdir)
self.local_runtime.spin()
@@ -717,6 +757,11 @@
self.GetConfigEntry("RecentProjects", []))
+ while self.RecentProjectsMenu.GetMenuItemCount() > len(recent_projects): + item = self.RecentProjectsMenu.FindItemByPosition(0) + self.RecentProjectsMenu.RemoveItem(item) self.FileMenu.Enable(ID_FILEMENURECENTPROJECTS, len(recent_projects) > 0)
for idx, projectpath in enumerate(recent_projects):
text = u'%d: %s' % (idx + 1, projectpath)
@@ -856,7 +901,7 @@
self.DebugVariablePanel.SetDataProducer(None)
self.ResetConnectionStatusBar()
- def RefreshConfigRecentProjects(self, projectpath):
+ def RefreshConfigRecentProjects(self, projectpath, err=False): recent_projects = map(DecodeFileSystemPath,
self.GetConfigEntry("RecentProjects", []))
@@ -864,7 +909,8 @@
if projectpath in recent_projects:
recent_projects.remove(projectpath)
- recent_projects.insert(0, projectpath)
+ recent_projects.insert(0, projectpath) self.Config.Write("RecentProjects", cPickle.dumps(
map(EncodeFileSystemPath, recent_projects[:MAX_RECENT_PROJECTS])))
@@ -931,12 +977,11 @@
self.CTR = ProjectController(self, self.Log)
self.Controler = self.CTR
- result = self.CTR.LoadProject(projectpath)
+ result, err = self.CTR.LoadProject(projectpath) self.LibraryPanel.SetController(self.Controler)
self.ProjectTree.Enable(True)
self.PouInstanceVariablesPanel.SetController(self.Controler)
- self.RefreshConfigRecentProjects(projectpath)
self.DebugVariablePanel.SetDataProducer(self.CTR)
self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
@@ -944,8 +989,11 @@
self.ShowErrorMessage(result)
+ self.SearchResultPanel.ResetSearchResults() self.ShowErrorMessage(_("\"%s\" folder is not a valid Beremiz project\n") % projectpath)
+ self.RefreshConfigRecentProjects(projectpath, err) self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
def OnCloseProjectMenu(self, event):
@@ -974,13 +1022,15 @@
+ self.RefreshConfigRecentProjects(self.CTR.ProjectPath) self._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES)
def OnQuitMenu(self, event):
def OnAboutMenu(self, event):
- OpenHtmlFrame(self,_("About Beremiz"), Bpath("doc", "about.html"), wx.Size(550, 500))
+ info = version.GetAboutDialogInfo() + ShowAboutDialog(self, info) def OnProjectTreeItemBeginEdit(self, event):
selected = event.GetItem()
@@ -1145,7 +1195,7 @@
Please be kind enough to send this file to:
beremiz-devel@lists.sourceforge.net
-You should now restart Beremiz.
+You should now restart program. @@ -1231,7 +1281,7 @@
if __name__ == '__main__':
# Install a exception handle for bug reports
- AddExceptHook(os.getcwd(),updateinfo_url)
+ AddExceptHook(os.getcwd(),version.app_version) frame = Beremiz(None, projectOpen, buildpath)
--- a/Beremiz_service.py Sun Mar 05 00:38:25 2017 +0000
+++ b/Beremiz_service.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from threading import Thread
@@ -112,10 +112,52 @@
if __name__ == '__main__':
__builtin__.__dict__['_'] = lambda x: x
+ return os.path.join(beremiz_dir,*args) + # Import module for internationalization + # Get folder containing translation files + localedir = os.path.join(beremiz_dir,"locale") + # Get the default language + langid = wx.LANGUAGE_DEFAULT + # Define translation domain (name of translation files) + loc = __builtin__.__dict__.get('loc', None) + loc = wx.Locale(langid) + __builtin__.__dict__['loc'] = loc + # Define location for searching translation files + loc.AddCatalogLookupPathPrefix(localedir) + default_locale = locale.getdefaultlocale()[1] + # sys.stdout.encoding = default_locale + # if Beremiz_service is started from Beremiz IDE + # sys.stdout.encoding is None (that means 'ascii' encoding'). + # And unicode string returned by wx.GetTranslation() are + # automatically converted to 'ascii' string. + def unicode_translation(message): + return wx.GetTranslation(message).encode(default_locale) + if __name__ == '__main__': + __builtin__.__dict__['_'] = unicode_translation + # __builtin__.__dict__['_'] = wx.GetTranslation - wxversion.select('2.8')
+ wxversion.select(['2.8', '3.0']) @@ -126,36 +168,15 @@
from threading import Thread, currentThread
- app=wx.App(redirect=False)
- # Import module for internationalization
- return os.path.join(beremiz_dir,*args)
- # Get folder containing translation files
- localedir = os.path.join(beremiz_dir,"locale")
- # Get the default language
- langid = wx.LANGUAGE_DEFAULT
- # Define translation domain (name of translation files)
- loc = __builtin__.__dict__.get('loc', None)
- loc = wx.Locale(langid)
- __builtin__.__dict__['loc'] = loc
- # Define location for searching translation files
- loc.AddCatalogLookupPathPrefix(localedir)
+ if wx.VERSION >= (3, 0, 0): + app = wx.App(redirect=False) + app = wx.PySimpleApp(redirect=False) + app.SetTopWindow(wx.Frame(None, -1)) - def unicode_translation(message):
- return wx.GetTranslation(message).encode("utf-8")
- if __name__ == '__main__':
- __builtin__.__dict__['_'] = wx.GetTranslation#unicode_translation
defaulticon = wx.Image(Bpath("images", "brz.png"))
starticon = wx.Image(Bpath("images", "icoplay24.png"))
@@ -170,7 +191,7 @@
- def __init__(self, parent, message, caption = "Please enter text", defaultValue = "",
+ def __init__(self, parent, message, caption = _("Please enter text"), defaultValue = "", style = wx.OK|wx.CANCEL|wx.CENTRE, pos = wx.DefaultPosition):
wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos)
@@ -267,14 +288,23 @@
def OnTaskBarStartPLC(self, evt):
if self.pyroserver.plcobj is not None:
- self.pyroserver.plcobj.StartPLC()
+ plcstatus = self.pyroserver.plcobj.GetPLCstatus()[0] + if plcstatus is "Stopped": + self.pyroserver.plcobj.StartPLC() + print _("PLC is empty or already started.") def OnTaskBarStopPLC(self, evt):
if self.pyroserver.plcobj is not None:
- Thread(target=self.pyroserver.plcobj.StopPLC).start()
+ if self.pyroserver.plcobj.GetPLCstatus()[0] == "Started": + Thread(target=self.pyroserver.plcobj.StopPLC).start() + print _("PLC is not started.") def OnTaskBarChangeInterface(self, evt):
- dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=self.pyroserver.ip_addr)
+ ip_addr = self.pyroserver.ip_addr + ip_addr = '' if ip_addr is None else ip_addr + dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")),
( lambda x :len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, _("IP is not valid!"))
@@ -296,10 +326,12 @@
def OnTaskBarChangeName(self, evt):
- dlg = ParamsEntryDialog(None, _("Enter a name "), defaultValue=self.pyroserver.name)
+ servicename = self.pyroserver.servicename + servicename = '' if servicename is None else servicename + dlg = ParamsEntryDialog(None, _("Enter a name "), defaultValue=servicename) dlg.SetTests([(lambda name : len(name) is not 0 , _("Name must not be null!"))])
if dlg.ShowModal() == wx.ID_OK:
- self.pyroserver.name = dlg.GetValue()
+ self.pyroserver.servicename = dlg.GetValue() self.pyroserver.Restart()
def _LiveShellLocals(self):
@@ -379,6 +411,7 @@
self.continueloop = False
if self.plcobj is not None:
@@ -390,9 +423,13 @@
uri = self.daemon.connect(self.plcobj,"PLCObject")
- print "Pyro port :",self.port
- print "Pyro object's uri :",uri
- print "Current working directory :",self.workdir
+ print _("Pyro port :"), self.port + print _("Pyro object's uri :"), uri + # Beremiz IDE detects daemon start by looking + # for self.workdir in the daemon's stdout. + # Therefore don't delete the following line + print _("Current working directory :"), self.workdir # Configure and publish service
# Not publish service if localhost in address params
@@ -400,18 +437,20 @@
self.ip_addr is not None and
self.ip_addr != "localhost" and
self.ip_addr != "127.0.0.1"):
- print "Publishing service on local network"
+ print _("Publishing service on local network") self.servicepublisher = ServicePublisher.ServicePublisher()
self.servicepublisher.RegisterService(self.servicename, self.ip_addr, self.port)
- if self.plcobj.GetPLCstatus()[0] != "Empty":
+ if self.plcobj.GetPLCstatus()[0] != "Empty": + self.plcobj.StatusChange() self.daemon.requestLoop()
+ self.daemon.sock.close() if self.plcobj is not None:
@@ -434,7 +473,7 @@
- print "Twisted unavailable."
+ print _("Twisted unavailable.") @@ -512,7 +551,7 @@
import runtime.NevowServer as NS
- print "Nevow/Athena import failed :", e
+ print _("Nevow/Athena import failed :"), e NS.WorkingDir = WorkingDir
@@ -520,7 +559,7 @@
import runtime.WampClient as WC
- print "WAMP import failed :", e
+ print _("WAMP import failed :"), e @@ -536,7 +575,7 @@
pyruntimevars["website"] = website
statuschange.append(NS.website_statuslistener_factory(website))
- print "Nevow Web service failed.", e
+ print _("Nevow Web service failed. "), e if wampconf is not None :
@@ -544,7 +583,7 @@
pyruntimevars["wampsession"] = WC.GetSession
- print "WAMP client startup failed.", e
+ print _("WAMP client startup failed. "), e if havetwisted or havewx:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + The precise terms and conditions for copying, distribution and + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + How to Apply These Terms to Your New Programs + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +Also add information on how to contact you by electronic and paper mail. +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. --- a/CodeFileTreeNode.py Sun Mar 05 00:38:25 2017 +0000
+++ b/CodeFileTreeNode.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,28 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from copy import deepcopy
@@ -92,11 +117,12 @@
self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml)
- self.GetCTRoot().logger.write_warning(
- XSDSchemaErrorMessage % ((self.CODEFILE_NAME,) + error))
+ (fname, lnum, src) = ((self.CODEFILE_NAME,) + error) + self.GetCTRoot().logger.write_warning(XSDSchemaErrorMessage.format(a1 = fname, a2 = lnum, a3 = src)) self.CreateCodeFileBuffer(True)
- self.GetCTRoot().logger.write_error(_("Couldn't load confnode parameters %s :\n %s") % (CTNName, unicode(exc)))
+ msg = _("Couldn't load confnode parameters {a1} :\n {a2}").format(a1 = CTNName, a2 = unicode(exc)) + self.GetCTRoot().logger.write_error(msg) self.GetCTRoot().logger.write_error(traceback.format_exc())
self.CodeFile = self.CodeFileParser.CreateRoot()
--- a/ConfigTreeNode.py Sun Mar 05 00:38:25 2017 +0000
+++ b/ConfigTreeNode.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Config Tree Node base class.
@@ -29,7 +53,7 @@
-XSDSchemaErrorMessage = _("%s XML file doesn't follow XSD schema at line %d:\n%s")
+XSDSchemaErrorMessage = _("{a1} XML file doesn't follow XSD schema at line %{a2}:\n{a3}") @@ -397,7 +421,8 @@
shutil.move(oldname, self.CTNPath())
# warn user he has two left hands
- self.GetCTRoot().logger.write_warning(_("A child named \"%s\" already exist -> \"%s\"\n")%(DesiredName,res))
+ msg = _("A child named \"{a1}\" already exists -> \"{a2}\"\n").format(a1 = DesiredName, a2 = res) + self.GetCTRoot().logger.write_warning(msg) def GetAllChannels(self):
@@ -501,7 +526,7 @@
CTNClass, CTNHelp = CTNChildrenTypes[CTNType]
- raise Exception, _("Cannot create child %s of type %s ")%(CTNName, CTNType)
+ raise Exception, _("Cannot create child {a1} of type {a2} ").format(a1 = CTNName, a2 = CTNType) # if CTNClass is a class factory, call it. (prevent unneeded imports)
if type(CTNClass) == types.FunctionType:
@@ -511,7 +536,8 @@
ChildrenWithSameClass = self.Children.setdefault(CTNType, list())
if getattr(CTNClass, "CTNMaxCount", None) and len(ChildrenWithSameClass) >= CTNClass.CTNMaxCount:
- raise Exception, _("Max count (%d) reached for this confnode of type %s ")%(CTNClass.CTNMaxCount, CTNType)
+ msg = _("Max count ({a1}) reached for this confnode of type {a2} ").format(a1 = CTNClass.CTNMaxCount, a2 = CTNType) # create the final class, derived of provided confnode and template
class FinalCTNClass(CTNClass, ConfigTreeNode):
@@ -537,7 +563,9 @@
_self.LoadXMLParams(NewCTNName)
# Basic check. Better to fail immediately.
if (_self.BaseParams.getName() != NewCTNName):
- raise Exception, _("Project tree layout do not match confnode.xml %s!=%s ")%(NewCTNName, _self.BaseParams.getName())
+ msg = _("Project tree layout do not match confnode.xml {a1}!={a2} ").\ + format(a1 = NewCTNName, a2 = _self.BaseParams.getName()) # Now, self.CTNPath() should be OK
@@ -590,12 +618,13 @@
basexmlfile = open(self.ConfNodeBaseXmlFilePath(CTNName), 'r')
self.BaseParams, error = _BaseParamsParser.LoadXMLString(basexmlfile.read())
- self.GetCTRoot().logger.write_warning(
- XSDSchemaErrorMessage % ((ConfNodeName + " BaseParams",) + error))
+ (fname, lnum, src) = ((ConfNodeName + " BaseParams",) + error) + self.GetCTRoot().logger.write_warning(XSDSchemaErrorMessage.format(a1 = fname, a2 = lnum, a3 = src)) self.MandatoryParams = ("BaseParams", self.BaseParams)
- self.GetCTRoot().logger.write_error(_("Couldn't load confnode base parameters %s :\n %s") % (ConfNodeName, unicode(exc)))
+ msg = _("Couldn't load confnode base parameters {a1} :\n {a2}").format(a1 = ConfNodeName, a2 = unicode(exc)) + self.GetCTRoot().logger.write_error(msg) self.GetCTRoot().logger.write_error(traceback.format_exc())
@@ -604,14 +633,15 @@
xmlfile = open(self.ConfNodeXmlFilePath(CTNName), 'r')
obj, error = self.Parser.LoadXMLString(xmlfile.read())
- self.GetCTRoot().logger.write_warning(
- XSDSchemaErrorMessage % ((ConfNodeName,) + error))
+ (fname, lnum, src) = ((ConfNodeName,) + error) + self.GetCTRoot().logger.write_warning(XSDSchemaErrorMessage.format(a1 = fname, a2 = lnum, a3 = src)) self.CTNParams = (name, obj)
- self.GetCTRoot().logger.write_error(_("Couldn't load confnode parameters %s :\n %s") % (ConfNodeName, unicode(exc)))
+ msg = _("Couldn't load confnode parameters {a1} :\n {a2}").format(a1 = ConfNodeName, a2 = unicode(exc)) + self.GetCTRoot().logger.write_error(msg) self.GetCTRoot().logger.write_error(traceback.format_exc())
@@ -623,6 +653,7 @@
self.CTNAddChild(pname, ptype)
- self.GetCTRoot().logger.write_error(_("Could not add child \"%s\", type %s :\n%s\n")%(pname, ptype, unicode(exc)))
+ msg = _("Could not add child \"{a1}\", type {a2} :\n{a3}\n").format(a1 = pname, a2 = ptype, a3 = unicode(exc)) + self.GetCTRoot().logger.write_error(msg) self.GetCTRoot().logger.write_error(traceback.format_exc())
--- a/IDEFrame.py Sun Mar 05 00:38:25 2017 +0000
+++ b/IDEFrame.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -41,7 +64,8 @@
# Define PLCOpenEditor DisplayMenu extra items id
[ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE,
-] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(1)]
+ ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE, +] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(2)] #-------------------------------------------------------------------------------
# EditorToolBar definitions
@@ -419,6 +443,10 @@
self.Bind(wx.EVT_MENU, self.GenerateZoomFunction(idx), id=new_id)
+ AppendMenu(parent, help='', id=ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE, + kind=wx.ITEM_NORMAL, text=_(u'Switch perspective') + '\tF12') + self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE) AppendMenu(parent, help='', id=ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE,
kind=wx.ITEM_NORMAL, text=_(u'Reset Perspective'))
self.Bind(wx.EVT_MENU, self.OnResetPerspective, id=ID_PLCOPENEDITORDISPLAYMENURESETPERSPECTIVE)
@@ -444,10 +472,17 @@
self._init_coll_DisplayMenu_Items(self.DisplayMenu)
self._init_coll_HelpMenu_Items(self.HelpMenu)
+ def _init_icon(self, parent): + self.SetIcon(self.icon) + elif parent and parent.icon: + self.SetIcon(parent.icon) def _init_ctrls(self, prnt):
wx.Frame.__init__(self, id=ID_PLCOPENEDITOR, name='IDEFrame',
parent=prnt, pos=wx.DefaultPosition, size=wx.Size(1000, 600),
style=wx.DEFAULT_FRAME_STYLE)
self.SetClientSize(wx.Size(1000, 600))
self.Bind(wx.EVT_ACTIVATE, self.OnActivated)
@@ -1225,6 +1260,7 @@
def OnFindMenu(self, event):
if not self.FindDialog.IsShown():
+ self.FindDialog.FindPattern.SetFocus() def CloseFindInPouDialog(self):
selected = self.TabsOpened.GetSelection()
@@ -1249,10 +1285,11 @@
dialog = SearchInProjectDialog(self)
if dialog.ShowModal() == wx.ID_OK:
criteria = dialog.GetCriteria()
- result = self.Controler.SearchInProject(criteria)
- self.ClearSearchResults()
- self.SearchResultPanel.SetSearchResults(criteria, result)
- self.SelectTab(self.SearchResultPanel)
+ result = self.Controler.SearchInProject(criteria) + self.ClearSearchResults() + self.SearchResultPanel.SetSearchResults(criteria, result) + self.SelectTab(self.SearchResultPanel) #-------------------------------------------------------------------------------
@@ -1408,15 +1445,18 @@
def OnTabsOpenedDClick(event):
pos = event.GetPosition()
if tabctrl.TabHitTest(pos.x, pos.y, None):
- pane = self.AUIManager.GetPane(self.TabsOpened)
- self.AUIManager.RestorePane(pane)
- self.AUIManager.MaximizePane(pane)
- self.AUIManager.Update()
+ self.SwitchFullScrMode(event) return OnTabsOpenedDClick
+ def SwitchFullScrMode(self,evt): + pane = self.AUIManager.GetPane(self.TabsOpened) + self.AUIManager.RestorePane(pane) + self.AUIManager.MaximizePane(pane) + self.AUIManager.Update() #-------------------------------------------------------------------------------
# Types Tree Management Functions
#-------------------------------------------------------------------------------
@@ -1451,8 +1491,7 @@
self.ProjectTree.SetItemText(root, item_name)
self.ProjectTree.SetPyData(root, infos)
- highlight_colours = self.Highlights.get(infos.get("tagname", None), (wx.WHITE, wx.BLACK))
- self.ProjectTree.SetItemBackgroundColour(root, highlight_colours[0])
+ highlight_colours = self.Highlights.get(infos.get("tagname", None), (wx.Colour(255, 255, 255, 0), wx.BLACK)) self.ProjectTree.SetItemTextColour(root, highlight_colours[1])
self.ProjectTree.SetItemExtraImage(root, None)
if infos["type"] == ITEM_POU:
@@ -1582,6 +1621,8 @@
self.RefreshLibraryPanel()
elif item_infos["type"] == ITEM_TRANSITION:
+ pou_item = self.ProjectTree.GetItemParent(event.GetItem()) + pou_name = self.ProjectTree.GetItemText(pou_item) if new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouNames()]:
message = _("A POU named \"%s\" already exists!")%new_name
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouVariableNames(pou_name) if name != old_name]:
@@ -1593,6 +1634,8 @@
self.Controler.ComputePouTransitionName(words[1], new_name))
elif item_infos["type"] == ITEM_ACTION:
+ pou_item = self.ProjectTree.GetItemParent(event.GetItem()) + pou_name = self.ProjectTree.GetItemText(pou_item) if new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouNames()]:
message = _("A POU named \"%s\" already exists!")%new_name
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouVariableNames(pou_name) if name != old_name]:
@@ -1645,8 +1688,6 @@
self.ShowErrorMessage(message)
- wx.CallAfter(self.ProjectTree.EditLabel, item)
wx.CallAfter(self.RefreshProjectTree)
@@ -1918,7 +1959,7 @@
self.Bind(wx.EVT_MENU, self.OnDeleteMenu, id=new_id)
+ self.FindFocus().PopupMenu(menu) --- a/NativeLib.py Sun Mar 05 00:38:25 2017 +0000
+++ b/NativeLib.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from POULibrary import POULibrary
--- a/PLCControler.py Sun Mar 05 00:38:25 2017 +0000
+++ b/PLCControler.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from xml.dom import minidom
from types import StringType, UnicodeType, TupleType
@@ -967,7 +967,8 @@
# programs cannot be pasted as functions or function blocks
if orig_type == 'functionBlock' and pou_type == 'function' or \
orig_type == 'program' and pou_type in ['function', 'functionBlock']:
- return _('''%s "%s" can't be pasted as a %s.''') % (orig_type, name, pou_type)
+ msg = _('''{a1} "{a2}" can't be pasted as a {a3}.''').format(a1 = orig_type, a2 = name, a3 = pou_type) new_pou.setpouType(pou_type)
@@ -1962,7 +1963,7 @@
for dimension in element_type.getdimension():
dimensions.append((dimension.getlower(), dimension.getupper()))
base_type = element_type.baseType.getcontent()
- base_type_type = element_type.getLocalTag()
+ base_type_type = base_type.getLocalTag() element_infos["Type"] = ("array",
if base_type_type == "derived"
@@ -1972,7 +1973,7 @@
element_infos["Type"] = element_type_type.upper()
if element.initialValue is not None:
- element_infos["Initial Value"] = str(element.initialValue.getvalue())
+ element_infos["Initial Value"] = element.initialValue.getvalue() element_infos["Initial Value"] = ""
infos["elements"].append(element_infos)
@@ -1983,7 +1984,7 @@
else basetype_content_type.upper())
if datatype.initialValue is not None:
- infos["initial"] = str(datatype.initialValue.getvalue())
+ infos["initial"] = datatype.initialValue.getvalue() @@ -2062,6 +2063,8 @@
if element_infos["Type"][0] == "array":
array_type, base_type_name, dimensions = element_infos["Type"]
array = PLCOpenParser.CreateElement("array", "dataType")
+ baseType = PLCOpenParser.CreateElement("baseType", "array") + array.setbaseType(baseType) element_type.setcontent(array)
for j, dimension in enumerate(dimensions):
dimension_range = PLCOpenParser.CreateElement("dimension", "array")
@@ -2072,7 +2075,7 @@
array.appenddimension(dimension_range)
if base_type_name in self.GetBaseTypes():
- array.baseType.setcontent(PLCOpenParser.CreateElement(
+ baseType.setcontent(PLCOpenParser.CreateElement( if base_type_name in ["STRING", "WSTRING"]
else base_type_name, "dataType"))
@@ -2181,7 +2184,7 @@
return self.GetPouInterfaceReturnType(pou, tree, debug)
+ return ["BOOL", ([], [])] # Change the edited element text
@@ -2315,7 +2318,7 @@
- instances, error = LoadPouInstances(text.encode("utf-8"), bodytype)
+ instances, error = LoadPouInstances(text, bodytype) instances, error = [], ""
if error is not None or len(instances) == 0:
@@ -3190,7 +3193,14 @@
def SearchInPou(self, tagname, criteria, debug=False):
pou = self.GetEditedElement(tagname, debug)
- return pou.Search(criteria)
+ search_results = pou.Search(criteria, [tagname]) + if tagname.split("::")[0] in ['A', 'T']: + parent_pou_tagname = "P::%s" % (tagname.split("::")[-2]) + parent_pou = self.GetEditedElement(parent_pou_tagname, debug) + for infos, start, end, text in parent_pou.Search(criteria): + if infos[1] in ["var_local", "var_input", "var_output", "var_inout"]: + search_results.append((infos, start, end, text)) #-------------------------------------------------------------------------------
--- a/PLCGenerator.py Sun Mar 05 00:38:25 2017 +0000
+++ b/PLCGenerator.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from plcopen import PLCOpenParser
from plcopen.structures import *
@@ -393,6 +393,11 @@
single = task.getsingle()
# Single argument if exists
+ msg = _("Source signal has to be defined for single task '{a1}' in resource '{a2}.{a3}'.").\ + format(a1 = task.getname(), a2 = config_name, a3 = resource.getname()) + raise PLCGenException, msg if single[0]=='[' and single[-1]==']' :
@@ -763,7 +768,10 @@
content = instance.getconditionContent()
if content["type"] == "connection":
self.ConnectionTypes[content["value"]] = "BOOL"
- for link in content["value"].getconnections():
+ connections = content["value"].getconnections() + raise PLCGenException, _("SFC transition in POU \"%s\" must be connected.") % self.Name + for link in connections: connected = self.GetLinkedConnector(link, body)
if connected is not None and not self.ConnectionTypes.has_key(connected):
for related in self.ExtractRelatedConnections(connected):
@@ -775,7 +783,8 @@
for element in body.getcontentInstances():
if isinstance(element, ConnectorClass) and element.getname() == name:
if connector is not None:
- raise PLCGenException, _("More than one connector found corresponding to \"%s\" continuation in \"%s\" POU")%(name, self.Name)
+ msg = _("More than one connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU").format(a1 = name, a2 = self.Name) + raise PLCGenException, msg if connector is not None:
undefined = [instance.connectionPointOut, connector.connectionPointIn]
@@ -794,7 +803,8 @@
for connection in related:
self.ConnectionTypes[connection] = var_type
- raise PLCGenException, _("No connector found corresponding to \"%s\" continuation in \"%s\" POU")%(name, self.Name)
+ msg = _("No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU").format(a1 = name, a2 = self.Name) + raise PLCGenException, msg elif isinstance(instance, BlockClass):
block_infos = self.GetBlockType(instance.gettypeName(), "undefined")
if block_infos is not None:
@@ -948,7 +958,7 @@
block_infos = self.GetBlockType(block_type)
- raise PLCGenException, _("Undefined block type \"%s\" in \"%s\" POU")%(block_type, self.Name)
+ raise PLCGenException, _("Undefined block type \"{a1}\" in \"{a2}\" POU").format(a1 = block_type, a2 = self.Name) self.GenerateBlock(instance, block_infos, body, None)
@@ -1088,7 +1098,8 @@
self.Program += JoinList([(", ", ())], vars)
self.Program += [(");\n", ())]
- self.Warnings.append(_("\"%s\" function cancelled in \"%s\" POU: No input connected")%(type, self.TagName.split("::")[-1]))
+ msg = _("\"{a1}\" function cancelled in \"{a2}\" POU: No input connected").format(a1 = type, a2 = self.TagName.split("::")[-1]) + self.Warnings.append(msg) elif block_infos["type"] == "functionBlock":
if not self.ComputedBlocks.get(block, False) and not order:
self.ComputedBlocks[block] = True
@@ -1177,11 +1188,12 @@
if output_parameter is None:
- blockname = "%s(%s)" % (name, type)
+ blockname = "{a1}({a2})".format(a1 = name, a2 = type) - raise ValueError, _("No output %s variable found in block %s in POU %s. Connection must be broken") % \
- (output_parameter, blockname, self.Name)
+ msg = _("No output {a1} variable found in block {a2} in POU {a3}. Connection must be broken").\ + format(a1 = output_parameter, a2 = blockname, a3 = self.Name) def GeneratePaths(self, connections, body, order = False, to_inout = False):
@@ -1199,7 +1211,8 @@
block_infos = self.GetBlockType(block_type)
- raise PLCGenException, _("Undefined block type \"%s\" in \"%s\" POU")%(block_type, self.Name)
+ msg = _("Undefined block type \"{a1}\" in \"{a2}\" POU").format(a1 = block_type, a2 = self.Name) + raise PLCGenException, msg paths.append(str(self.GenerateBlock(next, block_infos, body, connection, order, to_inout)))
@@ -1214,7 +1227,8 @@
for instance in body.getcontentInstances():
if isinstance(instance, ConnectorClass) and instance.getname() == name:
if connector is not None:
- raise PLCGenException, _("More than one connector found corresponding to \"%s\" continuation in \"%s\" POU")%(name, self.Name)
+ msg = _("More than one connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU").format(a1 = name, a2 = self.Name) + raise PLCGenException, msg if connector is not None:
connections = connector.connectionPointIn.getconnections()
@@ -1224,7 +1238,8 @@
self.ComputedConnectors[name] = expression
paths.append(str(expression))
- raise PLCGenException, _("No connector found corresponding to \"%s\" continuation in \"%s\" POU")%(name, self.Name)
+ msg = _("No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU").format(a1 = name, a2 = self.Name) + raise PLCGenException, msg elif isinstance(next, ContactClass):
contact_info = (self.TagName, "contact", next.getlocalId())
variable = str(self.ExtractModifier(next, [(next.getvariable(), contact_info + ("reference",))], contact_info))
@@ -1372,6 +1387,10 @@
def GenerateSFCJump(self, jump, pou):
jump_target = jump.gettargetName()
+ if not pou.hasstep(jump_target): + msg = _("SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"").format( a1 = pname, a2 = jump_target) + raise PLCGenException, msg if jump.connectionPointIn is not None:
connections = jump.connectionPointIn.getconnections()
@@ -1576,7 +1595,9 @@
elif len(transition_infos["from"]) == 1:
self.Program += transition_infos["from"][0]
- raise PLCGenException, _("Transition with content \"%s\" not connected to a previous step in \"%s\" POU")%(transition_infos["content"], self.Name)
+ msg = _("Transition with content \"{a1}\" not connected to a previous step in \"{a2}\" POU").\ + format(a1 = transition_infos["content"], a2 = self.Name) + raise PLCGenException, msg self.Program += [(" TO ", ())]
if len(transition_infos["to"]) > 1:
self.Program += [("(", ())]
@@ -1585,7 +1606,9 @@
elif len(transition_infos["to"]) == 1:
self.Program += transition_infos["to"][0]
- raise PLCGenException, _("Transition with content \"%s\" not connected to a next step in \"%s\" POU")%(transition_infos["content"], self.Name)
+ msg = _("Transition with content \"{a1}\" not connected to a next step in \"{a2}\" POU").\ + format(a1 = transition_infos["content"], a2 = self.Name) + raise PLCGenException, msg self.Program += transition_infos["content"]
self.Program += [("%sEND_TRANSITION\n\n"%self.CurrentIndent, ())]
for [(step_name, step_infos)] in transition_infos["to"]:
--- a/PLCOpenEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/PLCOpenEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,29 +1,30 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import os, sys, platform, time, traceback, getopt
beremiz_dir = os.path.dirname(os.path.realpath(__file__))
@@ -60,7 +61,11 @@
# Create wxApp (Need to create App before internationalization because of
+ if wx.VERSION >= (3, 0, 0): from util.misc import InstallLocalRessources
InstallLocalRessources(beremiz_dir)
@@ -72,6 +77,7 @@
from editors.Viewer import Viewer
from PLCControler import PLCControler
from dialogs import ProjectDialog
+from dialogs.AboutDialog import ShowAboutDialog #-------------------------------------------------------------------------------
# PLCOpenEditor Main Class
@@ -160,6 +166,7 @@
# @param fileOpen The filepath to open if no controler defined (default: None).
# @param debug The filepath to open if no controler defined (default: False).
def __init__(self, parent, fileOpen = None):
+ self.icon = wx.Icon(os.path.join(beremiz_dir, "images", "poe.ico"), wx.BITMAP_TYPE_ICO) IDEFrame.__init__(self, parent)
@@ -178,15 +185,15 @@
self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
# Define PLCOpenEditor icon
- self.SetIcon(wx.Icon(os.path.join(beremiz_dir, "images", "poe.ico"),wx.BITMAP_TYPE_ICO))
+ self.SetIcon(self.icon) self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
- _("PLC syntax error at line %d:\n%s") % result)
+ self.ShowErrorMessage(_("PLC syntax error at line {a1}:\n{a2}").format(a1 = num, a2 = line)) def OnCloseFrame(self, event):
if self.Controler is None or self.CheckSaveBeforeClosing(_("Close Application")):
@@ -298,8 +305,8 @@
- _("PLC syntax error at line %d:\n%s") % result)
+ self.ShowErrorMessage(_("PLC syntax error at line {a1}:\n{a2}").format(a1 = num, a2 = line)) def OnCloseProjectMenu(self, event):
if not self.CheckSaveBeforeClosing():
@@ -343,7 +350,12 @@
open_pdf(os.path.join(beremiz_dir, "plcopen", "TC6_XML_V101.pdf"))
def OnAboutMenu(self, event):
- OpenHtmlFrame(self,_("About PLCOpenEditor"), os.path.join(beremiz_dir, "doc", "plcopen_about.html"), wx.Size(350, 350))
+ info = version.GetAboutDialogInfo() + info.Name = "PLCOpenEditor" + info.Description = _("PLCOpenEditor is part of Beremiz project.\n\n" + "Beremiz is an ") + info.Description + info.Icon = wx.Icon(os.path.join(beremiz_dir, "images", "aboutlogo.png"), wx.BITMAP_TYPE_PNG) + ShowAboutDialog(self, info) result = self.Controler.SaveXMLFile()
@@ -394,16 +406,17 @@
dlg = wx.SingleChoiceDialog(None,
-Click OK to save an error report.
+An unhandled exception (bug) occured. Bug report saved at : Please be kind enough to send this file to:
-edouard.tisserant@gmail.com
+beremiz-devel@lists.sourceforge.net +You should now restart program.
- str(e_type) + _(" : ") + str(e_value),
+""") % bug_report_path + + repr(e_type) + " : " + repr(e_value), @@ -472,10 +485,11 @@
sys.excepthook = handle_exception
if __name__ == '__main__':
- wx.InitAllImageHandlers()
+ if wx.VERSION < (3, 0, 0): + wx.InitAllImageHandlers() # Install a exception handle for bug reports
- AddExceptHook(os.getcwd(),__version__)
+ AddExceptHook(os.getcwd(), version.app_version) frame = PLCOpenEditor(None, fileOpen=fileOpen)
--- a/POULibrary.py Sun Mar 05 00:38:25 2017 +0000
+++ b/POULibrary.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/ProjectController.py Sun Mar 05 00:38:25 2017 +0000
+++ b/ProjectController.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Beremiz Project Controller
@@ -60,6 +84,60 @@
return ExtractMenuItemsFromCatalog(features.catalog)
+ self.iec2c = os.path.join(base_folder, "matiec", "iec2c"+(".exe" if wx.Platform == '__WXMSW__' else "")) + self.iec2c_buildopts = None + self.ieclib_path = os.path.join(base_folder, "matiec", "lib") + self.ieclib_c_path = None + def findLibCPath(self): + os.path.join(base_folder, "matiec", "lib", "C"), + os.path.join(base_folder, "matiec", "lib") ] + filename=os.path.join(p, "iec_types.h") + if (os.path.isfile(filename)): + def findSupportedOptions(self): + buildcmd = "\"%s\" -h"%(self.iec2c) + options =["-f", "-l", "-p"] + # Invoke compiler. Output files are listed to stdout, errors to stderr + status, result, err_result = ProcessLogger(self.logger, buildcmd, + no_stdout=True, no_stderr=True).spin() + buildopt = buildopt + " " + opt + if self.iec2c_buildopts is None: + self.iec2c_buildopts = self.findSupportedOptions() + return self.iec2c_buildopts + return self.ieclib_path + if self.ieclib_c_path is None: + self.ieclib_c_path = self.findLibCPath() + return self.ieclib_c_path +iec2c_cfg = Iec2CSettings() class ProjectController(ConfigTreeNode, PLCControler):
This class define Root object of the confnode tree.
@@ -115,10 +193,6 @@
self.SetAppFrame(frame, logger)
- self.iec2c_path = os.path.join(base_folder, "matiec", "iec2c"+(".exe" if wx.Platform == '__WXMSW__' else ""))
- self.ieclib_path = os.path.join(base_folder, "matiec", "lib")
- self.ieclib_c_path = os.path.join(base_folder, "matiec", "lib", "C")
# Setup debug information
self.IECdebug_lock = Lock()
@@ -204,10 +278,10 @@
- return self.ieclib_c_path
+ return iec2c_cfg.getLibCPath()
+ return iec2c_cfg.getCmd() def GetCurrentLocation(self):
@@ -331,15 +405,15 @@
# Verify that project contains a PLCOpen program
plc_file = os.path.join(ProjectPath, "plc.xml")
if not os.path.isfile(plc_file):
- return _("Chosen folder doesn't contain a program. It's not a valid project!")
+ return _("Chosen folder doesn't contain a program. It's not a valid project!"), True error = self.OpenXMLFile(plc_file)
if self.Project is not None:
- self.logger.write_warning(
- XSDSchemaErrorMessage % (("PLC",) + error))
+ (fname_err, lnum, src) = (("PLC",) + error) + self.logger.write_warning(XSDSchemaErrorMessage.format(a1 = fname_err, a2 = lnum, a3 = src))
if len(self.GetProjectConfigNames()) == 0:
self.AddProjectDefaultConfiguration()
# Change XSD into class members
@@ -353,20 +427,12 @@
#Load the confnode.xml file into parameters members
result = self.LoadXMLParams()
#Load and init all the children
self.RefreshConfNodesBlockLists()
- if os.path.exists(self._getBuildPath()):
- self.EnableMethod("_Clean", True)
- if os.path.isfile(self._getIECcodepath()):
- self.ShowMethod("_showIECcode", True)
- self.UpdateMethodsFromPLCStatus()
def RecursiveConfNodeInfos(self, confnode):
@@ -399,6 +465,21 @@
+ def CheckNewProjectPath(self, old_project_path, new_project_path): + if old_project_path == new_project_path: + message = (_("Save path is the same as path of a project! \n")) + dialog = wx.MessageDialog(self.AppFrame, message, _("Error"), wx.OK | wx.ICON_ERROR) + plc_file = os.path.join(new_project_path, "plc.xml") + if os.path.isfile(plc_file): + message = (_("Selected directory already contains another project. Overwrite? \n")) + dialog = wx.MessageDialog(self.AppFrame, message, _("Error"), wx.YES_NO | wx.ICON_ERROR) + answer = dialog.ShowModal() + return answer == wx.ID_YES def SaveProject(self, from_project_path=None):
if self.CheckProjectPathPerm(False):
if from_project_path is not None:
@@ -423,9 +504,10 @@
newprojectpath = dirdialog.GetPath()
if os.path.isdir(newprojectpath):
- self.ProjectPath, old_project_path = newprojectpath, self.ProjectPath
- self.SaveProject(old_project_path)
- self._setBuildPath(self.BuildPath)
+ if self.CheckNewProjectPath(self.ProjectPath, newprojectpath): + self.ProjectPath, old_project_path = newprojectpath, self.ProjectPath + self.SaveProject(old_project_path) + self._setBuildPath(self.BuildPath) @@ -605,12 +687,15 @@
def _Compile_ST_to_SoftPLC(self):
self.logger.write(_("Compiling IEC Program into C code...\n"))
buildpath = self._getBuildPath()
- buildcmd = "\"%s\" -f -l -p -I \"%s\" -T \"%s\" \"%s\""%(
+ buildcmd = "\"%s\" %s -I \"%s\" -T \"%s\" \"%s\""%( + iec2c_cfg.getOptions(), + iec2c_cfg.getLibPath(), @@ -679,7 +764,7 @@
# Keep track of generated C files for later use by self.CTNGenerate_C
self.PLCGeneratedCFiles = C_files
- self.plcCFLAGS = '"-I%s" -Wno-unused-function'%self.ieclib_c_path
+ self.plcCFLAGS = '"-I%s" -Wno-unused-function'%iec2c_cfg.getLibCPath() @@ -797,7 +882,7 @@
attrs["C_path"] = '__'.join(parts)
if attrs["vartype"] == "FB":
config_FBs[tuple(parts)] = attrs["C_path"]
- if attrs["vartype"] != "FB":
+ if attrs["vartype"] != "FB" and attrs["type"] in DebugTypesSize: # Push this dictionnary into result.
self._DbgVariablesList.append(attrs)
# Fill in IEC<->C translation dicts
@@ -915,15 +1000,13 @@
# Eventually create build dir
if not os.path.exists(buildpath):
- # There is something to clean
- self.EnableMethod("_Clean", True)
self.logger.write(_("Start build in %s\n") % buildpath)
# Generate SoftPLC IEC code
IECGenRes = self._Generate_SoftPLC()
- self.ShowMethod("_showIECcode", True)
# If IEC code gen fail, bail out.
@@ -1034,8 +1117,14 @@
def ShowError(self, logger, from_location, to_location):
chunk_infos = self.GetChunkInfos(from_location, to_location)
for infos, (start_row, start_col) in chunk_infos:
- start = (from_location[0] - start_row, from_location[1] - start_col)
- end = (to_location[0] - start_row, to_location[1] - start_col)
+ row = 1 if from_location[0] < start_row else (from_location[0] - start_row) + col = 1 if (start_row != from_location[0]) else (from_location[1] - start_col) + row = 1 if to_location[0] < start_row else (to_location[0] - start_row) + col = 1 if (start_row != to_location[0]) else (to_location[1] - start_col) if self.AppFrame is not None:
self.AppFrame.ShowError(infos, start, end)
@@ -1068,6 +1157,7 @@
text = '(* No IEC code have been generated at that time ! *)'
self._IECCodeView.SetText(text = text)
+ self._IECCodeView.Editor.SetReadOnly(True) self._IECCodeView.SetIcon(GetBitmap("ST"))
setattr(self._IECCodeView, "_OnClose", self.OnCloseEditor)
@@ -1164,18 +1254,28 @@
shutil.rmtree(os.path.join(self._getBuildPath()))
self.logger.write_error(_("Build directory already clean\n"))
- self.ShowMethod("_showIECcode", False)
- self.EnableMethod("_Clean", False)
self.CompareLocalAndRemotePLC()
+ def _UpdateButtons(self): + self.EnableMethod("_Clean", os.path.exists(self._getBuildPath())) + self.ShowMethod("_showIECcode", os.path.isfile(self._getIECcodepath())) + if self.AppFrame is not None and not self.UpdateMethodsFromPLCStatus(): + self.AppFrame.RefreshStatusToolBar() + def UpdateButtons(self): + wx.CallAfter(self._UpdateButtons) def UpdatePLCLog(self, log_count):
if self.AppFrame is not None:
self.AppFrame.LogViewer.SetLogCounters(log_count)
def UpdateMethodsFromPLCStatus(self):
if self._connector is not None:
PLCstatus = self._connector.GetPLCstatus()
@@ -1203,15 +1303,39 @@
self.previous_plcstate = status
if self.AppFrame is not None:
self.AppFrame.RefreshStatusToolBar()
if status == "Disconnected":
- self.AppFrame.ConnectionStatusBar.SetStatusText(_(status), 1)
+ self.AppFrame.ConnectionStatusBar.SetStatusText(self.GetTextStatus(status), 1) self.AppFrame.ConnectionStatusBar.SetStatusText('', 2)
self.AppFrame.ConnectionStatusBar.SetStatusText(
_("Connected to URI: %s") % self.BeremizRoot.getURI_location().strip(), 1)
- self.AppFrame.ConnectionStatusBar.SetStatusText(_(status), 2)
+ self.AppFrame.ConnectionStatusBar.SetStatusText(self.GetTextStatus(status), 2) + def GetTextStatus(self, status): + "Started": _("Started"), + "Stopped": _("Stopped"), + "Disconnected": _("Disconnected") + return msgs.get(status, status) + def ShowPLCProgress(self, status = "", progress = 0): + self.AppFrame.ProgressStatusBar.Show() + self.AppFrame.ConnectionStatusBar.SetStatusText(self.GetTextStatus(status), 1) + self.AppFrame.ProgressStatusBar.SetValue(progress) + def HidePLCProgress(self): + # clear previous_plcstate to restore status + # in UpdateMethodsFromPLCStatus() + self.previous_plcstate = "" + self.AppFrame.ProgressStatusBar.Hide() + self.UpdateMethodsFromPLCStatus() def PullPLCStatusProc(self, event):
self.UpdateMethodsFromPLCStatus()
@@ -1505,6 +1629,7 @@
if connector is not None:
if self.StatusTimer is not None:
self.StatusTimer.Start(milliseconds=500, oneShot=False)
if self.StatusTimer is not None:
@@ -1654,6 +1779,7 @@
self.logger.write(_("Transfer completed successfully.\n"))
self.logger.write_error(_("Transfer failed\n"))
self.logger.write_error(_("No PLC to transfer (did build succeed ?)\n"))
--- a/c_ext/CFileEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/c_ext/CFileEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/c_ext/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/c_ext/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,1 +1,25 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/c_ext/c_ext.py Sun Mar 05 00:38:25 2017 +0000
+++ b/c_ext/c_ext.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -99,7 +122,7 @@
- matiec_flags = '"-l -p -I%s"'%os.path.abspath(self.GetCTRoot().GetIECLibPath())
+ matiec_CFLAGS = '"-I%s"'%os.path.abspath(self.GetCTRoot().GetIECLibPath()) - return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_flags))],str(self.CExtension.getLDFLAGS()),True
+ return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_CFLAGS))],str(self.CExtension.getLDFLAGS()),True --- a/canfestival/NetworkEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/canfestival/NetworkEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/canfestival/SlaveEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/canfestival/SlaveEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/canfestival/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/canfestival/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,1 +1,25 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from canfestival import *
--- a/canfestival/canfestival.py Sun Mar 05 00:38:25 2017 +0000
+++ b/canfestival/canfestival.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. base_folder = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
--- a/canfestival/config_utils.py Sun Mar 05 00:38:25 2017 +0000
+++ b/canfestival/config_utils.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -352,14 +352,16 @@
# Check Id is in slave node list
if nodeid not in self.NodeList.SlaveNodes.keys():
- raise PDOmappingException, _("Non existing node ID : %d (variable %s)") % (nodeid,name)
+ raise PDOmappingException, _("Non existing node ID : {a1} (variable {a2})").format(a1 = nodeid, a2 = name) # Get the model for this node (made from EDS)
node = self.NodeList.SlaveNodes[nodeid]["Node"]
# Extract and check index and subindex
if not node.IsEntry(index, subindex):
- raise PDOmappingException, _("No such index/subindex (%x,%x) in ID : %d (variable %s)") % (index,subindex,nodeid,name)
+ msg = _("No such index/subindex ({a1},{a2}) in ID : {a3} (variable {a4})").\ + format(a1 = "%x" % index, a2 ="%x" % subindex, a3 = nodeid, a4 = name) + raise PDOmappingException, msg subentry_infos = node.GetSubentryInfos(index, subindex)
@@ -369,19 +371,23 @@
if sizelocation == "X" and len(loc) > 3:
elif sizelocation != "X" and len(loc) > 3:
- raise PDOmappingException, _("Cannot set bit offset for non bool '%s' variable (ID:%d,Idx:%x,sIdx:%x))") % (name,nodeid,index,subindex)
+ msg = _("Cannot set bit offset for non bool '{a1}' variable (ID:{a2},Idx:{a3},sIdx:{a4}))").\ + format(a1 = name, a2 = nodeid, a3 = "%x" % index, a4 = "%x" % subindex) + raise PDOmappingException, msg if location["IEC_TYPE"] != "BOOL" and subentry_infos["type"] != COlocationtype:
- raise PDOmappingException, _("Invalid type \"%s\"-> %d != %d for location\"%s\"") % (location["IEC_TYPE"], COlocationtype, subentry_infos["type"] , name)
+ raise PDOmappingException, _("Invalid type \"{a1}\"-> {a2} != {a3} for location\"{a4}\"").\ + format(a1 = location["IEC_TYPE"], a2 = COlocationtype, a3 = subentry_infos["type"] , a4 = name) typeinfos = node.GetEntryInfos(COlocationtype)
self.IECLocations[name] = {"type":COlocationtype, "pdotype":SlavePDOType[direction],
"nodeid": nodeid, "index": index,"subindex": subindex,
"bit": numbit, "size": typeinfos["size"], "sizelocation": sizelocation}
- raise PDOmappingException, _("Not PDO mappable variable : '%s' (ID:%d,Idx:%x,sIdx:%x))") % (name,nodeid,index,subindex)
+ raise PDOmappingException, _("Not PDO mappable variable : '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))").\ + format(a1 = name, a2 = nodeid, a3 = "%x" % index, a4 = "%x" % subindex) #-------------------------------------------------------------------------------
# Search for locations already mapped
@@ -630,12 +636,14 @@
# Extract and check index and subindex
if not slave.IsEntry(index, subindex):
- raise PDOmappingException, _("No such index/subindex (%x,%x) (variable %s)") % (index, subindex, name)
+ raise PDOmappingException, _("No such index/subindex ({a1},{a2}) (variable {a3})").\ + format(a1 = "%x" % index, a2 = "%x" % subindex, a3 = name) subentry_infos = slave.GetSubentryInfos(index, subindex)
if subentry_infos["type"] != COlocationtype:
- raise PDOmappingException, _("Invalid type \"%s\"-> %d != %d for location\"%s\"") % (location["IEC_TYPE"], COlocationtype, subentry_infos["type"] , name)
+ raise PDOmappingException, _("Invalid type \"{a1}\"-> {a2} != {a3} for location \"{a4}\"").\ + format( a1 = location["IEC_TYPE"], a2 = COlocationtype, a3 = subentry_infos["type"] , a4 = name) IECLocations[name] = COlocationtype
pointers[(index, subindex)] = name
--- a/connectors/PYRO/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/connectors/PYRO/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,23 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
# See COPYING file for copyrights details.
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -# This library is distributed in the hope that it will be useful,
+# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -# You should have received a copy of the GNU General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -83,7 +87,7 @@
ip = str(socket.inet_ntoa(i.getAddress()))
newlocation = ip + ':' + port
- confnodesroot.logger.write(_("'%s' is located at %s\n") % (location, newlocation))
+ confnodesroot.logger.write(_("'{a1}' is located at {a2}\n").format(a1 = location, a2 = newlocation)) @@ -108,10 +112,10 @@
return func(*args, **kwargs)
except Pyro.errors.ConnectionClosedError, e:
- confnodesroot.logger.write_error("Connection lost!\n")
+ confnodesroot.logger.write_error(_("Connection lost!\n")) confnodesroot._SetConnector(None)
except Pyro.errors.ProtocolError, e:
- confnodesroot.logger.write_error("Pyro exception: " + str(e) + "\n")
+ confnodesroot.logger.write_error(_("Pyro exception: %s\n") % e) # confnodesroot.logger.write_error(traceback.format_exc())
errmess = ''.join(Pyro.util.getPyroTraceback(e))
--- a/connectors/WAMP/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/connectors/WAMP/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,23 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2015: Edouard TISSERANT
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import sys, traceback, atexit
#from twisted.python import log
@@ -105,7 +108,7 @@
reactor, _WampSession.call, wampfuncname,
- confnodesroot.logger.write_error("Connection lost!\n")
+ confnodesroot.logger.write_error(_("Connection lost!\n")) confnodesroot._SetConnector(None)
errmess = traceback.format_exc()
--- a/connectors/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/connectors/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,23 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
# See COPYING file for copyrights details.
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -# This library is distributed in the hope that it will be useful,
+# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -# You should have received a copy of the GNU General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/CustomEditableListBox.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomEditableListBox.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/CustomGrid.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomGrid.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -37,8 +37,8 @@
- self.SetFont(wx.Font(12, 77, wx.NORMAL, wx.NORMAL, False, 'Sans'))
- self.SetLabelFont(wx.Font(10, 77, wx.NORMAL, wx.NORMAL, False, 'Sans'))
+ self.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans')) + self.SetLabelFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans')) self.SetSelectionBackground(wx.WHITE)
self.SetSelectionForeground(wx.BLACK)
self.DisableDragRowSize()
--- a/controls/CustomStyledTextCtrl.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomStyledTextCtrl.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,6 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/CustomTable.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomTable.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,19 +1,26 @@
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/CustomToolTip.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomToolTip.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/CustomTree.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/CustomTree.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,19 +1,26 @@
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import wx.lib.agw.customtreectrl as CT
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
from time import time as gettime
@@ -41,6 +41,12 @@
from DebugVariableViewer import *
from GraphButton import GraphButton
+from distutils.version import LooseVersion +if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"): + from cycler import cycler # Graph variable display type
GRAPH_PARALLEL, GRAPH_ORTHOGONAL = range(2)
@@ -975,7 +981,13 @@
kwargs["transform"] = self.Axes.transAxes
return text_func(*args, **kwargs)
+ def SetAxesColor(self, color): + if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"): + self.Axes.set_prop_cycle(cycler('color',color)) + self.Axes.set_color_cycle(color) Reset figure and graphical elements displayed in it
@@ -987,7 +999,7 @@
# Add 3D projection if graph is in 3D
self.Axes = self.Figure.gca(projection='3d')
- self.Axes.set_color_cycle(['b'])
+ self.SetAxesColor(['b']) # Override function to prevent too much refresh when graph is
@@ -1002,7 +1014,7 @@
self.Axes = self.Figure.gca()
- self.Axes.set_color_cycle(COLOR_CYCLE)
+ self.SetAxesColor(COLOR_CYCLE) # Set size of X and Y axis labels
self.Axes.tick_params(axis='x', labelsize='small')
@@ -1363,7 +1375,8 @@
# Get bitmap of figure rendered
self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
+ if wx.VERSION < (3, 0, 0): # Create DC for rendering graphics in bitmap
--- a/controls/DebugVariablePanel/DebugVariableItem.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/DebugVariableItem.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/DebugVariablePanel/DebugVariablePanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
@@ -50,10 +50,10 @@
# List of values possible for graph range
# Format is [(time_in_plain_text, value_in_nanosecond),...]
- [("%dms" % i, i * MILLISECOND) for i in (10, 20, 50, 100, 200, 500)] + \
- [("%ds" % i, i * SECOND) for i in (1, 2, 5, 10, 20, 30)] + \
- [("%dm" % i, i * MINUTE) for i in (1, 2, 5, 10, 20, 30)] + \
- [("%dh" % i, i * HOUR) for i in (1, 2, 3, 6, 12, 24)]
+ [(_("%dms") % i, i * MILLISECOND) for i in (10, 20, 50, 100, 200, 500)] + \ + [(_("%ds") % i, i * SECOND) for i in (1, 2, 5, 10, 20, 30)] + \ + [(_("%dm") % i, i * MINUTE) for i in (1, 2, 5, 10, 20, 30)] + \ + [(_("%dh") % i, i * HOUR) for i in (1, 2, 3, 6, 12, 24)] # Scrollbar increment in pixel
@@ -291,6 +291,7 @@
DebugViewer.__init__(self, producer, True)
self.SetSizer(main_sizer)
def SetTickTime(self, ticktime=0):
@@ -561,20 +562,20 @@
- self.TickLabel.SetLabel("Tick: %d" % tick)
+ self.TickLabel.SetLabel(label=_("Tick: %d") % tick) tick_duration = int(tick * self.Ticktime)
- for value, format in [(tick_duration / DAY, "%dd"),
- ((tick_duration % DAY) / HOUR, "%dh"),
- ((tick_duration % HOUR) / MINUTE, "%dm"),
- ((tick_duration % MINUTE) / SECOND, "%ds")]:
+ for value, format in [(tick_duration / DAY, _("%dd")), + ((tick_duration % DAY) / HOUR, _("%dh")), + ((tick_duration % HOUR) / MINUTE, _("%dm")), + ((tick_duration % MINUTE) / SECOND, _("%ds"))]: if value > 0 or not_null:
duration += format % value
- duration += "%gms" % (float(tick_duration % SECOND) / MILLISECOND)
+ duration += _("%03gms") % (float(tick_duration % SECOND) / MILLISECOND) self.TickTimeLabel.SetLabel("t: %s" % duration)
self.TickLabel.SetLabel("")
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
--- a/controls/DebugVariablePanel/DebugVariableViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/DebugVariableViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from collections import OrderedDict
--- a/controls/DebugVariablePanel/GraphButton.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/GraphButton.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/DebugVariablePanel/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DebugVariablePanel/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,1 +1,26 @@
-from DebugVariablePanel import DebugVariablePanel
\ No newline at end of file
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +from DebugVariablePanel import DebugVariablePanel --- a/controls/DurationCellEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/DurationCellEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -118,15 +118,22 @@
self.CellControl.SetValue(self.Table.GetValueByName(row, self.Colname))
self.CellControl.SetFocus()
- def EndEdit(self, row, col, grid):
+ def EndEditInternal(self, row, col, grid, old_duration): duration = self.CellControl.GetValue()
- old_duration = self.Table.GetValueByName(row, self.Colname)
changed = duration != old_duration
self.Table.SetValueByName(row, self.Colname, duration)
self.CellControl.Disable()
+ if wx.VERSION >= (3, 0, 0): + def EndEdit(self, row, col, grid, oldval): + return self.EndEditInternal(row, col, grid, oldval) + def EndEdit(self, row, col, grid): + oldval = self.Table.GetValueByName(row, self.Colname) + return self.EndEditInternal(row, col, grid, oldval) self.CellControl.SetDimensions(rect.x + 1, rect.y,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/controls/EnhancedStatusBar.py Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,248 @@
+# --------------------------------------------------------------------------- # +# ENHANCEDSTATUSBAR wxPython IMPLEMENTATION +# Andrea Gavana, @ 31 May 2005 +# Nitro, @ 21 September 2005 +# Latest Revision: 21 September 2005, 19.57.20 GMT+2 +# Latest Revision before Latest Revision: 21 September 2005, 18.29.35 GMT+2 +# Latest Revision before Latest Revision before Latest Revision: 31 May 2005, 23.17 CET +# 1. Some Requests/Features To Add? +# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please +# Or, Obviously, To The wxPython Mailing List!!! +# licensed under wxWidgets License (GPL compatible) +# --------------------------------------------------------------------------- # +EnhancedStatusBar Is A Slight Modification (Actually A Subclassing) Of wx.StatusBar. +It Allows You To Add Almost Any Widget You Like To The wx.StatusBar Of Your Main +Frame Application And Also To Layout Them Properly. +1) Almost All The Functionalities Of wx.StatusBar Are Still Present; +2) You Can Add Different Kind Of Widgets Into Every Field Of The EnhancedStatusBar; +3) The AddWidget() Methods Accepts 2 Layout Inputs: + - horizontalalignment: This Specify The Horizontal Alignment For Your Widget, + And Can Be ESB_EXACT_FIT, ESB_ALIGN_CENTER_HORIZONTAL, ESB_ALIGN_LEFT And + - varticalalignment: This Specify The Vertical Alignment For Your Widget, + And Can Be ESB_EXACT_FIT, ESB_ALIGN_CENTER_VERTICAL, ESB_ALIGN_BOTTOM And +EnhancedStatusBar Is Freeware And Distributed Under The wxPython License. +Latest Revision: 21 September 2005, 19.57.20 GMT+2 +Latest Revision before Latest Revision: 21 September 2005, 18.29.35 GMT+2 +Latest Revision before Latest Revision before Latest Revision: 31 May 2005, 23.17 CET +# Horizontal Alignment Constants +ESB_ALIGN_CENTER_VERTICAL = 1 +# Vertical Alignment Constants +ESB_ALIGN_CENTER_HORIZONTAL = 11 +# Exact Fit (Either Horizontal Or Vertical Or Both) Constant +# --------------------------------------------------------------- +# Class EnhancedStatusBar +# --------------------------------------------------------------- +# This Is The Main Class Implementation. See The Demo For Details +# --------------------------------------------------------------- +class EnhancedStatusBarItem(object): + def __init__(self, widget, pos, horizontalalignment=ESB_ALIGN_CENTER_HORIZONTAL, verticalalignment=ESB_ALIGN_CENTER_VERTICAL): + self.__dict__.update( locals() ) +class EnhancedStatusBar(wx.StatusBar): + def __init__(self, parent, id=wx.ID_ANY, style=wx.ST_SIZEGRIP, + name="EnhancedStatusBar"): + """Default Class Constructor. + EnhancedStatusBar.__init__(self, parent, id=wx.ID_ANY, + name="EnhancedStatusBar") + wx.StatusBar.__init__(self, parent, id, style, name) + wx.EVT_SIZE(self, self.OnSize) + wx.CallAfter(self.OnSize, None) + def OnSize(self, event): + """Handles The wx.EVT_SIZE Events For The StatusBar. + Actually, All The Calculations Linked To HorizontalAlignment And + VerticalAlignment Are Done In This Function.""" + for pos, item in self._items.items(): + widget, horizontalalignment, verticalalignment = item.widget, item.horizontalalignment, item.verticalalignment + rect = self.GetFieldRect(pos) + widgetpos = widget.GetPosition() + widgetsize = widget.GetSize() + rect = self.GetFieldRect(pos) + if horizontalalignment == ESB_EXACT_FIT: + if verticalalignment == ESB_EXACT_FIT: + """ 1 September 2015 Fix fit align """ + widget.SetSize((rect.width-4, rect.height-4)) + widget.SetPosition((rect.x+2, rect.y+2)) + elif verticalalignment == ESB_ALIGN_CENTER_VERTICAL: + if widgetsize[1] < rect.width - 1: + diffs = (rect.height - widgetsize[1])/2 + widget.SetSize((rect.width-2, widgetsize[1])) + widget.SetPosition((rect.x-1, rect.y+diffs)) + widget.SetSize((rect.width-2, widgetsize[1])) + widget.SetPosition((rect.x-1, rect.y-1)) + elif verticalalignment == ESB_ALIGN_TOP: + widget.SetSize((rect.width-2, widgetsize[1])) + widget.SetPosition((rect.x-1, rect.y)) + elif verticalalignment == ESB_ALIGN_BOTTOM: + widget.SetSize((rect.width-2, widgetsize[1])) + widget.SetPosition((rect.x-1, rect.height-widgetsize[1])) + elif horizontalalignment == ESB_ALIGN_LEFT: + if verticalalignment == ESB_EXACT_FIT: + widget.SetSize((widgetsize[0], rect.height-2)) + widget.SetPosition((xpos, rect.y-1)) + elif verticalalignment == ESB_ALIGN_CENTER_VERTICAL: + if widgetsize[1] < rect.height - 1: + diffs = (rect.height - widgetsize[1])/2 + widget.SetPosition((xpos, rect.y+diffs)) + widget.SetSize((widgetsize[0], rect.height-2)) + widget.SetPosition((xpos, rect.y-1)) + elif verticalalignment == ESB_ALIGN_TOP: + widget.SetPosition((xpos, rect.y)) + elif verticalalignment == ESB_ALIGN_BOTTOM: + widget.SetPosition((xpos, rect.height-widgetsize[1])) + elif horizontalalignment == ESB_ALIGN_RIGHT: + xpos = rect.x + rect.width - widgetsize[0] - 1 + if verticalalignment == ESB_EXACT_FIT: + widget.SetSize((widgetsize[0], rect.height-2)) + widget.SetPosition((xpos, rect.y-1)) + elif verticalalignment == ESB_ALIGN_CENTER_VERTICAL: + if widgetsize[1] < rect.height - 1: + diffs = (rect.height - widgetsize[1])/2 + widget.SetPosition((xpos, rect.y+diffs)) + widget.SetSize((widgetsize[0], rect.height-2)) + widget.SetPosition((xpos, rect.y-1)) + elif verticalalignment == ESB_ALIGN_TOP: + widget.SetPosition((xpos, rect.y)) + elif verticalalignment == ESB_ALIGN_BOTTOM: + widget.SetPosition((xpos, rect.height-widgetsize[1])) + elif horizontalalignment == ESB_ALIGN_CENTER_HORIZONTAL: + xpos = rect.x + (rect.width - widgetsize[0])/2 - 1 + if verticalalignment == ESB_EXACT_FIT: + widget.SetSize((widgetsize[0], rect.height)) + widget.SetPosition((xpos, rect.y)) + elif verticalalignment == ESB_ALIGN_CENTER_VERTICAL: + if widgetsize[1] < rect.height - 1: + diffs = (rect.height - widgetsize[1])/2 + widget.SetPosition((xpos, rect.y+diffs)) + widget.SetSize((widgetsize[0], rect.height-1)) + widget.SetPosition((xpos, rect.y+1)) + elif verticalalignment == ESB_ALIGN_TOP: + widget.SetPosition((xpos, rect.y)) + elif verticalalignment == ESB_ALIGN_BOTTOM: + widget.SetPosition((xpos, rect.height-widgetsize[1])) + def AddWidget(self, widget, horizontalalignment=ESB_ALIGN_CENTER_HORIZONTAL, + verticalalignment=ESB_ALIGN_CENTER_VERTICAL, pos = -1): + """Add A Widget To The EnhancedStatusBar. + - horizontalalignment: This Can Be One Of: + a) ESB_EXACT_FIT: The Widget Will Fit Horizontally The StatusBar Field Width; + b) ESB_ALIGN_CENTER_HORIZONTAL: The Widget Will Be Centered Horizontally In + c) ESB_ALIGN_LEFT: The Widget Will Be Left Aligned In The StatusBar Field; + d) ESB_ALIGN_RIGHT: The Widget Will Be Right Aligned In The StatusBar Field; + a) ESB_EXACT_FIT: The Widget Will Fit Vertically The StatusBar Field Height; + b) ESB_ALIGN_CENTER_VERTICAL: The Widget Will Be Centered Vertically In + c) ESB_ALIGN_BOTTOM: The Widget Will Be Bottom Aligned In The StatusBar Field; + d) ESB_ALIGN_TOP: The Widget Will Be TOP Aligned In The StatusBar Field; + if self.GetFieldsCount() <= pos: + raise "\nERROR: EnhancedStatusBar has a max of %d items, you tried to set item #%d" % (self.GetFieldsCount(), pos) + if horizontalalignment not in [ESB_ALIGN_CENTER_HORIZONTAL, ESB_EXACT_FIT, + ESB_ALIGN_LEFT, ESB_ALIGN_RIGHT]: + raise '\nERROR: Parameter "horizontalalignment" Should Be One Of '\ + '"ESB_ALIGN_CENTER_HORIZONTAL", "ESB_ALIGN_LEFT", "ESB_ALIGN_RIGHT"' \ + if verticalalignment not in [ESB_ALIGN_CENTER_VERTICAL, ESB_EXACT_FIT, + ESB_ALIGN_TOP, ESB_ALIGN_BOTTOM]: + raise '\nERROR: Parameter "verticalalignment" Should Be One Of '\ + '"ESB_ALIGN_CENTER_VERTICAL", "ESB_ALIGN_TOP", "ESB_ALIGN_BOTTOM"' \ + self.RemoveChild(self._items[pos].widget) + self._items[pos].widget.Destroy() + self._items[pos] = EnhancedStatusBarItem(widget, pos, horizontalalignment, verticalalignment) + wx.CallAfter(self.OnSize, None) --- a/controls/FolderTree.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/FolderTree.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/controls/LibraryPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/LibraryPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -67,8 +67,12 @@
self.OnSearchButtonClick, self.SearchCtrl)
# Bind keyboard event on SearchCtrl text control to catch UP and DOWN
# for search previous and next occurrence
- search_textctrl = self.SearchCtrl.GetChildren()[0]
- search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown)
+ # This protects from fail to start when no children[0] available (possible for wxPython 3.0) + if self.SearchCtrl.GetChildren(): + search_textctrl = self.SearchCtrl.GetChildren()[0] + search_textctrl.Bind(wx.EVT_CHAR, self.OnKeyDown) main_sizer.AddWindow(self.SearchCtrl, flag=wx.GROW)
# Add Splitter window for tree and block comment to main sizer
@@ -397,7 +401,7 @@
item_pydata = self.Tree.GetPyData(item)
# Item is a block category
- if item_pydata["type"] == CATEGORY:
+ if (item == root) or item_pydata["type"] == CATEGORY: # Get category first or last child according to search mode
--- a/controls/LocationCellEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/LocationCellEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -95,7 +95,7 @@
if not infos["location"].startswith("%"):
dialog = wx.SingleChoiceDialog(self,
_("Select a variable class:"), _("Variable class"),
- ["Input", "Output", "Memory"],
+ [_("Input"), _("Output"), _("Memory")], wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
@@ -161,15 +161,22 @@
self.CellControl.SetVarType(self.Table.GetValueByName(row, 'Type'))
self.CellControl.SetFocus()
- def EndEdit(self, row, col, grid):
+ def EndEditInternal(self, row, col, grid, old_loc): loc = self.CellControl.GetValue()
- old_loc = self.Table.GetValueByName(row, 'Location')
self.Table.SetValueByName(row, 'Location', loc)
self.Table.SetValueByName(row, 'Type', self.CellControl.GetVarType())
self.CellControl.Disable()
+ if wx.VERSION >= (3, 0, 0): + def EndEdit(self, row, col, grid, oldval): + return self.EndEditInternal(row, col, grid, oldval) + def EndEdit(self, row, col, grid): + old_loc = self.Table.GetValueByName(row, 'Location') + return self.EndEditInternal(row, col, grid, old_loc) self.CellControl.SetDimensions(rect.x + 1, rect.y,
--- a/controls/LogViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/LogViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,27 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from datetime import datetime
from time import time as gettime
@@ -176,7 +177,7 @@
--- a/controls/PouInstanceVariablesPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/PouInstanceVariablesPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from collections import namedtuple
@@ -93,7 +93,7 @@
images_bbx = self.GetItemRightImagesBBox(item)
r_image_w, r_image_h = self._imageListRight.GetSize(rightimages[0])
- dc.SetBrush(wx.WHITE_BRUSH)
+ dc.SetBrush(wx.TRANSPARENT_BRUSH) dc.SetPen(wx.TRANSPARENT_PEN)
bg_width = (r_image_w + 4) * len(rightimages) + 4
@@ -350,8 +350,8 @@
self.InstanceChoice.SetFocusFromKbd()
size = self.InstanceChoice.GetSize()
event = wx.MouseEvent(wx.EVT_LEFT_DOWN._getEvtType())
- event.m_x = size.width / 2
- event.m_y = size.height / 2
+ event.x = size.width / 2 + event.y = size.height / 2 event.SetEventObject(self.InstanceChoice)
#event = wx.KeyEvent(wx.EVT_KEY_DOWN._getEvtType())
#event.m_keyCode = wx.WXK_SPACE
--- a/controls/ProjectPropertiesPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/ProjectPropertiesPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -212,7 +212,7 @@
for param in REQUIRED_PARAMS:
getattr(self, param).Enable(enable_required)
- languages = ["", "en-US", "fr-FR", "zh-CN"]
+ languages = ["", "en-US", "fr-FR", "zh-CN", "ru-RU"] for language in languages:
self.Language.Append(language)
--- a/controls/SearchResultPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/SearchResultPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
@@ -232,28 +232,15 @@
if element_type == ITEM_RESOURCE:
search_results_tree_children.append(element_infos)
- _tagname = self.ParentWindow.Controler.ComputePouName(words[1])
- _element_type = self.ParentWindow.Controler.GetPouType(words[1])
- _element_infos = {"name": words[1],
- "children": [element_infos]}
- search_results_tree_children.append(_element_infos)
search_results_tree_children.append(element_infos)
- header_format = _("'%s' - %d match in project")
+ header_format = _("'{a1}' - {a2} match in project") - header_format = _("'%s' - %d matches in project")
+ header_format = _("'{a1}' - {a2} matches in project") - self.HeaderLabel.SetLabel(header_format % (self.Criteria["raw_pattern"], matches_number))
+ self.HeaderLabel.SetLabel(header_format.format(a1 = self.Criteria["find_pattern"], a2 = matches_number)) self.ResetButton.Enable(True)
@@ -337,6 +324,7 @@
search_results = self.SearchResults.get(data, [])
+ self.ParentWindow.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) for infos, start, end, text in search_results:
self.ParentWindow.ShowSearchResult(infos, start, end)
--- a/controls/TextCtrlAutoComplete.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/TextCtrlAutoComplete.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -87,13 +87,13 @@
return self.ListBox.GetStringSelection()
def OnLeftDown(self, event):
- selected = self.ListBox.HitTest(wx.Point(event.m_x, event.m_y))
+ selected = self.ListBox.HitTest(wx.Point(event.GetX(), event.GetY())) parent_size = self.Parent.GetSize()
parent_rect = wx.Rect(0, -parent_size[1], parent_size[0], parent_size[1])
if selected != wx.NOT_FOUND:
wx.CallAfter(self.Parent.SetValueFromSelected, self.ListBox.GetString(selected))
- elif parent_rect.InsideXY(event.m_x, event.m_y):
- result, x, y = self.Parent.HitTest(wx.Point(event.m_x, event.m_y + parent_size[1]))
+ elif parent_rect.InsideXY(event.GetX(), event.GetY()): + result, x, y = self.Parent.HitTest(wx.Point(event.GetX(), event.GetY() + parent_size[1])) if result != wx.TE_HT_UNKNOWN:
self.Parent.SetInsertionPoint(self.Parent.XYToPosition(x, y))
@@ -102,7 +102,7 @@
def OnMotion(self, event):
self.ListBox.SetSelection(
- self.ListBox.HitTest(wx.Point(event.m_x, event.m_y)))
+ self.ListBox.HitTest(wx.Point(event.GetX(), event.GetY()))) class TextCtrlAutoComplete(wx.TextCtrl):
--- a/controls/VariablePanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/VariablePanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -144,6 +144,14 @@
+ def _GetRowEdit(self, row): + row_edit = self.GetValueByName(row, "Edit") + var_type = self.Parent.GetTagName() + bodytype = self.Parent.Controler.GetEditedElementBodyType(var_type) + if bodytype in ["ST", "IL"]: def _updateColAttrs(self, grid):
wx.grid.Grid -> update the column attributes to add the
@@ -171,7 +179,7 @@
editor.SetParameters(",".join(map(_, options)))
grid.SetReadOnly(row, col, True)
- elif col != 0 and self.GetValueByName(row, "Edit"):
+ elif col != 0 and self._GetRowEdit(row): grid.SetReadOnly(row, col, False)
editor = wx.grid.GridCellTextEditor()
@@ -238,7 +246,7 @@
self.ParentWindow.ParentWindow.Select()
x, y = self.ParentWindow.VariablesGrid.CalcUnscrolledPosition(x, y)
col = self.ParentWindow.VariablesGrid.XToCol(x)
- row = self.ParentWindow.VariablesGrid.YToRow(y - self.ParentWindow.VariablesGrid.GetColLabelSize())
+ row = self.ParentWindow.VariablesGrid.YToRow(y) element_type = self.ParentWindow.ElementType
@@ -265,7 +273,8 @@
if values[2] is not None:
base_location_type = self.ParentWindow.Controler.GetBaseType(values[2])
if values[2] != variable_type and base_type != base_location_type:
- message = _("Incompatible data types between \"%s\" and \"%s\"")%(values[2], variable_type)
+ message = _("Incompatible data types between \"{a1}\" and \"{a2}\"").\ + format(a1 = values[2], a2 = variable_type) if not location.startswith("%"):
@@ -274,11 +283,12 @@
elif location[0] not in LOCATIONDATATYPES:
message = _("Unrecognized data size \"%s\"")%location[0]
elif base_type not in LOCATIONDATATYPES[location[0]]:
- message = _("Incompatible size of data between \"%s\" and \"%s\"")%(location, variable_type)
+ message = _("Incompatible size of data between \"{a1}\" and \"{a2}\"").\ + format(a1 = location, a2 = variable_type) dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
- ["Input", "Output", "Memory"],
+ [_("Input"), _("Output"), _("Memory")], wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
@@ -316,7 +326,7 @@
dlg = wx.TextEntryDialog(
self.ParentWindow.ParentWindow.ParentWindow,
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -338,7 +348,7 @@
if not location.startswith("%"):
dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
- ["Input", "Output", "Memory"],
+ [_("Input"), _("Output"), _("Memory")], wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
@@ -584,7 +594,7 @@
setattr(self.VariablesGrid, "_AddRow", _AddVariable)
def _DeleteVariable(row):
- if self.Table.GetValueByName(row, "Edit"):
self.Values.remove(self.Table.GetRow(row))
if self.ElementType == "resource":
@@ -603,6 +613,14 @@
setattr(self.VariablesGrid, "_MoveRow", _MoveVariable)
+ row_edit = self.Table.GetValueByName(row, "Edit") + bodytype = self.Controler.GetEditedElementBodyType(self.TagName) + row_edit = row_edit or (bodytype in ["ST", "IL"]) table_length = len(self.Table.data)
@@ -611,7 +629,7 @@
row = self.VariablesGrid.GetGridCursorRow()
- row_edit = self.Table.GetValueByName(row, "Edit")
+ row_edit = _GetRowEdit(row) self.AddButton.Enable(not self.Debug)
self.DeleteButton.Enable(not self.Debug and (table_length > 0 and row_edit))
self.UpButton.Enable(not self.Debug and (table_length > 0 and row > 0 and self.Filter == "All"))
--- a/controls/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/controls/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dialogs/AboutDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,182 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# This file is based on code written for Whyteboard project. +# Copyright (c) 2009, 2010 by Steven Sproat +# Copyright (c) 2016 by Andrey Skvortsov <andrej.skvortzov@gmail.com> +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +This module contains classes extended from wx.Dialog used by the GUI. +from wx.lib.agw.hyperlink import HyperLinkCtrl +#---------------------------------------------------------------------- +class AboutDialog(wx.Dialog): + A replacement About Dialog for Windows, as it uses a generic frame that + def __init__(self, parent, info): + title = _("About") + " " + info.Name + wx.Dialog.__init__(self, parent, title=title) + if parent and parent.GetIcon(): + self.SetIcon(parent.GetIcon()) + bitmap = wx.BitmapFromIcon(self.info.Icon) + image = wx.StaticBitmap(self, bitmap=bitmap) + name = wx.StaticText(self, label="%s %s" % (info.Name, info.Version)) + description = wx.StaticText(self, label=info.Description) + copyright = wx.StaticText(self, label=info.Copyright) + url = HyperLinkCtrl(self, label=info.WebSite[0], URL=info.WebSite[1]) + font = name.GetClassDefaultAttributes().font + font.SetWeight(wx.FONTWEIGHT_BOLD) + credits = wx.Button(self, id=wx.ID_ABOUT, label=_("C&redits")) + license = wx.Button(self, label=_("&License")) + close = wx.Button(self, id=wx.ID_CANCEL, label=_("&Close")) + btnSizer = wx.BoxSizer(wx.HORIZONTAL) + btnSizer.Add(credits, flag=wx.CENTER | wx.LEFT | wx.RIGHT, border=5) + btnSizer.Add(license, flag=wx.CENTER | wx.RIGHT, border=5) + btnSizer.Add(close, flag=wx.CENTER | wx.RIGHT, border=5) + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(image, flag=wx.CENTER | wx.TOP | wx.BOTTOM, border=5) + sizer.Add(name, flag=wx.CENTER | wx.BOTTOM, border=10) + sizer.Add(description, flag=wx.CENTER | wx.BOTTOM, border=10) + sizer.Add(copyright, flag=wx.CENTER | wx.BOTTOM, border=10) + sizer.Add(url, flag=wx.CENTER | wx.BOTTOM, border=15) + sizer.Add(btnSizer, flag=wx.CENTER | wx.BOTTOM, border=5) + container = wx.BoxSizer(wx.VERTICAL) + container.Add(sizer, flag=wx.ALL, border=10) + self.SetSizer(container) + self.SetEscapeId(close.GetId()) + credits.Bind(wx.EVT_BUTTON, self.on_credits) + license.Bind(wx.EVT_BUTTON, self.on_license) + close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) + def on_license(self, event): + LicenseDialog(self, self.info) + def on_credits(self, event): + CreditsDialog(self, self.info) +#---------------------------------------------------------------------- +class CreditsDialog(wx.Dialog): + def __init__(self, parent, info): + wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320), + style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) + if parent and parent.GetIcon(): + self.SetIcon(parent.GetIcon()) + self.SetMinSize((300, 200)) + notebook = wx.Notebook(self) + close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close")) + developer = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE) + translators = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE) + developer.SetValue(u'\n'.join(info.Developers)) + translators.SetValue(u'\n'.join(info.Translators)) + notebook.AddPage(developer, text=_("Written by")) + notebook.AddPage(translators, text=_("Translated by")) + btnSizer = wx.BoxSizer(wx.HORIZONTAL) + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(notebook, 1, wx.EXPAND | wx.ALL, 10) + sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10) + self.SetEscapeId(close.GetId()) + close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) +#---------------------------------------------------------------------- +class LicenseDialog(wx.Dialog): + def __init__(self, parent, info): + wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400), + style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) + if parent and parent.GetIcon(): + self.SetIcon(parent.GetIcon()) + self.SetMinSize((400, 300)) + close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close")) + ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE) + ctrl.SetValue(info.License) + btnSizer = wx.BoxSizer(wx.HORIZONTAL) + sizer = wx.BoxSizer(wx.VERTICAL) + sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10) + sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10) + self.SetEscapeId(close.GetId()) + close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) +#---------------------------------------------------------------------- +def ShowAboutDialog(parent, info): + AboutDialog(parent, info) --- a/dialogs/ActionBlockDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/ActionBlockDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,25 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/ArrayTypeDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/ArrayTypeDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,25 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
@@ -42,7 +42,7 @@
def __init__(self, parent, datatypes, infos):
wx.Dialog.__init__(self, parent,
- size=wx.Size(500, 300), title=_('Edit array type properties'))
+ size=wx.Size(500, 350), title=_('Edit array type properties')) main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)
main_sizer.AddGrowableCol(0)
--- a/dialogs/BlockPreviewDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/BlockPreviewDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2013: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -300,4 +300,4 @@
\ No newline at end of file
--- a/dialogs/BrowseLocationsDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/BrowseLocationsDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,21 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.# --- a/dialogs/BrowseValuesLibraryDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/BrowseValuesLibraryDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/ConnectionDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/ConnectionDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -49,7 +49,7 @@
to all connector having the same name in POU (default: False)
BlockPreviewDialog.__init__(self, parent, controller, tagname,
- size=wx.Size(350, 220), title=_('Connection Properties'))
+ size=wx.Size(350, 250), title=_('Connection Properties')) self._init_sizers(2, 0, 5, None, 2, 1)
@@ -216,4 +216,4 @@
# Call BlockPreviewDialog function
BlockPreviewDialog.RefreshPreview(self)
\ No newline at end of file
--- a/dialogs/DiscoveryDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/DiscoveryDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -61,7 +62,7 @@
def _init_coll_ButtonGridSizer_Growables(self, parent):
- parent.AddGrowableRow(1)
+ parent.AddGrowableRow(0) self.MainSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)
@@ -78,7 +79,7 @@
wx.Dialog.__init__(self, id=ID_DISCOVERYDIALOG,
name='DiscoveryDialog', parent=prnt,
size=wx.Size(600, 600), style=wx.DEFAULT_DIALOG_STYLE,
- title='Service Discovery')
+ title=_('Service Discovery')) self.staticText1 = wx.StaticText(id=ID_DISCOVERYDIALOGSTATICTEXT1,
label=_('Services available:'), name='staticText1', parent=self,
@@ -88,10 +89,10 @@
self.ServicesList = AutoWidthListCtrl(id=ID_DISCOVERYDIALOGSERVICESLIST,
name='ServicesList', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0),
style=wx.LC_REPORT|wx.LC_EDIT_LABELS|wx.LC_SORT_ASCENDING|wx.LC_SINGLE_SEL)
- self.ServicesList.InsertColumn(0, 'NAME')
- self.ServicesList.InsertColumn(1, 'TYPE')
- self.ServicesList.InsertColumn(2, 'IP')
- self.ServicesList.InsertColumn(3, 'PORT')
+ self.ServicesList.InsertColumn(0, _('NAME')) + self.ServicesList.InsertColumn(1, _('TYPE')) + self.ServicesList.InsertColumn(2, _('IP')) + self.ServicesList.InsertColumn(3, _('PORT')) self.ServicesList.SetColumnWidth(0, 150)
self.ServicesList.SetColumnWidth(1, 150)
self.ServicesList.SetColumnWidth(2, 150)
--- a/dialogs/DurationEditorDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/DurationEditorDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -148,9 +148,9 @@
- for control, name in [(self.Days, "days"), (self.Hours, "hours"),
- (self.Minutes, "minutes"), (self.Seconds, "seconds"),
- (self.Milliseconds, "milliseconds")]:
+ for control, name in [(self.Days, _("days")), (self.Hours, _("hours")), + (self.Minutes, _("minutes")), (self.Seconds, _("seconds")), + (self.Milliseconds, _("milliseconds"))]: value = float(control.GetValue())
--- a/dialogs/FBDBlockDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/FBDBlockDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/FBDVariableDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/FBDVariableDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -287,4 +287,4 @@
# Call BlockPreviewDialog function
BlockPreviewDialog.RefreshPreview(self)
\ No newline at end of file
--- a/dialogs/FindInPouDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/FindInPouDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,39 +1,45 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +from plcopen.plcopen import * -class FindInPouDialog(wx.Frame):
+class FindInPouDialog(wx.Dialog): + def _init_icon(self, parent): + if parent and parent.icon: + self.SetIcon(parent.icon) def __init__(self, parent):
- wx.Frame.__init__(self, parent, title=_("Find"),
- size=wx.Size(400, 250), style=wx.CAPTION|
+ wx.Dialog.__init__(self, parent, title=_("Find"), + size=wx.Size(500, 280), style=wx.CAPTION|
+ self._init_icon(parent) panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
main_sizer = wx.FlexGridSizer(cols=1, hgap=5, rows=2, vgap=5)
@@ -53,6 +59,7 @@
self.FindPattern = wx.TextCtrl(panel)
self.Bind(wx.EVT_TEXT, self.OnFindPatternChanged, self.FindPattern)
+ self.Bind(wx.EVT_CHAR_HOOK, self.OnEscapeKey) patterns_sizer.AddWindow(self.FindPattern, flag=wx.GROW)
params_sizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -101,16 +108,21 @@
self.Bind(wx.EVT_BUTTON, self.OnFindButton, self.FindButton)
buttons_sizer.AddWindow(self.FindButton, border=5, flag=wx.RIGHT)
- self.CloseButton = wx.Button(panel, label=("Close"))
+ self.CloseButton = wx.Button(panel, label=_("Close")) self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.CloseButton)
buttons_sizer.AddWindow(self.CloseButton)
+ self.StatusLabel = wx.StaticText(panel, label= "") + controls_sizer.AddWindow(self.StatusLabel, flag=wx.ALIGN_CENTER_VERTICAL) panel.SetSizer(main_sizer)
self.ParentWindow = parent
self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
self.FindPattern.SetFocus()
self.RefreshButtonsState()
@@ -126,17 +138,41 @@
+ def OnEscapeKey(self, event): + keycode = event.GetKeyCode() + if keycode == wx.WXK_ESCAPE: + self.OnCloseButton(event) def OnFindPatternChanged(self, event):
self.RefreshButtonsState()
+ def SetStatusText(self, msg): + self.StatusLabel.SetLabel(msg) def OnFindButton(self, event):
"find_pattern": self.FindPattern.GetValue(),
"wrap": self.WrapSearch.GetValue(),
"case_sensitive": self.CaseSensitive.GetValue(),
- "regular_expression": self.RegularExpressions.GetValue()}
- wx.CallAfter(self.ParentWindow.FindInPou,
- {True: 1, False:-1}[self.Forward.GetValue()],
+ "regular_expression": self.RegularExpressions.GetValue(), + if self.infosPrev != infos: + CompilePattern(self.criteria) + message = _("Syntax error in regular expression of pattern to search!") + self.SetStatusText(message) + if len(self.criteria) > 0: + wx.CallAfter(self.ParentWindow.FindInPou, + {True: 1, False:-1}[self.Forward.GetValue()], --- a/dialogs/ForceVariableDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/ForceVariableDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,25 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -174,7 +174,7 @@
message = _("You must type a value!")
elif GetTypeValue[self.IEC_Type](value) is None:
- message = _("Invalid value \"%s\" for \"%s\" variable!") % (value, self.IEC_Type)
+ message = _("Invalid value \"{a1}\" for \"{a2}\" variable!").format(a1 = value, a2 = self.IEC_Type) dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
--- a/dialogs/LDElementDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/LDElementDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -50,7 +50,7 @@
@param type: Type of LD element ('contact or 'coil')
BlockPreviewDialog.__init__(self, parent, controller, tagname,
- size=wx.Size(350, 280 if type == "contact" else 330),
+ size=wx.Size(350, 320 if type == "contact" else 380), title=(_("Edit Contact Values")
else _("Edit Coil Values")))
--- a/dialogs/LDPowerRailDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/LDPowerRailDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/PouActionDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/PouActionDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -34,7 +34,7 @@
class PouActionDialog(wx.Dialog):
def __init__(self, parent):
- wx.Dialog.__init__(self, parent, size=wx.Size(320, 160),
+ wx.Dialog.__init__(self, parent, size=wx.Size(320, 200), title=_('Create a new action'))
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
--- a/dialogs/PouDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/PouDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/PouNameDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/PouNameDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/PouTransitionDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/PouTransitionDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -32,13 +32,18 @@
def GetTransitionLanguages():
- return [_("IL"), _("ST"), _("LD"), _("FBD")]
+ # IL language is temporary disabled because + # matiec freezes if transition is written in IL + # return [_("IL"), _("ST"), _("LD"), _("FBD")] + return [ _("ST"), _("LD"), _("FBD")] TRANSITION_LANGUAGES_DICT = dict([(_(language), language) for language in GetTransitionLanguages()])
class PouTransitionDialog(wx.Dialog):
def __init__(self, parent):
- wx.Dialog.__init__(self, parent, size=wx.Size(350, 160),
+ wx.Dialog.__init__(self, parent, size=wx.Size(350, 200), title=_('Create a new transition'))
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
--- a/dialogs/ProjectDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/ProjectDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -51,10 +51,10 @@
values = self.ProjectProperties.GetValues()
- for param, name in [("projectName", "Project Name"),
- ("productName", "Product Name"),
- ("productVersion", "Product Version"),
- ("companyName", "Company Name")]:
+ for param, name in [("projectName", _("Project Name")), + ("productName", _("Product Name")), + ("productVersion", _("Product Version")), + ("companyName", _("Company Name"))]: @@ -63,7 +63,7 @@
elif i == len(error) - 1:
+ text += _(" and %s")%item dialog = wx.MessageDialog(self,
--- a/dialogs/SFCDivergenceDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/SFCDivergenceDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -39,12 +40,13 @@
class SFCDivergenceDialog(BlockPreviewDialog):
- def __init__(self, parent, controller, tagname):
+ def __init__(self, parent, controller, tagname, poss_div_types = None): @param parent: Parent wx.Window of dialog for modal
@param controller: Reference to project controller
@param tagname: Tagname of project POU edited
+ @param poss_div_types: Types of divergence that will be available in the dialog window BlockPreviewDialog.__init__(self, parent, controller, tagname,
@@ -58,19 +60,28 @@
self.LeftGridSizer.AddWindow(type_label, flag=wx.GROW)
# Create radio buttons for selecting divergence type
+ (SELECTION_DIVERGENCE, _('Selection Divergence')), + (SELECTION_CONVERGENCE, _('Selection Convergence')), + (SIMULTANEOUS_DIVERGENCE, _('Simultaneous Divergence')), + (SIMULTANEOUS_CONVERGENCE, _('Simultaneous Convergence'))] + if poss_div_types is not None: + for val in poss_div_types: + poss_div_btns.append(divergence_buttons[val]) + poss_div_btns = divergence_buttons self.TypeRadioButtons = {}
- (SELECTION_DIVERGENCE, _('Selection Divergence')),
- (SELECTION_CONVERGENCE, _('Selection Convergence')),
- (SIMULTANEOUS_DIVERGENCE, _('Simultaneous Divergence')),
- (SIMULTANEOUS_CONVERGENCE, _('Simultaneous Convergence'))]:
+ for type, label in poss_div_btns: radio_button = wx.RadioButton(self, label=label,
style=(wx.RB_GROUP if first else 0))
radio_button.SetValue(first)
self.Bind(wx.EVT_RADIOBUTTON, self.OnTypeChanged, radio_button)
self.LeftGridSizer.AddWindow(radio_button, flag=wx.GROW)
self.TypeRadioButtons[type] = radio_button
+ if first: focusbtn = type # Create label for number of divergence sequences
@@ -79,7 +90,7 @@
self.LeftGridSizer.AddWindow(sequences_label, flag=wx.GROW)
# Create spin control for defining number of divergence sequences
- self.Sequences = wx.SpinCtrl(self, min=2, max=20)
+ self.Sequences = wx.SpinCtrl(self, min=2, max=20, initial=2) self.Bind(wx.EVT_SPINCTRL, self.OnSequencesChanged, self.Sequences)
self.LeftGridSizer.AddWindow(self.Sequences, flag=wx.GROW)
@@ -93,7 +104,7 @@
# Selection divergence radio button is default control having keyboard
- self.TypeRadioButtons[SELECTION_DIVERGENCE].SetFocus()
+ self.TypeRadioButtons[focusbtn].SetFocus() def GetMinElementSize(self):
@@ -151,4 +162,4 @@
# Call BlockPreviewDialog function
BlockPreviewDialog.RefreshPreview(self)
\ No newline at end of file
--- a/dialogs/SFCStepDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/SFCStepDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -46,7 +47,7 @@
@param initial: True if step is initial (default: False)
BlockPreviewDialog.__init__(self,parent, controller, tagname,
- size=wx.Size(400, 250), title=_('Edit Step'))
+ size=wx.Size(400, 280), title=_('Edit Step')) self._init_sizers(2, 0, 6, None, 2, 1)
@@ -70,6 +71,8 @@
("action", _("Action"))]:
check_box = wx.CheckBox(self, label=label)
+ if name == "output" or (name == "input" and not initial): + check_box.SetValue(True) self.Bind(wx.EVT_CHECKBOX, self.OnConnectorsChanged, check_box)
self.LeftGridSizer.AddWindow(check_box, flag=wx.GROW)
self.ConnectorsCheckBox[name] = check_box
--- a/dialogs/SFCStepNameDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/SFCStepNameDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/dialogs/SFCTransitionDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/SFCTransitionDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,25 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -47,7 +48,7 @@
connection (default: True)
BlockPreviewDialog.__init__(self, parent, controller, tagname,
- size=wx.Size(350, 300), title=_('Edit transition'))
+ size=wx.Size(350, 350), title=_('Edit transition')) self._init_sizers(2, 0, 8, None, 2, 1)
--- a/dialogs/SearchInProjectDialog.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/SearchInProjectDialog.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,39 +1,31 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+from plcopen.plcopen import * -RE_ESCAPED_CHARACTERS = ".*+()[]?:|{}^$<>=-,"
- text = text.replace('\\', '\\\\')
- for c in RE_ESCAPED_CHARACTERS:
- text = text.replace(c, '\\' + c)
#-------------------------------------------------------------------------------
# Search In Project Dialog
#-------------------------------------------------------------------------------
@@ -68,8 +60,9 @@
pattern_sizer.AddWindow(self.CaseSensitive, flag=wx.GROW)
self.Pattern = wx.TextCtrl(self)
+ self.Bind(wx.EVT_TEXT, self.FindPatternChanged, self.Pattern) pattern_sizer.AddWindow(self.Pattern, flag=wx.GROW)
+ self.Bind(wx.EVT_CHAR_HOOK, self.OnEscapeKey) self.RegularExpression = wx.CheckBox(self, label=_('Regular expression'))
pattern_sizer.AddWindow(self.RegularExpression, flag=wx.GROW)
@@ -99,58 +92,76 @@
self.ElementsList.Enable(False)
scope_sizer.AddWindow(self.ElementsList, 1, border=5,
flag=wx.GROW|wx.TOP|wx.RIGHT|wx.BOTTOM)
- self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
- ok_button = self.ButtonSizer.GetAffirmativeButton()
- ok_button.SetLabel(_('Search'))
- self.Bind(wx.EVT_BUTTON, self.OnOK, ok_button)
- main_sizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ buttons_sizer = wx.BoxSizer(wx.HORIZONTAL) + main_sizer.AddSizer(buttons_sizer, border=20, + flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.ALIGN_RIGHT) + self.FindButton = wx.Button(self, label=_("Find")) + self.FindButton.SetDefault() + self.Bind(wx.EVT_BUTTON, self.OnFindButton, self.FindButton) + buttons_sizer.AddWindow(self.FindButton, border=5, flag=wx.RIGHT) + self.CloseButton = wx.Button(self, label=_("Close")) + self.Bind(wx.EVT_BUTTON, self.OnCloseButton, self.CloseButton) + buttons_sizer.AddWindow(self.CloseButton) self.SetSizer(main_sizer)
for name, label in GetElementsChoices():
self.ElementsList.Append(_(label))
+ self.RefreshButtonsState() + def RefreshButtonsState(self): + find_pattern = self.Pattern.GetValue() + self.FindButton.Enable(find_pattern != "") - raw_pattern = pattern = self.Pattern.GetValue()
- if not self.CaseSensitive.GetValue():
- pattern = pattern.upper()
- if not self.RegularExpression.GetValue():
- pattern = EscapeText(pattern)
- "raw_pattern": raw_pattern,
- "pattern": re.compile(pattern),
+ def FindPatternChanged(self, event): + self.RefreshButtonsState() + def OnScopeChanged(self, event): + self.ElementsList.Enable(self.OnlyElements.GetValue()) + def OnCloseButton(self, event): + self.EndModal(wx.ID_CANCEL) + def OnEscapeKey(self, event): + keycode = event.GetKeyCode() + if keycode == wx.WXK_ESCAPE: + self.OnCloseButton(event) + def OnFindButton(self, event): + "find_pattern": self.Pattern.GetValue(), "case_sensitive": self.CaseSensitive.GetValue(),
"regular_expression": self.RegularExpression.GetValue(),
if self.WholeProject.GetValue():
- criteria["filter"] = "all"
+ infos["filter"] = "all" elif self.OnlyElements.GetValue():
- criteria["filter"] = []
for index, (name, label) in enumerate(GetElementsChoices()):
if self.ElementsList.IsChecked(index):
- criteria["filter"].append(name)
- def OnScopeChanged(self, event):
- self.ElementsList.Enable(self.OnlyElements.GetValue())
- if self.Pattern.GetValue() == "":
- message = _("Form isn't complete. Pattern to search must be filled!")
- if self.RegularExpression.GetValue():
- re.compile(self.Pattern.GetValue())
+ infos["filter"].append(name) + if self.infosPrev != infos: + CompilePattern(self.criteria) message = _("Syntax error in regular expression of pattern to search!")
--- a/dialogs/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/dialogs/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,27 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/doc/about.html Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-<IMG SRC="../images/splash.png">
-<font size="3">Beremiz is an Open Source framework for automation.</font>
-<a href="http://www.beremiz.org/">http://www.beremiz.org/</a>
- <TD align="right" valign="top">
- <TD align="left" valign="top">
- University of Porto<BR>
- <a href="http://www.fe.up.pt/si/web_page.inicial">http://www.fe.up.pt/si/web_page.inicial</a>
\ No newline at end of file
--- a/doc/plcopen_about.html Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<IMG SRC="../images/aboutlogo.png">
-<font size="3">The PLCopen Editor saves and loads XML projects,<BR>accordingly to PLCopen TC6-XML Schemes.</font>
-<a href="http://www.beremiz.org/">http://www.beremiz.org/</a>
\ No newline at end of file
--- a/docutil/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/docutil/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,27 +1,27 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\ No newline at end of file
--- a/docutil/dochtml.py Sun Mar 05 00:38:25 2017 +0000
+++ b/docutil/dochtml.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import wx, os, wx.html, subprocess
@@ -63,6 +63,7 @@
wx.Frame.__init__(self, id=ID_HTMLFRAME, name='HtmlFrame',
parent=prnt, pos=wx.Point(320, 231), size=wx.Size(853, 616),
style=wx.DEFAULT_FRAME_STYLE, title='')
+ self.SetIcon(prnt.icon) self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
self.HtmlContent = UrlClickHtmlWindow(id=ID_HTMLFRAMEHTMLCONTENT,
@@ -93,4 +94,4 @@
elif subprocess.call("firefox %s"%url, shell=True) != 0:
wx.MessageBox("""Firefox browser not found.\nPlease point your browser at :\n%s""" % url)
- wx.MessageBox('Please point your browser at: %s' % url)
\ No newline at end of file
+ wx.MessageBox('Please point your browser at: %s' % url) --- a/docutil/docpdf.py Sun Mar 05 00:38:25 2017 +0000
+++ b/docutil/docpdf.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -53,7 +53,7 @@
os.system("%s -remote DS301 %s &"%(readerexepath, pdffile))
- print "Open pdf %s at page %d"%(pdffile, pagenum)
+ print "Open pdf %s at page %d"%(pdffile, pagenum) os.system("%s -remote DS301 %s %d &"%(readerexepath, pdffile, pagenum))
def open_pdf(pdffile, pagenum = None):
--- a/docutil/docsvg.py Sun Mar 05 00:38:25 2017 +0000
+++ b/docutil/docsvg.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import wx, os, subprocess
--- a/editors/CodeFileEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/CodeFileEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -482,17 +506,11 @@
self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT)
self.SearchParams = search_params
- "raw_pattern": search_params["find_pattern"],
- "pattern": re.compile(search_params["find_pattern"]),
- "case_sensitive": search_params["case_sensitive"],
- "regular_expression": search_params["regular_expression"],
(start, end, SEARCH_RESULT_HIGHLIGHT)
- TestTextElement(self.GetText(), criteria)]
+ TestTextElement(self.GetText(), search_params)] self.CurrentFindHighlight = None
if len(self.SearchResults) > 0:
@@ -660,11 +678,13 @@
self.VariablesDefaultValue = {"Name" : "", "Type" : DefaultType, "Initial": "",
"Description":"", "OnChange":"", "Options":""}
- self.Table = VariablesTable(self, [], ["#", "Name", "Type", "Initial",
- "Description", "OnChange", "Options"])
+ self.Table = VariablesTable(self, [], ["#", "Name","Type", "Initial", + "Description", "OnChange", "Options"]) + # self.Table = VariablesTable(self, [], [_("#"), _("Name"), _("Type"), _("Initial"), + # _("Description"), _("OnChange"), _("Options")]) self.ColAlignements = [wx.ALIGN_RIGHT] + \
[wx.ALIGN_LEFT]*(len(self.VariablesDefaultValue))
- self.ColSizes = [20, 150] + [100]*(len(self.VariablesDefaultValue)-1)
+ self.ColSizes = [20, 150] + [130]*(len(self.VariablesDefaultValue)-1) self.VariablesGrid.SetTable(self.Table)
self.VariablesGrid.SetButtons({"Add": self.AddVariableButton,
"Delete": self.DeleteVariableButton,
--- a/editors/ConfTreeNodeEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/ConfTreeNodeEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -319,25 +342,20 @@
staticbox = wx.StaticBox(self.ParamsEditor,
label=_(label), size=wx.Size(10, 0))
staticboxsizer = wx.StaticBoxSizer(staticbox, wx.VERTICAL)
+ flags = (wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT) - sizer.AddSizer(staticboxsizer, border=5,
- flag=wx.GROW|wx.TOP|wx.BOTTOM)
- sizer.AddSizer(staticboxsizer, border=5,
- flag=wx.GROW|wx.BOTTOM)
+ sizer.AddSizer(staticboxsizer, border=5, flag=flags) self.GenerateSizerElements(staticboxsizer,
element_infos["children"],
boxsizer = wx.FlexGridSizer(cols=3, rows=1)
boxsizer.AddGrowableCol(1)
+ flags = (wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT) - sizer.AddSizer(boxsizer, border=5,
- sizer.AddSizer(boxsizer, border=5,
- flag=wx.GROW|wx.LEFT|wx.RIGHT|wx.BOTTOM)
+ sizer.AddSizer(boxsizer, border=5, flag=flags) staticbitmap = GenStaticBitmap(ID=-1, bitmapname=element_infos["name"],
name="%s_bitmap"%element_infos["name"], parent=self.ParamsEditor,
pos=wx.Point(0, 0), size=wx.Size(24, 24), style=0)
@@ -385,7 +403,7 @@
staticbox = wx.StaticBox(self.ParamsEditor,
label="%s - %s"%(_(name), _(value)), size=wx.Size(10, 0))
staticboxsizer = wx.StaticBoxSizer(staticbox, wx.VERTICAL)
- sizer.AddSizer(staticboxsizer, border=5, flag=wx.GROW|wx.BOTTOM)
+ sizer.AddSizer(staticboxsizer, border=5, flag=wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT) self.GenerateSizerElements(staticboxsizer, element_infos["children"], element_path)
callback = self.GetChoiceContentCallBackFunction(combobox, staticboxsizer, element_path)
@@ -456,6 +474,8 @@
textctrl.Bind(wx.EVT_TEXT_ENTER, callback)
textctrl.Bind(wx.EVT_KILL_FOCUS, callback)
+ self.RefreshScrollbars() def GetItemChannelChangedFunction(self, dir):
--- a/editors/DataTypeEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/DataTypeEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from types import TupleType
@@ -74,10 +74,11 @@
colname = self.GetColLabelValue(col, False)
value = self.data[row].get(colname, "")
if colname == "Type" and isinstance(value, TupleType):
return "ARRAY [%s] OF %s" % (",".join(map(lambda x : "..".join(x), value[2])), value[1])
def SetValue(self, row, col, value):
if col < len(self.colnames):
--- a/editors/DebugViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/DebugViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from threading import Lock, Timer
from time import time as gettime
--- a/editors/EditorPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/EditorPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -79,7 +79,7 @@
self.ParentWindow.EditProjectElement(None, self.GetTagName(), True)
- return "-".join(self.TagName.split("::")[1:])
+ return ".".join(self.TagName.split("::")[1:]) --- a/editors/FileManagementPanel.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/FileManagementPanel.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -211,4 +211,4 @@
dragSource = wx.DropSource(self)
\ No newline at end of file
--- a/editors/IECCodeViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/IECCodeViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from editors.TextViewer import TextViewer
from plcopen.plcopen import TestTextElement
@@ -14,4 +37,4 @@
def Search(self, criteria):
- return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)]
\ No newline at end of file
+ return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)] --- a/editors/LDViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/LDViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/editors/ProjectNodeEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/ProjectNodeEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -68,4 +91,4 @@
self.Controler.LoadNext()
self.ParentWindow.CloseTabsWithoutModel()
\ No newline at end of file
--- a/editors/ResourceEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/ResourceEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -434,17 +434,18 @@
def OnTasksGridCellChange(self, event):
row, col = event.GetRow(), event.GetCol()
- if self.TasksTable.GetColLabelValue(col) == "Name":
+ if self.TasksTable.GetColLabelValue(col, False) == "Name": tasklist = [name for name in self.TaskList.split(",") if name != ""]
for i in xrange(self.TasksTable.GetNumberRows()):
task = self.TasksTable.GetValueByName(i, "Name")
+ old_name = tasklist[0].upper() new_name = self.TasksTable.GetValue(row, col)
for i in xrange(self.InstancesTable.GetNumberRows()):
- if self.InstancesTable.GetValueByName(i, "Task") == old_name:
+ name = self.InstancesTable.GetValueByName(i, "Task").upper() self.InstancesTable.SetValueByName(i, "Task", new_name)
colname = self.TasksTable.GetColLabelValue(col, False)
--- a/editors/SFCViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/SFCViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,35 +1,87 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +from graphics.SFC_Objects import * +from graphics.GraphicCommons import SELECTION_DIVERGENCE, \ + SELECTION_CONVERGENCE, SIMULTANEOUS_DIVERGENCE, SIMULTANEOUS_CONVERGENCE, EAST, NORTH, WEST, SOUTH +SFC_Objects = (SFC_Step, SFC_ActionBlock, SFC_Transition, SFC_Divergence, SFC_Jump) class SFC_Viewer(Viewer):
+ # The key of this dict is a block that user try to connect, + # and the value is a list of blocks, that can be connected with the current block + # and with directions of connection + "SFC_Step": [("SFC_ActionBlock", EAST), + ("SFC_Transition", SOUTH), + (SELECTION_DIVERGENCE, SOUTH), + (SIMULTANEOUS_CONVERGENCE, SOUTH)], + "SFC_ActionBlock": [("SFC_Step", EAST)], + "SFC_Transition": [("SFC_Step", SOUTH), + (SELECTION_CONVERGENCE, SOUTH), + (SIMULTANEOUS_DIVERGENCE, SOUTH), + ("FBD_Variable", EAST), + ("FBD_Connector", EAST), + ("LD_PowerRail", EAST), + SELECTION_DIVERGENCE: [("SFC_Transition", SOUTH)], + SELECTION_CONVERGENCE: [("SFC_Step", SOUTH), + SIMULTANEOUS_DIVERGENCE: [("SFC_Step", SOUTH)], + SIMULTANEOUS_CONVERGENCE: [("SFC_Transition", SOUTH)], + "FBD_Block": [("SFC_Transition", WEST)], + "FBD_Variable": [("SFC_Transition", WEST)], + "FBD_Connector": [("SFC_Transition", WEST)], + "LD_Contact": [("SFC_Transition", WEST)], + "LD_PowerRail": [("SFC_Transition", WEST)], + "LD_Coil": [("SFC_Transition", WEST)] def __init__(self, parent, tagname, window, controler, debug = False, instancepath = ""):
Viewer.__init__(self, parent, tagname, window, controler, debug, instancepath)
self.CurrentLanguage = "SFC"
@@ -282,6 +334,28 @@
self.UpdateScrollPos(event)
+ def GetBlockName(self, block): + blockName = block.__class__.__name__ + if blockName == "SFC_Divergence": + # This method check the IEC 61131-3 compatibility between two SFC blocks + def BlockCompatibility(self,startblock = None, endblock = None, direction = None): + if startblock!= None and endblock != None and (isinstance(startblock,SFC_Objects)\ + or isinstance(endblock,SFC_Objects)): + # Full "SFC_StandardRules" table would be symmetrical and + # to avoid duplicate records and minimize the table only upper part is defined. + if (direction == SOUTH or direction == EAST): + startblock, endblock = endblock, startblock + start = self.GetBlockName(startblock) + end = self.GetBlockName(endblock) + for val in self.SFC_StandardRules[start]: #-------------------------------------------------------------------------------
# Keyboard event functions
#-------------------------------------------------------------------------------
--- a/editors/TextViewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/TextViewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -47,7 +47,8 @@
[STC_PLC_WORD, STC_PLC_COMMENT, STC_PLC_NUMBER, STC_PLC_STRING,
STC_PLC_VARIABLE, STC_PLC_PARAMETER, STC_PLC_FUNCTION, STC_PLC_JUMP,
- STC_PLC_ERROR, STC_PLC_SEARCH_RESULT] = range(10)
+ STC_PLC_ERROR, STC_PLC_SEARCH_RESULT, + STC_PLC_EMPTY] = range(11) [SPACE, WORD, NUMBER, STRING, WSTRING, COMMENT, PRAGMA, DPRAGMA] = range(8)
[ID_TEXTVIEWER, ID_TEXTVIEWERTEXTCTRL,
@@ -258,10 +259,11 @@
if values[1] != "function":
- dialog = wx.TextEntryDialog(self.ParentWindow, "Block name", "Please enter a block name", "", wx.OK|wx.CANCEL|wx.CENTRE)
+ dialog = wx.TextEntryDialog(self.ParentWindow, _("Block name"), _("Please enter a block name"), "", wx.OK|wx.CANCEL|wx.CENTRE) if dialog.ShowModal() == wx.ID_OK:
blockname = dialog.GetValue()
if blockname.upper() in [name.upper() for name in self.Controler.GetProjectPouNames(self.Debug)]:
@@ -287,7 +289,7 @@
dlg = wx.TextEntryDialog(
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -302,7 +304,7 @@
if not location.startswith("%"):
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Select a variable class:"), _("Variable class"),
- ["Input", "Output", "Memory"],
+ [_("Input"), _("Output"), _("Memory")], wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
@@ -338,7 +340,7 @@
dlg = wx.TextEntryDialog(
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -361,7 +363,7 @@
dlg = wx.TextEntryDialog(
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -412,7 +414,7 @@
def RefreshJumpList(self):
- if self.TextSyntax != "IL":
+ if self.TextSyntax == "IL": self.Jumps = [jump.upper() for jump in LABEL_MODEL.findall(self.GetText())]
@@ -576,7 +578,7 @@
current_context = self.Variables
- self.SetStyling(current_pos - last_styled_pos + 1, STC_PLC_COMMENT)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_COMMENT) self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER)
@@ -593,33 +595,33 @@
elif word in self.EnumeratedValues:
self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER)
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) if word not in ["]", ")"] and (self.GetCurrentPos() < last_styled_pos or self.GetCurrentPos() > current_pos):
self.StartStyling(last_styled_pos, wx.stc.STC_INDICS_MASK)
self.SetStyling(current_pos - last_styled_pos, wx.stc.STC_INDIC0_MASK)
self.StartStyling(current_pos, 0xff)
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
+ if (state != DPRAGMA) and (state != COMMENT): self.RefreshLineFolding(line_number)
elif line.endswith("(*") and state != COMMENT:
- self.SetStyling(current_pos - last_styled_pos - 1, 31)
+ self.SetStyling(current_pos - last_styled_pos - 1, STC_PLC_EMPTY) last_styled_pos = current_pos
current_context = self.Variables
elif line.endswith("{") and state not in [PRAGMA, DPRAGMA]:
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
current_context = self.Variables
elif line.endswith("{{") and state == PRAGMA:
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
@@ -627,18 +629,22 @@
self.SetStyling(current_pos - last_styled_pos + 2, STC_PLC_COMMENT)
last_styled_pos = current_pos + 1
+ if len(self.CallStack) > 0: + current_call = self.CallStack.pop() - self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
- self.SetStyling(current_pos - last_styled_pos + 1, 31)
+ self.SetStyling(current_pos - last_styled_pos + 1, STC_PLC_EMPTY) last_styled_pos = current_pos + 1
elif (line.endswith("'") or line.endswith('"')) and state not in [STRING, WSTRING]:
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
current_context = self.Variables
@@ -661,7 +667,7 @@
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
@@ -669,7 +675,7 @@
elif char in NUMBERS or char == '.' and state != WORD:
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos
elif state == WORD and char != '.':
@@ -692,7 +698,7 @@
elif word in self.EnumeratedValues:
self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER)
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) if word not in ["]", ")"] and (self.GetCurrentPos() < last_styled_pos or self.GetCurrentPos() > current_pos):
self.StartStyling(last_styled_pos, wx.stc.STC_INDICS_MASK)
self.SetStyling(current_pos - last_styled_pos, wx.stc.STC_INDIC0_MASK)
@@ -756,9 +762,9 @@
elif word in self.EnumeratedValues:
self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER)
- self.SetStyling(current_pos - last_styled_pos, 31)
+ self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) - self.SetStyling(current_pos - start_pos, 31)
+ self.SetStyling(current_pos - start_pos, STC_PLC_EMPTY) self.ShowHighlights(start_pos, end_pos)
@@ -804,17 +810,10 @@
self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT)
self.SearchParams = search_params
- "raw_pattern": search_params["find_pattern"],
- "pattern": re.compile(search_params["find_pattern"]),
- "case_sensitive": search_params["case_sensitive"],
- "regular_expression": search_params["regular_expression"],
(infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT)
for infos, start, end, text in
+ self.Search(search_params)] self.CurrentFindHighlight = None
if len(self.SearchResults) > 0:
@@ -895,14 +894,15 @@
if self.TextSyntax in ["ST", "ALL"]:
- indent = self.Editor.GetLineIndentation(line)
- if lineText.strip() == "" and indent > 0:
- self.Editor.DelLineLeft()
- self.Editor.AddText(" " * ((max(0, indent - 1) / 2) * 2))
+ if not self.Editor.GetSelectedText(): + indent = self.Editor.GetColumn(self.Editor.GetCurrentPos()) + if lineText.strip() == "" and len(lineText) > 0 and indent > 0: + self.Editor.DelLineLeft() + self.Editor.AddText(" " * ((max(0, indent - 1) / 2) * 2)) - elif key in NAVIGATION_KEYS:
def OnKillFocus(self, event):
--- a/editors/Viewer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/editors/Viewer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -43,6 +43,7 @@
+SFC_Objects = (SFC_Step, SFC_ActionBlock, SFC_Transition, SFC_Divergence, SFC_Jump) @@ -146,6 +147,9 @@
specific_values.priority, id)
+divergence_types = [SELECTION_DIVERGENCE, + SELECTION_CONVERGENCE, SIMULTANEOUS_DIVERGENCE, SIMULTANEOUS_CONVERGENCE] def GetDivergenceCreationFunction(divergence_type):
def divergenceCreationFunction(viewer, id, specific_values):
return SFC_Divergence(viewer, divergence_type,
@@ -243,7 +247,7 @@
elif pou_type == "function" and values[1] != "function":
message = _("Function Blocks can't be used in Functions!")
elif self.ParentWindow.Controler.PouIsUsedBy(pou_name, values[0], self.ParentWindow.Debug):
- message = _("\"%s\" is already used by \"%s\"!")%(pou_name, values[0])
+ message = _("\"{a1}\" is already used by \"{a2}\"!").format(a1 = pou_name, a2 = values[0]) @@ -282,7 +286,7 @@
if not location.startswith("%"):
dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
- ["Input", "Output", "Memory"],
+ [_("Input"), _("Output"), _("Memory")], wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
@@ -301,7 +305,7 @@
dlg = wx.TextEntryDialog(
self.ParentWindow.ParentWindow,
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -331,7 +335,7 @@
dlg = wx.TextEntryDialog(
self.ParentWindow.ParentWindow,
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -353,7 +357,7 @@
dlg = wx.TextEntryDialog(
self.ParentWindow.ParentWindow,
_("Confirm or change variable name"),
- 'Variable Drop', var_name)
+ _('Variable Drop'), var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None
@@ -573,11 +577,11 @@
[ID_CLEAR_EXEC_ORDER, ID_RESET_EXEC_ORDER] = [wx.NewId() for i in xrange(2)]
- self.AddMenuItems(menu, [
- (ID_CLEAR_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Clear Execution Order'), '', self.OnClearExecutionOrderMenu),
- (ID_RESET_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Reset Execution Order'), '', self.OnResetExecutionOrderMenu)])
+ if self.CurrentLanguage == 'FBD': + self.AddMenuItems(menu, [ + (ID_CLEAR_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Clear Execution Order'), '', self.OnClearExecutionOrderMenu), + (ID_RESET_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Reset Execution Order'), '', self.OnResetExecutionOrderMenu)]) add_menu = wx.Menu(title='')
self.AddAddMenuItems(add_menu)
@@ -600,7 +604,7 @@
def _init_Editor(self, prnt):
self.Editor = wx.ScrolledWindow(prnt, name="Viewer",
pos=wx.Point(0, 0), size=wx.Size(0, 0),
- style=wx.HSCROLL | wx.VSCROLL | wx.ALWAYS_SHOW_SB)
+ style=wx.HSCROLL | wx.VSCROLL) self.Editor.ParentWindow = self
@@ -757,8 +761,8 @@
client_size = self.Editor.GetClientSize()
mouse_pos = wx.Point(client_size[0] / 2, client_size[1] / 2)
mouse_event = wx.MouseEvent(wx.EVT_MOUSEWHEEL.typeId)
- mouse_event.m_x = mouse_pos.x
- mouse_event.m_y = mouse_pos.y
+ mouse_event.x = mouse_pos.x + mouse_event.y = mouse_pos.y mouse_pos = mouse_event.GetPosition()
pos = mouse_event.GetLogicalPosition(dc)
@@ -883,6 +887,15 @@
comments.sort(lambda x, y: cmp(x.GetId(), y.GetId()))
return blocks + wires + comments
+ def GetContinuationByName(self, name): + for block in self.Blocks.itervalues(): + if isinstance(block, FBD_Connector) and\ + block.GetType() == CONTINUATION and\ + block.GetName() == name: def GetConnectorByName(self, name):
for block in self.Blocks.itervalues():
if isinstance(block, FBD_Connector) and\
@@ -1462,12 +1475,24 @@
def FindBlockConnector(self, pos, direction = None, exclude = None):
+ result, error = self.FindBlockConnectorWithError(pos, direction, exclude) + def FindBlockConnectorWithError(self, pos, direction = None, exclude = None): for block in self.Blocks.itervalues():
- result = block.TestConnector(pos, direction, exclude)
+ connector = block.TestConnector(pos, direction, exclude) + if self.IsWire(self.SelectedElement): + startblock = self.SelectedElement.StartConnected.GetParentBlock() + avail, error = connector.ConnectionAvailable(direction, exclude) + if not avail or not self.BlockCompatibility(startblock, block, direction): + return connector, error def FindElementById(self, id):
block = self.Blocks.get(id, None)
@@ -2048,47 +2073,7 @@
self.SelectedElement.HighlightPoint(pos)
elif connector is None or self.SelectedElement.GetDragging():
- start_connector = self.SelectedElement.GetStartConnected()
- start_direction = start_connector.GetDirection()
- if self.CurrentLanguage == "SFC" and start_direction == SOUTH:
- (_(u'Initial Step'), self.GetAddToWireMenuCallBack(self.AddNewStep, True)),
- (_(u'Step'), self.GetAddToWireMenuCallBack(self.AddNewStep, False)),
- (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, False)),
- (_(u'Divergence'), self.GetAddToWireMenuCallBack(self.AddNewDivergence)),
- (_(u'Jump'), self.GetAddToWireMenuCallBack(self.AddNewJump)),
- elif start_direction == EAST:
- if isinstance(start_connector.GetParentBlock(), SFC_Step):
- (_(u'Action Block'), self.GetAddToWireMenuCallBack(self.AddNewActionBlock))
- (_(u'Block'), self.GetAddToWireMenuCallBack(self.AddNewBlock)),
- (_(u'Variable'), self.GetAddToWireMenuCallBack(self.AddNewVariable, True)),
- (_(u'Connection'), self.GetAddToWireMenuCallBack(self.AddNewConnection)),
- if self.CurrentLanguage != "FBD":
- (_(u'Contact'), self.GetAddToWireMenuCallBack(self.AddNewContact))
- if self.CurrentLanguage == "LD":
- (_(u'Coil'), self.GetAddToWireMenuCallBack(self.AddNewCoil)),
- (_(u'Power Rail'), self.GetAddToWireMenuCallBack(self.AddNewPowerRail)),
- if self.CurrentLanguage == "SFC":
- (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, True))
+ items = self.GetPopupMenuItems() if self.Editor.HasCapture():
self.Editor.ReleaseMouse()
@@ -2273,7 +2258,8 @@
self.rubberBand.OnMotion(event, dc, self.Scaling)
elif not self.Debug and self.Mode == MODE_SELECTION and self.SelectedElement is not None:
- connector = self.FindBlockConnector(pos, self.SelectedElement.GetConnectionDirection(), self.SelectedElement.EndConnected)
+ connector, errorHighlight = self.FindBlockConnectorWithError(pos, self.SelectedElement.GetConnectionDirection(), self.SelectedElement.EndConnected) + self.SelectedElement.ErrHighlight = errorHighlight; if not connector or self.SelectedElement.EndConnected == None:
self.SelectedElement.ResetPoints()
movex, movey = self.SelectedElement.OnMotion(event, dc, self.Scaling)
@@ -2340,6 +2326,54 @@
self.Scroll(xstart + move_window.x, ystart + move_window.y)
self.RefreshScrollBars(move_window.x, move_window.y)
+ def BlockCompatibility(self, startblock=None, endblock=None, direction = None): + def GetPopupMenuItems(self): + start_connector = self.SelectedElement.GetStartConnected() + start_direction = start_connector.GetDirection() + startblock = start_connector.GetParentBlock() + if isinstance(startblock, SFC_Objects): + startblockname = self.GetBlockName(startblock) + SFC_WireMenu_Buttons = { + 'SFC_Step': (_(u'Step'), self.GetAddToWireMenuCallBack(self.AddNewStep, False)), + 'SFC_Jump': (_(u'Jump'), self.GetAddToWireMenuCallBack(self.AddNewJump)), + 'SFC_Transition': (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, False)), + 'SFC_ActionBlock': (_(u'Action Block'), self.GetAddToWireMenuCallBack(self.AddNewActionBlock))} + for endblock in self.SFC_StandardRules.get(startblockname): + if start_direction in endblock: + if endblock[0] in divergence_types: + poss_div_types.append(endblock[0]) + items.append(SFC_WireMenu_Buttons[endblock[0]]) + if len(poss_div_types) > 0: + items.append((_(u'Divergence'), self.GetAddToWireMenuCallBack(self.AddNewDivergence, + elif start_direction == EAST: + (_(u'Block'), self.GetAddToWireMenuCallBack(self.AddNewBlock)), + (_(u'Connection'), self.GetAddToWireMenuCallBack(self.AddNewConnection))]) + if self.CurrentLanguage != "FBD": + items.append((_(u'Contact'), self.GetAddToWireMenuCallBack(self.AddNewContact))) + if self.CurrentLanguage == "LD": + (_(u'Coil'), self.GetAddToWireMenuCallBack(self.AddNewCoil)), + (_(u'Power Rail'), self.GetAddToWireMenuCallBack(self.AddNewPowerRail))]) + if self.CurrentLanguage == "SFC": + (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, True))) + (_(u'Variable'), self.GetAddToWireMenuCallBack(self.AddNewVariable, True))) #-------------------------------------------------------------------------------
# Keyboard event functions
#-------------------------------------------------------------------------------
@@ -2398,7 +2432,7 @@
if self.IsBlock(self.SelectedElement) or self.IsComment(self.SelectedElement):
block = self.CopyBlock(self.SelectedElement, wx.Point(*self.SelectedElement.GetPosition()))
- event.m_x, event.m_y = self.Editor.ScreenToClient(wx.GetMousePosition())
+ event.x, event.y = self.Editor.ScreenToClient(wx.GetMousePosition()) self.SelectedElement.OnLeftUp(event, dc, self.Scaling)
self.SelectedElement.SetSelected(False)
@@ -2607,7 +2641,7 @@
"name": self.Controler.GenerateNewName(
self.TagName, None, "Step%d", 0),
dialog = SFCStepDialog(self.ParentWindow, self.Controler, self.TagName, initial)
@@ -2651,8 +2685,8 @@
connector = transition.GetConnectors()["inputs"][0]
self.AddNewElement(transition, bbox, wire, connector)
- def AddNewDivergence(self, bbox, wire=None):
- dialog = SFCDivergenceDialog(self.ParentWindow, self.Controler, self.TagName)
+ def AddNewDivergence(self, bbox, poss_div_types = None, wire=None): + dialog = SFCDivergenceDialog(self.ParentWindow, self.Controler, self.TagName, poss_div_types) dialog.SetPreviewFont(self.GetFont())
dialog.SetMinElementSize((bbox.width, bbox.height))
if dialog.ShowModal() == wx.ID_OK:
@@ -2868,7 +2902,20 @@
if dialog.ShowModal() == wx.ID_OK:
values = dialog.GetValues()
rect = step.GetRedrawRect(1, 1)
- step.SetName(values["name"])
+ new_name = values["name"] + if self.GetDrawingMode() == DRIVENDRAWING_MODE: + old_name = step.GetName().upper() + if new_name.upper() != old_name: + for block in self.Blocks.itervalues(): + if isinstance(block, SFC_Jump): + if old_name == block.GetTarget().upper(): + block.SetTarget(new_name) + rect = rect.Union(block.GetRedrawRect()) @@ -2915,7 +2962,12 @@
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Edit jump target"), _("Please choose a target"),
choices, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
- dialog.SetSelection(choices.index(jump.GetTarget()))
+ indx = choices.index(jump.GetTarget()) + dialog.SetSelection(indx) if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetStringSelection()
rect = jump.GetRedrawRect(1, 1)
@@ -3216,6 +3268,17 @@
if element not in elements:
+ if self.GetDrawingMode() == DRIVENDRAWING_MODE: + name = step.GetName().upper() + for block in self.Blocks.itervalues(): + if isinstance(block, SFC_Jump): + if name == block.GetTarget().upper(): + remove_jumps.append(block) + for jump in remove_jumps: self.Controler.RemoveEditedElementInstance(self.TagName, step.GetId())
@@ -3399,22 +3462,16 @@
self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT)
self.SearchParams = search_params
- "raw_pattern": search_params["find_pattern"],
- "pattern": re.compile(search_params["find_pattern"]),
- "case_sensitive": search_params["case_sensitive"],
- "regular_expression": search_params["regular_expression"],
- for infos, start, end, text in self.Controler.SearchInPou(self.TagName, criteria, self.Debug):
- if infos[1] in ["var_local", "var_input", "var_output", "var_inout"]:
- self.SearchResults.append((infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT))
- block = self.Blocks.get(infos[2])
- blocks.append((block, (infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT)))
+ for infos, start, end, text in self.Controler.SearchInPou(self.TagName, search_params, self.Debug): + if (infos[0] == self.TagName or self.TagName.split("::")[0] in ['A', 'T']) and infos[1] is not 'name': + if infos[1] in ["var_local", "var_input", "var_output", "var_inout"]: + self.SearchResults.append((infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT)) + block = self.Blocks.get(infos[2]) + blocks.append((block, (infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT))) self.SearchResults.extend([infos for block, infos in blocks])
self.CurrentFindHighlight = None
--- a/features.py Sun Mar 05 00:38:25 2017 +0000
+++ b/features.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ('Native', 'NativeLib.NativeLibrary'),
('Python', 'py_ext.PythonLibrary'),
--- a/graphics/.cvsignore Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
--- a/graphics/DebugDataConsumer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/DebugDataConsumer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/graphics/FBD_Objects.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/FBD_Objects.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -902,7 +902,15 @@
connectors["outputs"].append(self.Connector)
+ def SpreadCurrent(self): + if self.Type == CONNECTOR: + continuations = self.Parent.GetContinuationByName(self.Name) + if continuations is not None: + value = self.Connector.ReceivingCurrent() + for cont in continuations: + cont.Connector.SpreadCurrent(value) # Changes the variable type
--- a/graphics/GraphicCommons.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/GraphicCommons.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -1351,19 +1351,35 @@
+ # assume that pointer is already inside of this connector + def ConnectionAvailable(self, direction=None, exclude=True): + wire_nums = len(self.Wires) + connector_free = (wire_nums<= 0) + connector_max_used = ((wire_nums > 0) and self.OneConnected) + if (self.Parent.CurrentLanguage in ["SFC", "LD"]) and (self.Type == "BOOL"): + connector_max_used = False; + # connector is available for new connection + connect = connector_free or not connector_max_used + return connect, connector_max_used # Tests if the point given is near from the end point of this connector
- def TestPoint(self, pt, direction = None, exclude = True):
- parent_pos = self.ParentBlock.GetPosition()
- if (not (len(self.Wires) > 0 and self.OneConnected and exclude) or self.Type == "BOOL")\
- and direction is None or self.Direction == direction:
+ def TestPoint(self, pt, direction=None, exclude=True): + check_point = (not exclude) and (direction is None or self.Direction == direction); # Calculate a square around the end point of this connector
+ parent_pos = self.ParentBlock.GetPosition() x = parent_pos[0] + self.Pos.x + self.Direction[0] * CONNECTOR_SIZE - ANCHOR_DISTANCE
y = parent_pos[1] + self.Pos.y + self.Direction[1] * CONNECTOR_SIZE - ANCHOR_DISTANCE
width = ANCHOR_DISTANCE * 2 + abs(self.Direction[0]) * CONNECTOR_SIZE
height = ANCHOR_DISTANCE * 2 + abs(self.Direction[1]) * CONNECTOR_SIZE
rect = wx.Rect(x, y, width, height)
- return rect.InsideXY(pt.x, pt.y)
+ inside = rect.InsideXY(pt.x, pt.y); # Draws the highlightment of this element if it is highlighted
def DrawHighlightment(self, dc):
@@ -1551,6 +1567,7 @@
self.ComputingType = False
self.Font = parent.GetMiniFont()
+ self.ErrHighlight = False if self.StartConnected is not None and self.EndConnected is not None:
@@ -2590,8 +2607,13 @@
def DrawHighlightment(self, dc):
scalex, scaley = dc.GetUserScale()
- dc.SetPen(MiterPen(HIGHLIGHTCOLOR, (2 * scalex + 5)))
- dc.SetBrush(wx.Brush(HIGHLIGHTCOLOR))
+ # If user trying to connect wire with wrong input, highlight will become red. + if self.ErrHighlight == True and not (self.EndConnected): + highlightcolor = wx.RED + highlightcolor = HIGHLIGHTCOLOR + dc.SetPen(MiterPen(highlightcolor, (2 * scalex + 5))) + dc.SetBrush(wx.Brush(highlightcolor)) dc.SetLogicalFunction(wx.AND)
# Draw the start and end points if they are not connected or the mouse is over them
if len(self.Points) > 0 and (not self.StartConnected or self.OverStart):
@@ -2873,10 +2895,15 @@
wx.Point(self.Pos.x + self.Size[0], self.Pos.y + self.Size[1]),
wx.Point(self.Pos.x, self.Pos.y + self.Size[1])]
+ # dc.SetBrush call is workaround for the issue with wx.PrinterDC + # with wxPython 3.0 on GNU/Linux (don't remove it) + dc.SetBrush(wx.WHITE_BRUSH) lines = [wx.Point(self.Pos.x + self.Size[0] - 10, self.Pos.y),
wx.Point(self.Pos.x + self.Size[0] - 10, self.Pos.y + 10),
wx.Point(self.Pos.x + self.Size[0], self.Pos.y + 10)]
# Draws the comment content
for idx, line in enumerate(self.Content.splitlines()):
--- a/graphics/LD_Objects.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/LD_Objects.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/graphics/RubberBand.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/RubberBand.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/graphics/SFC_Objects.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/SFC_Objects.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/graphics/ToolTipProducer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/ToolTipProducer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/graphics/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/graphics/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -29,4 +29,4 @@
from SFC_Objects import *
from RubberBand import RubberBand
-from DebugDataConsumer import DebugDataConsumer
\ No newline at end of file
+from DebugDataConsumer import DebugDataConsumer --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/i18n/Beremiz_ru_RU.po Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,4063 @@
+# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +"Project-Id-Version: Beremiz\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 14:39+0300\n" +"PO-Revision-Date: 2017-01-12 14:41+0300\n" +"Last-Translator: Andrey Skvortsov <andrej.skvortzov@gmail.com>\n" +"Language-Team: Andrey Skvortsov <andrej.skvortzov@gmail.com>\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.11\n" +#: ../PLCOpenEditor.py:408 ../Beremiz.py:1191 +"An unhandled exception (bug) occured. Bug report saved at :\n" +"Please be kind enough to send this file to:\n" +"beremiz-devel@lists.sourceforge.net\n" +"You should now restart program.\n" +"Произошла невосстанавливаемая ошибка (bug). Отчет об ошибке сохранен в:\n" +"Будьте добры, отправьте этот файл по адресу\n" +"beremiz-devel@lists.sourceforge.net\n" +"Для дальнейшей работы перезапустите программу.\n" +#: ../controls/VariablePanel.py:72 +#: ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:72 +#: ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:73 +#: ../dialogs/PouTransitionDialog.py:99 ../dialogs/ProjectDialog.py:66 +#: ../dialogs/PouActionDialog.py:91 ../dialogs/PouDialog.py:113 +#: ../ProjectController.py:1089 +msgid " generation failed !\n" +msgstr "неудачная генерация кода!\n" +#: ../plcopen/plcopen.py:881 +msgid "\"%s\" Data Type doesn't exist !!!" +msgstr "Тип данных \"%s\" не существует!!!" +#: ../plcopen/plcopen.py:899 +msgid "\"%s\" POU already exists !!!" +msgstr "POU \"%s\" уже существует!!!" +#: ../plcopen/plcopen.py:920 +msgid "\"%s\" POU doesn't exist !!!" +msgstr "POU \"%s\" не найден!!!" +#: ../editors/Viewer.py:246 +msgid "\"%s\" can't use itself!" +msgstr "\"%s\" не может использовать сам себя!!!" +#: ../IDEFrame.py:1652 ../IDEFrame.py:1671 +msgid "\"%s\" config already exists!" +msgstr "Конфигурация \"%s\" уже существует!!!" +#: ../plcopen/plcopen.py:467 +msgid "\"%s\" configuration already exists !!!" +msgstr "Конфигурация \"%s\" уже существует!!!" +msgid "\"%s\" data type already exists!" +msgstr "Тип данных \"%s\" уже существует!!!" +#: ../dialogs/PouTransitionDialog.py:110 ../dialogs/BlockPreviewDialog.py:219 +#: ../dialogs/PouActionDialog.py:102 ../editors/Viewer.py:262 +#: ../editors/Viewer.py:330 ../editors/Viewer.py:354 ../editors/Viewer.py:374 +#: ../editors/TextViewer.py:272 ../editors/TextViewer.py:301 +#: ../controls/VariablePanel.py:396 +msgid "\"%s\" element for this pou already exists!" +msgstr "Элемент с именем \"%s\" уже существует в этом POU!!!" +msgid "\"%s\" folder is not a valid Beremiz project\n" +msgstr "Директория \"%s\" не является проектом Beremiz\n" +#: ../dialogs/SFCStepNameDialog.py:52 ../dialogs/PouTransitionDialog.py:106 +#: ../dialogs/BlockPreviewDialog.py:207 ../dialogs/PouNameDialog.py:50 +#: ../dialogs/PouActionDialog.py:98 ../dialogs/PouDialog.py:120 +#: ../editors/DataTypeEditor.py:555 ../editors/DataTypeEditor.py:584 +#: ../editors/CodeFileEditor.py:770 ../controls/VariablePanel.py:751 +msgid "\"%s\" is a keyword. It can't be used!" +msgstr "\"%s\" является ключевым словом и не может быть использован!" +#: ../plcopen/plcopen.py:2412 +msgid "\"%s\" is an invalid value!" +msgstr "\"%s\" недопустимое значение!" +#: ../PLCOpenEditor.py:339 ../PLCOpenEditor.py:381 +msgid "\"%s\" is not a valid folder!" +msgstr "\"%s\" не является директорией!" +#: ../dialogs/SFCStepNameDialog.py:50 ../dialogs/PouTransitionDialog.py:104 +#: ../dialogs/BlockPreviewDialog.py:203 ../dialogs/PouNameDialog.py:48 +#: ../dialogs/PouActionDialog.py:96 ../dialogs/PouDialog.py:118 +#: ../editors/DataTypeEditor.py:579 ../editors/CodeFileEditor.py:768 +#: ../controls/VariablePanel.py:749 ../IDEFrame.py:1591 +msgid "\"%s\" is not a valid identifier!" +msgstr "\"%s\" неверный идентификатор!" +msgid "\"%s\" is used by one or more POUs. Do you wish to continue?" +msgstr "\"%s\" используется более чем одним POU. Продолжить?" +#: ../dialogs/BlockPreviewDialog.py:211 ../dialogs/PouDialog.py:122 +#: ../editors/Viewer.py:260 ../editors/Viewer.py:315 ../editors/Viewer.py:345 +#: ../editors/Viewer.py:367 ../editors/TextViewer.py:270 +#: ../editors/TextViewer.py:299 ../editors/TextViewer.py:350 +#: ../editors/TextViewer.py:373 ../controls/VariablePanel.py:338 +msgid "\"%s\" pou already exists!" +msgstr "POU \"%s\" уже существует!" +#: ../dialogs/SFCStepNameDialog.py:58 +msgid "\"%s\" step already exists!" +msgstr "Шаг \"%s\" уже существует!" +#: ../editors/DataTypeEditor.py:550 +msgid "\"%s\" value already defined!" +msgstr "\"%s\" значение уже задано!" +#: ../dialogs/ArrayTypeDialog.py:97 ../editors/DataTypeEditor.py:745 +msgid "\"%s\" value isn't a valid array dimension!" +msgstr "\"%s\" не является корректной размерностью для массива! " +#: ../dialogs/ArrayTypeDialog.py:103 ../editors/DataTypeEditor.py:752 +"\"%s\" value isn't a valid array dimension!\n" +"Right value must be greater than left value." +msgstr "\"%s\" не является корректной размерностью массива! Правое значение должно быть больше левого." +#: ../PLCGenerator.py:1101 +msgid "\"{a1}\" function cancelled in \"{a2}\" POU: No input connected" +msgstr "Функция \"{a1}\" не используется в POU \"{a2}\": входы не подключены" +#: ../editors/Viewer.py:250 +msgid "\"{a1}\" is already used by \"{a2}\"!" +msgstr "\"{a1}\" уже используется \"{a2}\"!" +#: ../plcopen/plcopen.py:491 +msgid "\"{a1}\" resource already exists in \"{a2}\" configuration !!!" +msgstr "Ресурс \"{a1}\" уже существует в конфигурации \"{a2}\"!!!" +#: ../plcopen/plcopen.py:509 +msgid "\"{a1}\" resource doesn't exist in \"{a2}\" configuration !!!" +msgstr "Ресурс \"{a1}\" отсутствует в конфигурации \"{a2}\"!!!" +msgid "%(codefile_name)s" +msgstr "%(codefile_name)" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:578 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:569 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:56 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:570 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:55 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:571 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:53 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:54 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:572 +#: ../PLCControler.py:1531 +#: ../PLCControler.py:1514 +#: ../canfestival/SlaveEditor.py:69 ../canfestival/NetworkEditor.py:90 +#: ../plcopen/plcopen.py:1645 ../plcopen/plcopen.py:1652 +#: ../plcopen/plcopen.py:1664 ../plcopen/plcopen.py:1672 +#: ../plcopen/plcopen.py:1682 +msgid "%s body don't have instances!" +msgstr "Тело %s не содержит экземпляров!" +#: ../plcopen/plcopen.py:1700 ../plcopen/plcopen.py:1707 +#: ../plcopen/plcopen.py:1714 +msgid "%s body don't have text!" +msgstr "Тело %s не содержит никакой текст!" +msgstr "&Добавить элемент" +#: ../dialogs/AboutDialog.py:65 ../dialogs/AboutDialog.py:113 +#: ../dialogs/AboutDialog.py:150 +#: ../dialogs/AboutDialog.py:64 +#: ../PLCOpenEditor.py:125 +msgid "&Recent Projects" +msgstr "&Недавние проекты" +#: ../controls/SearchResultPanel.py:239 +msgid "'{a1}' - {a2} match in project" +msgstr "'{a1}'- {a2} совпадений в проекте" +#: ../controls/SearchResultPanel.py:241 +msgid "'{a1}' - {a2} matches in project" +msgstr "'{a1}' - {a2} совпадений в проекте" +#: ../connectors/PYRO/__init__.py:90 +msgid "'{a1}' is located at {a2}\n" +msgstr "'{a1}' находится {a2}\n" +#: ../controls/SearchResultPanel.py:291 +msgstr "(%d совпадений)" +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 ../PLCOpenEditor.py:399 +#: ../dialogs/PouTransitionDialog.py:101 ../dialogs/PouActionDialog.py:93 +#: ../dialogs/PouDialog.py:115 +#: ../PLCOpenEditor.py:394 +#: Extra TC6 documentation strings +msgid "0 - current time, 1 - load time from PDT" +msgstr "0 - текущее время, 1 - отклонение от PDT" +msgid "0 - manual , 1 - automatic" +msgstr "0 - ручной, 1 - автоматический" +msgid "0 - track X0, 1 - ramp to/track X1" +msgstr "0 - вход X0, 1 - нарастание до значения X1" +msgid "1 = integrate, 0 = hold" +msgstr "1 = интегрировать, 0 = остановка" +#: ../controls/LogViewer.py:279 +#: ../controls/LogViewer.py:280 +#: ../controls/LogViewer.py:281 +#: ../controls/LogViewer.py:282 +#: ../dialogs/PouDialog.py:124 ../IDEFrame.py:1614 ../IDEFrame.py:1660 +msgid "A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?" +msgstr "В POU присутствует элемент с именем \"%s\". Это может вызвать конфликт. Хотите продолжить?" +#: ../dialogs/SFCStepNameDialog.py:54 ../dialogs/PouTransitionDialog.py:108 +#: ../dialogs/PouNameDialog.py:52 ../dialogs/PouActionDialog.py:100 +#: ../controls/VariablePanel.py:753 ../IDEFrame.py:1628 ../IDEFrame.py:1641 +msgid "A POU named \"%s\" already exists!" +msgstr "POU с именем \"%s\" уже существует!" +#: ../ConfigTreeNode.py:424 +msgid "A child named \"{a1}\" already exists -> \"{a2}\"\n" +msgstr "Дочерний элемент с именем \"{a1}\" уже существует -> \"{a2}\"\n" +#: ../dialogs/BrowseLocationsDialog.py:216 +msgid "A location must be selected!" +msgstr "Необходимо выбрать размещение!" +#: ../dialogs/SFCStepNameDialog.py:56 ../controls/VariablePanel.py:755 +#: ../IDEFrame.py:1630 ../IDEFrame.py:1643 +msgid "A variable with \"%s\" as name already exists in this pou!" +msgstr "Переменная с именем \"%s\" уже существует в этом POU!" +#: ../editors/CodeFileEditor.py:774 +msgid "A variable with \"%s\" as name already exists!" +msgstr "Переменная с именем \"%s\" уже существует!" +#: ../dialogs/AboutDialog.py:40 ../PLCOpenEditor.py:158 ../Beremiz.py:381 +#: ../plcopen/iec_std.csv:22 +msgstr "Абсолютный номер" +#: ../dialogs/SFCStepDialog.py:72 ../dialogs/ActionBlockDialog.py:42 +#: ../editors/Viewer.py:555 ../editors/Viewer.py:2345 +#: ../dialogs/PouActionDialog.py:81 +#: ../dialogs/PouActionDialog.py:49 +#: ../plcopen/plcopen.py:1359 +msgid "Action with name %s doesn't exist!" +msgstr "Действие с именем %s не существует!" +#: ../PLCControler.py:96 +#: ../dialogs/ActionBlockDialog.py:133 +#: ../editors/Viewer.py:1100 +#: ../canfestival/SlaveEditor.py:80 ../canfestival/NetworkEditor.py:101 +#: ../editors/Viewer.py:588 ../Beremiz.py:1060 +#: ../IDEFrame.py:1890 ../IDEFrame.py:1925 +msgstr "Добавить действие" +msgid "Add C code accessing located variables synchronously" +msgstr "Добавить C-код с синхронным доступом к локальным переменным" +msgid "Add Configuration" +msgstr "Добавить конфигурацию" +msgstr "Добавить тип данных" +#: ../editors/Viewer.py:513 +msgid "Add Divergence Branch" +msgstr "Добавить ветвление" +#: ../dialogs/DiscoveryDialog.py:116 +msgstr "Добавить IP адрес" +msgid "Add Python code executed asynchronously" +msgstr "Добавить асинхронно вызываемый код на Python" +#: ../IDEFrame.py:1901 ../IDEFrame.py:1951 +msgstr "Добавить ресурс" +#: ../IDEFrame.py:1879 ../IDEFrame.py:1922 +msgstr "Добавить переход" +#: ../editors/Viewer.py:500 +msgid "Add Wire Segment" +msgstr "Добавить провод" +#: ../editors/SFCViewer.py:433 +msgid "Add a new initial step" +msgstr "Добавить новый исходный шаг" +#: ../editors/Viewer.py:2706 ../editors/SFCViewer.py:770 +msgstr "Добавить новый безусловный переход" +#: ../editors/SFCViewer.py:455 +msgstr "Добавить новый шаг" +msgid "Add a simple WxGlade based GUI." +msgstr "Добавить простой GUI на WxGlade " +#: ../dialogs/ActionBlockDialog.py:137 +msgstr "Добавить действие" +#: ../editors/DataTypeEditor.py:352 +msgstr "Добавить элемент" +#: ../editors/ResourceEditor.py:268 +msgstr "Добавить экземпляр" +#: ../canfestival/NetworkEditor.py:103 +#: ../editors/ResourceEditor.py:239 +msgstr "Добавить задачу" +#: ../editors/CodeFileEditor.py:658 ../controls/VariablePanel.py:450 +msgstr "Добавить переменную" +#: ../plcopen/iec_std.csv:33 +#: ../plcopen/definitions.py:47 +msgid "Additional function blocks" +msgstr "Дополнительные функциональные блоки" +#: ../editors/Viewer.py:571 +msgid "Adjust Block Size" +msgstr "Скорректировать размер элемента" +#: ../editors/Viewer.py:1637 +#: ../dialogs/BrowseLocationsDialog.py:39 +#: ../dialogs/BrowseLocationsDialog.py:47 +#: ../dialogs/BrowseLocationsDialog.py:140 +#: ../dialogs/BrowseLocationsDialog.py:143 ../controls/LogViewer.py:298 +#: ../controls/VariablePanel.py:70 +#: ../editors/FileManagementPanel.py:35 +msgid "All files (*.*)|*.*|CSV files (*.csv)|*.csv" +msgstr "Все файлы (*.*)|*.*|CSV files (*.csv)|*.csv" +#: ../ProjectController.py:1623 +msgid "Already connected. Please disconnect\n" +msgstr "Уже подключен. Пожалуйста, отключитесь сначала.\n" +#: ../editors/DataTypeEditor.py:594 +msgid "An element named \"%s\" already exists in this structure!" +msgstr "Поле с именем \"%s\" уже существует в данной структуре!" +#: ../dialogs/ConnectionDialog.py:96 +msgid "Apply name modification to all continuations with the same name" +msgstr "Переименовать все цепи с тем же самым именем" +#: ../plcopen/iec_std.csv:31 +#: ../plcopen/iec_std.csv:30 +#: ../plcopen/iec_std.csv:32 +#: ../plcopen/iec_std.csv:33 +#: ../editors/DataTypeEditor.py:54 ../editors/DataTypeEditor.py:635 +#: ../controls/VariablePanel.py:829 +#: ../plcopen/iec_std.csv:39 +#: ../dialogs/FBDVariableDialog.py:217 +msgid "At least a variable or an expression must be selected!" +msgstr "Переменная или выражение должно быть выбрано!" +#: ../controls/ProjectPropertiesPanel.py:99 +#: ../controls/ProjectPropertiesPanel.py:96 +msgid "Author Name (optional):" +msgstr "Имя автора (опционально):" +msgid "BUSY = 1 during ramping period" +msgstr "BOSY = 1 во время " +#: ../dialogs/FindInPouDialog.py:79 +#: ../util/Zeroconf.py:599 +msgid "Bad domain name (circular) at " +msgstr "Неправильное доменное имя (ответ) в " +#: ../util/Zeroconf.py:602 +msgid "Bad domain name at " +msgstr "Неправильное доменное имя в" +#: ../canfestival/config_utils.py:342 ../canfestival/config_utils.py:630 +msgid "Bad location size : %s" +msgstr "Неправильный размер: %s" +#: ../dialogs/ArrayTypeDialog.py:55 ../editors/DataTypeEditor.py:175 +#: ../editors/DataTypeEditor.py:205 ../editors/DataTypeEditor.py:297 +#: ../editors/DataTypeEditor.py:625 ../controls/VariablePanel.py:787 +msgstr "Базовые параметры" +msgstr "Настройки Beremiz " +#: ../plcopen/iec_std.csv:70 +msgid "Binary selection (1 of 2)" +msgstr "Бинарный выбор (1 или 2)" +#: ../plcopen/iec_std.csv:62 +msgstr "Сдвиговые операции" +#: ../plcopen/iec_std.csv:66 +msgstr "Битовые операции" +#: ../plcopen/iec_std.csv:66 +#: ../plcopen/iec_std.csv:67 +#: ../plcopen/iec_std.csv:68 +msgstr "Исключающее ИЛИ" +#: ../plcopen/iec_std.csv:69 +msgid "Bitwise inverting" +#: ../editors/Viewer.py:525 ../editors/Viewer.py:2358 +#: ../dialogs/FBDBlockDialog.py:59 +msgid "Block Properties" +#: ../editors/TextViewer.py:262 +#: ../editors/Viewer.py:491 +#: ../ProjectController.py:1301 +#: ../dialogs/BrowseValuesLibraryDialog.py:37 +msgid "Browse %s values library" +msgstr "Browse %s values library" +#: ../dialogs/BrowseLocationsDialog.py:65 +msgid "Browse Locations" +msgstr "Просмотр директорий" +#: ../ProjectController.py:1769 +#: ../ProjectController.py:1235 +msgid "Build directory already clean\n" +msgstr "Директория сборки уже пуста\n" +#: ../ProjectController.py:1770 +msgid "Build project into build folder" +msgstr "Сборка проекта в директории сборки" +#: ../ProjectController.py:1018 +msgid "C Build crashed !\n" +msgstr "Крэш во время сборки C-кода!\n" +#: ../ProjectController.py:1015 +msgid "C Build failed.\n" +msgstr "Ошибка сборки C-кода.\n" +#: ../c_ext/CFileEditor.py:63 +#: ../ProjectController.py:1093 +msgid "C code generated successfully.\n" +msgstr "C-код успешно сгенерирован.\n" +#: ../targets/toolchain_makefile.py:122 +msgid "C compilation failed.\n" +msgstr "Ошибка компиляции.\n" +#: ../targets/toolchain_gcc.py:156 +msgid "C compilation of %s failed.\n" +msgstr "Ошибка компиляции %s.\n" +#: ../dialogs/AboutDialog.py:63 +#: ../canfestival/NetworkEditor.py:52 +#: ../canfestival/SlaveEditor.py:44 +msgstr "CANOpen ведущий" +msgstr "Поддержка CANOpen" +#: ../plcopen/plcopen.py:1584 ../plcopen/plcopen.py:1598 +#: ../plcopen/plcopen.py:1622 ../plcopen/plcopen.py:1638 +msgid "Can only generate execution order on FBD networks!" +msgstr "Можно сгенерировать порядок исполнения только для FBD!" +#: ../controls/VariablePanel.py:267 +msgid "Can only give a location to local or global variables" +msgstr "Можно задать размещение только локальным или глобальным переменны" +#: ../PLCOpenEditor.py:334 +msgid "Can't generate program to file %s!" +msgstr "Нельзя сгенерировать программу в файл %s!" +#: ../controls/VariablePanel.py:265 +msgid "Can't give a location to a function block instance" +msgstr "Нельзя задать размещение для экземпляра функционального блока" +#: ../PLCOpenEditor.py:379 +msgid "Can't save project to file %s!" +msgstr "Нельзя сохранить проект в файл %s!" +#: ../controls/VariablePanel.py:313 +msgid "Can't set an initial value to a function block instance" +msgstr "Нельзя задать исходное значение экземпляру функционального блока" +msgid "CanFestivalInstance" +msgid "CanFestivalSlaveNode" +#: ../ConfigTreeNode.py:529 +msgid "Cannot create child {a1} of type {a2} " +msgstr "Нельзя создать дочерний элемент {a1} типа {a2}" +#: ../ConfigTreeNode.py:454 +msgid "Cannot find lower free IEC channel than %d\n" +msgstr "Не удалось найти свободный МЭК-канал с номером меньше чем %d\n" +#: ../connectors/PYRO/__init__.py:131 +msgid "Cannot get PLC status - connection failed.\n" +msgstr "Невозможно получить состояние ПЛК - ошибка подключения.\n" +#: ../ProjectController.py:881 +msgid "Cannot open/parse VARIABLES.csv!\n" +msgstr "Не удалось открыть/прочитать VARIABLES.csv\n" +#: ../canfestival/config_utils.py:374 +msgid "Cannot set bit offset for non bool '{a1}' variable (ID:{a2},Idx:{a3},sIdx:{a4}))" +msgstr "Невозможно установить битовое смещение для небулевой переменной '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))" +#: ../dialogs/SearchInProjectDialog.py:59 ../dialogs/FindInPouDialog.py:88 +msgstr "Регистрозависимый" +#: ../editors/Viewer.py:486 +#: ../Beremiz_service.py:266 +msgid "Change IP of interface to bind" +msgstr "Сменить IP-адрес интерфейса для привязки сокета" +#: ../Beremiz_service.py:265 +msgid "Change POU Type To" +msgstr "Сменить тип POU на" +#: ../Beremiz_service.py:267 +msgid "Change Port Number" +msgstr "Сменить номер порта" +#: ../Beremiz_service.py:268 +msgid "Change working directory" +msgstr "Сменить рабочую директорию" +#: ../plcopen/iec_std.csv:81 +msgid "Character string" +msgstr "Строковые операции" +#: ../svgui/svgui.py:125 +msgid "Choose a SVG file" +msgstr "Выберите SVG-файл" +#: ../ProjectController.py:451 +msgid "Choose a directory to save project" +msgstr "Выберите директорию, чтобы сохранить проект" +#: ../canfestival/canfestival.py:160 ../PLCOpenEditor.py:292 +#: ../PLCOpenEditor.py:324 ../PLCOpenEditor.py:373 +#: ../Beremiz.py:931 ../Beremiz.py:966 +msgid "Choose a project" +msgstr "Выберите проект" +#: ../dialogs/BrowseValuesLibraryDialog.py:42 +msgid "Choose a value for %s:" +msgstr "Выберите значение для %s:" +#: ../Beremiz_service.py:323 +msgid "Choose a working directory " +msgstr "Выберите рабочую директорию" +#: ../ProjectController.py:358 +msgid "Chosen folder doesn't contain a program. It's not a valid project!" +msgstr "Выбранная директория не содержит программы. Это некорректный проект!" +#: ../ProjectController.py:325 +msgid "Chosen folder isn't empty. You can't use it for a new project!" +msgstr "Выбранная директория не пуста и не может использоваться для нового проекта!" +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 +#: ../controls/VariablePanel.py:441 +#: ../dialogs/FBDVariableDialog.py:69 +#: ../ProjectController.py:1773 +#: ../controls/LogViewer.py:318 +msgid "Clean log messages" +#: ../ProjectController.py:1775 +msgid "Clean project build folder" +msgstr "Очистить директорию сборки проекта" +#: ../ProjectController.py:1232 +msgid "Cleaning the build directory\n" +msgstr "Очистка директории сборки\n" +msgstr "Очистить ошибки" +#: ../editors/Viewer.py:582 +msgid "Clear Execution Order" +msgstr "Очистить порядок исполнения" +#: ../dialogs/SearchInProjectDialog.py:105 ../dialogs/FindInPouDialog.py:111 +#: ../PLCOpenEditor.py:199 ../Beremiz.py:693 +msgid "Close Application" +msgstr "Закрыть приложение" +#: ../PLCOpenEditor.py:108 ../Beremiz.py:333 ../Beremiz.py:637 +#: ../PLCOpenEditor.py:106 ../Beremiz.py:331 +msgstr "Закрыть вкладку" +#: ../editors/Viewer.py:541 ../editors/Viewer.py:2366 +#: ../editors/Viewer.py:561 ../editors/LDViewer.py:506 +#: ../dialogs/ProjectDialog.py:57 +#: ../controls/ProjectPropertiesPanel.py:94 +msgid "Company Name (required):" +msgstr "Компания (обязательно):" +#: ../controls/ProjectPropertiesPanel.py:95 +msgid "Company URL (optional):" +msgstr "Сайт компании (опционально):" +#: ../plcopen/iec_std.csv:75 +#: ../ProjectController.py:672 +msgid "Compiling IEC Program into C code...\n" +msgstr "Компиляция МЭК-программы в C-код...\n" +#: ../plcopen/iec_std.csv:85 +#: ../editors/ConfTreeNodeEditor.py:229 +#: ../editors/ProjectNodeEditor.py:36 +msgid "Config variables" +msgstr "Конфигурационные переменные" +#: ../dialogs/SearchInProjectDialog.py:39 +#: ../PLCControler.py:97 +#: ../editors/Viewer.py:307 ../editors/Viewer.py:337 ../editors/Viewer.py:359 +#: ../editors/TextViewer.py:291 ../editors/TextViewer.py:342 +#: ../editors/TextViewer.py:365 ../controls/VariablePanel.py:328 +msgid "Confirm or change variable name" +msgstr "Подтвердить или поменять имя переменной" +#: ../ProjectController.py:1788 +#: ../ProjectController.py:1789 +msgid "Connect to the target PLC" +msgstr "Подключиться к целевому ПЛК" +#: ../ProjectController.py:1292 +msgid "Connected to URI: %s" +msgstr "Подключен к URI: %s" +#: ../dialogs/SFCTransitionDialog.py:76 ../editors/Viewer.py:527 +#: ../editors/Viewer.py:2359 +#: ../dialogs/ConnectionDialog.py:52 +msgid "Connection Properties" +msgstr "Свойства подключение" +#: ../ProjectController.py:1647 +msgid "Connection canceled!\n" +msgstr "Подключение отменено!\n" +#: ../ProjectController.py:1672 +msgid "Connection failed to %s!\n" +msgstr "Неудачное подключение к %s!\n" +#: ../connectors/PYRO/__init__.py:115 ../connectors/WAMP/__init__.py:111 +msgid "Connection lost!\n" +msgstr "Подключение прервано!\n" +#: ../connectors/PYRO/__init__.py:102 +msgid "Connection to '%s' failed.\n" +msgstr "Неудачное подключение к %s!\n" +#: ../dialogs/ConnectionDialog.py:64 ../editors/Viewer.py:1594 +#: ../dialogs/SFCStepDialog.py:65 +#: ../controls/VariablePanel.py:60 +#: ../editors/Viewer.py:537 ../editors/Viewer.py:2362 +#: ../controls/ProjectPropertiesPanel.py:197 +msgid "Content Description (optional):" +msgstr "Описание содержимого (опционально):" +#: ../dialogs/ConnectionDialog.py:65 ../editors/Viewer.py:1595 +#: ../plcopen/iec_std.csv:18 +msgid "Conversion from BCD" +msgstr "Преобразование из BCD" +#: ../plcopen/iec_std.csv:19 +msgid "Conversion to BCD" +msgstr "Преобразование в BCD" +#: ../plcopen/iec_std.csv:21 +msgid "Conversion to date" +msgstr "Преобразование в дату" +#: ../plcopen/iec_std.csv:20 +msgid "Conversion to time-of-day" +msgstr "Преобразование во время суток" +#: ../editors/Viewer.py:597 ../controls/LogViewer.py:693 ../IDEFrame.py:370 +#: ../editors/FileManagementPanel.py:65 +msgid "Copy file from left folder to right" +msgstr "Скопировать файл с левой директории в правую" +#: ../editors/FileManagementPanel.py:64 +msgid "Copy file from right folder to left" +msgstr "Скопировать файл с правой директории в левую" +#: ../plcopen/iec_std.csv:28 +#: ../ConfigTreeNode.py:656 +"Could not add child \"{a1}\", type {a2} :\n" +"Невозможно добавить дочерний элемент \"{a1}\", тип {a2}:\n" +#: ../py_ext/PythonFileCTNMixin.py:77 +msgid "Couldn't import old %s file." +msgstr "Невозможно импортировать старый файл %s." +#: ../ConfigTreeNode.py:626 +"Couldn't load confnode base parameters {a1} :\n" +"Невозможно загрузить базовые параметры confnode {a1}:\n" +#: ../ConfigTreeNode.py:643 ../CodeFileTreeNode.py:124 +"Couldn't load confnode parameters {a1} :\n" +"Невозможно загрузить параметры confnode {a1}:\n" +#: ../PLCControler.py:946 +msgid "Couldn't paste non-POU object." +msgstr "Невозможно вставить не-POU." +#: ../ProjectController.py:1589 +msgid "Couldn't start PLC !\n" +msgstr "Невозможно запустить ПЛК!\n" +#: ../ProjectController.py:1597 +msgid "Couldn't stop PLC !\n" +msgstr "Невозможно остановить ПЛК!\n" +#: ../ProjectController.py:1561 +msgid "Couldn't stop debugger.\n" +msgstr "Невозможно остановить отладчик.\n" +#: ../dialogs/PouDialog.py:45 +msgid "Create a new POU" +msgstr "Создать новый POU" +#: ../dialogs/PouActionDialog.py:38 +msgid "Create a new action" +msgstr "Создать новое действие" +msgid "Create a new action block" +msgstr "Создать новый блок действие" +#: ../IDEFrame.py:108 ../IDEFrame.py:138 ../IDEFrame.py:171 +msgid "Create a new block" +msgstr "Создать новый блок" +msgid "Create a new branch" +msgstr "Создать новое ветвление" +msgid "Create a new coil" +msgstr "Создать новую катушку" +#: ../IDEFrame.py:102 ../IDEFrame.py:117 ../IDEFrame.py:147 +msgid "Create a new comment" +msgstr "Создать новый комментарий" +#: ../IDEFrame.py:111 ../IDEFrame.py:141 ../IDEFrame.py:174 +msgid "Create a new connection" +msgstr "Создать новое подключение" +#: ../IDEFrame.py:129 ../IDEFrame.py:180 +msgid "Create a new contact" +msgstr "Создать новый контакт" +msgid "Create a new divergence" +msgstr "Создать новое ветвление" +#: ../dialogs/SFCDivergenceDialog.py:53 +msgid "Create a new divergence or convergence" +msgstr "Создать новое ветвление или объединение" +msgid "Create a new initial step" +msgstr "Создать исходный шаг" +msgid "Create a new jump" +msgstr "Создать новый безусловный переход" +#: ../IDEFrame.py:120 ../IDEFrame.py:177 +msgid "Create a new power rail" +msgstr "Создать новую линию питания" +msgid "Create a new rung" +msgstr "Создать новую цепь" +msgid "Create a new step" +msgstr "Создать новый шаг" +#: ../dialogs/PouTransitionDialog.py:47 ../IDEFrame.py:156 +msgid "Create a new transition" +msgstr "Создать новый переход" +#: ../IDEFrame.py:105 ../IDEFrame.py:135 ../IDEFrame.py:168 +msgid "Create a new variable" +msgstr "Создать новую переменную" +#: ../dialogs/AboutDialog.py:105 +#: ../Beremiz_service.py:432 +msgid "Current working directory :" +msgstr "Текущая рабочая директория :" +#: ../editors/Viewer.py:596 ../IDEFrame.py:368 ../IDEFrame.py:424 +#: ../editors/ResourceEditor.py:72 +#: ../plcopen/iec_std.csv:42 ../plcopen/iec_std.csv:44 +#: ../plcopen/iec_std.csv:46 ../plcopen/iec_std.csv:50 +#: ../plcopen/iec_std.csv:52 ../plcopen/iec_std.csv:54 +#: ../plcopen/iec_std.csv:56 ../plcopen/iec_std.csv:58 +#: ../plcopen/iec_std.csv:60 +#: ../canfestival/SlaveEditor.py:76 ../canfestival/NetworkEditor.py:97 +#: ../canfestival/SlaveEditor.py:77 ../canfestival/NetworkEditor.py:98 +#: ../dialogs/SearchInProjectDialog.py:35 +#: ../PLCControler.py:96 +#: ../plcopen/iec_std.csv:16 +msgid "Data type conversion" +msgstr "Преобразование типов данных" +#: ../plcopen/iec_std.csv:44 ../plcopen/iec_std.csv:45 +#: ../plcopen/iec_std.csv:56 ../plcopen/iec_std.csv:57 +#: ../plcopen/iec_std.csv:58 ../plcopen/iec_std.csv:59 +msgid "Date and time subtraction" +msgstr "Вычитание даты и времени" +#: ../plcopen/iec_std.csv:50 ../plcopen/iec_std.csv:51 +msgid "Date subtraction" +msgid "Datetime, current or relative to PDT" +msgstr "Текущие дата и время, абсолютные или относительные от PDT" +#: ../dialogs/DurationEditorDialog.py:43 +#: ../ProjectController.py:1694 +msgid "Debug does not match PLC - stop/transfert/start to re-enable\n" +msgstr "Отлаживаемая программа не соответствует программе в ПЛК - остановите/загрузите/запустите, чтобы разрешить отладку\n" +#: ../controls/PouInstanceVariablesPanel.py:134 +msgstr "Отладка экземпляра" +#: ../editors/Viewer.py:1117 ../editors/Viewer.py:3653 +#: ../ProjectController.py:1350 +msgid "Debug: Unknown variable '%s'\n" +msgstr "Отладка: неизвестная переменная '%s'\n" +#: ../ProjectController.py:1348 +msgid "Debug: Unsupported type to debug '%s'\n" +msgstr "Отладка: неподдерживамый отладкой тип '%s'\n" +#: ../ProjectController.py:1530 +msgid "Debugger disabled\n" +msgstr "Отладчик запрещен\n" +#: ../ProjectController.py:1691 +msgid "Debugger ready\n" +msgstr "Отладчик готов\n" +#: ../ProjectController.py:1563 +msgid "Debugger stopped.\n" +msgstr "Отладчик остановлен.\n" +#: ../editors/Viewer.py:572 ../Beremiz.py:1064 ../IDEFrame.py:1959 +#: ../editors/Viewer.py:514 +msgid "Delete Divergence Branch" +#: ../editors/FileManagementPanel.py:153 +#: ../editors/Viewer.py:501 +msgid "Delete Wire Segment" +msgstr "Удалить сегмент цепи" +#: ../controls/CustomEditableListBox.py:41 +#: ../plcopen/iec_std.csv:88 +msgid "Deletion (within)" +msgstr "Удаление подстроки" +#: ../editors/DataTypeEditor.py:153 +msgid "Derivation Type:" +msgstr "Механизм создания типа:" +msgid "Derivative time constant" +msgstr "Постоянная времени дифференцирования" +#: ../controls/VariablePanel.py:432 +msgid "Differentiated output" +msgstr "Дифференцированный выход" +#: ../dialogs/ArrayTypeDialog.py:61 ../editors/DataTypeEditor.py:321 +#: ../dialogs/FindInPouDialog.py:68 +#: ../dialogs/BrowseLocationsDialog.py:90 +#: ../editors/DataTypeEditor.py:54 +msgid "Disable_Extensions" +msgstr "Запретить расширения" +#: ../ProjectController.py:1797 +#: ../ProjectController.py:1799 +msgid "Disconnect from PLC" +msgstr "Отключиться от ПЛК" +#: ../ProjectController.py:1302 +#: ../editors/Viewer.py:556 ../editors/Viewer.py:2354 +#: ../plcopen/iec_std.csv:36 +#: ../editors/FileManagementPanel.py:152 +msgid "Do you really want to delete the file '%s'?" +msgstr "Вы действительно хотите удалить этот файл '%s'?" +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 +#: ../PLCOpenEditor.py:328 +#: ../dialogs/ActionBlockDialog.py:38 +#: ../canfestival/canfestival.py:163 +msgid "EDS files (*.eds)|*.eds|All files|*.*" +msgstr "Файлы EDS (*.eds)|*.eds|All files|*.*" +#: ../editors/Viewer.py:570 +msgstr "Редактировать блок" +#: ../dialogs/LDElementDialog.py:56 +msgid "Edit Coil Values" +msgstr "Редактировать значение катушки" +#: ../dialogs/LDElementDialog.py:54 +msgid "Edit Contact Values" +msgstr "Редактировать значение контакта" +#: ../dialogs/DurationEditorDialog.py:59 +msgstr "Редактировать длительность" +#: ../dialogs/SFCStepDialog.py:50 +msgstr "Редактировать шаг" +#: ../wxglade_hmi/wxglade_hmi.py:36 +msgid "Edit a WxWidgets GUI with WXGlade" +msgstr "Редактировать WxWidgets GUI с помощью WXGlade" +#: ../dialogs/ActionBlockDialog.py:121 +msgid "Edit action block properties" +msgstr "Редактировать свойства блока действия" +#: ../dialogs/ArrayTypeDialog.py:45 +msgid "Edit array type properties" +msgstr "Редактировать свойства массива" +#: ../editors/Viewer.py:2575 ../editors/Viewer.py:3004 +msgstr "Редактировать комментарий" +#: ../editors/FileManagementPanel.py:66 +msgstr "Редактировать файл" +#: ../controls/CustomEditableListBox.py:39 +msgstr "Редактировать элемент" +#: ../editors/Viewer.py:2963 +msgid "Edit jump target" +msgstr "Редактирование безусловного перехода" +#: ../ProjectController.py:1811 +msgid "Edit raw IEC code added to code generated by PLCGenerator" +msgstr "Редактировать МЭК-код добавленный к коду сгенерированному PLCGenerator" +#: ../editors/SFCViewer.py:799 +msgstr "Редактировать имя шага" +#: ../dialogs/SFCTransitionDialog.py:51 +msgstr "Редактировать переход" +msgstr "Редактор панели инструментов" +#: ../ProjectController.py:1195 +msgid "Editor selection" +msgstr "Редактор выделения" +msgid "Elapsed time of ramp" +msgstr "Прошедшее время нарастания" +#: ../editors/DataTypeEditor.py:348 +#: ../ProjectController.py:1300 +msgid "Enable Undo/Redo" +msgstr "Разрешить отмену и повтор операций" +#: ../Beremiz_service.py:331 +#: ../Beremiz_service.py:316 +msgid "Enter a port number " +msgstr "Введите номер порта" +#: ../Beremiz_service.py:307 +msgid "Enter the IP of the interface to bind" +msgstr "Введите IP-адрес используемого интерфейса" +#: ../editors/DataTypeEditor.py:54 +#: ../plcopen/iec_std.csv:77 +#: ../dialogs/ForceVariableDialog.py:179 +#: ../dialogs/SearchInProjectDialog.py:168 ../dialogs/SFCStepNameDialog.py:60 +#: ../dialogs/DurationEditorDialog.py:121 +#: ../dialogs/DurationEditorDialog.py:163 ../dialogs/PouTransitionDialog.py:112 +#: ../dialogs/BlockPreviewDialog.py:236 ../dialogs/ProjectDialog.py:71 +#: ../dialogs/ArrayTypeDialog.py:97 ../dialogs/ArrayTypeDialog.py:103 +#: ../dialogs/PouNameDialog.py:54 ../dialogs/BrowseLocationsDialog.py:216 +#: ../dialogs/BrowseValuesLibraryDialog.py:83 ../dialogs/PouActionDialog.py:104 +#: ../dialogs/PouDialog.py:134 ../PLCOpenEditor.py:335 ../PLCOpenEditor.py:340 +#: ../PLCOpenEditor.py:420 ../PLCOpenEditor.py:430 ../editors/Viewer.py:423 +#: ../editors/LDViewer.py:666 ../editors/LDViewer.py:882 +#: ../editors/LDViewer.py:886 ../editors/DataTypeEditor.py:550 +#: ../editors/DataTypeEditor.py:555 ../editors/DataTypeEditor.py:579 +#: ../editors/DataTypeEditor.py:584 ../editors/DataTypeEditor.py:594 +#: ../editors/DataTypeEditor.py:745 ../editors/DataTypeEditor.py:752 +#: ../editors/TextViewer.py:389 ../editors/CodeFileEditor.py:783 +#: ../ProjectController.py:293 ../ProjectController.py:421 +#: ../ProjectController.py:428 ../controls/FolderTree.py:217 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:166 +#: ../controls/DebugVariablePanel/DebugVariableTextViewer.py:137 +#: ../controls/DebugVariablePanel/DebugVariableGraphicViewer.py:231 +#: ../controls/VariablePanel.py:402 ../controls/VariablePanel.py:772 +#: ../Beremiz.py:1203 ../IDEFrame.py:1003 ../IDEFrame.py:1614 +#: ../IDEFrame.py:1655 ../IDEFrame.py:1660 ../IDEFrame.py:1674 +#: ../IDEFrame.py:1679 ../Beremiz_service.py:211 +#: ../ProjectController.py:727 +msgid "Error : At least one configuration and one resource must be declared in PLC !\n" +msgstr "Ошибка: Как минимум одна конфигурация и один ресурс должны быть задекларированы в ПЛК!\n" +#: ../ProjectController.py:719 +msgid "Error : IEC to C compiler returned %d\n" +msgstr "Ошибка: компилятор МЭК в C вернул код ошибки %d\n" +#: ../ProjectController.py:621 +"Error in ST/IL/SFC code generator :\n" +msgstr "Ошибка в ST/IL/SFC кодогенераторе: %s\n" +#: ../ConfigTreeNode.py:216 +msgid "Error while saving \"%s\"\n" +msgstr "Ошибка во время сохранения \"%s\"\n" +#: ../canfestival/canfestival.py:168 +msgid "Error: Export slave failed\n" +msgstr "Ошибка: неудачный экспорт ведомого\n" +#: ../canfestival/canfestival.py:369 +msgid "Error: No Master generated\n" +msgstr "Ошибка: мастер не сгенерирован\n" +#: ../canfestival/canfestival.py:364 +msgid "Error: No PLC built\n" +msgstr "Ошибка: ПЛК не собран\n" +#: ../ProjectController.py:1666 +msgid "Exception while connecting %s!\n" +msgstr "Исключение во время подключения %s!\n" +#: ../dialogs/FBDBlockDialog.py:117 +msgid "Execution Control:" +msgstr "Управление исполнением:" +#: ../dialogs/FBDVariableDialog.py:79 ../dialogs/FBDBlockDialog.py:105 +msgid "Execution Order:" +msgstr "Порядок исполнения:" +msgid "Experimental web based HMI" +msgstr "Экспериментальный WEB-HMI" +#: ../plcopen/iec_std.csv:38 +#: ../plcopen/iec_std.csv:26 +msgstr "Взятие экспоненты" +#: ../canfestival/canfestival.py:174 +msgid "Export CanOpen slave to EDS file" +msgstr "Экспортировать CanOpen ведомое устройство в EDS файл" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:243 +msgid "Export graph values to clipboard" +msgstr "Экспортировать график значений в буфер обмена" +#: ../canfestival/canfestival.py:173 +msgstr "Экспортировать ведомое устройство" +#: ../dialogs/FBDVariableDialog.py:89 +#: ../controls/VariablePanel.py:72 +#: ../ProjectController.py:740 +msgid "Extracting Located Variables...\n" +msgstr "Экспорт локальных переменных...\n" +msgid "FB for derivative term" +msgstr "ФБ дифференцирования" +msgid "FB for integral term" +msgstr "ФД интегрирования" +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 +#: ../ProjectController.py:1729 +msgid "Failed : Must build before transfer.\n" +msgstr "Ошибка: необходима сборка перед передачей.\n" +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:462 +msgstr "Спадающий фронт" +#: ../ProjectController.py:1008 +msgid "Fatal : cannot get builder.\n" +msgstr "Ошибка: невозможно получить сборщик.\n" +#: ../dialogs/DurationEditorDialog.py:160 +msgid "Field %s hasn't a valid value!" +msgstr "Поле %s имеет неверное значение!" +#: ../dialogs/DurationEditorDialog.py:162 +msgid "Fields %s haven't a valid value!" +msgstr "Поля %s имеют неверные значения!" +#: ../controls/FolderTree.py:216 +msgid "File '%s' already exists!" +msgstr "Файл '%s' уже существует!" +#: ../dialogs/SearchInProjectDialog.py:100 ../dialogs/FindInPouDialog.py:36 +#: ../dialogs/FindInPouDialog.py:106 ../IDEFrame.py:375 +msgstr "Поиск следующего" +msgstr "Поиск предыдущего" +#: ../plcopen/iec_std.csv:90 +#: ../dialogs/FindInPouDialog.py:57 +#: ../connectors/PYRO/__init__.py:163 +msgid "Force runtime reload\n" +msgstr "Принудительный перезапуск системы исполнения\n" +#: ../editors/Viewer.py:1553 +msgstr "Фиксировать значение" +#: ../dialogs/ForceVariableDialog.py:162 +msgid "Forcing Variable Value" +msgstr "Форсировать значение переменной" +#: ../dialogs/SFCTransitionDialog.py:179 ../dialogs/PouTransitionDialog.py:102 +#: ../dialogs/ProjectDialog.py:70 ../dialogs/PouActionDialog.py:94 +#: ../dialogs/PouDialog.py:116 +msgid "Form isn't complete. %s must be filled!" +msgstr "Форма заполнена неполностью. %s должен быть заполнен!" +#: ../dialogs/SFCStepDialog.py:144 ../dialogs/FBDBlockDialog.py:232 +#: ../dialogs/ConnectionDialog.py:160 +msgid "Form isn't complete. Name must be filled!" +msgstr "Форма заполнена неполностью. Имя должно быть заполнено!" +#: ../dialogs/FBDBlockDialog.py:228 +msgid "Form isn't complete. Valid block type must be selected!" +msgstr "Форма заполнена неполностью. Должен быть выбран корректный тип блока!" +#: ../dialogs/FindInPouDialog.py:74 +#: ../dialogs/SearchInProjectDialog.py:36 ../IDEFrame.py:1746 +msgstr "Функциональный &блок" +#: ../dialogs/SearchInProjectDialog.py:37 ../IDEFrame.py:1745 +msgstr "Функциональный блок" +#: ../controls/VariablePanel.py:825 +msgid "Function Block Types" +msgstr "Типы функциональных блоков" +#: ../PLCControler.py:95 +msgstr "Функциональные блоки" +#: ../editors/Viewer.py:248 +msgid "Function Blocks can't be used in Functions!" +msgstr "Функциональные блоки не могут использоваться в функциях!" +#: ../PLCControler.py:2337 +msgid "FunctionBlock \"%s\" can't be pasted in a Function!!!" +msgstr "Функциональный блок \"%s\" не может быть вставлен в функцию!!!" +#: ../PLCControler.py:95 +#: ../PLCOpenEditor.py:115 +msgid "Generate Program" +msgstr "Сгенерировать программу" +#: ../ProjectController.py:612 +msgid "Generating SoftPLC IEC-61131 ST/IL/SFC code...\n" +msgstr "Генерация МЭК-61131 ST/IL/SFC кода ПЛК...\n" +#: ../controls/VariablePanel.py:73 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:242 +msgid "Go to current value" +msgstr "Перейти к текущему значению" +#: ../controls/ProjectPropertiesPanel.py:173 +#: ../plcopen/iec_std.csv:75 +#: ../plcopen/iec_std.csv:76 +msgid "Greater than or equal to" +msgstr "Больше или равно" +#: ../controls/ProjectPropertiesPanel.py:134 +msgid "Grid Resolution:" +#: ../runtime/NevowServer.py:181 +msgid "HTTP interface port :" +msgstr "Порт HTTP-интерфейса :" +#: ../controls/ProjectPropertiesPanel.py:120 +#: ../editors/FileManagementPanel.py:85 +msgstr "Домашняя директория:" +#: ../controls/ProjectPropertiesPanel.py:150 +msgstr "Горизонтальный:" +#: ../dialogs/DurationEditorDialog.py:44 +#: ../dialogs/PouActionDialog.py:31 ../dialogs/PouDialog.py:36 +#: ../dialogs/DiscoveryDialog.py:94 +#: ../Beremiz_service.py:308 ../Beremiz_service.py:309 +msgid "IP is not valid!" +msgstr "Неверный IP-адрес" +#: ../svgui/svgui.py:42 ../svgui/svgui.py:43 +#: ../dialogs/FBDVariableDialog.py:38 ../editors/Viewer.py:1580 +#: ../controls/VariablePanel.py:71 +#: ../editors/Viewer.py:1100 +#: ../controls/VariablePanel.py:276 +msgid "Incompatible data types between \"{a1}\" and \"{a2}\"" +msgstr "\"{a1}\" и \"{a2}\" имеют несовместимые типы данных" +#: ../controls/VariablePanel.py:282 +msgid "Incompatible size of data between \"%s\" and \"BOOL\"" +msgstr "Несовместимый размер данных \"%s\" с типом \"BOOL\"" +#: ../controls/VariablePanel.py:286 +msgid "Incompatible size of data between \"{a1}\" and \"{a2}\"" +msgstr "\"{a1}\" и \"{a2}\" имеют несовместимый размер данных" +#: ../dialogs/ActionBlockDialog.py:38 +#: ../editors/Viewer.py:552 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 +msgstr "Исходное значение" +#: ../editors/DataTypeEditor.py:185 ../editors/DataTypeEditor.py:216 +#: ../editors/DataTypeEditor.py:272 ../editors/DataTypeEditor.py:310 +msgstr "Исходное значение:" +msgstr "Исходное значение" +#: ../dialogs/SFCTransitionDialog.py:75 ../dialogs/ActionBlockDialog.py:42 +msgstr "Непосредственно" +#: ../dialogs/SFCStepDialog.py:70 ../dialogs/FBDVariableDialog.py:37 +#: ../dialogs/BrowseLocationsDialog.py:40 ../editors/Viewer.py:289 +#: ../editors/Viewer.py:1578 ../editors/TextViewer.py:307 +#: ../controls/LocationCellEditor.py:98 ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 +msgid "Input to be differentiated" +msgstr "Вход для дифференцирования" +msgstr "Входная переменная" +#: ../dialogs/FBDBlockDialog.py:93 +#: ../plcopen/iec_std.csv:87 +msgid "Insertion (into)" +msgstr "Вставка подстроки" +#: ../plcopen/plcopen.py:1691 +msgid "Instance with id %d doesn't exist!" +msgstr "Экземпляр с id %d не существует!" +#: ../editors/ResourceEditor.py:264 +msgid "Integrated output" +msgstr "Интегрированный выход" +#: ../controls/VariablePanel.py:70 +#: ../editors/ResourceEditor.py:72 +#: ../editors/ResourceEditor.py:68 +#: ../PLCControler.py:2325 +msgid "Invalid plcopen element(s)!!!" +msgstr "Некорректный PlcOpen элемент(ы)!!!" +#: ../canfestival/config_utils.py:381 +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location\"{a4}\"" +msgstr "Неправильный тип \"{a1}\"-> {a2} != {a3} для \"{a4}\"" +#: ../canfestival/config_utils.py:645 +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location \"{a4}\"" +msgstr "Неправильный тип \"{a1}\"-> {a2} != {a3} для \"{a4}\"" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:132 +#: ../controls/DebugVariablePanel/DebugVariableTextViewer.py:92 +#: ../controls/DebugVariablePanel/DebugVariableGraphicViewer.py:166 +msgid "Invalid value \"%s\" for debug variable" +msgstr "Неверное значение \"%s\" для отлаживаемой переменной" +#: ../controls/VariablePanel.py:255 ../controls/VariablePanel.py:258 +msgid "Invalid value \"%s\" for variable grid element" +msgstr "Неверное значение \"%s\" для значения размещения переменной" +#: ../editors/Viewer.py:233 ../editors/Viewer.py:236 +msgid "Invalid value \"%s\" for viewer block" +msgstr "Неверное значение \"%s\" для вставки в редактор" +#: ../dialogs/ForceVariableDialog.py:177 +msgid "Invalid value \"{a1}\" for \"{a2}\" variable!" +msgstr "Неверное значение \"{a1}\" для переменной \"{a2}\"!" +#: ../dialogs/DurationEditorDialog.py:121 +"You must fill a numeric value." +"Необходимо ввести числовое значение." +#: ../editors/Viewer.py:557 ../editors/Viewer.py:2343 +msgstr "Безусловный переход" +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 +#: ../editors/LDViewer.py:215 ../editors/LDViewer.py:231 +msgid "Ladder element with id %d is on more than one rung." +msgstr "Элемент лестничной диаграммы с id %d более чем на одной ступени." +#: ../dialogs/PouTransitionDialog.py:91 ../dialogs/PouActionDialog.py:83 +#: ../dialogs/PouDialog.py:104 +#: ../controls/ProjectPropertiesPanel.py:186 +msgid "Language (optional):" +msgstr "Язык (опционально):" +#: ../dialogs/PouTransitionDialog.py:65 ../dialogs/PouActionDialog.py:56 +#: ../dialogs/PouDialog.py:73 +#: ../ProjectController.py:1735 +msgid "Latest build already matches current target. Transfering anyway...\n" +msgstr "Загружаемая программа совпадает с текущий программой в целевом ПЛК. Загрузка продолжена...\n" +#: ../Beremiz_service.py:271 +msgid "Launch WX GUI inspector" +msgstr "Запустить WX GUI Inspector" +#: ../Beremiz_service.py:270 +msgid "Launch a live Python shell" +msgstr "Запустить консоль Python" +#: ../editors/Viewer.py:485 +#: ../dialogs/LDPowerRailDialog.py:62 +msgstr "Левая шина питания" +#: ../plcopen/iec_std.csv:81 +msgid "Length of string" +#: ../plcopen/iec_std.csv:78 +#: ../plcopen/iec_std.csv:79 +msgid "Less than or equal to" +msgstr "Меньше либо равно" +#: ../dialogs/AboutDialog.py:143 +#: ../plcopen/iec_std.csv:73 +#: ../targets/toolchain_gcc.py:166 +#: ../dialogs/DiscoveryDialog.py:111 ../controls/VariablePanel.py:72 +#: ../canfestival/canfestival.py:346 +msgstr "Локальные записи" +#: ../ProjectController.py:1641 +msgid "Local service discovery failed!\n" +msgstr "Локальный сервис не найден!\n" +#: ../controls/VariablePanel.py:53 +#: ../dialogs/BrowseLocationsDialog.py:72 +msgid "Locations available:" +msgstr "Доступные размещения:" +#: ../plcopen/iec_std.csv:25 +msgid "Logarithm to base 10" +msgstr "Десятичный логарифм" +#: ../connectors/PYRO/__init__.py:94 +msgid "MDNS resolution failure for '%s'\n" +msgstr "MDNS разрешение неудачно для '%s'\n" +msgid "Manual output adjustment - Typically from transfer station" +#: ../canfestival/SlaveEditor.py:64 ../canfestival/NetworkEditor.py:85 +msgstr "Отображение переменной" +msgid "Map located variables over CANopen" +msgstr "Отображение переменных по CANopen" +#: ../canfestival/NetworkEditor.py:106 +#: ../ConfigTreeNode.py:539 +msgid "Max count ({a1}) reached for this confnode of type {a2} " +msgstr "Достигнуто максимальное количество ({a1}) для типа узла конфигурации {a2} " +#: ../plcopen/iec_std.csv:71 +#: ../editors/DataTypeEditor.py:239 +#: ../dialogs/BrowseLocationsDialog.py:42 ../editors/Viewer.py:289 +#: ../editors/TextViewer.py:307 ../controls/LocationCellEditor.py:98 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 +#: ../dialogs/DurationEditorDialog.py:48 +#: ../editors/Viewer.py:490 +#: ../dialogs/DurationEditorDialog.py:47 +#: ../plcopen/iec_std.csv:72 +#: ../editors/DataTypeEditor.py:226 +#: ../dialogs/DurationEditorDialog.py:45 +#: ../controls/ProjectPropertiesPanel.py:210 +#: ../dialogs/LDElementDialog.py:63 +#: ../PLCGenerator.py:786 ../PLCGenerator.py:1230 +msgid "More than one connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +msgstr "Более одного коннектора соответствуют продолжению цепи \"{a1}\" в POU \"{a2}\"" +#: ../dialogs/ActionBlockDialog.py:140 +msgid "Move action down" +msgstr "Переместить действие ниже" +#: ../dialogs/ActionBlockDialog.py:139 +msgstr "Переместить действие выше" +#: ../controls/CustomEditableListBox.py:43 +msgstr "Переместить ниже" +#: ../editors/DataTypeEditor.py:355 +msgid "Move element down" +msgstr "Переместить элемент ниже" +#: ../editors/DataTypeEditor.py:354 +msgstr "Переместить элементы выше" +#: ../editors/ResourceEditor.py:271 +msgid "Move instance down" +msgstr "Переместить экземпляр ниже" +#: ../editors/ResourceEditor.py:270 +msgid "Move instance up" +msgstr "Переместить экземпляр выше" +#: ../editors/ResourceEditor.py:242 +msgstr "Переместить задачу ниже" +#: ../editors/ResourceEditor.py:241 +msgstr "Переместить задачу выше" +#: ../IDEFrame.py:99 ../IDEFrame.py:114 ../IDEFrame.py:144 ../IDEFrame.py:185 +msgstr "Переместить отображение" +#: ../controls/CustomEditableListBox.py:42 +msgstr "Переместить выше" +#: ../editors/CodeFileEditor.py:661 ../controls/VariablePanel.py:453 +msgid "Move variable down" +msgstr "Переместить переменную ниже" +#: ../editors/CodeFileEditor.py:660 ../controls/VariablePanel.py:452 +msgid "Move variable up" +msgstr "Переместить переменную выше" +#: ../plcopen/iec_std.csv:74 +msgid "Multiplexer (select 1 of N)" +msgstr "Мультиплексор (1 в N)" +#: ../plcopen/iec_std.csv:34 +#: ../editors/FileManagementPanel.py:83 +#: ../dialogs/DiscoveryDialog.py:92 +#: ../editors/ResourceEditor.py:68 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 +#: ../Beremiz_service.py:332 +msgid "Name must not be null!" +msgstr "Имя не может быть null!" +#: ../dialogs/SFCStepDialog.py:56 ../dialogs/FBDBlockDialog.py:83 +#: ../dialogs/ConnectionDialog.py:75 +#: ../plcopen/iec_std.csv:24 +msgid "Natural logarithm" +msgstr "Натуральный логарифм" +#: ../dialogs/LDElementDialog.py:75 ../editors/Viewer.py:460 +#: ../Beremiz_service.py:578 +msgid "Nevow Web service failed. " +msgstr "Ошибка Web сервиса Nevow. " +#: ../Beremiz_service.py:554 +msgid "Nevow/Athena import failed :" +msgstr "Ошибка импорта Nevow/Athena :" +#: ../PLCOpenEditor.py:102 ../PLCOpenEditor.py:144 ../Beremiz.py:321 +#: ../controls/CustomEditableListBox.py:40 +#: ../editors/Viewer.py:459 +msgstr "Нет модификатора" +#: ../ProjectController.py:1763 +msgid "No PLC to transfer (did build succeed ?)\n" +msgstr "Нет ПЛК для передачи (была сборка успешна?)\n" +#: ../PLCGenerator.py:1631 +msgid "No body defined in \"%s\" POU" +msgstr "Нет тела для POU \"%s\"" +#: ../PLCGenerator.py:806 ../PLCGenerator.py:1241 +msgid "No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +msgstr "Не найден коннектор, соответствующий продолжению цепи \"{a1}\" в POU \"{a2}\"" +#: ../PLCOpenEditor.py:347 +"No documentation available.\n" +"Документация отсутствует.\n" +#: ../PLCGenerator.py:829 +msgid "No informations found for \"%s\" block" +msgstr "Не найдена информация по блоку \"%s\"" +#: ../PLCGenerator.py:1194 +msgid "No output {a1} variable found in block {a2} in POU {a3}. Connection must be broken" +msgstr "Выходная переменная {a1} не найдена в блоке {a2} в POU {a3}." +#: ../controls/SearchResultPanel.py:169 +msgid "No search results available." +msgstr "Ничего не найдено." +#: ../svgui/svgui.py:131 +msgid "No such SVG file: %s\n" +msgstr "Нет такого SVG файла: %s\n" +#: ../canfestival/config_utils.py:639 +msgid "No such index/subindex ({a1},{a2}) (variable {a3})" +msgstr "Нет индекса/подиндекса ({a1},{a2}) (переменная {a3})" +#: ../canfestival/config_utils.py:362 +msgid "No such index/subindex ({a1},{a2}) in ID : {a3} (variable {a4})" +msgstr "Нет индекса/подиндекса ({a1},{a2}) в ID: {a3} (переменная {a4})" +#: ../dialogs/BrowseValuesLibraryDialog.py:83 +msgid "No valid value selected!" +msgstr "Не выбрано допустимое значение!" +#: ../PLCGenerator.py:1629 +msgid "No variable defined in \"%s\" POU" +msgstr "Переменная не определена в POU \"%s\"" +#: ../canfestival/config_utils.py:355 +msgid "Non existing node ID : {a1} (variable {a2})" +msgstr "Несуществующий ID узла: {a1} (переменная {a2})" +#: ../controls/VariablePanel.py:64 +#: ../dialogs/LDElementDialog.py:75 +#: ../canfestival/config_utils.py:389 +msgid "Not PDO mappable variable : '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))" +msgstr "Не переменная для отображения в PDO: '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))" +#: ../plcopen/iec_std.csv:80 +#: ../dialogs/SFCDivergenceDialog.py:89 +msgid "Number of sequences:" +#: ../plcopen/iec_std.csv:22 +msgstr "Математические функции" +#: ../dialogs/SearchInProjectDialog.py:86 +msgstr "Только элементы" +#: ../PLCOpenEditor.py:104 ../PLCOpenEditor.py:145 ../Beremiz.py:323 +#: ../svgui/svgui.py:140 +msgstr "Открыть Inkscape" +msgid "Open Source framework for automation, implemented IEC 61131 IDE with constantly growing set of extensions and flexible PLC runtime." +msgstr "Свободное программное обеспечение для промышленной автоматизации, состоящие из среды разработки программ по стандарту МЭК 61131 с постоянно расширяющимся набором плагинов и гибкой системой исполнения для ПЛК." +#: ../ProjectController.py:1815 +msgid "Open a file explorer to manage project files" +msgstr "Открыть файловый менеджер для просмотра файлов проекта" +#: ../wxglade_hmi/wxglade_hmi.py:138 +msgstr "Открыть wxGlade" +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 +#: ../dialogs/FindInPouDialog.py:83 +#: ../controls/ProjectPropertiesPanel.py:97 +msgid "Organization (optional):" +msgstr "Организация (опционально):" +#: ../canfestival/SlaveEditor.py:74 ../canfestival/NetworkEditor.py:95 +#: ../dialogs/SFCStepDialog.py:71 ../dialogs/FBDVariableDialog.py:39 +#: ../dialogs/BrowseLocationsDialog.py:41 ../editors/Viewer.py:289 +#: ../editors/Viewer.py:1579 ../editors/TextViewer.py:307 +#: ../controls/LocationCellEditor.py:98 ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 +msgid "Overriding reset" +msgstr "Сброс интегратора" +#: ../canfestival/SlaveEditor.py:63 ../canfestival/NetworkEditor.py:84 +#: ../canfestival/SlaveEditor.py:62 ../canfestival/NetworkEditor.py:83 +#: ../targets/toolchain_gcc.py:131 +#: ../ProjectController.py:992 +msgid "PLC code generation failed !\n" +msgstr "Неудачная генерация кода!\n" +#: ../Beremiz_service.py:295 +msgid "PLC is empty or already started." +msgstr "В ПЛК нет программы или он уже запущен." +#: ../Beremiz_service.py:302 +msgid "PLC is not started." +#: ../PLCOpenEditor.py:196 ../PLCOpenEditor.py:309 +"PLC syntax error at line {a1}:\n" +"Синтаксическая ошибка в строке {a1}:\n" +#: ../PLCOpenEditor.py:292 ../PLCOpenEditor.py:373 +msgid "PLCOpen files (*.xml)|*.xml|All files|*.*" +msgstr "PLCOpen файлы (*.xml)|*.xml|All files|*.*" +#: ../PLCOpenEditor.py:152 ../PLCOpenEditor.py:209 +#: ../PLCOpenEditor.py:355 +"PLCOpenEditor is part of Beremiz project.\n" +"PLCOpenEditor является частью проекта Beremiz.\n" +#: ../dialogs/DiscoveryDialog.py:95 +#: ../dialogs/PouDialog.py:100 +#: ../dialogs/PouDialog.py:58 +#: ../dialogs/PouDialog.py:102 +#: ../dialogs/PouDialog.py:65 +msgstr "Ошибка, PV - SP" +#: ../connectors/PYRO/__init__.py:45 +msgid "PYRO connecting to URI : %s\n" +msgstr "PYRO подключение к URI: %s\n" +#: ../connectors/PYRO/__init__.py:61 +msgid "PYRO using certificates in '%s' \n" +msgstr "PYRO использует сертификаты в '%s'\n" +#: ../PLCOpenEditor.py:118 ../Beremiz.py:336 +msgstr "Настройки страницы" +#: ../controls/ProjectPropertiesPanel.py:110 +msgid "Page Size (optional):" +msgstr "Размер страницы (опционально):" +#: ../controls/PouInstanceVariablesPanel.py:124 +msgstr "Родительский экземпляр" +#: ../editors/Viewer.py:598 ../IDEFrame.py:372 ../IDEFrame.py:426 +#: ../dialogs/SearchInProjectDialog.py:56 +msgid "Pattern to search:" +#: ../dialogs/LDPowerRailDialog.py:73 +#: ../editors/Viewer.py:2706 ../editors/Viewer.py:2963 +#: ../editors/SFCViewer.py:770 +msgid "Please choose a target" +msgstr "Выберите цель перехода" +#: ../editors/TextViewer.py:262 +msgid "Please enter a block name" +msgstr "Введите имя блока" +#: ../editors/Viewer.py:2576 ../editors/Viewer.py:3005 +msgid "Please enter comment text" +msgstr "Введите текст комментария" +#: ../editors/SFCViewer.py:433 ../editors/SFCViewer.py:455 +#: ../editors/SFCViewer.py:799 +msgid "Please enter step name" +msgstr "Введите имя шага" +#: ../Beremiz_service.py:194 +msgid "Please enter text" +#: ../dialogs/ForceVariableDialog.py:163 +msgid "Please enter value for a \"%s\" variable:" +msgstr "Введите значение для переменной \"%s\":" +#: ../Beremiz_service.py:317 +msgid "Port number must be 0 <= port <= 65535!" +msgstr "Номер порта должен быть в диапазоне от 0 до 65535!" +#: ../Beremiz_service.py:317 +msgid "Port number must be an integer!" +msgstr "Номер порта должен быть целым числом!" +#: ../editors/Viewer.py:536 ../editors/Viewer.py:2367 +#: ../dialogs/LDPowerRailDialog.py:50 +msgid "Power Rail Properties" +msgstr "Свойства шины питания" +#: ../PLCOpenEditor.py:120 ../Beremiz.py:338 +#: ../dialogs/BlockPreviewDialog.py:57 +#: ../PLCOpenEditor.py:122 ../PLCOpenEditor.py:148 ../Beremiz.py:340 +msgstr "Предварительный просмотр" +#: ../editors/ResourceEditor.py:68 +#: ../dialogs/SFCTransitionDialog.py:89 +#: ../runtime/PLCObject.py:370 +msgid "Problem starting PLC : error %d" +msgstr "Проблема запуска ПЛК: ошибка %d" +msgid "Process variable" +msgstr "Текущее значение регулируемой переменной" +#: ../dialogs/ProjectDialog.py:55 +#: ../controls/ProjectPropertiesPanel.py:80 +msgid "Product Name (required):" +msgstr "Имя продукта (обязательно):" +#: ../controls/ProjectPropertiesPanel.py:82 +msgid "Product Release (optional):" +msgstr "Релиз продукта (опцинально):" +#: ../dialogs/ProjectDialog.py:56 +msgstr "Версия продукта" +#: ../controls/ProjectPropertiesPanel.py:81 +msgid "Product Version (required):" +msgstr "Версия продукта (обязательно):" +#: ../dialogs/SearchInProjectDialog.py:38 ../IDEFrame.py:1744 +#: ../PLCOpenEditor.py:337 +msgid "Program was successfully generated!" +msgstr "Программа успешно сгенерирована!" +#: ../PLCControler.py:96 +#: ../editors/Viewer.py:242 +msgid "Programs can't be used by other POUs!" +msgstr "Программы не могут использоваться другими POU!" +#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:584 +#: ../controls/SearchResultPanel.py:173 +#: ../ProjectController.py:1814 +#: ../dialogs/ProjectDialog.py:54 +#: ../controls/ProjectPropertiesPanel.py:78 +msgid "Project Name (required):" +msgstr "Имя проекта (обязательно):" +#: ../controls/ProjectPropertiesPanel.py:79 +msgid "Project Version (optional):" +msgstr "Версия проекта (опционально):" +#: ../PLCControler.py:3158 +"Project file syntax error:\n" +"Синтаксическая ошибка в файле проекта:\n" +#: ../dialogs/ProjectDialog.py:32 ../editors/ProjectNodeEditor.py:37 +msgid "Project properties" +msgstr "Свойства проекта" +#: ../ConfigTreeNode.py:566 +msgid "Project tree layout do not match confnode.xml {a1}!={a2} " +msgstr "Дерево проекта не соответствует confnode.xml {a1}!={a2} " +#: ../dialogs/ConnectionDialog.py:94 +#: ../PLCControler.py:97 +msgid "Proportionality constant" +msgstr "Коэффициент пропорциональности" +#: ../Beremiz_service.py:440 +msgid "Publishing service on local network" +msgstr "Сервис доступен в локальной сети" +#: ../connectors/PYRO/__init__.py:118 +msgid "Pyro exception: %s\n" +msgstr "Исключение Pyro: %s\n" +#: ../Beremiz_service.py:427 +msgid "Pyro object's uri :" +#: ../Beremiz_service.py:426 +#: ../py_ext/PythonEditor.py:81 +#: ../dialogs/ActionBlockDialog.py:38 +#: ../PLCOpenEditor.py:128 ../Beremiz.py:343 ../Beremiz_service.py:273 +msgstr "Длительность нарастания" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:225 +#: ../ProjectController.py:1810 +msgid "Really delete node '%s'?" +msgstr "Действительно удалить элемент '%s'?" +#: ../IDEFrame.py:362 ../IDEFrame.py:422 +#: ../dialogs/SFCTransitionDialog.py:74 +#: ../dialogs/DiscoveryDialog.py:106 ../IDEFrame.py:432 +#: ../dialogs/SearchInProjectDialog.py:66 +msgid "Regular expression" +msgstr "Регулярное выражение" +#: ../dialogs/FindInPouDialog.py:98 +msgid "Regular expressions" +msgstr "Регулярные выражения" +#: ../editors/Viewer.py:1556 +msgstr "Освободить значение" +#: ../plcopen/iec_std.csv:37 +msgid "Remainder (modulo)" +msgstr "Остаток от деления (modulo)" +msgstr "Удалить %s элемент" +msgstr "Удалить тип данных" +#: ../dialogs/ActionBlockDialog.py:138 +msgstr "Удалить действие" +#: ../editors/DataTypeEditor.py:353 +msgstr "Удалить элемент" +#: ../editors/FileManagementPanel.py:63 +msgid "Remove file from left folder" +msgstr "Удалить файл из левой директории" +#: ../editors/ResourceEditor.py:269 +msgstr "Удалить экземпляр" +#: ../canfestival/NetworkEditor.py:104 +msgstr "Удалить ведомое устройство" +#: ../editors/ResourceEditor.py:240 +#: ../editors/CodeFileEditor.py:659 ../controls/VariablePanel.py:451 +msgstr "Удалить переменную" +#: ../editors/FileManagementPanel.py:181 +#: ../editors/Viewer.py:502 +msgid "Replace Wire by connections" +msgstr "Заменить цепь подключениями" +#: ../plcopen/iec_std.csv:89 +msgid "Replacement (within)" +msgstr "Замена подстроки" +#: ../dialogs/LDElementDialog.py:76 +#: ../editors/Viewer.py:583 +msgid "Reset Execution Order" +msgstr "Сбросить порядок исполнения" +msgid "Reset Perspective" +msgstr "Сбросить представление" +#: ../controls/SearchResultPanel.py:105 +msgid "Reset search result" +msgstr "Сбросить результаты поиска" +msgstr "Постоянная времени интегрирования" +#: ../PLCControler.py:97 ../Beremiz.py:1075 +#: ../controls/VariablePanel.py:62 +#: ../controls/VariablePanel.py:424 +msgstr "Возвращаемый тип:" +#: ../editors/Viewer.py:487 +#: ../dialogs/LDPowerRailDialog.py:63 +msgstr "Правая шина питания" +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:461 +msgstr "Нарастающий фронт" +#: ../plcopen/iec_std.csv:65 +msgstr "Циклический сдвиг влево" +#: ../plcopen/iec_std.csv:64 +msgstr "Циклический сдвиг вправо" +#: ../plcopen/iec_std.csv:17 +msgid "Rounding up/down" +msgstr "Округление вверх/вниз" +#: ../ProjectController.py:1778 +#: ../ProjectController.py:1037 +msgid "Runtime IO extensions C code generation failed !\n" +msgstr "Ошибка генерации C-кода для расширений ввода-вывода!\n" +#: ../ProjectController.py:1046 +msgid "Runtime library extensions C code generation failed !\n" +msgstr "Ошибка генерации C-кода для библиотеки расширений системы исполнения!\n" +#: ../canfestival/SlaveEditor.py:61 ../canfestival/NetworkEditor.py:82 +#: ../canfestival/SlaveEditor.py:60 ../canfestival/NetworkEditor.py:81 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 +#: ../PLCGenerator.py:1392 +msgid "SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"" +msgstr "Безусловный переход в POU \"{a1}\" ссылается на несуществующий SFC шаг \"{a2}\"" +#: ../PLCGenerator.py:773 +msgid "SFC transition in POU \"%s\" must be connected." +msgstr "SFC переход в POU \"%s\" должен быть подключен." +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 +#: ../PLCOpenEditor.py:324 +msgid "ST files (*.st)|*.st|All files|*.*" +msgstr "ST файлы (*.st)|*.st|Все файлы|*.*" +#: ../svgui/svgui.py:125 +msgid "SVG files (*.svg)|*.svg|All files|*.*" +msgstr "SVG файлы (*.svg)|*.svg|Все файлы|*.*" +msgstr "Период сэмплирования" +#: ../PLCOpenEditor.py:111 ../PLCOpenEditor.py:146 ../Beremiz.py:327 +#: ../PLCOpenEditor.py:113 ../PLCOpenEditor.py:147 ../Beremiz.py:359 +msgstr "Сохранить как..." +#: ../ProjectController.py:420 +msgid "Save path is the same as path of a project! \n" +msgstr "Выбранный путь совпадает с путём проекта!\n" +#: ../dialogs/SearchInProjectDialog.py:69 +msgstr "Область действия" +#: ../dialogs/SearchInProjectDialog.py:44 ../IDEFrame.py:382 ../IDEFrame.py:428 +msgid "Search in Project" +msgstr "Поиск в проекте" +#: ../dialogs/DurationEditorDialog.py:46 +#: ../editors/Viewer.py:288 ../editors/TextViewer.py:306 +#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:290 +#: ../controls/VariablePanel.py:350 +msgid "Select a variable class:" +msgstr "Выберите класс переменной:" +#: ../ProjectController.py:1195 +msgid "Select an editor:" +msgstr "Выберите редактор:" +#: ../controls/PouInstanceVariablesPanel.py:276 +msgid "Select an instance" +msgstr "Выберите экземпляр" +msgid "Select an object" +msgstr "Выберите объект" +#: ../ProjectController.py:427 +msgid "Selected directory already contains another project. Overwrite? \n" +msgstr "Выбранная директория уже содержит другой проект. Перезаписать?\n" +#: ../plcopen/iec_std.csv:70 +#: ../dialogs/SFCDivergenceDialog.py:65 +msgid "Selection Convergence" +msgstr "Альтернативное объединение" +#: ../dialogs/SFCDivergenceDialog.py:64 +msgid "Selection Divergence" +msgstr "Альтернативное ветвление" +#: ../dialogs/DiscoveryDialog.py:82 +msgid "Service Discovery" +#: ../dialogs/DiscoveryDialog.py:85 +msgid "Services available:" +msgstr "Сервисы доступны:" +#: ../dialogs/LDElementDialog.py:76 +#: ../plcopen/iec_std.csv:62 +#: ../plcopen/iec_std.csv:63 +#: ../ProjectController.py:1804 +msgid "Show IEC code generated by PLCGenerator" +msgstr "Показать год, сгенерированный PLCGenerator" +#: ../canfestival/canfestival.py:387 +msgstr "Показать ведущего" +#: ../canfestival/canfestival.py:388 +msgid "Show Master generated by config_utils" +msgstr "Показать ведущий узел сгенерированный config_utils" +#: ../ProjectController.py:1802 +#: ../dialogs/SFCDivergenceDialog.py:67 +msgid "Simultaneous Convergence" +msgstr "Параллельное объединение" +#: ../dialogs/SFCDivergenceDialog.py:66 +msgid "Simultaneous Divergence" +msgstr "Параллельное ветвление" +#: ../plcopen/iec_std.csv:27 +#: ../editors/ResourceEditor.py:68 +#: ../targets/toolchain_makefile.py:126 +msgid "Source didn't change, no build.\n" +msgstr "Исходные файлы не изменились, сборка не нужна.\n" +#: ../PLCGenerator.py:397 +msgid "Source signal has to be defined for single task '{a1}' in resource '{a2}.{a3}'." +msgstr "Для задачи '{a1}' в ресурсе '{a2}.{a3}' отсутсвует задание источника." +#: ../plcopen/iec_std.csv:23 +msgid "Square root (base 2)" +msgstr "Квадратный корень" +#: ../plcopen/definitions.py:46 +msgid "Standard function blocks" +msgstr "Стандартные функциональные блоки" +#: ../ProjectController.py:1780 ../Beremiz_service.py:261 +#: ../ProjectController.py:984 +msgid "Start build in %s\n" +msgstr "Сборка запущена в %s\n" +#: ../ProjectController.py:1298 +#: ../ProjectController.py:1586 +msgstr "ПЛК запускается\n" +#: ../editors/Viewer.py:553 ../editors/Viewer.py:2342 +#: ../ProjectController.py:1783 +#: ../Beremiz_service.py:262 +#: ../ProjectController.py:1785 +msgid "Stop Running PLC" +msgstr "Остановить запущенный ПЛК" +#: ../ProjectController.py:1299 +#: ../ProjectController.py:1558 +msgid "Stopping debugger...\n" +msgstr "Остановка отладчика...\n" +#: ../editors/DataTypeEditor.py:54 +#: ../editors/DataTypeEditor.py:54 +#: ../plcopen/iec_std.csv:35 +#: ../ProjectController.py:1023 +msgid "Successfully built.\n" +msgstr "Сборка прошла успешно.\n" +msgid "Switch perspective" +msgstr "Сменить представление" +msgid "Sync_Align_Ratio" +#: ../dialogs/SearchInProjectDialog.py:165 ../dialogs/FindInPouDialog.py:172 +msgid "Syntax error in regular expression of pattern to search!" +msgstr "Синтаксическая ошибка в регулярном выражении шаблона поиска!" +#: ../dialogs/DiscoveryDialog.py:93 +#: ../plcopen/iec_std.csv:29 +msgstr "Целевая платформа" +#: ../editors/ResourceEditor.py:83 +#: ../editors/ResourceEditor.py:235 +#: ../controls/VariablePanel.py:73 +msgid "The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." +msgstr "ПИД (Пропорциональный Интегральный Дифференциальный) ФБ - классический регулятор, используемый в системах с обратной связью." +msgid "The RAMP function block is modelled on example given in the standard." +msgstr "Ограничитель скорости изменения сигнала. Функциональный блок написан согласно примеру, приведенному в стандарте." +msgid "The RS bistable is a latch where the Reset dominates." +msgstr "RS-триггер с приоритетом выключения." +msgid "The SR bistable is a latch where the Set dominates." +msgstr "SR-триггер с приоритетом включения." +msgid "The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." +msgstr "Функциональный блок формирует выход XOUT пропорционально частоте изменения входа XIN." +msgid "The down-counter can be used to signal when a count has reached zero, on counting down from a preset value." +msgstr "Декрементный счетчик может использоваться, когда необходимо сигнализировать, что счетчик достиг нулевого значения с исходного заданного значения." +#: ../editors/FileManagementPanel.py:180 +"The file '%s' already exist.\n" +"Do you want to replace it?" +"Файл '%s' уже существует.\n" +"Вы хотите заменить его?" +#: ../editors/LDViewer.py:882 +msgid "The group of block must be coherent!" +msgstr "Группа блоков должна быть связанной!" +msgid "The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2." +msgstr "Функциональный блок формирует дискретный выход с гистерезисом в зависимости от разницы двух вещественных входов XIN1 и XIN2." +msgid "The integral function block integrates the value of input XIN over time." +msgstr "Функциональный блок интегрирует входное значение XIN во времени." +msgid "The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." +msgstr "Таймер выключения может быть использован, чтобы внести задержку установки выхода в FALSE на фиксированный период времени после того, как вход стал FALSE." +msgid "The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." +msgstr "Таймер выключения может быть использован, чтобы внести задержку установки выхода в TRUE на фиксированный период времени после того, как вход стал TRUE." +msgid "The output produces a single pulse when a falling edge is detected." +msgstr "Детектор падающего фронта. На выходе формируется одиночный импульс, если обнаружен падающий фронт." +msgid "The output produces a single pulse when a rising edge is detected." +msgstr "Детектор нарастающего фронта. На выходе формируется одиночный импульс, если обнаружен нарастающий фронт." +msgid "The pulse timer can be used to generate output pulses of a given time duration." +msgstr "Генератор импульсов. Функциональный блок используется для генерации выходных импульсов заданной длительности." +msgid "The real time clock has many uses including time stamping, setting dates and times of day in batch reports, in alarm messages and so on." +msgstr "Часы реального времени используется для получения меток времени, установки даты и времени дня в отчетах, сообщениях об авариях и пр." +msgid "The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." +msgstr "Семафор предоставляет собой программный механизм синхронизации для обеспечения исключительного доступа к определенным ресурсам." +msgid "The up-counter can be used to signal when a count has reached a maximum value." +msgstr "Инкрементный счетчик может использоваться, когда необходимо сигнализировать, что счетчик достиг максимального значения." +msgid "The up-down counter has two inputs CU and CD. It can be used to both count up on one input and down on the other." +msgstr "Инкрементный/декрементный счетчик имеет два входа CU и CD. Он может использоваться для счета вверх по одному входу и для счета низ по другому." +#: ../Beremiz.py:640 ../IDEFrame.py:1011 +msgid "There are changes, do you want to save?" +msgstr "Хотите сохранить изменения?" +#: ../IDEFrame.py:1655 ../IDEFrame.py:1674 +msgid "There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?" +msgstr "Существует POU с именем \"%s\". Это может вызвать конфликт. Хотите продолжить?" +"There was a problem printing.\n" +"Perhaps your current printer is not set correctly?" +"Произошла проблема во время печати.\n" +"Возможно, текущий принтер не настроен?" +#: ../editors/LDViewer.py:891 +msgid "This option isn't available yet!" +msgstr "Это опция еще не доступна!" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:565 +#: ../plcopen/iec_std.csv:40 +#: ../plcopen/iec_std.csv:40 ../plcopen/iec_std.csv:41 +msgstr "Сложение времени" +#: ../plcopen/iec_std.csv:86 +msgid "Time concatenation" +msgstr "Объединение времен" +#: ../plcopen/iec_std.csv:60 ../plcopen/iec_std.csv:61 +msgstr "Деление времени" +#: ../plcopen/iec_std.csv:46 ../plcopen/iec_std.csv:47 +msgid "Time multiplication" +msgstr "Умножение времени" +#: ../plcopen/iec_std.csv:48 ../plcopen/iec_std.csv:49 +msgid "Time subtraction" +msgstr "Вычитание времени" +#: ../plcopen/iec_std.csv:42 ../plcopen/iec_std.csv:43 +msgid "Time-of-day addition" +msgstr "Сложение времени суток" +#: ../plcopen/iec_std.csv:52 ../plcopen/iec_std.csv:53 +#: ../plcopen/iec_std.csv:54 ../plcopen/iec_std.csv:55 +msgid "Time-of-day subtraction" +msgstr "Вычитание времени суток" +#: ../editors/Viewer.py:489 +#: ../ProjectController.py:1792 +#: ../ProjectController.py:1794 +#: ../ProjectController.py:1758 +msgid "Transfer completed successfully.\n" +msgstr "Передача успешно завершена.\n" +#: ../ProjectController.py:1760 +msgid "Transfer failed\n" +msgstr "Ошибка передачи\n" +#: ../editors/Viewer.py:554 ../editors/Viewer.py:2344 ../editors/Viewer.py:2371 +#: ../PLCGenerator.py:1518 +msgid "Transition \"%s\" body must contain an output variable or coil referring to its name" +msgstr "Тело перехода \"%s\" должно содержать выходную переменную или катушку, ссылающуюся на его имя" +#: ../dialogs/PouTransitionDialog.py:89 +#: ../dialogs/PouTransitionDialog.py:58 +msgid "Transition Name:" +#: ../PLCGenerator.py:1609 +msgid "Transition with content \"{a1}\" not connected to a next step in \"{a2}\" POU" +msgstr "Переход с содержимым \"{a1}\" не подключен к следующему шагу в POU \"{a2}\"" +#: ../PLCGenerator.py:1598 +msgid "Transition with content \"{a1}\" not connected to a previous step in \"{a2}\" POU" +msgstr "Переход с содержимым \"{a1}\" не подключен к предыдущему шагу в POU \"{a2}\"" +#: ../plcopen/plcopen.py:1318 +msgid "Transition with name %s doesn't exist!" +msgstr "Переход с именем %s отсутствует!" +#: ../PLCControler.py:96 +#: ../dialogs/AboutDialog.py:123 +#: ../editors/ResourceEditor.py:68 +#: ../Beremiz_service.py:476 +msgid "Twisted unavailable." +msgstr "Модуль Twisted недоступен." +#: ../dialogs/ActionBlockDialog.py:38 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 +#: ../dialogs/BrowseLocationsDialog.py:48 +msgid "Type and derivated" +msgstr "Тип и его производные" +#: ../canfestival/config_utils.py:336 ../canfestival/config_utils.py:624 +msgid "Type conflict for location \"%s\"" +msgstr "Конфликт типов \"%s\"" +#: ../plcopen/iec_std.csv:16 +msgstr "Преобразование типов" +#: ../editors/DataTypeEditor.py:162 +msgstr "Информация о типе:" +#: ../dialogs/BrowseLocationsDialog.py:49 +msgstr "Только данный тип" +#: ../dialogs/SFCDivergenceDialog.py:59 ../dialogs/SFCTransitionDialog.py:57 +#: ../dialogs/LDPowerRailDialog.py:56 ../dialogs/BrowseLocationsDialog.py:99 +#: ../dialogs/FBDBlockDialog.py:65 ../dialogs/ConnectionDialog.py:58 +msgstr "URI системы исполнения" +#: ../canfestival/config_utils.py:462 ../canfestival/config_utils.py:476 +msgid "Unable to define PDO mapping for node %02x" +msgstr "Невозможно определить отображение PDO для узла %02x" +#: ../targets/Xenomai/__init__.py:39 +msgid "Unable to get Xenomai's %s \n" +msgstr "Невозможно получить Xenomai %s\n" +#: ../PLCGenerator.py:961 ../PLCGenerator.py:1214 +msgid "Undefined block type \"{a1}\" in \"{a2}\" POU" +msgstr "Неопределенный тип блока \"{a1}\" в POU \"{a2}\"" +#: ../PLCGenerator.py:254 +msgid "Undefined pou type \"%s\"" +msgstr "Неопределенный тип POU \"%s\"" +#: ../IDEFrame.py:360 ../IDEFrame.py:421 +#: ../ProjectController.py:332 +#: ../editors/Viewer.py:393 +msgid "Unknown variable \"%s\" for this POU!" +msgstr "Неизвестная переменная \"%s\" для этого POU!" +#: ../ProjectController.py:329 ../ProjectController.py:330 +#: ../PLCControler.py:636 +#: ../controls/VariablePanel.py:284 +msgid "Unrecognized data size \"%s\"" +msgstr "Неопределенный размер данных \"%s\"" +#: ../editors/DataTypeEditor.py:632 ../controls/VariablePanel.py:798 +msgstr "Пользовательские типы данных" +#: ../canfestival/SlaveEditor.py:65 ../canfestival/NetworkEditor.py:86 +msgstr "Пользовательский тип" +#: ../PLCControler.py:95 +msgid "User-defined POUs" +msgstr "Пользовательские POU" +#: ../dialogs/ActionBlockDialog.py:38 +#: ../editors/DataTypeEditor.py:259 +#: ../dialogs/ActionBlockDialog.py:42 ../editors/Viewer.py:526 +#: ../editors/Viewer.py:2374 +#: ../editors/Viewer.py:308 ../editors/Viewer.py:338 ../editors/Viewer.py:360 +#: ../editors/TextViewer.py:292 ../editors/TextViewer.py:343 +#: ../editors/TextViewer.py:366 ../controls/VariablePanel.py:329 +msgstr "Перетаскивание переменной" +#: ../dialogs/FBDVariableDialog.py:63 +msgid "Variable Properties" +msgstr "Свойства переменных" +#: ../editors/Viewer.py:288 ../editors/TextViewer.py:306 +#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:290 +#: ../controls/VariablePanel.py:350 +msgstr "Класс переменной" +#: ../editors/Viewer.py:395 ../editors/TextViewer.py:387 +msgid "Variable don't belong to this POU!" +msgstr "Переменная не принадлежит этому POU!" +#: ../dialogs/LDElementDialog.py:89 +#: ../controls/VariablePanel.py:72 +#: ../controls/ProjectPropertiesPanel.py:151 +#: ../Beremiz_service.py:586 +msgid "WAMP client startup failed. " +msgstr "Ошибка импорта WAMP. " +#: ../connectors/WAMP/__init__.py:91 +msgid "WAMP connecting to URL : %s\n" +msgstr "WAMP подключение к URI: %s\n" +#: ../connectors/WAMP/__init__.py:131 +msgid "WAMP connection timeout" +msgstr "Тайм-аут WAMP подключения " +#: ../connectors/WAMP/__init__.py:150 +msgid "WAMP connection to '%s' failed.\n" +msgstr "Не удалось установить WAMP подключение к %s.\n" +#: ../Beremiz_service.py:562 +msgid "WAMP import failed :" +msgstr "Ошибка импорта WAMP :" +#: ../wxglade_hmi/wxglade_hmi.py:35 +#: ../dialogs/PouDialog.py:128 ../editors/LDViewer.py:891 +#: ../ProjectController.py:616 +msgid "Warnings in ST/IL/SFC code generator :\n" +msgstr "Предупреждения в ST/IL/SFC коде генераторе:\n" +#: ../dialogs/SearchInProjectDialog.py:78 +#: ../controls/ProjectPropertiesPanel.py:119 +#: ../dialogs/FindInPouDialog.py:93 +msgstr "Продолжить поиск сначала" +#: ../dialogs/AboutDialog.py:122 +msgstr "Настройки Xenomai" +#: ../svgui/svgui.py:139 +"You don't have write permissions.\n" +"Open Inkscape anyway ?" +"У вас недостаточно прав для записи.\n" +"Открыть Inkscape все равно?" +#: ../wxglade_hmi/wxglade_hmi.py:137 +"You don't have write permissions.\n" +"У вас недостаточно прав для записи.\n" +"Открыть wxGlade все равно?" +#: ../ProjectController.py:292 +"You must have permission to work on the project\n" +"Work on a project copy ?" +"Вы должны иметь права на запись, чтобы работать с проектом\n" +"Работать с копией проекта?" +#: ../editors/LDViewer.py:886 +msgid "You must select the block or group of blocks around which a branch should be added!" +msgstr "Выберите блок или группу блоков, вокруг которых нужно добавить ветвление!" +#: ../editors/LDViewer.py:666 +msgid "You must select the wire where a contact should be added!" +msgstr "Выберите провод, куда должен быть добавлен контакт!" +#: ../dialogs/SFCStepNameDialog.py:48 ../dialogs/PouNameDialog.py:46 +msgid "You must type a name!" +#: ../dialogs/ForceVariableDialog.py:175 +msgid "You must type a value!" +msgstr "Введите значение!" +#: ../dialogs/DurationEditorDialog.py:151 +#: ../PLCOpenEditor.py:333 +#: ../util/ProcessLogger.py:169 +msgid "exited with status {a1} (pid {a2})\n" +msgstr "завершился с кодом {a1} (pid {a2})\n" +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 +msgid "first input parameter" +msgstr "первый входной параметр" +msgid "first output parameter" +msgstr "первый выходной параметр" +#: ../dialogs/PouDialog.py:31 +#: ../PLCOpenEditor.py:399 +#: ../dialogs/PouDialog.py:31 +msgstr "функциональный блок" +#: ../dialogs/DurationEditorDialog.py:151 +msgid "internal state: 0-reset, 1-counting, 2-set" +msgstr "состояние: 0 - сброс, 1 - счёт, 2 - установка" +#: ../PLCOpenEditor.py:399 +#: ../dialogs/DurationEditorDialog.py:153 +#: ../dialogs/DurationEditorDialog.py:152 +#: ../dialogs/PouDialog.py:31 +msgid "second input parameter" +msgstr "второй входной параметр" +msgid "second output parameter" +msgstr "второй выходной параметр" +#: ../dialogs/DurationEditorDialog.py:152 +#: ../plcopen/iec_std.csv:84 +msgid "string from the middle" +msgstr "строка из середины" +#: ../plcopen/iec_std.csv:82 +msgstr "строка слева от " +#: ../plcopen/iec_std.csv:83 +msgstr "строка справа от " +msgid "update info unavailable." +msgstr "информация об обновлениях недоступна." +#: ../PLCOpenEditor.py:331 +msgstr "предупреждение: %s\n" +#: ../PLCControler.py:970 +msgid "{a1} \"{a2}\" can't be pasted as a {a3}." +msgstr "{a1} \"{a2}\" не может быть вставлен как {a3}." +#: ../ConfigTreeNode.py:56 +"{a1} XML file doesn't follow XSD schema at line %{a2}:\n" +"{a1} XML файл не следует XSD-схеме в строке {a2}:\n" +#~ "An error has occurred.\n" +#~ "Click OK to save an error report.\n" +#~ "Please be kind enough to send this file to:\n" +#~ "edouard.tisserant@gmail.com\n" +#~ "Произошла ошибка.\n" +#~ "Нажмите OK, чтобы сохранить репорт об ошибке.\n" +#~ "Будьте так добры, пошлите этот файл:\n" +#~ "edouard.tisserant@gmail.com\n" +#~ msgid " -> Nothing to do\n" +#~ msgstr " -> Ничего не нужно делать\n" +#~ msgid "\"%s\" element can't be pasted here!!!" +#~ msgstr "Элемент \"%s\" не может быть вставлен сюда!!!" +#~ msgid "... debugger recovered\n" +#~ msgstr "... отладчик восстановлен\n" +#~ msgid "About Beremiz" +#~ msgid "About PLCOpenEditor" +#~ msgstr "О PLCOpenEditor" +#~ msgid "Clear the graph values" +#~ msgstr "Очистить значения на графике" +#~ "The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." +#~ "Функциональный блок формирует выход XOUT пропорционально частоте изменения входа XIN." +#~ "The down-counter can be used to signal when a count has reached zero, on counting down from a preset value." +#~ "Декрементный счетчик\n" +#~ "Декрементный счетчик может использоваться, когда необходимо сигнализировать, что счетчик достиг нулевого значения с исходного заданного значения." +#~ msgid "Enable_Native_Library" +#~ msgstr "Разрешить библиотеку Native" +#~ "Falling edge detector\n" +#~ "The output produces a single pulse when a falling edge is detected." +#~ "Детектор падающего фронта\n" +#~ "На выходе формируется одиночный импульс, если обнаружен падающий фронт." +#~ msgid "Form isn't complete. Pattern to search must be filled!" +#~ msgstr "Форма заполнена неполностью. Шаблон поиска должен быть заполнен!" +#~ "The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2." +#~ "Функциональный блок формирует дискретный выход с гистерезисом в зависимости от разницы двух вещественных входов XIN1 и XIN2." +#~ msgid "IEC-61131-3 code generation failed !\n" +#~ msgstr "Неудачная генерация МЭК-61131-3 кода!\n" +#~ msgstr "Исходное значение" +#~ "The integral function block integrates the value of input XIN over time." +#~ "Функциональный блок интегрирует входное значение XIN во времени." +#~ msgid "Move debug variable down" +#~ msgstr "Переместить отлаживаемую переменную ниже" +#~ msgid "Move debug variable up" +#~ msgstr "Переместить отлаживаемую переменную выше" +#~ msgid "No PLC project found" +#~ msgstr "Не найден проект ПЛК" +#~ msgid "No output variable found" +#~ msgstr "Выходная переменная не найдена" +#~ "The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." +#~ "Таймер выключения\n" +#~ "Таймер выключения может быть использован, чтобы внести задержку установки выхода в FALSE на фиксированный период времени после того, как вход стал FALSE." +#~ "The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." +#~ "Таймер выключения может быть использован, чтобы внести задержку установки выхода в TRUE на фиксированный период времени после того, как вход стал TRUE." +#~ "The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." +#~ "ПИД (Пропорциональный Интегральный Дифференциальный) ФБ - классический регулятор, используемый в системах с обратной связью." +#~ "The pulse timer can be used to generate output pulses of a given time duration." +#~ "Генератор импульсов\n" +#~ "Функциональный блок используется для генерации выходных импульсов заданной длительности." +#~ "The RS bistable is a latch where the Reset dominates." +#~ "RS триггер - переключатель с доминантой выключения." +#~ "The RAMP function block is modelled on example given in the standard." +#~ "Ограничитель скорости изменения сигнала\n" +#~ "Функциональный блок написан согласно примеру, приведенному в стандарте." +#~ "The real time clock has many uses including time stamping, setting dates and times of day in batch reports, in alarm messages and so on." +#~ "Часы реального времени используется для получения меток времени, установки даты и времени дня в отчетах, сообщениях об авариях и пр." +#~ msgid "Remove debug variable" +#~ msgstr "Удалить отлаживаемую переменную" +#~ msgid "Reset zoom and offset" +#~ msgstr "Сбросить приближение и смещение" +#~ "Rising edge detector\n" +#~ "The output produces a single pulse when a rising edge is detected." +#~ "Детектор нарастающего фронта\n" +#~ "На выходе формируется одиночный импульс, если обнаружен нарастающий фронт." +#~ "The SR bistable is a latch where the Set dominates." +#~ "SR триггер - переключатель с доминантой включения." +#~ "The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." +#~ "Семафор предоставляет собой программный механизм синхронизации для обеспечения исключительного доступа к определенным ресурсам." +#~ "The up-counter can be used to signal when a count has reached a maximum value." +#~ "Инкрементный счетчик\n" +#~ "Инкрементный счетчик может использоваться, когда необходимо сигнализировать, что счетчик достиг максимального значения." +#~ "The up-down counter has two inputs CU and CD. It can be used to both count up on one input and down on the other." +#~ "Инкрементный/декрементный счетчик\n" +#~ "Инкрементный/декрементный счетчик имеет два входа CU и CD. Он может использоваться для счета вверх по одному входу и для счета низ по другому." +#~ msgid "Waiting debugger to recover...\n" +#~ msgstr "Ожидание восстановления отладчика...\n" +#~ msgstr "Приближение:" +#~ msgstr "about.ru.html" +#~ msgid "plcopen_about.html" +#~ msgstr "plcopen_about.ru.html" --- a/i18n/app.fil Sun Mar 05 00:38:25 2017 +0000
+++ b/i18n/app.fil Fri Mar 24 12:07:47 2017 +0000
@@ -1,94 +1,120 @@
-../runtime/ServicePublisher.py
+../canfestival/canfestival.py ../canfestival/SlaveEditor.py
../canfestival/config_utils.py
-../canfestival/canfestival.py
../canfestival/NetworkEditor.py
-../controls/LocationCellEditor.py
-../controls/CustomTree.py
-../controls/VariablePanel.py
-../controls/CustomGrid.py
-../controls/SearchResultPanel.py
-../controls/LibraryPanel.py
-../controls/TextCtrlAutoComplete.py
-../controls/DebugVariablePanel.py
-../controls/PouInstanceVariablesPanel.py
-../controls/DurationCellEditor.py
-../controls/CustomTable.py
-../controls/CustomEditableListBox.py
-../controls/ProjectPropertiesPanel.py
-../svgui/svgui_server.py
-../xmlclass/xsdschema.py
+../dialogs/LDElementDialog.py +../dialogs/ForceVariableDialog.py +../dialogs/SearchInProjectDialog.py +../dialogs/SFCStepDialog.py +../dialogs/SFCStepNameDialog.py +../dialogs/FindInPouDialog.py +../dialogs/SFCDivergenceDialog.py +../dialogs/SFCTransitionDialog.py +../dialogs/DurationEditorDialog.py +../dialogs/PouTransitionDialog.py +../dialogs/FBDVariableDialog.py +../dialogs/BlockPreviewDialog.py +../dialogs/AboutDialog.py +../dialogs/ProjectDialog.py +../dialogs/LDPowerRailDialog.py +../dialogs/ArrayTypeDialog.py +../dialogs/PouNameDialog.py +../dialogs/BrowseLocationsDialog.py +../dialogs/FBDBlockDialog.py +../dialogs/ConnectionDialog.py +../dialogs/BrowseValuesLibraryDialog.py +../dialogs/ActionBlockDialog.py +../dialogs/PouActionDialog.py +../dialogs/DiscoveryDialog.py +../graphics/RubberBand.py +../graphics/FBD_Objects.py +../graphics/DebugDataConsumer.py +../graphics/ToolTipProducer.py +../graphics/LD_Objects.py +../graphics/SFC_Objects.py +../graphics/GraphicCommons.py +../connectors/PYRO/__init__.py +../connectors/__init__.py +../connectors/WAMP/__init__.py +../targets/XSD_toolchain_makefile +../targets/Xenomai/__init__.py +../targets/XSD_toolchain_gcc +../targets/toolchain_gcc.py +../targets/toolchain_makefile.py
+../py_ext/PythonEditor.py +../py_ext/PythonFileCTNMixin.py ../wxglade_hmi/wxglade_hmi.py
-../editors/ProjectNodeEditor.py
+../runtime/NevowServer.py +../runtime/ServicePublisher.py ../editors/ConfTreeNodeEditor.py
-../editors/TextViewer.py
-../editors/DataTypeEditor.py
-../editors/GraphicViewer.py
../editors/ResourceEditor.py
+../editors/DataTypeEditor.py +../editors/IECCodeViewer.py +../editors/TextViewer.py +../editors/ProjectNodeEditor.py +../editors/EditorPanel.py +../editors/DebugViewer.py -../editors/EditorPanel.py
../editors/FileManagementPanel.py
-../graphics/GraphicCommons.py
-../graphics/LD_Objects.py
-../graphics/SFC_Objects.py
-../graphics/FBD_Objects.py
-../connectors/__init__.py
-../connectors/PYRO/__init__.py
-../targets/toolchain_gcc.py
-../targets/XSD_toolchain_gcc
-../targets/Xenomai/__init__.py
+../editors/CodeFileEditor.py +../controls/LocationCellEditor.py +../controls/SearchResultPanel.py +../controls/PouInstanceVariablesPanel.py +../controls/CustomTable.py +../controls/LibraryPanel.py +../controls/CustomToolTip.py +../controls/LogViewer.py +../controls/FolderTree.py +../controls/ProjectPropertiesPanel.py +../controls/DebugVariablePanel/DebugVariablePanel.py +../controls/DebugVariablePanel/DebugVariableViewer.py +../controls/DebugVariablePanel/DebugVariableTextViewer.py +../controls/DebugVariablePanel/DebugVariableGraphicViewer.py +../controls/DebugVariablePanel/GraphButton.py +../controls/DebugVariablePanel/DebugVariableItem.py +../controls/TextCtrlAutoComplete.py +../controls/DurationCellEditor.py +../controls/CustomStyledTextCtrl.py +../controls/VariablePanel.py +../controls/CustomGrid.py +../controls/CustomTree.py +../controls/CustomEditableListBox.py +../xmlclass/xsdschema.py -../dialogs/PouNameDialog.py
-../dialogs/SFCDivergenceDialog.py
-../dialogs/LDPowerRailDialog.py
-../dialogs/PouTransitionDialog.py
-../dialogs/BrowseLocationsDialog.py
-../dialogs/DiscoveryDialog.py
-../dialogs/ProjectDialog.py
-../dialogs/SFCStepNameDialog.py
-../dialogs/ConnectionDialog.py
-../dialogs/FBDVariableDialog.py
-../dialogs/PouActionDialog.py
-../dialogs/BrowseValuesLibraryDialog.py
-../dialogs/ActionBlockDialog.py
-../dialogs/SFCTransitionDialog.py
-../dialogs/LDElementDialog.py
-../dialogs/DurationEditorDialog.py
-../dialogs/FindInPouDialog.py
-../dialogs/SearchInProjectDialog.py
-../dialogs/SFCStepDialog.py
-../dialogs/ArrayTypeDialog.py
-../dialogs/FBDBlockDialog.py
-../dialogs/ForceVariableDialog.py
-../util/ProcessLogger.py
../util/MiniTextControler.py
+../util/ProcessLogger.py +../svgui/svgui_server.py -../py_ext/PythonFileCTNMixin.py
-../py_ext/PythonEditor.py
+../plcopen/definitions.py +../plcopen/Additional_Function_Blocks.xml +../plcopen/Standard_Function_Blocks.xml \ No newline at end of file
--- a/i18n/messages.pot Sun Mar 05 00:38:25 2017 +0000
+++ b/i18n/messages.pot Fri Mar 24 12:07:47 2017 +0000
@@ -8,7 +8,7 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-03-26 22:55+0100\n"
+"POT-Creation-Date: 2017-01-12 14:39+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,20 +17,7 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: ../PLCOpenEditor.py:405
-"An error has occurred.\n"
-"Click OK to save an error report.\n"
-"Please be kind enough to send this file to:\n"
-"edouard.tisserant@gmail.com\n"
+#: ../PLCOpenEditor.py:408 ../Beremiz.py:1191 @@ -40,367 +27,398 @@
"Please be kind enough to send this file to:\n"
"beremiz-devel@lists.sourceforge.net\n"
-"You should now restart Beremiz.\n"
+"You should now restart program.\n" -#: ../controls/VariablePanel.py:77
+#: ../controls/VariablePanel.py:72 -#: ../controls/VariablePanel.py:76
+#: ../controls/VariablePanel.py:71 -#: ../controls/VariablePanel.py:76
+#: ../controls/VariablePanel.py:71 -#: ../controls/VariablePanel.py:77
+#: ../controls/VariablePanel.py:72 -#: ../controls/VariablePanel.py:76
+#: ../controls/VariablePanel.py:71 -#: ../controls/VariablePanel.py:78
+#: ../controls/VariablePanel.py:73 -#: ../PLCOpenEditor.py:415
-#: ../dialogs/PouTransitionDialog.py:94 ../dialogs/PouActionDialog.py:91
-#: ../dialogs/PouDialog.py:111 ../dialogs/SFCTransitionDialog.py:144
+#: ../dialogs/PouTransitionDialog.py:99 ../dialogs/ProjectDialog.py:66 +#: ../dialogs/PouActionDialog.py:91 ../dialogs/PouDialog.py:113 -#: ../ProjectController.py:917
+#: ../ProjectController.py:1089 msgid " generation failed !\n"
-#: ../plcopen/plcopen.py:1051
+#: ../plcopen/plcopen.py:881 msgid "\"%s\" Data Type doesn't exist !!!"
-#: ../plcopen/plcopen.py:1069
+#: ../plcopen/plcopen.py:899 msgid "\"%s\" POU already exists !!!"
-#: ../plcopen/plcopen.py:1090
+#: ../plcopen/plcopen.py:920 msgid "\"%s\" POU doesn't exist !!!"
-#: ../editors/Viewer.py:234
+#: ../editors/Viewer.py:246 msgid "\"%s\" can't use itself!"
-#: ../IDEFrame.py:1587 ../IDEFrame.py:1606
+#: ../IDEFrame.py:1652 ../IDEFrame.py:1671 msgid "\"%s\" config already exists!"
-#: ../plcopen/plcopen.py:315
+#: ../plcopen/plcopen.py:467 msgid "\"%s\" configuration already exists !!!"
msgid "\"%s\" data type already exists!"
-#: ../PLCControler.py:2165 ../PLCControler.py:2169
-msgid "\"%s\" element can't be pasted here!!!"
-#: ../editors/TextViewer.py:298 ../editors/TextViewer.py:318
-#: ../editors/Viewer.py:250 ../dialogs/PouTransitionDialog.py:105
-#: ../dialogs/ConnectionDialog.py:157 ../dialogs/PouActionDialog.py:102
-#: ../dialogs/FBDBlockDialog.py:162
+#: ../dialogs/PouTransitionDialog.py:110 ../dialogs/BlockPreviewDialog.py:219 +#: ../dialogs/PouActionDialog.py:102 ../editors/Viewer.py:262 +#: ../editors/Viewer.py:330 ../editors/Viewer.py:354 ../editors/Viewer.py:374 +#: ../editors/TextViewer.py:272 ../editors/TextViewer.py:301 +#: ../controls/VariablePanel.py:396 msgid "\"%s\" element for this pou already exists!"
msgid "\"%s\" folder is not a valid Beremiz project\n"
-#: ../plcopen/structures.py:105
-msgid "\"%s\" function cancelled in \"%s\" POU: No input connected"
-#: ../controls/VariablePanel.py:659 ../IDEFrame.py:1532
-#: ../editors/DataTypeEditor.py:554 ../editors/DataTypeEditor.py:583
-#: ../dialogs/PouNameDialog.py:49 ../dialogs/PouTransitionDialog.py:101
-#: ../dialogs/SFCStepNameDialog.py:51 ../dialogs/ConnectionDialog.py:153
-#: ../dialogs/FBDVariableDialog.py:199 ../dialogs/PouActionDialog.py:98
-#: ../dialogs/PouDialog.py:118 ../dialogs/SFCStepDialog.py:122
-#: ../dialogs/FBDBlockDialog.py:158
+#: ../dialogs/SFCStepNameDialog.py:52 ../dialogs/PouTransitionDialog.py:106 +#: ../dialogs/BlockPreviewDialog.py:207 ../dialogs/PouNameDialog.py:50 +#: ../dialogs/PouActionDialog.py:98 ../dialogs/PouDialog.py:120 +#: ../editors/DataTypeEditor.py:555 ../editors/DataTypeEditor.py:584 +#: ../editors/CodeFileEditor.py:770 ../controls/VariablePanel.py:751 msgid "\"%s\" is a keyword. It can't be used!"
-#: ../editors/Viewer.py:238
-msgid "\"%s\" is already used by \"%s\"!"
-#: ../plcopen/plcopen.py:2836
+#: ../plcopen/plcopen.py:2412 msgid "\"%s\" is an invalid value!"
-#: ../PLCOpenEditor.py:341 ../PLCOpenEditor.py:378
+#: ../PLCOpenEditor.py:339 ../PLCOpenEditor.py:381 msgid "\"%s\" is not a valid folder!"
-#: ../controls/VariablePanel.py:657 ../IDEFrame.py:1530
-#: ../editors/DataTypeEditor.py:578 ../dialogs/PouNameDialog.py:47
-#: ../dialogs/PouTransitionDialog.py:99 ../dialogs/SFCStepNameDialog.py:49
-#: ../dialogs/ConnectionDialog.py:151 ../dialogs/PouActionDialog.py:96
-#: ../dialogs/PouDialog.py:116 ../dialogs/SFCStepDialog.py:120
-#: ../dialogs/FBDBlockDialog.py:156
+#: ../dialogs/SFCStepNameDialog.py:50 ../dialogs/PouTransitionDialog.py:104 +#: ../dialogs/BlockPreviewDialog.py:203 ../dialogs/PouNameDialog.py:48 +#: ../dialogs/PouActionDialog.py:96 ../dialogs/PouDialog.py:118 +#: ../editors/DataTypeEditor.py:579 ../editors/CodeFileEditor.py:768 +#: ../controls/VariablePanel.py:749 ../IDEFrame.py:1591 msgid "\"%s\" is not a valid identifier!"
-#: ../IDEFrame.py:221 ../IDEFrame.py:2313 ../IDEFrame.py:2332
-msgid "\"%s\" is used by one or more POUs. It can't be removed!"
-#: ../controls/VariablePanel.py:313 ../IDEFrame.py:1550
-#: ../editors/TextViewer.py:296 ../editors/TextViewer.py:316
-#: ../editors/TextViewer.py:353 ../editors/Viewer.py:248
-#: ../editors/Viewer.py:293 ../editors/Viewer.py:311
-#: ../dialogs/ConnectionDialog.py:155 ../dialogs/PouDialog.py:120
-#: ../dialogs/FBDBlockDialog.py:160
+msgid "\"%s\" is used by one or more POUs. Do you wish to continue?" +#: ../dialogs/BlockPreviewDialog.py:211 ../dialogs/PouDialog.py:122 +#: ../editors/Viewer.py:260 ../editors/Viewer.py:315 ../editors/Viewer.py:345 +#: ../editors/Viewer.py:367 ../editors/TextViewer.py:270 +#: ../editors/TextViewer.py:299 ../editors/TextViewer.py:350 +#: ../editors/TextViewer.py:373 ../controls/VariablePanel.py:338 msgid "\"%s\" pou already exists!"
-#: ../plcopen/plcopen.py:346
-msgid "\"%s\" resource already exists in \"%s\" configuration !!!"
-#: ../plcopen/plcopen.py:362
-msgid "\"%s\" resource doesn't exist in \"%s\" configuration !!!"
-#: ../dialogs/SFCStepNameDialog.py:57 ../dialogs/SFCStepDialog.py:128
+#: ../dialogs/SFCStepNameDialog.py:58 msgid "\"%s\" step already exists!"
-#: ../editors/DataTypeEditor.py:549
+#: ../editors/DataTypeEditor.py:550 msgid "\"%s\" value already defined!"
-#: ../editors/DataTypeEditor.py:744 ../dialogs/ArrayTypeDialog.py:97
+#: ../dialogs/ArrayTypeDialog.py:97 ../editors/DataTypeEditor.py:745 msgid "\"%s\" value isn't a valid array dimension!"
-#: ../editors/DataTypeEditor.py:751 ../dialogs/ArrayTypeDialog.py:103
+#: ../dialogs/ArrayTypeDialog.py:103 ../editors/DataTypeEditor.py:752 "\"%s\" value isn't a valid array dimension!\n"
"Right value must be greater than left value."
-#: ../PLCControler.py:847
+#: ../PLCGenerator.py:1101 +msgid "\"{a1}\" function cancelled in \"{a2}\" POU: No input connected" +#: ../editors/Viewer.py:250 +msgid "\"{a1}\" is already used by \"{a2}\"!" +#: ../plcopen/plcopen.py:491 +msgid "\"{a1}\" resource already exists in \"{a2}\" configuration !!!" +#: ../plcopen/plcopen.py:509 +msgid "\"{a1}\" resource doesn't exist in \"{a2}\" configuration !!!" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:578 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:569 -msgid "%s \"%s\" can't be pasted as a %s."
-#: ../PLCControler.py:1476
+#: ../controls/DebugVariablePanel/DebugVariablePanel.py:56 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:570 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:55 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:571 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:53 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:54 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:572 +#: ../PLCControler.py:1531 -#: ../editors/GraphicViewer.py:278
-#: ../PLCControler.py:1471
+#: ../PLCControler.py:1514 -#: ../canfestival/SlaveEditor.py:46 ../canfestival/NetworkEditor.py:67
+#: ../canfestival/SlaveEditor.py:69 ../canfestival/NetworkEditor.py:90 -#: ../plcopen/plcopen.py:1790 ../plcopen/plcopen.py:1800
-#: ../plcopen/plcopen.py:1810 ../plcopen/plcopen.py:1820
-#: ../plcopen/plcopen.py:1829
+#: ../plcopen/plcopen.py:1645 ../plcopen/plcopen.py:1652 +#: ../plcopen/plcopen.py:1664 ../plcopen/plcopen.py:1672 +#: ../plcopen/plcopen.py:1682 msgid "%s body don't have instances!"
-#: ../plcopen/plcopen.py:1852 ../plcopen/plcopen.py:1859
+#: ../plcopen/plcopen.py:1700 ../plcopen/plcopen.py:1707 +#: ../plcopen/plcopen.py:1714 msgid "%s body don't have text!"
+#: ../dialogs/AboutDialog.py:65 ../dialogs/AboutDialog.py:113 +#: ../dialogs/AboutDialog.py:150
+#: ../dialogs/AboutDialog.py:64 -#: ../PLCOpenEditor.py:129
+#: ../PLCOpenEditor.py:125
-#: ../controls/SearchResultPanel.py:252
-msgid "'%s' - %d match in project"
-#: ../controls/SearchResultPanel.py:254
-msgid "'%s' - %d matches in project"
-#: ../connectors/PYRO/__init__.py:51
-msgid "'%s' is located at %s\n"
-#: ../controls/SearchResultPanel.py:304
+#: ../controls/SearchResultPanel.py:239 +msgid "'{a1}' - {a2} match in project" +#: ../controls/SearchResultPanel.py:241 +msgid "'{a1}' - {a2} matches in project" +#: ../connectors/PYRO/__init__.py:90 +msgid "'{a1}' is located at {a2}\n" +#: ../controls/SearchResultPanel.py:291 -#: ../PLCOpenEditor.py:393 ../PLCOpenEditor.py:395 ../PLCOpenEditor.py:396
+#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 ../PLCOpenEditor.py:399 -#: ../dialogs/PouTransitionDialog.py:96 ../dialogs/PouActionDialog.py:93
-#: ../dialogs/PouDialog.py:113 ../dialogs/SFCTransitionDialog.py:146
+#: ../dialogs/PouTransitionDialog.py:101 ../dialogs/PouActionDialog.py:93 +#: ../dialogs/PouDialog.py:115 -#: ../PLCOpenEditor.py:391
+#: ../PLCOpenEditor.py:394 -#: ../ProjectController.py:1294
-msgid "... debugger recovered\n"
-#: ../IDEFrame.py:1553 ../IDEFrame.py:1595 ../IDEFrame.py:1614
-#: ../dialogs/PouDialog.py:122
+#: ../controls/LogViewer.py:279 +#: ../controls/LogViewer.py:280 +#: ../controls/LogViewer.py:281 +#: ../controls/LogViewer.py:282 +#: ../dialogs/PouDialog.py:124 ../IDEFrame.py:1614 ../IDEFrame.py:1660 msgid "A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?"
-#: ../controls/VariablePanel.py:661 ../IDEFrame.py:1565 ../IDEFrame.py:1576
-#: ../dialogs/PouNameDialog.py:51 ../dialogs/PouTransitionDialog.py:103
-#: ../dialogs/SFCStepNameDialog.py:53 ../dialogs/PouActionDialog.py:100
-#: ../dialogs/SFCStepDialog.py:124
+#: ../dialogs/SFCStepNameDialog.py:54 ../dialogs/PouTransitionDialog.py:108 +#: ../dialogs/PouNameDialog.py:52 ../dialogs/PouActionDialog.py:100 +#: ../controls/VariablePanel.py:753 ../IDEFrame.py:1628 ../IDEFrame.py:1641 msgid "A POU named \"%s\" already exists!"
-#: ../ConfigTreeNode.py:388
-msgid "A child named \"%s\" already exist -> \"%s\"\n"
-#: ../dialogs/BrowseLocationsDialog.py:212
+#: ../ConfigTreeNode.py:424 +msgid "A child named \"{a1}\" already exists -> \"{a2}\"\n" +#: ../dialogs/BrowseLocationsDialog.py:216 msgid "A location must be selected!"
-#: ../controls/VariablePanel.py:663 ../IDEFrame.py:1567 ../IDEFrame.py:1578
-#: ../dialogs/SFCStepNameDialog.py:55 ../dialogs/SFCStepDialog.py:126
+#: ../dialogs/SFCStepNameDialog.py:56 ../controls/VariablePanel.py:755 +#: ../IDEFrame.py:1630 ../IDEFrame.py:1643 msgid "A variable with \"%s\" as name already exists in this pou!"
-#: ../Beremiz.py:364 ../PLCOpenEditor.py:162
+#: ../editors/CodeFileEditor.py:774 +msgid "A variable with \"%s\" as name already exists!" +#: ../dialogs/AboutDialog.py:40 ../PLCOpenEditor.py:158 ../Beremiz.py:381
-#: ../PLCOpenEditor.py:355
-msgid "About PLCOpenEditor"
#: ../plcopen/iec_std.csv:22
-#: ../dialogs/ActionBlockDialog.py:41 ../dialogs/SFCStepDialog.py:69
+#: ../dialogs/SFCStepDialog.py:72 ../dialogs/ActionBlockDialog.py:42 -#: ../editors/Viewer.py:494
+#: ../editors/Viewer.py:555 ../editors/Viewer.py:2345 @@ -412,109 +430,109 @@
-#: ../plcopen/plcopen.py:1490
+#: ../plcopen/plcopen.py:1359 msgid "Action with name %s doesn't exist!"
-#: ../PLCControler.py:95
+#: ../PLCControler.py:96 -#: ../dialogs/ActionBlockDialog.py:134
+#: ../dialogs/ActionBlockDialog.py:133 -#: ../editors/Viewer.py:999
+#: ../editors/Viewer.py:1100 -#: ../canfestival/SlaveEditor.py:57 ../canfestival/NetworkEditor.py:78
-#: ../Beremiz.py:987 ../editors/Viewer.py:527
+#: ../canfestival/SlaveEditor.py:80 ../canfestival/NetworkEditor.py:101 +#: ../editors/Viewer.py:588 ../Beremiz.py:1060 -#: ../IDEFrame.py:1801 ../IDEFrame.py:1832
+#: ../IDEFrame.py:1890 ../IDEFrame.py:1925
msgid "Add C code accessing located variables synchronously"
msgid "Add Configuration"
-#: ../editors/Viewer.py:452
+#: ../editors/Viewer.py:513 msgid "Add Divergence Branch"
-#: ../dialogs/DiscoveryDialog.py:115
+#: ../dialogs/DiscoveryDialog.py:116
msgid "Add Python code executed asynchronously"
-#: ../IDEFrame.py:1812 ../IDEFrame.py:1858
+#: ../IDEFrame.py:1901 ../IDEFrame.py:1951 -#: ../IDEFrame.py:1790 ../IDEFrame.py:1829
+#: ../IDEFrame.py:1879 ../IDEFrame.py:1922 -#: ../editors/Viewer.py:441
+#: ../editors/Viewer.py:500 -#: ../editors/SFCViewer.py:359
+#: ../editors/SFCViewer.py:433 msgid "Add a new initial step"
-#: ../editors/Viewer.py:2363 ../editors/SFCViewer.py:696
+#: ../editors/Viewer.py:2706 ../editors/SFCViewer.py:770 -#: ../editors/SFCViewer.py:381
+#: ../editors/SFCViewer.py:455
msgid "Add a simple WxGlade based GUI."
-#: ../dialogs/ActionBlockDialog.py:138
+#: ../dialogs/ActionBlockDialog.py:137 -#: ../editors/DataTypeEditor.py:351
+#: ../editors/DataTypeEditor.py:352 -#: ../editors/ResourceEditor.py:259
+#: ../editors/ResourceEditor.py:268 -#: ../canfestival/NetworkEditor.py:80
+#: ../canfestival/NetworkEditor.py:103 -#: ../editors/ResourceEditor.py:230
+#: ../editors/ResourceEditor.py:239 -#: ../controls/VariablePanel.py:380 ../c_ext/CFileEditor.py:517
+#: ../editors/CodeFileEditor.py:658 ../controls/VariablePanel.py:450 @@ -522,22 +540,23 @@
-#: ../plcopen/structures.py:249
+#: ../plcopen/definitions.py:47 msgid "Additional function blocks"
-#: ../editors/Viewer.py:510
+#: ../editors/Viewer.py:571 msgid "Adjust Block Size"
-#: ../editors/Viewer.py:1458
+#: ../editors/Viewer.py:1637 -#: ../controls/VariablePanel.py:75 ../dialogs/BrowseLocationsDialog.py:34
-#: ../dialogs/BrowseLocationsDialog.py:43
-#: ../dialogs/BrowseLocationsDialog.py:136
-#: ../dialogs/BrowseLocationsDialog.py:139
+#: ../dialogs/BrowseLocationsDialog.py:39 +#: ../dialogs/BrowseLocationsDialog.py:47 +#: ../dialogs/BrowseLocationsDialog.py:140 +#: ../dialogs/BrowseLocationsDialog.py:143 ../controls/LogViewer.py:298 +#: ../controls/VariablePanel.py:70 @@ -545,16 +564,16 @@
msgid "All files (*.*)|*.*|CSV files (*.csv)|*.csv"
-#: ../ProjectController.py:1373
+#: ../ProjectController.py:1623 msgid "Already connected. Please disconnect\n"
-#: ../editors/DataTypeEditor.py:593
+#: ../editors/DataTypeEditor.py:594 msgid "An element named \"%s\" already exists in this structure!"
-#: ../dialogs/ConnectionDialog.py:98
+#: ../dialogs/ConnectionDialog.py:96 msgid "Apply name modification to all continuations with the same name"
@@ -574,8 +593,8 @@
-#: ../controls/VariablePanel.py:732 ../editors/DataTypeEditor.py:54
-#: ../editors/DataTypeEditor.py:634
+#: ../editors/DataTypeEditor.py:54 ../editors/DataTypeEditor.py:635 +#: ../controls/VariablePanel.py:829 @@ -583,7 +602,7 @@
-#: ../dialogs/FBDVariableDialog.py:197
+#: ../dialogs/FBDVariableDialog.py:217 msgid "At least a variable or an expression must be selected!"
@@ -595,7 +614,7 @@
msgid "Author Name (optional):"
-#: ../dialogs/FindInPouDialog.py:72
+#: ../dialogs/FindInPouDialog.py:79 @@ -607,21 +626,21 @@
msgid "Bad domain name at "
-#: ../canfestival/config_utils.py:341 ../canfestival/config_utils.py:623
+#: ../canfestival/config_utils.py:342 ../canfestival/config_utils.py:630 msgid "Bad location size : %s"
-#: ../editors/DataTypeEditor.py:174 ../editors/DataTypeEditor.py:204
-#: ../editors/DataTypeEditor.py:296 ../dialogs/ArrayTypeDialog.py:55
+#: ../dialogs/ArrayTypeDialog.py:55 ../editors/DataTypeEditor.py:175 +#: ../editors/DataTypeEditor.py:205 ../editors/DataTypeEditor.py:297 -#: ../controls/VariablePanel.py:702 ../editors/DataTypeEditor.py:624
+#: ../editors/DataTypeEditor.py:625 ../controls/VariablePanel.py:787
@@ -653,151 +672,167 @@
msgid "Bitwise inverting"
-#: ../editors/Viewer.py:464
+#: ../editors/Viewer.py:525 ../editors/Viewer.py:2358 -#: ../dialogs/FBDBlockDialog.py:38
+#: ../dialogs/FBDBlockDialog.py:59 -#: ../editors/Viewer.py:433
+#: ../editors/TextViewer.py:262 +#: ../editors/Viewer.py:491 +#: ../ProjectController.py:1301 #: ../dialogs/BrowseValuesLibraryDialog.py:37
msgid "Browse %s values library"
-#: ../dialogs/BrowseLocationsDialog.py:61
+#: ../dialogs/BrowseLocationsDialog.py:65 -#: ../ProjectController.py:1519
+#: ../ProjectController.py:1769 -#: ../ProjectController.py:1079
+#: ../ProjectController.py:1235 msgid "Build directory already clean\n"
-#: ../ProjectController.py:1520
+#: ../ProjectController.py:1770 msgid "Build project into build folder"
-#: ../ProjectController.py:937
+#: ../ProjectController.py:1018 msgid "C Build crashed !\n"
-#: ../ProjectController.py:934
+#: ../ProjectController.py:1015 msgid "C Build failed.\n"
-#: ../c_ext/CFileEditor.py:731
+#: ../c_ext/CFileEditor.py:63 -#: ../ProjectController.py:922
+#: ../ProjectController.py:1093 msgid "C code generated successfully.\n"
-#: ../targets/toolchain_gcc.py:132
+#: ../targets/toolchain_makefile.py:122 +msgid "C compilation failed.\n" +#: ../targets/toolchain_gcc.py:156 msgid "C compilation of %s failed.\n"
-#: ../canfestival/NetworkEditor.py:29
+#: ../dialogs/AboutDialog.py:63 +#: ../canfestival/NetworkEditor.py:52 -#: ../canfestival/SlaveEditor.py:21
+#: ../canfestival/SlaveEditor.py:44
-#: ../plcopen/plcopen.py:1732 ../plcopen/plcopen.py:1746
-#: ../plcopen/plcopen.py:1767 ../plcopen/plcopen.py:1783
+#: ../plcopen/plcopen.py:1584 ../plcopen/plcopen.py:1598 +#: ../plcopen/plcopen.py:1622 ../plcopen/plcopen.py:1638 msgid "Can only generate execution order on FBD networks!"
-#: ../controls/VariablePanel.py:256
+#: ../controls/VariablePanel.py:267 msgid "Can only give a location to local or global variables"
-#: ../PLCOpenEditor.py:336
+#: ../PLCOpenEditor.py:334 msgid "Can't generate program to file %s!"
-#: ../controls/VariablePanel.py:254
+#: ../controls/VariablePanel.py:265 msgid "Can't give a location to a function block instance"
-#: ../PLCOpenEditor.py:376
+#: ../PLCOpenEditor.py:379 msgid "Can't save project to file %s!"
-#: ../controls/VariablePanel.py:300
+#: ../controls/VariablePanel.py:313 msgid "Can't set an initial value to a function block instance"
-#: ../ConfigTreeNode.py:490
-msgid "Cannot create child %s of type %s "
-#: ../ConfigTreeNode.py:417
+#: ../ConfigTreeNode.py:529 +msgid "Cannot create child {a1} of type {a2} " +#: ../ConfigTreeNode.py:454 msgid "Cannot find lower free IEC channel than %d\n"
-#: ../connectors/PYRO/__init__.py:92
+#: ../connectors/PYRO/__init__.py:131 msgid "Cannot get PLC status - connection failed.\n"
-#: ../ProjectController.py:737
+#: ../ProjectController.py:881 msgid "Cannot open/parse VARIABLES.csv!\n"
-#: ../canfestival/config_utils.py:371
-msgid "Cannot set bit offset for non bool '%s' variable (ID:%d,Idx:%x,sIdx:%x))"
-#: ../dialogs/FindInPouDialog.py:81 ../dialogs/SearchInProjectDialog.py:67
+#: ../canfestival/config_utils.py:374 +msgid "Cannot set bit offset for non bool '{a1}' variable (ID:{a2},Idx:{a3},sIdx:{a4}))" +#: ../dialogs/SearchInProjectDialog.py:59 ../dialogs/FindInPouDialog.py:88 -#: ../editors/Viewer.py:428
+#: ../editors/Viewer.py:486 -#: ../Beremiz_service.py:326
+#: ../Beremiz_service.py:266 msgid "Change IP of interface to bind"
-#: ../Beremiz_service.py:325
+#: ../Beremiz_service.py:265
msgid "Change POU Type To"
-#: ../Beremiz_service.py:327
+#: ../Beremiz_service.py:267 msgid "Change Port Number"
-#: ../Beremiz_service.py:328
+#: ../Beremiz_service.py:268 msgid "Change working directory"
@@ -805,20 +840,20 @@
+#: ../svgui/svgui.py:125 msgid "Choose a SVG file"
-#: ../ProjectController.py:364
+#: ../ProjectController.py:451 msgid "Choose a directory to save project"
-#: ../canfestival/canfestival.py:136 ../PLCOpenEditor.py:294
-#: ../PLCOpenEditor.py:326 ../PLCOpenEditor.py:370
+#: ../canfestival/canfestival.py:160 ../PLCOpenEditor.py:292 +#: ../PLCOpenEditor.py:324 ../PLCOpenEditor.py:373 -#: ../Beremiz.py:858 ../Beremiz.py:893
+#: ../Beremiz.py:931 ../Beremiz.py:966 @@ -827,75 +862,83 @@
msgid "Choose a value for %s:"
-#: ../Beremiz_service.py:378
+#: ../Beremiz_service.py:323 msgid "Choose a working directory "
-#: ../ProjectController.py:288
+#: ../ProjectController.py:358 msgid "Chosen folder doesn't contain a program. It's not a valid project!"
-#: ../ProjectController.py:255
+#: ../ProjectController.py:325 msgid "Chosen folder isn't empty. You can't use it for a new project!"
-#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
+#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 -#: ../controls/VariablePanel.py:371
+#: ../controls/VariablePanel.py:441 -#: ../dialogs/FBDVariableDialog.py:62
+#: ../dialogs/FBDVariableDialog.py:69 -#: ../ProjectController.py:1523
+#: ../ProjectController.py:1773 -#: ../ProjectController.py:1525
+#: ../controls/LogViewer.py:318 +msgid "Clean log messages" +#: ../ProjectController.py:1775 msgid "Clean project build folder"
-#: ../ProjectController.py:1076
+#: ../ProjectController.py:1232 msgid "Cleaning the build directory\n"
-#: ../editors/Viewer.py:520
+#: ../editors/Viewer.py:582 msgid "Clear Execution Order"
-#: ../editors/GraphicViewer.py:125
-msgid "Clear the graph values"
-#: ../Beremiz.py:633 ../PLCOpenEditor.py:202
+#: ../dialogs/SearchInProjectDialog.py:105 ../dialogs/FindInPouDialog.py:111 +#: ../PLCOpenEditor.py:199 ../Beremiz.py:693 msgid "Close Application"
-#: ../IDEFrame.py:972 ../Beremiz.py:321 ../Beremiz.py:587
-#: ../PLCOpenEditor.py:112
+#: ../PLCOpenEditor.py:108 ../Beremiz.py:333 ../Beremiz.py:637 -#: ../Beremiz.py:319 ../PLCOpenEditor.py:110
+#: ../PLCOpenEditor.py:106 ../Beremiz.py:331 -#: ../editors/Viewer.py:480
+#: ../editors/Viewer.py:541 ../editors/Viewer.py:2366 -#: ../editors/Viewer.py:500 ../editors/LDViewer.py:506
+#: ../editors/Viewer.py:561 ../editors/LDViewer.py:506 +#: ../dialogs/ProjectDialog.py:57 #: ../controls/ProjectPropertiesPanel.py:94
msgid "Company Name (required):"
@@ -908,7 +951,7 @@
-#: ../ProjectController.py:552
+#: ../ProjectController.py:672 msgid "Compiling IEC Program into C code...\n"
@@ -916,79 +959,85 @@
-#: ../editors/ConfTreeNodeEditor.py:249
+#: ../editors/ConfTreeNodeEditor.py:229 -#: ../editors/ProjectNodeEditor.py:13
+#: ../editors/ProjectNodeEditor.py:36 -#: ../dialogs/SearchInProjectDialog.py:47
+#: ../dialogs/SearchInProjectDialog.py:39 -#: ../PLCControler.py:96
+#: ../PLCControler.py:97 -#: ../ProjectController.py:1538
+#: ../editors/Viewer.py:307 ../editors/Viewer.py:337 ../editors/Viewer.py:359 +#: ../editors/TextViewer.py:291 ../editors/TextViewer.py:342 +#: ../editors/TextViewer.py:365 ../controls/VariablePanel.py:328 +msgid "Confirm or change variable name" +#: ../ProjectController.py:1788 -#: ../ProjectController.py:1539
+#: ../ProjectController.py:1789 msgid "Connect to the target PLC"
-#: ../ProjectController.py:1125
+#: ../ProjectController.py:1292 msgid "Connected to URI: %s"
-#: ../connectors/PYRO/__init__.py:40
-msgid "Connecting to URI : %s\n"
-#: ../editors/Viewer.py:466 ../dialogs/SFCTransitionDialog.py:76
+#: ../dialogs/SFCTransitionDialog.py:76 ../editors/Viewer.py:527 +#: ../editors/Viewer.py:2359 -#: ../dialogs/ConnectionDialog.py:37
+#: ../dialogs/ConnectionDialog.py:52 msgid "Connection Properties"
-#: ../ProjectController.py:1397
+#: ../ProjectController.py:1647 msgid "Connection canceled!\n"
-#: ../ProjectController.py:1422
+#: ../ProjectController.py:1672 msgid "Connection failed to %s!\n"
-#: ../connectors/PYRO/__init__.py:63
+#: ../connectors/PYRO/__init__.py:115 ../connectors/WAMP/__init__.py:111 +msgid "Connection lost!\n" +#: ../connectors/PYRO/__init__.py:102 msgid "Connection to '%s' failed.\n"
-#: ../editors/Viewer.py:1426 ../dialogs/ConnectionDialog.py:56
+#: ../dialogs/ConnectionDialog.py:64 ../editors/Viewer.py:1594 -#: ../dialogs/SFCStepDialog.py:58
+#: ../dialogs/SFCStepDialog.py:65
-#: ../controls/VariablePanel.py:65
+#: ../controls/VariablePanel.py:60 -#: ../editors/Viewer.py:476
+#: ../editors/Viewer.py:537 ../editors/Viewer.py:2362 @@ -996,7 +1045,7 @@
msgid "Content Description (optional):"
-#: ../editors/Viewer.py:1427 ../dialogs/ConnectionDialog.py:61
+#: ../dialogs/ConnectionDialog.py:65 ../editors/Viewer.py:1595 @@ -1016,11 +1065,12 @@
msgid "Conversion to time-of-day"
-#: ../IDEFrame.py:353 ../IDEFrame.py:406 ../editors/Viewer.py:536
+#: ../editors/Viewer.py:597 ../controls/LogViewer.py:693 ../IDEFrame.py:370
@@ -1036,48 +1086,53 @@
-#: ../ConfigTreeNode.py:602
+#: ../ConfigTreeNode.py:656 -"Could not add child \"%s\", type %s :\n"
-#: ../ConfigTreeNode.py:579
+"Could not add child \"{a1}\", type {a2} :\n" +#: ../py_ext/PythonFileCTNMixin.py:77 +msgid "Couldn't import old %s file." +#: ../ConfigTreeNode.py:626 -"Couldn't load confnode base parameters %s :\n"
-#: ../ConfigTreeNode.py:590
+"Couldn't load confnode base parameters {a1} :\n" +#: ../ConfigTreeNode.py:643 ../CodeFileTreeNode.py:124 -"Couldn't load confnode parameters %s :\n"
-#: ../PLCControler.py:819 ../PLCControler.py:856
+"Couldn't load confnode parameters {a1} :\n" +#: ../PLCControler.py:946 msgid "Couldn't paste non-POU object."
-#: ../ProjectController.py:1344
+#: ../ProjectController.py:1589 msgid "Couldn't start PLC !\n"
-#: ../ProjectController.py:1352
+#: ../ProjectController.py:1597 msgid "Couldn't stop PLC !\n"
-#: ../ProjectController.py:1321
+#: ../ProjectController.py:1561 msgid "Couldn't stop debugger.\n"
-#: ../dialogs/PouDialog.py:43
+#: ../dialogs/PouDialog.py:45 @@ -1085,71 +1140,79 @@
msgid "Create a new action"
msgid "Create a new action block"
-#: ../IDEFrame.py:91 ../IDEFrame.py:121 ../IDEFrame.py:154
+#: ../IDEFrame.py:108 ../IDEFrame.py:138 ../IDEFrame.py:171 msgid "Create a new block"
msgid "Create a new branch"
msgid "Create a new coil"
-#: ../IDEFrame.py:85 ../IDEFrame.py:100 ../IDEFrame.py:130
+#: ../IDEFrame.py:102 ../IDEFrame.py:117 ../IDEFrame.py:147 msgid "Create a new comment"
-#: ../IDEFrame.py:94 ../IDEFrame.py:124 ../IDEFrame.py:157
+#: ../IDEFrame.py:111 ../IDEFrame.py:141 ../IDEFrame.py:174 msgid "Create a new connection"
-#: ../IDEFrame.py:112 ../IDEFrame.py:163
+#: ../IDEFrame.py:129 ../IDEFrame.py:180 msgid "Create a new contact"
msgid "Create a new divergence"
-#: ../dialogs/SFCDivergenceDialog.py:36
+#: ../dialogs/SFCDivergenceDialog.py:53 msgid "Create a new divergence or convergence"
msgid "Create a new initial step"
msgid "Create a new jump"
-#: ../IDEFrame.py:103 ../IDEFrame.py:160
+#: ../IDEFrame.py:120 ../IDEFrame.py:177 msgid "Create a new power rail"
msgid "Create a new rung"
msgid "Create a new step"
-#: ../IDEFrame.py:139 ../dialogs/PouTransitionDialog.py:42
+#: ../dialogs/PouTransitionDialog.py:47 ../IDEFrame.py:156 msgid "Create a new transition"
-#: ../IDEFrame.py:88 ../IDEFrame.py:118 ../IDEFrame.py:151
+#: ../IDEFrame.py:105 ../IDEFrame.py:135 ../IDEFrame.py:168 msgid "Create a new variable"
-#: ../IDEFrame.py:351 ../IDEFrame.py:405 ../editors/Viewer.py:535
+#: ../dialogs/AboutDialog.py:105 +#: ../Beremiz_service.py:432 +msgid "Current working directory :" +#: ../editors/Viewer.py:596 ../IDEFrame.py:368 ../IDEFrame.py:424 @@ -1165,19 +1228,19 @@
-#: ../canfestival/SlaveEditor.py:53 ../canfestival/NetworkEditor.py:74
+#: ../canfestival/SlaveEditor.py:76 ../canfestival/NetworkEditor.py:97 -#: ../canfestival/SlaveEditor.py:54 ../canfestival/NetworkEditor.py:75
+#: ../canfestival/SlaveEditor.py:77 ../canfestival/NetworkEditor.py:98 -#: ../dialogs/SearchInProjectDialog.py:43
+#: ../dialogs/SearchInProjectDialog.py:35 -#: ../PLCControler.py:95
+#: ../PLCControler.py:96 @@ -1202,50 +1265,50 @@
-#: ../ProjectController.py:1444
+#: ../ProjectController.py:1694 msgid "Debug does not match PLC - stop/transfert/start to re-enable\n"
-#: ../controls/PouInstanceVariablesPanel.py:59
+#: ../controls/PouInstanceVariablesPanel.py:134 -#: ../editors/Viewer.py:1016 ../editors/Viewer.py:3326
+#: ../editors/Viewer.py:1117 ../editors/Viewer.py:3653 -#: ../ProjectController.py:1153
+#: ../ProjectController.py:1350 msgid "Debug: Unknown variable '%s'\n"
-#: ../ProjectController.py:1151
+#: ../ProjectController.py:1348 msgid "Debug: Unsupported type to debug '%s'\n"
-#: ../ProjectController.py:1311
+#: ../ProjectController.py:1530 msgid "Debugger disabled\n"
-#: ../ProjectController.py:1441
+#: ../ProjectController.py:1691 -#: ../ProjectController.py:1323
+#: ../ProjectController.py:1563 msgid "Debugger stopped.\n"
-#: ../IDEFrame.py:1866 ../Beremiz.py:991 ../editors/Viewer.py:511
+#: ../editors/Viewer.py:572 ../Beremiz.py:1064 ../IDEFrame.py:1959 -#: ../editors/Viewer.py:453
+#: ../editors/Viewer.py:514 msgid "Delete Divergence Branch"
@@ -1253,7 +1316,7 @@
-#: ../editors/Viewer.py:442
+#: ../editors/Viewer.py:501 msgid "Delete Wire Segment"
@@ -1265,29 +1328,23 @@
msgid "Deletion (within)"
-#: ../editors/DataTypeEditor.py:152
+#: ../editors/DataTypeEditor.py:153 -#: ../plcopen/structures.py:263
-"The derivative function block produces an output XOUT proportional to the rate of change of the input XIN."
-#: ../controls/VariablePanel.py:362
+#: ../controls/VariablePanel.py:432 -#: ../editors/DataTypeEditor.py:320 ../dialogs/ArrayTypeDialog.py:61
+#: ../dialogs/ArrayTypeDialog.py:61 ../editors/DataTypeEditor.py:321 -#: ../dialogs/FindInPouDialog.py:61
+#: ../dialogs/FindInPouDialog.py:68 -#: ../dialogs/BrowseLocationsDialog.py:86
+#: ../dialogs/BrowseLocationsDialog.py:90 @@ -1295,15 +1352,19 @@
-#: ../ProjectController.py:1547
+#: ../ProjectController.py:1797 -#: ../ProjectController.py:1549
+#: ../ProjectController.py:1799 msgid "Disconnect from PLC"
-#: ../editors/Viewer.py:495
+#: ../ProjectController.py:1302 +#: ../editors/Viewer.py:556 ../editors/Viewer.py:2354 @@ -1316,37 +1377,31 @@
msgid "Do you really want to delete the file '%s'?"
-#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
+#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 -#: ../PLCOpenEditor.py:330
+#: ../PLCOpenEditor.py:328 -#: ../plcopen/structures.py:226
-"The down-counter can be used to signal when a count has reached zero, on counting down from a preset value."
-#: ../dialogs/ActionBlockDialog.py:37
+#: ../dialogs/ActionBlockDialog.py:38 -#: ../canfestival/canfestival.py:139
+#: ../canfestival/canfestival.py:163 msgid "EDS files (*.eds)|*.eds|All files|*.*"
-#: ../editors/Viewer.py:509
+#: ../editors/Viewer.py:570 -#: ../dialogs/LDElementDialog.py:41
+#: ../dialogs/LDElementDialog.py:56 -#: ../dialogs/LDElementDialog.py:38
+#: ../dialogs/LDElementDialog.py:54 msgid "Edit Contact Values"
@@ -1354,15 +1409,15 @@
-#: ../dialogs/SFCStepDialog.py:35
+#: ../dialogs/SFCStepDialog.py:50 -#: ../wxglade_hmi/wxglade_hmi.py:12
+#: ../wxglade_hmi/wxglade_hmi.py:36 msgid "Edit a WxWidgets GUI with WXGlade"
-#: ../dialogs/ActionBlockDialog.py:122
+#: ../dialogs/ActionBlockDialog.py:121 msgid "Edit action block properties"
@@ -1370,8 +1425,7 @@
msgid "Edit array type properties"
-#: ../editors/Viewer.py:2186 ../editors/Viewer.py:2188
-#: ../editors/Viewer.py:2706 ../editors/Viewer.py:2708
+#: ../editors/Viewer.py:2575 ../editors/Viewer.py:3004 @@ -1383,47 +1437,51 @@
-#: ../editors/Viewer.py:2670
+#: ../editors/Viewer.py:2963 -#: ../ProjectController.py:1561
+#: ../ProjectController.py:1811 msgid "Edit raw IEC code added to code generated by PLCGenerator"
-#: ../editors/SFCViewer.py:725
+#: ../editors/SFCViewer.py:799 -#: ../dialogs/SFCTransitionDialog.py:38
+#: ../dialogs/SFCTransitionDialog.py:51
-#: ../ProjectController.py:1039
+#: ../ProjectController.py:1195 -#: ../editors/DataTypeEditor.py:347
+#: ../editors/DataTypeEditor.py:348
+#: ../ProjectController.py:1300 -#: ../Beremiz_service.py:385
+#: ../Beremiz_service.py:331 -#: ../Beremiz_service.py:370
+#: ../Beremiz_service.py:316 msgid "Enter a port number "
-#: ../Beremiz_service.py:360
+#: ../Beremiz_service.py:307 msgid "Enter the IP of the interface to bind"
@@ -1435,80 +1493,81 @@
-#: ../Beremiz_service.py:271 ../controls/VariablePanel.py:332
-#: ../controls/VariablePanel.py:681 ../controls/DebugVariablePanel.py:379
-#: ../IDEFrame.py:966 ../IDEFrame.py:1553 ../IDEFrame.py:1590
-#: ../IDEFrame.py:1595 ../IDEFrame.py:1609 ../IDEFrame.py:1614
-#: ../IDEFrame.py:2290 ../Beremiz.py:1131 ../PLCOpenEditor.py:337
-#: ../PLCOpenEditor.py:342 ../PLCOpenEditor.py:416 ../PLCOpenEditor.py:426
-#: ../editors/TextViewer.py:369 ../editors/DataTypeEditor.py:549
-#: ../editors/DataTypeEditor.py:554 ../editors/DataTypeEditor.py:578
-#: ../editors/DataTypeEditor.py:583 ../editors/DataTypeEditor.py:593
-#: ../editors/DataTypeEditor.py:744 ../editors/DataTypeEditor.py:751
-#: ../editors/Viewer.py:365 ../editors/LDViewer.py:666
-#: ../editors/LDViewer.py:882 ../editors/LDViewer.py:886
-#: ../ProjectController.py:225 ../dialogs/PouNameDialog.py:53
-#: ../dialogs/PouTransitionDialog.py:107
-#: ../dialogs/BrowseLocationsDialog.py:212 ../dialogs/ProjectDialog.py:71
-#: ../dialogs/SFCStepNameDialog.py:59 ../dialogs/ConnectionDialog.py:159
-#: ../dialogs/FBDVariableDialog.py:201 ../dialogs/PouActionDialog.py:104
-#: ../dialogs/BrowseValuesLibraryDialog.py:83 ../dialogs/PouDialog.py:132
-#: ../dialogs/SFCTransitionDialog.py:147
+#: ../dialogs/ForceVariableDialog.py:179 +#: ../dialogs/SearchInProjectDialog.py:168 ../dialogs/SFCStepNameDialog.py:60 #: ../dialogs/DurationEditorDialog.py:121
-#: ../dialogs/DurationEditorDialog.py:163
-#: ../dialogs/SearchInProjectDialog.py:157 ../dialogs/SFCStepDialog.py:130
+#: ../dialogs/DurationEditorDialog.py:163 ../dialogs/PouTransitionDialog.py:112 +#: ../dialogs/BlockPreviewDialog.py:236 ../dialogs/ProjectDialog.py:71 #: ../dialogs/ArrayTypeDialog.py:97 ../dialogs/ArrayTypeDialog.py:103
-#: ../dialogs/FBDBlockDialog.py:164 ../dialogs/ForceVariableDialog.py:179
+#: ../dialogs/PouNameDialog.py:54 ../dialogs/BrowseLocationsDialog.py:216 +#: ../dialogs/BrowseValuesLibraryDialog.py:83 ../dialogs/PouActionDialog.py:104 +#: ../dialogs/PouDialog.py:134 ../PLCOpenEditor.py:335 ../PLCOpenEditor.py:340 +#: ../PLCOpenEditor.py:420 ../PLCOpenEditor.py:430 ../editors/Viewer.py:423 +#: ../editors/LDViewer.py:666 ../editors/LDViewer.py:882 +#: ../editors/LDViewer.py:886 ../editors/DataTypeEditor.py:550 +#: ../editors/DataTypeEditor.py:555 ../editors/DataTypeEditor.py:579 +#: ../editors/DataTypeEditor.py:584 ../editors/DataTypeEditor.py:594 +#: ../editors/DataTypeEditor.py:745 ../editors/DataTypeEditor.py:752 +#: ../editors/TextViewer.py:389 ../editors/CodeFileEditor.py:783 +#: ../ProjectController.py:293 ../ProjectController.py:421 +#: ../ProjectController.py:428 ../controls/FolderTree.py:217 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:166 +#: ../controls/DebugVariablePanel/DebugVariableTextViewer.py:137 +#: ../controls/DebugVariablePanel/DebugVariableGraphicViewer.py:231 +#: ../controls/VariablePanel.py:402 ../controls/VariablePanel.py:772 +#: ../Beremiz.py:1203 ../IDEFrame.py:1003 ../IDEFrame.py:1614 +#: ../IDEFrame.py:1655 ../IDEFrame.py:1660 ../IDEFrame.py:1674 +#: ../IDEFrame.py:1679 ../Beremiz_service.py:211 -#: ../ProjectController.py:601
+#: ../ProjectController.py:727 msgid "Error : At least one configuration and one resource must be declared in PLC !\n"
-#: ../ProjectController.py:593
+#: ../ProjectController.py:719 msgid "Error : IEC to C compiler returned %d\n"
-#: ../ProjectController.py:534
+#: ../ProjectController.py:621 "Error in ST/IL/SFC code generator :\n"
-#: ../ConfigTreeNode.py:183
+#: ../ConfigTreeNode.py:216 msgid "Error while saving \"%s\"\n"
-#: ../canfestival/canfestival.py:144
+#: ../canfestival/canfestival.py:168 msgid "Error: Export slave failed\n"
-#: ../canfestival/canfestival.py:345
+#: ../canfestival/canfestival.py:369 msgid "Error: No Master generated\n"
-#: ../canfestival/canfestival.py:340
+#: ../canfestival/canfestival.py:364 msgid "Error: No PLC built\n"
-#: ../ProjectController.py:1416
+#: ../ProjectController.py:1666 msgid "Exception while connecting %s!\n"
-#: ../dialogs/FBDBlockDialog.py:95
+#: ../dialogs/FBDBlockDialog.py:117 msgid "Execution Control:"
-#: ../dialogs/FBDVariableDialog.py:76 ../dialogs/FBDBlockDialog.py:87
+#: ../dialogs/FBDVariableDialog.py:79 ../dialogs/FBDBlockDialog.py:105
msgid "Experimental web based HMI"
@@ -1520,54 +1579,52 @@
-#: ../canfestival/canfestival.py:150
+#: ../canfestival/canfestival.py:174 msgid "Export CanOpen slave to EDS file"
-#: ../controls/DebugVariablePanel.py:1472 ../editors/GraphicViewer.py:144
+#: ../controls/DebugVariablePanel/DebugVariablePanel.py:243 msgid "Export graph values to clipboard"
-#: ../canfestival/canfestival.py:149
+#: ../canfestival/canfestival.py:173 -#: ../dialogs/FBDVariableDialog.py:69
+#: ../dialogs/FBDVariableDialog.py:89 -#: ../controls/VariablePanel.py:77
+#: ../controls/VariablePanel.py:72 -#: ../ProjectController.py:605
+#: ../ProjectController.py:740 msgid "Extracting Located Variables...\n"
-#: ../controls/ProjectPropertiesPanel.py:143
-#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31
-#: ../dialogs/PouDialog.py:36
+#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 -#: ../ProjectController.py:1480
+#: ../ProjectController.py:1729 msgid "Failed : Must build before transfer.\n"
-#: ../editors/Viewer.py:404 ../dialogs/LDElementDialog.py:84
+#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:462 -#: ../plcopen/structures.py:216
-"Falling edge detector\n"
-"The output produces a single pulse when a falling edge is detected."
-#: ../ProjectController.py:927
+#: ../ProjectController.py:1008 msgid "Fatal : cannot get builder.\n"
#: ../dialogs/DurationEditorDialog.py:160
msgid "Field %s hasn't a valid value!"
@@ -1578,16 +1635,21 @@
msgid "Fields %s haven't a valid value!"
-#: ../IDEFrame.py:358 ../dialogs/FindInPouDialog.py:30
-#: ../dialogs/FindInPouDialog.py:99
+#: ../controls/FolderTree.py:216 +msgid "File '%s' already exists!" +#: ../dialogs/SearchInProjectDialog.py:100 ../dialogs/FindInPouDialog.py:36 +#: ../dialogs/FindInPouDialog.py:106 ../IDEFrame.py:375
@@ -1595,15 +1657,15 @@
-#: ../dialogs/FindInPouDialog.py:51
+#: ../dialogs/FindInPouDialog.py:57 -#: ../connectors/PYRO/__init__.py:125
+#: ../connectors/PYRO/__init__.py:163 msgid "Force runtime reload\n"
-#: ../controls/DebugVariablePanel.py:1934 ../editors/Viewer.py:1385
+#: ../editors/Viewer.py:1553 @@ -1611,75 +1673,73 @@
msgid "Forcing Variable Value"
-#: ../dialogs/PouTransitionDialog.py:97 ../dialogs/ProjectDialog.py:70
-#: ../dialogs/PouActionDialog.py:94 ../dialogs/PouDialog.py:114
-#: ../dialogs/SFCTransitionDialog.py:147
+#: ../dialogs/SFCTransitionDialog.py:179 ../dialogs/PouTransitionDialog.py:102 +#: ../dialogs/ProjectDialog.py:70 ../dialogs/PouActionDialog.py:94 +#: ../dialogs/PouDialog.py:116 msgid "Form isn't complete. %s must be filled!"
-#: ../dialogs/ConnectionDialog.py:149 ../dialogs/FBDBlockDialog.py:154
+#: ../dialogs/SFCStepDialog.py:144 ../dialogs/FBDBlockDialog.py:232 +#: ../dialogs/ConnectionDialog.py:160 msgid "Form isn't complete. Name must be filled!"
-#: ../dialogs/SearchInProjectDialog.py:145
-msgid "Form isn't complete. Pattern to search must be filled!"
-#: ../dialogs/FBDBlockDialog.py:152
+#: ../dialogs/FBDBlockDialog.py:228 msgid "Form isn't complete. Valid block type must be selected!"
-#: ../dialogs/FindInPouDialog.py:67
+#: ../dialogs/FindInPouDialog.py:74 -#: ../dialogs/SearchInProjectDialog.py:44
+#: ../dialogs/SearchInProjectDialog.py:36 ../IDEFrame.py:1746
-#: ../IDEFrame.py:1845 ../dialogs/SearchInProjectDialog.py:45
+#: ../dialogs/SearchInProjectDialog.py:37 ../IDEFrame.py:1745 -#: ../controls/VariablePanel.py:744
+#: ../controls/VariablePanel.py:825 msgid "Function Block Types"
-#: ../PLCControler.py:94
+#: ../PLCControler.py:95 -#: ../editors/Viewer.py:236
+#: ../editors/Viewer.py:248 msgid "Function Blocks can't be used in Functions!"
-#: ../PLCControler.py:2180
+#: ../PLCControler.py:2337 msgid "FunctionBlock \"%s\" can't be pasted in a Function!!!"
-#: ../PLCControler.py:94
+#: ../PLCControler.py:95 -#: ../PLCOpenEditor.py:119
+#: ../PLCOpenEditor.py:115 -#: ../ProjectController.py:524
+#: ../ProjectController.py:612 msgid "Generating SoftPLC IEC-61131 ST/IL/SFC code...\n"
-#: ../controls/VariablePanel.py:78
+#: ../controls/VariablePanel.py:73 -#: ../controls/DebugVariablePanel.py:1471 ../editors/GraphicViewer.py:131
+#: ../controls/DebugVariablePanel/DebugVariablePanel.py:242 msgid "Go to current value"
@@ -1699,6 +1759,10 @@
+#: ../runtime/NevowServer.py:181 +msgid "HTTP interface port :" #: ../controls/ProjectPropertiesPanel.py:120
@@ -1715,87 +1779,81 @@
-#: ../plcopen/structures.py:278
-"The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2."
-#: ../ProjectController.py:851
-msgid "IEC-61131-3 code generation failed !\n"
-#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31
-#: ../dialogs/PouDialog.py:36
+#: ../dialogs/PouActionDialog.py:31 ../dialogs/PouDialog.py:36 -#: ../Beremiz_service.py:361 ../Beremiz_service.py:362
+#: ../dialogs/DiscoveryDialog.py:94 +#: ../Beremiz_service.py:308 ../Beremiz_service.py:309 -#: ../svgui/svgui.py:17 ../svgui/svgui.py:18
+#: ../svgui/svgui.py:42 ../svgui/svgui.py:43 -#: ../controls/VariablePanel.py:76 ../editors/Viewer.py:1412
-#: ../dialogs/FBDVariableDialog.py:34
+#: ../dialogs/FBDVariableDialog.py:38 ../editors/Viewer.py:1580 +#: ../controls/VariablePanel.py:71 -#: ../editors/Viewer.py:999
+#: ../editors/Viewer.py:1100 -#: ../controls/VariablePanel.py:265
-msgid "Incompatible data types between \"%s\" and \"%s\""
-#: ../controls/VariablePanel.py:274
-msgid "Incompatible size of data between \"%s\" and \"%s\""
-#: ../controls/VariablePanel.py:270
+#: ../controls/VariablePanel.py:276 +msgid "Incompatible data types between \"{a1}\" and \"{a2}\"" +#: ../controls/VariablePanel.py:282 msgid "Incompatible size of data between \"%s\" and \"BOOL\""
-#: ../dialogs/ActionBlockDialog.py:37
+#: ../controls/VariablePanel.py:286 +msgid "Incompatible size of data between \"{a1}\" and \"{a2}\"" +#: ../dialogs/ActionBlockDialog.py:38 -#: ../editors/Viewer.py:491
+#: ../editors/Viewer.py:552 -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
-#: ../editors/DataTypeEditor.py:50
+#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 -#: ../editors/DataTypeEditor.py:184 ../editors/DataTypeEditor.py:215
-#: ../editors/DataTypeEditor.py:271 ../editors/DataTypeEditor.py:309
+#: ../editors/DataTypeEditor.py:185 ../editors/DataTypeEditor.py:216 +#: ../editors/DataTypeEditor.py:272 ../editors/DataTypeEditor.py:310
-#: ../dialogs/ActionBlockDialog.py:41 ../dialogs/SFCTransitionDialog.py:66
-#: ../dialogs/SFCTransitionDialog.py:137
+#: ../dialogs/SFCTransitionDialog.py:75 ../dialogs/ActionBlockDialog.py:42 -#: ../controls/VariablePanel.py:76 ../editors/Viewer.py:1410
-#: ../dialogs/BrowseLocationsDialog.py:35 ../dialogs/FBDVariableDialog.py:33
-#: ../dialogs/SFCStepDialog.py:61
+#: ../dialogs/SFCStepDialog.py:70 ../dialogs/FBDVariableDialog.py:37 +#: ../dialogs/BrowseLocationsDialog.py:40 ../editors/Viewer.py:289 +#: ../editors/Viewer.py:1578 ../editors/TextViewer.py:307 +#: ../controls/LocationCellEditor.py:98 ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 -#: ../dialogs/FBDBlockDialog.py:78
+#: ../dialogs/FBDBlockDialog.py:93 @@ -1803,22 +1861,16 @@
-#: ../plcopen/plcopen.py:1843
+#: ../plcopen/plcopen.py:1691 msgid "Instance with id %d doesn't exist!"
-#: ../editors/ResourceEditor.py:255
+#: ../editors/ResourceEditor.py:264 -#: ../plcopen/structures.py:258
-"The integral function block integrates the value of input XIN over time."
-#: ../controls/VariablePanel.py:75
+#: ../controls/VariablePanel.py:70 @@ -1830,33 +1882,40 @@
-#: ../PLCControler.py:2157 ../PLCControler.py:2195
+#: ../PLCControler.py:2325 msgid "Invalid plcopen element(s)!!!"
-#: ../canfestival/config_utils.py:376 ../canfestival/config_utils.py:637
+#: ../canfestival/config_utils.py:381 +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location\"{a4}\"" +#: ../canfestival/config_utils.py:645 +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location \"{a4}\"" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:132 +#: ../controls/DebugVariablePanel/DebugVariableTextViewer.py:92 +#: ../controls/DebugVariablePanel/DebugVariableGraphicViewer.py:166 -msgid "Invalid type \"%s\"-> %d != %d for location\"%s\""
+msgid "Invalid value \"%s\" for debug variable" +#: ../controls/VariablePanel.py:255 ../controls/VariablePanel.py:258 +msgid "Invalid value \"%s\" for variable grid element" +#: ../editors/Viewer.py:233 ../editors/Viewer.py:236 +msgid "Invalid value \"%s\" for viewer block" #: ../dialogs/ForceVariableDialog.py:177
-msgid "Invalid value \"%s\" for \"%s\" variable!"
-#: ../controls/DebugVariablePanel.py:319 ../controls/DebugVariablePanel.py:322
-msgid "Invalid value \"%s\" for debug variable"
-#: ../controls/VariablePanel.py:244 ../controls/VariablePanel.py:247
-msgid "Invalid value \"%s\" for variable grid element"
-#: ../editors/Viewer.py:221 ../editors/Viewer.py:224
-msgid "Invalid value \"%s\" for viewer block"
+msgid "Invalid value \"{a1}\" for \"{a2}\" variable!" #: ../dialogs/DurationEditorDialog.py:121
@@ -1865,13 +1924,12 @@
"You must fill a numeric value."
-#: ../editors/Viewer.py:496
+#: ../editors/Viewer.py:557 ../editors/Viewer.py:2343 -#: ../controls/ProjectPropertiesPanel.py:143
-#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31
-#: ../dialogs/PouDialog.py:36
+#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 @@ -1880,8 +1938,8 @@
msgid "Ladder element with id %d is on more than one rung."
-#: ../dialogs/PouTransitionDialog.py:86 ../dialogs/PouActionDialog.py:83
-#: ../dialogs/PouDialog.py:102
+#: ../dialogs/PouTransitionDialog.py:91 ../dialogs/PouActionDialog.py:83 +#: ../dialogs/PouDialog.py:104 @@ -1889,28 +1947,28 @@
msgid "Language (optional):"
-#: ../dialogs/PouTransitionDialog.py:60 ../dialogs/PouActionDialog.py:56
-#: ../dialogs/PouDialog.py:71
+#: ../dialogs/PouTransitionDialog.py:65 ../dialogs/PouActionDialog.py:56 +#: ../dialogs/PouDialog.py:73 -#: ../ProjectController.py:1486
+#: ../ProjectController.py:1735 msgid "Latest build already matches current target. Transfering anyway...\n"
-#: ../Beremiz_service.py:331
+#: ../Beremiz_service.py:271 msgid "Launch WX GUI inspector"
-#: ../Beremiz_service.py:330
+#: ../Beremiz_service.py:270 msgid "Launch a live Python shell"
-#: ../editors/Viewer.py:427
+#: ../editors/Viewer.py:485 -#: ../dialogs/LDPowerRailDialog.py:55
+#: ../dialogs/LDPowerRailDialog.py:62 @@ -1926,35 +1984,39 @@
msgid "Less than or equal to"
+#: ../dialogs/AboutDialog.py:143 #: ../plcopen/iec_std.csv:73
-#: ../targets/toolchain_gcc.py:142
+#: ../targets/toolchain_gcc.py:166 -#: ../controls/VariablePanel.py:77 ../dialogs/DiscoveryDialog.py:110
+#: ../dialogs/DiscoveryDialog.py:111 ../controls/VariablePanel.py:72 -#: ../canfestival/canfestival.py:322
+#: ../canfestival/canfestival.py:346 -#: ../ProjectController.py:1391
+#: ../ProjectController.py:1641 msgid "Local service discovery failed!\n"
-#: ../controls/VariablePanel.py:58
+#: ../controls/VariablePanel.py:53 -#: ../dialogs/BrowseLocationsDialog.py:68
+#: ../dialogs/BrowseLocationsDialog.py:72 msgid "Locations available:"
@@ -1962,41 +2024,43 @@
msgid "Logarithm to base 10"
-#: ../connectors/PYRO/__init__.py:55
+#: ../connectors/PYRO/__init__.py:94 msgid "MDNS resolution failure for '%s'\n"
-#: ../canfestival/SlaveEditor.py:41 ../canfestival/NetworkEditor.py:62
+#: ../canfestival/SlaveEditor.py:64 ../canfestival/NetworkEditor.py:85
msgid "Map located variables over CANopen"
-#: ../canfestival/NetworkEditor.py:83
+#: ../canfestival/NetworkEditor.py:106 -#: ../ConfigTreeNode.py:500
-msgid "Max count (%d) reached for this confnode of type %s "
+#: ../ConfigTreeNode.py:539 +msgid "Max count ({a1}) reached for this confnode of type {a2} " #: ../plcopen/iec_std.csv:71
-#: ../editors/DataTypeEditor.py:238
+#: ../editors/DataTypeEditor.py:239 -#: ../dialogs/BrowseLocationsDialog.py:37
+#: ../dialogs/BrowseLocationsDialog.py:42 ../editors/Viewer.py:289 +#: ../editors/TextViewer.py:307 ../controls/LocationCellEditor.py:98 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351
@@ -2004,7 +2068,7 @@
-#: ../editors/Viewer.py:432
+#: ../editors/Viewer.py:490 @@ -2016,7 +2080,7 @@
-#: ../editors/DataTypeEditor.py:225
+#: ../editors/DataTypeEditor.py:226 @@ -2028,60 +2092,52 @@
-#: ../dialogs/LDElementDialog.py:59
+#: ../dialogs/LDElementDialog.py:63 -#: ../PLCGenerator.py:732 ../PLCGenerator.py:975
-msgid "More than one connector found corresponding to \"%s\" continuation in \"%s\" POU"
-#: ../dialogs/ActionBlockDialog.py:141
-msgid "Move action down"
+#: ../PLCGenerator.py:786 ../PLCGenerator.py:1230 +msgid "More than one connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" #: ../dialogs/ActionBlockDialog.py:140
+msgid "Move action down" +#: ../dialogs/ActionBlockDialog.py:139 -#: ../controls/DebugVariablePanel.py:1532
-msgid "Move debug variable down"
-#: ../controls/DebugVariablePanel.py:1531
-msgid "Move debug variable up"
#: ../controls/CustomEditableListBox.py:43
-#: ../editors/DataTypeEditor.py:354
+#: ../editors/DataTypeEditor.py:355 msgid "Move element down"
-#: ../editors/DataTypeEditor.py:353
+#: ../editors/DataTypeEditor.py:354 -#: ../editors/ResourceEditor.py:262
+#: ../editors/ResourceEditor.py:271 msgid "Move instance down"
-#: ../editors/ResourceEditor.py:261
+#: ../editors/ResourceEditor.py:270 -#: ../editors/ResourceEditor.py:233
+#: ../editors/ResourceEditor.py:242 -#: ../editors/ResourceEditor.py:232
+#: ../editors/ResourceEditor.py:241 -#: ../IDEFrame.py:82 ../IDEFrame.py:97 ../IDEFrame.py:127 ../IDEFrame.py:168
+#: ../IDEFrame.py:99 ../IDEFrame.py:114 ../IDEFrame.py:144 ../IDEFrame.py:185 @@ -2089,11 +2145,11 @@
-#: ../controls/VariablePanel.py:383 ../c_ext/CFileEditor.py:520
+#: ../editors/CodeFileEditor.py:661 ../controls/VariablePanel.py:453 msgid "Move variable down"
-#: ../controls/VariablePanel.py:382 ../c_ext/CFileEditor.py:519
+#: ../editors/CodeFileEditor.py:660 ../controls/VariablePanel.py:452 @@ -2109,19 +2165,22 @@
-#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
-#: ../editors/DataTypeEditor.py:50 ../editors/ResourceEditor.py:68
-#: ../editors/ResourceEditor.py:77
+#: ../dialogs/DiscoveryDialog.py:92 +#: ../editors/ResourceEditor.py:68 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 -#: ../Beremiz_service.py:386
+#: ../Beremiz_service.py:332 msgid "Name must not be null!"
-#: ../dialogs/ConnectionDialog.py:65 ../dialogs/FBDVariableDialog.py:89
-#: ../dialogs/LDElementDialog.py:88 ../dialogs/SFCStepDialog.py:51
-#: ../dialogs/FBDBlockDialog.py:70
+#: ../dialogs/SFCStepDialog.py:56 ../dialogs/FBDBlockDialog.py:83 +#: ../dialogs/ConnectionDialog.py:75 @@ -2129,12 +2188,20 @@
msgid "Natural logarithm"
-#: ../editors/Viewer.py:402 ../dialogs/LDElementDialog.py:67
+#: ../dialogs/LDElementDialog.py:75 ../editors/Viewer.py:460 -#: ../Beremiz.py:309 ../Beremiz.py:344 ../PLCOpenEditor.py:106
-#: ../PLCOpenEditor.py:148
+#: ../Beremiz_service.py:578 +msgid "Nevow Web service failed. " +#: ../Beremiz_service.py:554 +msgid "Nevow/Athena import failed :" +#: ../PLCOpenEditor.py:102 ../PLCOpenEditor.py:144 ../Beremiz.py:321 @@ -2142,94 +2209,91 @@
-#: ../editors/Viewer.py:401
+#: ../editors/Viewer.py:459 -#: ../PLCControler.py:3054
-msgid "No PLC project found"
-#: ../ProjectController.py:1513
+#: ../ProjectController.py:1763 msgid "No PLC to transfer (did build succeed ?)\n"
-#: ../PLCGenerator.py:1360
+#: ../PLCGenerator.py:1631 msgid "No body defined in \"%s\" POU"
-#: ../PLCGenerator.py:751 ../PLCGenerator.py:984
-msgid "No connector found corresponding to \"%s\" continuation in \"%s\" POU"
-#: ../PLCOpenEditor.py:349
+#: ../PLCGenerator.py:806 ../PLCGenerator.py:1241 +msgid "No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +#: ../PLCOpenEditor.py:347 "No documentation available.\n"
-#: ../PLCGenerator.py:773
+#: ../PLCGenerator.py:829 msgid "No informations found for \"%s\" block"
-#: ../plcopen/structures.py:166
-msgid "No output variable found"
+#: ../PLCGenerator.py:1194 +msgid "No output {a1} variable found in block {a2} in POU {a3}. Connection must be broken" #: ../controls/SearchResultPanel.py:169
msgid "No search results available."
+#: ../svgui/svgui.py:131 msgid "No such SVG file: %s\n"
-#: ../canfestival/config_utils.py:632
-msgid "No such index/subindex (%x,%x) (variable %s)"
-#: ../canfestival/config_utils.py:361
-msgid "No such index/subindex (%x,%x) in ID : %d (variable %s)"
+#: ../canfestival/config_utils.py:639 +msgid "No such index/subindex ({a1},{a2}) (variable {a3})" +#: ../canfestival/config_utils.py:362 +msgid "No such index/subindex ({a1},{a2}) in ID : {a3} (variable {a4})" #: ../dialogs/BrowseValuesLibraryDialog.py:83
msgid "No valid value selected!"
-#: ../PLCGenerator.py:1358
+#: ../PLCGenerator.py:1629 msgid "No variable defined in \"%s\" POU"
-#: ../canfestival/config_utils.py:354
-msgid "Non existing node ID : %d (variable %s)"
-#: ../controls/VariablePanel.py:69
+#: ../canfestival/config_utils.py:355 +msgid "Non existing node ID : {a1} (variable {a2})" +#: ../controls/VariablePanel.py:64 -#: ../dialogs/LDElementDialog.py:62
+#: ../dialogs/LDElementDialog.py:75 -#: ../canfestival/config_utils.py:383
-msgid "Not PDO mappable variable : '%s' (ID:%d,Idx:%x,sIdx:%x))"
+#: ../canfestival/config_utils.py:389 +msgid "Not PDO mappable variable : '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))" #: ../plcopen/iec_std.csv:80
-#: ../dialogs/SFCDivergenceDialog.py:80
+#: ../dialogs/SFCDivergenceDialog.py:89 msgid "Number of sequences:"
@@ -2237,44 +2301,36 @@
-#: ../plcopen/structures.py:246
-"The off-delay timer can be used to delay setting an output false, for fixed period after input goes false."
-#: ../plcopen/structures.py:241
-"The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true."
-#: ../dialogs/SearchInProjectDialog.py:93
+#: ../dialogs/SearchInProjectDialog.py:86 -#: ../Beremiz.py:311 ../Beremiz.py:345 ../PLCOpenEditor.py:108
-#: ../PLCOpenEditor.py:149
+#: ../PLCOpenEditor.py:104 ../PLCOpenEditor.py:145 ../Beremiz.py:323 -#: ../svgui/svgui.py:107
+#: ../svgui/svgui.py:140 -#: ../ProjectController.py:1565
+msgid "Open Source framework for automation, implemented IEC 61131 IDE with constantly growing set of extensions and flexible PLC runtime." +#: ../ProjectController.py:1815 msgid "Open a file explorer to manage project files"
-#: ../wxglade_hmi/wxglade_hmi.py:109
+#: ../wxglade_hmi/wxglade_hmi.py:138 -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
+#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 -#: ../dialogs/FindInPouDialog.py:76
+#: ../dialogs/FindInPouDialog.py:83 @@ -2282,63 +2338,99 @@
msgid "Organization (optional):"
-#: ../canfestival/SlaveEditor.py:51 ../canfestival/NetworkEditor.py:72
+#: ../canfestival/SlaveEditor.py:74 ../canfestival/NetworkEditor.py:95 -#: ../controls/VariablePanel.py:76 ../editors/Viewer.py:1411
-#: ../dialogs/BrowseLocationsDialog.py:36 ../dialogs/FBDVariableDialog.py:35
-#: ../dialogs/SFCStepDialog.py:65
+#: ../dialogs/SFCStepDialog.py:71 ../dialogs/FBDVariableDialog.py:39 +#: ../dialogs/BrowseLocationsDialog.py:41 ../editors/Viewer.py:289 +#: ../editors/Viewer.py:1579 ../editors/TextViewer.py:307 +#: ../controls/LocationCellEditor.py:98 ../controls/VariablePanel.py:71 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 -#: ../canfestival/SlaveEditor.py:40 ../canfestival/NetworkEditor.py:61
+#: ../canfestival/SlaveEditor.py:63 ../canfestival/NetworkEditor.py:84 -#: ../canfestival/SlaveEditor.py:39 ../canfestival/NetworkEditor.py:60
+#: ../canfestival/SlaveEditor.py:62 ../canfestival/NetworkEditor.py:83 -#: ../plcopen/structures.py:268
+#: ../targets/toolchain_gcc.py:131 +#: ../ProjectController.py:992 +msgid "PLC code generation failed !\n" +#: ../Beremiz_service.py:295 +msgid "PLC is empty or already started." +#: ../Beremiz_service.py:302 +msgid "PLC is not started." +#: ../PLCOpenEditor.py:196 ../PLCOpenEditor.py:309
-"The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control."
-#: ../targets/toolchain_gcc.py:107
-#: ../PLCOpenEditor.py:294 ../PLCOpenEditor.py:370
+"PLC syntax error at line {a1}:\n" +#: ../PLCOpenEditor.py:292 ../PLCOpenEditor.py:373 msgid "PLCOpen files (*.xml)|*.xml|All files|*.*"
-#: ../PLCOpenEditor.py:156 ../PLCOpenEditor.py:212
+#: ../PLCOpenEditor.py:152 ../PLCOpenEditor.py:209 -#: ../dialogs/PouDialog.py:98
-#: ../dialogs/PouDialog.py:56
+#: ../PLCOpenEditor.py:355 +"PLCOpenEditor is part of Beremiz project.\n" +#: ../dialogs/DiscoveryDialog.py:95 #: ../dialogs/PouDialog.py:100
+#: ../dialogs/PouDialog.py:58 +#: ../dialogs/PouDialog.py:102 -#: ../dialogs/PouDialog.py:63
+#: ../dialogs/PouDialog.py:65 -#: ../Beremiz.py:324 ../PLCOpenEditor.py:122
+#: ../connectors/PYRO/__init__.py:45 +msgid "PYRO connecting to URI : %s\n" +#: ../connectors/PYRO/__init__.py:61 +msgid "PYRO using certificates in '%s' \n" +#: ../PLCOpenEditor.py:118 ../Beremiz.py:336 @@ -2346,88 +2438,88 @@
msgid "Page Size (optional):"
-#: ../controls/PouInstanceVariablesPanel.py:48
+#: ../controls/PouInstanceVariablesPanel.py:124 -#: ../IDEFrame.py:355 ../IDEFrame.py:407 ../editors/Viewer.py:537
+#: ../editors/Viewer.py:598 ../IDEFrame.py:372 ../IDEFrame.py:426
-#: ../dialogs/SearchInProjectDialog.py:64
+#: ../dialogs/SearchInProjectDialog.py:56 msgid "Pattern to search:"
-#: ../dialogs/LDPowerRailDialog.py:64
+#: ../dialogs/LDPowerRailDialog.py:73 -#: ../editors/Viewer.py:2363 ../editors/Viewer.py:2670
-#: ../editors/SFCViewer.py:696
+#: ../editors/Viewer.py:2706 ../editors/Viewer.py:2963 +#: ../editors/SFCViewer.py:770 msgid "Please choose a target"
-#: ../editors/Viewer.py:2186 ../editors/Viewer.py:2188
-#: ../editors/Viewer.py:2706 ../editors/Viewer.py:2708
+#: ../editors/TextViewer.py:262 +msgid "Please enter a block name" +#: ../editors/Viewer.py:2576 ../editors/Viewer.py:3005 msgid "Please enter comment text"
-#: ../editors/SFCViewer.py:359 ../editors/SFCViewer.py:381
-#: ../editors/SFCViewer.py:725
+#: ../editors/SFCViewer.py:433 ../editors/SFCViewer.py:455 +#: ../editors/SFCViewer.py:799 msgid "Please enter step name"
+#: ../Beremiz_service.py:194 +msgid "Please enter text" #: ../dialogs/ForceVariableDialog.py:163
msgid "Please enter value for a \"%s\" variable:"
-#: ../Beremiz_service.py:371
+#: ../Beremiz_service.py:317 msgid "Port number must be 0 <= port <= 65535!"
-#: ../Beremiz_service.py:371
+#: ../Beremiz_service.py:317 msgid "Port number must be an integer!"
-#: ../editors/GraphicViewer.py:105
-#: ../editors/Viewer.py:475
+#: ../editors/Viewer.py:536 ../editors/Viewer.py:2367 -#: ../dialogs/LDPowerRailDialog.py:36
+#: ../dialogs/LDPowerRailDialog.py:50 msgid "Power Rail Properties"
-#: ../Beremiz.py:326 ../PLCOpenEditor.py:124
+#: ../PLCOpenEditor.py:120 ../Beremiz.py:338 -#: ../dialogs/SFCDivergenceDialog.py:93 ../dialogs/LDPowerRailDialog.py:78
-#: ../dialogs/ConnectionDialog.py:78 ../dialogs/FBDVariableDialog.py:97
-#: ../dialogs/SFCTransitionDialog.py:96 ../dialogs/LDElementDialog.py:101
-#: ../dialogs/SFCStepDialog.py:79 ../dialogs/FBDBlockDialog.py:103
+#: ../dialogs/BlockPreviewDialog.py:57 -#: ../Beremiz.py:328 ../Beremiz.py:348 ../PLCOpenEditor.py:126
-#: ../PLCOpenEditor.py:152
+#: ../PLCOpenEditor.py:122 ../PLCOpenEditor.py:148 ../Beremiz.py:340
@@ -2435,15 +2527,19 @@
-#: ../dialogs/SFCTransitionDialog.py:83
+#: ../dialogs/SFCTransitionDialog.py:89 -#: ../runtime/PLCObject.py:318
+#: ../runtime/PLCObject.py:370 msgid "Problem starting PLC : error %d"
+#: ../dialogs/ProjectDialog.py:55 #: ../controls/ProjectPropertiesPanel.py:80
msgid "Product Name (required):"
@@ -2452,27 +2548,32 @@
msgid "Product Release (optional):"
+#: ../dialogs/ProjectDialog.py:56 #: ../controls/ProjectPropertiesPanel.py:81
msgid "Product Version (required):"
-#: ../IDEFrame.py:1848 ../dialogs/SearchInProjectDialog.py:46
+#: ../dialogs/SearchInProjectDialog.py:38 ../IDEFrame.py:1744 -#: ../PLCOpenEditor.py:339
+#: ../PLCOpenEditor.py:337 msgid "Program was successfully generated!"
-#: ../PLCControler.py:95
+#: ../PLCControler.py:96 -#: ../editors/Viewer.py:230
+#: ../editors/Viewer.py:242 msgid "Programs can't be used by other POUs!"
-#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:557
+#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:584 @@ -2481,10 +2582,14 @@
-#: ../ProjectController.py:1564
+#: ../ProjectController.py:1814 +#: ../dialogs/ProjectDialog.py:54 #: ../controls/ProjectPropertiesPanel.py:78
msgid "Project Name (required):"
@@ -2493,103 +2598,96 @@
msgid "Project Version (optional):"
-#: ../PLCControler.py:3041
+#: ../PLCControler.py:3158 "Project file syntax error:\n"
-#: ../editors/ProjectNodeEditor.py:14 ../dialogs/ProjectDialog.py:32
+#: ../dialogs/ProjectDialog.py:32 ../editors/ProjectNodeEditor.py:37 msgid "Project properties"
-#: ../ConfigTreeNode.py:526
-msgid "Project tree layout do not match confnode.xml %s!=%s "
-#: ../dialogs/ConnectionDialog.py:96
+#: ../ConfigTreeNode.py:566 +msgid "Project tree layout do not match confnode.xml {a1}!={a2} " +#: ../dialogs/ConnectionDialog.py:94 -#: ../PLCControler.py:96
+#: ../PLCControler.py:97 -#: ../plcopen/structures.py:236
-"The pulse timer can be used to generate output pulses of a given time duration."
-#: ../py_ext/PythonEditor.py:61
+#: ../Beremiz_service.py:440 +msgid "Publishing service on local network" +#: ../connectors/PYRO/__init__.py:118 +msgid "Pyro exception: %s\n" +#: ../Beremiz_service.py:427 +msgid "Pyro object's uri :" +#: ../Beremiz_service.py:426 +#: ../py_ext/PythonEditor.py:81
-#: ../dialogs/ActionBlockDialog.py:37
+#: ../dialogs/ActionBlockDialog.py:38 -#: ../Beremiz_service.py:333 ../Beremiz.py:331 ../PLCOpenEditor.py:132
+#: ../PLCOpenEditor.py:128 ../Beremiz.py:343 ../Beremiz_service.py:273 -#: ../plcopen/structures.py:201
-"The RS bistable is a latch where the Reset dominates."
-#: ../plcopen/structures.py:273
-"The RAMP function block is modelled on example given in the standard."
-#: ../controls/DebugVariablePanel.py:1462 ../editors/GraphicViewer.py:89
+#: ../controls/DebugVariablePanel/DebugVariablePanel.py:225 -#: ../ProjectController.py:1560
+#: ../ProjectController.py:1810 -#: ../plcopen/structures.py:253
-"The real time clock has many uses including time stamping, setting dates and times of day in batch reports, in alarm messages and so on."
msgid "Really delete node '%s'?"
-#: ../IDEFrame.py:345 ../IDEFrame.py:403
+#: ../IDEFrame.py:362 ../IDEFrame.py:422 -#: ../dialogs/SFCTransitionDialog.py:57 ../dialogs/SFCTransitionDialog.py:135
+#: ../dialogs/SFCTransitionDialog.py:74 -#: ../IDEFrame.py:413 ../dialogs/DiscoveryDialog.py:105
+#: ../dialogs/DiscoveryDialog.py:106 ../IDEFrame.py:432 -#: ../dialogs/SearchInProjectDialog.py:73
+#: ../dialogs/SearchInProjectDialog.py:66 msgid "Regular expression"
-#: ../dialogs/FindInPouDialog.py:91
+#: ../dialogs/FindInPouDialog.py:98 msgid "Regular expressions"
-#: ../controls/DebugVariablePanel.py:1938 ../editors/Viewer.py:1388
+#: ../editors/Viewer.py:1556 @@ -2597,20 +2695,24 @@
msgid "Remainder (modulo)"
-#: ../dialogs/ActionBlockDialog.py:139
+#: ../dialogs/ActionBlockDialog.py:138 -#: ../controls/DebugVariablePanel.py:1530
-msgid "Remove debug variable"
-#: ../editors/DataTypeEditor.py:352
+#: ../editors/DataTypeEditor.py:353 @@ -2618,23 +2720,23 @@
msgid "Remove file from left folder"
-#: ../editors/ResourceEditor.py:260
+#: ../editors/ResourceEditor.py:269 -#: ../canfestival/NetworkEditor.py:81
+#: ../canfestival/NetworkEditor.py:104 -#: ../editors/ResourceEditor.py:231
+#: ../editors/ResourceEditor.py:240 -#: ../controls/VariablePanel.py:381 ../c_ext/CFileEditor.py:518
+#: ../editors/CodeFileEditor.py:659 ../controls/VariablePanel.py:451
@@ -2642,6 +2744,10 @@
+#: ../editors/Viewer.py:502 +msgid "Replace Wire by connections" #: ../plcopen/iec_std.csv:89
msgid "Replacement (within)"
@@ -2650,11 +2756,11 @@
-#: ../editors/Viewer.py:521
+#: ../editors/Viewer.py:583 msgid "Reset Execution Order"
msgid "Reset Perspective"
@@ -2662,40 +2768,30 @@
msgid "Reset search result"
-#: ../editors/GraphicViewer.py:137
-msgid "Reset zoom and offset"
-#: ../PLCControler.py:96
+#: ../PLCControler.py:97 ../Beremiz.py:1075 -#: ../controls/VariablePanel.py:67
+#: ../controls/VariablePanel.py:62 -#: ../controls/VariablePanel.py:354
+#: ../controls/VariablePanel.py:424 -#: ../editors/Viewer.py:429
+#: ../editors/Viewer.py:487 -#: ../dialogs/LDPowerRailDialog.py:60
+#: ../dialogs/LDPowerRailDialog.py:63 -#: ../editors/Viewer.py:403 ../dialogs/LDElementDialog.py:80
+#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:461 -#: ../plcopen/structures.py:211
-"Rising edge detector\n"
-"The output produces a single pulse when a rising edge is detected."
#: ../plcopen/iec_std.csv:65
@@ -2708,72 +2804,83 @@
-#: ../ProjectController.py:1528
+#: ../ProjectController.py:1778 -#: ../ProjectController.py:865 ../ProjectController.py:874
-msgid "Runtime extensions C code generation failed !\n"
-#: ../canfestival/SlaveEditor.py:38 ../canfestival/NetworkEditor.py:59
+#: ../ProjectController.py:1037 +msgid "Runtime IO extensions C code generation failed !\n" +#: ../ProjectController.py:1046 +msgid "Runtime library extensions C code generation failed !\n" +#: ../canfestival/SlaveEditor.py:61 ../canfestival/NetworkEditor.py:82 -#: ../canfestival/SlaveEditor.py:37 ../canfestival/NetworkEditor.py:58
+#: ../canfestival/SlaveEditor.py:60 ../canfestival/NetworkEditor.py:81 -#: ../controls/ProjectPropertiesPanel.py:143 ../dialogs/PouDialog.py:36
+#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 -#: ../plcopen/structures.py:196
-"The SR bistable is a latch where the Set dominates."
-#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31
+#: ../PLCGenerator.py:1392 +msgid "SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"" +#: ../PLCGenerator.py:773 +msgid "SFC transition in POU \"%s\" must be connected." +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 #: ../dialogs/PouDialog.py:36
-#: ../PLCOpenEditor.py:326
+#: ../PLCOpenEditor.py:324 msgid "ST files (*.st)|*.st|All files|*.*"
+#: ../svgui/svgui.py:125 msgid "SVG files (*.svg)|*.svg|All files|*.*"
-#: ../Beremiz.py:315 ../Beremiz.py:346 ../PLCOpenEditor.py:115
-#: ../PLCOpenEditor.py:150
+#: ../PLCOpenEditor.py:111 ../PLCOpenEditor.py:146 ../Beremiz.py:327 -#: ../Beremiz.py:347 ../PLCOpenEditor.py:117 ../PLCOpenEditor.py:151
+#: ../PLCOpenEditor.py:113 ../PLCOpenEditor.py:147 ../Beremiz.py:359
-#: ../dialogs/SearchInProjectDialog.py:76
+#: ../ProjectController.py:420 +msgid "Save path is the same as path of a project! \n" +#: ../dialogs/SearchInProjectDialog.py:69 -#: ../IDEFrame.py:596 ../dialogs/SearchInProjectDialog.py:105
-#: ../IDEFrame.py:365 ../IDEFrame.py:409
-#: ../dialogs/SearchInProjectDialog.py:52
+#: ../dialogs/SearchInProjectDialog.py:44 ../IDEFrame.py:382 ../IDEFrame.py:428 msgid "Search in Project"
@@ -2781,50 +2888,53 @@
-#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:277
-#: ../editors/TextViewer.py:323 ../editors/Viewer.py:275
+#: ../editors/Viewer.py:288 ../editors/TextViewer.py:306 +#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:290 +#: ../controls/VariablePanel.py:350 msgid "Select a variable class:"
-#: ../ProjectController.py:1039
+#: ../ProjectController.py:1195 msgid "Select an editor:"
-#: ../controls/PouInstanceVariablesPanel.py:209
+#: ../controls/PouInstanceVariablesPanel.py:276 msgid "Select an instance"
+#: ../ProjectController.py:427 +msgid "Selected directory already contains another project. Overwrite? \n" #: ../plcopen/iec_std.csv:70
-#: ../dialogs/SFCDivergenceDialog.py:62
+#: ../dialogs/SFCDivergenceDialog.py:65 msgid "Selection Convergence"
-#: ../dialogs/SFCDivergenceDialog.py:55
+#: ../dialogs/SFCDivergenceDialog.py:64 msgid "Selection Divergence"
-#: ../plcopen/structures.py:206
-"The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources."
-#: ../dialogs/DiscoveryDialog.py:84
+#: ../dialogs/DiscoveryDialog.py:82 +msgid "Service Discovery" +#: ../dialogs/DiscoveryDialog.py:85 msgid "Services available:"
-#: ../dialogs/LDElementDialog.py:72
+#: ../dialogs/LDElementDialog.py:76 @@ -2836,27 +2946,27 @@
-#: ../ProjectController.py:1554
+#: ../ProjectController.py:1804 msgid "Show IEC code generated by PLCGenerator"
-#: ../canfestival/canfestival.py:363
+#: ../canfestival/canfestival.py:387 -#: ../canfestival/canfestival.py:364
+#: ../canfestival/canfestival.py:388 msgid "Show Master generated by config_utils"
-#: ../ProjectController.py:1552
+#: ../ProjectController.py:1802 -#: ../dialogs/SFCDivergenceDialog.py:74
+#: ../dialogs/SFCDivergenceDialog.py:67 msgid "Simultaneous Convergence"
-#: ../dialogs/SFCDivergenceDialog.py:68
+#: ../dialogs/SFCDivergenceDialog.py:66 msgid "Simultaneous Divergence"
@@ -2868,48 +2978,65 @@
+#: ../targets/toolchain_makefile.py:126 +msgid "Source didn't change, no build.\n" +#: ../PLCGenerator.py:397 +msgid "Source signal has to be defined for single task '{a1}' in resource '{a2}.{a3}'." #: ../plcopen/iec_std.csv:23
msgid "Square root (base 2)"
-#: ../plcopen/structures.py:192
+#: ../plcopen/definitions.py:46 msgid "Standard function blocks"
-#: ../Beremiz_service.py:321 ../ProjectController.py:1530
+#: ../ProjectController.py:1780 ../Beremiz_service.py:261 -#: ../ProjectController.py:843
+#: ../ProjectController.py:984 msgid "Start build in %s\n"
-#: ../ProjectController.py:1341
+#: ../ProjectController.py:1298 +#: ../ProjectController.py:1586
-#: ../editors/Viewer.py:492
+#: ../editors/Viewer.py:553 ../editors/Viewer.py:2342 -#: ../ProjectController.py:1533
+#: ../ProjectController.py:1783 -#: ../Beremiz_service.py:322
+#: ../Beremiz_service.py:262 -#: ../ProjectController.py:1535
+#: ../ProjectController.py:1785 -#: ../ProjectController.py:1318
+#: ../ProjectController.py:1299 +#: ../ProjectController.py:1558 msgid "Stopping debugger...\n"
@@ -2925,27 +3052,35 @@
-#: ../ProjectController.py:942
+#: ../ProjectController.py:1023 msgid "Successfully built.\n"
-#: ../dialogs/SearchInProjectDialog.py:154
+msgid "Switch perspective" +#: ../dialogs/SearchInProjectDialog.py:165 ../dialogs/FindInPouDialog.py:172 msgid "Syntax error in regular expression of pattern to search!"
+#: ../dialogs/DiscoveryDialog.py:93 #: ../plcopen/iec_std.csv:29
-#: ../editors/ResourceEditor.py:77
+#: ../editors/ResourceEditor.py:83 -#: ../editors/ResourceEditor.py:226
+#: ../editors/ResourceEditor.py:235 -#: ../controls/VariablePanel.py:78
+#: ../controls/VariablePanel.py:73 @@ -2960,16 +3095,16 @@
msgid "The group of block must be coherent!"
-#: ../IDEFrame.py:974 ../Beremiz.py:590
+#: ../Beremiz.py:640 ../IDEFrame.py:1011 msgid "There are changes, do you want to save?"
-#: ../IDEFrame.py:1590 ../IDEFrame.py:1609
+#: ../IDEFrame.py:1655 ../IDEFrame.py:1674 msgid "There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?"
"There was a problem printing.\n"
"Perhaps your current printer is not set correctly?"
@@ -2979,8 +3114,9 @@
msgid "This option isn't available yet!"
-#: ../editors/GraphicViewer.py:278
+#: ../controls/DebugVariablePanel/DebugVariablePanel.py:565 #: ../plcopen/iec_std.csv:40
@@ -3016,77 +3152,85 @@
msgid "Time-of-day subtraction"
-#: ../editors/Viewer.py:431
+#: ../editors/Viewer.py:489 -#: ../ProjectController.py:1542
+#: ../ProjectController.py:1792 -#: ../ProjectController.py:1544
+#: ../ProjectController.py:1794 -#: ../ProjectController.py:1509
+#: ../ProjectController.py:1758 msgid "Transfer completed successfully.\n"
-#: ../ProjectController.py:1511
+#: ../ProjectController.py:1760 msgid "Transfer failed\n"
-#: ../editors/Viewer.py:493
+#: ../editors/Viewer.py:554 ../editors/Viewer.py:2344 ../editors/Viewer.py:2371 -#: ../PLCGenerator.py:1252
+#: ../PLCGenerator.py:1518 msgid "Transition \"%s\" body must contain an output variable or coil referring to its name"
-#: ../dialogs/PouTransitionDialog.py:84
+#: ../dialogs/PouTransitionDialog.py:89 -#: ../dialogs/PouTransitionDialog.py:53
+#: ../dialogs/PouTransitionDialog.py:58 -#: ../PLCGenerator.py:1340
-msgid "Transition with content \"%s\" not connected to a next step in \"%s\" POU"
-#: ../PLCGenerator.py:1331
-msgid "Transition with content \"%s\" not connected to a previous step in \"%s\" POU"
-#: ../plcopen/plcopen.py:1447
+#: ../PLCGenerator.py:1609 +msgid "Transition with content \"{a1}\" not connected to a next step in \"{a2}\" POU" +#: ../PLCGenerator.py:1598 +msgid "Transition with content \"{a1}\" not connected to a previous step in \"{a2}\" POU" +#: ../plcopen/plcopen.py:1318 msgid "Transition with name %s doesn't exist!"
-#: ../PLCControler.py:95
+#: ../PLCControler.py:96 +#: ../dialogs/AboutDialog.py:123 #: ../editors/ResourceEditor.py:68
-#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59
-#: ../editors/DataTypeEditor.py:50 ../editors/ResourceEditor.py:77
-#: ../dialogs/ActionBlockDialog.py:37
+#: ../Beremiz_service.py:476 +msgid "Twisted unavailable." +#: ../dialogs/ActionBlockDialog.py:38 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 -#: ../dialogs/BrowseLocationsDialog.py:44
+#: ../dialogs/BrowseLocationsDialog.py:48 msgid "Type and derivated"
-#: ../canfestival/config_utils.py:335 ../canfestival/config_utils.py:617
+#: ../canfestival/config_utils.py:336 ../canfestival/config_utils.py:624 msgid "Type conflict for location \"%s\""
@@ -3095,122 +3239,117 @@
-#: ../editors/DataTypeEditor.py:161
+#: ../editors/DataTypeEditor.py:162 -#: ../dialogs/BrowseLocationsDialog.py:45
+#: ../dialogs/BrowseLocationsDialog.py:49 -#: ../dialogs/SFCDivergenceDialog.py:51 ../dialogs/LDPowerRailDialog.py:51
-#: ../dialogs/BrowseLocationsDialog.py:95 ../dialogs/ConnectionDialog.py:52
-#: ../dialogs/SFCTransitionDialog.py:53 ../dialogs/FBDBlockDialog.py:48
+#: ../dialogs/SFCDivergenceDialog.py:59 ../dialogs/SFCTransitionDialog.py:57 +#: ../dialogs/LDPowerRailDialog.py:56 ../dialogs/BrowseLocationsDialog.py:99 +#: ../dialogs/FBDBlockDialog.py:65 ../dialogs/ConnectionDialog.py:58 -#: ../canfestival/config_utils.py:455 ../canfestival/config_utils.py:469
+#: ../canfestival/config_utils.py:462 ../canfestival/config_utils.py:476 msgid "Unable to define PDO mapping for node %02x"
-#: ../targets/Xenomai/__init__.py:14
+#: ../targets/Xenomai/__init__.py:39 msgid "Unable to get Xenomai's %s \n"
-#: ../PLCGenerator.py:904 ../PLCGenerator.py:963
-msgid "Undefined block type \"%s\" in \"%s\" POU"
-#: ../PLCGenerator.py:252
+#: ../PLCGenerator.py:961 ../PLCGenerator.py:1214 +msgid "Undefined block type \"{a1}\" in \"{a2}\" POU" +#: ../PLCGenerator.py:254 msgid "Undefined pou type \"%s\""
-#: ../IDEFrame.py:343 ../IDEFrame.py:402
+#: ../IDEFrame.py:360 ../IDEFrame.py:421 -#: ../ProjectController.py:262
+#: ../ProjectController.py:332 -#: ../editors/Viewer.py:335
+#: ../editors/Viewer.py:393 msgid "Unknown variable \"%s\" for this POU!"
-#: ../ProjectController.py:259 ../ProjectController.py:260
+#: ../ProjectController.py:329 ../ProjectController.py:330 -#: ../PLCControler.py:305
+#: ../PLCControler.py:636 -#: ../controls/VariablePanel.py:272
+#: ../controls/VariablePanel.py:284 msgid "Unrecognized data size \"%s\""
-#: ../plcopen/structures.py:221
-"The up-counter can be used to signal when a count has reached a maximum value."
-#: ../plcopen/structures.py:231
-"The up-down counter has two inputs CU and CD. It can be used to both count up on one input and down on the other."
-#: ../controls/VariablePanel.py:712 ../editors/DataTypeEditor.py:631
+#: ../editors/DataTypeEditor.py:632 ../controls/VariablePanel.py:798 -#: ../canfestival/SlaveEditor.py:42 ../canfestival/NetworkEditor.py:63
+#: ../canfestival/SlaveEditor.py:65 ../canfestival/NetworkEditor.py:86 -#: ../PLCControler.py:94
+#: ../PLCControler.py:95 msgid "User-defined POUs"
-#: ../controls/DebugVariablePanel.py:58 ../dialogs/ActionBlockDialog.py:37
+#: ../dialogs/ActionBlockDialog.py:38 -#: ../editors/GraphicViewer.py:278
-#: ../editors/DataTypeEditor.py:258
+#: ../editors/DataTypeEditor.py:259 -#: ../controls/DebugVariablePanel.py:58 ../editors/Viewer.py:465
-#: ../dialogs/ActionBlockDialog.py:41
+#: ../dialogs/ActionBlockDialog.py:42 ../editors/Viewer.py:526 +#: ../editors/Viewer.py:2374 -#: ../dialogs/FBDVariableDialog.py:47
+#: ../editors/Viewer.py:308 ../editors/Viewer.py:338 ../editors/Viewer.py:360 +#: ../editors/TextViewer.py:292 ../editors/TextViewer.py:343 +#: ../editors/TextViewer.py:366 ../controls/VariablePanel.py:329 +#: ../dialogs/FBDVariableDialog.py:63 msgid "Variable Properties"
-#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:277
-#: ../editors/TextViewer.py:323 ../editors/Viewer.py:275
+#: ../editors/Viewer.py:288 ../editors/TextViewer.py:306 +#: ../controls/LocationCellEditor.py:97 ../controls/VariablePanel.py:290 +#: ../controls/VariablePanel.py:350 -#: ../editors/TextViewer.py:367 ../editors/Viewer.py:337
+#: ../editors/Viewer.py:395 ../editors/TextViewer.py:387 msgid "Variable don't belong to this POU!"
-#: ../controls/VariablePanel.py:77
+#: ../dialogs/LDElementDialog.py:89 +#: ../controls/VariablePanel.py:72 @@ -3218,23 +3357,41 @@
-#: ../wxglade_hmi/wxglade_hmi.py:11
+#: ../Beremiz_service.py:586 +msgid "WAMP client startup failed. " +#: ../connectors/WAMP/__init__.py:91 +msgid "WAMP connecting to URL : %s\n" +#: ../connectors/WAMP/__init__.py:131 +msgid "WAMP connection timeout" +#: ../connectors/WAMP/__init__.py:150 +msgid "WAMP connection to '%s' failed.\n" +#: ../Beremiz_service.py:562 +msgid "WAMP import failed :" +#: ../wxglade_hmi/wxglade_hmi.py:35 -#: ../ProjectController.py:1302
-msgid "Waiting debugger to recover...\n"
-#: ../editors/LDViewer.py:891 ../dialogs/PouDialog.py:126
+#: ../dialogs/PouDialog.py:128 ../editors/LDViewer.py:891 -#: ../ProjectController.py:529
+#: ../ProjectController.py:616 msgid "Warnings in ST/IL/SFC code generator :\n"
-#: ../dialogs/SearchInProjectDialog.py:85
+#: ../dialogs/SearchInProjectDialog.py:78 @@ -3242,27 +3399,31 @@
-#: ../dialogs/FindInPouDialog.py:86
+#: ../dialogs/FindInPouDialog.py:93
+#: ../dialogs/AboutDialog.py:122 -#: ../svgui/svgui.py:106
+#: ../svgui/svgui.py:139 "You don't have write permissions.\n"
-#: ../wxglade_hmi/wxglade_hmi.py:108
+#: ../wxglade_hmi/wxglade_hmi.py:137 "You don't have write permissions.\n"
-#: ../ProjectController.py:224
+#: ../ProjectController.py:292 "You must have permission to work on the project\n"
"Work on a project copy ?"
@@ -3276,8 +3437,7 @@
msgid "You must select the wire where a contact should be added!"
-#: ../dialogs/PouNameDialog.py:45 ../dialogs/SFCStepNameDialog.py:47
-#: ../dialogs/SFCStepDialog.py:118
+#: ../dialogs/SFCStepNameDialog.py:48 ../dialogs/PouNameDialog.py:46 msgid "You must type a name!"
@@ -3285,25 +3445,25 @@
msgid "You must type a value!"
-#: ../editors/GraphicViewer.py:97
-#: ../PLCOpenEditor.py:335
+#: ../dialogs/DurationEditorDialog.py:151 +#: ../PLCOpenEditor.py:333 -#: ../util/ProcessLogger.py:161
-msgid "exited with status %s (pid %s)\n"
-#: ../PLCOpenEditor.py:393 ../PLCOpenEditor.py:395
+#: ../util/ProcessLogger.py:169 +msgid "exited with status {a1} (pid {a2})\n" +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 @@ -3311,7 +3471,7 @@
-#: ../PLCOpenEditor.py:396
+#: ../PLCOpenEditor.py:399 @@ -3319,14 +3479,30 @@
-#: ../PLCOpenEditor.py:396
+#: ../dialogs/DurationEditorDialog.py:151 +#: ../PLCOpenEditor.py:399 +#: ../dialogs/DurationEditorDialog.py:153 +#: ../dialogs/DurationEditorDialog.py:152 #: ../dialogs/PouDialog.py:31
+#: ../dialogs/DurationEditorDialog.py:152 #: ../plcopen/iec_std.csv:84
msgid "string from the middle"
@@ -3339,13 +3515,30 @@
-#: ../PLCOpenEditor.py:333
+msgid "update info unavailable." +#: ../PLCOpenEditor.py:331 +#: ../PLCControler.py:970 +msgid "{a1} \"{a2}\" can't be pasted as a {a3}." +#: ../ConfigTreeNode.py:56 +"{a1} XML file doesn't follow XSD schema at line %{a2}:\n" msgid "CanFestivalSlaveNode"
@@ -3376,15 +3569,39 @@
@@ -3394,24 +3611,6 @@
@@ -3426,3 +3625,186 @@
msgid "Disable_Extensions"
+msgid "%(codefile_name)s" +#: Extra TC6 documentation strings +msgid "0 - current time, 1 - load time from PDT" +msgid "Datetime, current or relative to PDT" +msgid "The real time clock has many uses including time stamping, setting dates and times of day in batch reports, in alarm messages and so on." +msgid "1 = integrate, 0 = hold" +msgid "Overriding reset" +msgid "Integrated output" +msgid "The integral function block integrates the value of input XIN over time." +msgid "Input to be differentiated" +msgid "Differentiated output" +msgid "The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." +msgid "0 - manual , 1 - automatic" +msgid "Process variable" +msgid "Manual output adjustment - Typically from transfer station" +msgid "Proportionality constant" +msgid "Derivative time constant" +msgid "FB for integral term" +msgid "FB for derivative term" +msgid "The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." +msgid "0 - track X0, 1 - ramp to/track X1" +msgid "BUSY = 1 during ramping period" +msgid "Elapsed time of ramp" +msgid "The RAMP function block is modelled on example given in the standard." +msgid "The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2." +msgid "The SR bistable is a latch where the Set dominates." +msgid "The RS bistable is a latch where the Reset dominates." +msgid "The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." +msgid "The output produces a single pulse when a rising edge is detected." +msgid "The output produces a single pulse when a falling edge is detected." +msgid "The up-counter can be used to signal when a count has reached a maximum value." +msgid "The down-counter can be used to signal when a count has reached zero, on counting down from a preset value." +msgid "The up-down counter has two inputs CU and CD. It can be used to both count up on one input and down on the other." +msgid "first input parameter" +msgid "second input parameter" +msgid "first output parameter" +msgid "second output parameter" +msgid "internal state: 0-reset, 1-counting, 2-set" +msgid "The pulse timer can be used to generate output pulses of a given time duration." +msgid "The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." +msgid "The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." --- a/i18n/mki18n.py Sun Mar 05 00:38:25 2017 +0000
+++ b/i18n/mki18n.py Fri Mar 24 12:07:47 2017 +0000
@@ -95,7 +95,12 @@
+ if wx.VERSION >= (3, 0, 0): for lang in [x for x in dir(wx) if x.startswith("LANGUAGE")]:
i = wx.Locale(wx.LANGUAGE_DEFAULT).GetLanguageInfo(getattr(wx, lang))
@@ -103,7 +108,33 @@
-XSD_STRING_MODEL = re.compile("<xsd\:(?:element|attribute) name=\"([^\"]*)\"[^\>]*\>")
+def processCustomFiles(filein, fileout, regexp, prefix = ''): + appfil_file = open(filein, 'r') + messages_file = open(fileout, 'r') + messages = messages_file.read() + messages_file = open(fileout, 'a') + messages_file.write('\n') + messages_file.write('#: %s\n' % prefix) + messages_file.write('\n') + for filepath in appfil_file.xreadlines(): + code_file = open(filepath.strip(), 'r') + for match in regexp.finditer(code_file.read()): + if not words_found.get(word, False) and messages.find("msgid \"%s\"\nmsgstr \"\"" % word) == -1: + words_found[word] = True + messages_file.write('\n') + messages_file.write("msgid \"%s\"\n"%word) + messages_file.write("msgstr \"\"\n") # -----------------------------------------------------------------------------
# m a k e P O ( ) -- Build the Portable Object file for the application --
@@ -138,10 +169,12 @@
applicationName = applicationDomain
- os.chdir(applicationDirectoryPath)
- if not os.path.exists('app.fil'):
- raise IOError(2,'No module file: app.fil')
+ os.chdir(applicationDirectoryPath) + if not os.path.exists(filelist): + raise IOError(2,'No module file: ' % filelist) + fileout = 'messages.pot' # Use xgettext to parse all application modules
# The following switches are used:
@@ -149,33 +182,16 @@
# -s : sort output by string content (easier to use when we need to merge several .po files)
# --files-from=app.fil : The list of files is taken from the file: app.fil
# --output= : specifies the name of the output file (using a .pot extension)
- cmd = 'xgettext -s --no-wrap --language=Python --files-from=app.fil --output=messages.pot'
+ cmd = 'xgettext -s --no-wrap --language=Python --files-from=' + filelist + ' --output=' + fileout - appfil_file = open("app.fil", 'r')
- messages_file = open("messages.pot", 'r')
- messages = messages_file.read()
- messages_file = open("messages.pot", 'a')
- messages_file.write("""
- for filepath in appfil_file.xreadlines():
- code_file = open(filepath.strip(), 'r')
- for match in XSD_STRING_MODEL.finditer(code_file.read()):
- if not words_found.get(word, False) and messages.find("msgid \"%s\"\nmsgstr \"\"" % word) == -1:
- words_found[word] = True
- messages_file.write("""
+ XSD_STRING_MODEL = re.compile("<xsd\:(?:element|attribute) name=\"([^\"]*)\"[^\>]*\>") + processCustomFiles(filelist, fileout, XSD_STRING_MODEL, 'Extra XSD strings') + XML_TC6_STRING_MODEL = re.compile("<documentation>\s*<xhtml\:p><!\[CDATA\[([^\]]*)\]\]></xhtml\:p>\s*</documentation>", re.MULTILINE | re.DOTALL) + processCustomFiles(filelist, fileout, XML_TC6_STRING_MODEL, 'Extra TC6 documentation strings') languageDict = getlanguageDict()
for langCode in languageDict.keys():
@@ -184,7 +200,7 @@
langPOfileName = "%s_%s.po" % (applicationName , langCode)
if os.path.exists(langPOfileName):
- cmd = 'msgmerge -s --no-wrap "%s" messages.pot > "%s.new"' % (langPOfileName, langPOfileName)
+ cmd = 'msgmerge -s --no-wrap "%s" %s > "%s.new"' % (langPOfileName, fileout, langPOfileName) Binary file images/about_brz_logo.png has changed
--- a/images/icons.svg Sun Mar 05 00:38:25 2017 +0000
+++ b/images/icons.svg Fri Mar 24 12:07:47 2017 +0000
@@ -15,7 +15,7 @@
- inkscape:version="0.48.3.1 r9886"
+ inkscape:version="0.91 r13725" sodipodi:docname="icons.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
@@ -31,7 +31,7 @@
- inkscape:window-height="1056"
+ inkscape:window-height="1043" inkscape:window-width="1920"
@@ -43,11 +43,11 @@
- inkscape:zoom="4.0000001"
- inkscape:cx="590.44587"
- inkscape:cy="681.55725"
+ inkscape:cx="618.65047" + inkscape:cy="-188.15697"
inkscape:current-layer="svg2"
inkscape:guide-bbox="true"
@@ -87959,6 +87959,148 @@
+ style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + inkscape:collect="always" + stdDeviation="10.250707" + id="feGaussianBlur17762-2" /> + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + id="linearGradient18567" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur6449-1" /> + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + id="linearGradient18581" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur18591" /> + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + inkscape:collect="always" + stdDeviation="10.250707" + id="feGaussianBlur17762-2-3" /> + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + id="linearGradient23064" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur6449-1-1" /> + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient6885);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" /> + id="linearGradient23078" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur23088" /> @@ -88093,7 +88235,7 @@
- d="m 51.012705,1.7575644 c 0,6.8341751 -5.540194,12.3743686 -12.374369,12.3743686 -6.834175,0 -12.374368,-5.5401935 -12.374368,-12.3743686 0,-6.8341751 5.540193,-12.3743684 12.374368,-12.3743684 6.834175,0 12.374369,5.5401933 12.374369,12.3743684 z"
+ d="M 51.012705,1.7575644 A 12.374369,12.374369 0 0 1 38.638336,14.131933 12.374369,12.374369 0 0 1 26.263968,1.7575644 12.374369,12.374369 0 0 1 38.638336,-10.616804 12.374369,12.374369 0 0 1 51.012705,1.7575644 Z" transform="matrix(1.5916608,0,0,1.5916608,-4.534839,45.738269)" />
@@ -88103,7 +88245,7 @@
- d="m 51.012705,1.7575644 c 0,6.8341751 -5.540194,12.3743686 -12.374369,12.3743686 -6.834175,0 -12.374368,-5.5401935 -12.374368,-12.3743686 0,-6.8341751 5.540193,-12.3743684 12.374368,-12.3743684 6.834175,0 12.374369,5.5401933 12.374369,12.3743684 z"
+ d="M 51.012705,1.7575644 A 12.374369,12.374369 0 0 1 38.638336,14.131933 12.374369,12.374369 0 0 1 26.263968,1.7575644 12.374369,12.374369 0 0 1 38.638336,-10.616804 12.374369,12.374369 0 0 1 51.012705,1.7575644 Z" transform="translate(18.32595,46.778151)" />
@@ -88112,7 +88254,7 @@
transform="matrix(0.2172196,0,0,0.2172196,-856.56407,380.74931)">
transform="translate(58.32595,48.778151)"
- d="m 51.012705,1.7575644 c 0,6.8341751 -5.540194,12.3743686 -12.374369,12.3743686 -6.834175,0 -12.374368,-5.5401935 -12.374368,-12.3743686 0,-6.8341751 5.540193,-12.3743684 12.374368,-12.3743684 6.834175,0 12.374369,5.5401933 12.374369,12.3743684 z"
+ d="M 51.012705,1.7575644 A 12.374369,12.374369 0 0 1 38.638336,14.131933 12.374369,12.374369 0 0 1 26.263968,1.7575644 12.374369,12.374369 0 0 1 38.638336,-10.616804 12.374369,12.374369 0 0 1 51.012705,1.7575644 Z" @@ -88122,7 +88264,7 @@
transform="matrix(0.9170232,0,0,0.9170232,61.532035,48.923988)"
- d="m 51.012705,1.7575644 c 0,6.8341751 -5.540194,12.3743686 -12.374369,12.3743686 -6.834175,0 -12.374368,-5.5401935 -12.374368,-12.3743686 0,-6.8341751 5.540193,-12.3743684 12.374368,-12.3743684 6.834175,0 12.374369,5.5401933 12.374369,12.3743684 z"
+ d="M 51.012705,1.7575644 A 12.374369,12.374369 0 0 1 38.638336,14.131933 12.374369,12.374369 0 0 1 26.263968,1.7575644 12.374369,12.374369 0 0 1 38.638336,-10.616804 12.374369,12.374369 0 0 1 51.012705,1.7575644 Z" @@ -88834,8 +88976,7 @@
transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)"
- style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006"
- d="m 134.431,110.081 c 0,18.85721 -15.28679,34.144 -34.144,34.144 -18.857208,0 -34.143998,-15.28679 -34.143998,-34.144 0,-18.85721 15.28679,-34.144 34.143998,-34.144 18.85721,0 34.144,15.28679 34.144,34.144 z" />
+ style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006" /> d="m 84.515333,38.943636 0,3.981494 3.981494,0 0,4.799639 -3.981494,0 0,3.981494 -4.782372,0 0,-3.981494 -3.981494,0 0,-4.799639 3.981494,0 0,-3.981494 4.782372,0"
@@ -88888,8 +89029,7 @@
transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)"
- style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006"
- d="m 134.431,110.081 c 0,18.85721 -15.28679,34.144 -34.144,34.144 -18.857208,0 -34.143998,-15.28679 -34.143998,-34.144 0,-18.85721 15.28679,-34.144 34.143998,-34.144 18.85721,0 34.144,15.28679 34.144,34.144 z" />
+ style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006" /> d="m 84.515333,38.943636 0,3.981494 3.981494,0 0,4.799639 -3.981494,0 0,3.981494 -4.782372,0 0,-3.981494 -3.981494,0 0,-4.799639 3.981494,0 0,-3.981494 4.782372,0"
@@ -88919,7 +89059,7 @@
sodipodi:type="inkscape:offset"
- inkscape:original="M 70 192.375 L 70 214.375 L 87 214.375 L 87 197.375 L 82 192.375 L 70 192.375 z "
+ inkscape:original="M 70 192.36133 L 70 214.36133 L 87 214.36133 L 87 197.36133 L 82 192.36133 L 70 192.36133 z " style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -89795,8 +89935,7 @@
transform="matrix(1,0,0,-1,1028.5714,378.07647)"
- d="M 226,0 C 226,124.81635 124.81635,226 0,226 -124.81635,226 -226,124.81635 -226,0 c 0,-124.81635 101.18365,-226 226,-226 124.81635,0 226,101.18365 226,226 z" />
@@ -89807,8 +89946,7 @@
transform="matrix(1,0,0,-1,1028.5714,378.07647)"
- d="M 169.5,0 C 169.5,93.612265 93.612265,169.5 0,169.5 -93.612265,169.5 -169.5,93.612265 -169.5,0 c 0,-93.612265 75.887735,-169.5 169.5,-169.5 93.612265,0 169.5,75.887735 169.5,169.5 z" />
@@ -89819,8 +89957,7 @@
transform="matrix(1.0610323,0,0,-1.0610323,1028.5714,378.07647)"
- d="M 106.5,0 C 106.5,58.818326 58.818326,106.5 0,106.5 -58.818326,106.5 -106.5,58.818326 -106.5,0 c 0,-58.818326 47.681674,-106.5 106.5,-106.5 58.818326,0 106.5,47.681674 106.5,106.5 z" />
@@ -89831,8 +89968,7 @@
transform="matrix(0.5305159,0,0,-0.5305159,1028.5714,378.07647)"
- d="M 106.5,0 C 106.5,58.818326 58.818326,106.5 0,106.5 -58.818326,106.5 -106.5,58.818326 -106.5,0 c 0,-58.818326 47.681674,-106.5 106.5,-106.5 58.818326,0 106.5,47.681674 106.5,106.5 z" />
@@ -89843,8 +89979,7 @@
transform="matrix(0.1768394,0,0,-0.1768394,1028.5714,378.07647)"
- d="M 106.5,0 C 106.5,58.818326 58.818326,106.5 0,106.5 -58.818326,106.5 -106.5,58.818326 -106.5,0 c 0,-58.818326 47.681674,-106.5 106.5,-106.5 58.818326,0 106.5,47.681674 106.5,106.5 z" />
style="font-size:20px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
@@ -90329,7 +90464,7 @@
transform="matrix(0.7823622,0,0,-0.7804636,146.35389,367.13373)"
- d="m 209.99999,218.57143 c 0,42.40757 -34.37813,76.78571 -76.78571,76.78571 -42.407579,0 -76.785714,-34.37814 -76.785714,-76.78571 0,0 0,-1e-5 0,-1e-5 l 76.785714,1e-5 z"
+ d="m 209.99999,218.57143 a 76.785713,76.785713 0 0 1 -38.39286,66.49838 76.785713,76.785713 0 0 1 -76.785709,-1e-5 76.785713,76.785713 0 0 1 -38.392855,-66.49838 l 76.785714,1e-5 z" @@ -90421,7 +90556,7 @@
- d="m 96.848375,199.42668 c 0,2.68486 -2.204771,4.86136 -4.924493,4.86136 -2.719723,0 -4.924494,-2.1765 -4.924494,-4.86136 0,-2.68485 2.204771,-4.86136 4.924494,-4.86136 2.719722,0 4.924493,2.17651 4.924493,4.86136 z"
+ d="m 96.848375,199.42668 a 4.9244938,4.8613591 0 0 1 -4.924493,4.86136 4.9244938,4.8613591 0 0 1 -4.924494,-4.86136 4.9244938,4.8613591 0 0 1 4.924494,-4.86136 4.9244938,4.8613591 0 0 1 4.924493,4.86136 z" transform="matrix(0.5324675,0,0,0.5324675,-889.75288,329.57107)" />
@@ -92676,8 +92811,7 @@
transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)"
- style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006"
- d="m 134.431,110.081 c 0,18.85721 -15.28679,34.144 -34.144,34.144 -18.857208,0 -34.143998,-15.28679 -34.143998,-34.144 0,-18.85721 15.28679,-34.144 34.143998,-34.144 18.85721,0 34.144,15.28679 34.144,34.144 z" />
+ style="fill:#84c225;fill-rule:evenodd;stroke:#5d9d35;stroke-width:2.82220006" /> d="m 84.515333,38.943636 0,3.981494 3.981494,0 0,4.799639 -3.981494,0 0,3.981494 -4.782372,0 0,-3.981494 -3.981494,0 0,-4.799639 3.981494,0 0,-3.981494 4.782372,0"
@@ -93482,7 +93616,7 @@
sodipodi:type="inkscape:offset"
- inkscape:original="M 108 192.375 L 108 214.375 L 110 214.375 L 110 203.375 L 111 203.375 L 111 213.375 L 113 213.375 L 113 201.375 L 114 201.375 L 114 214.375 L 117 214.375 L 117 202.375 L 118 202.375 L 118 215.375 L 120 215.375 L 120 201.375 L 121 201.375 L 121 212.375 L 123 212.375 L 123 202.375 L 124 202.375 L 124 214.375 L 125 214.375 L 125 197.375 L 120 192.375 L 108 192.375 z "
+ inkscape:original="M 108 192.36133 L 108 214.36133 L 110 214.36133 L 110 203.36133 L 111 203.36133 L 111 213.36133 L 113 213.36133 L 113 201.36133 L 114 201.36133 L 114 214.36133 L 117 214.36133 L 117 202.36133 L 118 202.36133 L 118 215.36133 L 120 215.36133 L 120 201.36133 L 121 201.36133 L 121 212.36133 L 123 212.36133 L 123 202.36133 L 124 202.36133 L 124 214.36133 L 125 214.36133 L 125 197.36133 L 120 192.36133 L 108 192.36133 z " style="color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -93643,4 +93777,97 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
+ style="font-style:normal;font-weight:normal;font-size:51.04000092px;font-family:'Bitstream Vera Sans';fill:#000000;fill-opacity:1;stroke:none" + style="font-size:51.04000092px">%% about_brz_logo %%</tspan></text> + transform="matrix(0.2224431,0,0,0.2224431,608.34301,805.59922)" + inkscape:label="#g17803-0"> + transform="translate(-1840,2339.9999)" + mask="url(#mask6467-7-2)" + transform="translate(0,89.910633)" + inkscape:connector-curvature="0" + d="m -1470.2813,1725.0291 c -56.0138,0.054 -112.0828,20.5177 -156.0937,61.5937 -85.0794,79.4058 -95.9453,209.1111 -29.5938,301.1563 l 9.7813,69.3437 0.9062,6.4375 5.125,-4 30.5938,-23.9687 c 87.5525,67.3697 213.0935,63.1007 295.9375,-14.2188 18.4642,-17.2329 33.4323,-36.8343 44.875,-57.9062 6.4003,0.736 13.3613,1.0937 20.875,1.0937 24.9087,0 44.0178,-3.5634 57.3437,-10.6875 13.3257,-7.1242 24.6943,-18.8804 34.125,-35.2812 l -61.6562,-5.6875 c -3.8953,4.9202 -7.5237,8.3649 -10.9063,10.3125 -5.5355,3.0752 -11.381,4.5937 -17.5312,4.5937 -2.2646,0 -4.435,-0.18 -6.5,-0.5625 3.5746,-10.6475 6.37,-21.5105 8.3437,-32.5 l 91.8125,0 0,-7.0625 c -10e-5,-21.5262 -3.5522,-39.0091 -10.625,-52.4375 -7.0731,-13.4281 -17.3756,-23.6769 -30.9062,-30.75 -13.3838,-6.9958 -31.5824,-10.5176 -54.5938,-10.5937 -7.0146,-25.9757 -18.6908,-50.9762 -35.0625,-73.6875 l -9.7812,-69.3438 -0.9063,-6.4375 -5.125,4 -30.5937,23.9688 c -41.0402,-31.5796 -90.4197,-47.4228 -139.8438,-47.375 z m 228.125,206.2187 c 6.3617,0.8346 11.6486,3.3459 15.875,7.5313 5.279,5.2278 8.5511,13.9044 9.7813,26 l -24.7813,0 c 0.5248,-11.1718 0.225,-22.3843 -0.875,-33.5313 z m 118.9731,-33.6623 58.582,0 0,26.754 c 5.6377,-11.583 11.4549,-19.5528 17.4516,-23.9095 5.9965,-4.3563 13.4025,-6.5346 22.2182,-6.5347 9.2253,1e-4 19.3222,2.8703 30.2904,8.6104 l -19.3736,44.5901 c -7.3805,-3.0751 -13.2233,-4.6127 -17.5285,-4.6128 -8.2005,10e-5 -14.5559,3.3828 -19.066,10.1481 -6.458,9.5331 -9.6869,27.3691 -9.6868,53.508 l 0,54.7381 -62.8873,0 0,-163.2917 z m 320.2793,97.1755 -125.46709,0 c 1.12748,10.0456 3.84388,17.5285 8.14921,22.4487 6.04775,7.073 13.94069,10.6094 23.67883,10.6094 6.15024,0 11.99306,-1.5376 17.5285,-4.6128 3.38256,-1.9476 7.02151,-5.3815 10.91686,-10.3018 l 61.65724,5.6891 c -9.43072,16.4009 -20.80885,28.1634 -34.13443,35.2876 -13.3259,7.1241 -32.44322,10.6862 -57.35199,10.6862 -21.62881,0 -38.64475,-3.0495 -51.04789,-9.1486 -12.40324,-6.0991 -22.67944,-15.7859 -30.82862,-29.0604 -8.14922,-13.2745 -12.22382,-28.881 -12.22382,-46.8195 0,-25.5239 8.17483,-46.1788 24.52452,-61.9648 16.34962,-15.7857 38.9265,-23.6787 67.7307,-23.6788 23.3712,1e-4 41.82222,3.5366 55.35313,10.6093 13.53059,7.0731 23.83241,17.3236 30.9055,30.7517 7.0727,13.4284 10.60915,30.9056 10.60935,52.4318 l 0,7.0729 z m -63.6561,-29.983 c -1.23021,-12.0956 -4.48476,-20.7573 -9.76368,-25.9852 -5.27917,-5.2277 -12.22393,-7.8416 -20.8343,-7.8417 -9.94316,10e-5 -17.88735,3.9466 -23.8326,11.8394 -3.79279,4.9204 -6.20167,12.2496 -7.22666,21.9875 l 61.65724,0 z m 93.17774,-67.1925 58.4283,0 0,23.8326 c 8.40539,-9.9429 16.88773,-17.0158 25.44706,-21.2187 8.55912,-4.2026 18.88657,-6.304 30.98238,-6.3041 13.01809,1e-4 23.31991,2.3065 30.90549,6.9191 7.58526,4.6129 13.78685,11.4808 18.6048,20.6037 9.84037,-10.6605 18.80962,-17.9128 26.90778,-21.7569 8.09773,-3.8438 18.09204,-5.7658 29.98294,-5.7659 17.52823,1e-4 31.21274,5.2023 41.05357,15.6065 9.84026,10.4044 14.76054,26.6772 14.76083,48.8184 l 0,102.557 -62.73354,0 0,-93.024 c -2.3e-4,-7.3803 -1.43531,-12.8644 -4.30524,-16.4522 -4.20297,-5.6377 -9.43076,-8.4566 -15.68339,-8.4567 -7.38062,10e-5 -13.32595,2.6652 -17.83601,7.9954 -4.51044,5.3304 -6.76557,13.8897 -6.76538,25.6777 l 0,84.2598 -62.73355,0 0,-89.9488 c -1.2e-4,-7.1753 -0.41015,-12.0444 -1.23007,-14.6071 -1.3327,-4.1001 -3.63907,-7.4059 -6.91914,-9.9174 -3.2803,-2.5113 -7.12426,-3.767 -11.5319,-3.7671 -7.1755,10e-5 -13.06958,2.7165 -17.68225,8.1492 -4.61284,5.4329 -6.91922,14.3509 -6.91914,26.754 l 0,83.3372 -62.73354,0 0,-163.2917 z m 316.74293,-62.1185 62.57978,0 0,42.5911 -62.57978,0 0,-42.5911 z m 0,62.1185 62.57978,0 0,163.2917 -62.57978,0 0,-163.2917 z m 95.79168,0 151.45231,0 0,36.5945 -82.41466,83.9523 87.48869,0 0,42.7449 -162.67669,0 0,-40.5923 78.10941,-79.9545 -71.95906,0 0,-42.7449 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:314.89779663px;line-height:125%;font-family:'Arial Black';text-align:start;writing-mode:lr-tb;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;filter:url(#filter17760-6-7);enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m -1336.1632,1788.2263 c 0,0 56.3913,141.5671 -147.8368,147.7737 -204.2612,6.2076 -147.8368,147.7737 -147.8368,147.7737 -37.8479,-37.8317 -61.2676,-90.0855 -61.2676,-147.7737 0,-57.6882 23.4197,-109.942 61.2676,-147.7737 37.8479,-37.8318 90.124,-61.2415 147.8368,-61.2415 57.7128,0 109.9889,23.4097 147.8368,61.2415 z" + style="display:inline;overflow:visible;visibility:visible;fill:#d19f34;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:40;marker:none;enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m -1631.8368,2083.7737 c 0,0 -56.3913,-141.5671 147.8368,-147.7737 204.2612,-6.2076 147.8368,-147.7737 147.8368,-147.7737 37.8479,37.8317 61.2676,90.0855 61.2676,147.7737 0,57.6882 -23.4197,109.942 -61.2676,147.7737 -37.8479,37.8318 -90.124,61.2415 -147.8368,61.2415 -57.7128,0 -109.9889,-23.4097 -147.8368,-61.2415 z" + style="display:inline;overflow:visible;visibility:visible;fill:#469837;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:40;marker:none;enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m 1021.2642,207.94408 c 0,143.9361 -116.68326,260.61936 -260.61936,260.61936 -143.9361,0 -260.61936,-116.68326 -260.61936,-260.61936 0,-143.936098 116.68326,-260.61936 260.61936,-260.61936 143.9361,0 260.61936,116.683262 260.61936,260.61936 l 0,0 z" + transform="matrix(0.8023362,0,0,0.8019941,-2094.2929,1769.2301)" + style="display:inline;overflow:visible;visibility:visible;fill:none;stroke:#4c4c4c;stroke-width:49.86504364;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m -1577.2331,1825.1726 127.038,0 c 21.1728,2e-4 37.4271,5.2435 48.7628,15.7299 11.3353,10.4868 17.0031,23.4703 17.0033,38.9503 -2e-4,12.9836 -4.045,24.1194 -12.1345,33.4074 -5.3933,6.1923 -13.2833,11.086 -23.6698,14.6813 15.7797,3.7953 27.3898,10.312 34.8306,19.5501 7.4402,9.2383 11.1605,20.8485 11.1607,34.8306 -2e-4,11.3855 -2.6468,21.6224 -7.9399,30.7108 -5.2934,9.0884 -12.5342,16.2792 -21.7223,21.5725 -5.6929,3.2958 -14.2819,5.6927 -25.7671,7.1908 -15.2807,1.9975 -25.4177,2.9962 -30.4112,2.9962 l -117.1506,0 0,-219.6199 z m 68.4627,86.1401 29.5124,0 c 10.5863,10e-5 17.9519,-1.8225 22.0968,-5.468 4.1445,-3.6452 6.2169,-8.9135 6.217,-15.8049 -1e-4,-6.3916 -2.0725,-11.3853 -6.217,-14.9809 -4.1449,-3.5952 -11.3607,-5.3929 -21.6474,-5.3931 l -29.9618,0 0,41.6469 z m 0,86.29 34.6059,0 c 11.6849,0 19.9244,-2.0723 24.7184,-6.2171 4.7938,-4.1447 7.1907,-9.7126 7.1909,-16.7037 -2e-4,-6.4916 -2.3722,-11.71 -7.116,-15.655 -4.7441,-3.9449 -13.0584,-5.9174 -24.9432,-5.9175 l -34.456,0 0,44.4933 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:306.80871582px;line-height:125%;font-family:'Arial Black';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:40;marker:none;enable-background:accumulate" /> + transform="matrix(-1,0,0,-1,-1127.9999,1532)" + mask="url(#mask6467-7-2)" + inkscape:connector-curvature="0" + d="m 507.8125,-566.84375 c -7.54052,0.31127 -14.32442,4.87714 -17.4375,11.84375 -3.32061,7.43106 -1.79456,16.12851 3.84375,22 71.38742,76.4228 67.29917,195.79932 -9.15625,267.15625 C 418.92868,-204.1201 321.00173,-198.52349 249.15625,-248 l 26.65625,-20.875 5.125,-4 -6.03125,-2.40625 -105.9375,-42.59375 -6,-2.4375 0.90625,6.4375 15.9375,113 0.90625,6.4375 5.125,-4 30.59375,-23.96875 c 87.55252,67.36975 213.09347,63.10079 295.9375,-14.21875 92.27769,-86.12407 97.25455,-231.41793 11.09375,-323.65625 -3.63563,-4.00109 -8.72059,-6.38195 -14.125,-6.5625 -0.50858,-0.0174 -1.02855,-0.0208 -1.53125,0 z" + style="display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;filter:url(#filter6447-9-6);enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m 507.8125,-566.84375 c -7.54052,0.31127 -14.32442,4.87714 -17.4375,11.84375 -3.32061,7.43106 -1.79456,16.12851 3.84375,22 71.38742,76.4228 67.29917,195.79932 -9.15625,267.15625 C 418.92868,-204.1201 321.00173,-198.52349 249.15625,-248 l 26.65625,-20.875 5.125,-4 -6.03125,-2.40625 -105.9375,-42.59375 -6,-2.4375 0.90625,6.4375 15.9375,113 0.90625,6.4375 5.125,-4 30.59375,-23.96875 c 87.55252,67.36975 213.09347,63.10079 295.9375,-14.21875 92.27769,-86.12407 97.25455,-231.41793 11.09375,-323.65625 -3.63563,-4.00109 -8.72059,-6.38195 -14.125,-6.5625 -0.50858,-0.0174 -1.02855,-0.0208 -1.53125,0 z" + style="display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;marker:none;enable-background:accumulate" /> + transform="translate(-1839.8676,2340.0508)" + mask="url(#mask6467-7-2)" + inkscape:connector-curvature="0" + d="m 507.8125,-566.84375 c -7.54052,0.31127 -14.32442,4.87714 -17.4375,11.84375 -3.32061,7.43106 -1.79456,16.12851 3.84375,22 71.38742,76.4228 67.29917,195.79932 -9.15625,267.15625 C 418.92868,-204.1201 321.00173,-198.52349 249.15625,-248 l 26.65625,-20.875 5.125,-4 -6.03125,-2.40625 -105.9375,-42.59375 -6,-2.4375 0.90625,6.4375 15.9375,113 0.90625,6.4375 5.125,-4 30.59375,-23.96875 c 87.55252,67.36975 213.09347,63.10079 295.9375,-14.21875 92.27769,-86.12407 97.25455,-231.41793 11.09375,-323.65625 -3.63563,-4.00109 -8.72059,-6.38195 -14.125,-6.5625 -0.50858,-0.0174 -1.02855,-0.0208 -1.53125,0 z" + style="display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;filter:url(#filter6447-9-6);enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m 507.8125,-566.84375 c -7.54052,0.31127 -14.32442,4.87714 -17.4375,11.84375 -3.32061,7.43106 -1.79456,16.12851 3.84375,22 71.38742,76.4228 67.29917,195.79932 -9.15625,267.15625 C 418.92868,-204.1201 321.00173,-198.52349 249.15625,-248 l 26.65625,-20.875 5.125,-4 -6.03125,-2.40625 -105.9375,-42.59375 -6,-2.4375 0.90625,6.4375 15.9375,113 0.90625,6.4375 5.125,-4 30.59375,-23.96875 c 87.55252,67.36975 213.09347,63.10079 295.9375,-14.21875 92.27769,-86.12407 97.25455,-231.41793 11.09375,-323.65625 -3.63563,-4.00109 -8.72059,-6.38195 -14.125,-6.5625 -0.50858,-0.0174 -1.02855,-0.0208 -1.53125,0 z" + style="display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:49.86504364;marker:none;enable-background:accumulate" /> + inkscape:connector-curvature="0" + d="m -1166.8587,1976.761 -125.4671,0 c 1.1275,10.0456 3.8439,17.5285 8.1492,22.4487 6.0478,7.073 13.9407,10.6094 23.6789,10.6094 6.1502,0 11.993,-1.5376 17.5285,-4.6128 3.3825,-1.9476 7.0215,-5.3815 10.9168,-10.3018 l 61.6573,5.6891 c -9.4307,16.4009 -20.8089,28.1634 -34.1345,35.2876 -13.3259,7.1241 -32.4432,10.6862 -57.3519,10.6862 -21.6289,0 -38.6448,-3.0495 -51.0479,-9.1486 -12.4033,-6.0991 -22.6795,-15.7859 -30.8286,-29.0604 -8.1493,-13.2745 -12.2239,-28.881 -12.2239,-46.8195 0,-25.5239 8.1749,-46.1788 24.5245,-61.9648 16.3497,-15.7857 38.9265,-23.6787 67.7307,-23.6788 23.3712,1e-4 41.8223,3.5366 55.3532,10.6093 13.5306,7.0731 23.8324,17.3236 30.9055,30.7517 7.0727,13.4284 10.6091,30.9056 10.6093,52.4318 l 0,7.0729 z m -63.6561,-29.983 c -1.2302,-12.0956 -4.4847,-20.7573 -9.7637,-25.9852 -5.2791,-5.2277 -12.2239,-7.8416 -20.8343,-7.8417 -9.9431,10e-5 -17.8873,3.9466 -23.8325,11.8394 -3.7928,4.9204 -6.2017,12.2496 -7.2267,21.9875 l 61.6572,0 z m 93.3316,-67.1925 58.582,0 0,26.754 c 5.6377,-11.583 11.4549,-19.5528 17.4516,-23.9095 5.9965,-4.3563 13.4025,-6.5346 22.2182,-6.5347 9.2253,1e-4 19.3222,2.8703 30.2904,8.6104 l -19.3736,44.5901 c -7.3805,-3.0751 -13.2233,-4.6127 -17.5285,-4.6128 -8.2005,10e-5 -14.5559,3.3828 -19.066,10.1481 -6.458,9.5331 -9.6869,27.3691 -9.6868,53.508 l 0,54.7381 -62.8873,0 0,-163.2917 z m 320.2793,97.1755 -125.46709,0 c 1.12748,10.0456 3.84388,17.5285 8.14921,22.4487 6.04775,7.073 13.94069,10.6094 23.67883,10.6094 6.15024,0 11.99306,-1.5376 17.5285,-4.6128 3.38256,-1.9476 7.02151,-5.3815 10.91686,-10.3018 l 61.65724,5.6891 c -9.43072,16.4009 -20.80885,28.1634 -34.13443,35.2876 -13.3259,7.1241 -32.44322,10.6862 -57.35199,10.6862 -21.62881,0 -38.64475,-3.0495 -51.04789,-9.1486 -12.40324,-6.0991 -22.67944,-15.7859 -30.82862,-29.0604 -8.14922,-13.2745 -12.22382,-28.881 -12.22382,-46.8195 0,-25.5239 8.17483,-46.1788 24.52452,-61.9648 16.34962,-15.7857 38.9265,-23.6787 67.7307,-23.6788 23.3712,1e-4 41.82222,3.5366 55.35313,10.6093 13.53059,7.0731 23.83241,17.3236 30.9055,30.7517 7.0727,13.4284 10.60915,30.9056 10.60935,52.4318 l 0,7.0729 z m -63.6561,-29.983 c -1.23021,-12.0956 -4.48476,-20.7573 -9.76368,-25.9852 -5.27917,-5.2277 -12.22393,-7.8416 -20.8343,-7.8417 -9.94316,10e-5 -17.88735,3.9466 -23.8326,11.8394 -3.79279,4.9204 -6.20167,12.2496 -7.22666,21.9875 l 61.65724,0 z m 93.17774,-67.1925 58.4283,0 0,23.8326 c 8.40539,-9.9429 16.88773,-17.0158 25.44706,-21.2187 8.55912,-4.2026 18.88657,-6.304 30.98238,-6.3041 13.01809,1e-4 23.31991,2.3065 30.90549,6.9191 7.58526,4.6129 13.78685,11.4808 18.6048,20.6037 9.84037,-10.6605 18.80962,-17.9128 26.90778,-21.7569 8.09773,-3.8438 18.09204,-5.7658 29.98294,-5.7659 17.52823,1e-4 31.21274,5.2023 41.05357,15.6065 9.84026,10.4044 14.76054,26.6772 14.76083,48.8184 l 0,102.557 -62.73354,0 0,-93.024 c -2.3e-4,-7.3803 -1.43531,-12.8644 -4.30524,-16.4522 -4.20297,-5.6377 -9.43076,-8.4566 -15.68339,-8.4567 -7.38062,10e-5 -13.32595,2.6652 -17.83601,7.9954 -4.51044,5.3304 -6.76557,13.8897 -6.76538,25.6777 l 0,84.2598 -62.73355,0 0,-89.9488 c -1.2e-4,-7.1753 -0.41015,-12.0444 -1.23007,-14.6071 -1.3327,-4.1001 -3.63907,-7.4059 -6.91914,-9.9174 -3.2803,-2.5113 -7.12426,-3.767 -11.5319,-3.7671 -7.1755,10e-5 -13.06958,2.7165 -17.68225,8.1492 -4.61284,5.4329 -6.91922,14.3509 -6.91914,26.754 l 0,83.3372 -62.73354,0 0,-163.2917 z m 316.74293,-62.1185 62.57978,0 0,42.5911 -62.57978,0 0,-42.5911 z m 0,62.1185 62.57978,0 0,163.2917 -62.57978,0 0,-163.2917 z m 95.79168,0 151.45231,0 0,36.5945 -82.41466,83.9523 87.48869,0 0,42.7449 -162.67669,0 0,-40.5923 78.10941,-79.9545 -71.95906,0 0,-42.7449 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:314.89779663px;line-height:125%;font-family:'Arial Black';text-align:start;writing-mode:lr-tb;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#dadada;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10.43299961;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" /> + style="font-style:normal;font-weight:normal;font-size:71.35877228px;font-family:'Bitstream Vera Sans';display:inline;fill:#000000;fill-opacity:1;stroke:none"><tspan + id="tspan3174-7">Free Software for Automation </tspan></text> Binary file locale/ru_RU/LC_MESSAGES/Beremiz.mo has changed
--- a/plcopen/.cvsignore Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
--- a/plcopen/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/plcopen/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/plcopen/definitions.py Sun Mar 05 00:38:25 2017 +0000
+++ b/plcopen/definitions.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,28 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from os.path import join, split, realpath
sd = split(realpath(__file__))[0]
@@ -23,35 +48,8 @@
StdFuncsCSV = join(sd,"iec_std.csv")
-# FIXME : since std fb now loaded from TC6 file, is that still necessary ?
- "SR": _("SR bistable\nThe SR bistable is a latch where the Set dominates."),
- "RS": _("RS bistable\nThe RS bistable is a latch where the Reset dominates."),
- "SEMA": _("Semaphore\nThe semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources."),
- "R_TRIG": _("Rising edge detector\nThe output produces a single pulse when a rising edge is detected."),
- "F_TRIG": _("Falling edge detector\nThe output produces a single pulse when a falling edge is detected."),
- "CTU": _("Up-counter\nThe up-counter can be used to signal when a count has reached a maximum value."),
- "CTD": _("Down-counter\nThe down-counter can be used to signal when a count has reached zero, on counting down from a preset value."),
- "CTUD": _("Up-down counter\nThe up-down counter has two inputs CU and CD. It can be used to both count up on one input and down on the other."),
- "TP": _("Pulse timer\nThe pulse timer can be used to generate output pulses of a given time duration."),
- "TON": _("On-delay timer\nThe on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true."),
- "TOF": _("Off-delay timer\nThe off-delay timer can be used to delay setting an output false, for fixed period after input goes false."),
- "RTC": _("Real time clock\nThe real time clock has many uses including time stamping, setting dates and times of day in batch reports, in alarm messages and so on."),
- "INTEGRAL": _("Integral\nThe integral function block integrates the value of input XIN over time."),
- "DERIVATIVE": _("Derivative\nThe derivative function block produces an output XOUT proportional to the rate of change of the input XIN."),
- "PID": _("PID\nThe PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control."),
- "RAMP": _("Ramp\nThe RAMP function block is modelled on example given in the standard."),
- "HYSTERESIS": _("Hysteresis\nThe hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2."),
-for block_type in ["CTU", "CTD", "CTUD"]:
- for return_type in ["DINT", "LINT", "UDINT", "ULINT"]:
- StdBlockComments["%s_%s" % (block_type, return_type)] = StdBlockComments[block_type]
infos = pou.getblockInfos()
- infos["comment"] = StdBlockComments[infos["name"]]
(var_name, var_type, "rising")
if var_name in ["CU", "CD"]
--- a/plcopen/plcopen.py Sun Mar 05 00:38:25 2017 +0000
+++ b/plcopen/plcopen.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -111,10 +111,15 @@
return len(lines) - 1, len(lines[-1])
+def CompilePattern(criteria): + flag = 0 if criteria["case_sensitive"] else re.IGNORECASE + find_pattern = criteria["find_pattern"] + if not criteria["regular_expression"]: + find_pattern = re.escape(find_pattern) + criteria["pattern"] = re.compile(find_pattern, flag) def TestTextElement(text, criteria):
lines = text.splitlines()
- if not criteria["case_sensitive"]:
result = criteria["pattern"].search(text)
while result is not None:
@@ -124,6 +129,9 @@
result = criteria["pattern"].search(text, result.end())
+def TextMatched(str1, str2): + return str1 and str2 and (str1.upper() == str2.upper()) PLCOpenParser = GenerateParserFromXSD(os.path.join(os.path.split(__file__)[0], "tc6_xml_v201.xsd"))
PLCOpen_XPath = lambda xpath: etree.XPath(xpath, namespaces=PLCOpenParser.NSMAP)
@@ -285,15 +293,8 @@
def updateElementName(self, old_name, new_name):
- index = text.find(old_name)
- if index > 0 and (text[index - 1].isalnum() or text[index - 1] == "_"):
- index = text.find(old_name, index + len(old_name))
- elif index < len(text) - len(old_name) and (text[index + len(old_name)].isalnum() or text[index + len(old_name)] == "_"):
- index = text.find(old_name, index + len(old_name))
- text = text[:index] + new_name + text[index + len(old_name):]
- index = text.find(old_name, index + len(new_name))
+ pattern = re.compile('\\b' + old_name + '\\b', re.IGNORECASE) + text = pattern.sub(new_name, text) setattr(cls, "updateElementName", updateElementName)
@@ -311,14 +312,9 @@
setattr(cls, "updateElementAddress", updateElementAddress)
def hasblock(self, block_type):
- text = self.getanyText().upper()
- index = text.find(block_type.upper())
- if (not (index > 0 and (text[index - 1].isalnum() or text[index - 1] == "_")) and
- not (index < len(text) - len(block_type) and text[index + len(block_type)] != "(")):
- index = text.find(block_type.upper(), index + len(block_type))
+ text = self.getanyText() + pattern = re.compile('\\b' + block_type + '\\b', re.IGNORECASE) + return pattern.search(text) is not None setattr(cls, "hasblock", hasblock)
def Search(self, criteria, parent_infos):
@@ -492,7 +488,8 @@
def addconfigurationResource(self, config_name, name):
if self.getconfigurationResource(config_name, name) is not None:
- raise ValueError, _("\"%s\" resource already exists in \"%s\" configuration !!!") % (name, config_name)
+ msg = _("\"{a1}\" resource already exists in \"{a2}\" configuration !!!").format(a1 = name, a2 = config_name) configuration = self.getconfiguration(config_name)
if configuration is not None:
new_resource = PLCOpenParser.CreateElement("resource", "configuration")
@@ -509,7 +506,8 @@
configuration.remove(resource)
- raise ValueError, _("\"%s\" resource doesn't exist in \"%s\" configuration !!!")%(name, config_name)
+ msg = _("\"{a1}\" resource doesn't exist in \"{a2}\" configuration !!!").format(a1 = name, a2 = config_name) setattr(cls, "removeconfigurationResource", removeconfigurationResource)
def updateElementName(self, old_name, new_name):
@@ -633,9 +631,9 @@
for var in varlist.getvariable():
var_address = var.getaddress()
if var_address is not None:
- if var_address == old_name:
+ if TextMatched(var_address, old_name): - if var.getname() == old_name:
+ if TextMatched(var.getname(), old_name): def _updateConfigurationResourceElementAddress(self, address_model, new_leading):
@@ -769,9 +767,9 @@
cls = PLCOpenParser.GetElementClass("task", "resource")
def updateElementName(self, old_name, new_name):
- if self.single == old_name:
+ if TextMatched(self.single, old_name): - if self.interval == old_name:
+ if TextMatched(self.interval, old_name): for instance in self.getpouInstance():
instance.updateElementName(old_name, new_name)
@@ -794,7 +792,7 @@
cls = PLCOpenParser.GetElementClass("pouInstance")
def updateElementName(self, old_name, new_name):
- if self.typeName == old_name:
+ if TextMatched(self.typeName, old_name): setattr(cls, "updateElementName", updateElementName)
@@ -856,7 +854,7 @@
def getdataTypeElement(self, name):
elements = self.dataTypes.getdataType()
- if element.getname() == name:
+ if TextMatched(element.getname(), name): setattr(cls, "getdataTypeElement", getdataTypeElement)
@@ -875,7 +873,7 @@
def removedataTypeElement(self, name):
for element in self.dataTypes.getdataType():
- if element.getname() == name:
+ if TextMatched(element.getname(), name): self.dataTypes.remove(element)
@@ -890,14 +888,14 @@
def getpouElement(self, name):
elements = self.pous.getpou()
- if element.getname() == name:
+ if TextMatched(element.getname(), name): setattr(cls, "getpouElement", getpouElement)
def appendpouElement(self, name, pou_type, body_type):
for element in self.pous.getpou():
- if element.getname() == name:
+ if TextMatched(element.getname(), name): raise ValueError, _("\"%s\" POU already exists !!!")%name
new_pou = PLCOpenParser.CreateElement("pou", "pous")
self.pous.appendpou(new_pou)
@@ -914,7 +912,7 @@
def removepouElement(self, name):
for element in self.pous.getpou():
- if element.getname() == name:
+ if TextMatched(element.getname(), name): self.pous.remove(element)
@@ -981,7 +979,7 @@
cls = PLCOpenParser.GetElementClass("derived", "dataType")
def updateElementName(self, old_name, new_name):
- if self.name == old_name:
+ if TextMatched(self.name, old_name): setattr(cls, "updateElementName", updateElementName)
@@ -1226,9 +1224,9 @@
variables = varlist.getvariable()
- if var.getname() == old_name:
+ if TextMatched(var.getname(), old_name): vartype_content = var.gettype().getcontent()
- if vartype_content.getLocalTag() == "derived" and vartype_content.getname() == old_type:
+ if vartype_content.getLocalTag() == "derived" and TextMatched(vartype_content.getname(), old_type): vartype_content.setname(new_type)
@@ -1239,21 +1237,28 @@
content = self.interface.getcontent()
for var in varlist.getvariable():
- if var.getname() == name:
+ if TextMatched(var.getname(), name): vartype_content = var.gettype().getcontent()
- if vartype_content.getLocalTag() == "derived" and vartype_content.getname() == var_type:
+ if vartype_content.getLocalTag() == "derived" and TextMatched(vartype_content.getname(), var_type): if len(varlist.getvariable()) == 0:
self.interface.remove(varlist)
setattr(cls, "removepouVar", removepouVar)
+ def hasstep(self, name=None): + if self.getbodyType() in ["SFC"]: + for instance in self.getinstances(): + if isinstance(instance, PLCOpenParser.GetElementClass("step", "sfcObjects")) and TextMatched(instance.getname(), name): + setattr(cls, "hasstep", hasstep) def hasblock(self, name=None, block_type=None):
if self.getbodyType() in ["FBD", "LD", "SFC"]:
for instance in self.getinstances():
if (isinstance(instance, PLCOpenParser.GetElementClass("block", "fbdObjects")) and
- (name and instance.getinstanceName() == name or
- block_type and instance.gettypeName() == block_type)):
+ (TextMatched(instance.getinstanceName(), name) or TextMatched(instance.gettypeName(), block_type))): for transition in self.transitions.gettransition():
@@ -1279,15 +1284,13 @@
transition.setbodyType(body_type)
- transition.setanyText(":= ;")
- elif body_type == "IL":
- transition.setanyText("\tST\t%s"%name)
+ transition.settext(":= ;") setattr(cls, "addtransition", addtransition)
def gettransition(self, name):
if self.transitions is not None:
for transition in self.transitions.gettransition():
- if transition.getname() == name:
+ if TextMatched(transition.getname(), name): setattr(cls, "gettransition", gettransition)
@@ -1302,7 +1305,7 @@
if self.transitions is not None:
for transition in self.transitions.gettransition():
- if transition.getname() == name:
+ if TextMatched(transition.getname(), name): if transition.getbodyType() in ["FBD", "LD", "SFC"]:
for instance in transition.getinstances():
if isinstance(instance, PLCOpenParser.GetElementClass("block", "fbdObjects")):
@@ -1328,7 +1331,7 @@
def getaction(self, name):
if self.actions is not None:
for action in self.actions.getaction():
- if action.getname() == name:
+ if TextMatched(action.getname(), name): setattr(cls, "getaction", getaction)
@@ -1343,7 +1346,7 @@
if self.actions is not None:
for action in self.actions.getaction():
- if action.getname() == name:
+ if TextMatched(action.getname(), name): if action.getbodyType() in ["FBD", "LD", "SFC"]:
for instance in action.getinstances():
if isinstance(instance, PLCOpenParser.GetElementClass("block", "fbdObjects")):
@@ -1362,13 +1365,13 @@
for var in content.getvariable():
var_address = var.getaddress()
if var_address is not None:
- if var_address == old_name:
+ if TextMatched(var_address, old_name): - if var.getname() == old_name:
+ if TextMatched(var.getname(), old_name): var_type_content = var.gettype().getcontent()
if var_type_content.getLocalTag() == "derived":
- if var_type_content.getname() == old_name:
+ if TextMatched(var_type_content.getname(), old_name): var_type_content.setname(new_name)
self.body[0].updateElementName(old_name, new_name)
for action in self.getactionList():
@@ -1395,7 +1398,7 @@
if self.interface is not None:
for content in self.interface.getcontent():
for variable in content.getvariable():
- if variable.getaddress() == address:
+ if TextMatched(variable.getaddress(), address): setattr(cls, "removeVariableByAddress", removeVariableByAddress)
@@ -1414,7 +1417,8 @@
filter = criteria["filter"]
if filter == "all" or self.getpouType() in filter:
- parent_infos = parent_infos + ["P::%s" % self.getname()]
+ parent_infos = parent_infos + ["P::%s" % self.getname()] search_result.extend(_Search([("name", self.getname())], criteria, parent_infos))
if self.interface is not None:
@@ -1486,8 +1490,7 @@
if self.getbodyType() in ["FBD", "LD", "SFC"]:
for instance in self.getinstances():
if (isinstance(instance, PLCOpenParser.GetElementClass("block", "fbdObjects")) and
- (name and instance.getinstanceName() == name or
- block_type and instance.gettypeName() == block_type)):
+ (TextMatched(instance.getinstanceName(), name) or TextMatched(instance.gettypeName(), block_type))): elif block_type is not None:
return self.body.hasblock(block_type)
@@ -1559,7 +1562,7 @@
cls = PLCOpenParser.GetElementClass("body")
cls.currentExecutionOrderId = 0
+ cls.checkedBlocksDict = {} def resetcurrentExecutionOrderId(self):
object.__setattr__(self, "currentExecutionOrderId", 0)
setattr(cls, "resetcurrentExecutionOrderId", resetcurrentExecutionOrderId)
@@ -1576,6 +1579,7 @@
PLCOpenParser.GetElementClass("connector", "commonObjects"),
PLCOpenParser.GetElementClass("continuation", "commonObjects"))):
element.setexecutionOrderId(0)
+ self.checkedBlocksDict.clear() raise TypeError, _("Can only generate execution order on FBD networks!")
setattr(cls, "resetexecutionOrder", resetexecutionOrder)
@@ -1598,16 +1602,19 @@
if self.content.getLocalTag() == "FBD":
localid = link.getrefLocalId()
instance = self.getcontentInstance(localid)
+ self.checkedBlocksDict[localid] = True if isinstance(instance, PLCOpenParser.GetElementClass("block", "fbdObjects")) and instance.getexecutionOrderId() == 0:
for variable in instance.inputVariables.getvariable():
connections = variable.connectionPointIn.getconnections()
if connections and len(connections) == 1:
- self.compileelementExecutionOrder(connections[0])
- instance.setexecutionOrderId(self.getnewExecutionOrderId())
+ if (self.checkedBlocksDict.has_key(connections[0].getrefLocalId()) == False): + self.compileelementExecutionOrder(connections[0]) + if instance.getexecutionOrderId() == 0: + instance.setexecutionOrderId(self.getnewExecutionOrderId()) elif isinstance(instance, PLCOpenParser.GetElementClass("continuation", "commonObjects")) and instance.getexecutionOrderId() == 0:
- name = instance.getname()
for tmp_instance in self.getcontentInstances():
- if isinstance(tmp_instance, PLCOpenParser.GetElementClass("connector", "commonObjects")) and tmp_instance.getname() == name and tmp_instance.getexecutionOrderId() == 0:
+ if (isinstance(tmp_instance, PLCOpenParser.GetElementClass("connector", "commonObjects")) and + TextMatched(tmp_instance.getname(), instance.getname()) and tmp_instance.getexecutionOrderId() == 0): connections = tmp_instance.connectionPointIn.getconnections()
if connections and len(connections) == 1:
self.compileelementExecutionOrder(connections[0])
@@ -1907,7 +1914,7 @@
setattr(cls, "getBoundingBox", getBoundingBox)
def updateElementName(self, old_name, new_name):
- if self.typeName == old_name:
+ if TextMatched(self.typeName, old_name): setattr(cls, "updateElementName", updateElementName)
@@ -1947,7 +1954,7 @@
_initElementClass("rightPowerRail", "ldObjects", "multiple")
def _UpdateLDElementName(self, old_name, new_name):
- if self.variable == old_name:
+ if TextMatched(self.variable, old_name): def _UpdateLDElementAddress(self, address_model, new_leading):
@@ -2053,7 +2060,7 @@
content = self.condition.getcontent()
content_name = content.getLocalTag()
if content_name == "reference":
- if content.getname() == old_name:
+ if TextMatched(content.getname(), old_name): content.setname(new_name)
elif content_name == "inline":
content.updateElementName(old_name, new_name)
@@ -2125,7 +2132,7 @@
setattr(cls, "getinlineContent", getinlineContent)
def updateElementName(self, old_name, new_name):
- if self.reference is not None and self.reference.getname() == old_name:
+ if self.reference is not None and TextMatched(self.reference.getname(), old_name): self.reference.setname(new_name)
if self.inline is not None:
self.inline.updateElementName(old_name, new_name)
@@ -2215,7 +2222,7 @@
return _Search([("expression", self.expression)], criteria, parent_infos + ["io_variable", self.getlocalId()])
def _UpdateIOElementName(self, old_name, new_name):
- if self.expression == old_name:
+ if TextMatched(self.expression, old_name): self.expression = new_name
def _UpdateIOElementAddress(self, address_model, new_leading):
@@ -2248,7 +2255,7 @@
setattr(cls, "Search", _SearchInConnector)
def updateElementName(self, old_name, new_name):
- if self.name == old_name:
+ if TextMatched(self.name, old_name): setattr(cls, "updateElementName", updateElementName)
@@ -2257,7 +2264,7 @@
setattr(cls, "Search", _SearchInConnector)
def updateElementName(self, old_name, new_name):
- if self.name == old_name:
+ if TextMatched(self.name, old_name): setattr(cls, "updateElementName", updateElementName)
--- a/plcopen/structures.py Sun Mar 05 00:38:25 2017 +0000
+++ b/plcopen/structures.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from plcopen import LoadProject
--- a/py_ext/PythonEditor.py Sun Mar 05 00:38:25 2017 +0000
+++ b/py_ext/PythonEditor.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/py_ext/PythonFileCTNMixin.py Sun Mar 05 00:38:25 2017 +0000
+++ b/py_ext/PythonFileCTNMixin.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -258,10 +282,10 @@
pycfile.write(PyCFileContent)
- matiec_flags = '"-l -p -I%s"'%os.path.abspath(
+ matiec_CFLAGS = '"-I%s"'%os.path.abspath( self.GetCTRoot().GetIECLibPath())
- return ([(Gen_PyCfile_path, matiec_flags)],
+ return ([(Gen_PyCfile_path, matiec_CFLAGS)], ("runtime_%s.py"%location_str, file(runtimefile_path,"rb")))
--- a/py_ext/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/py_ext/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from PythonEditor import PythonEditor
from PythonFileCTNMixin import PythonFileCTNMixin
--- a/py_ext/py_ext.py Sun Mar 05 00:38:25 2017 +0000
+++ b/py_ext/py_ext.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from POULibrary import POULibrary
from PythonFileCTNMixin import PythonFileCTNMixin
--- a/runtime/NevowServer.py Sun Mar 05 00:38:25 2017 +0000
+++ b/runtime/NevowServer.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from nevow import rend, appserver, inevow, tags, loaders, athena
from nevow.page import renderer
@@ -154,7 +178,7 @@
reactor.listenTCP(port, site)
- print "Http interface port :",port
+ print _("HTTP interface port :"), port --- a/runtime/PLCObject.py Sun Mar 05 00:38:25 2017 +0000
+++ b/runtime/PLCObject.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from threading import Timer, Thread, Lock, Semaphore, Event
@@ -79,7 +79,8 @@
self.CurrentPLCFilename=open(
"r").read().strip() + lib_ext
+ self.PLCStatus = "Stopped" self.CurrentPLCFilename=None
--- a/runtime/ServicePublisher.py Sun Mar 05 00:38:25 2017 +0000
+++ b/runtime/ServicePublisher.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from util import Zeroconf
--- a/runtime/WampClient.py Sun Mar 05 00:38:25 2017 +0000
+++ b/runtime/WampClient.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,6 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #from twisted.python import log
from autobahn.twisted import wamp
--- a/runtime/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/runtime/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # module which import C files as strings
--- a/svgui/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/svgui/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,1 +1,25 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/svgui/svgui.py Sun Mar 05 00:38:25 2017 +0000
+++ b/svgui/svgui.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/svgui/svgui_server.py Sun Mar 05 00:38:25 2017 +0000
+++ b/svgui/svgui_server.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,6 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from nevow import rend, appserver, inevow, tags, loaders, athena
--- a/svgui/svguilib.py Sun Mar 05 00:38:25 2017 +0000
+++ b/svgui/svguilib.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/targets/Generic/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/Generic/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from ..toolchain_makefile import toolchain_makefile
class Generic_target(toolchain_makefile):
--- a/targets/Linux/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/Linux/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from ..toolchain_gcc import toolchain_gcc
class Linux_target(toolchain_gcc):
--- a/targets/Win32/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/Win32/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from ..toolchain_gcc import toolchain_gcc
class Win32_target(toolchain_gcc):
--- a/targets/Win32/plc_Win32_main.c Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/Win32/plc_Win32_main.c Fri Mar 24 12:07:47 2017 +0000
@@ -84,7 +84,7 @@
printf("startPLC CreateSemaphore debug_sem error: %d\n", GetLastError());
debug_wait_sem = CreateSemaphore(
@@ -96,7 +96,7 @@
if (debug_wait_sem == NULL)
printf("startPLC CreateSemaphore debug_wait_sem error: %d\n", GetLastError());
python_sem = CreateSemaphore(
@@ -108,7 +108,7 @@
printf("startPLC CreateSemaphore python_sem error: %d\n", GetLastError());
python_wait_sem = CreateSemaphore(
NULL, // default security attributes
@@ -120,7 +120,7 @@
if (python_wait_sem == NULL)
printf("startPLC CreateSemaphore python_wait_sem error: %d\n", GetLastError());
--- a/targets/XSD_toolchain_gcc Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/XSD_toolchain_gcc Fri Mar 24 12:07:47 2017 +0000
@@ -1,5 +1,5 @@
<xsd:attribute name="Compiler" type="xsd:string" use="optional" default="gcc"/>
- <xsd:attribute name="CFLAGS" type="xsd:string" use="required"/>
+ <xsd:attribute name="CFLAGS" type="xsd:string" use="optional" default=""/> <xsd:attribute name="Linker" type="xsd:string" use="optional" default="gcc"/>
- <xsd:attribute name="LDFLAGS" type="xsd:string" use="required"/>
+ <xsd:attribute name="LDFLAGS" type="xsd:string" use="optional" default=""/> --- a/targets/Xenomai/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/Xenomai/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from ..toolchain_gcc import toolchain_gcc
class Xenomai_target(toolchain_gcc):
--- a/targets/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,23 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/targets/plc_debug.c Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/plc_debug.c Fri Mar 24 12:07:47 2017 +0000
@@ -149,7 +149,7 @@
void Retain(unsigned int offset, unsigned int count, void * p);
-inline void BufferIterator(dbgvardsc_t *dsc, int do_debug)
+static inline void BufferIterator(dbgvardsc_t *dsc, int do_debug) void *real_value_p = NULL;
void *visible_value_p = NULL;
--- a/targets/plc_main_tail.c Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/plc_main_tail.c Fri Mar 24 12:07:47 2017 +0000
@@ -16,7 +16,7 @@
#define LOG_BUFFER_MASK (LOG_BUFFER_SIZE-1)
static char LogBuff[LOG_LEVELS][LOG_BUFFER_SIZE] LOG_BUFFER_ATTRS;
-void inline copy_to_log(uint8_t level, uint32_t buffpos, void* buf, uint32_t size){
+static void inline copy_to_log(uint8_t level, uint32_t buffpos, void* buf, uint32_t size){ if(buffpos + size < LOG_BUFFER_SIZE){
memcpy(&LogBuff[level][buffpos], buf, size);
@@ -25,7 +25,7 @@
memcpy(LogBuff[level], (char*)buf + remaining, size - remaining);
-void inline copy_from_log(uint8_t level, uint32_t buffpos, void* buf, uint32_t size){
+static void inline copy_from_log(uint8_t level, uint32_t buffpos, void* buf, uint32_t size){ if(buffpos + size < LOG_BUFFER_SIZE){
memcpy(buf, &LogBuff[level][buffpos], size);
--- a/targets/toolchain_gcc.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/toolchain_gcc.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from util.ProcessLogger import ProcessLogger
--- a/targets/toolchain_makefile.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/toolchain_makefile.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from util.ProcessLogger import ProcessLogger
@@ -6,15 +30,6 @@
includes_re = re.compile('\s*#include\s*["<]([^">]*)[">].*')
- # on windows, desktop shortcut launches Beremiz.py
- # with working dir set to mingw/bin.
- # then we prefix CWD to PATH in order to ensure that
- # commands invoked from Makefiles will first resolve
- os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"]
class toolchain_makefile():
def __init__(self, CTRInstance):
self.CTRInstance = CTRInstance
@@ -80,11 +95,7 @@
self.md5key = hashlib.md5(wholesrcdata).hexdigest()
- props = self.CTRInstance.GetProjectProperties()
- self.md5key += '#'.join([props[key] for key in ['companyName',
- self.md5key += '#' #+','.join(map(str,time.localtime()))
# Store new PLC filename based on md5 key
f = open(self._GetMD5FileName(), "w")
@@ -98,7 +109,10 @@
"buildpath": self.buildpath
- command = [ token % beremizcommand for token in target.getCommand().split(' ')]
+ # clean sequence of multiple whitespaces + cmd = re.sub(r"[ ]+", " ", target.getCommand()) + command = [ token % beremizcommand for token in cmd.split(' ')] # Call Makefile to build PLC code and link it with target specific code
status, result, err_result = ProcessLogger(self.CTRInstance.logger,
--- a/targets/typemapping.py Sun Mar 05 00:38:25 2017 +0000
+++ b/targets/typemapping.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,23 +1,26 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2011: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2011: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/first_steps/beremiz.xml Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?> +<BeremizRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" URI_location="LOCAL://"> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/first_steps/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,1019 @@
+<?xml version='1.0' encoding='utf-8'?> +<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201"> + <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2016-10-24T18:09:22"/> + <contentHeader name="First Steps" modificationDateTime="2016-10-26T20:18:02"> + <pou name="plc_prg" pouType="program"> + <variable name="Reset"> + <variable name="CounterST0"> + <derived name="CounterST"/> + <variable name="CounterFBD0"> + <derived name="CounterFBD"/> + <variable name="CounterSFC0"> + <derived name="CounterSFC"/> + <variable name="CounterIL0"> + <derived name="CounterIL"/> + <variable name="CounterLD0"> + <derived name="CounterLD"/> + <block localId="1" typeName="CounterST" instanceName="CounterST0" executionOrderId="0" height="60" width="125"> + <position x="207" y="53"/> + <variable formalParameter="Reset"> + <relPosition x="0" y="40"/> + <connection refLocalId="2"> + <position x="207" y="93"/> + <position x="114" y="93"/> + <variable formalParameter="OUT"> + <relPosition x="125" y="40"/> + <inVariable localId="2" executionOrderId="0" height="24" width="79" negated="false"> + <position x="35" y="81"/> + <relPosition x="79" y="12"/> + <expression>Reset</expression> + <outVariable localId="3" executionOrderId="0" height="24" width="106" negated="false"> + <position x="424" y="81"/> + <relPosition x="0" y="12"/> + <connection refLocalId="1" formalParameter="OUT"> + <position x="424" y="93"/> + <position x="332" y="93"/> + <expression>Cnt1</expression> + <block localId="4" typeName="CounterFBD" instanceName="CounterFBD0" executionOrderId="0" height="54" width="121"> + <position x="211" y="145"/> + <variable formalParameter="Reset"> + <relPosition x="0" y="37"/> + <connection refLocalId="13"> + <position x="211" y="182"/> + <position x="115" y="182"/> + <variable formalParameter="OUT"> + <relPosition x="121" y="37"/> + <outVariable localId="5" executionOrderId="0" height="24" width="103" negated="false"> + <position x="426" y="170"/> + <relPosition x="0" y="12"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="426" y="182"/> + <position x="332" y="182"/> + <expression>Cnt2</expression> + <comment localId="6" height="264" width="417"> + <position x="569" y="55"/> + <xhtml:p><![CDATA[In this example function block with the same functionality +is created using all five IEC 61131-3 programing languages: +Function block is a counter with reset control input. +If reset is True counter value is reset to the value defined by +global configuration constant ResetCounterValue. +If reset is False, counter is incremented every cycle. + <block localId="7" typeName="CounterSFC" instanceName="CounterSFC0" executionOrderId="0" height="52" width="121"> + <position x="211" y="237"/> + <variable formalParameter="Reset"> + <relPosition x="0" y="36"/> + <connection refLocalId="12"> + <position x="211" y="273"/> + <position x="103" y="273"/> + <variable formalParameter="OUT"> + <relPosition x="121" y="36"/> + <outVariable localId="8" executionOrderId="0" height="24" width="97" negated="false"> + <position x="431" y="261"/> + <relPosition x="0" y="12"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="431" y="273"/> + <position x="332" y="273"/> + <expression>Cnt3</expression> + <block localId="9" typeName="CounterIL" instanceName="CounterIL0" executionOrderId="0" height="62" width="121"> + <position x="211" y="322"/> + <variable formalParameter="Reset"> + <relPosition x="0" y="41"/> + <connection refLocalId="10"> + <position x="211" y="363"/> + <position x="101" y="363"/> + <variable formalParameter="OUT"> + <relPosition x="121" y="41"/> + <inVariable localId="10" executionOrderId="0" height="24" width="67" negated="false"> + <position x="34" y="351"/> + <relPosition x="67" y="12"/> + <expression>Reset</expression> + <outVariable localId="11" executionOrderId="0" height="24" width="91" negated="false"> + <position x="434" y="351"/> + <relPosition x="0" y="12"/> + <connection refLocalId="9" formalParameter="OUT"> + <position x="434" y="363"/> + <position x="332" y="363"/> + <expression>Cnt4</expression> + <inVariable localId="12" executionOrderId="0" height="24" width="67" negated="false"> + <position x="36" y="261"/> + <relPosition x="67" y="12"/> + <expression>Reset</expression> + <inVariable localId="13" executionOrderId="0" height="24" width="79" negated="false"> + <position x="36" y="170"/> + <relPosition x="79" y="12"/> + <expression>Reset</expression> + <block localId="14" typeName="CounterLD" instanceName="CounterLD0" executionOrderId="0" height="62" width="124"> + <position x="210" y="411"/> + <variable formalParameter="Reset"> + <relPosition x="0" y="41"/> + <connection refLocalId="16"> + <position x="210" y="452"/> + <position x="100" y="452"/> + <variable formalParameter="Out"> + <relPosition x="124" y="41"/> + <outVariable localId="15" executionOrderId="0" height="24" width="88" negated="false"> + <position x="437" y="440"/> + <relPosition x="0" y="12"/> + <connection refLocalId="14" formalParameter="Out"> + <position x="437" y="452"/> + <position x="334" y="452"/> + <expression>Cnt5</expression> + <inVariable localId="16" executionOrderId="0" height="24" width="64" negated="false"> + <position x="36" y="440"/> + <relPosition x="64" y="12"/> + <expression>Reset</expression> + <pou name="CounterST" pouType="functionBlock"> + <variable name="Reset"> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <xhtml:p><![CDATA[IF Reset THEN + Cnt := ResetCounterValue; +Out := Cnt;]]></xhtml:p> + <pou name="CounterFBD" pouType="functionBlock"> + <variable name="Reset"> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <inVariable localId="1" executionOrderId="0" height="24" width="61" negated="false"> + <position x="321" y="58"/> + <relPosition x="61" y="12"/> + <expression>Reset</expression> + <outVariable localId="2" executionOrderId="0" height="24" width="34" negated="false"> + <position x="675" y="137"/> + <relPosition x="0" y="12"/> + <connection refLocalId="3"> + <position x="675" y="149"/> + <position x="586" y="149"/> + <expression>OUT</expression> + <inOutVariable localId="3" executionOrderId="0" height="24" width="29" negatedOut="false" negatedIn="false"> + <position x="557" y="137"/> + <relPosition x="0" y="12"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="557" y="149"/> + <position x="524" y="149"/> + <position x="524" y="130"/> + <position x="505" y="130"/> + <relPosition x="29" y="12"/> + <expression>Cnt</expression> + <block localId="4" typeName="ADD" executionOrderId="0" height="80" width="57"> + <position x="328" y="115"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="35"/> + <connection refLocalId="6"> + <position x="328" y="150"/> + <position x="275" y="150"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="65"/> + <connection refLocalId="3"> + <position x="328" y="180"/> + <position x="317" y="180"/> + <position x="317" y="213"/> + <position x="596" y="213"/> + <position x="596" y="149"/> + <position x="586" y="149"/> + <variable formalParameter="OUT"> + <relPosition x="57" y="35"/> + <inVariable localId="5" executionOrderId="0" height="24" width="158" negated="false"> + <position x="222" y="256"/> + <relPosition x="158" y="12"/> + <expression>ResetCounterValue</expression> + <inVariable localId="6" executionOrderId="0" height="24" width="21" negated="false"> + <position x="254" y="138"/> + <relPosition x="21" y="12"/> + <expression>1</expression> + <block localId="7" typeName="SEL" executionOrderId="0" height="80" width="57"> + <position x="448" y="100"/> + <variable formalParameter="G"> + <relPosition x="0" y="30"/> + <connection refLocalId="1"> + <position x="448" y="130"/> + <position x="415" y="130"/> + <position x="415" y="70"/> + <position x="382" y="70"/> + <variable formalParameter="IN0"> + <relPosition x="0" y="50"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="448" y="150"/> + <position x="385" y="150"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="70"/> + <connection refLocalId="5"> + <position x="448" y="170"/> + <position x="414" y="170"/> + <position x="414" y="268"/> + <position x="380" y="268"/> + <variable formalParameter="OUT"> + <relPosition x="57" y="30"/> + <pou name="CounterSFC" pouType="functionBlock"> + <variable name="Reset"> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <step localId="1" name="Start" initialStep="true" height="28" width="90"> + <position x="241" y="14"/> + <connectionPointOut formalParameter=""> + <relPosition x="45" y="28"/> + <selectionDivergence localId="2" height="1" width="431"> + <position x="70" y="86"/> + <relPosition x="216" y="0"/> + <connection refLocalId="1"> + <position x="286" y="86"/> + <position x="286" y="42"/> + <connectionPointOut formalParameter=""> + <relPosition x="0" y="1"/> + <connectionPointOut formalParameter=""> + <relPosition x="431" y="1"/> + <transition localId="3" height="2" width="20"> + <position x="491" y="132"/> + <relPosition x="10" y="0"/> + <connection refLocalId="2"> + <position x="501" y="132"/> + <position x="501" y="87"/> + <relPosition x="10" y="2"/> + <xhtml:p><![CDATA[Reset]]></xhtml:p> + <transition localId="4" height="2" width="20" executionOrderId="0"> + <position x="60" y="135"/> + <relPosition x="10" y="0"/> + <connection refLocalId="2"> + <position x="70" y="135"/> + <position x="70" y="87"/> + <relPosition x="10" y="2"/> + <xhtml:p><![CDATA[NOT Reset]]></xhtml:p> + <step localId="5" name="ResetCounter" initialStep="false" height="24" width="104"> + <position x="449" y="190"/> + <relPosition x="52" y="0"/> + <connection refLocalId="3"> + <position x="501" y="190"/> + <position x="501" y="134"/> + <connectionPointOut formalParameter=""> + <relPosition x="52" y="24"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="104" y="12"/> + </connectionPointOutAction> + <actionBlock localId="6" height="63" width="222"> + <position x="600" y="187"/> + <relPosition x="0" y="15"/> + <connection refLocalId="5"> + <position x="600" y="202"/> + <position x="553" y="202"/> + <relPosition x="0" y="0"/> + <xhtml:p><![CDATA[Cnt := ResetCounterValue;]]></xhtml:p> + <relPosition x="0" y="0"/> + <xhtml:p><![CDATA[OUT := Cnt;]]></xhtml:p> + <step localId="7" name="Count" initialStep="false" height="24" width="85" executionOrderId="0"> + <position x="28" y="191"/> + <relPosition x="42" y="0"/> + <connection refLocalId="4"> + <position x="70" y="191"/> + <position x="70" y="137"/> + <connectionPointOut formalParameter=""> + <relPosition x="42" y="24"/> + <connectionPointOutAction formalParameter=""> + <relPosition x="85" y="12"/> + </connectionPointOutAction> + <actionBlock localId="8" height="52" width="148" executionOrderId="0"> + <position x="135" y="188"/> + <relPosition x="0" y="15"/> + <connection refLocalId="7"> + <position x="135" y="203"/> + <position x="113" y="203"/> + <relPosition x="0" y="0"/> + <xhtml:p><![CDATA[Cnt := Cnt + 1;]]></xhtml:p> + <relPosition x="0" y="0"/> + <xhtml:p><![CDATA[OUT := Cnt;]]></xhtml:p> + <selectionConvergence localId="10" height="1" width="431"> + <position x="70" y="273"/> + <relPosition x="0" y="0"/> + <connection refLocalId="13"> + <position x="70" y="273"/> + <position x="70" y="244"/> + <relPosition x="431" y="0"/> + <connection refLocalId="14"> + <position x="501" y="273"/> + <position x="501" y="250"/> + <relPosition x="216" y="1"/> + </selectionConvergence> + <jumpStep localId="12" targetName="Start" height="13" width="12"> + <position x="280" y="317"/> + <relPosition x="6" y="0"/> + <connection refLocalId="10"> + <position x="286" y="317"/> + <position x="286" y="274"/> + <transition localId="13" height="2" width="20" executionOrderId="0"> + <position x="60" y="242"/> + <relPosition x="10" y="0"/> + <connection refLocalId="7"> + <position x="70" y="242"/> + <position x="70" y="215"/> + <relPosition x="10" y="2"/> + <xhtml:p><![CDATA[Reset]]></xhtml:p> + <transition localId="14" height="2" width="20" executionOrderId="0"> + <position x="491" y="248"/> + <relPosition x="10" y="0"/> + <connection refLocalId="5"> + <position x="501" y="248"/> + <position x="501" y="214"/> + <relPosition x="10" y="2"/> + <xhtml:p><![CDATA[NOT Reset]]></xhtml:p> + <pou name="CounterIL" pouType="functionBlock"> + <variable name="Reset"> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <xhtml:p><![CDATA[LD Reset + <pou name="CounterLD" pouType="functionBlock"> + <variable name="Reset"> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <outVariable localId="2" executionOrderId="0" height="24" width="34" negated="false"> + <position x="527" y="90"/> + <relPosition x="0" y="12"/> + <connection refLocalId="3"> + <position x="527" y="102"/> + <position x="438" y="102"/> + <expression>Out</expression> + <inOutVariable localId="3" executionOrderId="0" height="24" width="29" negatedOut="false" negatedIn="false"> + <position x="409" y="90"/> + <relPosition x="0" y="12"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="409" y="102"/> + <position x="357" y="102"/> + <relPosition x="29" y="12"/> + <expression>Cnt</expression> + <block localId="4" typeName="ADD" executionOrderId="0" height="80" width="57"> + <position x="180" y="87"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="35"/> + <connection refLocalId="6"> + <position x="180" y="122"/> + <position x="127" y="122"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="65"/> + <connection refLocalId="3"> + <position x="180" y="152"/> + <position x="169" y="152"/> + <position x="169" y="185"/> + <position x="448" y="185"/> + <position x="448" y="102"/> + <position x="438" y="102"/> + <variable formalParameter="OUT"> + <relPosition x="57" y="35"/> + <inVariable localId="5" executionOrderId="0" height="24" width="158" negated="false"> + <position x="74" y="228"/> + <relPosition x="158" y="12"/> + <expression>ResetCounterValue</expression> + <inVariable localId="6" executionOrderId="0" height="24" width="21" negated="false"> + <position x="106" y="110"/> + <relPosition x="21" y="12"/> + <expression>1</expression> + <block localId="7" typeName="SEL" executionOrderId="0" height="80" width="57"> + <position x="300" y="72"/> + <variable formalParameter="G"> + <relPosition x="0" y="30"/> + <connection refLocalId="9"> + <position x="300" y="102"/> + <position x="266" y="102"/> + <position x="266" y="62"/> + <position x="134" y="62"/> + <variable formalParameter="IN0"> + <relPosition x="0" y="50"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="300" y="122"/> + <position x="237" y="122"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="70"/> + <connection refLocalId="5"> + <position x="300" y="142"/> + <position x="266" y="142"/> + <position x="266" y="240"/> + <position x="232" y="240"/> + <variable formalParameter="OUT"> + <relPosition x="57" y="30"/> + <leftPowerRail localId="8" height="40" width="3"> + <position x="46" y="42"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <contact localId="9" height="15" width="21" negated="false"> + <position x="113" y="54"/> + <relPosition x="0" y="8"/> + <connection refLocalId="8"> + <position x="113" y="62"/> + <position x="49" y="62"/> + <relPosition x="21" y="8"/> + <variable>Reset</variable> + <configuration name="config"> + <resource name="resource1"> + <task name="plc_task" priority="1" interval="T#100ms"> + <pouInstance name="plc_task_instance" typeName="plc_prg"/> + <globalVars constant="true"> + <variable name="ResetCounterValue"> + <simpleValue value="17"/> --- a/tests/genericmake/plc.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/genericmake/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
- <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2014-01-19T11:14:47"/>
- <contentHeader name="Unnamed" modificationDateTime="2014-01-20T01:37:01">
+ <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2014-01-19T11:14:47" contentDescription="This example shows how you can customize build process by using 'make'. "/> + <contentHeader name="Makefile Example" modificationDateTime="2016-10-14T14:00:01"> @@ -35,25 +35,44 @@
<inVariable localId="1" executionOrderId="0" height="27" width="77" negated="false">
- <position x="196" y="224"/>
+ <position x="52" y="368"/> <relPosition x="77" y="13"/>
<expression>LocalVara</expression>
<outVariable localId="2" executionOrderId="0" height="27" width="77" negated="false">
- <position x="305" y="227"/>
+ <position x="167" y="368"/> <relPosition x="0" y="13"/>
<connection refLocalId="1">
- <position x="305" y="240"/>
- <position x="288" y="240"/>
- <position x="288" y="237"/>
- <position x="273" y="237"/>
+ <position x="167" y="381"/> + <position x="129" y="381"/> <expression>LocalVarb</expression>
+ <comment localId="3" height="310" width="760"> + <position x="32" y="23"/> + <xhtml:p><![CDATA[This example shows how you can customize build process by using 'make'. +Sometimes special steps need to be done to build entire project. +But it's not necessary to create another target in Beremiz every time you need to customize something in build process. Just use for that 'Generic' target and describe all necessary steps in Makefile. + - preprocess generated by Beremiz C source files, + - do some fancy source code transformation using any tools you want, + - use any compiler you want, + - call static analyzers, + - run integration tests on the project, + - upload source code to external build server, + - upload to the target and compile it there, + - flash/transfer your compiled binary to the target, --- a/tests/genericmake/project_files/Makefile Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/genericmake/project_files/Makefile Fri Mar 24 12:07:47 2017 +0000
@@ -9,5 +9,5 @@
some_binary: $(BEREMIZ_OBJS)
@echo "* Would link $^ -> $@"
@echo "* Would compile $< -> $@"
--- a/tests/logging/plc.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/logging/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -1,14 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.plcopen.org/xml/tc6.xsd"
- xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xhtml="http://www.w3.org/1999/xhtml">
- <fileHeader companyName="Unknown"
- creationDateTime="2013-01-29T14:01:00"/>
- <contentHeader name="Unnamed"
- modificationDateTime="2013-04-04T11:06:06">
+<?xml version='1.0' encoding='utf-8'?> +<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> + <fileHeader companyName="Unknown" productName="Generic PLC" productVersion="1" creationDateTime="2013-01-29T14:01:00" contentDescription="This example shows logging functionality in Beremiz. Here are shown two ways of logging: - from IEC PLC program; - from python extension. "/> + <contentHeader name="Logging example" modificationDateTime="2016-09-09T17:54:15"> @@ -47,29 +40,34 @@
<derived name="LOGLEVEL"/>
- <simpleValue value="WARNING"/>
+ <simpleValue value="INFO"/> + <variable name="Timer"> - <inVariable localId="2" height="27" width="85">
- <position x="732" y="188"/>
+ <inVariable localId="2" height="30" width="170" executionOrderId="0" negated="false"> + <position x="507" y="347"/> - <relPosition x="85" y="13"/>
+ <relPosition x="170" y="15"/> - <expression>'Moooooo'</expression>
+ <expression>'IEC side logging: beat #'</expression> - <block localId="3" width="59" height="40" typeName="NOT">
- <position x="213" y="64"/>
+ <block localId="3" width="59" height="40" typeName="NOT" executionOrderId="0"> + <position x="241" y="269"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
- <connection refLocalId="4">
- <position x="213" y="94"/>
- <position x="179" y="94"/>
+ <connection refLocalId="14" formalParameter="Q"> + <position x="241" y="299"/> + <position x="195" y="299"/> @@ -83,44 +81,46 @@
- <inOutVariable localId="4" height="27" width="41">
- <position x="138" y="81"/>
+ <inOutVariable localId="4" height="27" width="51" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="66" y="286"/> <relPosition x="0" y="13"/>
<connection refLocalId="3" formalParameter="OUT">
- <position x="138" y="94"/>
- <position x="123" y="94"/>
- <position x="123" y="124"/>
- <position x="282" y="124"/>
- <position x="282" y="94"/>
- <position x="272" y="94"/>
+ <position x="66" y="299"/> + <position x="37" y="299"/> + <position x="37" y="372"/> + <position x="314" y="372"/> + <position x="314" y="299"/> + <position x="300" y="299"/> - <relPosition x="41" y="13"/>
+ <relPosition x="51" y="13"/> <expression>beat</expression>
- <block localId="5" width="68" height="80" typeName="ADD">
- <position x="482" y="209"/>
+ <block localId="5" width="68" height="98" typeName="ADD" executionOrderId="0"> + <position x="463" y="385"/> <variable formalParameter="IN1">
- <relPosition x="0" y="35"/>
+ <relPosition x="0" y="39"/> <connection refLocalId="10" formalParameter="OUT">
- <position x="482" y="244"/>
- <position x="459" y="244"/>
- <position x="459" y="230"/>
- <position x="449" y="230"/>
+ <position x="463" y="424"/> + <position x="452" y="424"/> + <position x="452" y="424"/> + <position x="454" y="424"/> + <position x="454" y="424"/> + <position x="444" y="424"/> <variable formalParameter="IN2">
- <relPosition x="0" y="65"/>
+ <relPosition x="0" y="78"/> <connection refLocalId="6">
- <position x="482" y="274"/>
- <position x="397" y="274"/>
+ <position x="463" y="463"/> + <position x="444" y="463"/> @@ -129,51 +129,47 @@
<variable formalParameter="OUT">
- <relPosition x="68" y="35"/>
+ <relPosition x="68" y="39"/> - <inOutVariable localId="6" height="27" width="48">
- <position x="349" y="261"/>
+ <inOutVariable localId="6" height="27" width="103" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="341" y="450"/> <relPosition x="0" y="13"/>
<connection refLocalId="5" formalParameter="OUT">
- <position x="349" y="274"/>
- <position x="339" y="274"/>
- <position x="339" y="306"/>
- <position x="563" y="306"/>
- <position x="563" y="244"/>
- <position x="550" y="244"/>
+ <position x="341" y="463"/> + <position x="320" y="463"/> + <position x="320" y="500"/> + <position x="544" y="500"/> + <position x="544" y="424"/> + <position x="531" y="424"/> - <relPosition x="48" y="13"/>
+ <relPosition x="103" y="13"/> <expression>count</expression>
- <block localId="8" width="67" height="60" typeName="CONCAT">
- <position x="868" y="174"/>
+ <block localId="8" width="67" height="144" typeName="CONCAT" executionOrderId="0"> + <position x="727" y="311"/> <variable formalParameter="IN1">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="51"/> <connection refLocalId="2">
- <position x="868" y="204"/>
- <position x="843" y="204"/>
- <position x="843" y="201"/>
- <position x="817" y="201"/>
+ <position x="727" y="362"/> + <position x="677" y="362"/> <variable formalParameter="IN2">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="113"/> <connection refLocalId="9" formalParameter="OUT">
- <position x="868" y="224"/>
- <position x="765" y="224"/>
- <position x="765" y="232"/>
- <position x="712" y="232"/>
+ <position x="727" y="424"/> + <position x="677" y="424"/> @@ -182,22 +178,20 @@
<variable formalParameter="OUT">
- <relPosition x="67" y="30"/>
+ <relPosition x="67" y="51"/> - <block localId="9" width="116" height="40" typeName="INT_TO_STRING">
- <position x="596" y="202"/>
+ <block localId="9" width="116" height="40" typeName="INT_TO_STRING" executionOrderId="0"> + <position x="561" y="394"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="5" formalParameter="OUT">
- <position x="596" y="232"/>
- <position x="573" y="232"/>
- <position x="573" y="244"/>
- <position x="550" y="244"/>
+ <position x="561" y="424"/> + <position x="531" y="424"/> @@ -211,19 +205,17 @@
- <block localId="10" width="105" height="40" typeName="BOOL_TO_INT">
- <position x="344" y="200"/>
+ <block localId="10" width="105" height="40" typeName="BOOL_TO_INT" executionOrderId="0"> + <position x="339" y="394"/> <variable formalParameter="IN" edge="rising">
<relPosition x="0" y="30"/>
<connection refLocalId="3" formalParameter="OUT">
- <position x="344" y="230"/>
- <position x="242" y="230"/>
- <position x="242" y="163"/>
- <position x="282" y="163"/>
- <position x="282" y="94"/>
- <position x="272" y="94"/>
+ <position x="339" y="424"/> + <position x="314" y="424"/> + <position x="314" y="299"/> + <position x="300" y="299"/> @@ -237,39 +229,33 @@
- <block localId="11" width="65" height="80" typeName="LOGGER" instanceName="LOGGER0">
- <position x="1100" y="98"/>
+ <block localId="11" width="65" height="209" typeName="LOGGER" instanceName="LOGGER0" executionOrderId="0"> + <position x="907" y="248"/> <variable formalParameter="TRIG">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="52"/> <connection refLocalId="3" formalParameter="OUT">
- <position x="1100" y="128"/>
- <position x="631" y="128"/>
- <position x="631" y="94"/>
- <position x="272" y="94"/>
+ <position x="907" y="300"/> + <position x="300" y="300"/> <variable formalParameter="MSG">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="112"/> <connection refLocalId="8" formalParameter="OUT">
- <position x="1100" y="148"/>
- <position x="963" y="148"/>
- <position x="963" y="204"/>
- <position x="935" y="204"/>
+ <position x="907" y="360"/> + <position x="794" y="360"/> <variable formalParameter="LEVEL">
- <relPosition x="0" y="70"/>
+ <relPosition x="0" y="177"/> <connection refLocalId="12">
- <position x="1100" y="168"/>
- <position x="1090" y="168"/>
- <position x="1090" y="168"/>
- <position x="1057" y="168"/>
+ <position x="907" y="425"/> + <position x="879" y="425"/> @@ -277,13 +263,72 @@
- <inVariable localId="12" height="27" width="79">
- <position x="978" y="155"/>
+ <inVariable localId="12" height="27" width="79" executionOrderId="0" negated="false"> + <position x="800" y="412"/> <relPosition x="79" y="13"/>
- <expression>WARNING</expression>
+ <expression>lvl</expression> + <block localId="14" typeName="TOF" instanceName="Timer" executionOrderId="0" height="98" width="45"> + <position x="150" y="260"/> + <variable formalParameter="IN"> + <relPosition x="0" y="39"/> + <connection refLocalId="4"> + <position x="150" y="299"/> + <position x="117" y="299"/> + <variable formalParameter="PT"> + <relPosition x="0" y="78"/> + <connection refLocalId="1"> + <position x="150" y="338"/> + <position x="117" y="338"/> + <variable formalParameter="Q"> + <relPosition x="45" y="39"/> + <variable formalParameter="ET"> + <relPosition x="45" y="78"/> + <inVariable localId="1" executionOrderId="0" height="24" width="52" negated="false"> + <position x="65" y="326"/> + <relPosition x="52" y="12"/> + <expression>T#3s</expression> + <comment localId="15" height="212" width="675"> + <position x="27" y="16"/> + <xhtml:p><![CDATA[This example shows logging functionality in Beremiz. +Here are shown two ways of logging: +- from python extension. +In IEC PLC program every third second (beat) new message is generated and put in PLC log. +See function blocks below. +Every 15 seconds status of PLC program is put in PLC log from python extension. +For more information about logging from python look at 0.x: py_ext_0 implementation in project tree. @@ -293,8 +338,8 @@
<configuration name="config">
<resource name="resource1">
- <task name="blob" interval="T#100ms" priority="0">
- <pouInstance name="blub" typeName="program0"/>
+ <task name="task0" priority="0" interval="T#100ms"> + <pouInstance name="prg" typeName="program0"/> --- a/tests/logging/py_ext_0@py_ext/py_ext.xml Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<Python xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="py_ext_xsd.xsd">
-<![CDATA[import threading, time
- MyT=threading.Thread(target = DoLog)
- PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus)
-_runtime_init.append(StartLog)
-_runtime_cleanup.append(StopLog)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/logging/py_ext_0@py_ext/pyfile.xml Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,41 @@
+<?xml version='1.0' encoding='utf-8'?> +<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xhtml:p><![CDATA[import threading, time + MyT=threading.Thread(target = DoLog) + PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus) +_runtime_init.append(StartLog) +_runtime_cleanup.append(StopLog) + <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[]]></xhtml:p> --- a/tests/python/plc.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/python/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201">
- <fileHeader companyName="" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19"/>
- <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2015-03-13T22:06:10">
+ <fileHeader companyName="" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19" contentDescription="This example shows many features in Beremiz: 1. How to implement python extensions. 2. How to implement basic C extension. 3. How to use C code in IEC POUs. 4. How to call C functions from python code. 5. How to avoid race conditions between IEC, C and python code. 6. How to convert betweet different IEC types. "/> + <contentHeader name="Beremiz Python Support Tests" modificationDateTime="2016-10-12T14:15:35"> <pageSize x="1024" y="1024"/>
@@ -54,6 +54,22 @@
<pou name="main_pytest" pouType="program">
+ <variable name="mux1_sel"> + <simpleValue value="3"/> + <variable name="mux2_sel"> + <simpleValue value="3"/> <variable name="pytest_var1">
@@ -128,17 +144,30 @@
- <simpleValue value="300"/>
+ <simpleValue value="151"/> + <variable name="Test_BCD_WRONG"> + <simpleValue value="154"/> + <variable name="Test_BCD_CONVERTED"> <variable name="Test_BCD_RESULT">
- <variable name="Test_BCD_ENO">
+ <variable name="Test_BCD_WRONG_RESULT">
<variable name="Test_DT">
@@ -208,24 +237,24 @@
- <inVariable localId="4" height="30" width="160">
- <position x="295" y="230"/>
+ <inVariable localId="4" height="30" width="160" executionOrderId="0" negated="false"> + <position x="295" y="450"/> <relPosition x="160" y="15"/>
<expression>'time.sleep(1)'</expression>
- <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1">
- <position x="650" y="180"/>
+ <block localId="5" width="125" height="80" typeName="python_eval" instanceName="py1" executionOrderId="0"> + <position x="650" y="400"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="650" y="215"/>
- <position x="285" y="215"/>
- <position x="285" y="260"/>
- <position x="250" y="260"/>
+ <position x="650" y="435"/> + <position x="285" y="435"/> + <position x="285" y="480"/> + <position x="250" y="480"/> @@ -233,8 +262,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="4">
- <position x="650" y="245"/>
- <position x="455" y="245"/>
+ <position x="650" y="465"/> + <position x="455" y="465"/> @@ -253,15 +282,15 @@
- <block localId="7" width="70" height="45" typeName="NOT">
- <position x="180" y="230"/>
+ <block localId="7" width="70" height="45" typeName="NOT" executionOrderId="0"> + <position x="180" y="450"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="3">
- <position x="180" y="260"/>
- <position x="155" y="260"/>
+ <position x="180" y="480"/> + <position x="155" y="480"/> @@ -275,17 +304,17 @@
- <inOutVariable localId="3" height="30" width="120">
- <position x="35" y="245"/>
+ <inOutVariable localId="3" height="30" width="120" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="35" y="465"/> <relPosition x="0" y="15"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="35" y="260"/>
- <position x="25" y="260"/>
- <position x="25" y="220"/>
- <position x="270" y="220"/>
- <position x="270" y="260"/>
- <position x="250" y="260"/>
+ <position x="35" y="480"/> + <position x="25" y="480"/> + <position x="25" y="440"/> + <position x="270" y="440"/> + <position x="270" y="480"/> + <position x="250" y="480"/> @@ -293,17 +322,17 @@
<expression>pytest_var2</expression>
- <block localId="8" width="125" height="80" typeName="python_eval" instanceName="Block1">
- <position x="650" y="295"/>
+ <block localId="8" width="125" height="80" typeName="python_eval" instanceName="Block1" executionOrderId="0"> + <position x="650" y="515"/> <variable formalParameter="TRIG">
<relPosition x="0" y="35"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="650" y="330"/>
- <position x="285" y="330"/>
- <position x="285" y="260"/>
- <position x="250" y="260"/>
+ <position x="650" y="550"/> + <position x="285" y="550"/> + <position x="285" y="480"/> + <position x="250" y="480"/> @@ -311,8 +340,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="9">
- <position x="650" y="360"/>
- <position x="585" y="360"/>
+ <position x="650" y="580"/> + <position x="585" y="580"/> @@ -331,31 +360,31 @@
- <inVariable localId="9" height="30" width="290">
- <position x="295" y="345"/>
+ <inVariable localId="9" height="30" width="290" executionOrderId="0" negated="false"> + <position x="295" y="565"/> <relPosition x="290" y="15"/>
<expression>'sys.stdout.write("FBID :"+str(FBID)+"\n")'</expression>
- <inVariable localId="11" height="30" width="290">
- <position x="295" y="465"/>
+ <inVariable localId="11" height="30" width="290" executionOrderId="0" negated="false"> + <position x="295" y="685"/> <relPosition x="290" y="15"/>
<expression>'PLCBinary.Simple_C_Call(5678)'</expression>
- <block localId="12" width="125" height="80" typeName="python_eval" instanceName="Block2">
- <position x="650" y="417"/>
+ <block localId="12" width="125" height="80" typeName="python_eval" instanceName="Block2" executionOrderId="0"> + <position x="650" y="637"/> <variable formalParameter="TRIG">
<relPosition x="0" y="33"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="650" y="450"/>
- <position x="285" y="450"/>
- <position x="285" y="260"/>
- <position x="250" y="260"/>
+ <position x="650" y="670"/> + <position x="285" y="670"/> + <position x="285" y="480"/> + <position x="250" y="480"/> @@ -363,8 +392,8 @@
<relPosition x="0" y="63"/>
<connection refLocalId="11">
- <position x="650" y="480"/>
- <position x="585" y="480"/>
+ <position x="650" y="700"/> + <position x="585" y="700"/> @@ -383,24 +412,24 @@
- <inVariable localId="14" height="30" width="290">
- <position x="290" y="590"/>
+ <inVariable localId="14" height="30" width="290" executionOrderId="0" negated="false"> + <position x="290" y="810"/> <relPosition x="290" y="15"/>
<expression>'MyPythonFunc(42)'</expression>
- <block localId="15" width="125" height="80" typeName="python_eval" instanceName="Block3">
- <position x="650" y="542"/>
+ <block localId="15" width="125" height="80" typeName="python_eval" instanceName="Block3" executionOrderId="0"> + <position x="650" y="762"/> <variable formalParameter="TRIG">
<relPosition x="0" y="33"/>
<connection refLocalId="7" formalParameter="OUT">
- <position x="650" y="575"/>
- <position x="285" y="575"/>
- <position x="285" y="260"/>
- <position x="250" y="260"/>
+ <position x="650" y="795"/> + <position x="285" y="795"/> + <position x="285" y="480"/> + <position x="250" y="480"/> @@ -408,8 +437,8 @@
<relPosition x="0" y="63"/>
<connection refLocalId="14">
- <position x="650" y="605"/>
- <position x="580" y="605"/>
+ <position x="650" y="825"/> + <position x="580" y="825"/> @@ -429,20 +458,22 @@
<comment localId="16" height="90" width="680">
- <position x="50" y="25"/>
+ <position x="35" y="275"/> - <xhtml:p><![CDATA[This example test that, despite of 2T period clock stimulating TRIG pin of pyth_eval blocks, blocks keep executing one after the other, in respect of execution order.]]></xhtml:p>
+ <xhtml:p><![CDATA[This part of the example test that, despite of 2T period clock stimulating TRIG pin of pyth_eval blocks, blocks keep executing one after the other, in respect of execution order.]]></xhtml:p> - <block localId="17" width="80" height="120" typeName="MUX">
- <position x="1065" y="495"/>
+ <block localId="17" width="80" height="120" typeName="MUX" executionOrderId="0"> + <position x="1065" y="715"/> <variable formalParameter="K">
<relPosition x="0" y="30"/>
<connection refLocalId="18">
- <position x="1065" y="525"/>
- <position x="1030" y="525"/>
+ <position x="1065" y="745"/> + <position x="1040" y="745"/> + <position x="1040" y="735"/> + <position x="1015" y="735"/> @@ -450,10 +481,10 @@
<relPosition x="0" y="50"/>
<connection refLocalId="5" formalParameter="RESULT">
- <position x="1065" y="545"/>
- <position x="905" y="545"/>
- <position x="905" y="245"/>
- <position x="775" y="245"/>
+ <position x="1065" y="765"/> + <position x="905" y="765"/> + <position x="905" y="465"/> + <position x="775" y="465"/> @@ -461,10 +492,10 @@
<relPosition x="0" y="70"/>
<connection refLocalId="8" formalParameter="RESULT">
- <position x="1065" y="565"/>
- <position x="890" y="565"/>
- <position x="890" y="360"/>
- <position x="775" y="360"/>
+ <position x="1065" y="785"/> + <position x="890" y="785"/> + <position x="890" y="580"/> + <position x="775" y="580"/> @@ -472,10 +503,10 @@
<relPosition x="0" y="90"/>
<connection refLocalId="12" formalParameter="RESULT">
- <position x="1065" y="585"/>
- <position x="875" y="585"/>
- <position x="875" y="480"/>
- <position x="775" y="480"/>
+ <position x="1065" y="805"/> + <position x="875" y="805"/> + <position x="875" y="700"/> + <position x="775" y="700"/> @@ -483,8 +514,8 @@
<relPosition x="0" y="110"/>
<connection refLocalId="15" formalParameter="RESULT">
- <position x="1065" y="605"/>
- <position x="775" y="605"/>
+ <position x="1065" y="825"/> + <position x="775" y="825"/> @@ -498,33 +529,28 @@
- <inVariable localId="18" height="30" width="20">
- <position x="1010" y="510"/>
- <relPosition x="20" y="15"/>
- <expression>3</expression>
- <outVariable localId="19" height="35" width="125">
- <position x="1185" y="510"/>
+ <outVariable localId="19" height="35" width="125" executionOrderId="0" negated="false"> + <position x="1235" y="730"/> <relPosition x="0" y="15"/>
<connection refLocalId="17" formalParameter="OUT">
- <position x="1185" y="525"/>
- <position x="1145" y="525"/>
+ <position x="1235" y="745"/> + <position x="1145" y="745"/> <expression>pytest_var1</expression>
- <block localId="21" width="80" height="120" typeName="MUX">
- <position x="985" y="165"/>
+ <block localId="21" width="80" height="120" typeName="MUX" executionOrderId="0"> + <position x="1070" y="385"/> <variable formalParameter="K">
<relPosition x="0" y="30"/>
<connection refLocalId="22">
- <position x="985" y="195"/>
- <position x="950" y="195"/>
+ <position x="1070" y="415"/> + <position x="1040" y="415"/> + <position x="1040" y="405"/> + <position x="1010" y="405"/> @@ -532,8 +558,8 @@
<relPosition x="0" y="50"/>
<connection refLocalId="5" formalParameter="ACK">
- <position x="985" y="215"/>
- <position x="775" y="215"/>
+ <position x="1070" y="435"/> + <position x="775" y="435"/> @@ -541,10 +567,10 @@
<relPosition x="0" y="70"/>
<connection refLocalId="8" formalParameter="ACK">
- <position x="985" y="235"/>
- <position x="805" y="235"/>
- <position x="805" y="330"/>
- <position x="775" y="330"/>
+ <position x="1070" y="455"/> + <position x="805" y="455"/> + <position x="805" y="550"/> + <position x="775" y="550"/> @@ -552,10 +578,10 @@
<relPosition x="0" y="90"/>
<connection refLocalId="12" formalParameter="ACK">
- <position x="985" y="255"/>
- <position x="820" y="255"/>
- <position x="820" y="450"/>
- <position x="775" y="450"/>
+ <position x="1070" y="475"/> + <position x="820" y="475"/> + <position x="820" y="670"/> + <position x="775" y="670"/> @@ -563,10 +589,10 @@
<relPosition x="0" y="110"/>
<connection refLocalId="15" formalParameter="ACK">
- <position x="985" y="275"/>
- <position x="835" y="275"/>
- <position x="835" y="575"/>
- <position x="775" y="575"/>
+ <position x="1070" y="495"/> + <position x="835" y="495"/> + <position x="835" y="795"/> + <position x="775" y="795"/> @@ -580,51 +606,51 @@
- <inVariable localId="22" height="30" width="20">
- <position x="930" y="180"/>
+ <inVariable localId="22" height="30" width="65" executionOrderId="0" negated="false"> + <position x="945" y="390"/> - <relPosition x="20" y="15"/>
+ <relPosition x="65" y="15"/> - <expression>3</expression>
+ <expression>mux1_sel</expression> - <outVariable localId="23" height="35" width="125">
- <position x="1150" y="180"/>
+ <outVariable localId="23" height="35" width="125" executionOrderId="0" negated="false"> + <position x="1235" y="400"/> <relPosition x="0" y="15"/>
<connection refLocalId="21" formalParameter="OUT">
- <position x="1150" y="195"/>
- <position x="1065" y="195"/>
+ <position x="1235" y="415"/> + <position x="1150" y="415"/> <expression>pytest_var3</expression>
- <outVariable localId="25" height="30" width="60">
- <position x="520" y="655"/>
+ <outVariable localId="25" height="30" width="60" executionOrderId="0" negated="false"> + <position x="320" y="1075"/> <relPosition x="0" y="15"/>
<connection refLocalId="26" formalParameter="OUT">
- <position x="520" y="670"/>
- <position x="465" y="670"/>
+ <position x="320" y="1090"/> + <position x="265" y="1090"/> <expression>FromC</expression>
- <inVariable localId="1" height="30" width="30">
- <position x="305" y="655"/>
+ <inVariable localId="1" height="30" width="30" executionOrderId="0" negated="false"> + <position x="105" y="1075"/> <relPosition x="30" y="15"/>
<expression>23</expression>
- <block localId="26" width="80" height="45" typeName="C_Pragma" instanceName="C_Pragma0">
- <position x="385" y="640"/>
+ <block localId="26" width="80" height="45" typeName="C_Pragma" instanceName="C_Pragma0" executionOrderId="0"> + <position x="185" y="1060"/> <variable formalParameter="IN">
<relPosition x="0" y="30"/>
<connection refLocalId="1">
- <position x="385" y="670"/>
- <position x="335" y="670"/>
+ <position x="185" y="1090"/> + <position x="135" y="1090"/> @@ -638,139 +664,129 @@
- <inVariable localId="27" height="30" width="90">
- <position x="300" y="770"/>
+ <inVariable localId="27" height="30" width="90" executionOrderId="0" negated="false"> + <position x="100" y="1190"/> <relPosition x="90" y="15"/>
<expression>TestInput</expression>
- <outVariable localId="28" height="30" width="105">
- <position x="395" y="705"/>
+ <outVariable localId="28" height="30" width="105" executionOrderId="0" negated="false"> + <position x="195" y="1125"/> <relPosition x="0" y="15"/>
<connection refLocalId="2">
- <position x="395" y="720"/>
- <position x="340" y="720"/>
+ <position x="195" y="1140"/> + <position x="140" y="1140"/> <expression>TestOutput</expression>
- <outVariable localId="29" height="30" width="85">
- <position x="415" y="770"/>
+ <outVariable localId="29" height="30" width="85" executionOrderId="0" negated="false"> + <position x="215" y="1190"/> <relPosition x="0" y="15"/>
<connection refLocalId="27">
- <position x="415" y="785"/>
- <position x="390" y="785"/>
+ <position x="215" y="1205"/> + <position x="190" y="1205"/> <expression>FromInput</expression>
- <inVariable localId="2" height="30" width="30">
- <position x="310" y="705"/>
+ <inVariable localId="2" height="30" width="30" executionOrderId="0" negated="false"> + <position x="110" y="1125"/> <relPosition x="30" y="15"/>
<expression>10</expression>
- <comment localId="30" height="90" width="405">
- <position x="245" y="825"/>
+ <comment localId="30" height="75" width="465"> + <position x="50" y="945"/> <xhtml:p><![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal to 75.
+Happy hacking! ]]></xhtml:p> <comment localId="31" height="60" width="345">
- <position x="295" y="265"/>
+ <position x="295" y="485"/> <xhtml:p><![CDATA[Sleep here is bad. It blocks other py_eval instances. Whith a wxGlade GUI, GUI freeze for a second.]]></xhtml:p>
<comment localId="6" height="60" width="345">
- <position x="295" y="380"/>
+ <position x="295" y="600"/> <xhtml:p><![CDATA[Prints FBID to stdout of PLC runtime. FBID is a unique reference to py_eval instance.]]></xhtml:p>
<comment localId="10" height="60" width="345">
- <position x="295" y="500"/>
+ <position x="295" y="720"/> <xhtml:p><![CDATA[Simple_C_Call is declared in C_File "1.x:c_code". See python ctypes manual for details on typing.]]></xhtml:p>
<comment localId="32" height="105" width="235">
- <position x="25" y="285"/>
+ <position x="25" y="505"/> <xhtml:p><![CDATA[Fast clock, at least faster that sleep(1). See what happens when python takes time to answer : PLC continues.]]></xhtml:p>
- <outVariable localId="33" height="30" width="130">
- <position x="1060" y="740"/>
+ <outVariable localId="33" height="30" width="130" executionOrderId="0" negated="false"> + <position x="580" y="1564"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="35" formalParameter="OUT">
- <position x="1060" y="755"/>
- <position x="1005" y="755"/>
+ <position x="580" y="1580"/> + <position x="370" y="1580"/> <expression>Test_BCD_RESULT</expression>
- <inVariable localId="34" height="30" width="75">
- <position x="785" y="740"/>
+ <inVariable localId="34" height="30" width="75" executionOrderId="0" negated="false"> + <position x="60" y="1564"/> - <relPosition x="75" y="15"/>
+ <relPosition x="75" y="16"/> <expression>Test_BCD</expression>
- <block localId="35" width="105" height="60" typeName="BCD_TO_UINT">
- <position x="900" y="705"/>
+ <block localId="35" width="105" height="60" typeName="BCD_TO_UINT" executionOrderId="0"> + <position x="265" y="1539"/> - <variable formalParameter="EN">
- <relPosition x="0" y="30"/>
<variable formalParameter="IN">
- <relPosition x="0" y="50"/>
+ <relPosition x="0" y="41"/> <connection refLocalId="34">
- <position x="900" y="755"/>
- <position x="860" y="755"/>
+ <position x="265" y="1580"/> + <position x="135" y="1580"/> - <variable formalParameter="ENO">
- <relPosition x="105" y="30"/>
<variable formalParameter="OUT">
- <relPosition x="105" y="50"/>
+ <relPosition x="105" y="41"/> - <inVariable localId="36" height="30" width="65">
- <position x="790" y="815"/>
+ <inVariable localId="36" height="30" width="65" executionOrderId="0" negated="false"> + <position x="60" y="1774"/> - <relPosition x="65" y="15"/>
+ <relPosition x="65" y="16"/> <expression>Test_DT</expression>
- <block localId="37" width="255" height="45" typeName="DATE_AND_TIME_TO_TIME_OF_DAY">
- <position x="900" y="800"/>
+ <block localId="37" width="255" height="45" typeName="DATE_AND_TIME_TO_TIME_OF_DAY" executionOrderId="0"> + <position x="265" y="1759"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="36">
- <position x="900" y="830"/>
- <position x="855" y="830"/>
+ <position x="265" y="1790"/> + <position x="125" y="1790"/> @@ -779,22 +795,22 @@
<variable formalParameter="OUT">
- <relPosition x="255" y="30"/>
+ <relPosition x="255" y="31"/> - <block localId="38" width="195" height="45" typeName="DATE_AND_TIME_TO_DATE">
- <position x="900" y="875"/>
+ <block localId="38" width="195" height="45" typeName="DATE_AND_TIME_TO_DATE" executionOrderId="0"> + <position x="265" y="1834"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="36">
- <position x="900" y="905"/>
- <position x="877" y="905"/>
- <position x="877" y="830"/>
- <position x="855" y="830"/>
+ <position x="265" y="1865"/> + <position x="242" y="1865"/> + <position x="242" y="1790"/> + <position x="125" y="1790"/> @@ -803,53 +819,53 @@
<variable formalParameter="OUT">
- <relPosition x="195" y="30"/>
+ <relPosition x="195" y="31"/> - <outVariable localId="40" height="30" width="80">
- <position x="1215" y="890"/>
+ <outVariable localId="40" height="30" width="80" executionOrderId="0" negated="false"> + <position x="580" y="1849"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="38" formalParameter="OUT">
- <position x="1215" y="905"/>
- <position x="1095" y="905"/>
+ <position x="580" y="1865"/> + <position x="460" y="1865"/> <expression>Test_Date</expression>
- <outVariable localId="42" height="30" width="90">
- <position x="1100" y="985"/>
+ <outVariable localId="42" height="30" width="90" executionOrderId="0" negated="false"> + <position x="465" y="1944"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="46" formalParameter="OUT">
- <position x="1100" y="1000"/>
- <position x="1030" y="1000"/>
+ <position x="465" y="1960"/> + <position x="395" y="1960"/> <expression>Test_String</expression>
- <outVariable localId="43" height="30" width="80">
- <position x="1100" y="1055"/>
+ <outVariable localId="43" height="30" width="80" executionOrderId="0" negated="false"> + <position x="465" y="2014"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="44" formalParameter="OUT">
- <position x="1100" y="1070"/>
- <position x="1035" y="1070"/>
+ <position x="465" y="2030"/> + <position x="400" y="2030"/> <expression>Test_Bool</expression>
- <block localId="44" width="135" height="45" typeName="STRING_TO_BOOL">
- <position x="900" y="1040"/>
+ <block localId="44" width="135" height="45" typeName="STRING_TO_BOOL" executionOrderId="0"> + <position x="265" y="1999"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="45">
- <position x="900" y="1070"/>
- <position x="850" y="1070"/>
+ <position x="265" y="2030"/> + <position x="115" y="2030"/> @@ -858,27 +874,27 @@
<variable formalParameter="OUT">
- <relPosition x="135" y="30"/>
+ <relPosition x="135" y="31"/> - <inVariable localId="45" height="30" width="55">
- <position x="795" y="1055"/>
+ <inVariable localId="45" height="30" width="55" executionOrderId="0" negated="false"> + <position x="60" y="2014"/> - <relPosition x="55" y="15"/>
+ <relPosition x="55" y="16"/> <expression>'True'</expression>
- <block localId="46" width="130" height="45" typeName="INT_TO_STRING">
- <position x="900" y="970"/>
+ <block localId="46" width="130" height="45" typeName="INT_TO_STRING" executionOrderId="0"> + <position x="265" y="1929"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="58">
- <position x="900" y="1000"/>
- <position x="840" y="1000"/>
+ <position x="265" y="1960"/> + <position x="205" y="1960"/> @@ -887,27 +903,27 @@
<variable formalParameter="OUT">
- <relPosition x="130" y="30"/>
+ <relPosition x="130" y="31"/> <inVariable localId="50" height="30" width="105" executionOrderId="0" negated="false">
- <position x="200" y="1085"/>
+ <position x="75" y="2275"/> <relPosition x="105" y="15"/>
<expression>Global_RS.Q1</expression>
<block localId="51" width="70" height="85" typeName="AND" executionOrderId="0">
- <position x="365" y="1065"/>
+ <position x="240" y="2255"/> <variable formalParameter="IN1" negated="true">
<relPosition x="0" y="35"/>
<connection refLocalId="50">
- <position x="365" y="1100"/>
- <position x="305" y="1100"/>
+ <position x="240" y="2290"/> + <position x="180" y="2290"/> @@ -915,8 +931,8 @@
<relPosition x="0" y="70"/>
<connection refLocalId="52">
- <position x="365" y="1135"/>
- <position x="305" y="1135"/>
+ <position x="240" y="2325"/> + <position x="180" y="2325"/> @@ -930,51 +946,51 @@
- <inVariable localId="52" height="30" width="95">
- <position x="210" y="1120"/>
+ <inVariable localId="52" height="30" width="105" executionOrderId="0" negated="false"> + <position x="75" y="2310"/> - <relPosition x="95" y="15"/>
+ <relPosition x="105" y="15"/> <expression>BOOL#TRUE</expression>
<outVariable localId="13" height="30" width="105" executionOrderId="0" negated="false">
- <position x="510" y="1085"/>
+ <position x="385" y="2275"/> <relPosition x="0" y="15"/>
<connection refLocalId="51" formalParameter="OUT">
- <position x="510" y="1100"/>
- <position x="435" y="1100"/>
+ <position x="385" y="2290"/> + <position x="310" y="2290"/> <expression>Global_RS.S</expression>
<outVariable localId="20" height="30" width="105" executionOrderId="0" negated="false">
- <position x="510" y="1200"/>
+ <position x="385" y="2390"/> <relPosition x="0" y="15"/>
<connection refLocalId="41" formalParameter="OUT">
- <position x="510" y="1215"/>
- <position x="435" y="1215"/>
+ <position x="385" y="2405"/> + <position x="310" y="2405"/> <expression>Global_RS.R1</expression>
<inVariable localId="24" height="30" width="105" executionOrderId="0" negated="false">
- <position x="200" y="1200"/>
+ <position x="75" y="2390"/> <relPosition x="105" y="15"/>
<expression>Global_RS.Q1</expression>
<block localId="41" width="70" height="85" typeName="OR" executionOrderId="0">
- <position x="365" y="1180"/>
+ <position x="240" y="2370"/> <variable formalParameter="IN1">
<relPosition x="0" y="35"/>
<connection refLocalId="24">
- <position x="365" y="1215"/>
- <position x="305" y="1215"/>
+ <position x="240" y="2405"/> + <position x="180" y="2405"/> @@ -982,8 +998,8 @@
<relPosition x="0" y="70"/>
<connection refLocalId="48">
- <position x="365" y="1250"/>
- <position x="305" y="1250"/>
+ <position x="240" y="2440"/> + <position x="180" y="2440"/> @@ -997,46 +1013,33 @@
- <inVariable localId="48" height="30" width="100">
- <position x="205" y="1235"/>
+ <inVariable localId="48" height="30" width="105" executionOrderId="0" negated="false"> + <position x="75" y="2425"/> - <relPosition x="100" y="15"/>
+ <relPosition x="105" y="15"/> <expression>BOOL#FALSE</expression>
- <outVariable localId="53" height="30" width="115">
- <position x="1060" y="700"/>
+ <outVariable localId="54" height="30" width="135" executionOrderId="0" negated="false"> + <position x="930" y="1774"/> - <relPosition x="0" y="15"/>
- <connection refLocalId="35" formalParameter="ENO">
- <position x="1060" y="715"/>
- <position x="1032" y="715"/>
- <position x="1032" y="735"/>
- <position x="1005" y="735"/>
- <expression>Test_BCD_ENO</expression>
- <outVariable localId="54" height="30" width="135">
- <position x="1565" y="815"/>
- <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="55" formalParameter="OUT">
- <position x="1565" y="830"/>
- <position x="1490" y="830"/>
+ <position x="930" y="1790"/> + <position x="855" y="1790"/> <expression>Test_TOD_STRING</expression>
- <block localId="55" width="125" height="45" typeName="TOD_TO_STRING">
- <position x="1365" y="800"/>
+ <block localId="55" width="125" height="45" typeName="TOD_TO_STRING" executionOrderId="0"> + <position x="730" y="1759"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="39">
- <position x="1365" y="830"/>
- <position x="1290" y="830"/>
+ <position x="730" y="1790"/> + <position x="655" y="1790"/> @@ -1045,90 +1048,90 @@
<variable formalParameter="OUT">
- <relPosition x="125" y="30"/>
+ <relPosition x="125" y="31"/> - <inOutVariable localId="39" height="30" width="75">
- <position x="1215" y="815"/>
+ <inOutVariable localId="39" height="30" width="75" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="580" y="1774"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="16"/> <connection refLocalId="37" formalParameter="OUT">
- <position x="1215" y="830"/>
- <position x="1155" y="830"/>
+ <position x="580" y="1790"/> + <position x="520" y="1790"/> - <relPosition x="75" y="15"/>
+ <relPosition x="75" y="16"/> <expression>Test_TOD</expression>
- <inVariable localId="49" height="30" width="30">
- <position x="765" y="1200"/>
+ <inVariable localId="49" height="30" width="30" executionOrderId="0" negated="false"> + <position x="160" y="2510"/> <relPosition x="30" y="15"/>
<expression>42</expression>
- <outVariable localId="57" height="30" width="50">
- <position x="845" y="1200"/>
+ <outVariable localId="57" height="30" width="50" executionOrderId="0" negated="false"> + <position x="240" y="2510"/> <relPosition x="0" y="15"/>
<connection refLocalId="49">
- <position x="845" y="1215"/>
- <position x="795" y="1215"/>
+ <position x="240" y="2525"/> + <position x="190" y="2525"/> <expression>TOTO</expression>
- <outVariable localId="56" height="30" width="50">
- <position x="845" y="1240"/>
+ <outVariable localId="56" height="30" width="50" executionOrderId="0" negated="false"> + <position x="240" y="2550"/> <relPosition x="0" y="15"/>
<connection refLocalId="49">
- <position x="845" y="1255"/>
- <position x="820" y="1255"/>
- <position x="820" y="1215"/>
- <position x="795" y="1215"/>
+ <position x="240" y="2565"/> + <position x="215" y="2565"/> + <position x="215" y="2525"/> + <position x="190" y="2525"/> <expression>TUTU</expression>
- <inVariable localId="58" height="30" width="145">
- <position x="715" y="985"/>
+ <inVariable localId="58" height="30" width="145" executionOrderId="0" negated="false"> + <position x="60" y="1944"/> - <relPosition x="145" y="15"/>
+ <relPosition x="145" y="16"/> <expression>Second_Python_Var</expression>
- <outVariable localId="47" height="30" width="125">
- <position x="400" y="975"/>
+ <outVariable localId="47" height="30" width="125" executionOrderId="0" negated="false"> + <position x="200" y="1385"/> <relPosition x="0" y="15"/>
<connection refLocalId="59">
- <position x="400" y="990"/>
- <position x="330" y="990"/>
+ <position x="200" y="1400"/> + <position x="130" y="1400"/> <expression>Test_Python_Var</expression>
- <inVariable localId="59" height="30" width="30">
- <position x="300" y="975"/>
+ <inVariable localId="59" height="30" width="30" executionOrderId="0" negated="false"> + <position x="100" y="1385"/> <relPosition x="30" y="15"/>
<expression>23</expression>
<block localId="61" typeName="function0" executionOrderId="0" height="45" width="110">
- <position x="1680" y="255"/>
+ <position x="760" y="1170"/> <variable formalParameter="LocalVar0">
<relPosition x="0" y="30"/>
<connection refLocalId="62">
- <position x="1680" y="285"/>
- <position x="1640" y="285"/>
+ <position x="760" y="1200"/> + <position x="720" y="1200"/> @@ -1143,23 +1146,147 @@
<inVariable localId="62" executionOrderId="0" height="30" width="55" negated="false">
- <position x="1585" y="270"/>
+ <position x="665" y="1185"/> <relPosition x="55" y="15"/>
<expression>fefvsd</expression>
<outVariable localId="63" executionOrderId="0" height="30" width="55" negated="false">
- <position x="1825" y="270"/>
+ <position x="905" y="1185"/> <relPosition x="0" y="15"/>
<connection refLocalId="61" formalParameter="OUT">
- <position x="1825" y="285"/>
- <position x="1790" y="285"/>
+ <position x="905" y="1200"/> + <position x="870" y="1200"/> <expression>fefvsd</expression>
+ <comment localId="53" height="65" width="420"> + <position x="75" y="2160"/> + <xhtml:p><![CDATA[Shows global variables access from resource configuration (res_pytest) and from project's configuration.]]></xhtml:p> + <inVariable localId="18" height="30" width="65" executionOrderId="0" negated="false"> + <position x="950" y="720"/> + <relPosition x="65" y="15"/> + <expression>mux2_sel</expression> + <comment localId="60" height="45" width="930"> + <position x="60" y="1480"/> + <xhtml:p><![CDATA[Here is shown how to convert values between different types (BCD, DT, TOD, STRING and others) using standard functions.]]></xhtml:p> + <comment localId="64" height="55" width="300"> + <position x="665" y="1095"/> + <xhtml:p><![CDATA[Example of usage of user-defined function.]]></xhtml:p> + <comment localId="65" height="45" width="410"> + <position x="55" y="1315"/> + <xhtml:p><![CDATA[Shows access variable defined in python extension. ]]></xhtml:p> + <inVariable localId="66" height="30" width="130" executionOrderId="0" negated="false"> + <position x="60" y="1685"/> + <relPosition x="130" y="15"/> + <expression>Test_BCD_WRONG</expression> + <block localId="67" width="105" height="100" typeName="BCD_TO_UINT" executionOrderId="0"> + <position x="265" y="1620"/> + <variable formalParameter="EN"> + <relPosition x="0" y="40"/> + <variable formalParameter="IN"> + <relPosition x="0" y="80"/> + <connection refLocalId="66"> + <position x="265" y="1700"/> + <position x="255" y="1700"/> + <position x="255" y="1700"/> + <position x="345" y="1700"/> + <position x="345" y="1700"/> + <position x="190" y="1700"/> + <variable formalParameter="ENO"> + <relPosition x="105" y="40"/> + <variable formalParameter="OUT"> + <relPosition x="105" y="80"/> + <outVariable localId="68" height="30" width="185" executionOrderId="0" negated="false"> + <position x="580" y="1685"/> + <relPosition x="0" y="15"/> + <connection refLocalId="67" formalParameter="OUT"> + <position x="580" y="1700"/> + <position x="370" y="1700"/> + <expression>Test_BCD_WRONG_RESULT</expression> + <comment localId="69" height="135" width="375"> + <position x="795" y="1590"/> + <xhtml:p><![CDATA[Incorrect BCD number is not converted to UINT. +151 (16#97) is good BCD number , but +Try this out and look at value of Test_BCD_CONVERTED variable. + <outVariable localId="70" height="30" width="185" executionOrderId="0" negated="false"> + <position x="580" y="1645"/> + <relPosition x="0" y="15"/> + <connection refLocalId="67" formalParameter="ENO"> + <position x="580" y="1660"/> + <position x="370" y="1660"/> + <expression>Test_BCD_CONVERTED</expression> + <comment localId="71" height="170" width="680"> + <position x="35" y="30"/> + <xhtml:p><![CDATA[This example shows many features in Beremiz: + 1. How to implement python extensions. + 2. How to implement basic C extension. + 3. How to use C code in IEC POUs. + 4. How to call C functions from python code. + 5. How to avoid race conditions between IEC, C and python code. + 6. How to convert betweet different IEC types. @@ -1243,7 +1370,7 @@
SetFbVar(COORDS, somebyte, .table[4]);
-(* If you do not use __GET_VAR and _SET_VAR macro, expect unexpected *)
+(* If you do not use GetFbVar and SetFbVar macros, expect unexpected behaviour*) --- a/tests/svgui/plc.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/svgui/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -1,14 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.plcopen.org/xml/tc6.xsd"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xsi:schemaLocation="http://www.plcopen.org/xml/tc6.xsd">
- <fileHeader companyName="beremiz"
- creationDateTime="2008-12-14T16:21:19"/>
- <contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2009-09-26T18:14:56">
+<?xml version='1.0' encoding='utf-8'?> +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> + <fileHeader companyName="beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:21:19"/> + <contentHeader name="Beremiz SVGUI Test" modificationDateTime="2016-10-20T12:38:31"> <pageSize x="1024" y="1024"/>
@@ -33,57 +26,17 @@
- <variable name="DigitalBit0">
- <variable name="DigitalBit1">
- <variable name="DigitalBit2">
- <variable name="DigitalBit3">
- <variable name="DigitalBit4">
- <variable name="DigitalBit5">
- <variable name="DigitalBit6">
- <variable name="DigitalBit7">
<variable name="Start_Stop">
- <variable name="Compteur">
+ <variable name="Counter_TextCtrl"> <derived name="TextCtrl"/>
- <variable name="Temoin">
+ <variable name="State_LedCtrl"> @@ -92,15 +45,15 @@
- <block localId="32" width="80" height="110" typeName="ADD">
- <position x="665" y="420"/>
+ <block localId="32" width="80" height="110" typeName="ADD" executionOrderId="0"> + <position x="649" y="241"/> <variable formalParameter="EN">
<relPosition x="0" y="35"/>
<connection refLocalId="5">
- <position x="665" y="455"/>
- <position x="610" y="455"/>
+ <position x="649" y="276"/> + <position x="594" y="276"/> @@ -108,8 +61,8 @@
<relPosition x="0" y="65"/>
<connection refLocalId="100" formalParameter="OUT">
- <position x="665" y="485"/>
- <position x="490" y="485"/>
+ <position x="649" y="306"/> + <position x="474" y="306"/> @@ -117,12 +70,12 @@
<relPosition x="0" y="95"/>
<connection refLocalId="33">
- <position x="665" y="515"/>
- <position x="645" y="515"/>
- <position x="645" y="555"/>
- <position x="870" y="555"/>
- <position x="870" y="485"/>
- <position x="855" y="485"/>
+ <position x="649" y="336"/> + <position x="629" y="336"/> + <position x="629" y="374"/> + <position x="854" y="374"/> + <position x="854" y="306"/> + <position x="839" y="306"/> @@ -141,71 +94,71 @@
- <inOutVariable localId="33" height="35" width="85">
- <position x="770" y="470"/>
+ <inOutVariable localId="33" height="35" width="85" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="754" y="289"/> - <relPosition x="0" y="15"/>
+ <relPosition x="0" y="17"/> <connection refLocalId="32" formalParameter="OUT">
- <position x="770" y="485"/>
- <position x="745" y="485"/>
+ <position x="754" y="306"/> + <position x="729" y="306"/> - <relPosition x="85" y="15"/>
+ <relPosition x="85" y="17"/> <expression>counter</expression>
- <inVariable localId="39" height="35" width="70">
- <position x="90" y="470"/>
+ <inVariable localId="39" height="35" width="89" executionOrderId="0" negated="false"> + <position x="55" y="289"/> - <relPosition x="70" y="15"/>
+ <relPosition x="89" y="17"/> <expression>BOOL#1</expression>
- <inVariable localId="41" height="30" width="120">
- <position x="45" y="180"/>
+ <inVariable localId="41" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="575"/> <relPosition x="120" y="15"/>
<expression>'stop_back'</expression>
- <inVariable localId="42" height="30" width="120">
- <position x="45" y="225"/>
+ <inVariable localId="42" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="617"/> <relPosition x="120" y="15"/>
<expression>'stop_sele'</expression>
- <inVariable localId="46" height="30" width="180">
- <position x="675" y="265"/>
+ <inVariable localId="46" height="30" width="121" executionOrderId="0" negated="false"> + <position x="694" y="755"/> - <relPosition x="180" y="15"/>
+ <relPosition x="121" y="15"/> - <expression>'text_compteur'</expression>
+ <expression>'text_counter'</expression> - <inVariable localId="51" height="30" width="110">
- <position x="725" y="80"/>
+ <inVariable localId="51" height="30" width="119" executionOrderId="0" negated="false"> + <position x="692" y="568"/> - <relPosition x="110" y="15"/>
+ <relPosition x="119" y="15"/> <expression>'led_stop'</expression>
- <inVariable localId="52" height="30" width="120">
- <position x="715" y="115"/>
+ <inVariable localId="52" height="30" width="120" executionOrderId="0" negated="false"> + <position x="691" y="604"/> <relPosition x="120" y="15"/>
<expression>'led_start'</expression>
- <block localId="83" width="145" height="60" typeName="INT_TO_STRING">
- <position x="600" y="320"/>
+ <block localId="83" width="145" height="60" typeName="INT_TO_STRING" executionOrderId="0"> + <position x="537" y="812"/> <variable formalParameter="IN">
<relPosition x="0" y="40"/>
<connection refLocalId="4">
- <position x="600" y="360"/>
- <position x="555" y="360"/>
+ <position x="537" y="852"/> + <position x="504" y="852"/> @@ -219,24 +172,24 @@
- <block localId="92" width="200" height="230" typeName="Button" instanceName="Start_Stop">
- <position x="225" y="155"/>
+ <block localId="92" width="187" height="230" typeName="Button" instanceName="Start_Stop" executionOrderId="0"> + <position x="201" y="549"/> <variable formalParameter="back_id">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="41"/> <connection refLocalId="41">
- <position x="225" y="195"/>
- <position x="165" y="195"/>
+ <position x="201" y="590"/> + <position x="141" y="590"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="85"/>
+ <relPosition x="0" y="83"/> <connection refLocalId="42">
- <position x="225" y="240"/>
- <position x="165" y="240"/>
+ <position x="201" y="632"/> + <position x="141" y="632"/> @@ -244,19 +197,19 @@
<relPosition x="0" y="125"/>
<connection refLocalId="93">
- <position x="225" y="280"/>
- <position x="165" y="280"/>
+ <position x="201" y="674"/> + <position x="141" y="674"/> <variable formalParameter="set_state">
- <relPosition x="0" y="165"/>
+ <relPosition x="0" y="167"/> <variable formalParameter="state_in">
- <relPosition x="0" y="210"/>
+ <relPosition x="0" y="209"/> @@ -264,45 +217,45 @@
<variable formalParameter="state_out">
- <relPosition x="200" y="40"/>
+ <relPosition x="187" y="41"/> - <inVariable localId="93" height="30" width="70">
- <position x="95" y="265"/>
+ <inVariable localId="93" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="659"/> - <relPosition x="70" y="15"/>
+ <relPosition x="120" y="15"/> <expression>BOOL#1</expression>
- <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Compteur">
- <position x="900" y="240"/>
+ <block localId="94" width="100" height="145" typeName="TextCtrl" instanceName="Counter_TextCtrl" executionOrderId="0"> + <position x="876" y="730"/> <variable formalParameter="back_id">
<relPosition x="0" y="40"/>
<connection refLocalId="46">
- <position x="900" y="280"/>
- <position x="855" y="280"/>
+ <position x="876" y="770"/> + <position x="815" y="770"/> <variable formalParameter="set_text">
- <relPosition x="0" y="80"/>
+ <relPosition x="0" y="81"/> <connection refLocalId="3">
- <position x="900" y="320"/>
- <position x="855" y="320"/>
+ <position x="876" y="811"/> + <position x="815" y="811"/> <variable formalParameter="text">
- <relPosition x="0" y="120"/>
+ <relPosition x="0" y="122"/> <connection refLocalId="83" formalParameter="OUT">
- <position x="900" y="360"/>
- <position x="745" y="360"/>
+ <position x="876" y="852"/> + <position x="682" y="852"/> @@ -310,31 +263,31 @@
- <inVariable localId="1" height="30" width="70">
- <position x="80" y="85"/>
+ <inVariable localId="1" height="30" width="88" executionOrderId="0" negated="false"> + <position x="59" y="220"/> - <relPosition x="70" y="15"/>
+ <relPosition x="88" y="15"/> <expression>BOOL#1</expression>
- <block localId="95" width="100" height="130" typeName="Led" instanceName="Temoin">
- <position x="900" y="55"/>
+ <block localId="95" width="100" height="130" typeName="Led" instanceName="State_LedCtrl" executionOrderId="0"> + <position x="876" y="545"/> <variable formalParameter="back_id">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="38"/> <connection refLocalId="51">
- <position x="900" y="95"/>
- <position x="835" y="95"/>
+ <position x="876" y="583"/> + <position x="811" y="583"/> <variable formalParameter="sele_id">
- <relPosition x="0" y="75"/>
+ <relPosition x="0" y="74"/> <connection refLocalId="52">
- <position x="900" y="130"/>
- <position x="835" y="130"/>
+ <position x="876" y="619"/> + <position x="811" y="619"/> @@ -342,8 +295,8 @@
<relPosition x="0" y="110"/>
<connection refLocalId="2">
- <position x="900" y="165"/>
- <position x="835" y="165"/>
+ <position x="876" y="655"/> + <position x="811" y="655"/> @@ -351,28 +304,28 @@
- <block localId="96" width="80" height="65" typeName="AND">
- <position x="200" y="45"/>
+ <block localId="96" width="80" height="65" typeName="AND" executionOrderId="0"> + <position x="200" y="182"/> <variable formalParameter="IN1" negated="true">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="31"/> <connection refLocalId="96" formalParameter="OUT">
- <position x="200" y="75"/>
- <position x="175" y="75"/>
- <position x="175" y="30"/>
- <position x="305" y="30"/>
- <position x="305" y="75"/>
- <position x="280" y="75"/>
+ <position x="200" y="213"/> + <position x="175" y="213"/> + <position x="175" y="167"/> + <position x="305" y="167"/> + <position x="305" y="213"/> + <position x="280" y="213"/> <variable formalParameter="IN2">
- <relPosition x="0" y="55"/>
+ <relPosition x="0" y="53"/> <connection refLocalId="1">
- <position x="200" y="100"/>
- <position x="150" y="100"/>
+ <position x="200" y="235"/> + <position x="147" y="235"/> @@ -381,68 +334,68 @@
<variable formalParameter="OUT">
- <relPosition x="80" y="30"/>
+ <relPosition x="80" y="31"/> <connector name="CLOCK" localId="97" height="30" width="90">
- <position x="345" y="60"/>
+ <position x="345" y="198"/> <relPosition x="0" y="15"/>
<connection refLocalId="96" formalParameter="OUT">
- <position x="345" y="75"/>
- <position x="280" y="75"/>
+ <position x="345" y="213"/> + <position x="280" y="213"/> <connector name="COUNT" localId="98" height="30" width="90">
- <position x="485" y="180"/>
+ <position x="461" y="575"/> <relPosition x="0" y="15"/>
<connection refLocalId="92" formalParameter="state_out">
- <position x="485" y="195"/>
- <position x="425" y="195"/>
+ <position x="461" y="590"/> + <position x="388" y="590"/> - <continuation name="COUNT" localId="2" height="30" width="90">
- <position x="745" y="150"/>
+ <continuation name="COUNT" localId="2" height="30" width="120"> + <position x="691" y="640"/> + <relPosition x="120" y="15"/> + <inVariable localId="4" height="35" width="85" executionOrderId="0" negated="false"> + <position x="419" y="835"/> + <relPosition x="85" y="17"/> + <expression>counter</expression> + <continuation name="COUNT" localId="5" height="30" width="90"> + <position x="504" y="261"/> <relPosition x="90" y="15"/>
- <inVariable localId="4" height="35" width="85">
- <position x="470" y="345"/>
- <relPosition x="85" y="15"/>
- <expression>counter</expression>
- <continuation name="COUNT" localId="5" height="30" width="90">
- <position x="520" y="440"/>
- <relPosition x="90" y="15"/>
- <block localId="99" width="80" height="110" typeName="AND">
- <position x="215" y="445"/>
+ <block localId="99" width="80" height="110" typeName="AND" executionOrderId="0"> + <position x="199" y="264"/> <variable formalParameter="IN1">
- <relPosition x="0" y="40"/>
+ <relPosition x="0" y="42"/> <connection refLocalId="39">
- <position x="215" y="485"/>
- <position x="160" y="485"/>
+ <position x="199" y="306"/> + <position x="144" y="306"/> <variable formalParameter="IN2">
- <relPosition x="0" y="85"/>
+ <relPosition x="0" y="87"/> <connection refLocalId="6">
- <position x="215" y="530"/>
- <position x="160" y="530"/>
+ <position x="199" y="351"/> + <position x="144" y="351"/> @@ -451,26 +404,26 @@
<variable formalParameter="OUT">
- <relPosition x="80" y="40"/>
+ <relPosition x="80" y="42"/> <continuation name="CLOCK" localId="6" height="30" width="90">
- <position x="70" y="515"/>
+ <position x="54" y="336"/> <relPosition x="90" y="15"/>
- <block localId="100" width="125" height="45" typeName="BOOL_TO_INT">
- <position x="365" y="455"/>
+ <block localId="100" width="125" height="45" typeName="BOOL_TO_INT" executionOrderId="0"> + <position x="349" y="274"/> <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
+ <relPosition x="0" y="32"/> <connection refLocalId="99" formalParameter="OUT">
- <position x="365" y="485"/>
- <position x="295" y="485"/>
+ <position x="349" y="306"/> + <position x="279" y="306"/> @@ -479,17 +432,41 @@
<variable formalParameter="OUT">
- <relPosition x="125" y="30"/>
+ <relPosition x="125" y="32"/> - <continuation name="CLOCK" localId="3" height="30" width="90">
- <position x="765" y="305"/>
+ <continuation name="CLOCK" localId="3" height="30" width="122"> + <position x="693" y="796"/> - <relPosition x="90" y="15"/>
+ <relPosition x="122" y="15"/> + <comment localId="101" height="152" width="816"> + <position x="27" y="8"/> + <xhtml:p><![CDATA[This example shows how IEC program in PLC can interact with web interface. +svgui is extensions to build web interface to PLC. It has *integrated* web-server. So it's NOT necessary to install Apache, lighttpd or nginx for that!!! +As the program is running in PLC, web UI will be available at http://localhost:8009/. +Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. +Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately. + <comment localId="102" height="101" width="544"> + <position x="17" y="409"/> + <xhtml:p><![CDATA[In this example basic elements like 'Button', 'Led' and 'Text' are used. +Back_id and sele_id inputs of these blocks are IDs of graphic primitives in SVG file. +This is the way how elements in SVG are bound to elements in PLC program. +You can find out or edit these IDs in Inkscape.]]></xhtml:p> --- a/tests/svgui/svgui@svgui/py_ext.xml Sun Mar 05 00:38:25 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<Python xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="python_xsd.xsd">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/svgui/svgui@svgui/pyfile.xml Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='utf-8'?> +<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + Web interface is build as SVG file in Inkscape. + To edit SVG file click 'Inkscape' button on the toolbar above. + Inkscape is a free and open-source vector graphics editor. + It's not part of Beremiz and needs to be installed separately. --- a/tests/traffic_lights/plc.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/traffic_lights/plc.xml Fri Mar 24 12:07:47 2017 +0000
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201">
- <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2012-09-04T16:16:33"/>
- <contentHeader name="traffic_lights" modificationDateTime="2013-12-06T12:19:16">
+ <fileHeader companyName="Beremiz" productName="Unnamed" productVersion="1" creationDateTime="2012-09-04T16:16:33"/> + <contentHeader name="traffic_lights" modificationDateTime="2016-10-20T13:08:53"> @@ -405,8 +405,8 @@
<connection refLocalId="39">
<position x="569" y="31"/>
<position x="569" y="11"/>
- <position x="1016" y="11"/>
- <position x="1016" y="1151"/>
+ <position x="980" y="11"/> + <position x="980" y="1151"/> <position x="776" y="1151"/>
<position x="776" y="1097"/>
@@ -512,7 +512,7 @@
<reference name="GREEN_LIGHT"/>
- <actionBlock localId="9" width="219" height="125">
+ <actionBlock localId="9" width="232" height="125"> <position x="711" y="250"/>
<relPosition x="0" y="15"/>
@@ -554,7 +554,7 @@
<relPosition x="37" y="17"/>
</connectionPointOutAction>
- <actionBlock localId="11" width="203" height="103">
+ <actionBlock localId="11" width="235" height="103"> <position x="710" y="413"/>
<relPosition x="0" y="15"/>
@@ -696,7 +696,7 @@
<relPosition x="148" y="13"/>
</connectionPointOutAction>
- <actionBlock localId="19" width="246" height="110">
+ <actionBlock localId="19" width="236" height="110"> <position x="708" y="573"/>
<relPosition x="0" y="15"/>
@@ -731,7 +731,11 @@
<relPosition x="10" y="2"/>
- <reference name="STOP"/>
+ <xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p> <jumpStep localId="21" height="13" width="12" targetName="Standstill">
@@ -796,7 +800,7 @@
<relPosition x="148" y="13"/>
</connectionPointOutAction>
- <actionBlock localId="25" width="238" height="110">
+ <actionBlock localId="25" width="233" height="110"> <position x="708" y="748"/>
<relPosition x="0" y="15"/>
@@ -831,7 +835,12 @@
<relPosition x="10" y="2"/>
- <reference name="STOP"/>
+ <connection refLocalId="48"> + <position x="400" y="858"/> + <position x="290" y="858"/> <jumpStep localId="27" height="13" width="12" targetName="Standstill">
@@ -896,7 +905,7 @@
<relPosition x="56" y="13"/>
</connectionPointOutAction>
- <actionBlock localId="31" width="154" height="110">
+ <actionBlock localId="31" width="227" height="110"> <position x="709" y="931"/>
<relPosition x="0" y="15"/>
@@ -1112,6 +1121,92 @@
+ <comment localId="45" height="681" width="645"> + <position x="1021" y="21"/> + <xhtml:p><![CDATA[*** Description of SFC action qualifiers *** +N : non-stored - The action code body is executed or the Boolean variable is set as +long as the step is active. +R : overriding reset – When the step has previously been executed with the S +(including DS, DS, and SL) qualifier, the R qualifier will stop the execution of the +code or reset the Boolean variable. +S : set (stored) - The action code body is executed or the Boolean variable is set. +This state is stored as soon as the step becomes active. It can only be reset +explicitly by associating the same action to a different step using the qualifier 'R'. +L : time limited - The action code body is executed or the Boolean variable is set as +long as the step is active but maximal for the fixed time interval. +D : time delayed - The action code body is executed or the Boolean variable is set +after the fixed delay time has elapsed. The action remains active as long as the step +is active. If the step is active shorter than the fixed delay time the action does not +P : pulse - As soon as the step is active the action code body is executed or the +Boolean variable is set for one operating cycle. (Note: The code body will then +execute for one additional operating cycle with the Step.X variable FALSE.) +SD : stored and time delayed - the action code body is executed or the Boolean +variable is stored and set when the fixed delay time has elapsed after the step +activation, even if the step becomes inactive. The action remains active until it is +reset. If the step is active shorter than the fixed delay time the action becomes active +DS : delayed and stored - The action code body is executed or the Boolean variable +is set when the fixed delay time has elapsed after the step activation. The action +remains active until it is reset. If the step is active shorter than the fixed delay time +the action does not become active. +SL : stored and time limited - The action code body is executed or the Boolean +variable is set and stored for a fixed time interval as soon as the step is active. If the +step is active shorter than the time interval the action is active for the whole time +interval anyway. If the action is reset during the time interval the action becomes +inactive as soon as the action is reset. + <comment localId="46" height="160" width="375"> + <position x="8" y="326"/> + <xhtml:p><![CDATA[Conditions can be written in any IEC 61131-3 language. +They can be implemented in defferent ways: +- reference to external implementation; +- inline implementation; +- written in FBD or LD on SFC diagram and connected to the condition. +See below examples of all these types.]]></xhtml:p> + <leftPowerRail localId="47" height="40" width="3"> + <position x="189" y="838"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + <contact localId="48" height="15" width="21" negated="true"> + <position x="269" y="850"/> + <relPosition x="0" y="8"/> + <connection refLocalId="47"> + <position x="269" y="858"/> + <position x="192" y="858"/> + <relPosition x="21" y="8"/> + <variable>SWITCH_BUTTON</variable> + <comment localId="13" height="66" width="375"> + <position x="9" y="28"/> +Sequential function chart (SFC) is commonly used to describe state machines.]]></xhtml:p> @@ -1158,57 +1253,19 @@
- <variable name="TEST_DATE">
- <simpleValue value="D#2012-12-03"/>
- <variable name="RESULT_STRING">
- <variable name="TEST_STRING">
- <simpleValue value="TOTO"/>
- <variable name="TEST_ULINT">
- <variable name="RESULT_INT">
- <variable name="RESULT_BYTE">
- <block localId="1" width="349" height="836" typeName="traffic_light_sequence" instanceName="trafic_light_sequence0">
- <position x="470" y="127"/>
+ <block localId="1" width="349" height="836" typeName="traffic_light_sequence" instanceName="trafic_light_sequence0" executionOrderId="0"> + <position x="470" y="406"/> <variable formalParameter="SWITCH_BUTTON">
<relPosition x="0" y="101"/>
<connection refLocalId="2" formalParameter="state_out">
- <position x="470" y="228"/>
- <position x="401" y="228"/>
- <position x="401" y="177"/>
- <position x="333" y="177"/>
+ <position x="470" y="507"/> + <position x="333" y="507"/> @@ -1216,8 +1273,10 @@
<relPosition x="0" y="264"/>
<connection refLocalId="3" formalParameter="state_out">
- <position x="470" y="391"/>
- <position x="335" y="391"/>
+ <position x="470" y="670"/> + <position x="402" y="670"/> + <position x="402" y="721"/> + <position x="335" y="721"/> @@ -1251,15 +1310,15 @@
- <block localId="2" width="143" height="183" typeName="Button" instanceName="SwitchButton">
- <position x="190" y="141"/>
+ <block localId="2" width="143" height="183" typeName="Button" instanceName="SwitchButton" executionOrderId="0"> + <position x="190" y="471"/> <variable formalParameter="back_id">
<relPosition x="0" y="36"/>
<connection refLocalId="5">
- <position x="190" y="177"/>
- <position x="136" y="177"/>
+ <position x="190" y="507"/> + <position x="136" y="507"/> @@ -1267,8 +1326,8 @@
<relPosition x="0" y="68"/>
<connection refLocalId="6">
- <position x="190" y="209"/>
- <position x="136" y="209"/>
+ <position x="190" y="539"/> + <position x="136" y="539"/> @@ -1276,8 +1335,8 @@
<relPosition x="0" y="100"/>
<connection refLocalId="4">
- <position x="190" y="241"/>
- <position x="136" y="241"/>
+ <position x="190" y="571"/> + <position x="136" y="571"/> @@ -1301,15 +1360,15 @@
- <block localId="3" width="143" height="198" typeName="Button" instanceName="PedestrianButton">
- <position x="192" y="354"/>
+ <block localId="3" width="143" height="198" typeName="Button" instanceName="PedestrianButton" executionOrderId="0"> + <position x="192" y="684"/> <variable formalParameter="back_id">
<relPosition x="0" y="37"/>
<connection refLocalId="7">
- <position x="192" y="391"/>
- <position x="159" y="391"/>
+ <position x="192" y="721"/> + <position x="159" y="721"/> @@ -1317,8 +1376,8 @@
<relPosition x="0" y="72"/>
<connection refLocalId="8">
- <position x="192" y="426"/>
- <position x="159" y="426"/>
+ <position x="192" y="756"/> + <position x="159" y="756"/> @@ -1347,50 +1406,50 @@
- <inVariable localId="4" height="27" width="18">
- <position x="118" y="228"/>
+ <inVariable localId="4" height="27" width="18" executionOrderId="0" negated="false"> + <position x="118" y="558"/> <relPosition x="18" y="13"/>
<expression>1</expression>
- <inVariable localId="5" height="27" width="105">
- <position x="31" y="164"/>
+ <inVariable localId="5" height="27" width="105" executionOrderId="0" negated="false"> + <position x="31" y="494"/> <relPosition x="105" y="13"/>
<expression>'SWITCH_OFF'</expression>
- <inVariable localId="6" height="27" width="105">
- <position x="31" y="196"/>
+ <inVariable localId="6" height="27" width="105" executionOrderId="0" negated="false"> + <position x="31" y="526"/> <relPosition x="105" y="13"/>
<expression>'SWITCH_ON'</expression>
- <inVariable localId="7" height="27" width="137">
- <position x="22" y="378"/>
+ <inVariable localId="7" height="27" width="137" executionOrderId="0" negated="false"> + <position x="22" y="708"/> <relPosition x="137" y="13"/>
<expression>'PEDESTRIAN_OFF'</expression>
- <inVariable localId="8" height="27" width="137">
- <position x="22" y="413"/>
+ <inVariable localId="8" height="27" width="137" executionOrderId="0" negated="false"> + <position x="22" y="743"/> <relPosition x="137" y="13"/>
<expression>'PEDESTRIAN_ON'</expression>
- <block localId="9" width="115" height="133" typeName="Led" instanceName="RedLight">
- <position x="1057" y="116"/>
+ <block localId="9" width="115" height="133" typeName="Led" instanceName="RedLight" executionOrderId="0"> + <position x="1057" y="395"/> <variable formalParameter="back_id">
<relPosition x="0" y="38"/>
<connection refLocalId="10">
- <position x="1057" y="154"/>
- <position x="1010" y="154"/>
+ <position x="1057" y="433"/> + <position x="1010" y="433"/> @@ -1398,8 +1457,8 @@
<relPosition x="0" y="75"/>
<connection refLocalId="11">
- <position x="1057" y="191"/>
- <position x="1010" y="191"/>
+ <position x="1057" y="470"/> + <position x="1010" y="470"/> @@ -1407,8 +1466,8 @@
<relPosition x="0" y="112"/>
<connection refLocalId="1" formalParameter="RED_LIGHT">
- <position x="1057" y="228"/>
- <position x="819" y="228"/>
+ <position x="1057" y="507"/> + <position x="819" y="507"/> @@ -1416,29 +1475,29 @@
- <inVariable localId="10" height="27" width="79">
- <position x="931" y="141"/>
+ <inVariable localId="10" height="27" width="79" executionOrderId="0" negated="false"> + <position x="931" y="420"/> <relPosition x="79" y="13"/>
<expression>'RED_OFF'</expression>
- <inVariable localId="11" height="27" width="79">
- <position x="931" y="178"/>
+ <inVariable localId="11" height="27" width="79" executionOrderId="0" negated="false"> + <position x="931" y="457"/> <relPosition x="79" y="13"/>
<expression>'RED_ON'</expression>
- <block localId="12" width="115" height="133" typeName="Led" instanceName="OrangeLight">
- <position x="1058" y="279"/>
+ <block localId="12" width="115" height="133" typeName="Led" instanceName="OrangeLight" executionOrderId="0"> + <position x="1058" y="558"/> <variable formalParameter="back_id">
<relPosition x="0" y="38"/>
<connection refLocalId="13">
- <position x="1058" y="317"/>
- <position x="1010" y="317"/>
+ <position x="1058" y="596"/> + <position x="1010" y="596"/> @@ -1446,8 +1505,8 @@
<relPosition x="0" y="75"/>
<connection refLocalId="14">
- <position x="1058" y="354"/>
- <position x="1010" y="354"/>
+ <position x="1058" y="633"/> + <position x="1010" y="633"/> @@ -1455,8 +1514,8 @@
<relPosition x="0" y="112"/>
<connection refLocalId="1" formalParameter="ORANGE_LIGHT">
- <position x="1058" y="391"/>
- <position x="819" y="391"/>
+ <position x="1058" y="670"/> + <position x="819" y="670"/> @@ -1464,29 +1523,29 @@
- <inVariable localId="13" height="27" width="111">
- <position x="899" y="304"/>
+ <inVariable localId="13" height="27" width="111" executionOrderId="0" negated="false"> + <position x="899" y="583"/> <relPosition x="111" y="13"/>
<expression>'ORANGE_OFF'</expression>
- <inVariable localId="14" height="27" width="106">
- <position x="904" y="341"/>
+ <inVariable localId="14" height="27" width="106" executionOrderId="0" negated="false"> + <position x="904" y="620"/> <relPosition x="106" y="13"/>
<expression>'ORANGE_ON'</expression>
- <block localId="15" width="115" height="133" typeName="Led" instanceName="GreenLight">
- <position x="1058" y="442"/>
+ <block localId="15" width="115" height="133" typeName="Led" instanceName="GreenLight" executionOrderId="0"> + <position x="1058" y="721"/> <variable formalParameter="back_id">
<relPosition x="0" y="38"/>
<connection refLocalId="16">
- <position x="1058" y="480"/>
- <position x="1010" y="480"/>
+ <position x="1058" y="759"/> + <position x="1010" y="759"/> @@ -1494,8 +1553,8 @@
<relPosition x="0" y="75"/>
<connection refLocalId="17">
- <position x="1058" y="517"/>
- <position x="1010" y="517"/>
+ <position x="1058" y="796"/> + <position x="1010" y="796"/> @@ -1503,8 +1562,8 @@
<relPosition x="0" y="112"/>
<connection refLocalId="1" formalParameter="GREEN_LIGHT">
- <position x="1058" y="554"/>
- <position x="819" y="554"/>
+ <position x="1058" y="833"/> + <position x="819" y="833"/> @@ -1512,29 +1571,29 @@
- <inVariable localId="16" height="27" width="111">
- <position x="899" y="467"/>
+ <inVariable localId="16" height="27" width="111" executionOrderId="0" negated="false"> + <position x="899" y="746"/> <relPosition x="111" y="13"/>
<expression>'GREEN_OFF'</expression>
- <inVariable localId="17" height="27" width="106">
- <position x="904" y="504"/>
+ <inVariable localId="17" height="27" width="106" executionOrderId="0" negated="false"> + <position x="904" y="783"/> <relPosition x="106" y="13"/>
<expression>'GREEN_ON'</expression>
- <block localId="18" width="115" height="133" typeName="Led" instanceName="PedestrianRedLight">
- <position x="1059" y="605"/>
+ <block localId="18" width="115" height="133" typeName="Led" instanceName="PedestrianRedLight" executionOrderId="0"> + <position x="1059" y="884"/> <variable formalParameter="back_id">
<relPosition x="0" y="38"/>
<connection refLocalId="19">
- <position x="1059" y="643"/>
- <position x="1020" y="643"/>
+ <position x="1059" y="922"/> + <position x="1020" y="922"/> @@ -1542,8 +1601,8 @@
<relPosition x="0" y="75"/>
<connection refLocalId="20">
- <position x="1059" y="680"/>
- <position x="1020" y="680"/>
+ <position x="1059" y="959"/> + <position x="1020" y="959"/> @@ -1551,8 +1610,8 @@
<relPosition x="0" y="112"/>
<connection refLocalId="1" formalParameter="PEDESTRIAN_RED_LIGHT">
- <position x="1059" y="717"/>
- <position x="819" y="717"/>
+ <position x="1059" y="996"/> + <position x="819" y="996"/> @@ -1560,29 +1619,29 @@
- <inVariable localId="19" height="27" width="171">
- <position x="849" y="630"/>
+ <inVariable localId="19" height="27" width="171" executionOrderId="0" negated="false"> + <position x="849" y="909"/> <relPosition x="171" y="13"/>
<expression>'PEDESTRIAN_RED_OFF'</expression>
- <inVariable localId="20" height="27" width="166">
- <position x="854" y="667"/>
+ <inVariable localId="20" height="27" width="166" executionOrderId="0" negated="false"> + <position x="854" y="946"/> <relPosition x="166" y="13"/>
<expression>'PEDESTRIAN_RED_ON'</expression>
- <block localId="21" width="115" height="133" typeName="Led" instanceName="PedestrianGreenLight">
- <position x="1059" y="768"/>
+ <block localId="21" width="115" height="133" typeName="Led" instanceName="PedestrianGreenLight" executionOrderId="0"> + <position x="1059" y="1047"/> <variable formalParameter="back_id">
<relPosition x="0" y="38"/>
<connection refLocalId="22">
- <position x="1059" y="806"/>
- <position x="1035" y="806"/>
+ <position x="1059" y="1085"/> + <position x="1035" y="1085"/> @@ -1590,8 +1649,8 @@
<relPosition x="0" y="75"/>
<connection refLocalId="23">
- <position x="1059" y="843"/>
- <position x="1035" y="843"/>
+ <position x="1059" y="1122"/> + <position x="1035" y="1122"/> @@ -1599,8 +1658,8 @@
<relPosition x="0" y="112"/>
<connection refLocalId="1" formalParameter="PEDESTRIAN_GREEN_LIGHT">
- <position x="1059" y="880"/>
- <position x="819" y="880"/>
+ <position x="1059" y="1159"/> + <position x="819" y="1159"/> @@ -1608,236 +1667,52 @@
- <inVariable localId="22" height="27" width="190">
- <position x="845" y="793"/>
+ <inVariable localId="22" height="27" width="190" executionOrderId="0" negated="false"> + <position x="845" y="1072"/> <relPosition x="190" y="13"/>
<expression>'PEDESTRIAN_GREEN_OFF'</expression>
- <inVariable localId="23" height="27" width="185">
- <position x="850" y="830"/>
+ <inVariable localId="23" height="27" width="185" executionOrderId="0" negated="false"> + <position x="850" y="1109"/> <relPosition x="185" y="13"/>
<expression>'PEDESTRIAN_GREEN_ON'</expression>
- <inVariable localId="24" height="27" width="84">
- <position x="289" y="1141"/>
- <relPosition x="84" y="13"/>
- <expression>TEST_DATE</expression>
- <block localId="25" width="128" height="40" typeName="DATE_TO_STRING">
- <position x="426" y="1124"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="24">
- <position x="426" y="1154"/>
- <position x="373" y="1154"/>
- <variable formalParameter="OUT">
- <relPosition x="128" y="30"/>
- <outVariable localId="26" height="27" width="116">
- <position x="640" y="1141"/>
- <relPosition x="0" y="13"/>
- <connection refLocalId="25" formalParameter="OUT">
- <position x="640" y="1154"/>
- <position x="554" y="1154"/>
- <expression>RESULT_STRING</expression>
- <inVariable localId="27" height="27" width="90">
- <position x="294" y="1271"/>
- <relPosition x="90" y="13"/>
- <expression>TEST_ULINT</expression>
- <outVariable localId="28" height="27" width="89">
- <position x="630" y="1271"/>
- <relPosition x="0" y="13"/>
- <connection refLocalId="29" formalParameter="OUT">
- <position x="630" y="1284"/>
- <position x="551" y="1284"/>
- <expression>RESULT_INT</expression>
- <block localId="29" width="107" height="40" typeName="ULINT_TO_INT">
- <position x="444" y="1254"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="27">
- <position x="444" y="1284"/>
- <position x="384" y="1284"/>
- <variable formalParameter="OUT">
- <relPosition x="107" y="30"/>
- <inVariable localId="30" height="27" width="89">
- <position x="139" y="1032"/>
- <relPosition x="89" y="13"/>
- <expression>RESULT_INT</expression>
- <block localId="31" width="68" height="85" typeName="LIMIT">
- <position x="419" y="994"/>
- <variable formalParameter="MN">
- <relPosition x="0" y="30"/>
- <connection refLocalId="33">
- <position x="419" y="1024"/>
- <position x="390" y="1024"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="51"/>
- <connection refLocalId="38" formalParameter="OUT">
- <position x="419" y="1045"/>
- <position x="335" y="1045"/>
- <variable formalParameter="MX">
- <relPosition x="0" y="72"/>
- <connection refLocalId="34">
- <position x="419" y="1066"/>
- <position x="404" y="1066"/>
- <position x="404" y="1067"/>
- <position x="389" y="1067"/>
- <variable formalParameter="OUT">
- <relPosition x="68" y="30"/>
- <inVariable localId="33" height="27" width="20">
- <position x="370" y="1011"/>
- <relPosition x="20" y="13"/>
- <expression>0</expression>
- <inVariable localId="34" height="27" width="26">
- <position x="363" y="1054"/>
- <relPosition x="26" y="13"/>
- <expression>31</expression>
- <block localId="35" width="100" height="45" typeName="INT_TO_BYTE">
- <position x="529" y="992"/>
- <variable formalParameter="IN">
- <relPosition x="0" y="32"/>
- <connection refLocalId="31" formalParameter="OUT">
- <position x="529" y="1024"/>
- <position x="487" y="1024"/>
- <variable formalParameter="OUT">
- <relPosition x="100" y="32"/>
- <outVariable localId="37" height="27" width="100">
- <position x="681" y="1011"/>
- <relPosition x="0" y="13"/>
- <connection refLocalId="35" formalParameter="OUT">
- <position x="681" y="1024"/>
- <position x="629" y="1024"/>
- <expression>RESULT_BYTE</expression>
- <block localId="38" width="67" height="60" typeName="MUL">
- <position x="268" y="1015"/>
- <variable formalParameter="IN1">
- <relPosition x="0" y="30"/>
- <connection refLocalId="30">
- <position x="268" y="1045"/>
- <position x="228" y="1045"/>
- <variable formalParameter="IN2">
- <relPosition x="0" y="50"/>
- <connection refLocalId="39">
- <position x="268" y="1065"/>
- <position x="248" y="1065"/>
- <position x="248" y="1084"/>
- <position x="229" y="1084"/>
- <variable formalParameter="OUT">
- <relPosition x="67" y="30"/>
- <inVariable localId="39" height="27" width="18">
- <position x="211" y="1071"/>
- <relPosition x="18" y="13"/>
- <expression>1</expression>
+ <comment localId="24" height="262" width="804"> + <position x="22" y="13"/> + <xhtml:p><![CDATA[This example implements control of traffic lights. +Basically it shows following features of Beremiz: +- web interface (SCADA) using integrated web server in svgui extension; +- interaction with web UI; +- functional blocks in SFC language. +SVGUI is extensions to build web interface to PLC. It has *integrated* web-server. So it's NOT necessary to install Apache, lighttpd or nginx for that!!! +As the program is running in PLC, web UI will be available at http://localhost:8009/. +Web interface is build as SVG file in Inkscape. To edit SVG file click 'Inkscape' button in 0x: svgui extension. +Inkscape is a free and open-source vector graphics editor. It's not part of Beremiz and needs to be installed separately. + <comment localId="102" height="126" width="411"> + <position x="20" y="319"/> + <xhtml:p><![CDATA[In this example FB like 'Button', 'Led' and 'Text' are used. +Back_id and sele_id inputs of these blocks are IDs of +graphic primitives in SVG file. +This is the way how elements in SVG are bound to elements +in PLC program. You can find out or edit these IDs in Inkscape.]]></xhtml:p> --- a/tests/traffic_lights/svgui-0@svgui/pyfile.xml Sun Mar 05 00:38:25 2017 +0000
+++ b/tests/traffic_lights/svgui-0@svgui/pyfile.xml Fri Mar 24 12:07:47 2017 +0000
@@ -2,18 +2,31 @@
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xhtml:p><![CDATA[]]></xhtml:p>
+ Web interface is build as SVG file in Inkscape. + To edit SVG file click 'Inkscape' button on the toolbar above. + Inkscape is a free and open-source vector graphics editor. + It's not part of Beremiz and needs to be installed separately. - <xhtml:p><![CDATA[]]></xhtml:p>
- <xhtml:p><![CDATA[]]></xhtml:p>
- <xhtml:p><![CDATA[]]></xhtml:p>
- <xhtml:p><![CDATA[]]></xhtml:p>
--- a/util/BitmapLibrary.py Sun Mar 05 00:38:25 2017 +0000
+++ b/util/BitmapLibrary.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2012: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/util/MiniTextControler.py Sun Mar 05 00:38:25 2017 +0000
+++ b/util/MiniTextControler.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Minimal tab controller for a simple text editor
--- a/util/ProcessLogger.py Sun Mar 05 00:38:25 2017 +0000
+++ b/util/ProcessLogger.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,27 +1,26 @@
-#This file is part of Beremiz, a Integrated Development Environment for
-#programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -49,11 +48,12 @@
- while outchunk != '' and not self.killed :
- outchunk = self.fd.readline()
- if self.callback : self.callback(outchunk)
while self.retval is None and not self.killed :
- self.retval = self.Proc.poll()
+ self.retval = self.Proc.poll() + self.retval = self.Proc.returncode outchunk = self.fd.readline()
if self.callback : self.callback(outchunk)
while outchunk != '' and not self.killed :
@@ -108,6 +108,7 @@
+ self.startsem = Semaphore(0) self.finishsem = Semaphore(0)
@@ -124,6 +125,12 @@
elif wx.Platform == '__WXGTK__':
popenargs["shell"] = False
+ self.timeout = Timer(timeout,self.endlog) self.Proc = subprocess.Popen( self.Command, **popenargs )
self.outt = outputThread(
@@ -138,12 +145,8 @@
+ self.startsem.release()
- self.timeout = Timer(timeout,self.endlog)
@@ -163,18 +166,26 @@
def log_the_end(self,ecode,pid):
self.logger.write(self.Command_str + "\n")
- self.logger.write_warning(_("exited with status %s (pid %s)\n")%(str(ecode),str(pid)))
+ self.logger.write_warning(_("exited with status {a1} (pid {a2})\n").format(a1 = str(ecode), a2 = str(pid))) def finish(self, pid,ecode):
- if self.timeout: self.timeout.cancel()
+ # avoid running function before start is finished + self.startsem.acquire() self.log_the_end(ecode,pid)
if self.finish_callback is not None:
self.finish_callback(self,ecode,pid)
def kill(self,gently=True):
+ # avoid running kill before start is finished + self.startsem.acquire() + self.startsem.release() if wx.Platform == '__WXMSW__':
@@ -196,9 +207,9 @@
if self.endlock.acquire(False):
- self.finishsem.release()
if not self.outt.finished and self.kill_it:
+ self.finishsem.release() --- a/util/TranslationCatalogs.py Sun Mar 05 00:38:25 2017 +0000
+++ b/util/TranslationCatalogs.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,6 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/util/misc.py Sun Mar 05 00:38:25 2017 +0000
+++ b/util/misc.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/version.py Fri Mar 24 12:07:47 2017 +0000
@@ -0,0 +1,112 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2016: Andrey Skvortsov +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + app_dir=os.path.dirname(os.path.realpath(__file__)) + pipe = subprocess.Popen( + stdout = subprocess.PIPE, + rev = pipe.communicate()[0] + if pipe.returncode != 0: + # if this is not mercurial repository + # try to read revision from file + f = open(os.path.join(app_dir,"revision")) +def GetAboutDialogInfo(): + info = wx.AboutDialogInfo() + info.Version = app_version + info.Copyright = "(C) 2016 Andrey Skvortsov\n" + info.Copyright += "(C) 2008-2015 Eduard Tisserant\n" + info.Copyright += "(C) 2008-2015 Laurent Bessard" + info.WebSite = ("http://beremiz.org", "beremiz.org") + info.Description = _("Open Source framework for automation, " + "implemented IEC 61131 IDE with constantly growing set of extensions " + "and flexible PLC runtime.") + info.Developers = ("Andrey Skvortsov <andrej.skvortzov@gmail.com>", + "Sergey Surkov <surkov.sv@summatechnology.ru>", + "Edouard Tisserant <edouard.tisserant@gmail.com>", + "Laurent Bessard <laurent.bessard@gmail.com>") + info.License = ('\n This program is free software; you can redistribute it and/or\n' + ' modify it under the terms of the GNU General Public License\n' + ' as published by the Free Software Foundation; either version 2\n' + ' of the License, or (at your option) any later version.\n' + ' This program is distributed in the hope that it will be useful,\n' + ' but WITHOUT ANY WARRANTY; without even the implied warranty of\n' + ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n' + ' GNU General Public License below for more details.\n' + path=os.path.join(os.path.dirname(os.path.abspath(__file__))) + license_path = os.path.join(path, u"COPYING") + if os.path.exists(license_path): + with open(license_path) as f: + info.License += f.read() + info.Icon = wx.Icon(os.path.join(path, "images", "about_brz_logo.png"), wx.BITMAP_TYPE_PNG) + info.Translators = ("Russian\t- Andrey Skvortsov <andrej.skvortzov@gmail.com>", + "Korean\t- Reinhard Lee <lij3105@gmail.com>", + "German\t- Mark Muzenhardt <mark.muzenhardt@gmail.com>", + "French\t- Laurent Bessard <laurent.bessard@gmail.com>") + app_version = app_version + "-" + rev.rstrip() --- a/wxglade_hmi/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/wxglade_hmi/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,1 +1,25 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from wxglade_hmi import *
--- a/wxglade_hmi/wxglade_hmi.py Sun Mar 05 00:38:25 2017 +0000
+++ b/wxglade_hmi/wxglade_hmi.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,3 +1,27 @@
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD +# See COPYING file for copyrights details. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. from xml.dom import minidom
--- a/xmlclass/__init__.py Sun Mar 05 00:38:25 2017 +0000
+++ b/xmlclass/__init__.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- a/xmlclass/xmlclass.py Sun Mar 05 00:38:25 2017 +0000
+++ b/xmlclass/xmlclass.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -1690,7 +1690,7 @@
return etree.QName(self.tag).localname
- return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True))
+ return NAMESPACE_PATTERN.sub("", etree.tostring(self, pretty_print=True, encoding='utf-8')).decode('utf-8') class XMLElementClassLookUp(etree.PythonElementClassLookup):
@@ -1754,7 +1754,7 @@
def Dumps(self, xml_obj):
- return etree.tostring(xml_obj)
+ return etree.tostring(xml_obj, encoding='utf-8') def Loads(self, xml_string):
return etree.fromstring(xml_string, self)
--- a/xmlclass/xsdschema.py Sun Mar 05 00:38:25 2017 +0000
+++ b/xmlclass/xsdschema.py Fri Mar 24 12:07:47 2017 +0000
@@ -1,26 +1,26 @@
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
+# This file is part of Beremiz, a Integrated Development Environment for +# programming IEC 61131-3 automates supporting plcopen standard and CanFestival. -#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
+# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD -#See COPYING file for copyrights details.
+# See COPYING file for copyrights details. -#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
+# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. -#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
+# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.