# HG changeset patch # User Mario de Sousa <msousa@fe.up.pt> # Date 1490357267 0 # Node ID c1298e7ffe3a3079ffa1e3e3fdc4548b2213bc04 # Parent a375e31bf312c7238c813b3133a4b688d1a452ff# Parent 1953c268a194a86a63997eeaf959df897d09bd86 merge diff -r a375e31bf312 -r c1298e7ffe3a .hgignore --- a/.hgignore Sun Mar 05 00:38:25 2017 +0000 +++ b/.hgignore Fri Mar 24 12:07:47 2017 +0000 @@ -4,9 +4,14 @@ bug_report* syntax: regexp ^tests/.*/build$ +^.idea/.* syntax: regexp ^.*\.pyc$ syntax: regexp ^.*~$ syntax: regexp ^.*\.swp$ + +bug_report.*\.txt +i18n/.*.new$ +revision diff -r a375e31bf312 -r c1298e7ffe3a Beremiz.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. updateinfo_url = None @@ -31,18 +30,33 @@ import shutil import random import time +import version from types import ListType beremiz_dir = os.path.dirname(os.path.realpath(__file__)) -import wxversion -wxversion.select('2.8') -import wx +if __name__ == '__main__': + import wxversion + wxversion.select(['2.8', '3.0']) + import wx + from wx.lib.agw.advancedsplash import AdvancedSplash def Bpath(*args): return os.path.join(beremiz_dir,*args) +def ShowSplashScreen(): + 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) + + # process all events + # even the events generated by splash themself during showing + for i in range(0,30): + wx.Yield() + time.sleep(0.01); + return splash + if __name__ == '__main__': def usage(): print "\nUsage of Beremiz.py :" @@ -84,18 +98,24 @@ else : __builtin__.__dict__["BMZ_DBG"] = False - app = wx.PySimpleApp(redirect=BMZ_DBG) + if wx.VERSION >= (3, 0, 0): + app = wx.App(redirect=BMZ_DBG) + else: + app = wx.PySimpleApp(redirect=BMZ_DBG) + app.SetAppName('beremiz') - wx.InitAllImageHandlers() + if wx.VERSION < (3, 0, 0): + wx.InitAllImageHandlers() # popup splash - 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) - wx.Yield() - + 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 def updateinfoproc(): global updateinfo @@ -103,7 +123,7 @@ import urllib2 updateinfo = urllib2.urlopen(updateinfo_url,None).read() except : - updateinfo = "update info unavailable." + updateinfo = _("update info unavailable.") from threading import Thread splash.SetText(text=updateinfo) @@ -114,9 +134,6 @@ splash.SetText(text=updateinfo) wx.Yield() - from util.misc import InstallLocalRessources - InstallLocalRessources(beremiz_dir) - # Load extensions 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 # only is active + 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) self.stack = [] self.lock.release() self.output.Thaw() @@ -377,6 +398,11 @@ inspectorID = wx.NewId() self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID) accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL|wx.ACCEL_ALT, ord('I'), inspectorID)] + + keyID = wx.NewId() + 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), ("Run", wx.WXK_F5), ("Transfer", wx.WXK_F6), @@ -440,11 +466,28 @@ self.AUIManager.Update() - 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): + if os.name == 'nt': + # 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 + # found here. + 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) if not result: self.LibraryPanel.SetController(self.Controler) self.ProjectTree.Enable(True) @@ -534,7 +574,7 @@ {False : "-x 0", True :"-x 1"}[taskbaricon], self.local_runtime_tmpdir), no_gui=False, - timeout=500, keyword = "working", + timeout=500, keyword = self.local_runtime_tmpdir, cwd = self.local_runtime_tmpdir) self.local_runtime.spin() return self.runtime_port @@ -717,6 +757,11 @@ self.GetConfigEntry("RecentProjects", [])) except: recent_projects = [] + + 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): try: recent_projects = map(DecodeFileSystemPath, self.GetConfigEntry("RecentProjects", [])) @@ -864,7 +909,8 @@ recent_projects = [] if projectpath in recent_projects: recent_projects.remove(projectpath) - recent_projects.insert(0, projectpath) + if not err: + recent_projects.insert(0, projectpath) self.Config.Write("RecentProjects", cPickle.dumps( map(EncodeFileSystemPath, recent_projects[:MAX_RECENT_PROJECTS]))) self.Config.Flush() @@ -931,12 +977,11 @@ self.ResetView() self.CTR = ProjectController(self, self.Log) self.Controler = self.CTR - result = self.CTR.LoadProject(projectpath) + result, err = self.CTR.LoadProject(projectpath) if not result: self.LibraryPanel.SetController(self.Controler) self.ProjectTree.Enable(True) self.PouInstanceVariablesPanel.SetController(self.Controler) - self.RefreshConfigRecentProjects(projectpath) if self.EnableDebug: self.DebugVariablePanel.SetDataProducer(self.CTR) self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE) @@ -944,8 +989,11 @@ self.ResetView() self.ShowErrorMessage(result) self.RefreshAll() + self.SearchResultPanel.ResetSearchResults() else: self.ShowErrorMessage(_("\"%s\" folder is not a valid Beremiz project\n") % projectpath) + err = True + self.RefreshConfigRecentProjects(projectpath, err) self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU) def OnCloseProjectMenu(self, event): @@ -974,13 +1022,15 @@ if self.CTR is not None: self.CTR.SaveProjectAs() self.RefreshAll() + self.RefreshConfigRecentProjects(self.CTR.ProjectPath) self._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES) def OnQuitMenu(self, event): self.Close() 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. Traceback: """) % bug_report_path + @@ -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) if splash: diff -r a375e31bf312 -r c1298e7ffe3a Beremiz_service.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import os, sys, getopt from threading import Thread @@ -112,10 +112,52 @@ if __name__ == '__main__': __builtin__.__dict__['_'] = lambda x: x +def Bpath(*args): + return os.path.join(beremiz_dir,*args) + +def SetupI18n(): + # Import module for internationalization + import gettext + + # 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) + domain = "Beremiz" + + # Define locale for wx + loc = __builtin__.__dict__.get('loc', None) + if loc is None: + loc = wx.Locale(langid) + __builtin__.__dict__['loc'] = loc + # Define location for searching translation files + loc.AddCatalogLookupPathPrefix(localedir) + # Define locale domain + loc.AddCatalog(domain) + + + import locale + global default_locale + 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 + if enablewx: try: import wxversion - wxversion.select('2.8') + wxversion.select(['2.8', '3.0']) import wx havewx = True except: @@ -126,36 +168,15 @@ import re from threading import Thread, currentThread from types import * - app=wx.App(redirect=False) - - # Import module for internationalization - import gettext - - def Bpath(*args): - 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) - domain = "Beremiz" - - # Define locale for wx - loc = __builtin__.__dict__.get('loc', None) - if loc is None: - loc = wx.Locale(langid) - __builtin__.__dict__['loc'] = loc - # Define location for searching translation files - loc.AddCatalogLookupPathPrefix(localedir) - # Define locale domain - loc.AddCatalog(domain) - - def unicode_translation(message): - return wx.GetTranslation(message).encode("utf-8") - - if __name__ == '__main__': - __builtin__.__dict__['_'] = wx.GetTranslation#unicode_translation + + if wx.VERSION >= (3, 0, 0): + app = wx.App(redirect=False) + else: + app = wx.PySimpleApp(redirect=False) + app.SetTopWindow(wx.Frame(None, -1)) + + default_locale = None + SetupI18n() defaulticon = wx.Image(Bpath("images", "brz.png")) starticon = wx.Image(Bpath("images", "icoplay24.png")) @@ -170,7 +191,7 @@ event(self, function) - 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() + else: + 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() + else: + 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 @@ self.pyroserver.Stop() 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 @@ def Quit(self): self.continueloop = False if self.plcobj is not None: + self.plcobj.StopPLC() self.plcobj.UnLoadPLC() self.Stop() @@ -390,9 +423,13 @@ self.pyruntimevars) 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.autostart : - self.plcobj.AutoLoad() - if self.plcobj.GetPLCstatus()[0] != "Empty": + self.plcobj.AutoLoad() + if self.plcobj.GetPLCstatus()[0] != "Empty": + if self.autostart : self.plcobj.StartPLC() + self.plcobj.StatusChange() sys.stdout.flush() self.daemon.requestLoop() + self.daemon.sock.close() def Stop(self): if self.plcobj is not None: @@ -434,7 +473,7 @@ havetwisted = True except: - print "Twisted unavailable." + print _("Twisted unavailable.") havetwisted = False pyruntimevars = {} @@ -512,7 +551,7 @@ try: import runtime.NevowServer as NS except Exception, e: - print "Nevow/Athena import failed :", e + print _("Nevow/Athena import failed :"), e webport = None NS.WorkingDir = WorkingDir @@ -520,7 +559,7 @@ try: import runtime.WampClient as WC except Exception, e: - print "WAMP import failed :", e + print _("WAMP import failed :"), e wampconf = None # Load extensions @@ -536,7 +575,7 @@ pyruntimevars["website"] = website statuschange.append(NS.website_statuslistener_factory(website)) except Exception, e: - print "Nevow Web service failed.", e + print _("Nevow Web service failed. "), e if wampconf is not None : try: @@ -544,7 +583,7 @@ pyruntimevars["wampsession"] = WC.GetSession WC.SetServer(pyroserver) except Exception, e: - print "WAMP client startup failed.", e + print _("WAMP client startup failed. "), e if havetwisted or havewx: diff -r a375e31bf312 -r c1298e7ffe3a COPYING --- /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 + Version 2, June 1991 + + 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. + + Preamble + + 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 +your programs, too. + + 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 +rights. + + 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 +authors' reputations. + + 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 +modification follow. + + 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 +along with the Program. + +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 +this License. + + 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 +circumstances. + +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 +impose that choice. + +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 +Foundation. + + 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. + + NO WARRANTY + + 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, +REPAIR OR CORRECTION. + + 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. diff -r a375e31bf312 -r c1298e7ffe3a CodeFileTreeNode.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + + import os, re, traceback from copy import deepcopy @@ -92,11 +117,12 @@ try: self.CodeFile, error = self.CodeFileParser.LoadXMLString(codefile_xml) if error is not None: - 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) except Exception, exc: - 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()) else: self.CodeFile = self.CodeFileParser.CreateRoot() diff -r a375e31bf312 -r c1298e7ffe3a ConfigTreeNode.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 @@ </xsd:schema>""") NameTypeSeparator = '@' -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}") class ConfigTreeNode: """ @@ -397,7 +421,8 @@ shutil.move(oldname, self.CTNPath()) # warn user he has two left hands if DesiredName != res: - 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) return res def GetAllChannels(self): @@ -501,7 +526,7 @@ try: CTNClass, CTNHelp = CTNChildrenTypes[CTNType] except KeyError: - 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()) # Check count 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) + raise Exception, msg # 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()) + raise Exception, msg # Now, self.CTNPath() should be OK @@ -590,12 +618,13 @@ basexmlfile = open(self.ConfNodeBaseXmlFilePath(CTNName), 'r') self.BaseParams, error = _BaseParamsParser.LoadXMLString(basexmlfile.read()) if error is not None: - 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) basexmlfile.close() except Exception, exc: - 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()) # Get the xml tree @@ -604,14 +633,15 @@ xmlfile = open(self.ConfNodeXmlFilePath(CTNName), 'r') obj, error = self.Parser.LoadXMLString(xmlfile.read()) if error is not None: - 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)) name = obj.getLocalTag() setattr(self, name, obj) self.CTNParams = (name, obj) xmlfile.close() except Exception, exc: - 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()) def LoadChildren(self): @@ -623,6 +653,7 @@ try: self.CTNAddChild(pname, ptype) except Exception, exc: - 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()) diff -r a375e31bf312 -r c1298e7ffe3a IDEFrame.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import os, sys import cPickle @@ -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) parent.AppendSeparator() + 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): + if self.icon: + 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._init_icon(prnt) 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.Show() + 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) + if len(criteria) > 0: + result = self.Controler.SearchInProject(criteria) + self.ClearSearchResults() + self.SearchResultPanel.SetSearchResults(criteria, result) + self.SelectTab(self.SearchResultPanel) #------------------------------------------------------------------------------- # Display Menu Functions @@ -1408,15 +1445,18 @@ def OnTabsOpenedDClick(event): pos = event.GetPosition() if tabctrl.TabHitTest(pos.x, pos.y, None): - pane = self.AUIManager.GetPane(self.TabsOpened) - if pane.IsMaximized(): - self.AUIManager.RestorePane(pane) - else: - self.AUIManager.MaximizePane(pane) - self.AUIManager.Update() + self.SwitchFullScrMode(event) event.Skip() return OnTabsOpenedDClick + def SwitchFullScrMode(self,evt): + pane = self.AUIManager.GetPane(self.TabsOpened) + if pane.IsMaximized(): + self.AUIManager.RestorePane(pane) + else: + self.AUIManager.MaximizePane(pane) + self.AUIManager.Update() + #------------------------------------------------------------------------------- # Types Tree Management Functions #------------------------------------------------------------------------------- @@ -1451,8 +1491,7 @@ item_name = _(item_name) 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() self.RefreshPageTitles() 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)) self.RefreshPageTitles() 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 @@ if message or abort: if message: self.ShowErrorMessage(message) - item = event.GetItem() - wx.CallAfter(self.ProjectTree.EditLabel, item) event.Veto() else: wx.CallAfter(self.RefreshProjectTree) @@ -1918,7 +1959,7 @@ self.Bind(wx.EVT_MENU, self.OnDeleteMenu, id=new_id) if menu is not None: - self.PopupMenu(menu) + self.FindFocus().PopupMenu(menu) menu.Destroy() self.ResetSelectedItem() diff -r a375e31bf312 -r c1298e7ffe3a NativeLib.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os from POULibrary import POULibrary diff -r a375e31bf312 -r c1298e7ffe3a PLCControler.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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) + return msg 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", base_type.getname() if base_type_type == "derived" @@ -1972,7 +1973,7 @@ else: 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() else: 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() else: infos["initial"] = "" return infos @@ -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 @@ else: array.appenddimension(dimension_range) if base_type_name in self.GetBaseTypes(): - array.baseType.setcontent(PLCOpenParser.CreateElement( + baseType.setcontent(PLCOpenParser.CreateElement( base_type_name.lower() if base_type_name in ["STRING", "WSTRING"] else base_type_name, "dataType")) @@ -2181,7 +2184,7 @@ if pou is not None: return self.GetPouInterfaceReturnType(pou, tree, debug) elif words[0] == 'T': - return "BOOL" + return ["BOOL", ([], [])] return None # Change the edited element text @@ -2315,7 +2318,7 @@ new_id = {} try: - instances, error = LoadPouInstances(text.encode("utf-8"), bodytype) + instances, error = LoadPouInstances(text, bodytype) except: 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) if pou is not None: - 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)) + return search_results return [] #------------------------------------------------------------------------------- diff -r a375e31bf312 -r c1298e7ffe3a PLCGenerator.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 if single is not None: + if len(single) == 0: + 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]==']' : SNGLKW = "MULTI" else: @@ -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() + if not connections: + 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 connector = element if connector is not None: undefined = [instance.connectionPointOut, connector.connectionPointIn] @@ -794,7 +803,8 @@ for connection in related: self.ConnectionTypes[connection] = var_type else: - 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 @@ if block_infos is None: block_infos = self.GetBlockType(block_type) if block_infos is None: - 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) try: self.GenerateBlock(instance, block_infos, body, None) except ValueError, e: @@ -1088,7 +1098,8 @@ self.Program += JoinList([(", ", ())], vars) self.Program += [(");\n", ())] else: - 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: output_parameter = "" if name: - blockname = "%s(%s)" % (name, type) + blockname = "{a1}({a2})".format(a1 = name, a2 = type) else: blockname = 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) + raise ValueError, msg def GeneratePaths(self, connections, body, order = False, to_inout = False): paths = [] @@ -1199,7 +1211,8 @@ if block_infos is None: block_infos = self.GetBlockType(block_type) if block_infos is None: - 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 try: paths.append(str(self.GenerateBlock(next, block_infos, body, connection, order, to_inout))) except ValueError, e: @@ -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 connector = instance if connector is not None: connections = connector.connectionPointIn.getconnections() @@ -1224,7 +1238,8 @@ self.ComputedConnectors[name] = expression paths.append(str(expression)) else: - 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): + pname = pou.getname() + 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: instances = [] connections = jump.connectionPointIn.getconnections() @@ -1576,7 +1595,9 @@ elif len(transition_infos["from"]) == 1: self.Program += transition_infos["from"][0] else: - 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] else: - 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"]: diff -r a375e31bf312 -r c1298e7ffe3a PLCOpenEditor.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import os, sys, platform, time, traceback, getopt +import version beremiz_dir = os.path.dirname(os.path.realpath(__file__)) @@ -60,7 +61,11 @@ # Create wxApp (Need to create App before internationalization because of # Windows) - app = wx.PySimpleApp() + if wx.VERSION >= (3, 0, 0): + app = wx.App() + else: + app = wx.PySimpleApp() + 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) result = None @@ -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) if result is not None: - self.ShowErrorMessage( - _("PLC syntax error at line %d:\n%s") % result) + (num, line) = 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 @@ dialog.Destroy() if result is not None: - self.ShowErrorMessage( - _("PLC syntax error at line %d:\n%s") % result) + (num, line) = 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) def SaveProject(self): result = self.Controler.SaveXMLFile() @@ -394,16 +406,17 @@ dlg = wx.SingleChoiceDialog(None, _(""" -An error has occurred. - -Click OK to save an error report. +An unhandled exception (bug) occured. Bug report saved at : +(%s) Please be kind enough to send this file to: -edouard.tisserant@gmail.com - -Error: -""") + - str(e_type) + _(" : ") + str(e_value), +beremiz-devel@lists.sourceforge.net + +You should now restart program. + +Traceback: +""") % bug_report_path + + repr(e_type) + " : " + repr(e_value), _("Error"), trcbck_lst) try: @@ -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) diff -r a375e31bf312 -r c1298e7ffe3a POULibrary.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 weakref import ref class POULibrary: diff -r a375e31bf312 -r c1298e7ffe3a ProjectController.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 @@ def GetAddMenuItems(): return ExtractMenuItemsFromCatalog(features.catalog) +class Iec2CSettings(): + def __init__(self): + 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): + path="" + paths=[ + os.path.join(base_folder, "matiec", "lib", "C"), + os.path.join(base_folder, "matiec", "lib") ] + for p in paths: + filename=os.path.join(p, "iec_types.h") + if (os.path.isfile(filename)): + path = p + break + return path + + def findSupportedOptions(self): + buildcmd = "\"%s\" -h"%(self.iec2c) + options =["-f", "-l", "-p"] + + buildopt = "" + try: + # 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() + except Exception,e: + return buildopt + + for opt in options: + if opt in result: + buildopt = buildopt + " " + opt + return buildopt + + def getCmd(self): + return self.iec2c + + def getOptions(self): + if self.iec2c_buildopts is None: + self.iec2c_buildopts = self.findSupportedOptions() + return self.iec2c_buildopts + + def getLibPath(self): + return self.ieclib_path + + def getLibCPath(self): + 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.DebugTicks = [] 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_datas = {} self.IECdebug_lock = Lock() @@ -204,10 +278,10 @@ return self def GetIECLibPath(self): - return self.ieclib_c_path + return iec2c_cfg.getLibCPath() def GetIEC2cPath(self): - return self.iec2c_path + return iec2c_cfg.getCmd() def GetCurrentLocation(self): return () @@ -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 # Load PLCOpen file error = self.OpenXMLFile(plc_file) if error is not None: 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)) else: - return error + return error, False 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() if result: - return result + return result, False #Load and init all the children self.LoadChildren() self.RefreshConfNodesBlockLists() - - if os.path.exists(self._getBuildPath()): - self.EnableMethod("_Clean", True) - - if os.path.isfile(self._getIECcodepath()): - self.ShowMethod("_showIECcode", True) - - self.UpdateMethodsFromPLCStatus() - - return None + self.UpdateButtons() + return None, False def RecursiveConfNodeInfos(self, confnode): values = [] @@ -399,6 +465,21 @@ self.ClearChildren() self.ResetAppFrame(None) + 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) + dialog.ShowModal() + return False + else: + 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 + return True + def SaveProject(self, from_project_path=None): if self.CheckProjectPathPerm(False): if from_project_path is not None: @@ -423,9 +504,10 @@ if answer == wx.ID_OK: 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) return True return False @@ -605,12 +687,15 @@ plc_file.close() return True + + 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\""%( - self.iec2c_path, - self.ieclib_path, + buildcmd = "\"%s\" %s -I \"%s\" -T \"%s\" \"%s\""%( + iec2c_cfg.getCmd(), + iec2c_cfg.getOptions(), + iec2c_cfg.getLibPath(), buildpath, self._getIECcodepath()) @@ -679,7 +764,7 @@ # Keep track of generated C files for later use by self.CTNGenerate_C self.PLCGeneratedCFiles = C_files # compute CFLAGS for plc - self.plcCFLAGS = '"-I%s" -Wno-unused-function'%self.ieclib_c_path + self.plcCFLAGS = '"-I%s" -Wno-unused-function'%iec2c_cfg.getLibCPath() return True def GetBuilder(self): @@ -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): os.mkdir(buildpath) - # There is something to clean - self.EnableMethod("_Clean", True) self.logger.flush() self.logger.write(_("Start build in %s\n") % buildpath) # Generate SoftPLC IEC code IECGenRes = self._Generate_SoftPLC() - self.ShowMethod("_showIECcode", True) + self.UpdateButtons() # If IEC code gen fail, bail out. if not IECGenRes: @@ -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) + start = (row, 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) + end = (row, col) + if self.AppFrame is not None: self.AppFrame.ShowError(infos, start, end) @@ -1068,6 +1157,7 @@ except: 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())) else: self.logger.write_error(_("Build directory already clean\n")) - self.ShowMethod("_showIECcode", False) - self.EnableMethod("_Clean", False) # kill the builder self._builder = None self.CompareLocalAndRemotePLC() - + self.UpdateButtons() + + 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 log_count: if self.AppFrame is not None: self.AppFrame.LogViewer.SetLogCounters(log_count) def UpdateMethodsFromPLCStatus(self): + updated = False status = None if self._connector is not None: PLCstatus = self._connector.GetPLCstatus() @@ -1203,15 +1303,39 @@ self.ShowMethod(*args) self.previous_plcstate = status if self.AppFrame is not None: + updated = True 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) else: 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) + return updated + + def GetTextStatus(self, status): + msgs = { + "Started": _("Started"), + "Stopped": _("Stopped"), + "Empty": _("Empty"), + "Broken": _("Broken"), + "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: # Start the status Timer + wx.Yield() self.StatusTimer.Start(milliseconds=500, oneShot=False) else: if self.StatusTimer is not None: @@ -1654,6 +1779,7 @@ self.logger.write(_("Transfer completed successfully.\n")) else: self.logger.write_error(_("Transfer failed\n")) + self.HidePLCProgress() else: self.logger.write_error(_("No PLC to transfer (did build succeed ?)\n")) diff -r a375e31bf312 -r c1298e7ffe3a c_ext/CFileEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import wx.stc as stc diff -r a375e31bf312 -r c1298e7ffe3a c_ext/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 c_ext import * diff -r a375e31bf312 -r c1298e7ffe3a c_ext/c_ext.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import os @@ -99,7 +122,7 @@ cfile.write(text) cfile.close() - 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 diff -r a375e31bf312 -r c1298e7ffe3a canfestival/NetworkEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import wx diff -r a375e31bf312 -r c1298e7ffe3a canfestival/SlaveEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import wx diff -r a375e31bf312 -r c1298e7ffe3a canfestival/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 * diff -r a375e31bf312 -r c1298e7ffe3a canfestival/canfestival.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os, sys, shutil base_folder = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) diff -r a375e31bf312 -r c1298e7ffe3a canfestival/config_utils.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 types import * @@ -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 # Get the entry info subentry_infos = node.GetSubentryInfos(index, subindex) @@ -369,19 +371,23 @@ if sizelocation == "X" and len(loc) > 3: numbit = 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 else: numbit = None 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} else: - 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) # Get the entry info 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 diff -r a375e31bf312 -r c1298e7ffe3a connectors/PYRO/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +# 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. + import Pyro import Pyro.core import Pyro.util @@ -83,7 +87,7 @@ ip = str(socket.inet_ntoa(i.getAddress())) port = str(i.getPort()) 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)) location = newlocation r.close() except Exception, msg: @@ -108,10 +112,10 @@ try: 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) except Exception, e: # confnodesroot.logger.write_error(traceback.format_exc()) errmess = ''.join(Pyro.util.getPyroTraceback(e)) diff -r a375e31bf312 -r c1298e7ffe3a connectors/WAMP/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +# 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, *args,**kwargs) except TransportLost, e: - confnodesroot.logger.write_error("Connection lost!\n") + confnodesroot.logger.write_error(_("Connection lost!\n")) confnodesroot._SetConnector(None) except Exception,e: errmess = traceback.format_exc() diff -r a375e31bf312 -r c1298e7ffe3a connectors/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +# 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. # Package initialisation diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomEditableListBox.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import wx.gizmos diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomGrid.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import wx.grid @@ -37,8 +37,8 @@ self.UpButton = None self.DownButton = None - 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() diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomStyledTextCtrl.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# 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. + import wx import wx.stc diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomTable.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 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. -# -#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 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. import wx import wx.grid diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomToolTip.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a controls/CustomTree.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. # -#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. +# Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD # -#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 +# 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. import wx import wx.lib.agw.customtreectrl as CT diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/DebugVariableGraphicViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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) return AddText - + + def SetAxesColor(self, color): + if LooseVersion(matplotlib.__version__) >= LooseVersion("1.5.0"): + self.Axes.set_prop_cycle(cycler('color',color)) + else: + self.Axes.set_color_cycle(color) + def ResetGraphics(self): """ Reset figure and graphical elements displayed in it @@ -987,7 +999,7 @@ # Add 3D projection if graph is in 3D if self.Is3DCanvas(): 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 # rotated @@ -1002,7 +1014,7 @@ else: 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) - self.bitmap.UseAlpha() + if wx.VERSION < (3, 0, 0): + self.bitmap.UseAlpha() # Create DC for rendering graphics in bitmap destDC = wx.MemoryDC() diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/DebugVariableItem.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#Copyright (C) 2012: 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 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. -# -#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 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. import numpy import binascii diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/DebugVariablePanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import math @@ -50,10 +50,10 @@ # List of values possible for graph range # Format is [(time_in_plain_text, value_in_nanosecond),...] RANGE_VALUES = \ - [("%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 SCROLLBAR_UNIT = 10 @@ -291,6 +291,7 @@ DebugViewer.__init__(self, producer, True) self.SetSizer(main_sizer) + self.SetTickTime() def SetTickTime(self, ticktime=0): """ @@ -561,20 +562,20 @@ else: tick = None if tick is not None: - self.TickLabel.SetLabel("Tick: %d" % tick) + self.TickLabel.SetLabel(label=_("Tick: %d") % tick) tick_duration = int(tick * self.Ticktime) not_null = False duration = "" - 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 not_null = True - duration += "%gms" % (float(tick_duration % SECOND) / MILLISECOND) + duration += _("%03gms") % (float(tick_duration % SECOND) / MILLISECOND) self.TickTimeLabel.SetLabel("t: %s" % duration) else: self.TickLabel.SetLabel("") diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/DebugVariableTextViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#Copyright (C) 2012: 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 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. -# -#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 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 types import TupleType diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/DebugVariableViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/GraphButton.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx diff -r a375e31bf312 -r c1298e7ffe3a controls/DebugVariablePanel/__init__.py --- 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 +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 diff -r a375e31bf312 -r c1298e7ffe3a controls/DurationCellEditor.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -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 if changed: self.Table.SetValueByName(row, self.Colname, duration) self.CellControl.Disable() return changed + if wx.VERSION >= (3, 0, 0): + def EndEdit(self, row, col, grid, oldval): + return self.EndEditInternal(row, col, grid, oldval) + else: + def EndEdit(self, row, col, grid): + oldval = self.Table.GetValueByName(row, self.Colname) + return self.EndEditInternal(row, col, grid, oldval) + def SetSize(self, rect): self.CellControl.SetDimensions(rect.x + 1, rect.y, rect.width, rect.height, diff -r a375e31bf312 -r c1298e7ffe3a controls/EnhancedStatusBar.py --- /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 +# Python Code By: +# +# 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 +# +# +# TODO List/Caveats +# +# 1. Some Requests/Features To Add? +# +# +# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please +# Write To Me At: +# +# +# andrea.gavana@agip.it +# andrea_gavan@tin.it +# +# Or, Obviously, To The wxPython Mailing List!!! +# +# +# licensed under wxWidgets License (GPL compatible) +# End Of Comments +# --------------------------------------------------------------------------- # + +""" Description: + +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. + + +What It Can Do: + +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 + ESB_ALIGN_RIGHT; + - varticalalignment: This Specify The Vertical Alignment For Your Widget, + And Can Be ESB_EXACT_FIT, ESB_ALIGN_CENTER_VERTICAL, ESB_ALIGN_BOTTOM And + ESB_ALIGN_LEFT; + +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 + +""" + +import wx + +# Horizontal Alignment Constants +ESB_ALIGN_CENTER_VERTICAL = 1 +ESB_ALIGN_TOP = 2 +ESB_ALIGN_BOTTOM = 3 + +# Vertical Alignment Constants +ESB_ALIGN_CENTER_HORIZONTAL = 11 +ESB_ALIGN_LEFT = 12 +ESB_ALIGN_RIGHT = 13 + +# Exact Fit (Either Horizontal Or Vertical Or Both) Constant +ESB_EXACT_FIT = 20 + + +# --------------------------------------------------------------- +# 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, + style=wx.ST_SIZEGRIP, + name="EnhancedStatusBar") + """ + + wx.StatusBar.__init__(self, parent, id, style, name) + + self._items = {} + self._curPos = 0 + self._parent = parent + + 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)) + else: + 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: + + xpos = rect.x - 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)) + else: + 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)) + else: + 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)) + else: + 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])) + + + if event is not None: + event.Skip() + + + def AddWidget(self, widget, horizontalalignment=ESB_ALIGN_CENTER_HORIZONTAL, + verticalalignment=ESB_ALIGN_CENTER_VERTICAL, pos = -1): + """Add A Widget To The EnhancedStatusBar. + + Parameters: + + - 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 + The StatusBar Field; + 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; + + - verticalalignment: + 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 + The StatusBar Field; + 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 pos == -1: + pos = self._curPos + self._curPos += 1 + + 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"' \ + '"ESB_EXACT_FIT"' + + 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"' \ + '"ESB_EXACT_FIT"' + + + try: + self.RemoveChild(self._items[pos].widget) + self._items[pos].widget.Destroy() + except KeyError: pass + + self._items[pos] = EnhancedStatusBarItem(widget, pos, horizontalalignment, verticalalignment) + + wx.CallAfter(self.OnSize, None) diff -r a375e31bf312 -r c1298e7ffe3a controls/FolderTree.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#Copyright (C) 2013: 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 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. -# -#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 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 +# +# 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. import os diff -r a375e31bf312 -r c1298e7ffe3a controls/LibraryPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -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 # defined diff -r a375e31bf312 -r c1298e7ffe3a controls/LocationCellEditor.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -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') changed = loc != old_loc if changed: self.Table.SetValueByName(row, 'Location', loc) self.Table.SetValueByName(row, 'Type', self.CellControl.GetVarType()) self.CellControl.Disable() return changed + + if wx.VERSION >= (3, 0, 0): + def EndEdit(self, row, col, grid, oldval): + return self.EndEditInternal(row, col, grid, oldval) + else: + def EndEdit(self, row, col, grid): + old_loc = self.Table.GetValueByName(row, 'Location') + return self.EndEditInternal(row, col, grid, old_loc) def SetSize(self, rect): self.CellControl.SetDimensions(rect.x + 1, rect.y, diff -r a375e31bf312 -r c1298e7ffe3a controls/LogViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ dc.EndDrawing() event.Skip() -BUTTON_SIZE = (30, 15) +BUTTON_SIZE = (70, 15) class LogButton(): diff -r a375e31bf312 -r c1298e7ffe3a controls/PouInstanceVariablesPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a controls/ProjectPropertiesPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#Copyright (C) 2012: 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 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. -# -#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 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. import wx @@ -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) diff -r a375e31bf312 -r c1298e7ffe3a controls/SearchResultPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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 types import TupleType @@ -232,28 +232,15 @@ break if element_type == ITEM_RESOURCE: search_results_tree_children.append(element_infos) - else: - _tagname = self.ParentWindow.Controler.ComputePouName(words[1]) - _element_type = self.ParentWindow.Controler.GetPouType(words[1]) - - _element_infos = {"name": words[1], - "type": _element_type, - "data": _tagname, - "text": None, - "matches": 1, - "children": [element_infos]} - - search_results_tree_children.append(_element_infos) - else: search_results_tree_children.append(element_infos) if matches_number < 2: - header_format = _("'%s' - %d match in project") + header_format = _("'{a1}' - {a2} match in project") else: - header_format = _("'%s' - %d matches in project") - - self.HeaderLabel.SetLabel(header_format % (self.Criteria["raw_pattern"], matches_number)) + header_format = _("'{a1}' - {a2} matches in project") + + self.HeaderLabel.SetLabel(header_format.format(a1 = self.Criteria["find_pattern"], a2 = matches_number)) self.ResetButton.Enable(True) if matches_number > 0: @@ -337,6 +324,7 @@ search_results = [data] else: 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) diff -r a375e31bf312 -r c1298e7ffe3a controls/TextCtrlAutoComplete.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 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. -# -#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 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. import wx import cPickle @@ -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)) else: @@ -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()))) event.Skip() class TextCtrlAutoComplete(wx.TextCtrl): diff -r a375e31bf312 -r c1298e7ffe3a controls/VariablePanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import re @@ -144,6 +144,14 @@ def GetOldValue(self): return self.old_value + 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"]: + row_edit = True; + return row_edit + def _updateColAttrs(self, grid): """ wx.grid.Grid -> update the column attributes to add the @@ -171,7 +179,7 @@ editor.SetParameters(",".join(map(_, options))) else: 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) if colname == "Name": 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) message = None element_type = self.ParentWindow.ElementType try: @@ -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 message is None: 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) else: 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) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -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"): + if _GetRowEdit(row): self.Values.remove(self.Table.GetRow(row)) self.SaveValues() if self.ElementType == "resource": @@ -603,6 +613,14 @@ return row setattr(self.VariablesGrid, "_MoveRow", _MoveVariable) + def _GetRowEdit(row): + row_edit = False + if self: + row_edit = self.Table.GetValueByName(row, "Edit") + bodytype = self.Controler.GetEditedElementBodyType(self.TagName) + row_edit = row_edit or (bodytype in ["ST", "IL"]) + return row_edit + def _RefreshButtons(): if self: table_length = len(self.Table.data) @@ -611,7 +629,7 @@ row = 0 if table_length > 0: 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")) diff -r a375e31bf312 -r c1298e7ffe3a controls/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. # Package initialization diff -r a375e31bf312 -r c1298e7ffe3a dialogs/AboutDialog.py --- /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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. +""" + +import os +import sys +import time +import wx +from wx.lib.agw.hyperlink import HyperLinkCtrl + + +#---------------------------------------------------------------------- + +class AboutDialog(wx.Dialog): + """ + A replacement About Dialog for Windows, as it uses a generic frame that + well...sucks. + """ + def __init__(self, parent, info): + title = _("About") + " " + info.Name + wx.Dialog.__init__(self, parent, title=title) + self.info = info + + if parent and parent.GetIcon(): + self.SetIcon(parent.GetIcon()) + + image = None + if self.info.Icon: + 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) + description.Wrap(400) + 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) + font.SetPointSize(18) + name.SetFont(font) + + 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) + if image: + 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.Layout() + self.Fit() + self.Centre() + self.Show(True) + 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")) + close.SetDefault() + + 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) + btnSizer.Add(close) + + 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.SetSizer(sizer) + self.Layout() + self.Show() + 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) + btnSizer.Add(close) + + 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.SetSizer(sizer) + self.Layout() + self.Show() + self.SetEscapeId(close.GetId()) + + close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) + +#---------------------------------------------------------------------- + +def ShowAboutDialog(parent, info): + if os.name == "nt": + AboutDialog(parent, info) + else: + wx.AboutBox(info) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/ActionBlockDialog.py --- 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 @@ # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import wx import wx.grid diff -r a375e31bf312 -r c1298e7ffe3a dialogs/ArrayTypeDialog.py --- 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 @@ # -*- coding: utf-8 -*- -#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 re 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) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/BlockPreviewDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#Copyright (C) 2013: 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 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. -# -#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 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 +# +# 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. import wx @@ -300,4 +300,4 @@ """ self.RefreshPreview() event.Skip() - \ No newline at end of file + diff -r a375e31bf312 -r c1298e7ffe3a dialogs/BrowseLocationsDialog.py --- 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 @@ -# -#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 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. -# -#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 +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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.# import os diff -r a375e31bf312 -r c1298e7ffe3a dialogs/BrowseValuesLibraryDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx diff -r a375e31bf312 -r c1298e7ffe3a dialogs/ConnectionDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import wx @@ -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')) # Init common sizers 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 + diff -r a375e31bf312 -r c1298e7ffe3a dialogs/DiscoveryDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 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. -# -#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 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. import socket import wx @@ -61,7 +62,7 @@ def _init_coll_ButtonGridSizer_Growables(self, parent): parent.AddGrowableCol(0) parent.AddGrowableCol(1) - parent.AddGrowableRow(1) + parent.AddGrowableRow(0) def _init_sizers(self): 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) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/DurationEditorDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 re @@ -148,9 +148,9 @@ def OnOK(self, event): errors = [] - 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"))]: try: value = float(control.GetValue()) except ValueError, e: diff -r a375e31bf312 -r c1298e7ffe3a dialogs/FBDBlockDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import re diff -r a375e31bf312 -r c1298e7ffe3a dialogs/FBDVariableDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import wx @@ -287,4 +287,4 @@ # Call BlockPreviewDialog function BlockPreviewDialog.RefreshPreview(self) - \ No newline at end of file + diff -r a375e31bf312 -r c1298e7ffe3a dialogs/FindInPouDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 +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| wx.CLOSE_BOX| wx.CLIP_CHILDREN| - wx.RESIZE_BORDER| - wx.STAY_ON_TOP) + wx.RESIZE_BORDER) + 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) + main_sizer.Fit(self) self.ParentWindow = parent self.Bind(wx.EVT_CLOSE, self.OnCloseFrame) - + self.infosPrev = {} + self.criteria = {} self.FindPattern.SetFocus() self.RefreshButtonsState() @@ -126,17 +138,41 @@ self.Hide() event.Skip() + def OnEscapeKey(self, event): + keycode = event.GetKeyCode() + if keycode == wx.WXK_ESCAPE: + self.OnCloseButton(event) + else: + event.Skip() + def OnFindPatternChanged(self, event): self.RefreshButtonsState() event.Skip() + def SetStatusText(self, msg): + self.StatusLabel.SetLabel(msg) + self.Layout() + def OnFindButton(self, event): infos = { "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()], - infos) + "regular_expression": self.RegularExpressions.GetValue(), + "filter": "all"} + + if self.infosPrev != infos: + self.infosPrev = infos + message = "" + try: + self.criteria = infos + CompilePattern(self.criteria) + except: + self.criteria.clear() + 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()], + self.criteria) event.Skip() diff -r a375e31bf312 -r c1298e7ffe3a dialogs/ForceVariableDialog.py --- 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 @@ # -*- coding: utf-8 -*- -#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 re import datetime @@ -174,7 +174,7 @@ if value == "": 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) if message is not None: dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR) dialog.ShowModal() diff -r a375e31bf312 -r c1298e7ffe3a dialogs/LDElementDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -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") if type == "contact" else _("Edit Coil Values"))) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/LDPowerRailDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a dialogs/PouActionDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx @@ -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) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/PouDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx diff -r a375e31bf312 -r c1298e7ffe3a dialogs/PouNameDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a dialogs/PouTransitionDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx @@ -32,13 +32,18 @@ def GetTransitionLanguages(): _ = lambda x : x - 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) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/ProjectDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import wx @@ -51,10 +51,10 @@ def OnOK(self, event): values = self.ProjectProperties.GetValues() error = [] - 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"))]: if values[param] == "": error.append(name) if len(error) > 0: @@ -63,7 +63,7 @@ if i == 0: text += item elif i == len(error) - 1: - text += " and %s"%item + text += _(" and %s")%item else: text += ", %s"%item dialog = wx.MessageDialog(self, diff -r a375e31bf312 -r c1298e7ffe3a dialogs/SFCDivergenceDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -39,12 +40,13 @@ class SFCDivergenceDialog(BlockPreviewDialog): - def __init__(self, parent, controller, tagname): + def __init__(self, parent, controller, tagname, poss_div_types = None): """ Constructor @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, size=wx.Size(500, 300), @@ -58,19 +60,28 @@ self.LeftGridSizer.AddWindow(type_label, flag=wx.GROW) # Create radio buttons for selecting divergence type + divergence_buttons = [ + (SELECTION_DIVERGENCE, _('Selection Divergence')), + (SELECTION_CONVERGENCE, _('Selection Convergence')), + (SIMULTANEOUS_DIVERGENCE, _('Simultaneous Divergence')), + (SIMULTANEOUS_CONVERGENCE, _('Simultaneous Convergence'))] + poss_div_btns = [] + if poss_div_types is not None: + for val in poss_div_types: + poss_div_btns.append(divergence_buttons[val]) + else: + poss_div_btns = divergence_buttons self.TypeRadioButtons = {} first = True - for type, label in [ - (SELECTION_DIVERGENCE, _('Selection Divergence')), - (SELECTION_CONVERGENCE, _('Selection Convergence')), - (SIMULTANEOUS_DIVERGENCE, _('Simultaneous Divergence')), - (SIMULTANEOUS_CONVERGENCE, _('Simultaneous Convergence'))]: + focusbtn = None + 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 first = False # 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 # focus - 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 + diff -r a375e31bf312 -r c1298e7ffe3a dialogs/SFCStepDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -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')) # Init common sizers self._init_sizers(2, 0, 6, None, 2, 1) @@ -70,6 +71,8 @@ ("output", _("Output")), ("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 diff -r a375e31bf312 -r c1298e7ffe3a dialogs/SFCStepNameDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a dialogs/SFCTransitionDialog.py --- 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 @@ +#!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import wx @@ -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')) # Init common sizers self._init_sizers(2, 0, 8, None, 2, 1) diff -r a375e31bf312 -r c1298e7ffe3a dialogs/SearchInProjectDialog.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 re - +from plcopen.plcopen import * import wx -RE_ESCAPED_CHARACTERS = ".*+()[]?:|{}^$<>=-," - -def EscapeText(text): - text = text.replace('\\', '\\\\') - for c in RE_ESCAPED_CHARACTERS: - text = text.replace(c, '\\' + c) - return text - #------------------------------------------------------------------------------- # 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.infosPrev = {} + self.criteria = {} self.Pattern.SetFocus() + self.RefreshButtonsState() + + def RefreshButtonsState(self): + find_pattern = self.Pattern.GetValue() + self.FindButton.Enable(find_pattern != "") def GetCriteria(self): - raw_pattern = pattern = self.Pattern.GetValue() - if not self.CaseSensitive.GetValue(): - pattern = pattern.upper() - if not self.RegularExpression.GetValue(): - pattern = EscapeText(pattern) - criteria = { - "raw_pattern": raw_pattern, - "pattern": re.compile(pattern), + return self.criteria + + def FindPatternChanged(self, event): + self.RefreshButtonsState() + event.Skip() + + def OnScopeChanged(self, event): + self.ElementsList.Enable(self.OnlyElements.GetValue()) + event.Skip() + + def OnCloseButton(self, event): + self.EndModal(wx.ID_CANCEL) + + def OnEscapeKey(self, event): + keycode = event.GetKeyCode() + if keycode == wx.WXK_ESCAPE: + self.OnCloseButton(event) + else: + event.Skip() + + def OnFindButton(self, event): + message = None + infos = { + "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"] = [] + infos["filter"] = [] for index, (name, label) in enumerate(GetElementsChoices()): if self.ElementsList.IsChecked(index): - criteria["filter"].append(name) - return criteria - - def OnScopeChanged(self, event): - self.ElementsList.Enable(self.OnlyElements.GetValue()) - event.Skip() - - def OnOK(self, event): - message = None - if self.Pattern.GetValue() == "": - message = _("Form isn't complete. Pattern to search must be filled!") - else: - wrong_pattern = False - if self.RegularExpression.GetValue(): - try: - re.compile(self.Pattern.GetValue()) - except: - wrong_pattern = True - if wrong_pattern: + infos["filter"].append(name) + + if self.infosPrev != infos: + try: + self.criteria = infos + CompilePattern(self.criteria) + self.infosPrev = infos + except: + self.criteria.clear() message = _("Syntax error in regular expression of pattern to search!") if message is not None: diff -r a375e31bf312 -r c1298e7ffe3a dialogs/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. + # Package initialization diff -r a375e31bf312 -r c1298e7ffe3a doc/about.html --- 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 @@ -<HTML> -<BODY> -<CENTER> -<IMG SRC="../images/splash.png"> -<BR><BR> -<font size="3">Beremiz is an Open Source framework for automation.</font> -<BR><BR> -<a href="http://www.beremiz.org/">http://www.beremiz.org/</a> -<BR><BR> -<TABLE border="0"> - <TR> - <TD align="right" valign="top"> - Contributor : - </TD> - <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> - </TD> - </TR> -</TABLE> -</CENTER> -</BODY> -</HTML> \ No newline at end of file diff -r a375e31bf312 -r c1298e7ffe3a doc/plcopen_about.html --- 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 @@ -<HTML> -<BODY> -<CENTER> -<IMG SRC="../images/aboutlogo.png"> -<BR><BR> -<font size="3">The PLCopen Editor saves and loads XML projects,<BR>accordingly to PLCopen TC6-XML Schemes.</font> -<BR><BR> -More informations on : -<a href="http://www.beremiz.org/">http://www.beremiz.org/</a> -<BR><BR> -</CENTER> -</BODY> -</HTML> \ No newline at end of file diff -r a375e31bf312 -r c1298e7ffe3a docutil/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 dochtml import * from docpdf import * -from docsvg import * \ No newline at end of file +from docsvg import * diff -r a375e31bf312 -r c1298e7ffe3a docutil/dochtml.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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) except ImportError: - wx.MessageBox('Please point your browser at: %s' % url) \ No newline at end of file + wx.MessageBox('Please point your browser at: %s' % url) diff -r a375e31bf312 -r c1298e7ffe3a docutil/docpdf.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -53,7 +53,7 @@ if pagenum == None : os.system("%s -remote DS301 %s &"%(readerexepath, pdffile)) else: - 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): diff -r a375e31bf312 -r c1298e7ffe3a docutil/docsvg.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a editors/CodeFileEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import re import wx @@ -482,17 +506,11 @@ self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) self.SearchParams = search_params - criteria = { - "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"], - "filter": "all"} self.SearchResults = [ (start, end, SEARCH_RESULT_HIGHLIGHT) for start, end, text in - 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, diff -r a375e31bf312 -r c1298e7ffe3a editors/ConfTreeNodeEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import os import types @@ -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) if first: - sizer.AddSizer(staticboxsizer, border=5, - flag=wx.GROW|wx.TOP|wx.BOTTOM) - else: - sizer.AddSizer(staticboxsizer, border=5, - flag=wx.GROW|wx.BOTTOM) + flags |= wx.TOP + sizer.AddSizer(staticboxsizer, border=5, flag=flags) self.GenerateSizerElements(staticboxsizer, element_infos["children"], element_path) else: boxsizer = wx.FlexGridSizer(cols=3, rows=1) boxsizer.AddGrowableCol(1) + flags = (wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT) if first: - sizer.AddSizer(boxsizer, border=5, - flag=wx.GROW|wx.ALL) - else: - sizer.AddSizer(boxsizer, border=5, - flag=wx.GROW|wx.LEFT|wx.RIGHT|wx.BOTTOM) - + flags |= wx.TOP + 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) else: @@ -456,6 +474,8 @@ textctrl.Bind(wx.EVT_TEXT_ENTER, callback) textctrl.Bind(wx.EVT_KILL_FOCUS, callback) first = False + sizer.Layout() + self.RefreshScrollbars() def GetItemChannelChangedFunction(self, dir): diff -r a375e31bf312 -r c1298e7ffe3a editors/DataTypeEditor.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 re from types import TupleType @@ -74,10 +74,11 @@ return row + 1 colname = self.GetColLabelValue(col, False) value = self.data[row].get(colname, "") + if colname == "Type" and isinstance(value, TupleType): if value[0] == "array": return "ARRAY [%s] OF %s" % (",".join(map(lambda x : "..".join(x), value[2])), value[1]) - return str(value) + return value def SetValue(self, row, col, value): if col < len(self.colnames): diff -r a375e31bf312 -r c1298e7ffe3a editors/DebugViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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 threading import Lock, Timer from time import time as gettime diff -r a375e31bf312 -r c1298e7ffe3a editors/EditorPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -79,7 +79,7 @@ self.ParentWindow.EditProjectElement(None, self.GetTagName(), True) def GetTitle(self): - return "-".join(self.TagName.split("::")[1:]) + return ".".join(self.TagName.split("::")[1:]) def GetIcon(self): return self.Icon diff -r a375e31bf312 -r c1298e7ffe3a editors/FileManagementPanel.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 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. -# -#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 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. import os import shutil @@ -211,4 +211,4 @@ dragSource = wx.DropSource(self) dragSource.SetData(data) dragSource.DoDragDrop() - \ No newline at end of file + diff -r a375e31bf312 -r c1298e7ffe3a editors/IECCodeViewer.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 @@ TextViewer.Paste(self) 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)] diff -r a375e31bf312 -r c1298e7ffe3a editors/LDViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import time diff -r a375e31bf312 -r c1298e7ffe3a editors/ProjectNodeEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. import wx @@ -68,4 +91,4 @@ def Redo(self): self.Controler.LoadNext() self.ParentWindow.CloseTabsWithoutModel() - \ No newline at end of file + diff -r a375e31bf312 -r c1298e7ffe3a editors/ResourceEditor.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import wx.lib.buttons @@ -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") if task in tasklist: tasklist.remove(task) if len(tasklist) > 0: - old_name = tasklist[0] + 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() + if old_name == name: self.InstancesTable.SetValueByName(i, "Task", new_name) self.RefreshModel() colname = self.TasksTable.GetColLabelValue(col, False) diff -r a375e31bf312 -r c1298e7ffe3a editors/SFCViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 * import wx from Viewer import * +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): + SFC_StandardRules = { + # 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), + ("SFC_Jump", SOUTH), + ("FBD_Block", EAST), + ("FBD_Variable", EAST), + ("FBD_Connector", EAST), + ("LD_Contact", EAST), + ("LD_PowerRail", EAST), + ("LD_Coil", EAST)], + + SELECTION_DIVERGENCE: [("SFC_Transition", SOUTH)], + + SELECTION_CONVERGENCE: [("SFC_Step", SOUTH), + ("SFC_Jump", SOUTH)], + + SIMULTANEOUS_DIVERGENCE: [("SFC_Step", SOUTH)], + + SIMULTANEOUS_CONVERGENCE: [("SFC_Transition", SOUTH)], + + "SFC_Jump": [], + + "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) event.Skip() + def GetBlockName(self, block): + blockName = block.__class__.__name__ + if blockName == "SFC_Divergence": + blockName = block.Type + return blockName + + # 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]: + if end in val: + return True + return False + return True + #------------------------------------------------------------------------------- # Keyboard event functions #------------------------------------------------------------------------------- diff -r a375e31bf312 -r c1298e7ffe3a editors/TextViewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 re from types import * @@ -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 @@ blockinputs = None if values[1] != "function": if blockname == "": - 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() else: + event.SetDragText("") return dialog.Destroy() if blockname.upper() in [name.upper() for name in self.Controler.GetProjectPouNames(self.Debug)]: @@ -287,7 +289,7 @@ dlg = wx.TextEntryDialog( self.ParentWindow, _("Confirm or change variable name"), - 'Variable Drop', var_name) + _('Variable Drop'), var_name) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -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( self.ParentWindow, _("Confirm or change variable name"), - 'Variable Drop', var_name) + _('Variable Drop'), var_name) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -361,7 +363,7 @@ dlg = wx.TextEntryDialog( self.ParentWindow, _("Confirm or change variable name"), - 'Variable Drop', var_name) + _('Variable Drop'), var_name) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -412,7 +414,7 @@ self.Colourise(0, -1) def RefreshJumpList(self): - if self.TextSyntax != "IL": + if self.TextSyntax == "IL": self.Jumps = [jump.upper() for jump in LABEL_MODEL.findall(self.GetText())] self.Colourise(0, -1) @@ -576,7 +578,7 @@ self.ContextStack = [] current_context = self.Variables if state == COMMENT: - self.SetStyling(current_pos - last_styled_pos + 1, STC_PLC_COMMENT) + self.SetStyling(current_pos - last_styled_pos, STC_PLC_COMMENT) elif state == NUMBER: self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER) elif state == WORD: @@ -593,33 +595,33 @@ elif word in self.EnumeratedValues: self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER) else: - 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) else: - 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: + if (state != DPRAGMA) and (state != COMMENT): state = SPACE line = "" line_number += 1 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 if state == WORD: current_context = self.Variables state = COMMENT 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 if state == WORD: current_context = self.Variables state = PRAGMA 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 state = DPRAGMA elif state == COMMENT: @@ -627,18 +629,22 @@ self.SetStyling(current_pos - last_styled_pos + 2, STC_PLC_COMMENT) last_styled_pos = current_pos + 1 state = SPACE + if len(self.CallStack) > 0: + current_call = self.CallStack.pop() + else: + current_call = None elif state == PRAGMA: if line.endswith("}"): - self.SetStyling(current_pos - last_styled_pos, 31) + self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos state = SPACE elif state == DPRAGMA: if line.endswith("}}"): - 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 state = SPACE 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 if state == WORD: current_context = self.Variables @@ -661,7 +667,7 @@ word = "#" state = WORD elif state == SPACE: - self.SetStyling(current_pos - last_styled_pos, 31) + self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) word = char last_styled_pos = current_pos state = WORD @@ -669,7 +675,7 @@ word += char elif char in NUMBERS or char == '.' and state != WORD: if state == SPACE: - self.SetStyling(current_pos - last_styled_pos, 31) + self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) last_styled_pos = current_pos state = NUMBER elif state == WORD and char != '.': @@ -692,7 +698,7 @@ elif word in self.EnumeratedValues: self.SetStyling(current_pos - last_styled_pos, STC_PLC_NUMBER) else: - 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) else: - self.SetStyling(current_pos - last_styled_pos, 31) + self.SetStyling(current_pos - last_styled_pos, STC_PLC_EMPTY) else: - self.SetStyling(current_pos - start_pos, 31) + self.SetStyling(current_pos - start_pos, STC_PLC_EMPTY) self.ShowHighlights(start_pos, end_pos) event.Skip() @@ -804,17 +810,10 @@ self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) self.SearchParams = search_params - criteria = { - "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"], - "filter": "all"} - self.SearchResults = [ (infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT) for infos, start, end, text in - self.Search(criteria)] + self.Search(search_params)] self.CurrentFindHighlight = None if len(self.SearchResults) > 0: @@ -895,14 +894,15 @@ key_handled = True elif key == wx.WXK_BACK: 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)) - key_handled = True + 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)) + key_handled = True if not key_handled: event.Skip() - elif key in NAVIGATION_KEYS: + else: event.Skip() def OnKillFocus(self, event): diff -r a375e31bf312 -r c1298e7ffe3a editors/Viewer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 re import math @@ -43,6 +43,7 @@ SCROLL_ZONE = 10 CURSORS = None +SFC_Objects = (SFC_Step, SFC_ActionBlock, SFC_Transition, SFC_Divergence, SFC_Jump) def ResetCursors(): global CURSORS @@ -146,6 +147,9 @@ specific_values.priority, id) return transition +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]) else: blockname = values[2] if len(values) > 3: @@ -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) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -331,7 +335,7 @@ dlg = wx.TextEntryDialog( self.ParentWindow.ParentWindow, _("Confirm or change variable name"), - 'Variable Drop', var_name) + _('Variable Drop'), var_name) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -353,7 +357,7 @@ dlg = wx.TextEntryDialog( self.ParentWindow.ParentWindow, _("Confirm or change variable name"), - 'Variable Drop', var_name) + _('Variable Drop'), var_name) dlg.SetValue(var_name) var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None dlg.Destroy() @@ -573,11 +577,11 @@ [ID_CLEAR_EXEC_ORDER, ID_RESET_EXEC_ORDER] = [wx.NewId() for i in xrange(2)] # Create menu items - 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)]) - - menu.AppendSeparator() + 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)]) + menu.AppendSeparator() 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 # Create a new Viewer @@ -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 else: 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): + blocks = [] + for block in self.Blocks.itervalues(): + if isinstance(block, FBD_Connector) and\ + block.GetType() == CONTINUATION and\ + block.GetName() == name: + blocks.append(block) + return blocks + def GetConnectorByName(self, name): for block in self.Blocks.itervalues(): if isinstance(block, FBD_Connector) and\ @@ -1462,12 +1475,24 @@ return None def FindBlockConnector(self, pos, direction = None, exclude = None): + result, error = self.FindBlockConnectorWithError(pos, direction, exclude) + return result + + def FindBlockConnectorWithError(self, pos, direction = None, exclude = None): + error = False + startblock = None for block in self.Blocks.itervalues(): - result = block.TestConnector(pos, direction, exclude) - if result: - return result - return None - + connector = block.TestConnector(pos, direction, exclude) + if connector: + 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): + connector = None + error = True + return connector, error + return None, error + def FindElementById(self, id): block = self.Blocks.get(id, None) if block is not None: @@ -2048,47 +2073,7 @@ self.SelectedElement.HighlightPoint(pos) self.RefreshBuffer() elif connector is None or self.SelectedElement.GetDragging(): - start_connector = self.SelectedElement.GetStartConnected() - start_direction = start_connector.GetDirection() - - items = [] - - if self.CurrentLanguage == "SFC" and start_direction == SOUTH: - items.extend([ - (_(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): - items.append( - (_(u'Action Block'), self.GetAddToWireMenuCallBack(self.AddNewActionBlock)) - ) - else: - items.extend([ - (_(u'Block'), self.GetAddToWireMenuCallBack(self.AddNewBlock)), - (_(u'Variable'), self.GetAddToWireMenuCallBack(self.AddNewVariable, True)), - (_(u'Connection'), self.GetAddToWireMenuCallBack(self.AddNewConnection)), - ]) - - if self.CurrentLanguage != "FBD": - items.append( - (_(u'Contact'), self.GetAddToWireMenuCallBack(self.AddNewContact)) - ) - if self.CurrentLanguage == "LD": - items.extend([ - (_(u'Coil'), self.GetAddToWireMenuCallBack(self.AddNewCoil)), - (_(u'Power Rail'), self.GetAddToWireMenuCallBack(self.AddNewPowerRail)), - ]) - if self.CurrentLanguage == "SFC": - items.append( - (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, True)) - ) - + items = self.GetPopupMenuItems() if len(items) > 0: 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: if self.DrawingWire: - 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): + return True + + def GetPopupMenuItems(self): + start_connector = self.SelectedElement.GetStartConnected() + start_direction = start_connector.GetDirection() + startblock = start_connector.GetParentBlock() + items = [] + if isinstance(startblock, SFC_Objects): + startblockname = self.GetBlockName(startblock) + poss_div_types = [] + + 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]) + else: + items.append(SFC_WireMenu_Buttons[endblock[0]]) + if len(poss_div_types) > 0: + items.append((_(u'Divergence'), self.GetAddToWireMenuCallBack(self.AddNewDivergence, + poss_div_types))) + elif start_direction == EAST: + items.extend([ + (_(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": + items.extend([ + (_(u'Coil'), self.GetAddToWireMenuCallBack(self.AddNewCoil)), + (_(u'Power Rail'), self.GetAddToWireMenuCallBack(self.AddNewPowerRail))]) + + if self.CurrentLanguage == "SFC": + items.append( + (_(u'Transition'), self.GetAddToWireMenuCallBack(self.AddNewTransition, True))) + else: + items.append( + (_(u'Variable'), self.GetAddToWireMenuCallBack(self.AddNewVariable, True))) + return items + #------------------------------------------------------------------------------- # 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 = wx.MouseEvent() - event.m_x, event.m_y = self.Editor.ScreenToClient(wx.GetMousePosition()) + event.x, event.y = self.Editor.ScreenToClient(wx.GetMousePosition()) dc = self.GetLogicalDC() 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), "input": True, - "output": False, + "output": True, "action":False} else: 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) + block.RefreshModel() + rect = rect.Union(block.GetRedrawRect()) + block.Refresh(rect) + step.SetName(new_name) + if values["input"]: step.AddInput() else: @@ -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())) + try: + indx = choices.index(jump.GetTarget()) + dialog.SetSelection(indx) + except ValueError: + pass + if dialog.ShowModal() == wx.ID_OK: value = dialog.GetStringSelection() rect = jump.GetRedrawRect(1, 1) @@ -3216,6 +3268,17 @@ if element not in elements: elements.append(element) step.Clean() + + if self.GetDrawingMode() == DRIVENDRAWING_MODE: + name = step.GetName().upper() + remove_jumps = [] + 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.DeleteJump(jump) + self.RemoveBlock(step) self.Controler.RemoveEditedElementInstance(self.TagName, step.GetId()) for element in elements: @@ -3399,22 +3462,16 @@ self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) self.SearchParams = search_params - criteria = { - "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"], - "filter": "all"} - self.SearchResults = [] blocks = [] - 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)) - else: - block = self.Blocks.get(infos[2]) - if block is not None: - 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)) + else: + block = self.Blocks.get(infos[2]) + if block is not None: + blocks.append((block, (infos[1:], start, end, SEARCH_RESULT_HIGHLIGHT))) blocks.sort(sort_blocks) self.SearchResults.extend([infos for block, infos in blocks]) self.CurrentFindHighlight = None diff -r a375e31bf312 -r c1298e7ffe3a features.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + libraries = [ ('Native', 'NativeLib.NativeLibrary'), ('Python', 'py_ext.PythonLibrary'), diff -r a375e31bf312 -r c1298e7ffe3a graphics/.cvsignore --- 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 @@ -*.pyc diff -r a375e31bf312 -r c1298e7ffe3a graphics/DebugDataConsumer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import datetime diff -r a375e31bf312 -r c1298e7ffe3a graphics/FBD_Objects.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 @@ -902,7 +902,15 @@ else: connectors["outputs"].append(self.Connector) return connectors - + + 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 def SetType(self, type): if type != self.Type: diff -r a375e31bf312 -r c1298e7ffe3a graphics/GraphicCommons.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 from math import * @@ -1351,19 +1351,35 @@ self.Edge = edge self.Negated = False + # 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): + inside = False; + check_point = (not exclude) and (direction is None or self.Direction == direction); + + if check_point: # 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) - return False + inside = rect.InsideXY(pt.x, pt.y); + + return inside # Draws the highlightment of this element if it is highlighted def DrawHighlightment(self, dc): @@ -1551,6 +1567,7 @@ self.OverEnd = False self.ComputingType = False self.Font = parent.GetMiniFont() + self.ErrHighlight = False def GetDefinition(self): 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.SetUserScale(1, 1) - 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 + else: + 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.DrawPolygon(polygon) + + # 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)] dc.DrawLines(lines) + # Draws the comment content y = self.Pos.y + 10 for idx, line in enumerate(self.Content.splitlines()): diff -r a375e31bf312 -r c1298e7ffe3a graphics/LD_Objects.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a graphics/RubberBand.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a graphics/SFC_Objects.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a graphics/ToolTipProducer.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 diff -r a375e31bf312 -r c1298e7ffe3a graphics/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. # Package initialisation @@ -29,4 +29,4 @@ from LD_Objects import * from SFC_Objects import * from RubberBand import RubberBand -from DebugDataConsumer import DebugDataConsumer \ No newline at end of file +from DebugDataConsumer import DebugDataConsumer diff -r a375e31bf312 -r c1298e7ffe3a i18n/Beremiz_ru_RU.po --- /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. +# +msgid "" +msgstr "" +"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" +"Language: ru_RU\n" +"MIME-Version: 1.0\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 +#, python-format +msgid "" +"\n" +"An unhandled exception (bug) occured. Bug report saved at :\n" +"(%s)\n" +"\n" +"Please be kind enough to send this file to:\n" +"beremiz-devel@lists.sourceforge.net\n" +"\n" +"You should now restart program.\n" +"\n" +"Traceback:\n" +msgstr "" +"\n" +"Произошла невоÑÑÑ‚Ð°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÐ¼Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° (bug). Отчет об ошибке Ñохранен в:\n" +"(%s)\n" +"\n" +"Будьте добры, отправьте Ñтот файл по адреÑу\n" +"beremiz-devel@lists.sourceforge.net\n" +"\n" +"Ð”Ð»Ñ Ð´Ð°Ð»ÑŒÐ½ÐµÐ¹ÑˆÐµÐ¹ работы перезапуÑтите программу.\n" +"\n" +"Traceback:\n" + +#: ../controls/VariablePanel.py:72 +msgid " External" +msgstr " Внешний" + +#: ../controls/VariablePanel.py:71 +msgid " InOut" +msgstr " Вход/Выход" + +#: ../controls/VariablePanel.py:71 +msgid " Input" +msgstr " Вход" + +#: ../controls/VariablePanel.py:72 +msgid " Local" +msgstr " Локальный" + +#: ../controls/VariablePanel.py:71 +msgid " Output" +msgstr " Выход" + +#: ../controls/VariablePanel.py:73 +msgid " Temp" +msgstr " Временный" + +#: ../dialogs/PouTransitionDialog.py:99 ../dialogs/ProjectDialog.py:66 +#: ../dialogs/PouActionDialog.py:91 ../dialogs/PouDialog.py:113 +#, python-format +msgid " and %s" +msgstr "и %s" + +#: ../ProjectController.py:1089 +msgid " generation failed !\n" +msgstr "Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð°Ñ Ð³ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ ÐºÐ¾Ð´Ð°!\n" + +#: ../plcopen/plcopen.py:881 +#, python-format +msgid "\"%s\" Data Type doesn't exist !!!" +msgstr "Тип данных \"%s\" не ÑущеÑтвует!!!" + +#: ../plcopen/plcopen.py:899 +#, python-format +msgid "\"%s\" POU already exists !!!" +msgstr "POU \"%s\" уже ÑущеÑтвует!!!" + +#: ../plcopen/plcopen.py:920 +#, python-format +msgid "\"%s\" POU doesn't exist !!!" +msgstr "POU \"%s\" не найден!!!" + +#: ../editors/Viewer.py:246 +#, python-format +msgid "\"%s\" can't use itself!" +msgstr "\"%s\" не может иÑпользовать Ñам ÑебÑ!!!" + +#: ../IDEFrame.py:1652 ../IDEFrame.py:1671 +#, python-format +msgid "\"%s\" config already exists!" +msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ \"%s\" уже ÑущеÑтвует!!!" + +#: ../plcopen/plcopen.py:467 +#, python-format +msgid "\"%s\" configuration already exists !!!" +msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ \"%s\" уже ÑущеÑтвует!!!" + +#: ../IDEFrame.py:1602 +#, python-format +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 +#, python-format +msgid "\"%s\" element for this pou already exists!" +msgstr "Ðлемент Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ \"%s\" уже ÑущеÑтвует в Ñтом POU!!!" + +#: ../Beremiz.py:994 +#, python-format +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 +#: ../IDEFrame.py:1593 +#, python-format +msgid "\"%s\" is a keyword. It can't be used!" +msgstr "\"%s\" ÑвлÑетÑÑ ÐºÐ»ÑŽÑ‡ÐµÐ²Ñ‹Ð¼ Ñловом и не может быть иÑпользован!" + +#: ../plcopen/plcopen.py:2412 +#, python-format +msgid "\"%s\" is an invalid value!" +msgstr "\"%s\" недопуÑтимое значение!" + +#: ../PLCOpenEditor.py:339 ../PLCOpenEditor.py:381 +#, python-format +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 +#, python-format +msgid "\"%s\" is not a valid identifier!" +msgstr "\"%s\" неверный идентификатор!" + +#: ../IDEFrame.py:2396 +#, python-format +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 +#: ../IDEFrame.py:1611 +#, python-format +msgid "\"%s\" pou already exists!" +msgstr "POU \"%s\" уже ÑущеÑтвует!" + +#: ../dialogs/SFCStepNameDialog.py:58 +#, python-format +msgid "\"%s\" step already exists!" +msgstr "Шаг \"%s\" уже ÑущеÑтвует!" + +#: ../editors/DataTypeEditor.py:550 +#, python-format +msgid "\"%s\" value already defined!" +msgstr "\"%s\" значение уже задано!" + +#: ../dialogs/ArrayTypeDialog.py:97 ../editors/DataTypeEditor.py:745 +#, python-format +msgid "\"%s\" value isn't a valid array dimension!" +msgstr "\"%s\" не ÑвлÑетÑÑ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð¾Ð¹ размерноÑтью Ð´Ð»Ñ Ð¼Ð°ÑÑива! " + +#: ../dialogs/ArrayTypeDialog.py:103 ../editors/DataTypeEditor.py:752 +#, python-format +msgid "" +"\"%s\" value isn't a valid array dimension!\n" +"Right value must be greater than left value." +msgstr "\"%s\" не ÑвлÑетÑÑ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ‚Ð½Ð¾Ð¹ размерноÑтью маÑÑива! Правое значение должно быть больше левого." + +#: ../PLCGenerator.py:1101 +#, python-brace-format +msgid "\"{a1}\" function cancelled in \"{a2}\" POU: No input connected" +msgstr "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ \"{a1}\" не иÑпользуетÑÑ Ð² POU \"{a2}\": входы не подключены" + +#: ../editors/Viewer.py:250 +#, python-brace-format +msgid "\"{a1}\" is already used by \"{a2}\"!" +msgstr "\"{a1}\" уже иÑпользуетÑÑ \"{a2}\"!" + +#: ../plcopen/plcopen.py:491 +#, python-brace-format +msgid "\"{a1}\" resource already exists in \"{a2}\" configuration !!!" +msgstr "РеÑÑƒÑ€Ñ \"{a1}\" уже ÑущеÑтвует в конфигурации \"{a2}\"!!!" + +#: ../plcopen/plcopen.py:509 +#, python-brace-format +msgid "\"{a1}\" resource doesn't exist in \"{a2}\" configuration !!!" +msgstr "РеÑÑƒÑ€Ñ \"{a1}\" отÑутÑтвует в конфигурации \"{a2}\"!!!" + +msgid "%(codefile_name)s" +msgstr "%(codefile_name)" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:578 +#, python-format +msgid "%03gms" +msgstr "%03gмÑ" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:569 +#, python-format +msgid "%dd" +msgstr "%dд" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:56 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:570 +#, python-format +msgid "%dh" +msgstr "%dч" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:55 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:571 +#, python-format +msgid "%dm" +msgstr "%dм" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:53 +#, python-format +msgid "%dms" +msgstr "%dмÑ" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:54 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:572 +#, python-format +msgid "%ds" +msgstr "%dc" + +#: ../PLCControler.py:1531 +#, python-format +msgid "%s Data Types" +msgstr "%s типы данных" + +#: ../PLCControler.py:1514 +#, python-format +msgid "%s POUs" +msgstr "%s POU" + +#: ../canfestival/SlaveEditor.py:69 ../canfestival/NetworkEditor.py:90 +#, python-format +msgid "%s Profile" +msgstr "%s профиль" + +#: ../plcopen/plcopen.py:1645 ../plcopen/plcopen.py:1652 +#: ../plcopen/plcopen.py:1664 ../plcopen/plcopen.py:1672 +#: ../plcopen/plcopen.py:1682 +#, python-format +msgid "%s body don't have instances!" +msgstr "Тело %s не Ñодержит ÑкземплÑров!" + +#: ../plcopen/plcopen.py:1700 ../plcopen/plcopen.py:1707 +#: ../plcopen/plcopen.py:1714 +#, python-format +msgid "%s body don't have text!" +msgstr "Тело %s не Ñодержит никакой текÑÑ‚!" + +#: ../IDEFrame.py:386 +msgid "&Add Element" +msgstr "&Добавить Ñлемент" + +#: ../dialogs/AboutDialog.py:65 ../dialogs/AboutDialog.py:113 +#: ../dialogs/AboutDialog.py:150 +msgid "&Close" +msgstr "&Закрыть" + +#: ../IDEFrame.py:356 +msgid "&Configuration" +msgstr "&КонфигурациÑ" + +#: ../IDEFrame.py:345 +msgid "&Data Type" +msgstr "&Типы данных" + +#: ../IDEFrame.py:390 +msgid "&Delete" +msgstr "&Удалить" + +#: ../IDEFrame.py:337 +msgid "&Display" +msgstr "&Вид" + +#: ../IDEFrame.py:336 +msgid "&Edit" +msgstr "&Редактировать" + +#: ../IDEFrame.py:335 +msgid "&File" +msgstr "&Файл" + +#: ../IDEFrame.py:347 +msgid "&Function" +msgstr "&Функции" + +#: ../IDEFrame.py:338 +msgid "&Help" +msgstr "&Помощь" + +#: ../dialogs/AboutDialog.py:64 +msgid "&License" +msgstr "&ЛицензиÑ" + +#: ../IDEFrame.py:351 +msgid "&Program" +msgstr "&Программы" + +#: ../PLCOpenEditor.py:125 +msgid "&Properties" +msgstr "&СвойÑтва" + +#: ../Beremiz.py:324 +msgid "&Recent Projects" +msgstr "&Ðедавние проекты" + +#: ../IDEFrame.py:353 +msgid "&Resource" +msgstr "&РеÑурÑÑ‹" + +#: ../controls/SearchResultPanel.py:239 +#, python-brace-format +msgid "'{a1}' - {a2} match in project" +msgstr "'{a1}'- {a2} Ñовпадений в проекте" + +#: ../controls/SearchResultPanel.py:241 +#, python-brace-format +msgid "'{a1}' - {a2} matches in project" +msgstr "'{a1}' - {a2} Ñовпадений в проекте" + +#: ../connectors/PYRO/__init__.py:90 +#, python-brace-format +msgid "'{a1}' is located at {a2}\n" +msgstr "'{a1}' находитÑÑ {a2}\n" + +#: ../controls/SearchResultPanel.py:291 +#, python-format +msgid "(%d matches)" +msgstr "(%d Ñовпадений)" + +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 ../PLCOpenEditor.py:399 +msgid ", " +msgstr ", " + +#: ../dialogs/PouTransitionDialog.py:101 ../dialogs/PouActionDialog.py:93 +#: ../dialogs/PouDialog.py:115 +#, python-format +msgid ", %s" +msgstr ", %s" + +#: ../PLCOpenEditor.py:394 +msgid ". " +msgstr ". " + +#: 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 "0 = reset" +msgstr "0 = ÑброÑ" + +msgid "1 = integrate, 0 = hold" +msgstr "1 = интегрировать, 0 = оÑтановка" + +#: ../controls/LogViewer.py:279 +msgid "1d" +msgstr "1 день" + +#: ../controls/LogViewer.py:280 +msgid "1h" +msgstr "1 чаÑ" + +#: ../controls/LogViewer.py:281 +msgid "1m" +msgstr "1 мин" + +#: ../controls/LogViewer.py:282 +msgid "1s" +msgstr "1 Ñек" + +#: ../dialogs/PouDialog.py:124 ../IDEFrame.py:1614 ../IDEFrame.py:1660 +#: ../IDEFrame.py:1679 +#, python-format +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 +#, python-format +msgid "A POU named \"%s\" already exists!" +msgstr "POU Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ \"%s\" уже ÑущеÑтвует!" + +#: ../ConfigTreeNode.py:424 +#, python-brace-format +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 +#, python-format +msgid "A variable with \"%s\" as name already exists in this pou!" +msgstr "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ \"%s\" уже ÑущеÑтвует в Ñтом POU!" + +#: ../editors/CodeFileEditor.py:774 +#, python-format +msgid "A variable with \"%s\" as name already exists!" +msgstr "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ \"%s\" уже ÑущеÑтвует!" + +#: ../dialogs/AboutDialog.py:40 ../PLCOpenEditor.py:158 ../Beremiz.py:381 +msgid "About" +msgstr "О программе" + +#: ../plcopen/iec_std.csv:22 +msgid "Absolute number" +msgstr "ÐбÑолютный номер" + +#: ../dialogs/SFCStepDialog.py:72 ../dialogs/ActionBlockDialog.py:42 +msgid "Action" +msgstr "ДейÑтвие" + +#: ../editors/Viewer.py:555 ../editors/Viewer.py:2345 +msgid "Action Block" +msgstr "Блок дейÑтвиÑ" + +#: ../dialogs/PouActionDialog.py:81 +msgid "Action Name" +msgstr "Ð˜Ð¼Ñ Ð´ÐµÐ¹ÑтвиÑ" + +#: ../dialogs/PouActionDialog.py:49 +msgid "Action Name:" +msgstr "Ð˜Ð¼Ñ Ð´ÐµÐ¹ÑтвиÑ:" + +#: ../plcopen/plcopen.py:1359 +#, python-format +msgid "Action with name %s doesn't exist!" +msgstr "ДейÑтвие Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ %s не ÑущеÑтвует!" + +#: ../PLCControler.py:96 +msgid "Actions" +msgstr "ДейÑтвиÑ" + +#: ../dialogs/ActionBlockDialog.py:133 +msgid "Actions:" +msgstr "ДейÑтвиÑ:" + +#: ../editors/Viewer.py:1100 +msgid "Active" +msgstr "Ðктивный" + +#: ../canfestival/SlaveEditor.py:80 ../canfestival/NetworkEditor.py:101 +#: ../editors/Viewer.py:588 ../Beremiz.py:1060 +msgid "Add" +msgstr "Добавить" + +#: ../IDEFrame.py:1890 ../IDEFrame.py:1925 +msgid "Add Action" +msgstr "Добавить дейÑтвие" + +#: ../features.py:32 +msgid "Add C code accessing located variables synchronously" +msgstr "Добавить C-код Ñ Ñинхронным доÑтупом к локальным переменным" + +#: ../IDEFrame.py:1873 +msgid "Add Configuration" +msgstr "Добавить конфигурацию" + +#: ../IDEFrame.py:1853 +msgid "Add DataType" +msgstr "Добавить тип данных" + +#: ../editors/Viewer.py:513 +msgid "Add Divergence Branch" +msgstr "Добавить ветвление" + +#: ../dialogs/DiscoveryDialog.py:116 +msgid "Add IP" +msgstr "Добавить IP адреÑ" + +#: ../IDEFrame.py:1861 +msgid "Add POU" +msgstr "Добавить POU" + +#: ../features.py:33 +msgid "Add Python code executed asynchronously" +msgstr "Добавить аÑинхронно вызываемый код на Python" + +#: ../IDEFrame.py:1901 ../IDEFrame.py:1951 +msgid "Add Resource" +msgstr "Добавить реÑурÑ" + +#: ../IDEFrame.py:1879 ../IDEFrame.py:1922 +msgid "Add Transition" +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 +msgid "Add a new jump" +msgstr "Добавить новый безуÑловный переход" + +#: ../editors/SFCViewer.py:455 +msgid "Add a new step" +msgstr "Добавить новый шаг" + +#: ../features.py:34 +msgid "Add a simple WxGlade based GUI." +msgstr "Добавить проÑтой GUI на WxGlade " + +#: ../dialogs/ActionBlockDialog.py:137 +msgid "Add action" +msgstr "Добавить дейÑтвие" + +#: ../editors/DataTypeEditor.py:352 +msgid "Add element" +msgstr "Добавить Ñлемент" + +#: ../editors/ResourceEditor.py:268 +msgid "Add instance" +msgstr "Добавить ÑкземплÑÑ€" + +#: ../canfestival/NetworkEditor.py:103 +msgid "Add slave" +msgstr "Добавить ÑлÑйв" + +#: ../editors/ResourceEditor.py:239 +msgid "Add task" +msgstr "Добавить задачу" + +#: ../editors/CodeFileEditor.py:658 ../controls/VariablePanel.py:450 +msgid "Add variable" +msgstr "Добавить переменную" + +#: ../plcopen/iec_std.csv:33 +msgid "Addition" +msgstr "Сложение" + +#: ../plcopen/definitions.py:47 +msgid "Additional function blocks" +msgstr "Дополнительные функциональные блоки" + +#: ../editors/Viewer.py:571 +msgid "Adjust Block Size" +msgstr "Скорректировать размер Ñлемента" + +#: ../editors/Viewer.py:1637 +msgid "Alignment" +msgstr "Выравнивание" + +#: ../dialogs/BrowseLocationsDialog.py:39 +#: ../dialogs/BrowseLocationsDialog.py:47 +#: ../dialogs/BrowseLocationsDialog.py:140 +#: ../dialogs/BrowseLocationsDialog.py:143 ../controls/LogViewer.py:298 +#: ../controls/VariablePanel.py:70 +msgid "All" +msgstr "Ð’Ñе" + +#: ../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 +#, python-format +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 +msgid "Arc cosine" +msgstr "ÐрккоÑинуÑ" + +#: ../plcopen/iec_std.csv:30 +msgid "Arc sine" +msgstr "ÐркÑинуÑ" + +#: ../plcopen/iec_std.csv:32 +msgid "Arc tangent" +msgstr "ÐрктангенÑ" + +#: ../plcopen/iec_std.csv:33 +msgid "Arithmetic" +msgstr "Математика" + +#: ../editors/DataTypeEditor.py:54 ../editors/DataTypeEditor.py:635 +#: ../controls/VariablePanel.py:829 +msgid "Array" +msgstr "МаÑÑив" + +#: ../plcopen/iec_std.csv:39 +msgid "Assignment" +msgstr "ПриÑвоение" + +#: ../dialogs/FBDVariableDialog.py:217 +msgid "At least a variable or an expression must be selected!" +msgstr "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð¸Ð»Ð¸ выражение должно быть выбрано!" + +#: ../controls/ProjectPropertiesPanel.py:99 +msgid "Author" +msgstr "Ðвтор" + +#: ../controls/ProjectPropertiesPanel.py:96 +msgid "Author Name (optional):" +msgstr "Ð˜Ð¼Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð° (опционально):" + +msgid "BUSY = 1 during ramping period" +msgstr "BOSY = 1 во Ð²Ñ€ÐµÐ¼Ñ " + +#: ../dialogs/FindInPouDialog.py:79 +msgid "Backward" +msgstr "Ðазад" + +#: ../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 +#, python-format +msgid "Bad location size : %s" +msgstr "Ðеправильный размер: %s" + +#: ../dialogs/ArrayTypeDialog.py:55 ../editors/DataTypeEditor.py:175 +#: ../editors/DataTypeEditor.py:205 ../editors/DataTypeEditor.py:297 +msgid "Base Type:" +msgstr "Базовый тип:" + +#: ../editors/DataTypeEditor.py:625 ../controls/VariablePanel.py:787 +msgid "Base Types" +msgstr "Базовые типы" + +msgid "BaseParams" +msgstr "Базовые параметры" + +#: ../Beremiz.py:553 +msgid "Beremiz" +msgstr "Beremiz" + +msgid "BeremizRoot" +msgstr "ÐаÑтройки Beremiz " + +#: ../plcopen/iec_std.csv:70 +msgid "Binary selection (1 of 2)" +msgstr "Бинарный выбор (1 или 2)" + +#: ../plcopen/iec_std.csv:62 +msgid "Bit-shift" +msgstr "Сдвиговые операции" + +#: ../plcopen/iec_std.csv:66 +msgid "Bitwise" +msgstr "Битовые операции" + +#: ../plcopen/iec_std.csv:66 +msgid "Bitwise AND" +msgstr "Битовое И" + +#: ../plcopen/iec_std.csv:67 +msgid "Bitwise OR" +msgstr "Битовое ИЛИ" + +#: ../plcopen/iec_std.csv:68 +msgid "Bitwise XOR" +msgstr "ИÑключающее ИЛИ" + +#: ../plcopen/iec_std.csv:69 +msgid "Bitwise inverting" +msgstr "Битовое ÐЕ" + +#: ../editors/Viewer.py:525 ../editors/Viewer.py:2358 +msgid "Block" +msgstr "Блок" + +#: ../dialogs/FBDBlockDialog.py:59 +msgid "Block Properties" +msgstr "СвойÑтва блока" + +#: ../editors/TextViewer.py:262 +msgid "Block name" +msgstr "Ð˜Ð¼Ñ Ð±Ð»Ð¾ÐºÐ°" + +#: ../editors/Viewer.py:491 +msgid "Bottom" +msgstr "Ðиз" + +#: ../ProjectController.py:1301 +msgid "Broken" +msgstr "Ошибка" + +#: ../dialogs/BrowseValuesLibraryDialog.py:37 +#, python-format +msgid "Browse %s values library" +msgstr "Browse %s values library" + +#: ../dialogs/BrowseLocationsDialog.py:65 +msgid "Browse Locations" +msgstr "ПроÑмотр директорий" + +#: ../ProjectController.py:1769 +msgid "Build" +msgstr "Сборка" + +#: ../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 +msgid "C code" +msgstr "C код " + +#: ../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 +#, python-format +msgid "C compilation of %s failed.\n" +msgstr "Ошибка компилÑции %s.\n" + +#: ../features.py:32 +msgid "C extension" +msgstr "С-раÑширение" + +#: ../dialogs/AboutDialog.py:63 +msgid "C&redits" +msgstr "&БлагодарноÑти" + +#: ../canfestival/NetworkEditor.py:52 +msgid "CANOpen network" +msgstr "Сеть CANOpen" + +#: ../canfestival/SlaveEditor.py:44 +msgid "CANOpen slave" +msgstr "CANOpen ведущий" + +msgid "CAN_Baudrate" +msgstr "СкороÑÑ‚ÑŒ CAN" + +msgid "CAN_Device" +msgstr "CAN уÑтройÑтво" + +msgid "CAN_Driver" +msgstr "CAN драйвер" + +#: ../features.py:31 +msgid "CANopen support" +msgstr "Поддержка CANOpen" + +msgid "CFLAGS" +msgstr "CFLAGS" + +#: ../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 +#, python-format +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 +#, python-format +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" +msgstr "" + +msgid "CanFestivalNode" +msgstr "" + +#: Extra XSD strings +msgid "CanFestivalSlaveNode" +msgstr "" + +#: ../ConfigTreeNode.py:529 +#, python-brace-format +msgid "Cannot create child {a1} of type {a2} " +msgstr "ÐÐµÐ»ÑŒÐ·Ñ Ñоздать дочерний Ñлемент {a1} типа {a2}" + +#: ../ConfigTreeNode.py:454 +#, python-format +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 +#, python-brace-format +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 +msgid "Case sensitive" +msgstr "РегиÑтрозавиÑимый" + +#: ../editors/Viewer.py:486 +msgid "Center" +msgstr "Центр" + +#: ../Beremiz_service.py:266 +msgid "Change IP of interface to bind" +msgstr "Сменить IP-Ð°Ð´Ñ€ÐµÑ Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñа Ð´Ð»Ñ Ð¿Ñ€Ð¸Ð²Ñзки Ñокета" + +#: ../Beremiz_service.py:265 +msgid "Change Name" +msgstr "Сменить имÑ" + +#: ../IDEFrame.py:1943 +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 +msgid "Choose a file" +msgstr "Выберите файл" + +#: ../Beremiz.py:931 ../Beremiz.py:966 +msgid "Choose a project" +msgstr "Выберите проект" + +#: ../dialogs/BrowseValuesLibraryDialog.py:42 +#, python-format +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 +msgid "Class" +msgstr "КлаÑÑ" + +#: ../controls/VariablePanel.py:441 +msgid "Class Filter:" +msgstr "Фильтр клаÑÑа:" + +#: ../dialogs/FBDVariableDialog.py:69 +msgid "Class:" +msgstr "КлаÑÑ:" + +#: ../ProjectController.py:1773 +msgid "Clean" +msgstr "ОчиÑтить" + +#: ../controls/LogViewer.py:318 +msgid "Clean log messages" +msgstr "ОчиÑтить лог" + +#: ../ProjectController.py:1775 +msgid "Clean project build folder" +msgstr "ОчиÑтить директорию Ñборки проекта" + +#: ../ProjectController.py:1232 +msgid "Cleaning the build directory\n" +msgstr "ОчиÑтка директории Ñборки\n" + +#: ../IDEFrame.py:435 +msgid "Clear Errors" +msgstr "ОчиÑтить ошибки" + +#: ../editors/Viewer.py:582 +msgid "Clear Execution Order" +msgstr "ОчиÑтить порÑдок иÑполнениÑ" + +#: ../dialogs/SearchInProjectDialog.py:105 ../dialogs/FindInPouDialog.py:111 +msgid "Close" +msgstr "Закрыть" + +#: ../PLCOpenEditor.py:199 ../Beremiz.py:693 +msgid "Close Application" +msgstr "Закрыть приложение" + +#: ../PLCOpenEditor.py:108 ../Beremiz.py:333 ../Beremiz.py:637 +#: ../IDEFrame.py:1009 +msgid "Close Project" +msgstr "Закрыть проект" + +#: ../PLCOpenEditor.py:106 ../Beremiz.py:331 +msgid "Close Tab" +msgstr "Закрыть вкладку" + +#: ../editors/Viewer.py:541 ../editors/Viewer.py:2366 +msgid "Coil" +msgstr "Катушка" + +msgid "Command" +msgstr "Комманда" + +#: ../editors/Viewer.py:561 ../editors/LDViewer.py:506 +msgid "Comment" +msgstr "Комментарий" + +#: ../dialogs/ProjectDialog.py:57 +msgid "Company Name" +msgstr "Ð˜Ð¼Ñ ÐºÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ð¸" + +#: ../controls/ProjectPropertiesPanel.py:94 +msgid "Company Name (required):" +msgstr "ÐšÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ (обÑзательно):" + +#: ../controls/ProjectPropertiesPanel.py:95 +msgid "Company URL (optional):" +msgstr "Сайт компании (опционально):" + +#: ../plcopen/iec_std.csv:75 +msgid "Comparison" +msgstr "Сравнение" + +msgid "Compiler" +msgstr "КомпилÑтор" + +#: ../ProjectController.py:672 +msgid "Compiling IEC Program into C code...\n" +msgstr "КомпилÑÑ†Ð¸Ñ ÐœÐК-программы в C-код...\n" + +#: ../plcopen/iec_std.csv:85 +msgid "Concatenation" +msgstr "Объединение" + +#: ../editors/ConfTreeNodeEditor.py:229 +msgid "Config" +msgstr "КонфигурациÑ" + +#: ../editors/ProjectNodeEditor.py:36 +msgid "Config variables" +msgstr "Конфигурационные переменные" + +#: ../dialogs/SearchInProjectDialog.py:39 +msgid "Configuration" +msgstr "КонфигурациÑ" + +#: ../PLCControler.py:97 +msgid "Configurations" +msgstr "Конфигурации" + +#: ../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 +msgid "Connect" +msgstr "ПодключитьÑÑ" + +#: ../ProjectController.py:1789 +msgid "Connect to the target PLC" +msgstr "ПодключитьÑÑ Ðº целевому ПЛК" + +#: ../ProjectController.py:1292 +#, python-format +msgid "Connected to URI: %s" +msgstr "Подключен к URI: %s" + +#: ../dialogs/SFCTransitionDialog.py:76 ../editors/Viewer.py:527 +#: ../editors/Viewer.py:2359 +msgid "Connection" +msgstr "Подключение" + +#: ../dialogs/ConnectionDialog.py:52 +msgid "Connection Properties" +msgstr "СвойÑтва подключение" + +#: ../ProjectController.py:1647 +msgid "Connection canceled!\n" +msgstr "Подключение отменено!\n" + +#: ../ProjectController.py:1672 +#, python-format +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 +#, python-format +msgid "Connection to '%s' failed.\n" +msgstr "Ðеудачное подключение к %s!\n" + +#: ../dialogs/ConnectionDialog.py:64 ../editors/Viewer.py:1594 +msgid "Connector" +msgstr "Коннектор" + +#: ../dialogs/SFCStepDialog.py:65 +msgid "Connectors:" +msgstr "Коннекторы:" + +#: ../Beremiz.py:448 +msgid "Console" +msgstr "КонÑоль" + +#: ../controls/VariablePanel.py:60 +msgid "Constant" +msgstr "КонÑтанта" + +#: ../editors/Viewer.py:537 ../editors/Viewer.py:2362 +msgid "Contact" +msgstr "Контакт" + +#: ../controls/ProjectPropertiesPanel.py:197 +msgid "Content Description (optional):" +msgstr "ОпиÑание Ñодержимого (опционально):" + +#: ../dialogs/ConnectionDialog.py:65 ../editors/Viewer.py:1595 +msgid "Continuation" +msgstr "Продолжение" + +#: ../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 +#: ../IDEFrame.py:425 +msgid "Copy" +msgstr "Копировать" + +#: ../IDEFrame.py:1930 +msgid "Copy POU" +msgstr "Копировать POU" + +#: ../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 "Скопировать файл Ñ Ð¿Ñ€Ð°Ð²Ð¾Ð¹ директории в левую" + +msgid "Copy of IN" +msgstr "ÐšÐ¾Ð¿Ð¸Ñ Ð²Ñ…Ð¾Ð´Ð° IN" + +#: ../plcopen/iec_std.csv:28 +msgid "Cosine" +msgstr "КоÑинуÑ" + +#: ../ConfigTreeNode.py:656 +#, python-brace-format +msgid "" +"Could not add child \"{a1}\", type {a2} :\n" +"{a3}\n" +msgstr "" +"Ðевозможно добавить дочерний Ñлемент \"{a1}\", тип {a2}:\n" +"{a3}\n" + +#: ../py_ext/PythonFileCTNMixin.py:77 +#, python-format +msgid "Couldn't import old %s file." +msgstr "Ðевозможно импортировать Ñтарый файл %s." + +#: ../ConfigTreeNode.py:626 +#, python-brace-format +msgid "" +"Couldn't load confnode base parameters {a1} :\n" +" {a2}" +msgstr "" +"Ðевозможно загрузить базовые параметры confnode {a1}:\n" +" {a2}" + +#: ../ConfigTreeNode.py:643 ../CodeFileTreeNode.py:124 +#, python-brace-format +msgid "" +"Couldn't load confnode parameters {a1} :\n" +" {a2}" +msgstr "" +"Ðевозможно загрузить параметры confnode {a1}:\n" +" {a2}" + +#: ../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" + +#: ../svgui/svgui.py:47 +msgid "Create HMI" +msgstr "Создать HMI" + +#: ../dialogs/PouDialog.py:45 +msgid "Create a new POU" +msgstr "Создать новый POU" + +#: ../dialogs/PouActionDialog.py:38 +msgid "Create a new action" +msgstr "Создать новое дейÑтвие" + +#: ../IDEFrame.py:159 +msgid "Create a new action block" +msgstr "Создать новый блок дейÑтвие" + +#: ../IDEFrame.py:108 ../IDEFrame.py:138 ../IDEFrame.py:171 +msgid "Create a new block" +msgstr "Создать новый блок" + +#: ../IDEFrame.py:132 +msgid "Create a new branch" +msgstr "Создать новое ветвление" + +#: ../IDEFrame.py:126 +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 "Создать новый контакт" + +#: ../IDEFrame.py:162 +msgid "Create a new divergence" +msgstr "Создать новое ветвление" + +#: ../dialogs/SFCDivergenceDialog.py:53 +msgid "Create a new divergence or convergence" +msgstr "Создать новое ветвление или объединение" + +#: ../IDEFrame.py:150 +msgid "Create a new initial step" +msgstr "Создать иÑходный шаг" + +#: ../IDEFrame.py:165 +msgid "Create a new jump" +msgstr "Создать новый безуÑловный переход" + +#: ../IDEFrame.py:120 ../IDEFrame.py:177 +msgid "Create a new power rail" +msgstr "Создать новую линию питаниÑ" + +#: ../IDEFrame.py:123 +msgid "Create a new rung" +msgstr "Создать новую цепь" + +#: ../IDEFrame.py:153 +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 +msgid "Credits" +msgstr "БлагодарноÑти" + +#: ../Beremiz_service.py:432 +msgid "Current working directory :" +msgstr "Ð¢ÐµÐºÑƒÑ‰Ð°Ñ Ñ€Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ :" + +#: ../editors/Viewer.py:596 ../IDEFrame.py:368 ../IDEFrame.py:424 +msgid "Cut" +msgstr "Вырезать" + +#: ../editors/ResourceEditor.py:72 +msgid "Cyclic" +msgstr "ЦикличеÑкий" + +#: ../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 +msgid "DEPRECATED" +msgstr "УСТÐРЕЛО" + +#: ../canfestival/SlaveEditor.py:76 ../canfestival/NetworkEditor.py:97 +msgid "DS-301 Profile" +msgstr "Профиль DS-301" + +#: ../canfestival/SlaveEditor.py:77 ../canfestival/NetworkEditor.py:98 +msgid "DS-302 Profile" +msgstr "Профиль DS-302" + +#: ../dialogs/SearchInProjectDialog.py:35 +msgid "Data Type" +msgstr "Тип данных" + +#: ../PLCControler.py:96 +msgid "Data Types" +msgstr "Типы данных" + +#: ../plcopen/iec_std.csv:16 +msgid "Data type conversion" +msgstr "Преобразование типов данных" + +#: ../plcopen/iec_std.csv:44 ../plcopen/iec_std.csv:45 +msgid "Date addition" +msgstr "Сложение дат" + +#: ../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" +msgstr "Вычитание дат" + +msgid "Datetime, current or relative to PDT" +msgstr "Текущие дата и времÑ, абÑолютные или отноÑительные от PDT" + +#: ../dialogs/DurationEditorDialog.py:43 +msgid "Days:" +msgstr "Дни:" + +#: ../ProjectController.py:1694 +msgid "Debug does not match PLC - stop/transfert/start to re-enable\n" +msgstr "ÐžÑ‚Ð»Ð°Ð¶Ð¸Ð²Ð°ÐµÐ¼Ð°Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð° не ÑоответÑтвует программе в ПЛК - оÑтановите/загрузите/запуÑтите, чтобы разрешить отладку\n" + +#: ../controls/PouInstanceVariablesPanel.py:134 +msgid "Debug instance" +msgstr "Отладка ÑкземплÑра" + +#: ../editors/Viewer.py:1117 ../editors/Viewer.py:3653 +#, python-format +msgid "Debug: %s" +msgstr "Отладка: %s" + +#: ../ProjectController.py:1350 +#, python-format +msgid "Debug: Unknown variable '%s'\n" +msgstr "Отладка: неизвеÑÑ‚Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%s'\n" + +#: ../ProjectController.py:1348 +#, python-format +msgid "Debug: Unsupported type to debug '%s'\n" +msgstr "Отладка: неподдерживамый отладкой тип '%s'\n" + +#: ../IDEFrame.py:639 +msgid "Debugger" +msgstr "Отладчик" + +#: ../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 +msgid "Delete" +msgstr "Удалить" + +#: ../editors/Viewer.py:514 +msgid "Delete Divergence Branch" +msgstr "Удалить ветвь" + +#: ../editors/FileManagementPanel.py:153 +msgid "Delete File" +msgstr "Удалить файл" + +#: ../editors/Viewer.py:501 +msgid "Delete Wire Segment" +msgstr "Удалить Ñегмент цепи" + +#: ../controls/CustomEditableListBox.py:41 +msgid "Delete item" +msgstr "Удалить" + +#: ../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 "Description:" +msgstr "ОпиÑание:" + +msgid "Differentiated output" +msgstr "Дифференцированный выход" + +#: ../dialogs/ArrayTypeDialog.py:61 ../editors/DataTypeEditor.py:321 +msgid "Dimensions:" +msgstr "Размеры:" + +#: ../dialogs/FindInPouDialog.py:68 +msgid "Direction" +msgstr "Ðаправление" + +#: ../dialogs/BrowseLocationsDialog.py:90 +msgid "Direction:" +msgstr "Ðаправление:" + +#: ../editors/DataTypeEditor.py:54 +msgid "Directly" +msgstr "Синоним" + +msgid "Disable_Extensions" +msgstr "Запретить раÑширениÑ" + +#: ../ProjectController.py:1797 +msgid "Disconnect" +msgstr "ОтключитьÑÑ" + +#: ../ProjectController.py:1799 +msgid "Disconnect from PLC" +msgstr "ОтключитьÑÑ Ð¾Ñ‚ ПЛК" + +#: ../ProjectController.py:1302 +msgid "Disconnected" +msgstr "Отключено" + +#: ../editors/Viewer.py:556 ../editors/Viewer.py:2354 +msgid "Divergence" +msgstr "Ветвление" + +#: ../plcopen/iec_std.csv:36 +msgid "Division" +msgstr "Деление" + +#: ../editors/FileManagementPanel.py:152 +#, python-format +msgid "Do you really want to delete the file '%s'?" +msgstr "Ð’Ñ‹ дейÑтвительно хотите удалить Ñтот файл '%s'?" + +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 +msgid "Documentation" +msgstr "ОпиÑание" + +#: ../PLCOpenEditor.py:328 +msgid "Done" +msgstr "Завершено" + +#: ../dialogs/ActionBlockDialog.py:38 +msgid "Duration" +msgstr "ДлительноÑÑ‚ÑŒ" + +#: ../canfestival/canfestival.py:163 +msgid "EDS files (*.eds)|*.eds|All files|*.*" +msgstr "Файлы EDS (*.eds)|*.eds|All files|*.*" + +#: ../editors/Viewer.py:570 +msgid "Edit Block" +msgstr "Редактировать блок" + +#: ../dialogs/LDElementDialog.py:56 +msgid "Edit Coil Values" +msgstr "Редактировать значение катушки" + +#: ../dialogs/LDElementDialog.py:54 +msgid "Edit Contact Values" +msgstr "Редактировать значение контакта" + +#: ../dialogs/DurationEditorDialog.py:59 +msgid "Edit Duration" +msgstr "Редактировать длительноÑÑ‚ÑŒ" + +#: ../dialogs/SFCStepDialog.py:50 +msgid "Edit Step" +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 +msgid "Edit comment" +msgstr "Редактировать комментарий" + +#: ../editors/FileManagementPanel.py:66 +msgid "Edit file" +msgstr "Редактировать файл" + +#: ../controls/CustomEditableListBox.py:39 +msgid "Edit item" +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 +msgid "Edit step name" +msgstr "Редактировать Ð¸Ð¼Ñ ÑˆÐ°Ð³Ð°" + +#: ../dialogs/SFCTransitionDialog.py:51 +msgid "Edit transition" +msgstr "Редактировать переход" + +#: ../IDEFrame.py:611 +msgid "Editor ToolBar" +msgstr "Редактор панели инÑтрументов" + +#: ../ProjectController.py:1195 +msgid "Editor selection" +msgstr "Редактор выделениÑ" + +msgid "Elapsed time of ramp" +msgstr "Прошедшее Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ñ€Ð°ÑтаниÑ" + +#: ../editors/DataTypeEditor.py:348 +msgid "Elements :" +msgstr "Ðлементы:" + +#: ../ProjectController.py:1300 +msgid "Empty" +msgstr "Ðет программы" + +#: ../IDEFrame.py:365 +msgid "Enable Undo/Redo" +msgstr "Разрешить отмену и повтор операций" + +msgid "Enabled" +msgstr "Разрешено" + +#: ../Beremiz_service.py:331 +msgid "Enter a name " +msgstr "Введите имÑ" + +#: ../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 +msgid "Enumerated" +msgstr "ПеречиÑление" + +#: ../plcopen/iec_std.csv:77 +msgid "Equal to" +msgstr "Равно" + +#: ../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 +msgid "Error" +msgstr "Ошибка" + +#: ../ProjectController.py:727 +msgid "Error : At least one configuration and one resource must be declared in PLC !\n" +msgstr "Ошибка: Как минимум одна ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¸ один реÑÑƒÑ€Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть задекларированы в ПЛК!\n" + +#: ../ProjectController.py:719 +#, python-format +msgid "Error : IEC to C compiler returned %d\n" +msgstr "Ошибка: компилÑтор ÐœÐК в C вернул код ошибки %d\n" + +#: ../ProjectController.py:621 +#, python-format +msgid "" +"Error in ST/IL/SFC code generator :\n" +"%s\n" +msgstr "Ошибка в ST/IL/SFC кодогенераторе: %s\n" + +#: ../ConfigTreeNode.py:216 +#, python-format +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 +#, python-format +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 "ПорÑдок иÑполнениÑ:" + +#: ../features.py:35 +msgid "Experimental web based HMI" +msgstr "ÐкÑпериментальный WEB-HMI" + +#: ../plcopen/iec_std.csv:38 +msgid "Exponent" +msgstr "ÐкÑпонента" + +#: ../plcopen/iec_std.csv:26 +msgid "Exponentiation" +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 +msgid "Export slave" +msgstr "ÐкÑпортировать ведомое уÑтройÑтво" + +#: ../dialogs/FBDVariableDialog.py:89 +msgid "Expression:" +msgstr "Выражение:" + +#: ../controls/VariablePanel.py:72 +msgid "External" +msgstr "Внешний" + +#: ../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 +msgid "FBD" +msgstr "FBD" + +#: ../ProjectController.py:1729 +msgid "Failed : Must build before transfer.\n" +msgstr "Ошибка: необходима Ñборка перед передачей.\n" + +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:462 +msgid "Falling Edge" +msgstr "Спадающий фронт" + +#: ../ProjectController.py:1008 +msgid "Fatal : cannot get builder.\n" +msgstr "Ошибка: невозможно получить Ñборщик.\n" + +#: ../Beremiz.py:118 +#, python-format +msgid "Fetching %s" +msgstr "Проверка %s" + +#: ../dialogs/DurationEditorDialog.py:160 +#, python-format +msgid "Field %s hasn't a valid value!" +msgstr "Поле %s имеет неверное значение!" + +#: ../dialogs/DurationEditorDialog.py:162 +#, python-format +msgid "Fields %s haven't a valid value!" +msgstr "ÐŸÐ¾Ð»Ñ %s имеют неверные значениÑ!" + +#: ../controls/FolderTree.py:216 +#, python-format +msgid "File '%s' already exists!" +msgstr "Файл '%s' уже ÑущеÑтвует!" + +#: ../dialogs/SearchInProjectDialog.py:100 ../dialogs/FindInPouDialog.py:36 +#: ../dialogs/FindInPouDialog.py:106 ../IDEFrame.py:375 +msgid "Find" +msgstr "ПоиÑк" + +#: ../IDEFrame.py:377 +msgid "Find Next" +msgstr "ПоиÑк Ñледующего" + +#: ../IDEFrame.py:379 +msgid "Find Previous" +msgstr "ПоиÑк предыдущего" + +#: ../plcopen/iec_std.csv:90 +msgid "Find position" +msgstr "ПоиÑк позиции" + +#: ../dialogs/FindInPouDialog.py:57 +msgid "Find:" +msgstr "ПоиÑк:" + +#: ../connectors/PYRO/__init__.py:163 +msgid "Force runtime reload\n" +msgstr "Принудительный перезапуÑк ÑиÑтемы иÑполнениÑ\n" + +#: ../editors/Viewer.py:1553 +msgid "Force value" +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 +#, python-format +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 +msgid "Forward" +msgstr "Вперед" + +#: ../dialogs/SearchInProjectDialog.py:36 ../IDEFrame.py:1746 +msgid "Function" +msgstr "ФункциÑ" + +#: ../IDEFrame.py:349 +msgid "Function &Block" +msgstr "Функциональный &блок" + +#: ../dialogs/SearchInProjectDialog.py:37 ../IDEFrame.py:1745 +#: ../IDEFrame.py:1938 +msgid "Function Block" +msgstr "Функциональный блок" + +#: ../controls/VariablePanel.py:825 +msgid "Function Block Types" +msgstr "Типы функциональных блоков" + +#: ../PLCControler.py:95 +msgid "Function Blocks" +msgstr "Функциональные блоки" + +#: ../editors/Viewer.py:248 +msgid "Function Blocks can't be used in Functions!" +msgstr "Функциональные блоки не могут иÑпользоватьÑÑ Ð² функциÑÑ…!" + +#: ../PLCControler.py:2337 +#, python-format +msgid "FunctionBlock \"%s\" can't be pasted in a Function!!!" +msgstr "Функциональный блок \"%s\" не может быть вÑтавлен в функцию!!!" + +#: ../PLCControler.py:95 +msgid "Functions" +msgstr "Функции" + +#: ../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" + +msgid "Generic" +msgstr "Generic" + +#: ../controls/VariablePanel.py:73 +msgid "Global" +msgstr "Глобальный" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:242 +msgid "Go to current value" +msgstr "Перейти к текущему значению" + +#: ../controls/ProjectPropertiesPanel.py:173 +msgid "Graphics" +msgstr "Графика" + +#: ../plcopen/iec_std.csv:75 +msgid "Greater than" +msgstr "Больше" + +#: ../plcopen/iec_std.csv:76 +msgid "Greater than or equal to" +msgstr "Больше или равно" + +#: ../controls/ProjectPropertiesPanel.py:134 +msgid "Grid Resolution:" +msgstr "Шаг Ñетки:" + +#: ../runtime/NevowServer.py:181 +msgid "HTTP interface port :" +msgstr "Порт HTTP-интерфейÑа :" + +#: ../controls/ProjectPropertiesPanel.py:120 +msgid "Height:" +msgstr "Ð’Ñ‹Ñота:" + +#: ../editors/FileManagementPanel.py:85 +msgid "Home Directory:" +msgstr "ДомашнÑÑ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ:" + +#: ../controls/ProjectPropertiesPanel.py:150 +msgid "Horizontal:" +msgstr "Горизонтальный:" + +#: ../dialogs/DurationEditorDialog.py:44 +msgid "Hours:" +msgstr "ЧаÑÑ‹:" + +msgid "IEC_Channel" +msgstr "ÐœÐК-канал" + +#: ../dialogs/PouActionDialog.py:31 ../dialogs/PouDialog.py:36 +msgid "IL" +msgstr "IL" + +#: ../dialogs/DiscoveryDialog.py:94 +msgid "IP" +msgstr "IP" + +#: ../Beremiz_service.py:308 ../Beremiz_service.py:309 +msgid "IP is not valid!" +msgstr "Ðеверный IP-адреÑ" + +#: ../svgui/svgui.py:42 ../svgui/svgui.py:43 +msgid "Import SVG" +msgstr "Импорт SVG" + +#: ../dialogs/FBDVariableDialog.py:38 ../editors/Viewer.py:1580 +#: ../controls/VariablePanel.py:71 +msgid "InOut" +msgstr "Вход/Выход" + +#: ../editors/Viewer.py:1100 +msgid "Inactive" +msgstr "Ðеактивный" + +#: ../controls/VariablePanel.py:276 +#, python-brace-format +msgid "Incompatible data types between \"{a1}\" and \"{a2}\"" +msgstr "\"{a1}\" и \"{a2}\" имеют неÑовмеÑтимые типы данных" + +#: ../controls/VariablePanel.py:282 +#, python-format +msgid "Incompatible size of data between \"%s\" and \"BOOL\"" +msgstr "ÐеÑовмеÑтимый размер данных \"%s\" Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ \"BOOL\"" + +#: ../controls/VariablePanel.py:286 +#, python-brace-format +msgid "Incompatible size of data between \"{a1}\" and \"{a2}\"" +msgstr "\"{a1}\" и \"{a2}\" имеют неÑовмеÑтимый размер данных" + +#: ../dialogs/ActionBlockDialog.py:38 +msgid "Indicator" +msgstr "Индикатор" + +#: ../editors/Viewer.py:552 +msgid "Initial Step" +msgstr "ИÑходный шаг" + +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 +msgid "Initial Value" +msgstr "ИÑходное значение" + +#: ../editors/DataTypeEditor.py:185 ../editors/DataTypeEditor.py:216 +#: ../editors/DataTypeEditor.py:272 ../editors/DataTypeEditor.py:310 +msgid "Initial Value:" +msgstr "ИÑходное значение:" + +msgid "Initial value" +msgstr "ИÑходное значение" + +#: ../svgui/svgui.py:46 +msgid "Inkscape" +msgstr "Inkscape" + +#: ../dialogs/SFCTransitionDialog.py:75 ../dialogs/ActionBlockDialog.py:42 +msgid "Inline" +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" +msgstr "Вход" + +msgid "Input to be differentiated" +msgstr "Вход Ð´Ð»Ñ Ð´Ð¸Ñ„Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ" + +msgid "Input variable" +msgstr "Ð’Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ" + +#: ../dialogs/FBDBlockDialog.py:93 +msgid "Inputs:" +msgstr "Входы:" + +#: ../plcopen/iec_std.csv:87 +msgid "Insertion (into)" +msgstr "Ð’Ñтавка подÑтроки" + +#: ../plcopen/plcopen.py:1691 +#, python-format +msgid "Instance with id %d doesn't exist!" +msgstr "ÐкземплÑÑ€ Ñ id %d не ÑущеÑтвует!" + +#: ../editors/ResourceEditor.py:264 +msgid "Instances:" +msgstr "ÐкземплÑры:" + +msgid "Integrated output" +msgstr "Интегрированный выход" + +#: ../controls/VariablePanel.py:70 +msgid "Interface" +msgstr "ИнтерфейÑ" + +#: ../editors/ResourceEditor.py:72 +msgid "Interrupt" +msgstr "Прерывание" + +#: ../editors/ResourceEditor.py:68 +msgid "Interval" +msgstr "Интервал" + +#: ../PLCControler.py:2325 +msgid "Invalid plcopen element(s)!!!" +msgstr "Ðекорректный PlcOpen Ñлемент(Ñ‹)!!!" + +#: ../canfestival/config_utils.py:381 +#, python-brace-format +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location\"{a4}\"" +msgstr "Ðеправильный тип \"{a1}\"-> {a2} != {a3} Ð´Ð»Ñ \"{a4}\"" + +#: ../canfestival/config_utils.py:645 +#, python-brace-format +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 +#, python-format +msgid "Invalid value \"%s\" for debug variable" +msgstr "Ðеверное значение \"%s\" Ð´Ð»Ñ Ð¾Ñ‚Ð»Ð°Ð¶Ð¸Ð²Ð°ÐµÐ¼Ð¾Ð¹ переменной" + +#: ../controls/VariablePanel.py:255 ../controls/VariablePanel.py:258 +#, python-format +msgid "Invalid value \"%s\" for variable grid element" +msgstr "Ðеверное значение \"%s\" Ð´Ð»Ñ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ€Ð°Ð·Ð¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹" + +#: ../editors/Viewer.py:233 ../editors/Viewer.py:236 +#, python-format +msgid "Invalid value \"%s\" for viewer block" +msgstr "Ðеверное значение \"%s\" Ð´Ð»Ñ Ð²Ñтавки в редактор" + +#: ../dialogs/ForceVariableDialog.py:177 +#, python-brace-format +msgid "Invalid value \"{a1}\" for \"{a2}\" variable!" +msgstr "Ðеверное значение \"{a1}\" Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹ \"{a2}\"!" + +#: ../dialogs/DurationEditorDialog.py:121 +msgid "" +"Invalid value!\n" +"You must fill a numeric value." +msgstr "" +"Ðеверное значение!\n" +"Ðеобходимо ввеÑти чиÑловое значение." + +#: ../editors/Viewer.py:557 ../editors/Viewer.py:2343 +msgid "Jump" +msgstr "БезуÑловный переход" + +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 +msgid "LD" +msgstr "LD" + +msgid "LDFLAGS" +msgstr "LDFLAGS" + +#: ../editors/LDViewer.py:215 ../editors/LDViewer.py:231 +#, python-format +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 +msgid "Language" +msgstr "Язык" + +#: ../controls/ProjectPropertiesPanel.py:186 +msgid "Language (optional):" +msgstr "Язык (опционально):" + +#: ../dialogs/PouTransitionDialog.py:65 ../dialogs/PouActionDialog.py:56 +#: ../dialogs/PouDialog.py:73 +msgid "Language:" +msgstr "Язык:" + +#: ../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 +msgid "Left" +msgstr "Слева" + +#: ../dialogs/LDPowerRailDialog.py:62 +msgid "Left PowerRail" +msgstr "Ð›ÐµÐ²Ð°Ñ ÑˆÐ¸Ð½Ð° питаниÑ" + +#: ../plcopen/iec_std.csv:81 +msgid "Length of string" +msgstr "Длина Ñтроки" + +#: ../plcopen/iec_std.csv:78 +msgid "Less than" +msgstr "Меньше" + +#: ../plcopen/iec_std.csv:79 +msgid "Less than or equal to" +msgstr "Меньше либо равно" + +msgid "Libraries" +msgstr "Библиотеки" + +#: ../IDEFrame.py:631 +msgid "Library" +msgstr "Библиотеки" + +#: ../dialogs/AboutDialog.py:143 +msgid "License" +msgstr "ЛицензиÑ" + +#: ../plcopen/iec_std.csv:73 +msgid "Limitation" +msgstr "Ограничение" + +msgid "Linker" +msgstr "Линковщик" + +#: ../targets/toolchain_gcc.py:166 +msgid "Linking :\n" +msgstr "Линковка:\n" + +msgid "Linux" +msgstr "GNU/Linux" + +#: ../dialogs/DiscoveryDialog.py:111 ../controls/VariablePanel.py:72 +msgid "Local" +msgstr "Локальный" + +#: ../canfestival/canfestival.py:346 +msgid "Local entries" +msgstr "Локальные запиÑи" + +#: ../ProjectController.py:1641 +msgid "Local service discovery failed!\n" +msgstr "Локальный ÑÐµÑ€Ð²Ð¸Ñ Ð½Ðµ найден!\n" + +#: ../controls/VariablePanel.py:53 +msgid "Location" +msgstr "Размещение" + +#: ../dialogs/BrowseLocationsDialog.py:72 +msgid "Locations available:" +msgstr "ДоÑтупные размещениÑ:" + +#: ../plcopen/iec_std.csv:25 +msgid "Logarithm to base 10" +msgstr "ДеÑÑтичный логарифм" + +#: ../connectors/PYRO/__init__.py:94 +#, python-format +msgid "MDNS resolution failure for '%s'\n" +msgstr "MDNS разрешение неудачно Ð´Ð»Ñ '%s'\n" + +msgid "Manual output adjustment - Typically from transfer station" +msgstr "Ручной выход" + +#: ../canfestival/SlaveEditor.py:64 ../canfestival/NetworkEditor.py:85 +msgid "Map Variable" +msgstr "Отображение переменной" + +#: ../features.py:31 +msgid "Map located variables over CANopen" +msgstr "Отображение переменных по CANopen" + +#: ../canfestival/NetworkEditor.py:106 +msgid "Master" +msgstr "Ведущий" + +#: ../ConfigTreeNode.py:539 +#, python-brace-format +msgid "Max count ({a1}) reached for this confnode of type {a2} " +msgstr "ДоÑтигнуто макÑимальное количеÑтво ({a1}) Ð´Ð»Ñ Ñ‚Ð¸Ð¿Ð° узла конфигурации {a2} " + +#: ../plcopen/iec_std.csv:71 +msgid "Maximum" +msgstr "МакÑимум" + +#: ../editors/DataTypeEditor.py:239 +msgid "Maximum:" +msgstr "МакÑимум:" + +#: ../dialogs/BrowseLocationsDialog.py:42 ../editors/Viewer.py:289 +#: ../editors/TextViewer.py:307 ../controls/LocationCellEditor.py:98 +#: ../controls/VariablePanel.py:291 ../controls/VariablePanel.py:351 +msgid "Memory" +msgstr "ПамÑÑ‚ÑŒ" + +#: ../IDEFrame.py:599 +msgid "Menu ToolBar" +msgstr "Меню" + +#: ../dialogs/DurationEditorDialog.py:48 +msgid "Microseconds:" +msgstr "МикроÑекунды:" + +#: ../editors/Viewer.py:490 +msgid "Middle" +msgstr "ПоÑередине" + +#: ../dialogs/DurationEditorDialog.py:47 +msgid "Milliseconds:" +msgstr "МиллиÑекунды:" + +#: ../plcopen/iec_std.csv:72 +msgid "Minimum" +msgstr "Минимум" + +#: ../editors/DataTypeEditor.py:226 +msgid "Minimum:" +msgstr "Минимум:" + +#: ../dialogs/DurationEditorDialog.py:45 +msgid "Minutes:" +msgstr "Минуты:" + +#: ../controls/ProjectPropertiesPanel.py:210 +msgid "Miscellaneous" +msgstr "Прочее" + +#: ../dialogs/LDElementDialog.py:63 +msgid "Modifier:" +msgstr "Модификатор:" + +#: ../PLCGenerator.py:786 ../PLCGenerator.py:1230 +#, python-brace-format +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 +msgid "Move action up" +msgstr "ПеремеÑтить дейÑтвие выше" + +#: ../controls/CustomEditableListBox.py:43 +msgid "Move down" +msgstr "ПеремеÑтить ниже" + +#: ../editors/DataTypeEditor.py:355 +msgid "Move element down" +msgstr "ПеремеÑтить Ñлемент ниже" + +#: ../editors/DataTypeEditor.py:354 +msgid "Move element up" +msgstr "ПеремеÑтить Ñлементы выше" + +#: ../editors/ResourceEditor.py:271 +msgid "Move instance down" +msgstr "ПеремеÑтить ÑкземплÑÑ€ ниже" + +#: ../editors/ResourceEditor.py:270 +msgid "Move instance up" +msgstr "ПеремеÑтить ÑкземплÑÑ€ выше" + +#: ../editors/ResourceEditor.py:242 +msgid "Move task down" +msgstr "ПеремеÑтить задачу ниже" + +#: ../editors/ResourceEditor.py:241 +msgid "Move task up" +msgstr "ПеремеÑтить задачу выше" + +#: ../IDEFrame.py:99 ../IDEFrame.py:114 ../IDEFrame.py:144 ../IDEFrame.py:185 +msgid "Move the view" +msgstr "ПеремеÑтить отображение" + +#: ../controls/CustomEditableListBox.py:42 +msgid "Move up" +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 +msgid "Multiplication" +msgstr "Умножение" + +#: ../editors/FileManagementPanel.py:83 +msgid "My Computer:" +msgstr "Мой компьютер:" + +#: ../dialogs/DiscoveryDialog.py:92 +msgid "NAME" +msgstr "ИмÑ" + +msgid "NOT R1" +msgstr "ÐЕ R1" + +#: ../editors/ResourceEditor.py:68 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 +msgid "Name" +msgstr "ИмÑ" + +#: ../Beremiz_service.py:332 +msgid "Name must not be null!" +msgstr "Ð˜Ð¼Ñ Ð½Ðµ может быть null!" + +#: ../dialogs/SFCStepDialog.py:56 ../dialogs/FBDBlockDialog.py:83 +#: ../dialogs/ConnectionDialog.py:75 +msgid "Name:" +msgstr "ИмÑ:" + +#: ../plcopen/iec_std.csv:24 +msgid "Natural logarithm" +msgstr "Ðатуральный логарифм" + +#: ../dialogs/LDElementDialog.py:75 ../editors/Viewer.py:460 +msgid "Negated" +msgstr "ИнверÑиÑ" + +#: ../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 +#: ../Beremiz.py:356 +msgid "New" +msgstr "Ðовый" + +#: ../controls/CustomEditableListBox.py:40 +msgid "New item" +msgstr "Ðовый Ñлемент" + +#: ../editors/Viewer.py:459 +msgid "No Modifier" +msgstr "Ðет модификатора" + +#: ../ProjectController.py:1763 +msgid "No PLC to transfer (did build succeed ?)\n" +msgstr "Ðет ПЛК Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð¸ (была Ñборка уÑпешна?)\n" + +#: ../PLCGenerator.py:1631 +#, python-format +msgid "No body defined in \"%s\" POU" +msgstr "Ðет тела Ð´Ð»Ñ POU \"%s\"" + +#: ../PLCGenerator.py:806 ../PLCGenerator.py:1241 +#, python-brace-format +msgid "No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +msgstr "Ðе найден коннектор, ÑоответÑтвующий продолжению цепи \"{a1}\" в POU \"{a2}\"" + +#: ../PLCOpenEditor.py:347 +msgid "" +"No documentation available.\n" +"Coming soon." +msgstr "" +"Ð”Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ÑутÑтвует.\n" +"Ð’ разработке." + +#: ../PLCGenerator.py:829 +#, python-format +msgid "No informations found for \"%s\" block" +msgstr "Ðе найдена Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¿Ð¾ блоку \"%s\"" + +#: ../PLCGenerator.py:1194 +#, python-brace-format +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 +#, python-format +msgid "No such SVG file: %s\n" +msgstr "Ðет такого SVG файла: %s\n" + +#: ../canfestival/config_utils.py:639 +#, python-brace-format +msgid "No such index/subindex ({a1},{a2}) (variable {a3})" +msgstr "Ðет индекÑа/подиндекÑа ({a1},{a2}) (Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ {a3})" + +#: ../canfestival/config_utils.py:362 +#, python-brace-format +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 +#, python-format +msgid "No variable defined in \"%s\" POU" +msgstr "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð½Ðµ определена в POU \"%s\"" + +msgid "NodeId" +msgstr "ID узла" + +#: ../canfestival/config_utils.py:355 +#, python-brace-format +msgid "Non existing node ID : {a1} (variable {a2})" +msgstr "ÐеÑущеÑтвующий ID узла: {a1} (Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ {a2})" + +#: ../controls/VariablePanel.py:64 +msgid "Non-Retain" +msgstr "Ðе-Retain" + +#: ../dialogs/LDElementDialog.py:75 +msgid "Normal" +msgstr "Обычный" + +#: ../canfestival/config_utils.py:389 +#, python-brace-format +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 +msgid "Not equal to" +msgstr "Ðе равно" + +#: ../dialogs/SFCDivergenceDialog.py:89 +msgid "Number of sequences:" +msgstr "ЧиÑло ветвей:" + +#: ../plcopen/iec_std.csv:22 +msgid "Numerical" +msgstr "МатематичеÑкие функции" + +#: ../dialogs/SearchInProjectDialog.py:86 +msgid "Only Elements" +msgstr "Только Ñлементы" + +#: ../PLCOpenEditor.py:104 ../PLCOpenEditor.py:145 ../Beremiz.py:323 +#: ../Beremiz.py:357 +msgid "Open" +msgstr "Открыть" + +#: ../svgui/svgui.py:140 +msgid "Open Inkscape" +msgstr "Открыть Inkscape" + +#: ../version.py:66 +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 +msgid "Open wxGlade" +msgstr "Открыть wxGlade" + +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 +msgid "Option" +msgstr "ÐаÑтройка" + +#: ../dialogs/FindInPouDialog.py:83 +msgid "Options" +msgstr "ÐаÑтройки" + +#: ../controls/ProjectPropertiesPanel.py:97 +msgid "Organization (optional):" +msgstr "ÐžÑ€Ð³Ð°Ð½Ð¸Ð·Ð°Ñ†Ð¸Ñ (опционально):" + +#: ../canfestival/SlaveEditor.py:74 ../canfestival/NetworkEditor.py:95 +msgid "Other Profile" +msgstr "Другой профиль" + +#: ../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 "Output" +msgstr "Выход" + +msgid "Overriding reset" +msgstr "Ð¡Ð±Ñ€Ð¾Ñ Ð¸Ð½Ñ‚ÐµÐ³Ñ€Ð°Ñ‚Ð¾Ñ€Ð°" + +#: ../canfestival/SlaveEditor.py:63 ../canfestival/NetworkEditor.py:84 +msgid "PDO Receive" +msgstr "PDO приема" + +#: ../canfestival/SlaveEditor.py:62 ../canfestival/NetworkEditor.py:83 +msgid "PDO Transmit" +msgstr "PDO передачи" + +msgid "PLC" +msgstr "ПЛК" + +#: ../targets/toolchain_gcc.py:131 +msgid "PLC :\n" +msgstr "ПЛК:\n" + +#: ../Beremiz.py:453 +msgid "PLC Log" +msgstr "Лог ПЛК" + +#: ../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." +msgstr "ПЛК незапущен." + +#: ../PLCOpenEditor.py:196 ../PLCOpenEditor.py:309 +#, python-brace-format +msgid "" +"PLC syntax error at line {a1}:\n" +"{a2}" +msgstr "" +"СинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° в Ñтроке {a1}:\n" +"{a2}" + +#: ../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 +msgid "PLCOpenEditor" +msgstr "PLCOpenEditor" + +#: ../PLCOpenEditor.py:355 +msgid "" +"PLCOpenEditor is part of Beremiz project.\n" +"\n" +"Beremiz is an " +msgstr "" +"PLCOpenEditor ÑвлÑетÑÑ Ñ‡Ð°Ñтью проекта Beremiz.\n" +"\n" +"Beremiz — " + +#: ../dialogs/DiscoveryDialog.py:95 +msgid "PORT" +msgstr "Порт" + +#: ../dialogs/PouDialog.py:100 +msgid "POU Name" +msgstr "Ð˜Ð¼Ñ POU" + +#: ../dialogs/PouDialog.py:58 +msgid "POU Name:" +msgstr "Ð˜Ð¼Ñ POU:" + +#: ../dialogs/PouDialog.py:102 +msgid "POU Type" +msgstr "Тип POU" + +#: ../dialogs/PouDialog.py:65 +msgid "POU Type:" +msgstr "Тип POU:" + +msgid "PV - SP" +msgstr "Ошибка, PV - SP" + +#: ../connectors/PYRO/__init__.py:45 +#, python-format +msgid "PYRO connecting to URI : %s\n" +msgstr "PYRO подключение к URI: %s\n" + +#: ../connectors/PYRO/__init__.py:61 +#, python-format +msgid "PYRO using certificates in '%s' \n" +msgstr "PYRO иÑпользует Ñертификаты в '%s'\n" + +#: ../PLCOpenEditor.py:118 ../Beremiz.py:336 +msgid "Page Setup" +msgstr "ÐаÑтройки Ñтраницы" + +#: ../controls/ProjectPropertiesPanel.py:110 +msgid "Page Size (optional):" +msgstr "Размер Ñтраницы (опционально):" + +#: ../IDEFrame.py:2599 +#, python-format +msgid "Page: %d" +msgstr "Страница: %d" + +#: ../controls/PouInstanceVariablesPanel.py:124 +msgid "Parent instance" +msgstr "РодительÑкий ÑкземплÑÑ€" + +#: ../editors/Viewer.py:598 ../IDEFrame.py:372 ../IDEFrame.py:426 +msgid "Paste" +msgstr "Ð’Ñтавить" + +#: ../IDEFrame.py:1865 +msgid "Paste POU" +msgstr "Ð’Ñтавить POU" + +#: ../dialogs/SearchInProjectDialog.py:56 +msgid "Pattern to search:" +msgstr "Шаблон поиÑка:" + +#: ../dialogs/LDPowerRailDialog.py:73 +msgid "Pin number:" +msgstr "Ðомер пина:" + +#: ../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" +msgstr "Введите текÑÑ‚" + +#: ../dialogs/ForceVariableDialog.py:163 +#, python-format +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 +msgid "Power Rail" +msgstr "Шина питаниÑ" + +#: ../dialogs/LDPowerRailDialog.py:50 +msgid "Power Rail Properties" +msgstr "СвойÑтва шины питаниÑ" + +msgid "Preset datetime" +msgstr "ОÑновное времÑ" + +#: ../PLCOpenEditor.py:120 ../Beremiz.py:338 +msgid "Preview" +msgstr "ПроÑмотр" + +#: ../dialogs/BlockPreviewDialog.py:57 +msgid "Preview:" +msgstr "ПроÑмотр:" + +#: ../PLCOpenEditor.py:122 ../PLCOpenEditor.py:148 ../Beremiz.py:340 +#: ../Beremiz.py:360 +msgid "Print" +msgstr "Печать" + +#: ../IDEFrame.py:1075 +msgid "Print preview" +msgstr "Предварительный проÑмотр" + +#: ../editors/ResourceEditor.py:68 +msgid "Priority" +msgstr "Приоритет" + +#: ../dialogs/SFCTransitionDialog.py:89 +msgid "Priority:" +msgstr "Приоритет:" + +#: ../runtime/PLCObject.py:370 +#, python-format +msgid "Problem starting PLC : error %d" +msgstr "Проблема запуÑка ПЛК: ошибка %d" + +msgid "Process variable" +msgstr "Текущее значение регулируемой переменной" + +#: ../dialogs/ProjectDialog.py:55 +msgid "Product Name" +msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°" + +#: ../controls/ProjectPropertiesPanel.py:80 +msgid "Product Name (required):" +msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð° (обÑзательно):" + +#: ../controls/ProjectPropertiesPanel.py:82 +msgid "Product Release (optional):" +msgstr "Релиз продукта (опцинально):" + +#: ../dialogs/ProjectDialog.py:56 +msgid "Product Version" +msgstr "ВерÑÐ¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð°" + +#: ../controls/ProjectPropertiesPanel.py:81 +msgid "Product Version (required):" +msgstr "ВерÑÐ¸Ñ Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚Ð° (обÑзательно):" + +#: ../dialogs/SearchInProjectDialog.py:38 ../IDEFrame.py:1744 +#: ../IDEFrame.py:1941 +msgid "Program" +msgstr "Программа" + +#: ../PLCOpenEditor.py:337 +msgid "Program was successfully generated!" +msgstr "Программа уÑпешно Ñгенерирована!" + +#: ../PLCControler.py:96 +msgid "Programs" +msgstr "Программы" + +#: ../editors/Viewer.py:242 +msgid "Programs can't be used by other POUs!" +msgstr "Программы не могут иÑпользоватьÑÑ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ POU!" + +#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:584 +msgid "Project" +msgstr "Проект" + +#: ../controls/SearchResultPanel.py:173 +#, python-format +msgid "Project '%s':" +msgstr "Проект '%s':" + +#: ../ProjectController.py:1814 +msgid "Project Files" +msgstr "Файлы проекта" + +#: ../dialogs/ProjectDialog.py:54 +msgid "Project Name" +msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð°" + +#: ../controls/ProjectPropertiesPanel.py:78 +msgid "Project Name (required):" +msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð° (обÑзательно):" + +#: ../controls/ProjectPropertiesPanel.py:79 +msgid "Project Version (optional):" +msgstr "ВерÑÐ¸Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð° (опционально):" + +#: ../PLCControler.py:3158 +msgid "" +"Project file syntax error:\n" +"\n" +msgstr "" +"СинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° в файле проекта:\n" +"\n" + +#: ../dialogs/ProjectDialog.py:32 ../editors/ProjectNodeEditor.py:37 +msgid "Project properties" +msgstr "СвойÑтва проекта" + +#: ../ConfigTreeNode.py:566 +#, python-brace-format +msgid "Project tree layout do not match confnode.xml {a1}!={a2} " +msgstr "Дерево проекта не ÑоответÑтвует confnode.xml {a1}!={a2} " + +#: ../dialogs/ConnectionDialog.py:94 +msgid "Propagate Name" +msgstr "Ð”Ð»Ñ Ð²Ñей цепи" + +#: ../PLCControler.py:97 +msgid "Properties" +msgstr "СвойÑтва" + +msgid "Proportionality constant" +msgstr "КоÑффициент пропорциональноÑти" + +#: ../Beremiz_service.py:440 +msgid "Publishing service on local network" +msgstr "Ð¡ÐµÑ€Ð²Ð¸Ñ Ð´Ð¾Ñтупен в локальной Ñети" + +#: ../connectors/PYRO/__init__.py:118 +#, python-format +msgid "Pyro exception: %s\n" +msgstr "ИÑключение Pyro: %s\n" + +#: ../Beremiz_service.py:427 +msgid "Pyro object's uri :" +msgstr "URI Ð´Ð»Ñ Pyro :" + +#: ../Beremiz_service.py:426 +msgid "Pyro port :" +msgstr "Порт Pyro :" + +#: ../py_ext/PythonEditor.py:81 +msgid "Python code" +msgstr "Код на python" + +#: ../features.py:33 +msgid "Python file" +msgstr "Python файл" + +#: ../dialogs/ActionBlockDialog.py:38 +msgid "Qualifier" +msgstr "Спецификатор" + +#: ../PLCOpenEditor.py:128 ../Beremiz.py:343 ../Beremiz_service.py:273 +msgid "Quit" +msgstr "Выход" + +msgid "Ramp duration" +msgstr "ДлительноÑÑ‚ÑŒ нараÑтаниÑ" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:225 +msgid "Range:" +msgstr "Диапазон:" + +#: ../ProjectController.py:1810 +msgid "Raw IEC code" +msgstr "ÐœÐК-код" + +#: ../Beremiz.py:1143 +#, python-format +msgid "Really delete node '%s'?" +msgstr "ДейÑтвительно удалить Ñлемент '%s'?" + +#: ../IDEFrame.py:362 ../IDEFrame.py:422 +msgid "Redo" +msgstr "Повторить" + +#: ../dialogs/SFCTransitionDialog.py:74 +msgid "Reference" +msgstr "СÑылка" + +#: ../dialogs/DiscoveryDialog.py:106 ../IDEFrame.py:432 +msgid "Refresh" +msgstr "Обновить" + +#: ../dialogs/SearchInProjectDialog.py:66 +msgid "Regular expression" +msgstr "РегулÑрное выражение" + +#: ../dialogs/FindInPouDialog.py:98 +msgid "Regular expressions" +msgstr "РегулÑрные выражениÑ" + +#: ../editors/Viewer.py:1556 +msgid "Release value" +msgstr "ОÑвободить значение" + +#: ../plcopen/iec_std.csv:37 +msgid "Remainder (modulo)" +msgstr "ОÑтаток от Ð´ÐµÐ»ÐµÐ½Ð¸Ñ (modulo)" + +#: ../Beremiz.py:1144 +#, python-format +msgid "Remove %s node" +msgstr "Удалить %s Ñлемент" + +#: ../IDEFrame.py:2405 +msgid "Remove Datatype" +msgstr "Удалить тип данных" + +#: ../IDEFrame.py:2410 +msgid "Remove Pou" +msgstr "Удалить POU" + +#: ../dialogs/ActionBlockDialog.py:138 +msgid "Remove action" +msgstr "Удалить дейÑтвие" + +#: ../editors/DataTypeEditor.py:353 +msgid "Remove element" +msgstr "Удалить Ñлемент" + +#: ../editors/FileManagementPanel.py:63 +msgid "Remove file from left folder" +msgstr "Удалить файл из левой директории" + +#: ../editors/ResourceEditor.py:269 +msgid "Remove instance" +msgstr "Удалить ÑкземплÑÑ€" + +#: ../canfestival/NetworkEditor.py:104 +msgid "Remove slave" +msgstr "Удалить ведомое уÑтройÑтво" + +#: ../editors/ResourceEditor.py:240 +msgid "Remove task" +msgstr "Удалить задачу" + +#: ../editors/CodeFileEditor.py:659 ../controls/VariablePanel.py:451 +msgid "Remove variable" +msgstr "Удалить переменную" + +#: ../IDEFrame.py:1945 +msgid "Rename" +msgstr "Переименовать" + +#: ../editors/FileManagementPanel.py:181 +msgid "Replace File" +msgstr "Заменить файл" + +#: ../editors/Viewer.py:502 +msgid "Replace Wire by connections" +msgstr "Заменить цепь подключениÑми" + +#: ../plcopen/iec_std.csv:89 +msgid "Replacement (within)" +msgstr "Замена подÑтроки" + +#: ../dialogs/LDElementDialog.py:76 +msgid "Reset" +msgstr "СброÑ" + +#: ../editors/Viewer.py:583 +msgid "Reset Execution Order" +msgstr "СброÑить порÑдок иÑполнениÑ" + +#: ../IDEFrame.py:451 +msgid "Reset Perspective" +msgstr "СброÑить предÑтавление" + +#: ../controls/SearchResultPanel.py:105 +msgid "Reset search result" +msgstr "СброÑить результаты поиÑка" + +msgid "Reset time" +msgstr "ПоÑтоÑÐ½Ð½Ð°Ñ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð¸ интегрированиÑ" + +#: ../PLCControler.py:97 ../Beremiz.py:1075 +msgid "Resources" +msgstr "РеÑурÑÑ‹" + +#: ../controls/VariablePanel.py:62 +msgid "Retain" +msgstr "Retain" + +#: ../controls/VariablePanel.py:424 +msgid "Return Type:" +msgstr "Возвращаемый тип:" + +#: ../editors/Viewer.py:487 +msgid "Right" +msgstr "Право" + +#: ../dialogs/LDPowerRailDialog.py:63 +msgid "Right PowerRail" +msgstr "ÐŸÑ€Ð°Ð²Ð°Ñ ÑˆÐ¸Ð½Ð° питаниÑ" + +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:461 +msgid "Rising Edge" +msgstr "ÐараÑтающий фронт" + +#: ../plcopen/iec_std.csv:65 +msgid "Rotate left" +msgstr "ЦикличеÑкий Ñдвиг влево" + +#: ../plcopen/iec_std.csv:64 +msgid "Rotate right" +msgstr "ЦикличеÑкий Ñдвиг вправо" + +#: ../plcopen/iec_std.csv:17 +msgid "Rounding up/down" +msgstr "Округление вверх/вниз" + +#: ../ProjectController.py:1778 +msgid "Run" +msgstr "Старт" + +#: ../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 +msgid "SDO Client" +msgstr "SDO клиент" + +#: ../canfestival/SlaveEditor.py:60 ../canfestival/NetworkEditor.py:81 +msgid "SDO Server" +msgstr "SDO Ñервер" + +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 +msgid "SFC" +msgstr "SFC" + +#: ../PLCGenerator.py:1392 +#, python-brace-format +msgid "SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"" +msgstr "БезуÑловный переход в POU \"{a1}\" ÑÑылаетÑÑ Ð½Ð° неÑущеÑтвующий SFC шаг \"{a2}\"" + +#: ../PLCGenerator.py:773 +#, python-format +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 +msgid "ST" +msgstr "ST" + +#: ../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|Ð’Ñе файлы|*.*" + +#: ../features.py:35 +msgid "SVGUI" +msgstr "SVGUI" + +msgid "Sampling period" +msgstr "Период ÑÑмплированиÑ" + +#: ../PLCOpenEditor.py:111 ../PLCOpenEditor.py:146 ../Beremiz.py:327 +#: ../Beremiz.py:358 +msgid "Save" +msgstr "Сохранить" + +#: ../PLCOpenEditor.py:113 ../PLCOpenEditor.py:147 ../Beremiz.py:359 +msgid "Save As..." +msgstr "Сохранить как..." + +#: ../Beremiz.py:329 +msgid "Save as" +msgstr "Сохранить как" + +#: ../ProjectController.py:420 +msgid "Save path is the same as path of a project! \n" +msgstr "Выбранный путь Ñовпадает Ñ Ð¿ÑƒÑ‚Ñ‘Ð¼ проекта!\n" + +#: ../dialogs/SearchInProjectDialog.py:69 +msgid "Scope" +msgstr "ОблаÑÑ‚ÑŒ дейÑтвиÑ" + +#: ../IDEFrame.py:623 +msgid "Search" +msgstr "ПоиÑк" + +#: ../dialogs/SearchInProjectDialog.py:44 ../IDEFrame.py:382 ../IDEFrame.py:428 +msgid "Search in Project" +msgstr "ПоиÑк в проекте" + +#: ../dialogs/DurationEditorDialog.py:46 +msgid "Seconds:" +msgstr "Секунды:" + +#: ../IDEFrame.py:388 +msgid "Select All" +msgstr "Выделить вÑе" + +#: ../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 "Выберите ÑкземплÑÑ€" + +#: ../IDEFrame.py:607 +msgid "Select an object" +msgstr "Выберите объект" + +#: ../ProjectController.py:427 +msgid "Selected directory already contains another project. Overwrite? \n" +msgstr "Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ ÑƒÐ¶Ðµ Ñодержит другой проект. ПерезапиÑать?\n" + +#: ../plcopen/iec_std.csv:70 +msgid "Selection" +msgstr "Выбор" + +#: ../dialogs/SFCDivergenceDialog.py:65 +msgid "Selection Convergence" +msgstr "Ðльтернативное объединение" + +#: ../dialogs/SFCDivergenceDialog.py:64 +msgid "Selection Divergence" +msgstr "Ðльтернативное ветвление" + +#: ../dialogs/DiscoveryDialog.py:82 +msgid "Service Discovery" +msgstr "ПоиÑк ÑервиÑа" + +#: ../dialogs/DiscoveryDialog.py:85 +msgid "Services available:" +msgstr "СервиÑÑ‹ доÑтупны:" + +#: ../dialogs/LDElementDialog.py:76 +msgid "Set" +msgstr "УÑтановить" + +msgid "Set point" +msgstr "УÑтавка" + +#: ../plcopen/iec_std.csv:62 +msgid "Shift left" +msgstr "Сдвиг влево" + +#: ../plcopen/iec_std.csv:63 +msgid "Shift right" +msgstr "Сдвиг вправо" + +#: ../ProjectController.py:1804 +msgid "Show IEC code generated by PLCGenerator" +msgstr "Показать год, Ñгенерированный PLCGenerator" + +#: ../canfestival/canfestival.py:387 +msgid "Show Master" +msgstr "Показать ведущего" + +#: ../canfestival/canfestival.py:388 +msgid "Show Master generated by config_utils" +msgstr "Показать ведущий узел Ñгенерированный config_utils" + +#: ../ProjectController.py:1802 +msgid "Show code" +msgstr "Показать код" + +#: ../dialogs/SFCDivergenceDialog.py:67 +msgid "Simultaneous Convergence" +msgstr "Параллельное объединение" + +#: ../dialogs/SFCDivergenceDialog.py:66 +msgid "Simultaneous Divergence" +msgstr "Параллельное ветвление" + +#: ../plcopen/iec_std.csv:27 +msgid "Sine" +msgstr "СинуÑ" + +#: ../editors/ResourceEditor.py:68 +msgid "Single" +msgstr "ИÑточник" + +#: ../targets/toolchain_makefile.py:126 +msgid "Source didn't change, no build.\n" +msgstr "ИÑходные файлы не изменилиÑÑŒ, Ñборка не нужна.\n" + +#: ../PLCGenerator.py:397 +#, python-brace-format +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 +msgid "Start PLC" +msgstr "ЗапуÑтить ПЛК" + +#: ../ProjectController.py:984 +#, python-format +msgid "Start build in %s\n" +msgstr "Сборка запущена в %s\n" + +#: ../ProjectController.py:1298 +msgid "Started" +msgstr "Работа" + +#: ../ProjectController.py:1586 +msgid "Starting PLC\n" +msgstr "ПЛК запуÑкаетÑÑ\n" + +#: ../Beremiz.py:463 +msgid "Status ToolBar" +msgstr "Панель ÑтатуÑа" + +#: ../editors/Viewer.py:553 ../editors/Viewer.py:2342 +msgid "Step" +msgstr "Шаг" + +#: ../ProjectController.py:1783 +msgid "Stop" +msgstr "Стоп" + +#: ../Beremiz_service.py:262 +msgid "Stop PLC" +msgstr "ОÑтановить ПЛК" + +#: ../ProjectController.py:1785 +msgid "Stop Running PLC" +msgstr "ОÑтановить запущенный ПЛК" + +#: ../ProjectController.py:1299 +msgid "Stopped" +msgstr "Стоп" + +#: ../ProjectController.py:1558 +msgid "Stopping debugger...\n" +msgstr "ОÑтановка отладчика...\n" + +#: ../editors/DataTypeEditor.py:54 +msgid "Structure" +msgstr "Структура" + +#: ../editors/DataTypeEditor.py:54 +msgid "Subrange" +msgstr "Поддиапазон" + +#: ../plcopen/iec_std.csv:35 +msgid "Subtraction" +msgstr "Вычитание" + +#: ../ProjectController.py:1023 +msgid "Successfully built.\n" +msgstr "Сборка прошла уÑпешно.\n" + +#: ../IDEFrame.py:447 +msgid "Switch perspective" +msgstr "Сменить предÑтавление" + +msgid "Sync_Align" +msgstr "" + +msgid "Sync_Align_Ratio" +msgstr "" + +msgid "Sync_TPDOs" +msgstr "" + +#: ../dialogs/SearchInProjectDialog.py:165 ../dialogs/FindInPouDialog.py:172 +msgid "Syntax error in regular expression of pattern to search!" +msgstr "СинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° в регулÑрном выражении шаблона поиÑка!" + +#: ../dialogs/DiscoveryDialog.py:93 +msgid "TYPE" +msgstr "Тип" + +#: ../plcopen/iec_std.csv:29 +msgid "Tangent" +msgstr "ТангенÑ" + +msgid "TargetType" +msgstr "Ð¦ÐµÐ»ÐµÐ²Ð°Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ð°" + +#: ../editors/ResourceEditor.py:83 +msgid "Task" +msgstr "Задача" + +#: ../editors/ResourceEditor.py:235 +msgid "Tasks:" +msgstr "Задачи:" + +#: ../controls/VariablePanel.py:73 +msgid "Temp" +msgstr "Временный" + +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 +#, python-format +msgid "" +"The file '%s' already exist.\n" +"Do you want to replace it?" +msgstr "" +"Файл '%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 +#, python-format +msgid "There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?" +msgstr "СущеÑтвует POU Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ \"%s\". Ðто может вызвать конфликт. Хотите продолжить?" + +#: ../IDEFrame.py:1098 +msgid "" +"There was a problem printing.\n" +"Perhaps your current printer is not set correctly?" +msgstr "" +"Произошла проблема во Ð²Ñ€ÐµÐ¼Ñ Ð¿ÐµÑ‡Ð°Ñ‚Ð¸.\n" +"Возможно, текущий принтер не наÑтроен?" + +#: ../editors/LDViewer.py:891 +msgid "This option isn't available yet!" +msgstr "Ðто Ð¾Ð¿Ñ†Ð¸Ñ ÐµÑ‰Ðµ не доÑтупна!" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:565 +#, python-format +msgid "Tick: %d" +msgstr "Цикл: %d" + +#: ../plcopen/iec_std.csv:40 +msgid "Time" +msgstr "ВремÑ" + +#: ../plcopen/iec_std.csv:40 ../plcopen/iec_std.csv:41 +msgid "Time addition" +msgstr "Сложение времени" + +#: ../plcopen/iec_std.csv:86 +msgid "Time concatenation" +msgstr "Объединение времен" + +#: ../plcopen/iec_std.csv:60 ../plcopen/iec_std.csv:61 +msgid "Time division" +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 +msgid "Top" +msgstr "Верх" + +#: ../ProjectController.py:1792 +msgid "Transfer" +msgstr "Передать" + +#: ../ProjectController.py:1794 +msgid "Transfer PLC" +msgstr "Передать ПЛК" + +#: ../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 +msgid "Transition" +msgstr "Переход" + +#: ../PLCGenerator.py:1518 +#, python-format +msgid "Transition \"%s\" body must contain an output variable or coil referring to its name" +msgstr "Тело перехода \"%s\" должно Ñодержать выходную переменную или катушку, ÑÑылающуюÑÑ Ð½Ð° его имÑ" + +#: ../dialogs/PouTransitionDialog.py:89 +msgid "Transition Name" +msgstr "Ð˜Ð¼Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð°" + +#: ../dialogs/PouTransitionDialog.py:58 +msgid "Transition Name:" +msgstr "Ð˜Ð¼Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð°:" + +#: ../PLCGenerator.py:1609 +#, python-brace-format +msgid "Transition with content \"{a1}\" not connected to a next step in \"{a2}\" POU" +msgstr "Переход Ñ Ñодержимым \"{a1}\" не подключен к Ñледующему шагу в POU \"{a2}\"" + +#: ../PLCGenerator.py:1598 +#, python-brace-format +msgid "Transition with content \"{a1}\" not connected to a previous step in \"{a2}\" POU" +msgstr "Переход Ñ Ñодержимым \"{a1}\" не подключен к предыдущему шагу в POU \"{a2}\"" + +#: ../plcopen/plcopen.py:1318 +#, python-format +msgid "Transition with name %s doesn't exist!" +msgstr "Переход Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ %s отÑутÑтвует!" + +#: ../PLCControler.py:96 +msgid "Transitions" +msgstr "Переходы" + +#: ../dialogs/AboutDialog.py:123 +msgid "Translated by" +msgstr "Перевод" + +#: ../editors/ResourceEditor.py:68 +msgid "Triggering" +msgstr "ЗапуÑк" + +#: ../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 +msgid "Type" +msgstr "Тип" + +#: ../dialogs/BrowseLocationsDialog.py:48 +msgid "Type and derivated" +msgstr "Тип и его производные" + +#: ../canfestival/config_utils.py:336 ../canfestival/config_utils.py:624 +#, python-format +msgid "Type conflict for location \"%s\"" +msgstr "Конфликт типов \"%s\"" + +#: ../plcopen/iec_std.csv:16 +msgid "Type conversion" +msgstr "Преобразование типов" + +#: ../editors/DataTypeEditor.py:162 +msgid "Type infos:" +msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ типе:" + +#: ../dialogs/BrowseLocationsDialog.py:49 +msgid "Type strict" +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 +msgid "Type:" +msgstr "Тип:" + +msgid "URI_location" +msgstr "URI ÑиÑтемы иÑполнениÑ" + +#: ../canfestival/config_utils.py:462 ../canfestival/config_utils.py:476 +#, python-format +msgid "Unable to define PDO mapping for node %02x" +msgstr "Ðевозможно определить отображение PDO Ð´Ð»Ñ ÑƒÐ·Ð»Ð° %02x" + +#: ../targets/Xenomai/__init__.py:39 +#, python-format +msgid "Unable to get Xenomai's %s \n" +msgstr "Ðевозможно получить Xenomai %s\n" + +#: ../PLCGenerator.py:961 ../PLCGenerator.py:1214 +#, python-brace-format +msgid "Undefined block type \"{a1}\" in \"{a2}\" POU" +msgstr "Ðеопределенный тип блока \"{a1}\" в POU \"{a2}\"" + +#: ../PLCGenerator.py:254 +#, python-format +msgid "Undefined pou type \"%s\"" +msgstr "Ðеопределенный тип POU \"%s\"" + +#: ../IDEFrame.py:360 ../IDEFrame.py:421 +msgid "Undo" +msgstr "Отмена" + +#: ../ProjectController.py:332 +msgid "Unknown" +msgstr "ÐеизвеÑтно" + +#: ../editors/Viewer.py:393 +#, python-format +msgid "Unknown variable \"%s\" for this POU!" +msgstr "ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ \"%s\" Ð´Ð»Ñ Ñтого POU!" + +#: ../ProjectController.py:329 ../ProjectController.py:330 +msgid "Unnamed" +msgstr "Unnamed" + +#: ../PLCControler.py:636 +#, python-format +msgid "Unnamed%d" +msgstr "Unnamed%d" + +#: ../controls/VariablePanel.py:284 +#, python-format +msgid "Unrecognized data size \"%s\"" +msgstr "Ðеопределенный размер данных \"%s\"" + +#: ../editors/DataTypeEditor.py:632 ../controls/VariablePanel.py:798 +msgid "User Data Types" +msgstr "ПользовательÑкие типы данных" + +#: ../canfestival/SlaveEditor.py:65 ../canfestival/NetworkEditor.py:86 +msgid "User Type" +msgstr "ПользовательÑкий тип" + +#: ../PLCControler.py:95 +msgid "User-defined POUs" +msgstr "ПользовательÑкие POU" + +#: ../dialogs/ActionBlockDialog.py:38 +msgid "Value" +msgstr "Значение" + +#: ../editors/DataTypeEditor.py:259 +msgid "Values:" +msgstr "ЗначениÑ:" + +#: ../dialogs/ActionBlockDialog.py:42 ../editors/Viewer.py:526 +#: ../editors/Viewer.py:2374 +msgid "Variable" +msgstr "ПеременнаÑ" + +#: ../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 +msgid "Variable Drop" +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 +msgid "Variable class" +msgstr "КлаÑÑ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð¾Ð¹" + +#: ../editors/Viewer.py:395 ../editors/TextViewer.py:387 +msgid "Variable don't belong to this POU!" +msgstr "ÐŸÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð½Ðµ принадлежит Ñтому POU!" + +#: ../dialogs/LDElementDialog.py:89 +msgid "Variable:" +msgstr "ПеременнаÑ:" + +#: ../controls/VariablePanel.py:72 +msgid "Variables" +msgstr "Переменные" + +#: ../controls/ProjectPropertiesPanel.py:151 +msgid "Vertical:" +msgstr "Вертикальный:" + +#: ../Beremiz_service.py:586 +msgid "WAMP client startup failed. " +msgstr "Ошибка импорта WAMP. " + +#: ../connectors/WAMP/__init__.py:91 +#, python-format +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 +#, python-format +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 +msgid "WXGLADE GUI" +msgstr "WXGLADE GUI" + +#: ../dialogs/PouDialog.py:128 ../editors/LDViewer.py:891 +msgid "Warning" +msgstr "Предупреждение" + +#: ../ProjectController.py:616 +msgid "Warnings in ST/IL/SFC code generator :\n" +msgstr "ÐŸÑ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ñ Ð² ST/IL/SFC коде генераторе:\n" + +#: ../dialogs/SearchInProjectDialog.py:78 +msgid "Whole Project" +msgstr "Целый проект" + +#: ../controls/ProjectPropertiesPanel.py:119 +msgid "Width:" +msgstr "Ширина:" + +msgid "Win32" +msgstr "Win32" + +#: ../dialogs/FindInPouDialog.py:93 +msgid "Wrap search" +msgstr "Продолжить поиÑк Ñначала" + +#: ../dialogs/AboutDialog.py:122 +msgid "Written by" +msgstr "Ðвторы" + +#: ../features.py:34 +msgid "WxGlade GUI" +msgstr "WxGlade GUI" + +msgid "XenoConfig" +msgstr "ÐаÑтройки Xenomai" + +msgid "Xenomai" +msgstr "Xenomai" + +#: ../svgui/svgui.py:139 +msgid "" +"You don't have write permissions.\n" +"Open Inkscape anyway ?" +msgstr "" +"У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно прав Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи.\n" +"Открыть Inkscape вÑе равно?" + +#: ../wxglade_hmi/wxglade_hmi.py:137 +msgid "" +"You don't have write permissions.\n" +"Open wxGlade anyway ?" +msgstr "" +"У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно прав Ð´Ð»Ñ Ð·Ð°Ð¿Ð¸Ñи.\n" +"Открыть wxGlade вÑе равно?" + +#: ../ProjectController.py:292 +msgid "" +"You must have permission to work on the project\n" +"Work on a project copy ?" +msgstr "" +"Ð’Ñ‹ должны иметь права на запиÑÑŒ, чтобы работать Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð¾Ð¼\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!" +msgstr "Введите имÑ!" + +#: ../dialogs/ForceVariableDialog.py:175 +msgid "You must type a value!" +msgstr "Введите значение!" + +#: ../IDEFrame.py:438 +msgid "Zoom" +msgstr "Приближение" + +msgid "class" +msgstr "клаÑÑ" + +#: ../dialogs/DurationEditorDialog.py:151 +msgid "days" +msgstr "дни" + +msgid "desc" +msgstr "" + +#: ../PLCOpenEditor.py:333 +#, python-format +msgid "error: %s\n" +msgstr "ошибка: %s\n" + +#: ../util/ProcessLogger.py:169 +#, python-brace-format +msgid "exited with status {a1} (pid {a2})\n" +msgstr "завершилÑÑ Ñ ÐºÐ¾Ð´Ð¾Ð¼ {a1} (pid {a2})\n" + +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 +msgid "file : " +msgstr "файл:" + +msgid "first input parameter" +msgstr "первый входной параметр" + +msgid "first output parameter" +msgstr "первый выходной параметр" + +#: ../dialogs/PouDialog.py:31 +msgid "function" +msgstr "функциÑ" + +#: ../PLCOpenEditor.py:399 +msgid "function : " +msgstr "функциÑ: " + +#: ../dialogs/PouDialog.py:31 +msgid "functionBlock" +msgstr "функциональный блок" + +#: ../dialogs/DurationEditorDialog.py:151 +msgid "hours" +msgstr "чаÑÑ‹" + +msgid "initial" +msgstr "иÑходный" + +msgid "internal state: 0-reset, 1-counting, 2-set" +msgstr "ÑоÑтоÑние: 0 - ÑброÑ, 1 - Ñчёт, 2 - уÑтановка" + +#: ../PLCOpenEditor.py:399 +msgid "line : " +msgstr "Ñтрока:" + +#: ../dialogs/DurationEditorDialog.py:153 +msgid "milliseconds" +msgstr "милиÑекунды" + +#: ../dialogs/DurationEditorDialog.py:152 +msgid "minutes" +msgstr "минуты" + +msgid "name" +msgstr "имÑ" + +msgid "onchange" +msgstr "" + +msgid "opts" +msgstr "" + +#: ../dialogs/PouDialog.py:31 +msgid "program" +msgstr "программа" + +msgid "second input parameter" +msgstr "второй входной параметр" + +msgid "second output parameter" +msgstr "второй выходной параметр" + +#: ../dialogs/DurationEditorDialog.py:152 +msgid "seconds" +msgstr "Ñекунды" + +#: ../plcopen/iec_std.csv:84 +msgid "string from the middle" +msgstr "Ñтрока из Ñередины" + +#: ../plcopen/iec_std.csv:82 +msgid "string left of" +msgstr "Ñтрока Ñлева от " + +#: ../plcopen/iec_std.csv:83 +msgid "string right of" +msgstr "Ñтрока Ñправа от " + +msgid "type" +msgstr "тип" + +#: ../Beremiz.py:126 +msgid "update info unavailable." +msgstr "Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾Ð± обновлениÑÑ… недоÑтупна." + +msgid "variable" +msgstr "переменнаÑ" + +msgid "variables" +msgstr "переменные" + +#: ../PLCOpenEditor.py:331 +#, python-format +msgid "warning: %s\n" +msgstr "предупреждение: %s\n" + +#: ../PLCControler.py:970 +#, python-brace-format +msgid "{a1} \"{a2}\" can't be pasted as a {a3}." +msgstr "{a1} \"{a2}\" не может быть вÑтавлен как {a3}." + +#: ../ConfigTreeNode.py:56 +#, python-brace-format +msgid "" +"{a1} XML file doesn't follow XSD schema at line %{a2}:\n" +"{a3}" +msgstr "" +"{a1} XML файл не Ñледует XSD-Ñхеме в Ñтроке {a2}:\n" +"{a3}" + +#~ msgid "" +#~ "\n" +#~ "An error has occurred.\n" +#~ "\n" +#~ "Click OK to save an error report.\n" +#~ "\n" +#~ "Please be kind enough to send this file to:\n" +#~ "edouard.tisserant@gmail.com\n" +#~ "\n" +#~ "Error:\n" +#~ msgstr "" +#~ "\n" +#~ "Произошла ошибка.\n" +#~ "\n" +#~ "Ðажмите OK, чтобы Ñохранить репорт об ошибке.\n" +#~ "\n" +#~ "Будьте так добры, пошлите Ñтот файл:\n" +#~ "edouard.tisserant@gmail.com\n" +#~ "\n" +#~ "Ошибка:\n" + +#~ msgid " -> Nothing to do\n" +#~ msgstr " -> Ðичего не нужно делать\n" + +#~ msgid " : " +#~ msgstr " : " + +#~ msgid "\"%s\" element can't be pasted here!!!" +#~ msgstr "Ðлемент \"%s\" не может быть вÑтавлен Ñюда!!!" + +#~ msgid "... debugger recovered\n" +#~ msgstr "... отладчик воÑÑтановлен\n" + +#~ msgid "About Beremiz" +#~ msgstr "О Beremiz" + +#~ msgid "About PLCOpenEditor" +#~ msgstr "О PLCOpenEditor" + +#~ msgid "Clear the graph values" +#~ msgstr "ОчиÑтить Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð° графике" + +#~ msgid "" +#~ "Derivative\n" +#~ "The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." +#~ msgstr "" +#~ "ПроизводнаÑ\n" +#~ "Функциональный блок формирует выход XOUT пропорционально чаÑтоте Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²Ñ…Ð¾Ð´Ð° XIN." + +#~ msgid "Description" +#~ msgstr "ОпиÑание" + +#~ msgid "" +#~ "Down-counter\n" +#~ "The down-counter can be used to signal when a count has reached zero, on counting down from a preset value." +#~ msgstr "" +#~ "Декрементный Ñчетчик\n" +#~ "Декрементный Ñчетчик может иÑпользоватьÑÑ, когда необходимо Ñигнализировать, что Ñчетчик доÑтиг нулевого Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ Ð¸Ñходного заданного значениÑ." + +#~ msgid "Enable_Native_Library" +#~ msgstr "Разрешить библиотеку Native" + +#~ msgid "" +#~ "Falling edge detector\n" +#~ "The output produces a single pulse when a falling edge is detected." +#~ msgstr "" +#~ "Детектор падающего фронта\n" +#~ "Ðа выходе формируетÑÑ Ð¾Ð´Ð¸Ð½Ð¾Ñ‡Ð½Ñ‹Ð¹ импульÑ, еÑли обнаружен падающий фронт." + +#~ msgid "Form isn't complete. Pattern to search must be filled!" +#~ msgstr "Форма заполнена неполноÑтью. Шаблон поиÑка должен быть заполнен!" + +#~ msgid "" +#~ "Hysteresis\n" +#~ "The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2." +#~ msgstr "" +#~ "ГиÑтерезиÑ\n" +#~ "Функциональный блок формирует диÑкретный выход Ñ Ð³Ð¸ÑтерезиÑом в завиÑимоÑти от разницы двух вещеÑтвенных входов XIN1 и XIN2." + +#~ msgid "IEC-61131-3 code generation failed !\n" +#~ msgstr "ÐÐµÑƒÐ´Ð°Ñ‡Ð½Ð°Ñ Ð³ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ ÐœÐК-61131-3 кода!\n" + +#~ msgid "In section: " +#~ msgstr "Ð’ Ñекции: " + +#~ msgid "Initial" +#~ msgstr "ИÑходное значение" + +#~ msgid "" +#~ "Integral\n" +#~ "The integral function block integrates the value of input XIN over time." +#~ msgstr "" +#~ "Интеграл\n" +#~ "Функциональный блок интегрирует входное значение 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 "Ð’Ñ‹Ñ…Ð¾Ð´Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð½Ðµ найдена" + +#~ msgid "" +#~ "Off-delay timer\n" +#~ "The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." +#~ msgstr "" +#~ "Таймер выключениÑ\n" +#~ "Таймер Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть иÑпользован, чтобы внеÑти задержку уÑтановки выхода в FALSE на фикÑированный период времени поÑле того, как вход Ñтал FALSE." + +#~ msgid "" +#~ "On-delay timer\n" +#~ "The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." +#~ msgstr "" +#~ "Таймер включениÑ\n" +#~ "Таймер Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть иÑпользован, чтобы внеÑти задержку уÑтановки выхода в TRUE на фикÑированный период времени поÑле того, как вход Ñтал TRUE." + +#~ msgid "" +#~ "PID\n" +#~ "The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." +#~ msgstr "" +#~ "ПИД\n" +#~ "ПИД (Пропорциональный Интегральный Дифференциальный) ФБ - клаÑÑичеÑкий регулÑтор, иÑпользуемый в ÑиÑтемах Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾Ð¹ ÑвÑзью." + +#~ msgid "Position:" +#~ msgstr "ПозициÑ:" + +#~ msgid "" +#~ "Pulse timer\n" +#~ "The pulse timer can be used to generate output pulses of a given time duration." +#~ msgstr "" +#~ "Генератор импульÑов\n" +#~ "Функциональный блок иÑпользуетÑÑ Ð´Ð»Ñ Ð³ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ð¸ выходных импульÑов заданной длительноÑти." + +#~ msgid "" +#~ "RS bistable\n" +#~ "The RS bistable is a latch where the Reset dominates." +#~ msgstr "" +#~ "RS триггер\n" +#~ "RS триггер - переключатель Ñ Ð´Ð¾Ð¼Ð¸Ð½Ð°Ð½Ñ‚Ð¾Ð¹ выключениÑ." + +#~ msgid "" +#~ "Ramp\n" +#~ "The RAMP function block is modelled on example given in the standard." +#~ msgstr "" +#~ "Ограничитель ÑкороÑти Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ñигнала\n" +#~ "Функциональный блок напиÑан ÑоглаÑно примеру, приведенному в Ñтандарте." + +#~ msgid "" +#~ "Real time clock\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." +#~ msgstr "" +#~ "RTC чаÑÑ‹\n" +#~ "ЧаÑÑ‹ реального времени иÑпользуетÑÑ Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð¼ÐµÑ‚Ð¾Ðº времени, уÑтановки даты и времени Ð´Ð½Ñ Ð² отчетах, ÑообщениÑÑ… об авариÑÑ… и пр." + +#~ msgid "Remove debug variable" +#~ msgstr "Удалить отлаживаемую переменную" + +#~ msgid "Reset zoom and offset" +#~ msgstr "СброÑить приближение и Ñмещение" + +#~ msgid "" +#~ "Rising edge detector\n" +#~ "The output produces a single pulse when a rising edge is detected." +#~ msgstr "" +#~ "Детектор нараÑтающего фронта\n" +#~ "Ðа выходе формируетÑÑ Ð¾Ð´Ð¸Ð½Ð¾Ñ‡Ð½Ñ‹Ð¹ импульÑ, еÑли обнаружен нараÑтающий фронт." + +#~ msgid "" +#~ "SR bistable\n" +#~ "The SR bistable is a latch where the Set dominates." +#~ msgstr "" +#~ "SR триггер\n" +#~ "SR триггер - переключатель Ñ Ð´Ð¾Ð¼Ð¸Ð½Ð°Ð½Ñ‚Ð¾Ð¹ включениÑ." + +#~ msgid "" +#~ "Semaphore\n" +#~ "The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." +#~ msgstr "" +#~ "Семафор\n" +#~ "Семафор предоÑтавлÑет Ñобой программный механизм Ñинхронизации Ð´Ð»Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸Ñключительного доÑтупа к определенным реÑурÑам." + +#~ msgid "Tick" +#~ msgstr "Тик" + +#~ msgid "" +#~ "Up-counter\n" +#~ "The up-counter can be used to signal when a count has reached a maximum value." +#~ msgstr "" +#~ "Инкрементный Ñчетчик\n" +#~ "Инкрементный Ñчетчик может иÑпользоватьÑÑ, когда необходимо Ñигнализировать, что Ñчетчик доÑтиг макÑимального значениÑ." + +#~ msgid "" +#~ "Up-down counter\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." +#~ msgstr "" +#~ "Инкрементный/декрементный Ñчетчик\n" +#~ "Инкрементный/декрементный Ñчетчик имеет два входа CU и CD. Он может иÑпользоватьÑÑ Ð´Ð»Ñ Ñчета вверх по одному входу и Ð´Ð»Ñ Ñчета низ по другому." + +#~ msgid "Values" +#~ msgstr "ЗначениÑ" + +#~ msgid "Waiting debugger to recover...\n" +#~ msgstr "Ожидание воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ñ‚Ð»Ð°Ð´Ñ‡Ð¸ÐºÐ°...\n" + +#~ msgid "Zoom:" +#~ msgstr "Приближение:" + +#~ msgid "about.html" +#~ msgstr "about.ru.html" + +#~ msgid "plcopen_about.html" +#~ msgstr "plcopen_about.ru.html" diff -r a375e31bf312 -r c1298e7ffe3a i18n/app.fil --- 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 -../runtime/PLCObject.py +../canfestival/canfestival.py ../canfestival/SlaveEditor.py ../canfestival/config_utils.py -../canfestival/canfestival.py ../canfestival/NetworkEditor.py -../Beremiz_service.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 +../dialogs/PouDialog.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/Generic/XSD +../targets/XSD_toolchain_makefile +../targets/Xenomai/__init__.py +../targets/Xenomai/XSD +../targets/XSD_toolchain_gcc +../targets/PLC/XSD +../targets/__init__.py +../targets/toolchain_gcc.py +../targets/toolchain_makefile.py +../targets/Linux/XSD +../targets/Win32/XSD +../PLCControler.py +../PLCOpenEditor.py +../py_ext/PythonEditor.py +../py_ext/PythonFileCTNMixin.py +../wxglade_hmi/wxglade_hmi.py +../runtime/NevowServer.py +../runtime/PLCObject.py +../runtime/ServicePublisher.py +../ConfigTreeNode.py +../editors/ConfTreeNodeEditor.py +../editors/ResourceEditor.py +../editors/Viewer.py +../editors/LDViewer.py +../editors/DataTypeEditor.py +../editors/IECCodeViewer.py +../editors/TextViewer.py +../editors/ProjectNodeEditor.py +../editors/EditorPanel.py +../editors/DebugViewer.py +../editors/SFCViewer.py +../editors/FileManagementPanel.py +../editors/CodeFileEditor.py +../ProjectController.py ../controls/LocationCellEditor.py -../controls/CustomTree.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/SearchResultPanel.py -../controls/LibraryPanel.py -../controls/TextCtrlAutoComplete.py -../controls/DebugVariablePanel.py -../controls/PouInstanceVariablesPanel.py -../controls/DurationCellEditor.py -../controls/CustomTable.py +../controls/CustomTree.py ../controls/CustomEditableListBox.py -../controls/ProjectPropertiesPanel.py -../IDEFrame.py +../CodeFileTreeNode.py +../docutil/dochtml.py +../c_ext/CFileEditor.py +../xmlclass/xsdschema.py +../xmlclass/xmlclass.py ../Beremiz.py +../version.py +../POULibrary.py +../util/MiniTextControler.py +../util/Zeroconf.py +../util/misc.py +../util/ProcessLogger.py +../features.py ../svgui/svgui.py ../svgui/svgui_server.py ../svgui/svguilib.py -../xmlclass/xmlclass.py -../xmlclass/xsdschema.py -../PLCOpenEditor.py -../c_ext/CFileEditor.py -../c_ext/c_ext.py -../ConfigTreeNode.py -../wxglade_hmi/wxglade_hmi.py -../PLCGenerator.py -../docutil/dochtml.py -../editors/ProjectNodeEditor.py -../editors/ConfTreeNodeEditor.py -../editors/TextViewer.py -../editors/DataTypeEditor.py -../editors/GraphicViewer.py -../editors/ResourceEditor.py -../editors/Viewer.py -../editors/LDViewer.py -../editors/SFCViewer.py -../editors/EditorPanel.py -../editors/FileManagementPanel.py -../graphics/GraphicCommons.py -../graphics/LD_Objects.py -../graphics/SFC_Objects.py -../graphics/FBD_Objects.py -../PLCControler.py -../connectors/__init__.py -../connectors/PYRO/__init__.py -../targets/toolchain_gcc.py -../targets/__init__.py -../targets/Linux/XSD -../targets/XSD_toolchain_gcc -../targets/Win32/XSD -../targets/Xenomai/__init__.py -../targets/Xenomai/XSD -../features.py -../ProjectController.py -../POULibrary.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/PouDialog.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/Zeroconf.py -../util/misc.py ../plcopen/iec_std.csv ../plcopen/structures.py ../plcopen/plcopen.py -../py_ext/PythonFileCTNMixin.py -../py_ext/PythonEditor.py +../plcopen/definitions.py +../IDEFrame.py +../PLCGenerator.py +../Beremiz_service.py +../plcopen/Additional_Function_Blocks.xml +../plcopen/Standard_Function_Blocks.xml \ No newline at end of file diff -r a375e31bf312 -r c1298e7ffe3a i18n/messages.pot --- 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 @@ msgstr "" "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 -msgid "" -"\n" -"An error has occurred.\n" -"\n" -"Click OK to save an error report.\n" -"\n" -"Please be kind enough to send this file to:\n" -"edouard.tisserant@gmail.com\n" -"\n" -"Error:\n" -msgstr "" - -#: ../Beremiz.py:1119 +#: ../PLCOpenEditor.py:408 ../Beremiz.py:1191 #, python-format msgid "" "\n" @@ -40,367 +27,398 @@ "Please be kind enough to send this file to:\n" "beremiz-devel@lists.sourceforge.net\n" "\n" -"You should now restart Beremiz.\n" +"You should now restart program.\n" "\n" "Traceback:\n" msgstr "" -#: ../controls/VariablePanel.py:77 +#: ../controls/VariablePanel.py:72 msgid " External" msgstr "" -#: ../controls/VariablePanel.py:76 +#: ../controls/VariablePanel.py:71 msgid " InOut" msgstr "" -#: ../controls/VariablePanel.py:76 +#: ../controls/VariablePanel.py:71 msgid " Input" msgstr "" -#: ../controls/VariablePanel.py:77 +#: ../controls/VariablePanel.py:72 msgid " Local" msgstr "" -#: ../controls/VariablePanel.py:76 +#: ../controls/VariablePanel.py:71 msgid " Output" msgstr "" -#: ../controls/VariablePanel.py:78 +#: ../controls/VariablePanel.py:73 msgid " Temp" msgstr "" -#: ../PLCOpenEditor.py:415 -msgid " : " -msgstr "" - -#: ../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 #, python-format msgid " and %s" msgstr "" -#: ../ProjectController.py:917 +#: ../ProjectController.py:1089 msgid " generation failed !\n" msgstr "" -#: ../plcopen/plcopen.py:1051 +#: ../plcopen/plcopen.py:881 #, python-format msgid "\"%s\" Data Type doesn't exist !!!" msgstr "" -#: ../plcopen/plcopen.py:1069 +#: ../plcopen/plcopen.py:899 #, python-format msgid "\"%s\" POU already exists !!!" msgstr "" -#: ../plcopen/plcopen.py:1090 +#: ../plcopen/plcopen.py:920 #, python-format msgid "\"%s\" POU doesn't exist !!!" msgstr "" -#: ../editors/Viewer.py:234 +#: ../editors/Viewer.py:246 #, python-format msgid "\"%s\" can't use itself!" msgstr "" -#: ../IDEFrame.py:1587 ../IDEFrame.py:1606 +#: ../IDEFrame.py:1652 ../IDEFrame.py:1671 #, python-format msgid "\"%s\" config already exists!" msgstr "" -#: ../plcopen/plcopen.py:315 +#: ../plcopen/plcopen.py:467 #, python-format msgid "\"%s\" configuration already exists !!!" msgstr "" -#: ../IDEFrame.py:1541 +#: ../IDEFrame.py:1602 #, python-format msgid "\"%s\" data type already exists!" msgstr "" -#: ../PLCControler.py:2165 ../PLCControler.py:2169 -#, python-format -msgid "\"%s\" element can't be pasted here!!!" -msgstr "" - -#: ../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 #, python-format msgid "\"%s\" element for this pou already exists!" msgstr "" -#: ../Beremiz.py:921 +#: ../Beremiz.py:994 #, python-format msgid "\"%s\" folder is not a valid Beremiz project\n" msgstr "" -#: ../plcopen/structures.py:105 -#, python-format -msgid "\"%s\" function cancelled in \"%s\" POU: No input connected" -msgstr "" - -#: ../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 +#: ../IDEFrame.py:1593 #, python-format msgid "\"%s\" is a keyword. It can't be used!" msgstr "" -#: ../editors/Viewer.py:238 -#, python-format -msgid "\"%s\" is already used by \"%s\"!" -msgstr "" - -#: ../plcopen/plcopen.py:2836 +#: ../plcopen/plcopen.py:2412 #, python-format msgid "\"%s\" is an invalid value!" msgstr "" -#: ../PLCOpenEditor.py:341 ../PLCOpenEditor.py:378 +#: ../PLCOpenEditor.py:339 ../PLCOpenEditor.py:381 #, python-format msgid "\"%s\" is not a valid folder!" msgstr "" -#: ../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 #, python-format msgid "\"%s\" is not a valid identifier!" msgstr "" -#: ../IDEFrame.py:221 ../IDEFrame.py:2313 ../IDEFrame.py:2332 -#, python-format -msgid "\"%s\" is used by one or more POUs. It can't be removed!" -msgstr "" - -#: ../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 +#: ../IDEFrame.py:2396 +#, python-format +msgid "\"%s\" is used by one or more POUs. Do you wish to continue?" +msgstr "" + +#: ../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 +#: ../IDEFrame.py:1611 #, python-format msgid "\"%s\" pou already exists!" msgstr "" -#: ../plcopen/plcopen.py:346 -#, python-format -msgid "\"%s\" resource already exists in \"%s\" configuration !!!" -msgstr "" - -#: ../plcopen/plcopen.py:362 -#, python-format -msgid "\"%s\" resource doesn't exist in \"%s\" configuration !!!" -msgstr "" - -#: ../dialogs/SFCStepNameDialog.py:57 ../dialogs/SFCStepDialog.py:128 +#: ../dialogs/SFCStepNameDialog.py:58 #, python-format msgid "\"%s\" step already exists!" msgstr "" -#: ../editors/DataTypeEditor.py:549 +#: ../editors/DataTypeEditor.py:550 #, python-format msgid "\"%s\" value already defined!" msgstr "" -#: ../editors/DataTypeEditor.py:744 ../dialogs/ArrayTypeDialog.py:97 +#: ../dialogs/ArrayTypeDialog.py:97 ../editors/DataTypeEditor.py:745 #, python-format msgid "\"%s\" value isn't a valid array dimension!" msgstr "" -#: ../editors/DataTypeEditor.py:751 ../dialogs/ArrayTypeDialog.py:103 +#: ../dialogs/ArrayTypeDialog.py:103 ../editors/DataTypeEditor.py:752 #, python-format msgid "" "\"%s\" value isn't a valid array dimension!\n" "Right value must be greater than left value." msgstr "" -#: ../PLCControler.py:847 -#, python-format -msgid "%s \"%s\" can't be pasted as a %s." -msgstr "" - -#: ../PLCControler.py:1476 +#: ../PLCGenerator.py:1101 +#, python-brace-format +msgid "\"{a1}\" function cancelled in \"{a2}\" POU: No input connected" +msgstr "" + +#: ../editors/Viewer.py:250 +#, python-brace-format +msgid "\"{a1}\" is already used by \"{a2}\"!" +msgstr "" + +#: ../plcopen/plcopen.py:491 +#, python-brace-format +msgid "\"{a1}\" resource already exists in \"{a2}\" configuration !!!" +msgstr "" + +#: ../plcopen/plcopen.py:509 +#, python-brace-format +msgid "\"{a1}\" resource doesn't exist in \"{a2}\" configuration !!!" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:578 +#, python-format +msgid "%03gms" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:569 +#, python-format +msgid "%dd" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:56 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:570 +#, python-format +msgid "%dh" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:55 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:571 +#, python-format +msgid "%dm" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:53 +#, python-format +msgid "%dms" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:54 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:572 +#, python-format +msgid "%ds" +msgstr "" + +#: ../PLCControler.py:1531 #, python-format msgid "%s Data Types" msgstr "" -#: ../editors/GraphicViewer.py:278 -#, python-format -msgid "%s Graphics" -msgstr "" - -#: ../PLCControler.py:1471 +#: ../PLCControler.py:1514 #, python-format msgid "%s POUs" msgstr "" -#: ../canfestival/SlaveEditor.py:46 ../canfestival/NetworkEditor.py:67 +#: ../canfestival/SlaveEditor.py:69 ../canfestival/NetworkEditor.py:90 #, python-format msgid "%s Profile" msgstr "" -#: ../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 #, python-format msgid "%s body don't have instances!" msgstr "" -#: ../plcopen/plcopen.py:1852 ../plcopen/plcopen.py:1859 +#: ../plcopen/plcopen.py:1700 ../plcopen/plcopen.py:1707 +#: ../plcopen/plcopen.py:1714 #, python-format msgid "%s body don't have text!" msgstr "" -#: ../IDEFrame.py:369 +#: ../IDEFrame.py:386 msgid "&Add Element" msgstr "" -#: ../IDEFrame.py:339 +#: ../dialogs/AboutDialog.py:65 ../dialogs/AboutDialog.py:113 +#: ../dialogs/AboutDialog.py:150 +msgid "&Close" +msgstr "" + +#: ../IDEFrame.py:356 msgid "&Configuration" msgstr "" -#: ../IDEFrame.py:330 +#: ../IDEFrame.py:345 msgid "&Data Type" msgstr "" -#: ../IDEFrame.py:373 +#: ../IDEFrame.py:390 msgid "&Delete" msgstr "" -#: ../IDEFrame.py:322 +#: ../IDEFrame.py:337 msgid "&Display" msgstr "" -#: ../IDEFrame.py:321 +#: ../IDEFrame.py:336 msgid "&Edit" msgstr "" -#: ../IDEFrame.py:320 +#: ../IDEFrame.py:335 msgid "&File" msgstr "" -#: ../IDEFrame.py:332 +#: ../IDEFrame.py:347 msgid "&Function" msgstr "" -#: ../IDEFrame.py:323 +#: ../IDEFrame.py:338 msgid "&Help" msgstr "" -#: ../IDEFrame.py:336 +#: ../dialogs/AboutDialog.py:64 +msgid "&License" +msgstr "" + +#: ../IDEFrame.py:351 msgid "&Program" msgstr "" -#: ../PLCOpenEditor.py:129 +#: ../PLCOpenEditor.py:125 msgid "&Properties" msgstr "" -#: ../Beremiz.py:312 +#: ../Beremiz.py:324 msgid "&Recent Projects" msgstr "" -#: ../Beremiz.py:354 +#: ../IDEFrame.py:353 msgid "&Resource" msgstr "" -#: ../controls/SearchResultPanel.py:252 -#, python-format -msgid "'%s' - %d match in project" -msgstr "" - -#: ../controls/SearchResultPanel.py:254 -#, python-format -msgid "'%s' - %d matches in project" -msgstr "" - -#: ../connectors/PYRO/__init__.py:51 -#, python-format -msgid "'%s' is located at %s\n" -msgstr "" - -#: ../controls/SearchResultPanel.py:304 +#: ../controls/SearchResultPanel.py:239 +#, python-brace-format +msgid "'{a1}' - {a2} match in project" +msgstr "" + +#: ../controls/SearchResultPanel.py:241 +#, python-brace-format +msgid "'{a1}' - {a2} matches in project" +msgstr "" + +#: ../connectors/PYRO/__init__.py:90 +#, python-brace-format +msgid "'{a1}' is located at {a2}\n" +msgstr "" + +#: ../controls/SearchResultPanel.py:291 #, python-format msgid "(%d matches)" msgstr "" -#: ../PLCOpenEditor.py:393 ../PLCOpenEditor.py:395 ../PLCOpenEditor.py:396 +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 ../PLCOpenEditor.py:399 msgid ", " msgstr "" -#: ../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 #, python-format msgid ", %s" msgstr "" -#: ../PLCOpenEditor.py:391 +#: ../PLCOpenEditor.py:394 msgid ". " msgstr "" -#: ../ProjectController.py:1294 -msgid "... debugger recovered\n" -msgstr "" - -#: ../IDEFrame.py:1553 ../IDEFrame.py:1595 ../IDEFrame.py:1614 -#: ../dialogs/PouDialog.py:122 +#: ../controls/LogViewer.py:279 +msgid "1d" +msgstr "" + +#: ../controls/LogViewer.py:280 +msgid "1h" +msgstr "" + +#: ../controls/LogViewer.py:281 +msgid "1m" +msgstr "" + +#: ../controls/LogViewer.py:282 +msgid "1s" +msgstr "" + +#: ../dialogs/PouDialog.py:124 ../IDEFrame.py:1614 ../IDEFrame.py:1660 +#: ../IDEFrame.py:1679 #, python-format msgid "A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?" msgstr "" -#: ../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 #, python-format msgid "A POU named \"%s\" already exists!" msgstr "" -#: ../ConfigTreeNode.py:388 -#, python-format -msgid "A child named \"%s\" already exist -> \"%s\"\n" -msgstr "" - -#: ../dialogs/BrowseLocationsDialog.py:212 +#: ../ConfigTreeNode.py:424 +#, python-brace-format +msgid "A child named \"{a1}\" already exists -> \"{a2}\"\n" +msgstr "" + +#: ../dialogs/BrowseLocationsDialog.py:216 msgid "A location must be selected!" msgstr "" -#: ../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 #, python-format msgid "A variable with \"%s\" as name already exists in this pou!" msgstr "" -#: ../Beremiz.py:364 ../PLCOpenEditor.py:162 +#: ../editors/CodeFileEditor.py:774 +#, python-format +msgid "A variable with \"%s\" as name already exists!" +msgstr "" + +#: ../dialogs/AboutDialog.py:40 ../PLCOpenEditor.py:158 ../Beremiz.py:381 msgid "About" msgstr "" -#: ../Beremiz.py:957 -msgid "About Beremiz" -msgstr "" - -#: ../PLCOpenEditor.py:355 -msgid "About PLCOpenEditor" -msgstr "" - #: ../plcopen/iec_std.csv:22 msgid "Absolute number" msgstr "" -#: ../dialogs/ActionBlockDialog.py:41 ../dialogs/SFCStepDialog.py:69 +#: ../dialogs/SFCStepDialog.py:72 ../dialogs/ActionBlockDialog.py:42 msgid "Action" msgstr "" -#: ../editors/Viewer.py:494 +#: ../editors/Viewer.py:555 ../editors/Viewer.py:2345 msgid "Action Block" msgstr "" @@ -412,109 +430,109 @@ msgid "Action Name:" msgstr "" -#: ../plcopen/plcopen.py:1490 +#: ../plcopen/plcopen.py:1359 #, python-format msgid "Action with name %s doesn't exist!" msgstr "" -#: ../PLCControler.py:95 +#: ../PLCControler.py:96 msgid "Actions" msgstr "" -#: ../dialogs/ActionBlockDialog.py:134 +#: ../dialogs/ActionBlockDialog.py:133 msgid "Actions:" msgstr "" -#: ../editors/Viewer.py:999 +#: ../editors/Viewer.py:1100 msgid "Active" msgstr "" -#: ../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 msgid "Add" msgstr "" -#: ../IDEFrame.py:1801 ../IDEFrame.py:1832 +#: ../IDEFrame.py:1890 ../IDEFrame.py:1925 msgid "Add Action" msgstr "" -#: ../features.py:8 +#: ../features.py:32 msgid "Add C code accessing located variables synchronously" msgstr "" -#: ../IDEFrame.py:1784 +#: ../IDEFrame.py:1873 msgid "Add Configuration" msgstr "" -#: ../IDEFrame.py:1764 +#: ../IDEFrame.py:1853 msgid "Add DataType" msgstr "" -#: ../editors/Viewer.py:452 +#: ../editors/Viewer.py:513 msgid "Add Divergence Branch" msgstr "" -#: ../dialogs/DiscoveryDialog.py:115 +#: ../dialogs/DiscoveryDialog.py:116 msgid "Add IP" msgstr "" -#: ../IDEFrame.py:1772 +#: ../IDEFrame.py:1861 msgid "Add POU" msgstr "" -#: ../features.py:9 +#: ../features.py:33 msgid "Add Python code executed asynchronously" msgstr "" -#: ../IDEFrame.py:1812 ../IDEFrame.py:1858 +#: ../IDEFrame.py:1901 ../IDEFrame.py:1951 msgid "Add Resource" msgstr "" -#: ../IDEFrame.py:1790 ../IDEFrame.py:1829 +#: ../IDEFrame.py:1879 ../IDEFrame.py:1922 msgid "Add Transition" msgstr "" -#: ../editors/Viewer.py:441 +#: ../editors/Viewer.py:500 msgid "Add Wire Segment" msgstr "" -#: ../editors/SFCViewer.py:359 +#: ../editors/SFCViewer.py:433 msgid "Add a new initial step" msgstr "" -#: ../editors/Viewer.py:2363 ../editors/SFCViewer.py:696 +#: ../editors/Viewer.py:2706 ../editors/SFCViewer.py:770 msgid "Add a new jump" msgstr "" -#: ../editors/SFCViewer.py:381 +#: ../editors/SFCViewer.py:455 msgid "Add a new step" msgstr "" -#: ../features.py:10 +#: ../features.py:34 msgid "Add a simple WxGlade based GUI." msgstr "" -#: ../dialogs/ActionBlockDialog.py:138 +#: ../dialogs/ActionBlockDialog.py:137 msgid "Add action" msgstr "" -#: ../editors/DataTypeEditor.py:351 +#: ../editors/DataTypeEditor.py:352 msgid "Add element" msgstr "" -#: ../editors/ResourceEditor.py:259 +#: ../editors/ResourceEditor.py:268 msgid "Add instance" msgstr "" -#: ../canfestival/NetworkEditor.py:80 +#: ../canfestival/NetworkEditor.py:103 msgid "Add slave" msgstr "" -#: ../editors/ResourceEditor.py:230 +#: ../editors/ResourceEditor.py:239 msgid "Add task" msgstr "" -#: ../controls/VariablePanel.py:380 ../c_ext/CFileEditor.py:517 +#: ../editors/CodeFileEditor.py:658 ../controls/VariablePanel.py:450 msgid "Add variable" msgstr "" @@ -522,22 +540,23 @@ msgid "Addition" msgstr "" -#: ../plcopen/structures.py:249 +#: ../plcopen/definitions.py:47 msgid "Additional function blocks" msgstr "" -#: ../editors/Viewer.py:510 +#: ../editors/Viewer.py:571 msgid "Adjust Block Size" msgstr "" -#: ../editors/Viewer.py:1458 +#: ../editors/Viewer.py:1637 msgid "Alignment" msgstr "" -#: ../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 msgid "All" msgstr "" @@ -545,16 +564,16 @@ msgid "All files (*.*)|*.*|CSV files (*.csv)|*.csv" msgstr "" -#: ../ProjectController.py:1373 +#: ../ProjectController.py:1623 msgid "Already connected. Please disconnect\n" msgstr "" -#: ../editors/DataTypeEditor.py:593 +#: ../editors/DataTypeEditor.py:594 #, python-format msgid "An element named \"%s\" already exists in this structure!" msgstr "" -#: ../dialogs/ConnectionDialog.py:98 +#: ../dialogs/ConnectionDialog.py:96 msgid "Apply name modification to all continuations with the same name" msgstr "" @@ -574,8 +593,8 @@ msgid "Arithmetic" msgstr "" -#: ../controls/VariablePanel.py:732 ../editors/DataTypeEditor.py:54 -#: ../editors/DataTypeEditor.py:634 +#: ../editors/DataTypeEditor.py:54 ../editors/DataTypeEditor.py:635 +#: ../controls/VariablePanel.py:829 msgid "Array" msgstr "" @@ -583,7 +602,7 @@ msgid "Assignment" msgstr "" -#: ../dialogs/FBDVariableDialog.py:197 +#: ../dialogs/FBDVariableDialog.py:217 msgid "At least a variable or an expression must be selected!" msgstr "" @@ -595,7 +614,7 @@ msgid "Author Name (optional):" msgstr "" -#: ../dialogs/FindInPouDialog.py:72 +#: ../dialogs/FindInPouDialog.py:79 msgid "Backward" msgstr "" @@ -607,21 +626,21 @@ msgid "Bad domain name at " msgstr "" -#: ../canfestival/config_utils.py:341 ../canfestival/config_utils.py:623 +#: ../canfestival/config_utils.py:342 ../canfestival/config_utils.py:630 #, python-format msgid "Bad location size : %s" msgstr "" -#: ../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 msgid "Base Type:" msgstr "" -#: ../controls/VariablePanel.py:702 ../editors/DataTypeEditor.py:624 +#: ../editors/DataTypeEditor.py:625 ../controls/VariablePanel.py:787 msgid "Base Types" msgstr "" -#: ../Beremiz.py:511 +#: ../Beremiz.py:553 msgid "Beremiz" msgstr "" @@ -653,151 +672,167 @@ msgid "Bitwise inverting" msgstr "" -#: ../editors/Viewer.py:464 +#: ../editors/Viewer.py:525 ../editors/Viewer.py:2358 msgid "Block" msgstr "" -#: ../dialogs/FBDBlockDialog.py:38 +#: ../dialogs/FBDBlockDialog.py:59 msgid "Block Properties" msgstr "" -#: ../editors/Viewer.py:433 +#: ../editors/TextViewer.py:262 +msgid "Block name" +msgstr "" + +#: ../editors/Viewer.py:491 msgid "Bottom" msgstr "" +#: ../ProjectController.py:1301 +msgid "Broken" +msgstr "" + #: ../dialogs/BrowseValuesLibraryDialog.py:37 #, python-format msgid "Browse %s values library" msgstr "" -#: ../dialogs/BrowseLocationsDialog.py:61 +#: ../dialogs/BrowseLocationsDialog.py:65 msgid "Browse Locations" msgstr "" -#: ../ProjectController.py:1519 +#: ../ProjectController.py:1769 msgid "Build" msgstr "" -#: ../ProjectController.py:1079 +#: ../ProjectController.py:1235 msgid "Build directory already clean\n" msgstr "" -#: ../ProjectController.py:1520 +#: ../ProjectController.py:1770 msgid "Build project into build folder" msgstr "" -#: ../ProjectController.py:937 +#: ../ProjectController.py:1018 msgid "C Build crashed !\n" msgstr "" -#: ../ProjectController.py:934 +#: ../ProjectController.py:1015 msgid "C Build failed.\n" msgstr "" -#: ../c_ext/CFileEditor.py:731 +#: ../c_ext/CFileEditor.py:63 msgid "C code" msgstr "" -#: ../ProjectController.py:922 +#: ../ProjectController.py:1093 msgid "C code generated successfully.\n" msgstr "" -#: ../targets/toolchain_gcc.py:132 +#: ../targets/toolchain_makefile.py:122 +msgid "C compilation failed.\n" +msgstr "" + +#: ../targets/toolchain_gcc.py:156 #, python-format msgid "C compilation of %s failed.\n" msgstr "" -#: ../features.py:8 +#: ../features.py:32 msgid "C extension" msgstr "" -#: ../canfestival/NetworkEditor.py:29 +#: ../dialogs/AboutDialog.py:63 +msgid "C&redits" +msgstr "" + +#: ../canfestival/NetworkEditor.py:52 msgid "CANOpen network" msgstr "" -#: ../canfestival/SlaveEditor.py:21 +#: ../canfestival/SlaveEditor.py:44 msgid "CANOpen slave" msgstr "" -#: ../features.py:7 +#: ../features.py:31 msgid "CANopen support" msgstr "" -#: ../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!" msgstr "" -#: ../controls/VariablePanel.py:256 +#: ../controls/VariablePanel.py:267 msgid "Can only give a location to local or global variables" msgstr "" -#: ../PLCOpenEditor.py:336 +#: ../PLCOpenEditor.py:334 #, python-format msgid "Can't generate program to file %s!" msgstr "" -#: ../controls/VariablePanel.py:254 +#: ../controls/VariablePanel.py:265 msgid "Can't give a location to a function block instance" msgstr "" -#: ../PLCOpenEditor.py:376 +#: ../PLCOpenEditor.py:379 #, python-format msgid "Can't save project to file %s!" msgstr "" -#: ../controls/VariablePanel.py:300 +#: ../controls/VariablePanel.py:313 msgid "Can't set an initial value to a function block instance" msgstr "" -#: ../ConfigTreeNode.py:490 -#, python-format -msgid "Cannot create child %s of type %s " -msgstr "" - -#: ../ConfigTreeNode.py:417 +#: ../ConfigTreeNode.py:529 +#, python-brace-format +msgid "Cannot create child {a1} of type {a2} " +msgstr "" + +#: ../ConfigTreeNode.py:454 #, python-format msgid "Cannot find lower free IEC channel than %d\n" msgstr "" -#: ../connectors/PYRO/__init__.py:92 +#: ../connectors/PYRO/__init__.py:131 msgid "Cannot get PLC status - connection failed.\n" msgstr "" -#: ../ProjectController.py:737 +#: ../ProjectController.py:881 msgid "Cannot open/parse VARIABLES.csv!\n" msgstr "" -#: ../canfestival/config_utils.py:371 -#, python-format -msgid "Cannot set bit offset for non bool '%s' variable (ID:%d,Idx:%x,sIdx:%x))" -msgstr "" - -#: ../dialogs/FindInPouDialog.py:81 ../dialogs/SearchInProjectDialog.py:67 +#: ../canfestival/config_utils.py:374 +#, python-brace-format +msgid "Cannot set bit offset for non bool '{a1}' variable (ID:{a2},Idx:{a3},sIdx:{a4}))" +msgstr "" + +#: ../dialogs/SearchInProjectDialog.py:59 ../dialogs/FindInPouDialog.py:88 msgid "Case sensitive" msgstr "" -#: ../editors/Viewer.py:428 +#: ../editors/Viewer.py:486 msgid "Center" msgstr "" -#: ../Beremiz_service.py:326 +#: ../Beremiz_service.py:266 msgid "Change IP of interface to bind" msgstr "" -#: ../Beremiz_service.py:325 +#: ../Beremiz_service.py:265 msgid "Change Name" msgstr "" -#: ../IDEFrame.py:1850 +#: ../IDEFrame.py:1943 msgid "Change POU Type To" msgstr "" -#: ../Beremiz_service.py:327 +#: ../Beremiz_service.py:267 msgid "Change Port Number" msgstr "" -#: ../Beremiz_service.py:328 +#: ../Beremiz_service.py:268 msgid "Change working directory" msgstr "" @@ -805,20 +840,20 @@ msgid "Character string" msgstr "" -#: ../svgui/svgui.py:92 +#: ../svgui/svgui.py:125 msgid "Choose a SVG file" msgstr "" -#: ../ProjectController.py:364 +#: ../ProjectController.py:451 msgid "Choose a directory to save project" msgstr "" -#: ../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 msgid "Choose a file" msgstr "" -#: ../Beremiz.py:858 ../Beremiz.py:893 +#: ../Beremiz.py:931 ../Beremiz.py:966 msgid "Choose a project" msgstr "" @@ -827,75 +862,83 @@ msgid "Choose a value for %s:" msgstr "" -#: ../Beremiz_service.py:378 +#: ../Beremiz_service.py:323 msgid "Choose a working directory " msgstr "" -#: ../ProjectController.py:288 +#: ../ProjectController.py:358 msgid "Chosen folder doesn't contain a program. It's not a valid project!" msgstr "" -#: ../ProjectController.py:255 +#: ../ProjectController.py:325 msgid "Chosen folder isn't empty. You can't use it for a new project!" msgstr "" -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59 +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 msgid "Class" msgstr "" -#: ../controls/VariablePanel.py:371 +#: ../controls/VariablePanel.py:441 msgid "Class Filter:" msgstr "" -#: ../dialogs/FBDVariableDialog.py:62 +#: ../dialogs/FBDVariableDialog.py:69 msgid "Class:" msgstr "" -#: ../ProjectController.py:1523 +#: ../ProjectController.py:1773 msgid "Clean" msgstr "" -#: ../ProjectController.py:1525 +#: ../controls/LogViewer.py:318 +msgid "Clean log messages" +msgstr "" + +#: ../ProjectController.py:1775 msgid "Clean project build folder" msgstr "" -#: ../ProjectController.py:1076 +#: ../ProjectController.py:1232 msgid "Cleaning the build directory\n" msgstr "" -#: ../IDEFrame.py:416 +#: ../IDEFrame.py:435 msgid "Clear Errors" msgstr "" -#: ../editors/Viewer.py:520 +#: ../editors/Viewer.py:582 msgid "Clear Execution Order" msgstr "" -#: ../editors/GraphicViewer.py:125 -msgid "Clear the graph values" -msgstr "" - -#: ../Beremiz.py:633 ../PLCOpenEditor.py:202 +#: ../dialogs/SearchInProjectDialog.py:105 ../dialogs/FindInPouDialog.py:111 +msgid "Close" +msgstr "" + +#: ../PLCOpenEditor.py:199 ../Beremiz.py:693 msgid "Close Application" msgstr "" -#: ../IDEFrame.py:972 ../Beremiz.py:321 ../Beremiz.py:587 -#: ../PLCOpenEditor.py:112 +#: ../PLCOpenEditor.py:108 ../Beremiz.py:333 ../Beremiz.py:637 +#: ../IDEFrame.py:1009 msgid "Close Project" msgstr "" -#: ../Beremiz.py:319 ../PLCOpenEditor.py:110 +#: ../PLCOpenEditor.py:106 ../Beremiz.py:331 msgid "Close Tab" msgstr "" -#: ../editors/Viewer.py:480 +#: ../editors/Viewer.py:541 ../editors/Viewer.py:2366 msgid "Coil" msgstr "" -#: ../editors/Viewer.py:500 ../editors/LDViewer.py:506 +#: ../editors/Viewer.py:561 ../editors/LDViewer.py:506 msgid "Comment" msgstr "" +#: ../dialogs/ProjectDialog.py:57 +msgid "Company Name" +msgstr "" + #: ../controls/ProjectPropertiesPanel.py:94 msgid "Company Name (required):" msgstr "" @@ -908,7 +951,7 @@ msgid "Comparison" msgstr "" -#: ../ProjectController.py:552 +#: ../ProjectController.py:672 msgid "Compiling IEC Program into C code...\n" msgstr "" @@ -916,79 +959,85 @@ msgid "Concatenation" msgstr "" -#: ../editors/ConfTreeNodeEditor.py:249 +#: ../editors/ConfTreeNodeEditor.py:229 msgid "Config" msgstr "" -#: ../editors/ProjectNodeEditor.py:13 +#: ../editors/ProjectNodeEditor.py:36 msgid "Config variables" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:47 +#: ../dialogs/SearchInProjectDialog.py:39 msgid "Configuration" msgstr "" -#: ../PLCControler.py:96 +#: ../PLCControler.py:97 msgid "Configurations" msgstr "" -#: ../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" +msgstr "" + +#: ../ProjectController.py:1788 msgid "Connect" msgstr "" -#: ../ProjectController.py:1539 +#: ../ProjectController.py:1789 msgid "Connect to the target PLC" msgstr "" -#: ../ProjectController.py:1125 +#: ../ProjectController.py:1292 #, python-format msgid "Connected to URI: %s" msgstr "" -#: ../connectors/PYRO/__init__.py:40 -#, python-format -msgid "Connecting to URI : %s\n" -msgstr "" - -#: ../editors/Viewer.py:466 ../dialogs/SFCTransitionDialog.py:76 +#: ../dialogs/SFCTransitionDialog.py:76 ../editors/Viewer.py:527 +#: ../editors/Viewer.py:2359 msgid "Connection" msgstr "" -#: ../dialogs/ConnectionDialog.py:37 +#: ../dialogs/ConnectionDialog.py:52 msgid "Connection Properties" msgstr "" -#: ../ProjectController.py:1397 +#: ../ProjectController.py:1647 msgid "Connection canceled!\n" msgstr "" -#: ../ProjectController.py:1422 +#: ../ProjectController.py:1672 #, python-format msgid "Connection failed to %s!\n" msgstr "" -#: ../connectors/PYRO/__init__.py:63 +#: ../connectors/PYRO/__init__.py:115 ../connectors/WAMP/__init__.py:111 +msgid "Connection lost!\n" +msgstr "" + +#: ../connectors/PYRO/__init__.py:102 #, python-format msgid "Connection to '%s' failed.\n" msgstr "" -#: ../editors/Viewer.py:1426 ../dialogs/ConnectionDialog.py:56 +#: ../dialogs/ConnectionDialog.py:64 ../editors/Viewer.py:1594 msgid "Connector" msgstr "" -#: ../dialogs/SFCStepDialog.py:58 +#: ../dialogs/SFCStepDialog.py:65 msgid "Connectors:" msgstr "" -#: ../Beremiz.py:420 +#: ../Beremiz.py:448 msgid "Console" msgstr "" -#: ../controls/VariablePanel.py:65 +#: ../controls/VariablePanel.py:60 msgid "Constant" msgstr "" -#: ../editors/Viewer.py:476 +#: ../editors/Viewer.py:537 ../editors/Viewer.py:2362 msgid "Contact" msgstr "" @@ -996,7 +1045,7 @@ msgid "Content Description (optional):" msgstr "" -#: ../editors/Viewer.py:1427 ../dialogs/ConnectionDialog.py:61 +#: ../dialogs/ConnectionDialog.py:65 ../editors/Viewer.py:1595 msgid "Continuation" msgstr "" @@ -1016,11 +1065,12 @@ msgid "Conversion to time-of-day" msgstr "" -#: ../IDEFrame.py:353 ../IDEFrame.py:406 ../editors/Viewer.py:536 +#: ../editors/Viewer.py:597 ../controls/LogViewer.py:693 ../IDEFrame.py:370 +#: ../IDEFrame.py:425 msgid "Copy" msgstr "" -#: ../IDEFrame.py:1837 +#: ../IDEFrame.py:1930 msgid "Copy POU" msgstr "" @@ -1036,48 +1086,53 @@ msgid "Cosine" msgstr "" -#: ../ConfigTreeNode.py:602 -#, python-format +#: ../ConfigTreeNode.py:656 +#, python-brace-format msgid "" -"Could not add child \"%s\", type %s :\n" -"%s\n" -msgstr "" - -#: ../ConfigTreeNode.py:579 -#, python-format +"Could not add child \"{a1}\", type {a2} :\n" +"{a3}\n" +msgstr "" + +#: ../py_ext/PythonFileCTNMixin.py:77 +#, python-format +msgid "Couldn't import old %s file." +msgstr "" + +#: ../ConfigTreeNode.py:626 +#, python-brace-format msgid "" -"Couldn't load confnode base parameters %s :\n" -" %s" -msgstr "" - -#: ../ConfigTreeNode.py:590 -#, python-format +"Couldn't load confnode base parameters {a1} :\n" +" {a2}" +msgstr "" + +#: ../ConfigTreeNode.py:643 ../CodeFileTreeNode.py:124 +#, python-brace-format msgid "" -"Couldn't load confnode parameters %s :\n" -" %s" -msgstr "" - -#: ../PLCControler.py:819 ../PLCControler.py:856 +"Couldn't load confnode parameters {a1} :\n" +" {a2}" +msgstr "" + +#: ../PLCControler.py:946 msgid "Couldn't paste non-POU object." msgstr "" -#: ../ProjectController.py:1344 +#: ../ProjectController.py:1589 msgid "Couldn't start PLC !\n" msgstr "" -#: ../ProjectController.py:1352 +#: ../ProjectController.py:1597 msgid "Couldn't stop PLC !\n" msgstr "" -#: ../ProjectController.py:1321 +#: ../ProjectController.py:1561 msgid "Couldn't stop debugger.\n" msgstr "" -#: ../svgui/svgui.py:22 +#: ../svgui/svgui.py:47 msgid "Create HMI" msgstr "" -#: ../dialogs/PouDialog.py:43 +#: ../dialogs/PouDialog.py:45 msgid "Create a new POU" msgstr "" @@ -1085,71 +1140,79 @@ msgid "Create a new action" msgstr "" -#: ../IDEFrame.py:142 +#: ../IDEFrame.py:159 msgid "Create a new action block" msgstr "" -#: ../IDEFrame.py:91 ../IDEFrame.py:121 ../IDEFrame.py:154 +#: ../IDEFrame.py:108 ../IDEFrame.py:138 ../IDEFrame.py:171 msgid "Create a new block" msgstr "" -#: ../IDEFrame.py:115 +#: ../IDEFrame.py:132 msgid "Create a new branch" msgstr "" -#: ../IDEFrame.py:109 +#: ../IDEFrame.py:126 msgid "Create a new coil" msgstr "" -#: ../IDEFrame.py:85 ../IDEFrame.py:100 ../IDEFrame.py:130 +#: ../IDEFrame.py:102 ../IDEFrame.py:117 ../IDEFrame.py:147 msgid "Create a new comment" msgstr "" -#: ../IDEFrame.py:94 ../IDEFrame.py:124 ../IDEFrame.py:157 +#: ../IDEFrame.py:111 ../IDEFrame.py:141 ../IDEFrame.py:174 msgid "Create a new connection" msgstr "" -#: ../IDEFrame.py:112 ../IDEFrame.py:163 +#: ../IDEFrame.py:129 ../IDEFrame.py:180 msgid "Create a new contact" msgstr "" -#: ../IDEFrame.py:145 +#: ../IDEFrame.py:162 msgid "Create a new divergence" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:36 +#: ../dialogs/SFCDivergenceDialog.py:53 msgid "Create a new divergence or convergence" msgstr "" -#: ../IDEFrame.py:133 +#: ../IDEFrame.py:150 msgid "Create a new initial step" msgstr "" -#: ../IDEFrame.py:148 +#: ../IDEFrame.py:165 msgid "Create a new jump" msgstr "" -#: ../IDEFrame.py:103 ../IDEFrame.py:160 +#: ../IDEFrame.py:120 ../IDEFrame.py:177 msgid "Create a new power rail" msgstr "" -#: ../IDEFrame.py:106 +#: ../IDEFrame.py:123 msgid "Create a new rung" msgstr "" -#: ../IDEFrame.py:136 +#: ../IDEFrame.py:153 msgid "Create a new step" msgstr "" -#: ../IDEFrame.py:139 ../dialogs/PouTransitionDialog.py:42 +#: ../dialogs/PouTransitionDialog.py:47 ../IDEFrame.py:156 msgid "Create a new transition" msgstr "" -#: ../IDEFrame.py:88 ../IDEFrame.py:118 ../IDEFrame.py:151 +#: ../IDEFrame.py:105 ../IDEFrame.py:135 ../IDEFrame.py:168 msgid "Create a new variable" msgstr "" -#: ../IDEFrame.py:351 ../IDEFrame.py:405 ../editors/Viewer.py:535 +#: ../dialogs/AboutDialog.py:105 +msgid "Credits" +msgstr "" + +#: ../Beremiz_service.py:432 +msgid "Current working directory :" +msgstr "" + +#: ../editors/Viewer.py:596 ../IDEFrame.py:368 ../IDEFrame.py:424 msgid "Cut" msgstr "" @@ -1165,19 +1228,19 @@ msgid "DEPRECATED" msgstr "" -#: ../canfestival/SlaveEditor.py:53 ../canfestival/NetworkEditor.py:74 +#: ../canfestival/SlaveEditor.py:76 ../canfestival/NetworkEditor.py:97 msgid "DS-301 Profile" msgstr "" -#: ../canfestival/SlaveEditor.py:54 ../canfestival/NetworkEditor.py:75 +#: ../canfestival/SlaveEditor.py:77 ../canfestival/NetworkEditor.py:98 msgid "DS-302 Profile" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:43 +#: ../dialogs/SearchInProjectDialog.py:35 msgid "Data Type" msgstr "" -#: ../PLCControler.py:95 +#: ../PLCControler.py:96 msgid "Data Types" msgstr "" @@ -1202,50 +1265,50 @@ msgid "Days:" msgstr "" -#: ../ProjectController.py:1444 +#: ../ProjectController.py:1694 msgid "Debug does not match PLC - stop/transfert/start to re-enable\n" msgstr "" -#: ../controls/PouInstanceVariablesPanel.py:59 +#: ../controls/PouInstanceVariablesPanel.py:134 msgid "Debug instance" msgstr "" -#: ../editors/Viewer.py:1016 ../editors/Viewer.py:3326 +#: ../editors/Viewer.py:1117 ../editors/Viewer.py:3653 #, python-format msgid "Debug: %s" msgstr "" -#: ../ProjectController.py:1153 +#: ../ProjectController.py:1350 #, python-format msgid "Debug: Unknown variable '%s'\n" msgstr "" -#: ../ProjectController.py:1151 +#: ../ProjectController.py:1348 #, python-format msgid "Debug: Unsupported type to debug '%s'\n" msgstr "" -#: ../IDEFrame.py:612 +#: ../IDEFrame.py:639 msgid "Debugger" msgstr "" -#: ../ProjectController.py:1311 +#: ../ProjectController.py:1530 msgid "Debugger disabled\n" msgstr "" -#: ../ProjectController.py:1441 +#: ../ProjectController.py:1691 msgid "Debugger ready\n" msgstr "" -#: ../ProjectController.py:1323 +#: ../ProjectController.py:1563 msgid "Debugger stopped.\n" msgstr "" -#: ../IDEFrame.py:1866 ../Beremiz.py:991 ../editors/Viewer.py:511 +#: ../editors/Viewer.py:572 ../Beremiz.py:1064 ../IDEFrame.py:1959 msgid "Delete" msgstr "" -#: ../editors/Viewer.py:453 +#: ../editors/Viewer.py:514 msgid "Delete Divergence Branch" msgstr "" @@ -1253,7 +1316,7 @@ msgid "Delete File" msgstr "" -#: ../editors/Viewer.py:442 +#: ../editors/Viewer.py:501 msgid "Delete Wire Segment" msgstr "" @@ -1265,29 +1328,23 @@ msgid "Deletion (within)" msgstr "" -#: ../editors/DataTypeEditor.py:152 +#: ../editors/DataTypeEditor.py:153 msgid "Derivation Type:" msgstr "" -#: ../plcopen/structures.py:263 -msgid "" -"Derivative\n" -"The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." -msgstr "" - -#: ../controls/VariablePanel.py:362 +#: ../controls/VariablePanel.py:432 msgid "Description:" msgstr "" -#: ../editors/DataTypeEditor.py:320 ../dialogs/ArrayTypeDialog.py:61 +#: ../dialogs/ArrayTypeDialog.py:61 ../editors/DataTypeEditor.py:321 msgid "Dimensions:" msgstr "" -#: ../dialogs/FindInPouDialog.py:61 +#: ../dialogs/FindInPouDialog.py:68 msgid "Direction" msgstr "" -#: ../dialogs/BrowseLocationsDialog.py:86 +#: ../dialogs/BrowseLocationsDialog.py:90 msgid "Direction:" msgstr "" @@ -1295,15 +1352,19 @@ msgid "Directly" msgstr "" -#: ../ProjectController.py:1547 +#: ../ProjectController.py:1797 msgid "Disconnect" msgstr "" -#: ../ProjectController.py:1549 +#: ../ProjectController.py:1799 msgid "Disconnect from PLC" msgstr "" -#: ../editors/Viewer.py:495 +#: ../ProjectController.py:1302 +msgid "Disconnected" +msgstr "" + +#: ../editors/Viewer.py:556 ../editors/Viewer.py:2354 msgid "Divergence" msgstr "" @@ -1316,37 +1377,31 @@ msgid "Do you really want to delete the file '%s'?" msgstr "" -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59 +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 msgid "Documentation" msgstr "" -#: ../PLCOpenEditor.py:330 +#: ../PLCOpenEditor.py:328 msgid "Done" msgstr "" -#: ../plcopen/structures.py:226 -msgid "" -"Down-counter\n" -"The down-counter can be used to signal when a count has reached zero, on counting down from a preset value." -msgstr "" - -#: ../dialogs/ActionBlockDialog.py:37 +#: ../dialogs/ActionBlockDialog.py:38 msgid "Duration" msgstr "" -#: ../canfestival/canfestival.py:139 +#: ../canfestival/canfestival.py:163 msgid "EDS files (*.eds)|*.eds|All files|*.*" msgstr "" -#: ../editors/Viewer.py:509 +#: ../editors/Viewer.py:570 msgid "Edit Block" msgstr "" -#: ../dialogs/LDElementDialog.py:41 +#: ../dialogs/LDElementDialog.py:56 msgid "Edit Coil Values" msgstr "" -#: ../dialogs/LDElementDialog.py:38 +#: ../dialogs/LDElementDialog.py:54 msgid "Edit Contact Values" msgstr "" @@ -1354,15 +1409,15 @@ msgid "Edit Duration" msgstr "" -#: ../dialogs/SFCStepDialog.py:35 +#: ../dialogs/SFCStepDialog.py:50 msgid "Edit Step" msgstr "" -#: ../wxglade_hmi/wxglade_hmi.py:12 +#: ../wxglade_hmi/wxglade_hmi.py:36 msgid "Edit a WxWidgets GUI with WXGlade" msgstr "" -#: ../dialogs/ActionBlockDialog.py:122 +#: ../dialogs/ActionBlockDialog.py:121 msgid "Edit action block properties" msgstr "" @@ -1370,8 +1425,7 @@ msgid "Edit array type properties" msgstr "" -#: ../editors/Viewer.py:2186 ../editors/Viewer.py:2188 -#: ../editors/Viewer.py:2706 ../editors/Viewer.py:2708 +#: ../editors/Viewer.py:2575 ../editors/Viewer.py:3004 msgid "Edit comment" msgstr "" @@ -1383,47 +1437,51 @@ msgid "Edit item" msgstr "" -#: ../editors/Viewer.py:2670 +#: ../editors/Viewer.py:2963 msgid "Edit jump target" msgstr "" -#: ../ProjectController.py:1561 +#: ../ProjectController.py:1811 msgid "Edit raw IEC code added to code generated by PLCGenerator" msgstr "" -#: ../editors/SFCViewer.py:725 +#: ../editors/SFCViewer.py:799 msgid "Edit step name" msgstr "" -#: ../dialogs/SFCTransitionDialog.py:38 +#: ../dialogs/SFCTransitionDialog.py:51 msgid "Edit transition" msgstr "" -#: ../IDEFrame.py:584 +#: ../IDEFrame.py:611 msgid "Editor ToolBar" msgstr "" -#: ../ProjectController.py:1039 +#: ../ProjectController.py:1195 msgid "Editor selection" msgstr "" -#: ../editors/DataTypeEditor.py:347 +#: ../editors/DataTypeEditor.py:348 msgid "Elements :" msgstr "" -#: ../IDEFrame.py:348 +#: ../ProjectController.py:1300 +msgid "Empty" +msgstr "" + +#: ../IDEFrame.py:365 msgid "Enable Undo/Redo" msgstr "" -#: ../Beremiz_service.py:385 +#: ../Beremiz_service.py:331 msgid "Enter a name " msgstr "" -#: ../Beremiz_service.py:370 +#: ../Beremiz_service.py:316 msgid "Enter a port number " msgstr "" -#: ../Beremiz_service.py:360 +#: ../Beremiz_service.py:307 msgid "Enter the IP of the interface to bind" msgstr "" @@ -1435,80 +1493,81 @@ msgid "Equal to" msgstr "" -#: ../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 msgid "Error" msgstr "" -#: ../ProjectController.py:601 +#: ../ProjectController.py:727 msgid "Error : At least one configuration and one resource must be declared in PLC !\n" msgstr "" -#: ../ProjectController.py:593 +#: ../ProjectController.py:719 #, python-format msgid "Error : IEC to C compiler returned %d\n" msgstr "" -#: ../ProjectController.py:534 +#: ../ProjectController.py:621 #, python-format msgid "" "Error in ST/IL/SFC code generator :\n" "%s\n" msgstr "" -#: ../ConfigTreeNode.py:183 +#: ../ConfigTreeNode.py:216 #, python-format msgid "Error while saving \"%s\"\n" msgstr "" -#: ../canfestival/canfestival.py:144 +#: ../canfestival/canfestival.py:168 msgid "Error: Export slave failed\n" msgstr "" -#: ../canfestival/canfestival.py:345 +#: ../canfestival/canfestival.py:369 msgid "Error: No Master generated\n" msgstr "" -#: ../canfestival/canfestival.py:340 +#: ../canfestival/canfestival.py:364 msgid "Error: No PLC built\n" msgstr "" -#: ../ProjectController.py:1416 +#: ../ProjectController.py:1666 #, python-format msgid "Exception while connecting %s!\n" msgstr "" -#: ../dialogs/FBDBlockDialog.py:95 +#: ../dialogs/FBDBlockDialog.py:117 msgid "Execution Control:" msgstr "" -#: ../dialogs/FBDVariableDialog.py:76 ../dialogs/FBDBlockDialog.py:87 +#: ../dialogs/FBDVariableDialog.py:79 ../dialogs/FBDBlockDialog.py:105 msgid "Execution Order:" msgstr "" -#: ../features.py:11 +#: ../features.py:35 msgid "Experimental web based HMI" msgstr "" @@ -1520,54 +1579,52 @@ msgid "Exponentiation" msgstr "" -#: ../canfestival/canfestival.py:150 +#: ../canfestival/canfestival.py:174 msgid "Export CanOpen slave to EDS file" msgstr "" -#: ../controls/DebugVariablePanel.py:1472 ../editors/GraphicViewer.py:144 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:243 msgid "Export graph values to clipboard" msgstr "" -#: ../canfestival/canfestival.py:149 +#: ../canfestival/canfestival.py:173 msgid "Export slave" msgstr "" -#: ../dialogs/FBDVariableDialog.py:69 +#: ../dialogs/FBDVariableDialog.py:89 msgid "Expression:" msgstr "" -#: ../controls/VariablePanel.py:77 +#: ../controls/VariablePanel.py:72 msgid "External" msgstr "" -#: ../ProjectController.py:605 +#: ../ProjectController.py:740 msgid "Extracting Located Variables...\n" msgstr "" -#: ../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 msgid "FBD" msgstr "" -#: ../ProjectController.py:1480 +#: ../ProjectController.py:1729 msgid "Failed : Must build before transfer.\n" msgstr "" -#: ../editors/Viewer.py:404 ../dialogs/LDElementDialog.py:84 +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:462 msgid "Falling Edge" msgstr "" -#: ../plcopen/structures.py:216 -msgid "" -"Falling edge detector\n" -"The output produces a single pulse when a falling edge is detected." -msgstr "" - -#: ../ProjectController.py:927 +#: ../ProjectController.py:1008 msgid "Fatal : cannot get builder.\n" msgstr "" +#: ../Beremiz.py:118 +#, python-format +msgid "Fetching %s" +msgstr "" + #: ../dialogs/DurationEditorDialog.py:160 #, python-format msgid "Field %s hasn't a valid value!" @@ -1578,16 +1635,21 @@ msgid "Fields %s haven't a valid value!" msgstr "" -#: ../IDEFrame.py:358 ../dialogs/FindInPouDialog.py:30 -#: ../dialogs/FindInPouDialog.py:99 +#: ../controls/FolderTree.py:216 +#, python-format +msgid "File '%s' already exists!" +msgstr "" + +#: ../dialogs/SearchInProjectDialog.py:100 ../dialogs/FindInPouDialog.py:36 +#: ../dialogs/FindInPouDialog.py:106 ../IDEFrame.py:375 msgid "Find" msgstr "" -#: ../IDEFrame.py:360 +#: ../IDEFrame.py:377 msgid "Find Next" msgstr "" -#: ../IDEFrame.py:362 +#: ../IDEFrame.py:379 msgid "Find Previous" msgstr "" @@ -1595,15 +1657,15 @@ msgid "Find position" msgstr "" -#: ../dialogs/FindInPouDialog.py:51 +#: ../dialogs/FindInPouDialog.py:57 msgid "Find:" msgstr "" -#: ../connectors/PYRO/__init__.py:125 +#: ../connectors/PYRO/__init__.py:163 msgid "Force runtime reload\n" msgstr "" -#: ../controls/DebugVariablePanel.py:1934 ../editors/Viewer.py:1385 +#: ../editors/Viewer.py:1553 msgid "Force value" msgstr "" @@ -1611,75 +1673,73 @@ msgid "Forcing Variable Value" msgstr "" -#: ../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 #, python-format msgid "Form isn't complete. %s must be filled!" msgstr "" -#: ../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!" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:145 -msgid "Form isn't complete. Pattern to search must be filled!" -msgstr "" - -#: ../dialogs/FBDBlockDialog.py:152 +#: ../dialogs/FBDBlockDialog.py:228 msgid "Form isn't complete. Valid block type must be selected!" msgstr "" -#: ../dialogs/FindInPouDialog.py:67 +#: ../dialogs/FindInPouDialog.py:74 msgid "Forward" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:44 +#: ../dialogs/SearchInProjectDialog.py:36 ../IDEFrame.py:1746 msgid "Function" msgstr "" -#: ../IDEFrame.py:334 +#: ../IDEFrame.py:349 msgid "Function &Block" msgstr "" -#: ../IDEFrame.py:1845 ../dialogs/SearchInProjectDialog.py:45 +#: ../dialogs/SearchInProjectDialog.py:37 ../IDEFrame.py:1745 +#: ../IDEFrame.py:1938 msgid "Function Block" msgstr "" -#: ../controls/VariablePanel.py:744 +#: ../controls/VariablePanel.py:825 msgid "Function Block Types" msgstr "" -#: ../PLCControler.py:94 +#: ../PLCControler.py:95 msgid "Function Blocks" msgstr "" -#: ../editors/Viewer.py:236 +#: ../editors/Viewer.py:248 msgid "Function Blocks can't be used in Functions!" msgstr "" -#: ../PLCControler.py:2180 +#: ../PLCControler.py:2337 #, python-format msgid "FunctionBlock \"%s\" can't be pasted in a Function!!!" msgstr "" -#: ../PLCControler.py:94 +#: ../PLCControler.py:95 msgid "Functions" msgstr "" -#: ../PLCOpenEditor.py:119 +#: ../PLCOpenEditor.py:115 msgid "Generate Program" msgstr "" -#: ../ProjectController.py:524 +#: ../ProjectController.py:612 msgid "Generating SoftPLC IEC-61131 ST/IL/SFC code...\n" msgstr "" -#: ../controls/VariablePanel.py:78 +#: ../controls/VariablePanel.py:73 msgid "Global" msgstr "" -#: ../controls/DebugVariablePanel.py:1471 ../editors/GraphicViewer.py:131 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:242 msgid "Go to current value" msgstr "" @@ -1699,6 +1759,10 @@ msgid "Grid Resolution:" msgstr "" +#: ../runtime/NevowServer.py:181 +msgid "HTTP interface port :" +msgstr "" + #: ../controls/ProjectPropertiesPanel.py:120 msgid "Height:" msgstr "" @@ -1715,87 +1779,81 @@ msgid "Hours:" msgstr "" -#: ../plcopen/structures.py:278 -msgid "" -"Hysteresis\n" -"The hysteresis function block provides a hysteresis boolean output driven by the difference of two floating point (REAL) inputs XIN1 and XIN2." -msgstr "" - -#: ../ProjectController.py:851 -msgid "IEC-61131-3 code generation failed !\n" -msgstr "" - -#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31 -#: ../dialogs/PouDialog.py:36 +#: ../dialogs/PouActionDialog.py:31 ../dialogs/PouDialog.py:36 msgid "IL" msgstr "" -#: ../Beremiz_service.py:361 ../Beremiz_service.py:362 +#: ../dialogs/DiscoveryDialog.py:94 +msgid "IP" +msgstr "" + +#: ../Beremiz_service.py:308 ../Beremiz_service.py:309 msgid "IP is not valid!" msgstr "" -#: ../svgui/svgui.py:17 ../svgui/svgui.py:18 +#: ../svgui/svgui.py:42 ../svgui/svgui.py:43 msgid "Import SVG" msgstr "" -#: ../controls/VariablePanel.py:76 ../editors/Viewer.py:1412 -#: ../dialogs/FBDVariableDialog.py:34 +#: ../dialogs/FBDVariableDialog.py:38 ../editors/Viewer.py:1580 +#: ../controls/VariablePanel.py:71 msgid "InOut" msgstr "" -#: ../editors/Viewer.py:999 +#: ../editors/Viewer.py:1100 msgid "Inactive" msgstr "" -#: ../controls/VariablePanel.py:265 -#, python-format -msgid "Incompatible data types between \"%s\" and \"%s\"" -msgstr "" - -#: ../controls/VariablePanel.py:274 -#, python-format -msgid "Incompatible size of data between \"%s\" and \"%s\"" -msgstr "" - -#: ../controls/VariablePanel.py:270 +#: ../controls/VariablePanel.py:276 +#, python-brace-format +msgid "Incompatible data types between \"{a1}\" and \"{a2}\"" +msgstr "" + +#: ../controls/VariablePanel.py:282 #, python-format msgid "Incompatible size of data between \"%s\" and \"BOOL\"" msgstr "" -#: ../dialogs/ActionBlockDialog.py:37 +#: ../controls/VariablePanel.py:286 +#, python-brace-format +msgid "Incompatible size of data between \"{a1}\" and \"{a2}\"" +msgstr "" + +#: ../dialogs/ActionBlockDialog.py:38 msgid "Indicator" msgstr "" -#: ../editors/Viewer.py:491 +#: ../editors/Viewer.py:552 msgid "Initial Step" msgstr "" -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59 -#: ../editors/DataTypeEditor.py:50 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 msgid "Initial Value" msgstr "" -#: ../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 msgid "Initial Value:" msgstr "" -#: ../svgui/svgui.py:21 +#: ../svgui/svgui.py:46 msgid "Inkscape" msgstr "" -#: ../dialogs/ActionBlockDialog.py:41 ../dialogs/SFCTransitionDialog.py:66 -#: ../dialogs/SFCTransitionDialog.py:137 +#: ../dialogs/SFCTransitionDialog.py:75 ../dialogs/ActionBlockDialog.py:42 msgid "Inline" msgstr "" -#: ../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 msgid "Input" msgstr "" -#: ../dialogs/FBDBlockDialog.py:78 +#: ../dialogs/FBDBlockDialog.py:93 msgid "Inputs:" msgstr "" @@ -1803,22 +1861,16 @@ msgid "Insertion (into)" msgstr "" -#: ../plcopen/plcopen.py:1843 +#: ../plcopen/plcopen.py:1691 #, python-format msgid "Instance with id %d doesn't exist!" msgstr "" -#: ../editors/ResourceEditor.py:255 +#: ../editors/ResourceEditor.py:264 msgid "Instances:" msgstr "" -#: ../plcopen/structures.py:258 -msgid "" -"Integral\n" -"The integral function block integrates the value of input XIN over time." -msgstr "" - -#: ../controls/VariablePanel.py:75 +#: ../controls/VariablePanel.py:70 msgid "Interface" msgstr "" @@ -1830,33 +1882,40 @@ msgid "Interval" msgstr "" -#: ../PLCControler.py:2157 ../PLCControler.py:2195 +#: ../PLCControler.py:2325 msgid "Invalid plcopen element(s)!!!" msgstr "" -#: ../canfestival/config_utils.py:376 ../canfestival/config_utils.py:637 -#, python-format -msgid "Invalid type \"%s\"-> %d != %d for location\"%s\"" +#: ../canfestival/config_utils.py:381 +#, python-brace-format +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location\"{a4}\"" +msgstr "" + +#: ../canfestival/config_utils.py:645 +#, python-brace-format +msgid "Invalid type \"{a1}\"-> {a2} != {a3} for location \"{a4}\"" +msgstr "" + +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:132 +#: ../controls/DebugVariablePanel/DebugVariableTextViewer.py:92 +#: ../controls/DebugVariablePanel/DebugVariableGraphicViewer.py:166 +#, python-format +msgid "Invalid value \"%s\" for debug variable" +msgstr "" + +#: ../controls/VariablePanel.py:255 ../controls/VariablePanel.py:258 +#, python-format +msgid "Invalid value \"%s\" for variable grid element" +msgstr "" + +#: ../editors/Viewer.py:233 ../editors/Viewer.py:236 +#, python-format +msgid "Invalid value \"%s\" for viewer block" msgstr "" #: ../dialogs/ForceVariableDialog.py:177 -#, python-format -msgid "Invalid value \"%s\" for \"%s\" variable!" -msgstr "" - -#: ../controls/DebugVariablePanel.py:319 ../controls/DebugVariablePanel.py:322 -#, python-format -msgid "Invalid value \"%s\" for debug variable" -msgstr "" - -#: ../controls/VariablePanel.py:244 ../controls/VariablePanel.py:247 -#, python-format -msgid "Invalid value \"%s\" for variable grid element" -msgstr "" - -#: ../editors/Viewer.py:221 ../editors/Viewer.py:224 -#, python-format -msgid "Invalid value \"%s\" for viewer block" +#, python-brace-format +msgid "Invalid value \"{a1}\" for \"{a2}\" variable!" msgstr "" #: ../dialogs/DurationEditorDialog.py:121 @@ -1865,13 +1924,12 @@ "You must fill a numeric value." msgstr "" -#: ../editors/Viewer.py:496 +#: ../editors/Viewer.py:557 ../editors/Viewer.py:2343 msgid "Jump" msgstr "" -#: ../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 msgid "LD" msgstr "" @@ -1880,8 +1938,8 @@ msgid "Ladder element with id %d is on more than one rung." msgstr "" -#: ../dialogs/PouTransitionDialog.py:86 ../dialogs/PouActionDialog.py:83 -#: ../dialogs/PouDialog.py:102 +#: ../dialogs/PouTransitionDialog.py:91 ../dialogs/PouActionDialog.py:83 +#: ../dialogs/PouDialog.py:104 msgid "Language" msgstr "" @@ -1889,28 +1947,28 @@ msgid "Language (optional):" msgstr "" -#: ../dialogs/PouTransitionDialog.py:60 ../dialogs/PouActionDialog.py:56 -#: ../dialogs/PouDialog.py:71 +#: ../dialogs/PouTransitionDialog.py:65 ../dialogs/PouActionDialog.py:56 +#: ../dialogs/PouDialog.py:73 msgid "Language:" msgstr "" -#: ../ProjectController.py:1486 +#: ../ProjectController.py:1735 msgid "Latest build already matches current target. Transfering anyway...\n" msgstr "" -#: ../Beremiz_service.py:331 +#: ../Beremiz_service.py:271 msgid "Launch WX GUI inspector" msgstr "" -#: ../Beremiz_service.py:330 +#: ../Beremiz_service.py:270 msgid "Launch a live Python shell" msgstr "" -#: ../editors/Viewer.py:427 +#: ../editors/Viewer.py:485 msgid "Left" msgstr "" -#: ../dialogs/LDPowerRailDialog.py:55 +#: ../dialogs/LDPowerRailDialog.py:62 msgid "Left PowerRail" msgstr "" @@ -1926,35 +1984,39 @@ msgid "Less than or equal to" msgstr "" -#: ../IDEFrame.py:604 +#: ../IDEFrame.py:631 msgid "Library" msgstr "" +#: ../dialogs/AboutDialog.py:143 +msgid "License" +msgstr "" + #: ../plcopen/iec_std.csv:73 msgid "Limitation" msgstr "" -#: ../targets/toolchain_gcc.py:142 +#: ../targets/toolchain_gcc.py:166 msgid "Linking :\n" msgstr "" -#: ../controls/VariablePanel.py:77 ../dialogs/DiscoveryDialog.py:110 +#: ../dialogs/DiscoveryDialog.py:111 ../controls/VariablePanel.py:72 msgid "Local" msgstr "" -#: ../canfestival/canfestival.py:322 +#: ../canfestival/canfestival.py:346 msgid "Local entries" msgstr "" -#: ../ProjectController.py:1391 +#: ../ProjectController.py:1641 msgid "Local service discovery failed!\n" msgstr "" -#: ../controls/VariablePanel.py:58 +#: ../controls/VariablePanel.py:53 msgid "Location" msgstr "" -#: ../dialogs/BrowseLocationsDialog.py:68 +#: ../dialogs/BrowseLocationsDialog.py:72 msgid "Locations available:" msgstr "" @@ -1962,41 +2024,43 @@ msgid "Logarithm to base 10" msgstr "" -#: ../connectors/PYRO/__init__.py:55 +#: ../connectors/PYRO/__init__.py:94 #, python-format msgid "MDNS resolution failure for '%s'\n" msgstr "" -#: ../canfestival/SlaveEditor.py:41 ../canfestival/NetworkEditor.py:62 +#: ../canfestival/SlaveEditor.py:64 ../canfestival/NetworkEditor.py:85 msgid "Map Variable" msgstr "" -#: ../features.py:7 +#: ../features.py:31 msgid "Map located variables over CANopen" msgstr "" -#: ../canfestival/NetworkEditor.py:83 +#: ../canfestival/NetworkEditor.py:106 msgid "Master" msgstr "" -#: ../ConfigTreeNode.py:500 -#, python-format -msgid "Max count (%d) reached for this confnode of type %s " +#: ../ConfigTreeNode.py:539 +#, python-brace-format +msgid "Max count ({a1}) reached for this confnode of type {a2} " msgstr "" #: ../plcopen/iec_std.csv:71 msgid "Maximum" msgstr "" -#: ../editors/DataTypeEditor.py:238 +#: ../editors/DataTypeEditor.py:239 msgid "Maximum:" msgstr "" -#: ../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 msgid "Memory" msgstr "" -#: ../IDEFrame.py:572 +#: ../IDEFrame.py:599 msgid "Menu ToolBar" msgstr "" @@ -2004,7 +2068,7 @@ msgid "Microseconds:" msgstr "" -#: ../editors/Viewer.py:432 +#: ../editors/Viewer.py:490 msgid "Middle" msgstr "" @@ -2016,7 +2080,7 @@ msgid "Minimum" msgstr "" -#: ../editors/DataTypeEditor.py:225 +#: ../editors/DataTypeEditor.py:226 msgid "Minimum:" msgstr "" @@ -2028,60 +2092,52 @@ msgid "Miscellaneous" msgstr "" -#: ../dialogs/LDElementDialog.py:59 +#: ../dialogs/LDElementDialog.py:63 msgid "Modifier:" msgstr "" -#: ../PLCGenerator.py:732 ../PLCGenerator.py:975 -#, python-format -msgid "More than one connector found corresponding to \"%s\" continuation in \"%s\" POU" -msgstr "" - -#: ../dialogs/ActionBlockDialog.py:141 +#: ../PLCGenerator.py:786 ../PLCGenerator.py:1230 +#, python-brace-format +msgid "More than one connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +msgstr "" + +#: ../dialogs/ActionBlockDialog.py:140 msgid "Move action down" msgstr "" -#: ../dialogs/ActionBlockDialog.py:140 +#: ../dialogs/ActionBlockDialog.py:139 msgid "Move action up" msgstr "" -#: ../controls/DebugVariablePanel.py:1532 -msgid "Move debug variable down" -msgstr "" - -#: ../controls/DebugVariablePanel.py:1531 -msgid "Move debug variable up" -msgstr "" - #: ../controls/CustomEditableListBox.py:43 msgid "Move down" msgstr "" +#: ../editors/DataTypeEditor.py:355 +msgid "Move element down" +msgstr "" + #: ../editors/DataTypeEditor.py:354 -msgid "Move element down" -msgstr "" - -#: ../editors/DataTypeEditor.py:353 msgid "Move element up" msgstr "" -#: ../editors/ResourceEditor.py:262 +#: ../editors/ResourceEditor.py:271 msgid "Move instance down" msgstr "" -#: ../editors/ResourceEditor.py:261 +#: ../editors/ResourceEditor.py:270 msgid "Move instance up" msgstr "" -#: ../editors/ResourceEditor.py:233 +#: ../editors/ResourceEditor.py:242 msgid "Move task down" msgstr "" -#: ../editors/ResourceEditor.py:232 +#: ../editors/ResourceEditor.py:241 msgid "Move task up" msgstr "" -#: ../IDEFrame.py:82 ../IDEFrame.py:97 ../IDEFrame.py:127 ../IDEFrame.py:168 +#: ../IDEFrame.py:99 ../IDEFrame.py:114 ../IDEFrame.py:144 ../IDEFrame.py:185 msgid "Move the view" msgstr "" @@ -2089,11 +2145,11 @@ msgid "Move up" msgstr "" -#: ../controls/VariablePanel.py:383 ../c_ext/CFileEditor.py:520 +#: ../editors/CodeFileEditor.py:661 ../controls/VariablePanel.py:453 msgid "Move variable down" msgstr "" -#: ../controls/VariablePanel.py:382 ../c_ext/CFileEditor.py:519 +#: ../editors/CodeFileEditor.py:660 ../controls/VariablePanel.py:452 msgid "Move variable up" msgstr "" @@ -2109,19 +2165,22 @@ msgid "My Computer:" msgstr "" -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59 -#: ../editors/DataTypeEditor.py:50 ../editors/ResourceEditor.py:68 -#: ../editors/ResourceEditor.py:77 +#: ../dialogs/DiscoveryDialog.py:92 +msgid "NAME" +msgstr "" + +#: ../editors/ResourceEditor.py:68 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 msgid "Name" msgstr "" -#: ../Beremiz_service.py:386 +#: ../Beremiz_service.py:332 msgid "Name must not be null!" msgstr "" -#: ../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 msgid "Name:" msgstr "" @@ -2129,12 +2188,20 @@ msgid "Natural logarithm" msgstr "" -#: ../editors/Viewer.py:402 ../dialogs/LDElementDialog.py:67 +#: ../dialogs/LDElementDialog.py:75 ../editors/Viewer.py:460 msgid "Negated" msgstr "" -#: ../Beremiz.py:309 ../Beremiz.py:344 ../PLCOpenEditor.py:106 -#: ../PLCOpenEditor.py:148 +#: ../Beremiz_service.py:578 +msgid "Nevow Web service failed. " +msgstr "" + +#: ../Beremiz_service.py:554 +msgid "Nevow/Athena import failed :" +msgstr "" + +#: ../PLCOpenEditor.py:102 ../PLCOpenEditor.py:144 ../Beremiz.py:321 +#: ../Beremiz.py:356 msgid "New" msgstr "" @@ -2142,94 +2209,91 @@ msgid "New item" msgstr "" -#: ../editors/Viewer.py:401 +#: ../editors/Viewer.py:459 msgid "No Modifier" msgstr "" -#: ../PLCControler.py:3054 -msgid "No PLC project found" -msgstr "" - -#: ../ProjectController.py:1513 +#: ../ProjectController.py:1763 msgid "No PLC to transfer (did build succeed ?)\n" msgstr "" -#: ../PLCGenerator.py:1360 +#: ../PLCGenerator.py:1631 #, python-format msgid "No body defined in \"%s\" POU" msgstr "" -#: ../PLCGenerator.py:751 ../PLCGenerator.py:984 -#, python-format -msgid "No connector found corresponding to \"%s\" continuation in \"%s\" POU" -msgstr "" - -#: ../PLCOpenEditor.py:349 +#: ../PLCGenerator.py:806 ../PLCGenerator.py:1241 +#, python-brace-format +msgid "No connector found corresponding to \"{a1}\" continuation in \"{a2}\" POU" +msgstr "" + +#: ../PLCOpenEditor.py:347 msgid "" "No documentation available.\n" "Coming soon." msgstr "" -#: ../PLCGenerator.py:773 +#: ../PLCGenerator.py:829 #, python-format msgid "No informations found for \"%s\" block" msgstr "" -#: ../plcopen/structures.py:166 -msgid "No output variable found" +#: ../PLCGenerator.py:1194 +#, python-brace-format +msgid "No output {a1} variable found in block {a2} in POU {a3}. Connection must be broken" msgstr "" #: ../controls/SearchResultPanel.py:169 msgid "No search results available." msgstr "" -#: ../svgui/svgui.py:98 +#: ../svgui/svgui.py:131 #, python-format msgid "No such SVG file: %s\n" msgstr "" -#: ../canfestival/config_utils.py:632 -#, python-format -msgid "No such index/subindex (%x,%x) (variable %s)" -msgstr "" - -#: ../canfestival/config_utils.py:361 -#, python-format -msgid "No such index/subindex (%x,%x) in ID : %d (variable %s)" +#: ../canfestival/config_utils.py:639 +#, python-brace-format +msgid "No such index/subindex ({a1},{a2}) (variable {a3})" +msgstr "" + +#: ../canfestival/config_utils.py:362 +#, python-brace-format +msgid "No such index/subindex ({a1},{a2}) in ID : {a3} (variable {a4})" msgstr "" #: ../dialogs/BrowseValuesLibraryDialog.py:83 msgid "No valid value selected!" msgstr "" -#: ../PLCGenerator.py:1358 +#: ../PLCGenerator.py:1629 #, python-format msgid "No variable defined in \"%s\" POU" msgstr "" -#: ../canfestival/config_utils.py:354 -#, python-format -msgid "Non existing node ID : %d (variable %s)" -msgstr "" - -#: ../controls/VariablePanel.py:69 +#: ../canfestival/config_utils.py:355 +#, python-brace-format +msgid "Non existing node ID : {a1} (variable {a2})" +msgstr "" + +#: ../controls/VariablePanel.py:64 msgid "Non-Retain" msgstr "" -#: ../dialogs/LDElementDialog.py:62 +#: ../dialogs/LDElementDialog.py:75 msgid "Normal" msgstr "" -#: ../canfestival/config_utils.py:383 -#, python-format -msgid "Not PDO mappable variable : '%s' (ID:%d,Idx:%x,sIdx:%x))" +#: ../canfestival/config_utils.py:389 +#, python-brace-format +msgid "Not PDO mappable variable : '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))" msgstr "" #: ../plcopen/iec_std.csv:80 msgid "Not equal to" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:80 +#: ../dialogs/SFCDivergenceDialog.py:89 msgid "Number of sequences:" msgstr "" @@ -2237,44 +2301,36 @@ msgid "Numerical" msgstr "" -#: ../plcopen/structures.py:246 -msgid "" -"Off-delay timer\n" -"The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." -msgstr "" - -#: ../plcopen/structures.py:241 -msgid "" -"On-delay timer\n" -"The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." -msgstr "" - -#: ../dialogs/SearchInProjectDialog.py:93 +#: ../dialogs/SearchInProjectDialog.py:86 msgid "Only Elements" msgstr "" -#: ../Beremiz.py:311 ../Beremiz.py:345 ../PLCOpenEditor.py:108 -#: ../PLCOpenEditor.py:149 +#: ../PLCOpenEditor.py:104 ../PLCOpenEditor.py:145 ../Beremiz.py:323 +#: ../Beremiz.py:357 msgid "Open" msgstr "" -#: ../svgui/svgui.py:107 +#: ../svgui/svgui.py:140 msgid "Open Inkscape" msgstr "" -#: ../ProjectController.py:1565 +#: ../version.py:66 +msgid "Open Source framework for automation, implemented IEC 61131 IDE with constantly growing set of extensions and flexible PLC runtime." +msgstr "" + +#: ../ProjectController.py:1815 msgid "Open a file explorer to manage project files" msgstr "" -#: ../wxglade_hmi/wxglade_hmi.py:109 +#: ../wxglade_hmi/wxglade_hmi.py:138 msgid "Open wxGlade" msgstr "" -#: ../controls/VariablePanel.py:58 ../controls/VariablePanel.py:59 +#: ../controls/VariablePanel.py:53 ../controls/VariablePanel.py:54 msgid "Option" msgstr "" -#: ../dialogs/FindInPouDialog.py:76 +#: ../dialogs/FindInPouDialog.py:83 msgid "Options" msgstr "" @@ -2282,63 +2338,99 @@ msgid "Organization (optional):" msgstr "" -#: ../canfestival/SlaveEditor.py:51 ../canfestival/NetworkEditor.py:72 +#: ../canfestival/SlaveEditor.py:74 ../canfestival/NetworkEditor.py:95 msgid "Other Profile" msgstr "" -#: ../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 msgid "Output" msgstr "" -#: ../canfestival/SlaveEditor.py:40 ../canfestival/NetworkEditor.py:61 +#: ../canfestival/SlaveEditor.py:63 ../canfestival/NetworkEditor.py:84 msgid "PDO Receive" msgstr "" -#: ../canfestival/SlaveEditor.py:39 ../canfestival/NetworkEditor.py:60 +#: ../canfestival/SlaveEditor.py:62 ../canfestival/NetworkEditor.py:83 msgid "PDO Transmit" msgstr "" -#: ../plcopen/structures.py:268 +#: ../targets/toolchain_gcc.py:131 +msgid "PLC :\n" +msgstr "" + +#: ../Beremiz.py:453 +msgid "PLC Log" +msgstr "" + +#: ../ProjectController.py:992 +msgid "PLC code generation failed !\n" +msgstr "" + +#: ../Beremiz_service.py:295 +msgid "PLC is empty or already started." +msgstr "" + +#: ../Beremiz_service.py:302 +msgid "PLC is not started." +msgstr "" + +#: ../PLCOpenEditor.py:196 ../PLCOpenEditor.py:309 +#, python-brace-format msgid "" -"PID\n" -"The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." -msgstr "" - -#: ../targets/toolchain_gcc.py:107 -msgid "PLC :\n" -msgstr "" - -#: ../Beremiz.py:425 -msgid "PLC Log" -msgstr "" - -#: ../PLCOpenEditor.py:294 ../PLCOpenEditor.py:370 +"PLC syntax error at line {a1}:\n" +"{a2}" +msgstr "" + +#: ../PLCOpenEditor.py:292 ../PLCOpenEditor.py:373 msgid "PLCOpen files (*.xml)|*.xml|All files|*.*" msgstr "" -#: ../PLCOpenEditor.py:156 ../PLCOpenEditor.py:212 +#: ../PLCOpenEditor.py:152 ../PLCOpenEditor.py:209 msgid "PLCOpenEditor" msgstr "" -#: ../dialogs/PouDialog.py:98 +#: ../PLCOpenEditor.py:355 +msgid "" +"PLCOpenEditor is part of Beremiz project.\n" +"\n" +"Beremiz is an " +msgstr "" + +#: ../dialogs/DiscoveryDialog.py:95 +msgid "PORT" +msgstr "" + +#: ../dialogs/PouDialog.py:100 msgid "POU Name" msgstr "" -#: ../dialogs/PouDialog.py:56 +#: ../dialogs/PouDialog.py:58 msgid "POU Name:" msgstr "" -#: ../dialogs/PouDialog.py:100 +#: ../dialogs/PouDialog.py:102 msgid "POU Type" msgstr "" -#: ../dialogs/PouDialog.py:63 +#: ../dialogs/PouDialog.py:65 msgid "POU Type:" msgstr "" -#: ../Beremiz.py:324 ../PLCOpenEditor.py:122 +#: ../connectors/PYRO/__init__.py:45 +#, python-format +msgid "PYRO connecting to URI : %s\n" +msgstr "" + +#: ../connectors/PYRO/__init__.py:61 +#, python-format +msgid "PYRO using certificates in '%s' \n" +msgstr "" + +#: ../PLCOpenEditor.py:118 ../Beremiz.py:336 msgid "Page Setup" msgstr "" @@ -2346,88 +2438,88 @@ msgid "Page Size (optional):" msgstr "" -#: ../IDEFrame.py:2492 +#: ../IDEFrame.py:2599 #, python-format msgid "Page: %d" msgstr "" -#: ../controls/PouInstanceVariablesPanel.py:48 +#: ../controls/PouInstanceVariablesPanel.py:124 msgid "Parent instance" msgstr "" -#: ../IDEFrame.py:355 ../IDEFrame.py:407 ../editors/Viewer.py:537 +#: ../editors/Viewer.py:598 ../IDEFrame.py:372 ../IDEFrame.py:426 msgid "Paste" msgstr "" -#: ../IDEFrame.py:1776 +#: ../IDEFrame.py:1865 msgid "Paste POU" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:64 +#: ../dialogs/SearchInProjectDialog.py:56 msgid "Pattern to search:" msgstr "" -#: ../dialogs/LDPowerRailDialog.py:64 +#: ../dialogs/LDPowerRailDialog.py:73 msgid "Pin number:" msgstr "" -#: ../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" msgstr "" -#: ../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" +msgstr "" + +#: ../editors/Viewer.py:2576 ../editors/Viewer.py:3005 msgid "Please enter comment text" msgstr "" -#: ../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" msgstr "" +#: ../Beremiz_service.py:194 +msgid "Please enter text" +msgstr "" + #: ../dialogs/ForceVariableDialog.py:163 #, python-format msgid "Please enter value for a \"%s\" variable:" msgstr "" -#: ../Beremiz_service.py:371 +#: ../Beremiz_service.py:317 msgid "Port number must be 0 <= port <= 65535!" msgstr "" -#: ../Beremiz_service.py:371 +#: ../Beremiz_service.py:317 msgid "Port number must be an integer!" msgstr "" -#: ../editors/GraphicViewer.py:105 -msgid "Position:" -msgstr "" - -#: ../editors/Viewer.py:475 +#: ../editors/Viewer.py:536 ../editors/Viewer.py:2367 msgid "Power Rail" msgstr "" -#: ../dialogs/LDPowerRailDialog.py:36 +#: ../dialogs/LDPowerRailDialog.py:50 msgid "Power Rail Properties" msgstr "" -#: ../Beremiz.py:326 ../PLCOpenEditor.py:124 +#: ../PLCOpenEditor.py:120 ../Beremiz.py:338 msgid "Preview" msgstr "" -#: ../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 msgid "Preview:" msgstr "" -#: ../Beremiz.py:328 ../Beremiz.py:348 ../PLCOpenEditor.py:126 -#: ../PLCOpenEditor.py:152 +#: ../PLCOpenEditor.py:122 ../PLCOpenEditor.py:148 ../Beremiz.py:340 +#: ../Beremiz.py:360 msgid "Print" msgstr "" -#: ../IDEFrame.py:1038 +#: ../IDEFrame.py:1075 msgid "Print preview" msgstr "" @@ -2435,15 +2527,19 @@ msgid "Priority" msgstr "" -#: ../dialogs/SFCTransitionDialog.py:83 +#: ../dialogs/SFCTransitionDialog.py:89 msgid "Priority:" msgstr "" -#: ../runtime/PLCObject.py:318 +#: ../runtime/PLCObject.py:370 #, python-format msgid "Problem starting PLC : error %d" msgstr "" +#: ../dialogs/ProjectDialog.py:55 +msgid "Product Name" +msgstr "" + #: ../controls/ProjectPropertiesPanel.py:80 msgid "Product Name (required):" msgstr "" @@ -2452,27 +2548,32 @@ msgid "Product Release (optional):" msgstr "" +#: ../dialogs/ProjectDialog.py:56 +msgid "Product Version" +msgstr "" + #: ../controls/ProjectPropertiesPanel.py:81 msgid "Product Version (required):" msgstr "" -#: ../IDEFrame.py:1848 ../dialogs/SearchInProjectDialog.py:46 +#: ../dialogs/SearchInProjectDialog.py:38 ../IDEFrame.py:1744 +#: ../IDEFrame.py:1941 msgid "Program" msgstr "" -#: ../PLCOpenEditor.py:339 +#: ../PLCOpenEditor.py:337 msgid "Program was successfully generated!" msgstr "" -#: ../PLCControler.py:95 +#: ../PLCControler.py:96 msgid "Programs" msgstr "" -#: ../editors/Viewer.py:230 +#: ../editors/Viewer.py:242 msgid "Programs can't be used by other POUs!" msgstr "" -#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:557 +#: ../controls/ProjectPropertiesPanel.py:84 ../IDEFrame.py:584 msgid "Project" msgstr "" @@ -2481,10 +2582,14 @@ msgid "Project '%s':" msgstr "" -#: ../ProjectController.py:1564 +#: ../ProjectController.py:1814 msgid "Project Files" msgstr "" +#: ../dialogs/ProjectDialog.py:54 +msgid "Project Name" +msgstr "" + #: ../controls/ProjectPropertiesPanel.py:78 msgid "Project Name (required):" msgstr "" @@ -2493,103 +2598,96 @@ msgid "Project Version (optional):" msgstr "" -#: ../PLCControler.py:3041 +#: ../PLCControler.py:3158 msgid "" "Project file syntax error:\n" "\n" msgstr "" -#: ../editors/ProjectNodeEditor.py:14 ../dialogs/ProjectDialog.py:32 +#: ../dialogs/ProjectDialog.py:32 ../editors/ProjectNodeEditor.py:37 msgid "Project properties" msgstr "" -#: ../ConfigTreeNode.py:526 -#, python-format -msgid "Project tree layout do not match confnode.xml %s!=%s " -msgstr "" - -#: ../dialogs/ConnectionDialog.py:96 +#: ../ConfigTreeNode.py:566 +#, python-brace-format +msgid "Project tree layout do not match confnode.xml {a1}!={a2} " +msgstr "" + +#: ../dialogs/ConnectionDialog.py:94 msgid "Propagate Name" msgstr "" -#: ../PLCControler.py:96 +#: ../PLCControler.py:97 msgid "Properties" msgstr "" -#: ../plcopen/structures.py:236 -msgid "" -"Pulse timer\n" -"The pulse timer can be used to generate output pulses of a given time duration." -msgstr "" - -#: ../py_ext/PythonEditor.py:61 +#: ../Beremiz_service.py:440 +msgid "Publishing service on local network" +msgstr "" + +#: ../connectors/PYRO/__init__.py:118 +#, python-format +msgid "Pyro exception: %s\n" +msgstr "" + +#: ../Beremiz_service.py:427 +msgid "Pyro object's uri :" +msgstr "" + +#: ../Beremiz_service.py:426 +msgid "Pyro port :" +msgstr "" + +#: ../py_ext/PythonEditor.py:81 msgid "Python code" msgstr "" -#: ../features.py:9 +#: ../features.py:33 msgid "Python file" msgstr "" -#: ../dialogs/ActionBlockDialog.py:37 +#: ../dialogs/ActionBlockDialog.py:38 msgid "Qualifier" msgstr "" -#: ../Beremiz_service.py:333 ../Beremiz.py:331 ../PLCOpenEditor.py:132 +#: ../PLCOpenEditor.py:128 ../Beremiz.py:343 ../Beremiz_service.py:273 msgid "Quit" msgstr "" -#: ../plcopen/structures.py:201 -msgid "" -"RS bistable\n" -"The RS bistable is a latch where the Reset dominates." -msgstr "" - -#: ../plcopen/structures.py:273 -msgid "" -"Ramp\n" -"The RAMP function block is modelled on example given in the standard." -msgstr "" - -#: ../controls/DebugVariablePanel.py:1462 ../editors/GraphicViewer.py:89 +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:225 msgid "Range:" msgstr "" -#: ../ProjectController.py:1560 +#: ../ProjectController.py:1810 msgid "Raw IEC code" msgstr "" -#: ../plcopen/structures.py:253 -msgid "" -"Real time clock\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." -msgstr "" - -#: ../Beremiz.py:1072 +#: ../Beremiz.py:1143 #, python-format msgid "Really delete node '%s'?" msgstr "" -#: ../IDEFrame.py:345 ../IDEFrame.py:403 +#: ../IDEFrame.py:362 ../IDEFrame.py:422 msgid "Redo" msgstr "" -#: ../dialogs/SFCTransitionDialog.py:57 ../dialogs/SFCTransitionDialog.py:135 +#: ../dialogs/SFCTransitionDialog.py:74 msgid "Reference" msgstr "" -#: ../IDEFrame.py:413 ../dialogs/DiscoveryDialog.py:105 +#: ../dialogs/DiscoveryDialog.py:106 ../IDEFrame.py:432 msgid "Refresh" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:73 +#: ../dialogs/SearchInProjectDialog.py:66 msgid "Regular expression" msgstr "" -#: ../dialogs/FindInPouDialog.py:91 +#: ../dialogs/FindInPouDialog.py:98 msgid "Regular expressions" msgstr "" -#: ../controls/DebugVariablePanel.py:1938 ../editors/Viewer.py:1388 +#: ../editors/Viewer.py:1556 msgid "Release value" msgstr "" @@ -2597,20 +2695,24 @@ msgid "Remainder (modulo)" msgstr "" -#: ../Beremiz.py:1073 +#: ../Beremiz.py:1144 #, python-format msgid "Remove %s node" msgstr "" -#: ../dialogs/ActionBlockDialog.py:139 +#: ../IDEFrame.py:2405 +msgid "Remove Datatype" +msgstr "" + +#: ../IDEFrame.py:2410 +msgid "Remove Pou" +msgstr "" + +#: ../dialogs/ActionBlockDialog.py:138 msgid "Remove action" msgstr "" -#: ../controls/DebugVariablePanel.py:1530 -msgid "Remove debug variable" -msgstr "" - -#: ../editors/DataTypeEditor.py:352 +#: ../editors/DataTypeEditor.py:353 msgid "Remove element" msgstr "" @@ -2618,23 +2720,23 @@ msgid "Remove file from left folder" msgstr "" -#: ../editors/ResourceEditor.py:260 +#: ../editors/ResourceEditor.py:269 msgid "Remove instance" msgstr "" -#: ../canfestival/NetworkEditor.py:81 +#: ../canfestival/NetworkEditor.py:104 msgid "Remove slave" msgstr "" -#: ../editors/ResourceEditor.py:231 +#: ../editors/ResourceEditor.py:240 msgid "Remove task" msgstr "" -#: ../controls/VariablePanel.py:381 ../c_ext/CFileEditor.py:518 +#: ../editors/CodeFileEditor.py:659 ../controls/VariablePanel.py:451 msgid "Remove variable" msgstr "" -#: ../IDEFrame.py:1852 +#: ../IDEFrame.py:1945 msgid "Rename" msgstr "" @@ -2642,6 +2744,10 @@ msgid "Replace File" msgstr "" +#: ../editors/Viewer.py:502 +msgid "Replace Wire by connections" +msgstr "" + #: ../plcopen/iec_std.csv:89 msgid "Replacement (within)" msgstr "" @@ -2650,11 +2756,11 @@ msgid "Reset" msgstr "" -#: ../editors/Viewer.py:521 +#: ../editors/Viewer.py:583 msgid "Reset Execution Order" msgstr "" -#: ../IDEFrame.py:428 +#: ../IDEFrame.py:451 msgid "Reset Perspective" msgstr "" @@ -2662,40 +2768,30 @@ msgid "Reset search result" msgstr "" -#: ../editors/GraphicViewer.py:137 -msgid "Reset zoom and offset" -msgstr "" - -#: ../PLCControler.py:96 +#: ../PLCControler.py:97 ../Beremiz.py:1075 msgid "Resources" msgstr "" -#: ../controls/VariablePanel.py:67 +#: ../controls/VariablePanel.py:62 msgid "Retain" msgstr "" -#: ../controls/VariablePanel.py:354 +#: ../controls/VariablePanel.py:424 msgid "Return Type:" msgstr "" -#: ../editors/Viewer.py:429 +#: ../editors/Viewer.py:487 msgid "Right" msgstr "" -#: ../dialogs/LDPowerRailDialog.py:60 +#: ../dialogs/LDPowerRailDialog.py:63 msgid "Right PowerRail" msgstr "" -#: ../editors/Viewer.py:403 ../dialogs/LDElementDialog.py:80 +#: ../dialogs/LDElementDialog.py:77 ../editors/Viewer.py:461 msgid "Rising Edge" msgstr "" -#: ../plcopen/structures.py:211 -msgid "" -"Rising edge detector\n" -"The output produces a single pulse when a rising edge is detected." -msgstr "" - #: ../plcopen/iec_std.csv:65 msgid "Rotate left" msgstr "" @@ -2708,72 +2804,83 @@ msgid "Rounding up/down" msgstr "" -#: ../ProjectController.py:1528 +#: ../ProjectController.py:1778 msgid "Run" msgstr "" -#: ../ProjectController.py:865 ../ProjectController.py:874 -msgid "Runtime extensions C code generation failed !\n" -msgstr "" - -#: ../canfestival/SlaveEditor.py:38 ../canfestival/NetworkEditor.py:59 +#: ../ProjectController.py:1037 +msgid "Runtime IO extensions C code generation failed !\n" +msgstr "" + +#: ../ProjectController.py:1046 +msgid "Runtime library extensions C code generation failed !\n" +msgstr "" + +#: ../canfestival/SlaveEditor.py:61 ../canfestival/NetworkEditor.py:82 msgid "SDO Client" msgstr "" -#: ../canfestival/SlaveEditor.py:37 ../canfestival/NetworkEditor.py:58 +#: ../canfestival/SlaveEditor.py:60 ../canfestival/NetworkEditor.py:81 msgid "SDO Server" msgstr "" -#: ../controls/ProjectPropertiesPanel.py:143 ../dialogs/PouDialog.py:36 +#: ../dialogs/PouDialog.py:36 ../controls/ProjectPropertiesPanel.py:143 msgid "SFC" msgstr "" -#: ../plcopen/structures.py:196 -msgid "" -"SR bistable\n" -"The SR bistable is a latch where the Set dominates." -msgstr "" - -#: ../dialogs/PouTransitionDialog.py:35 ../dialogs/PouActionDialog.py:31 +#: ../PLCGenerator.py:1392 +#, python-brace-format +msgid "SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"" +msgstr "" + +#: ../PLCGenerator.py:773 +#, python-format +msgid "SFC transition in POU \"%s\" must be connected." +msgstr "" + +#: ../dialogs/PouTransitionDialog.py:40 ../dialogs/PouActionDialog.py:31 #: ../dialogs/PouDialog.py:36 msgid "ST" msgstr "" -#: ../PLCOpenEditor.py:326 +#: ../PLCOpenEditor.py:324 msgid "ST files (*.st)|*.st|All files|*.*" msgstr "" -#: ../svgui/svgui.py:92 +#: ../svgui/svgui.py:125 msgid "SVG files (*.svg)|*.svg|All files|*.*" msgstr "" -#: ../features.py:11 +#: ../features.py:35 msgid "SVGUI" msgstr "" -#: ../Beremiz.py:315 ../Beremiz.py:346 ../PLCOpenEditor.py:115 -#: ../PLCOpenEditor.py:150 +#: ../PLCOpenEditor.py:111 ../PLCOpenEditor.py:146 ../Beremiz.py:327 +#: ../Beremiz.py:358 msgid "Save" msgstr "" -#: ../Beremiz.py:347 ../PLCOpenEditor.py:117 ../PLCOpenEditor.py:151 +#: ../PLCOpenEditor.py:113 ../PLCOpenEditor.py:147 ../Beremiz.py:359 msgid "Save As..." msgstr "" -#: ../Beremiz.py:317 +#: ../Beremiz.py:329 msgid "Save as" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:76 +#: ../ProjectController.py:420 +msgid "Save path is the same as path of a project! \n" +msgstr "" + +#: ../dialogs/SearchInProjectDialog.py:69 msgid "Scope" msgstr "" -#: ../IDEFrame.py:596 ../dialogs/SearchInProjectDialog.py:105 +#: ../IDEFrame.py:623 msgid "Search" msgstr "" -#: ../IDEFrame.py:365 ../IDEFrame.py:409 -#: ../dialogs/SearchInProjectDialog.py:52 +#: ../dialogs/SearchInProjectDialog.py:44 ../IDEFrame.py:382 ../IDEFrame.py:428 msgid "Search in Project" msgstr "" @@ -2781,50 +2888,53 @@ msgid "Seconds:" msgstr "" -#: ../IDEFrame.py:371 +#: ../IDEFrame.py:388 msgid "Select All" msgstr "" -#: ../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:" msgstr "" -#: ../ProjectController.py:1039 +#: ../ProjectController.py:1195 msgid "Select an editor:" msgstr "" -#: ../controls/PouInstanceVariablesPanel.py:209 +#: ../controls/PouInstanceVariablesPanel.py:276 msgid "Select an instance" msgstr "" -#: ../IDEFrame.py:580 +#: ../IDEFrame.py:607 msgid "Select an object" msgstr "" +#: ../ProjectController.py:427 +msgid "Selected directory already contains another project. Overwrite? \n" +msgstr "" + #: ../plcopen/iec_std.csv:70 msgid "Selection" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:62 +#: ../dialogs/SFCDivergenceDialog.py:65 msgid "Selection Convergence" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:55 +#: ../dialogs/SFCDivergenceDialog.py:64 msgid "Selection Divergence" msgstr "" -#: ../plcopen/structures.py:206 -msgid "" -"Semaphore\n" -"The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." -msgstr "" - -#: ../dialogs/DiscoveryDialog.py:84 +#: ../dialogs/DiscoveryDialog.py:82 +msgid "Service Discovery" +msgstr "" + +#: ../dialogs/DiscoveryDialog.py:85 msgid "Services available:" msgstr "" -#: ../dialogs/LDElementDialog.py:72 +#: ../dialogs/LDElementDialog.py:76 msgid "Set" msgstr "" @@ -2836,27 +2946,27 @@ msgid "Shift right" msgstr "" -#: ../ProjectController.py:1554 +#: ../ProjectController.py:1804 msgid "Show IEC code generated by PLCGenerator" msgstr "" -#: ../canfestival/canfestival.py:363 +#: ../canfestival/canfestival.py:387 msgid "Show Master" msgstr "" -#: ../canfestival/canfestival.py:364 +#: ../canfestival/canfestival.py:388 msgid "Show Master generated by config_utils" msgstr "" -#: ../ProjectController.py:1552 +#: ../ProjectController.py:1802 msgid "Show code" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:74 +#: ../dialogs/SFCDivergenceDialog.py:67 msgid "Simultaneous Convergence" msgstr "" -#: ../dialogs/SFCDivergenceDialog.py:68 +#: ../dialogs/SFCDivergenceDialog.py:66 msgid "Simultaneous Divergence" msgstr "" @@ -2868,48 +2978,65 @@ msgid "Single" msgstr "" +#: ../targets/toolchain_makefile.py:126 +msgid "Source didn't change, no build.\n" +msgstr "" + +#: ../PLCGenerator.py:397 +#, python-brace-format +msgid "Source signal has to be defined for single task '{a1}' in resource '{a2}.{a3}'." +msgstr "" + #: ../plcopen/iec_std.csv:23 msgid "Square root (base 2)" msgstr "" -#: ../plcopen/structures.py:192 +#: ../plcopen/definitions.py:46 msgid "Standard function blocks" msgstr "" -#: ../Beremiz_service.py:321 ../ProjectController.py:1530 +#: ../ProjectController.py:1780 ../Beremiz_service.py:261 msgid "Start PLC" msgstr "" -#: ../ProjectController.py:843 +#: ../ProjectController.py:984 #, python-format msgid "Start build in %s\n" msgstr "" -#: ../ProjectController.py:1341 +#: ../ProjectController.py:1298 +msgid "Started" +msgstr "" + +#: ../ProjectController.py:1586 msgid "Starting PLC\n" msgstr "" -#: ../Beremiz.py:435 +#: ../Beremiz.py:463 msgid "Status ToolBar" msgstr "" -#: ../editors/Viewer.py:492 +#: ../editors/Viewer.py:553 ../editors/Viewer.py:2342 msgid "Step" msgstr "" -#: ../ProjectController.py:1533 +#: ../ProjectController.py:1783 msgid "Stop" msgstr "" -#: ../Beremiz_service.py:322 +#: ../Beremiz_service.py:262 msgid "Stop PLC" msgstr "" -#: ../ProjectController.py:1535 +#: ../ProjectController.py:1785 msgid "Stop Running PLC" msgstr "" -#: ../ProjectController.py:1318 +#: ../ProjectController.py:1299 +msgid "Stopped" +msgstr "" + +#: ../ProjectController.py:1558 msgid "Stopping debugger...\n" msgstr "" @@ -2925,27 +3052,35 @@ msgid "Subtraction" msgstr "" -#: ../ProjectController.py:942 +#: ../ProjectController.py:1023 msgid "Successfully built.\n" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:154 +#: ../IDEFrame.py:447 +msgid "Switch perspective" +msgstr "" + +#: ../dialogs/SearchInProjectDialog.py:165 ../dialogs/FindInPouDialog.py:172 msgid "Syntax error in regular expression of pattern to search!" msgstr "" +#: ../dialogs/DiscoveryDialog.py:93 +msgid "TYPE" +msgstr "" + #: ../plcopen/iec_std.csv:29 msgid "Tangent" msgstr "" -#: ../editors/ResourceEditor.py:77 +#: ../editors/ResourceEditor.py:83 msgid "Task" msgstr "" -#: ../editors/ResourceEditor.py:226 +#: ../editors/ResourceEditor.py:235 msgid "Tasks:" msgstr "" -#: ../controls/VariablePanel.py:78 +#: ../controls/VariablePanel.py:73 msgid "Temp" msgstr "" @@ -2960,16 +3095,16 @@ msgid "The group of block must be coherent!" msgstr "" -#: ../IDEFrame.py:974 ../Beremiz.py:590 +#: ../Beremiz.py:640 ../IDEFrame.py:1011 msgid "There are changes, do you want to save?" msgstr "" -#: ../IDEFrame.py:1590 ../IDEFrame.py:1609 +#: ../IDEFrame.py:1655 ../IDEFrame.py:1674 #, python-format msgid "There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?" msgstr "" -#: ../IDEFrame.py:1061 +#: ../IDEFrame.py:1098 msgid "" "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!" msgstr "" -#: ../editors/GraphicViewer.py:278 -msgid "Tick" +#: ../controls/DebugVariablePanel/DebugVariablePanel.py:565 +#, python-format +msgid "Tick: %d" msgstr "" #: ../plcopen/iec_std.csv:40 @@ -3016,77 +3152,85 @@ msgid "Time-of-day subtraction" msgstr "" -#: ../editors/Viewer.py:431 +#: ../editors/Viewer.py:489 msgid "Top" msgstr "" -#: ../ProjectController.py:1542 +#: ../ProjectController.py:1792 msgid "Transfer" msgstr "" -#: ../ProjectController.py:1544 +#: ../ProjectController.py:1794 msgid "Transfer PLC" msgstr "" -#: ../ProjectController.py:1509 +#: ../ProjectController.py:1758 msgid "Transfer completed successfully.\n" msgstr "" -#: ../ProjectController.py:1511 +#: ../ProjectController.py:1760 msgid "Transfer failed\n" msgstr "" -#: ../editors/Viewer.py:493 +#: ../editors/Viewer.py:554 ../editors/Viewer.py:2344 ../editors/Viewer.py:2371 msgid "Transition" msgstr "" -#: ../PLCGenerator.py:1252 +#: ../PLCGenerator.py:1518 #, python-format msgid "Transition \"%s\" body must contain an output variable or coil referring to its name" msgstr "" -#: ../dialogs/PouTransitionDialog.py:84 +#: ../dialogs/PouTransitionDialog.py:89 msgid "Transition Name" msgstr "" -#: ../dialogs/PouTransitionDialog.py:53 +#: ../dialogs/PouTransitionDialog.py:58 msgid "Transition Name:" msgstr "" -#: ../PLCGenerator.py:1340 -#, python-format -msgid "Transition with content \"%s\" not connected to a next step in \"%s\" POU" -msgstr "" - -#: ../PLCGenerator.py:1331 -#, python-format -msgid "Transition with content \"%s\" not connected to a previous step in \"%s\" POU" -msgstr "" - -#: ../plcopen/plcopen.py:1447 +#: ../PLCGenerator.py:1609 +#, python-brace-format +msgid "Transition with content \"{a1}\" not connected to a next step in \"{a2}\" POU" +msgstr "" + +#: ../PLCGenerator.py:1598 +#, python-brace-format +msgid "Transition with content \"{a1}\" not connected to a previous step in \"{a2}\" POU" +msgstr "" + +#: ../plcopen/plcopen.py:1318 #, python-format msgid "Transition with name %s doesn't exist!" msgstr "" -#: ../PLCControler.py:95 +#: ../PLCControler.py:96 msgid "Transitions" msgstr "" +#: ../dialogs/AboutDialog.py:123 +msgid "Translated by" +msgstr "" + #: ../editors/ResourceEditor.py:68 msgid "Triggering" msgstr "" -#: ../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." +msgstr "" + +#: ../dialogs/ActionBlockDialog.py:38 ../editors/ResourceEditor.py:83 +#: ../editors/DataTypeEditor.py:50 ../controls/VariablePanel.py:53 +#: ../controls/VariablePanel.py:54 msgid "Type" msgstr "" -#: ../dialogs/BrowseLocationsDialog.py:44 +#: ../dialogs/BrowseLocationsDialog.py:48 msgid "Type and derivated" msgstr "" -#: ../canfestival/config_utils.py:335 ../canfestival/config_utils.py:617 +#: ../canfestival/config_utils.py:336 ../canfestival/config_utils.py:624 #, python-format msgid "Type conflict for location \"%s\"" msgstr "" @@ -3095,122 +3239,117 @@ msgid "Type conversion" msgstr "" -#: ../editors/DataTypeEditor.py:161 +#: ../editors/DataTypeEditor.py:162 msgid "Type infos:" msgstr "" -#: ../dialogs/BrowseLocationsDialog.py:45 +#: ../dialogs/BrowseLocationsDialog.py:49 msgid "Type strict" msgstr "" -#: ../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 msgid "Type:" msgstr "" -#: ../canfestival/config_utils.py:455 ../canfestival/config_utils.py:469 +#: ../canfestival/config_utils.py:462 ../canfestival/config_utils.py:476 #, python-format msgid "Unable to define PDO mapping for node %02x" msgstr "" -#: ../targets/Xenomai/__init__.py:14 +#: ../targets/Xenomai/__init__.py:39 #, python-format msgid "Unable to get Xenomai's %s \n" msgstr "" -#: ../PLCGenerator.py:904 ../PLCGenerator.py:963 -#, python-format -msgid "Undefined block type \"%s\" in \"%s\" POU" -msgstr "" - -#: ../PLCGenerator.py:252 +#: ../PLCGenerator.py:961 ../PLCGenerator.py:1214 +#, python-brace-format +msgid "Undefined block type \"{a1}\" in \"{a2}\" POU" +msgstr "" + +#: ../PLCGenerator.py:254 #, python-format msgid "Undefined pou type \"%s\"" msgstr "" -#: ../IDEFrame.py:343 ../IDEFrame.py:402 +#: ../IDEFrame.py:360 ../IDEFrame.py:421 msgid "Undo" msgstr "" -#: ../ProjectController.py:262 +#: ../ProjectController.py:332 msgid "Unknown" msgstr "" -#: ../editors/Viewer.py:335 +#: ../editors/Viewer.py:393 #, python-format msgid "Unknown variable \"%s\" for this POU!" msgstr "" -#: ../ProjectController.py:259 ../ProjectController.py:260 +#: ../ProjectController.py:329 ../ProjectController.py:330 msgid "Unnamed" msgstr "" -#: ../PLCControler.py:305 +#: ../PLCControler.py:636 #, python-format msgid "Unnamed%d" msgstr "" -#: ../controls/VariablePanel.py:272 +#: ../controls/VariablePanel.py:284 #, python-format msgid "Unrecognized data size \"%s\"" msgstr "" -#: ../plcopen/structures.py:221 -msgid "" -"Up-counter\n" -"The up-counter can be used to signal when a count has reached a maximum value." -msgstr "" - -#: ../plcopen/structures.py:231 -msgid "" -"Up-down counter\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." -msgstr "" - -#: ../controls/VariablePanel.py:712 ../editors/DataTypeEditor.py:631 +#: ../editors/DataTypeEditor.py:632 ../controls/VariablePanel.py:798 msgid "User Data Types" msgstr "" -#: ../canfestival/SlaveEditor.py:42 ../canfestival/NetworkEditor.py:63 +#: ../canfestival/SlaveEditor.py:65 ../canfestival/NetworkEditor.py:86 msgid "User Type" msgstr "" -#: ../PLCControler.py:94 +#: ../PLCControler.py:95 msgid "User-defined POUs" msgstr "" -#: ../controls/DebugVariablePanel.py:58 ../dialogs/ActionBlockDialog.py:37 +#: ../dialogs/ActionBlockDialog.py:38 msgid "Value" msgstr "" -#: ../editors/GraphicViewer.py:278 -msgid "Values" -msgstr "" - -#: ../editors/DataTypeEditor.py:258 +#: ../editors/DataTypeEditor.py:259 msgid "Values:" msgstr "" -#: ../controls/DebugVariablePanel.py:58 ../editors/Viewer.py:465 -#: ../dialogs/ActionBlockDialog.py:41 +#: ../dialogs/ActionBlockDialog.py:42 ../editors/Viewer.py:526 +#: ../editors/Viewer.py:2374 msgid "Variable" msgstr "" -#: ../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 +msgid "Variable Drop" +msgstr "" + +#: ../dialogs/FBDVariableDialog.py:63 msgid "Variable Properties" msgstr "" -#: ../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 "Variable class" msgstr "" -#: ../editors/TextViewer.py:367 ../editors/Viewer.py:337 +#: ../editors/Viewer.py:395 ../editors/TextViewer.py:387 msgid "Variable don't belong to this POU!" msgstr "" -#: ../controls/VariablePanel.py:77 +#: ../dialogs/LDElementDialog.py:89 +msgid "Variable:" +msgstr "" + +#: ../controls/VariablePanel.py:72 msgid "Variables" msgstr "" @@ -3218,23 +3357,41 @@ msgid "Vertical:" msgstr "" -#: ../wxglade_hmi/wxglade_hmi.py:11 +#: ../Beremiz_service.py:586 +msgid "WAMP client startup failed. " +msgstr "" + +#: ../connectors/WAMP/__init__.py:91 +#, python-format +msgid "WAMP connecting to URL : %s\n" +msgstr "" + +#: ../connectors/WAMP/__init__.py:131 +msgid "WAMP connection timeout" +msgstr "" + +#: ../connectors/WAMP/__init__.py:150 +#, python-format +msgid "WAMP connection to '%s' failed.\n" +msgstr "" + +#: ../Beremiz_service.py:562 +msgid "WAMP import failed :" +msgstr "" + +#: ../wxglade_hmi/wxglade_hmi.py:35 msgid "WXGLADE GUI" msgstr "" -#: ../ProjectController.py:1302 -msgid "Waiting debugger to recover...\n" -msgstr "" - -#: ../editors/LDViewer.py:891 ../dialogs/PouDialog.py:126 +#: ../dialogs/PouDialog.py:128 ../editors/LDViewer.py:891 msgid "Warning" msgstr "" -#: ../ProjectController.py:529 +#: ../ProjectController.py:616 msgid "Warnings in ST/IL/SFC code generator :\n" msgstr "" -#: ../dialogs/SearchInProjectDialog.py:85 +#: ../dialogs/SearchInProjectDialog.py:78 msgid "Whole Project" msgstr "" @@ -3242,27 +3399,31 @@ msgid "Width:" msgstr "" -#: ../dialogs/FindInPouDialog.py:86 +#: ../dialogs/FindInPouDialog.py:93 msgid "Wrap search" msgstr "" -#: ../features.py:10 +#: ../dialogs/AboutDialog.py:122 +msgid "Written by" +msgstr "" + +#: ../features.py:34 msgid "WxGlade GUI" msgstr "" -#: ../svgui/svgui.py:106 +#: ../svgui/svgui.py:139 msgid "" "You don't have write permissions.\n" "Open Inkscape anyway ?" msgstr "" -#: ../wxglade_hmi/wxglade_hmi.py:108 +#: ../wxglade_hmi/wxglade_hmi.py:137 msgid "" "You don't have write permissions.\n" "Open wxGlade anyway ?" msgstr "" -#: ../ProjectController.py:224 +#: ../ProjectController.py:292 msgid "" "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!" msgstr "" -#: ../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!" msgstr "" @@ -3285,25 +3445,25 @@ msgid "You must type a value!" msgstr "" -#: ../IDEFrame.py:419 +#: ../IDEFrame.py:438 msgid "Zoom" msgstr "" -#: ../editors/GraphicViewer.py:97 -msgid "Zoom:" -msgstr "" - -#: ../PLCOpenEditor.py:335 +#: ../dialogs/DurationEditorDialog.py:151 +msgid "days" +msgstr "" + +#: ../PLCOpenEditor.py:333 #, python-format msgid "error: %s\n" msgstr "" -#: ../util/ProcessLogger.py:161 -#, python-format -msgid "exited with status %s (pid %s)\n" -msgstr "" - -#: ../PLCOpenEditor.py:393 ../PLCOpenEditor.py:395 +#: ../util/ProcessLogger.py:169 +#, python-brace-format +msgid "exited with status {a1} (pid {a2})\n" +msgstr "" + +#: ../PLCOpenEditor.py:396 ../PLCOpenEditor.py:398 msgid "file : " msgstr "" @@ -3311,7 +3471,7 @@ msgid "function" msgstr "" -#: ../PLCOpenEditor.py:396 +#: ../PLCOpenEditor.py:399 msgid "function : " msgstr "" @@ -3319,14 +3479,30 @@ msgid "functionBlock" msgstr "" -#: ../PLCOpenEditor.py:396 +#: ../dialogs/DurationEditorDialog.py:151 +msgid "hours" +msgstr "" + +#: ../PLCOpenEditor.py:399 msgid "line : " msgstr "" +#: ../dialogs/DurationEditorDialog.py:153 +msgid "milliseconds" +msgstr "" + +#: ../dialogs/DurationEditorDialog.py:152 +msgid "minutes" +msgstr "" + #: ../dialogs/PouDialog.py:31 msgid "program" msgstr "" +#: ../dialogs/DurationEditorDialog.py:152 +msgid "seconds" +msgstr "" + #: ../plcopen/iec_std.csv:84 msgid "string from the middle" msgstr "" @@ -3339,13 +3515,30 @@ msgid "string right of" msgstr "" -#: ../PLCOpenEditor.py:333 +#: ../Beremiz.py:126 +msgid "update info unavailable." +msgstr "" + +#: ../PLCOpenEditor.py:331 #, python-format msgid "warning: %s\n" msgstr "" +#: ../PLCControler.py:970 +#, python-brace-format +msgid "{a1} \"{a2}\" can't be pasted as a {a3}." +msgstr "" + +#: ../ConfigTreeNode.py:56 +#, python-brace-format +msgid "" +"{a1} XML file doesn't follow XSD schema at line %{a2}:\n" +"{a3}" +msgstr "" + #: Extra XSD strings + msgid "CanFestivalSlaveNode" msgstr "" @@ -3376,15 +3569,39 @@ msgid "CAN_Driver" msgstr "" -msgid "CExtension" +msgid "Generic" +msgstr "" + +msgid "Command" +msgstr "" + +msgid "Xenomai" +msgstr "" + +msgid "XenoConfig" +msgstr "" + +msgid "Compiler" msgstr "" msgid "CFLAGS" msgstr "" +msgid "Linker" +msgstr "" + msgid "LDFLAGS" msgstr "" +msgid "PLC" +msgstr "" + +msgid "Linux" +msgstr "" + +msgid "Win32" +msgstr "" + msgid "BaseParams" msgstr "" @@ -3394,24 +3611,6 @@ msgid "Enabled" msgstr "" -msgid "Linux" -msgstr "" - -msgid "Compiler" -msgstr "" - -msgid "Linker" -msgstr "" - -msgid "Win32" -msgstr "" - -msgid "Xenomai" -msgstr "" - -msgid "XenoConfig" -msgstr "" - msgid "BeremizRoot" msgstr "" @@ -3426,3 +3625,186 @@ msgid "Disable_Extensions" msgstr "" + +msgid "%(codefile_name)s" +msgstr "" + +msgid "variables" +msgstr "" + +msgid "variable" +msgstr "" + +msgid "name" +msgstr "" + +msgid "type" +msgstr "" + +msgid "class" +msgstr "" + +msgid "initial" +msgstr "" + +msgid "desc" +msgstr "" + +msgid "onchange" +msgstr "" + +msgid "opts" +msgstr "" + +#: Extra TC6 documentation strings + + +msgid "0 - current time, 1 - load time from PDT" +msgstr "" + +msgid "Preset datetime" +msgstr "" + +msgid "Copy of IN" +msgstr "" + +msgid "Datetime, current or relative to PDT" +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 "1 = integrate, 0 = hold" +msgstr "" + +msgid "Overriding reset" +msgstr "" + +msgid "Input variable" +msgstr "" + +msgid "Initial value" +msgstr "" + +msgid "Sampling period" +msgstr "" + +msgid "NOT R1" +msgstr "" + +msgid "Integrated output" +msgstr "" + +msgid "The integral function block integrates the value of input XIN over time." +msgstr "" + +msgid "0 = reset" +msgstr "" + +msgid "Input to be differentiated" +msgstr "" + +msgid "Differentiated output" +msgstr "" + +msgid "The derivative function block produces an output XOUT proportional to the rate of change of the input XIN." +msgstr "" + +msgid "0 - manual , 1 - automatic" +msgstr "" + +msgid "Process variable" +msgstr "" + +msgid "Set point" +msgstr "" + +msgid "Manual output adjustment - Typically from transfer station" +msgstr "" + +msgid "Proportionality constant" +msgstr "" + +msgid "Reset time" +msgstr "" + +msgid "Derivative time constant" +msgstr "" + +msgid "PV - SP" +msgstr "" + +msgid "FB for integral term" +msgstr "" + +msgid "FB for derivative term" +msgstr "" + +msgid "The PID (proportional, Integral, Derivative) function block provides the classical three term controller for closed loop control." +msgstr "" + +msgid "0 - track X0, 1 - ramp to/track X1" +msgstr "" + +msgid "Ramp duration" +msgstr "" + +msgid "BUSY = 1 during ramping period" +msgstr "" + +msgid "Elapsed time of ramp" +msgstr "" + +msgid "The RAMP function block is modelled on example given in the standard." +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 "" + +msgid "The SR bistable is a latch where the Set dominates." +msgstr "" + +msgid "The RS bistable is a latch where the Reset dominates." +msgstr "" + +msgid "The semaphore provides a mechanism to allow software elements mutually exclusive access to certain ressources." +msgstr "" + +msgid "The output produces a single pulse when a rising edge is detected." +msgstr "" + +msgid "The output produces a single pulse when a falling edge is detected." +msgstr "" + +msgid "The up-counter can be used to signal when a count has reached a maximum value." +msgstr "" + +msgid "The down-counter can be used to signal when a count has reached zero, on counting down from a preset 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 "" + +msgid "first input parameter" +msgstr "" + +msgid "second input parameter" +msgstr "" + +msgid "first output parameter" +msgstr "" + +msgid "second output parameter" +msgstr "" + +msgid "internal state: 0-reset, 1-counting, 2-set" +msgstr "" + +msgid "The pulse timer can be used to generate output pulses of a given time duration." +msgstr "" + +msgid "The on-delay timer can be used to delay setting an output true, for fixed period after an input becomes true." +msgstr "" + +msgid "The off-delay timer can be used to delay setting an output false, for fixed period after input goes false." +msgstr "" diff -r a375e31bf312 -r c1298e7ffe3a i18n/mki18n.py --- 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 @@ def getlanguageDict(): languageDict = {} - + + if wx.VERSION >= (3, 0, 0): + app = wx.App() + else: + app = wx.PySimpleApp() + for lang in [x for x in dir(wx) if x.startswith("LANGUAGE")]: i = wx.Locale(wx.LANGUAGE_DEFAULT).GetLanguageInfo(getattr(wx, lang)) if i: @@ -103,7 +108,33 @@ return languageDict -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.close() + messages_file = open(fileout, 'a') + messages_file.write('\n') + messages_file.write('#: %s\n' % prefix) + messages_file.write('\n') + + words_found = {} + for filepath in appfil_file.xreadlines(): + code_file = open(filepath.strip(), 'r') + for match in regexp.finditer(code_file.read()): + word = match.group(1) + 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") + code_file.close() + + messages_file.close() + appfil_file.close() + # ----------------------------------------------------------------------------- # m a k e P O ( ) -- Build the Portable Object file for the application -- @@ -138,10 +169,12 @@ else: applicationName = applicationDomain currentDir = os.getcwd() - os.chdir(applicationDirectoryPath) - if not os.path.exists('app.fil'): - raise IOError(2,'No module file: app.fil') - + os.chdir(applicationDirectoryPath) + filelist = 'app.fil' + if not os.path.exists(filelist): + raise IOError(2,'No module file: ' % filelist) + + fileout = 'messages.pot' # Steps: # 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 if verbose: print cmd os.system(cmd) - appfil_file = open("app.fil", 'r') - messages_file = open("messages.pot", 'r') - messages = messages_file.read() - messages_file.close() - messages_file = open("messages.pot", 'a') - messages_file.write(""" -#: Extra XSD strings -""") - words_found = {} - for filepath in appfil_file.xreadlines(): - code_file = open(filepath.strip(), 'r') - for match in XSD_STRING_MODEL.finditer(code_file.read()): - word = match.group(1) - if not words_found.get(word, False) and messages.find("msgid \"%s\"\nmsgstr \"\"" % word) == -1: - words_found[word] = True - messages_file.write(""" -msgid "%s" -msgstr "" -"""%word) - code_file.close() - messages_file.close() - appfil_file.close() - + 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 @@ else: 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) if verbose: print cmd os.system(cmd) os.chdir(currentDir) diff -r a375e31bf312 -r c1298e7ffe3a images/about_brz_logo.png Binary file images/about_brz_logo.png has changed diff -r a375e31bf312 -r c1298e7ffe3a images/icons.svg --- 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 @@ height="1052.3622" id="svg2" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" + inkscape:version="0.91 r13725" sodipodi:docname="icons.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"> <metadata @@ -31,7 +31,7 @@ </rdf:RDF> </metadata> <sodipodi:namedview - inkscape:window-height="1056" + inkscape:window-height="1043" inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="0" @@ -43,11 +43,11 @@ pagecolor="#ffffff" id="base" showgrid="false" - inkscape:zoom="4.0000001" - inkscape:cx="590.44587" - inkscape:cy="681.55725" + inkscape:zoom="1" + inkscape:cx="618.65047" + inkscape:cy="-188.15697" inkscape:window-x="0" - inkscape:window-y="24" + inkscape:window-y="0" inkscape:current-layer="svg2" showguides="true" inkscape:guide-bbox="true" @@ -87959,6 +87959,148 @@ width="1" height="1" /> </clipPath> + <mask + id="mask6467-7"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="use6469-5" + 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" /> + </mask> + <filter + x="-0.021624813" + width="1.0432496" + y="-0.10738391" + height="1.2147678" + id="filter17760-6"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.250707" + id="feGaussianBlur17762-2" /> + </filter> + <mask + id="mask18563"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="rect18565" + 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" /> + </mask> + <linearGradient + x1="361.4903" + y1="-285.12421" + x2="454.45035" + y2="-474.94891" + id="linearGradient18567" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + <filter + id="filter6447-9"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur6449-1" /> + </filter> + <mask + id="mask18577"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="rect18579" + 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" /> + </mask> + <linearGradient + x1="361.4903" + y1="-285.12421" + x2="454.45035" + y2="-474.94891" + id="linearGradient18581" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + <filter + id="filter18589"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur18591" /> + </filter> + <mask + id="mask6467-7-2"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="use6469-5-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" /> + </mask> + <filter + x="-0.021624813" + width="1.0432496" + y="-0.10738391" + height="1.2147678" + id="filter17760-6-7"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.250707" + id="feGaussianBlur17762-2-3" /> + </filter> + <mask + id="mask23060"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="rect23062" + 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" /> + </mask> + <linearGradient + x1="361.4903" + y1="-285.12421" + x2="454.45035" + y2="-474.94891" + id="linearGradient23064" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + <filter + id="filter6447-9-6"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur6449-1-1" /> + </filter> + <mask + id="mask23074"> + <rect + width="462.6499" + height="418.20319" + x="145.46196" + y="-576.94458" + id="rect23076" + 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" /> + </mask> + <linearGradient + x1="361.4903" + y1="-285.12421" + x2="454.45035" + y2="-474.94891" + id="linearGradient23078" + xlink:href="#linearGradient59108" + gradientUnits="userSpaceOnUse" /> + <filter + id="filter23086"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="10.172821" + id="feGaussianBlur23088" /> + </filter> </defs> <g id="g19063" @@ -88093,7 +88235,7 @@ sodipodi:cy="1.7575644" sodipodi:rx="12.374369" sodipodi:ry="12.374369" - 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)" /> <path sodipodi:type="arc" @@ -88103,7 +88245,7 @@ sodipodi:cy="1.7575644" sodipodi:rx="12.374369" sodipodi:ry="12.374369" - 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)" /> </g> <g @@ -88112,7 +88254,7 @@ transform="matrix(0.2172196,0,0,0.2172196,-856.56407,380.74931)"> <path 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" sodipodi:ry="12.374369" sodipodi:rx="12.374369" sodipodi:cy="1.7575644" @@ -88122,7 +88264,7 @@ sodipodi:type="arc" /> <path 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" sodipodi:ry="12.374369" sodipodi:rx="12.374369" sodipodi:cy="1.7575644" @@ -88834,8 +88976,7 @@ r="34.144001" transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)" id="circle29" - 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" /> <path 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" id="text1332" @@ -88888,8 +89029,7 @@ r="34.144001" transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)" id="circle99164" - 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" /> <path 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" id="path99166" @@ -88919,7 +89059,7 @@ <path sodipodi:type="inkscape:offset" inkscape:radius="1" - 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 " xlink:href="#path18378" 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" id="path18380" @@ -89795,8 +89935,7 @@ transform="matrix(1,0,0,-1,1028.5714,378.07647)" r="226" cy="0" - cx="0" - 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" /> + cx="0" /> <circle sodipodi:ry="169.5" sodipodi:rx="169.5" @@ -89807,8 +89946,7 @@ transform="matrix(1,0,0,-1,1028.5714,378.07647)" r="169.5" cy="0" - cx="0" - 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" /> + cx="0" /> <circle sodipodi:ry="106.5" sodipodi:rx="106.5" @@ -89819,8 +89957,7 @@ transform="matrix(1.0610323,0,0,-1.0610323,1028.5714,378.07647)" r="106.5" cy="0" - cx="0" - 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" /> + cx="0" /> <circle sodipodi:ry="106.5" sodipodi:rx="106.5" @@ -89831,8 +89968,7 @@ transform="matrix(0.5305159,0,0,-0.5305159,1028.5714,378.07647)" r="106.5" cy="0" - cx="0" - 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" /> + cx="0" /> <circle sodipodi:ry="106.5" sodipodi:rx="106.5" @@ -89843,8 +89979,7 @@ transform="matrix(0.1768394,0,0,-0.1768394,1028.5714,378.07647)" r="106.5" cy="0" - cx="0" - 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" /> + cx="0" /> </g> <text 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)" sodipodi:end="3.1415927" sodipodi:start="0" - 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" sodipodi:ry="76.785713" sodipodi:rx="76.785713" sodipodi:cy="218.57143" @@ -90421,7 +90556,7 @@ sodipodi:cy="199.42668" sodipodi:rx="4.9244938" sodipodi:ry="4.8613591" - 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)" /> </g> <text @@ -92676,8 +92811,7 @@ r="34.144001" transform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)" id="circle29-8" - 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" /> <path 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" id="text1332-4" @@ -93482,7 +93616,7 @@ <path sodipodi:type="inkscape:offset" inkscape:radius="1" - 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 " xlink:href="#path18406" 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" id="path18446" @@ -93643,4 +93777,97 @@ id="path19324" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc" /> + <text + style="font-style:normal;font-weight:normal;font-size:51.04000092px;font-family:'Bitstream Vera Sans';fill:#000000;fill-opacity:1;stroke:none" + xml:space="preserve" + id="text18989-5" + y="1168.443" + x="94.936478"><tspan + id="tspan18991-9" + y="1168.443" + x="94.936478" + style="font-size:51.04000092px">%% about_brz_logo %%</tspan></text> + <g + transform="matrix(0.2224431,0,0,0.2224431,608.34301,805.59922)" + id="about_brz_logo" + inkscape:label="#g17803-0"> + <g + transform="translate(-1840,2339.9999)" + mask="url(#mask6467-7-2)" + id="use16743-9" /> + <g + transform="translate(0,89.910633)" + id="g7269-3"> + <path + 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" + id="path17845-6" + 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" /> + <path + 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" + id="use16735-0" + 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" /> + <path + 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" + id="use16737-6" + 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" /> + <path + 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)" + id="path16739-2" + 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" /> + <path + 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" + id="path16741-6" + 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" /> + <g + transform="matrix(-1,0,0,-1,-1127.9999,1532)" + mask="url(#mask6467-7-2)" + id="use16745-1"> + <path + 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" + id="use6863-8" + 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" /> + <path + 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" + id="use6865-7" + 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" /> + </g> + <g + transform="translate(-1839.8676,2340.0508)" + mask="url(#mask6467-7-2)" + id="g7285-9"> + <path + 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" + id="path7287-2" + 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" /> + <path + 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" + id="path7289-0" + 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" /> + </g> + <path + 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" + id="text16729-2" + 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" /> + <text + x="-1259.6362" + y="2147.7705" + id="text3172-3" + xml:space="preserve" + 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 + x="-1259.6362" + y="2147.7705" + id="tspan3174-7">Free Software for Automation </tspan></text> + </g> + </g> </svg> diff -r a375e31bf312 -r c1298e7ffe3a locale/ru_RU/LC_MESSAGES/Beremiz.mo Binary file locale/ru_RU/LC_MESSAGES/Beremiz.mo has changed diff -r a375e31bf312 -r c1298e7ffe3a plcopen/.cvsignore --- 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 @@ -*.pyc diff -r a375e31bf312 -r c1298e7ffe3a plcopen/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. # Package initialisation diff -r a375e31bf312 -r c1298e7ffe3a plcopen/definitions.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 ? -StdBlockComments = { - "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] - def GetBlockInfos(pou): infos = pou.getblockInfos() - # FIXME : as well - infos["comment"] = StdBlockComments[infos["name"]] infos["inputs"] = [ (var_name, var_type, "rising") if var_name in ["CU", "CD"] diff -r a375e31bf312 -r c1298e7ffe3a plcopen/plcopen.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 xmlclass import * from types import * @@ -111,10 +111,15 @@ lines = text.split("\n") 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"]: - text = text.upper() test_result = [] result = criteria["pattern"].search(text) while result is not None: @@ -124,6 +129,9 @@ result = criteria["pattern"].search(text, result.end()) return test_result +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 @@ if cls: def updateElementName(self, old_name, new_name): text = self.getanyText() - index = text.find(old_name) - while index != -1: - 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)) - else: - 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) self.setanyText(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()) - while index != -1: - 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)] != "(")): - return True - index = text.find(block_type.upper(), index + len(block_type)) - return False + 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) + raise ValueError, msg configuration = self.getconfiguration(config_name) if configuration is not None: new_resource = PLCOpenParser.CreateElement("resource", "configuration") @@ -509,7 +506,8 @@ configuration.remove(resource) found = True if not found: - 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) + raise ValueError, msg 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): var.setaddress(new_name) - if var.getname() == old_name: + if TextMatched(var.getname(), old_name): var.setname(new_name) def _updateConfigurationResourceElementAddress(self, address_model, new_leading): @@ -769,9 +767,9 @@ cls = PLCOpenParser.GetElementClass("task", "resource") if cls: def updateElementName(self, old_name, new_name): - if self.single == old_name: + if TextMatched(self.single, old_name): self.single = new_name - if self.interval == old_name: + if TextMatched(self.interval, old_name): self.interval = new_name for instance in self.getpouInstance(): instance.updateElementName(old_name, new_name) @@ -794,7 +792,7 @@ cls = PLCOpenParser.GetElementClass("pouInstance") if cls: def updateElementName(self, old_name, new_name): - if self.typeName == old_name: + if TextMatched(self.typeName, old_name): self.typeName = new_name setattr(cls, "updateElementName", updateElementName) @@ -856,7 +854,7 @@ def getdataTypeElement(self, name): elements = self.dataTypes.getdataType() for element in elements: - if element.getname() == name: + if TextMatched(element.getname(), name): return element return None setattr(cls, "getdataTypeElement", getdataTypeElement) @@ -875,7 +873,7 @@ def removedataTypeElement(self, name): found = False for element in self.dataTypes.getdataType(): - if element.getname() == name: + if TextMatched(element.getname(), name): self.dataTypes.remove(element) found = True break @@ -890,14 +888,14 @@ def getpouElement(self, name): elements = self.pous.getpou() for element in elements: - if element.getname() == name: + if TextMatched(element.getname(), name): return element return None 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): found = False for element in self.pous.getpou(): - if element.getname() == name: + if TextMatched(element.getname(), name): self.pous.remove(element) found = True break @@ -981,7 +979,7 @@ cls = PLCOpenParser.GetElementClass("derived", "dataType") if cls: def updateElementName(self, old_name, new_name): - if self.name == old_name: + if TextMatched(self.name, old_name): self.name = new_name setattr(cls, "updateElementName", updateElementName) @@ -1226,9 +1224,9 @@ for varlist in content: variables = varlist.getvariable() for var in variables: - 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): var.setname(new_name) vartype_content.setname(new_type) return @@ -1239,21 +1237,28 @@ content = self.interface.getcontent() for varlist in content: 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): varlist.remove(var) if len(varlist.getvariable()) == 0: self.interface.remove(varlist) break 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): + return True + return False + 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))): return True if self.transitions: for transition in self.transitions.gettransition(): @@ -1279,15 +1284,13 @@ transition.setname(name) transition.setbodyType(body_type) if body_type == "ST": - 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): return transition return None setattr(cls, "gettransition", gettransition) @@ -1302,7 +1305,7 @@ if self.transitions is not None: removed = False 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): return action return None setattr(cls, "getaction", getaction) @@ -1343,7 +1346,7 @@ if self.actions is not None: removed = False 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): var.setaddress(new_name) - if var.getname() == old_name: + if TextMatched(var.getname(), old_name): var.setname(new_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): content.remove(variable) setattr(cls, "removeVariableByAddress", removeVariableByAddress) @@ -1414,7 +1417,8 @@ search_result = [] filter = criteria["filter"] if filter == "all" or self.getpouType() in filter: - parent_infos = parent_infos + ["P::%s" % self.getname()] + if parent_infos == []: + parent_infos = parent_infos + ["P::%s" % self.getname()] search_result.extend(_Search([("name", self.getname())], criteria, parent_infos)) if self.interface is not None: var_number = 0 @@ -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))): return True elif block_type is not None: return self.body.hasblock(block_type) @@ -1559,7 +1562,7 @@ cls = PLCOpenParser.GetElementClass("body") if cls: 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() else: 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): self.typeName = new_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): self.variable = new_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): self.name = new_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): self.name = new_name setattr(cls, "updateElementName", updateElementName) diff -r a375e31bf312 -r c1298e7ffe3a plcopen/structures.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor -#based on the plcopen standard. -# -#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 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. -# -#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 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. import string, re from plcopen import LoadProject diff -r a375e31bf312 -r c1298e7ffe3a py_ext/PythonEditor.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import keyword import wx.stc as stc diff -r a375e31bf312 -r c1298e7ffe3a py_ext/PythonFileCTNMixin.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os, re from lxml import etree @@ -258,10 +282,10 @@ pycfile.write(PyCFileContent) pycfile.close() - 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)], "", True, ("runtime_%s.py"%location_str, file(runtimefile_path,"rb"))) diff -r a375e31bf312 -r c1298e7ffe3a py_ext/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 py_ext import * from PythonEditor import PythonEditor from PythonFileCTNMixin import PythonFileCTNMixin diff -r a375e31bf312 -r c1298e7ffe3a py_ext/py_ext.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os from POULibrary import POULibrary from PythonFileCTNMixin import PythonFileCTNMixin diff -r a375e31bf312 -r c1298e7ffe3a runtime/NevowServer.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os from nevow import rend, appserver, inevow, tags, loaders, athena from nevow.page import renderer @@ -154,7 +178,7 @@ listening = False reactor.listenTCP(port, site) - print "Http interface port :",port + print _("HTTP interface port :"), port return website class statuslistener: diff -r a375e31bf312 -r c1298e7ffe3a runtime/PLCObject.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import Pyro.core as pyro from threading import Timer, Thread, Lock, Semaphore, Event @@ -79,7 +79,8 @@ self.CurrentPLCFilename=open( self._GetMD5FileName(), "r").read().strip() + lib_ext - self.LoadPLC() + if self.LoadPLC(): + self.PLCStatus = "Stopped" except Exception, e: self.PLCStatus = "Empty" self.CurrentPLCFilename=None diff -r a375e31bf312 -r c1298e7ffe3a runtime/ServicePublisher.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import socket, threading from util import Zeroconf diff -r a375e31bf312 -r c1298e7ffe3a runtime/WampClient.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# 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. + import sys #from twisted.python import log from autobahn.twisted import wamp diff -r a375e31bf312 -r c1298e7ffe3a runtime/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 import os diff -r a375e31bf312 -r c1298e7ffe3a svgui/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 svgui import * diff -r a375e31bf312 -r c1298e7ffe3a svgui/svgui.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import wx import os, sys, shutil diff -r a375e31bf312 -r c1298e7ffe3a svgui/svgui_server.py --- 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 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- +# 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. + import os from nevow import rend, appserver, inevow, tags, loaders, athena diff -r a375e31bf312 -r c1298e7ffe3a svgui/svguilib.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. class button: diff -r a375e31bf312 -r c1298e7ffe3a targets/Generic/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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): diff -r a375e31bf312 -r c1298e7ffe3a targets/Linux/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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): diff -r a375e31bf312 -r c1298e7ffe3a targets/Win32/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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): diff -r a375e31bf312 -r c1298e7ffe3a targets/Win32/plc_Win32_main.c --- 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 @@ if (debug_sem == NULL) { printf("startPLC CreateSemaphore debug_sem error: %d\n", GetLastError()); - return; + return 1; } debug_wait_sem = CreateSemaphore( @@ -96,7 +96,7 @@ if (debug_wait_sem == NULL) { printf("startPLC CreateSemaphore debug_wait_sem error: %d\n", GetLastError()); - return; + return 1; } python_sem = CreateSemaphore( @@ -108,7 +108,7 @@ if (python_sem == NULL) { printf("startPLC CreateSemaphore python_sem error: %d\n", GetLastError()); - return; + return 1; } 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()); - return; + return 1; } diff -r a375e31bf312 -r c1298e7ffe3a targets/XSD_toolchain_gcc --- 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=""/> diff -r a375e31bf312 -r c1298e7ffe3a targets/Xenomai/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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): diff -r a375e31bf312 -r c1298e7ffe3a targets/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +# 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. # Package initialisation #import targets diff -r a375e31bf312 -r c1298e7ffe3a targets/plc_debug.c --- 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; diff -r a375e31bf312 -r c1298e7ffe3a targets/plc_main_tail.c --- 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); }else{ @@ -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); }else{ diff -r a375e31bf312 -r c1298e7ffe3a targets/toolchain_gcc.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os, re, operator from util.ProcessLogger import ProcessLogger import hashlib diff -r a375e31bf312 -r c1298e7ffe3a targets/toolchain_makefile.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import os, re, operator from util.ProcessLogger import ProcessLogger import hashlib @@ -6,15 +30,6 @@ includes_re = re.compile('\s*#include\s*["<]([^">]*)[">].*') - -if os.name == 'nt': - # 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 - # to here. - os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] - class toolchain_makefile(): def __init__(self, CTRInstance): self.CTRInstance = CTRInstance @@ -80,11 +95,7 @@ oldmd5 = self.md5key self.md5key = hashlib.md5(wholesrcdata).hexdigest() - props = self.CTRInstance.GetProjectProperties() - self.md5key += '#'.join([props[key] for key in ['companyName', - 'projectName', - 'productName']]) - self.md5key += '#' #+','.join(map(str,time.localtime())) + # Store new PLC filename based on md5 key f = open(self._GetMD5FileName(), "w") f.write(self.md5key) @@ -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, diff -r a375e31bf312 -r c1298e7ffe3a targets/typemapping.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +# 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. import ctypes ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,) diff -r a375e31bf312 -r c1298e7ffe3a tests/first_steps/beremiz.xml --- /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://"> + <TargetType> + <Linux/> + </TargetType> +</BeremizRoot> diff -r a375e31bf312 -r c1298e7ffe3a tests/first_steps/plc.xml --- /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"> + <coordinateInfo> + <fbd> + <scaling x="0" y="0"/> + </fbd> + <ld> + <scaling x="0" y="0"/> + </ld> + <sfc> + <scaling x="0" y="0"/> + </sfc> + </coordinateInfo> + </contentHeader> + <types> + <dataTypes/> + <pous> + <pou name="plc_prg" pouType="program"> + <interface> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <outputVars> + <variable name="Cnt1"> + <type> + <INT/> + </type> + </variable> + <variable name="Cnt2"> + <type> + <INT/> + </type> + </variable> + <variable name="Cnt3"> + <type> + <INT/> + </type> + </variable> + <variable name="Cnt4"> + <type> + <INT/> + </type> + </variable> + <variable name="Cnt5"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <localVars> + <variable name="CounterST0"> + <type> + <derived name="CounterST"/> + </type> + </variable> + <variable name="CounterFBD0"> + <type> + <derived name="CounterFBD"/> + </type> + </variable> + <variable name="CounterSFC0"> + <type> + <derived name="CounterSFC"/> + </type> + </variable> + <variable name="CounterIL0"> + <type> + <derived name="CounterIL"/> + </type> + </variable> + <variable name="CounterLD0"> + <type> + <derived name="CounterLD"/> + </type> + </variable> + </localVars> + </interface> + <body> + <FBD> + <block localId="1" typeName="CounterST" instanceName="CounterST0" executionOrderId="0" height="60" width="125"> + <position x="207" y="53"/> + <inputVariables> + <variable formalParameter="Reset"> + <connectionPointIn> + <relPosition x="0" y="40"/> + <connection refLocalId="2"> + <position x="207" y="93"/> + <position x="114" y="93"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="125" y="40"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="2" executionOrderId="0" height="24" width="79" negated="false"> + <position x="35" y="81"/> + <connectionPointOut> + <relPosition x="79" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + <outVariable localId="3" executionOrderId="0" height="24" width="106" negated="false"> + <position x="424" y="81"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="1" formalParameter="OUT"> + <position x="424" y="93"/> + <position x="332" y="93"/> + </connection> + </connectionPointIn> + <expression>Cnt1</expression> + </outVariable> + <block localId="4" typeName="CounterFBD" instanceName="CounterFBD0" executionOrderId="0" height="54" width="121"> + <position x="211" y="145"/> + <inputVariables> + <variable formalParameter="Reset"> + <connectionPointIn> + <relPosition x="0" y="37"/> + <connection refLocalId="13"> + <position x="211" y="182"/> + <position x="115" y="182"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="121" y="37"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <outVariable localId="5" executionOrderId="0" height="24" width="103" negated="false"> + <position x="426" y="170"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="426" y="182"/> + <position x="332" y="182"/> + </connection> + </connectionPointIn> + <expression>Cnt2</expression> + </outVariable> + <comment localId="6" height="264" width="417"> + <position x="569" y="55"/> + <content> + <xhtml:p><![CDATA[In this example function block with the same functionality +is created using all five IEC 61131-3 programing languages: +- IL; +- FBD; +- LD; +- ST; +- SFC. + + + + +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. +]]></xhtml:p> + </content> + </comment> + <block localId="7" typeName="CounterSFC" instanceName="CounterSFC0" executionOrderId="0" height="52" width="121"> + <position x="211" y="237"/> + <inputVariables> + <variable formalParameter="Reset"> + <connectionPointIn> + <relPosition x="0" y="36"/> + <connection refLocalId="12"> + <position x="211" y="273"/> + <position x="103" y="273"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="121" y="36"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <outVariable localId="8" executionOrderId="0" height="24" width="97" negated="false"> + <position x="431" y="261"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="431" y="273"/> + <position x="332" y="273"/> + </connection> + </connectionPointIn> + <expression>Cnt3</expression> + </outVariable> + <block localId="9" typeName="CounterIL" instanceName="CounterIL0" executionOrderId="0" height="62" width="121"> + <position x="211" y="322"/> + <inputVariables> + <variable formalParameter="Reset"> + <connectionPointIn> + <relPosition x="0" y="41"/> + <connection refLocalId="10"> + <position x="211" y="363"/> + <position x="101" y="363"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="121" y="41"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="10" executionOrderId="0" height="24" width="67" negated="false"> + <position x="34" y="351"/> + <connectionPointOut> + <relPosition x="67" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + <outVariable localId="11" executionOrderId="0" height="24" width="91" negated="false"> + <position x="434" y="351"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="9" formalParameter="OUT"> + <position x="434" y="363"/> + <position x="332" y="363"/> + </connection> + </connectionPointIn> + <expression>Cnt4</expression> + </outVariable> + <inVariable localId="12" executionOrderId="0" height="24" width="67" negated="false"> + <position x="36" y="261"/> + <connectionPointOut> + <relPosition x="67" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + <inVariable localId="13" executionOrderId="0" height="24" width="79" negated="false"> + <position x="36" y="170"/> + <connectionPointOut> + <relPosition x="79" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + <block localId="14" typeName="CounterLD" instanceName="CounterLD0" executionOrderId="0" height="62" width="124"> + <position x="210" y="411"/> + <inputVariables> + <variable formalParameter="Reset"> + <connectionPointIn> + <relPosition x="0" y="41"/> + <connection refLocalId="16"> + <position x="210" y="452"/> + <position x="100" y="452"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="Out"> + <connectionPointOut> + <relPosition x="124" y="41"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <outVariable localId="15" executionOrderId="0" height="24" width="88" negated="false"> + <position x="437" y="440"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="14" formalParameter="Out"> + <position x="437" y="452"/> + <position x="334" y="452"/> + </connection> + </connectionPointIn> + <expression>Cnt5</expression> + </outVariable> + <inVariable localId="16" executionOrderId="0" height="24" width="64" negated="false"> + <position x="36" y="440"/> + <connectionPointOut> + <relPosition x="64" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + </FBD> + </body> + </pou> + <pou name="CounterST" pouType="functionBlock"> + <interface> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <localVars> + <variable name="Cnt"> + <type> + <INT/> + </type> + </variable> + </localVars> + <outputVars> + <variable name="OUT"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + </variable> + </externalVars> + </interface> + <body> + <ST> + <xhtml:p><![CDATA[IF Reset THEN + Cnt := ResetCounterValue; +ELSE + Cnt := Cnt + 1; +END_IF; + +Out := Cnt;]]></xhtml:p> + </ST> + </body> + </pou> + <pou name="CounterFBD" pouType="functionBlock"> + <interface> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <outputVars> + <variable name="OUT"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <localVars> + <variable name="Cnt"> + <type> + <INT/> + </type> + </variable> + </localVars> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + </variable> + </externalVars> + </interface> + <body> + <FBD> + <inVariable localId="1" executionOrderId="0" height="24" width="61" negated="false"> + <position x="321" y="58"/> + <connectionPointOut> + <relPosition x="61" y="12"/> + </connectionPointOut> + <expression>Reset</expression> + </inVariable> + <outVariable localId="2" executionOrderId="0" height="24" width="34" negated="false"> + <position x="675" y="137"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="3"> + <position x="675" y="149"/> + <position x="586" y="149"/> + </connection> + </connectionPointIn> + <expression>OUT</expression> + </outVariable> + <inOutVariable localId="3" executionOrderId="0" height="24" width="29" negatedOut="false" negatedIn="false"> + <position x="557" y="137"/> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="29" y="12"/> + </connectionPointOut> + <expression>Cnt</expression> + </inOutVariable> + <block localId="4" typeName="ADD" executionOrderId="0" height="80" width="57"> + <position x="328" y="115"/> + <inputVariables> + <variable formalParameter="IN1"> + <connectionPointIn> + <relPosition x="0" y="35"/> + <connection refLocalId="6"> + <position x="328" y="150"/> + <position x="275" y="150"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN2"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="57" y="35"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="5" executionOrderId="0" height="24" width="158" negated="false"> + <position x="222" y="256"/> + <connectionPointOut> + <relPosition x="158" y="12"/> + </connectionPointOut> + <expression>ResetCounterValue</expression> + </inVariable> + <inVariable localId="6" executionOrderId="0" height="24" width="21" negated="false"> + <position x="254" y="138"/> + <connectionPointOut> + <relPosition x="21" y="12"/> + </connectionPointOut> + <expression>1</expression> + </inVariable> + <block localId="7" typeName="SEL" executionOrderId="0" height="80" width="57"> + <position x="448" y="100"/> + <inputVariables> + <variable formalParameter="G"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN0"> + <connectionPointIn> + <relPosition x="0" y="50"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="448" y="150"/> + <position x="385" y="150"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN1"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="57" y="30"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + </FBD> + </body> + </pou> + <pou name="CounterSFC" pouType="functionBlock"> + <interface> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <outputVars> + <variable name="OUT"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <localVars> + <variable name="Cnt"> + <type> + <INT/> + </type> + </variable> + </localVars> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + </variable> + </externalVars> + </interface> + <actions/> + <body> + <SFC> + <step localId="1" name="Start" initialStep="true" height="28" width="90"> + <position x="241" y="14"/> + <connectionPointOut formalParameter=""> + <relPosition x="45" y="28"/> + </connectionPointOut> + </step> + <selectionDivergence localId="2" height="1" width="431"> + <position x="70" y="86"/> + <connectionPointIn> + <relPosition x="216" y="0"/> + <connection refLocalId="1"> + <position x="286" y="86"/> + <position x="286" y="42"/> + </connection> + </connectionPointIn> + <connectionPointOut formalParameter=""> + <relPosition x="0" y="1"/> + </connectionPointOut> + <connectionPointOut formalParameter=""> + <relPosition x="431" y="1"/> + </connectionPointOut> + </selectionDivergence> + <transition localId="3" height="2" width="20"> + <position x="491" y="132"/> + <connectionPointIn> + <relPosition x="10" y="0"/> + <connection refLocalId="2"> + <position x="501" y="132"/> + <position x="501" y="87"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="10" y="2"/> + </connectionPointOut> + <condition> + <inline name=""> + <ST> + <xhtml:p><![CDATA[Reset]]></xhtml:p> + </ST> + </inline> + </condition> + </transition> + <transition localId="4" height="2" width="20" executionOrderId="0"> + <position x="60" y="135"/> + <connectionPointIn> + <relPosition x="10" y="0"/> + <connection refLocalId="2"> + <position x="70" y="135"/> + <position x="70" y="87"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="10" y="2"/> + </connectionPointOut> + <condition> + <inline name=""> + <ST> + <xhtml:p><![CDATA[NOT Reset]]></xhtml:p> + </ST> + </inline> + </condition> + </transition> + <step localId="5" name="ResetCounter" initialStep="false" height="24" width="104"> + <position x="449" y="190"/> + <connectionPointIn> + <relPosition x="52" y="0"/> + <connection refLocalId="3"> + <position x="501" y="190"/> + <position x="501" y="134"/> + </connection> + </connectionPointIn> + <connectionPointOut formalParameter=""> + <relPosition x="52" y="24"/> + </connectionPointOut> + <connectionPointOutAction formalParameter=""> + <relPosition x="104" y="12"/> + </connectionPointOutAction> + </step> + <actionBlock localId="6" height="63" width="222"> + <position x="600" y="187"/> + <connectionPointIn> + <relPosition x="0" y="15"/> + <connection refLocalId="5"> + <position x="600" y="202"/> + <position x="553" y="202"/> + </connection> + </connectionPointIn> + <action localId="0"> + <relPosition x="0" y="0"/> + <inline> + <ST> + <xhtml:p><![CDATA[Cnt := ResetCounterValue;]]></xhtml:p> + </ST> + </inline> + </action> + <action localId="0"> + <relPosition x="0" y="0"/> + <inline> + <ST> + <xhtml:p><![CDATA[OUT := Cnt;]]></xhtml:p> + </ST> + </inline> + </action> + </actionBlock> + <step localId="7" name="Count" initialStep="false" height="24" width="85" executionOrderId="0"> + <position x="28" y="191"/> + <connectionPointIn> + <relPosition x="42" y="0"/> + <connection refLocalId="4"> + <position x="70" y="191"/> + <position x="70" y="137"/> + </connection> + </connectionPointIn> + <connectionPointOut formalParameter=""> + <relPosition x="42" y="24"/> + </connectionPointOut> + <connectionPointOutAction formalParameter=""> + <relPosition x="85" y="12"/> + </connectionPointOutAction> + </step> + <actionBlock localId="8" height="52" width="148" executionOrderId="0"> + <position x="135" y="188"/> + <connectionPointIn> + <relPosition x="0" y="15"/> + <connection refLocalId="7"> + <position x="135" y="203"/> + <position x="113" y="203"/> + </connection> + </connectionPointIn> + <action localId="0"> + <relPosition x="0" y="0"/> + <inline> + <ST> + <xhtml:p><![CDATA[Cnt := Cnt + 1;]]></xhtml:p> + </ST> + </inline> + </action> + <action localId="0"> + <relPosition x="0" y="0"/> + <inline> + <ST> + <xhtml:p><![CDATA[OUT := Cnt;]]></xhtml:p> + </ST> + </inline> + </action> + </actionBlock> + <selectionConvergence localId="10" height="1" width="431"> + <position x="70" y="273"/> + <connectionPointIn> + <relPosition x="0" y="0"/> + <connection refLocalId="13"> + <position x="70" y="273"/> + <position x="70" y="244"/> + </connection> + </connectionPointIn> + <connectionPointIn> + <relPosition x="431" y="0"/> + <connection refLocalId="14"> + <position x="501" y="273"/> + <position x="501" y="250"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="216" y="1"/> + </connectionPointOut> + </selectionConvergence> + <jumpStep localId="12" targetName="Start" height="13" width="12"> + <position x="280" y="317"/> + <connectionPointIn> + <relPosition x="6" y="0"/> + <connection refLocalId="10"> + <position x="286" y="317"/> + <position x="286" y="274"/> + </connection> + </connectionPointIn> + </jumpStep> + <transition localId="13" height="2" width="20" executionOrderId="0"> + <position x="60" y="242"/> + <connectionPointIn> + <relPosition x="10" y="0"/> + <connection refLocalId="7"> + <position x="70" y="242"/> + <position x="70" y="215"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="10" y="2"/> + </connectionPointOut> + <condition> + <inline name=""> + <ST> + <xhtml:p><![CDATA[Reset]]></xhtml:p> + </ST> + </inline> + </condition> + </transition> + <transition localId="14" height="2" width="20" executionOrderId="0"> + <position x="491" y="248"/> + <connectionPointIn> + <relPosition x="10" y="0"/> + <connection refLocalId="5"> + <position x="501" y="248"/> + <position x="501" y="214"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="10" y="2"/> + </connectionPointOut> + <condition> + <inline name=""> + <ST> + <xhtml:p><![CDATA[NOT Reset]]></xhtml:p> + </ST> + </inline> + </condition> + </transition> + </SFC> + </body> + </pou> + <pou name="CounterIL" pouType="functionBlock"> + <interface> + <localVars> + <variable name="Cnt"> + <type> + <INT/> + </type> + </variable> + </localVars> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <outputVars> + <variable name="OUT"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + </variable> + </externalVars> + </interface> + <body> + <IL> + <xhtml:p><![CDATA[LD Reset +JMPC ResetCnt + +(* increment counter *) +LD Cnt +ADD 1 +JMP QuitFb + +ResetCnt: +(* reset counter *) +LD ResetCounterValue + +QuitFb: +(* save results *) +ST Cnt +ST Out +]]></xhtml:p> + </IL> + </body> + </pou> + <pou name="CounterLD" pouType="functionBlock"> + <interface> + <inputVars> + <variable name="Reset"> + <type> + <BOOL/> + </type> + </variable> + </inputVars> + <outputVars> + <variable name="Out"> + <type> + <INT/> + </type> + </variable> + </outputVars> + <localVars> + <variable name="Cnt"> + <type> + <INT/> + </type> + </variable> + </localVars> + <externalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + </variable> + </externalVars> + </interface> + <body> + <LD> + <outVariable localId="2" executionOrderId="0" height="24" width="34" negated="false"> + <position x="527" y="90"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="3"> + <position x="527" y="102"/> + <position x="438" y="102"/> + </connection> + </connectionPointIn> + <expression>Out</expression> + </outVariable> + <inOutVariable localId="3" executionOrderId="0" height="24" width="29" negatedOut="false" negatedIn="false"> + <position x="409" y="90"/> + <connectionPointIn> + <relPosition x="0" y="12"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="409" y="102"/> + <position x="357" y="102"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="29" y="12"/> + </connectionPointOut> + <expression>Cnt</expression> + </inOutVariable> + <block localId="4" typeName="ADD" executionOrderId="0" height="80" width="57"> + <position x="180" y="87"/> + <inputVariables> + <variable formalParameter="IN1"> + <connectionPointIn> + <relPosition x="0" y="35"/> + <connection refLocalId="6"> + <position x="180" y="122"/> + <position x="127" y="122"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN2"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="57" y="35"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="5" executionOrderId="0" height="24" width="158" negated="false"> + <position x="74" y="228"/> + <connectionPointOut> + <relPosition x="158" y="12"/> + </connectionPointOut> + <expression>ResetCounterValue</expression> + </inVariable> + <inVariable localId="6" executionOrderId="0" height="24" width="21" negated="false"> + <position x="106" y="110"/> + <connectionPointOut> + <relPosition x="21" y="12"/> + </connectionPointOut> + <expression>1</expression> + </inVariable> + <block localId="7" typeName="SEL" executionOrderId="0" height="80" width="57"> + <position x="300" y="72"/> + <inputVariables> + <variable formalParameter="G"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN0"> + <connectionPointIn> + <relPosition x="0" y="50"/> + <connection refLocalId="4" formalParameter="OUT"> + <position x="300" y="122"/> + <position x="237" y="122"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN1"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="57" y="30"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <leftPowerRail localId="8" height="40" width="3"> + <position x="46" y="42"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + </connectionPointOut> + </leftPowerRail> + <contact localId="9" height="15" width="21" negated="false"> + <position x="113" y="54"/> + <connectionPointIn> + <relPosition x="0" y="8"/> + <connection refLocalId="8"> + <position x="113" y="62"/> + <position x="49" y="62"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="21" y="8"/> + </connectionPointOut> + <variable>Reset</variable> + </contact> + </LD> + </body> + </pou> + </pous> + </types> + <instances> + <configurations> + <configuration name="config"> + <resource name="resource1"> + <task name="plc_task" priority="1" interval="T#100ms"> + <pouInstance name="plc_task_instance" typeName="plc_prg"/> + </task> + </resource> + <globalVars constant="true"> + <variable name="ResetCounterValue"> + <type> + <INT/> + </type> + <initialValue> + <simpleValue value="17"/> + </initialValue> + </variable> + </globalVars> + </configuration> + </configurations> + </instances> +</project> diff -r a375e31bf312 -r c1298e7ffe3a tests/genericmake/plc.xml --- 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"> <coordinateInfo> <fbd> <scaling x="0" y="0"/> @@ -35,25 +35,44 @@ <body> <FBD> <inVariable localId="1" executionOrderId="0" height="27" width="77" negated="false"> - <position x="196" y="224"/> + <position x="52" y="368"/> <connectionPointOut> <relPosition x="77" y="13"/> </connectionPointOut> <expression>LocalVara</expression> </inVariable> <outVariable localId="2" executionOrderId="0" height="27" width="77" negated="false"> - <position x="305" y="227"/> + <position x="167" y="368"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>LocalVarb</expression> </outVariable> + <comment localId="3" height="310" width="760"> + <position x="32" y="23"/> + <content> + <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. + +For example, you can + - 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, + and much much more. +]]></xhtml:p> + </content> + </comment> </FBD> </body> </pou> diff -r a375e31bf312 -r c1298e7ffe3a tests/genericmake/project_files/Makefile --- 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 $^ -> $@" -%o : %c +%.o: %.c @echo "* Would compile $< -> $@" diff -r a375e31bf312 -r c1298e7ffe3a tests/logging/plc.xml --- 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" - productName="Unnamed" - productVersion="1" - 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"> <coordinateInfo> <fbd> <scaling x="0" y="0"/> @@ -47,29 +40,34 @@ <derived name="LOGLEVEL"/> </type> <initialValue> - <simpleValue value="WARNING"/> + <simpleValue value="INFO"/> </initialValue> </variable> + <variable name="Timer"> + <type> + <derived name="TOF"/> + </type> + </variable> </localVars> </interface> <body> <FBD> - <inVariable localId="2" height="27" width="85"> - <position x="732" y="188"/> - <connectionPointOut> - <relPosition x="85" y="13"/> - </connectionPointOut> - <expression>'Moooooo'</expression> + <inVariable localId="2" height="30" width="170" executionOrderId="0" negated="false"> + <position x="507" y="347"/> + <connectionPointOut> + <relPosition x="170" y="15"/> + </connectionPointOut> + <expression>'IEC side logging: beat #'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -83,121 +81,117 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <connectionPointOut> - <relPosition x="41" y="13"/> + <relPosition x="51" y="13"/> </connectionPointOut> <expression>beat</expression> </inOutVariable> - <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"/> <inputVariables> <variable formalParameter="IN1"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="IN2"> <connectionPointIn> - <relPosition x="0" y="65"/> + <relPosition x="0" y="78"/> <connection refLocalId="6"> - <position x="482" y="274"/> - <position x="397" y="274"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="68" y="35"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inOutVariable localId="6" height="27" width="48"> - <position x="349" y="261"/> + <position x="463" y="463"/> + <position x="444" y="463"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="68" y="39"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inOutVariable localId="6" height="27" width="103" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="341" y="450"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <connectionPointOut> - <relPosition x="48" y="13"/> + <relPosition x="103" y="13"/> </connectionPointOut> <expression>count</expression> </inOutVariable> - <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"/> <inputVariables> <variable formalParameter="IN1"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="IN2"> <connectionPointIn> - <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"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="67" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <block localId="9" width="116" height="40" typeName="INT_TO_STRING"> - <position x="596" y="202"/> + <position x="727" y="424"/> + <position x="677" y="424"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="67" y="51"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <block localId="9" width="116" height="40" typeName="INT_TO_STRING" executionOrderId="0"> + <position x="561" y="394"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -211,19 +205,17 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="IN" edge="rising"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -237,39 +229,33 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="TRIG"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="MSG"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="LEVEL"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -277,13 +263,72 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="79" y="13"/> </connectionPointOut> - <expression>WARNING</expression> + <expression>lvl</expression> </inVariable> + <block localId="14" typeName="TOF" instanceName="Timer" executionOrderId="0" height="98" width="45"> + <position x="150" y="260"/> + <inputVariables> + <variable formalParameter="IN"> + <connectionPointIn> + <relPosition x="0" y="39"/> + <connection refLocalId="4"> + <position x="150" y="299"/> + <position x="117" y="299"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="PT"> + <connectionPointIn> + <relPosition x="0" y="78"/> + <connection refLocalId="1"> + <position x="150" y="338"/> + <position x="117" y="338"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="Q"> + <connectionPointOut> + <relPosition x="45" y="39"/> + </connectionPointOut> + </variable> + <variable formalParameter="ET"> + <connectionPointOut> + <relPosition x="45" y="78"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="1" executionOrderId="0" height="24" width="52" negated="false"> + <position x="65" y="326"/> + <connectionPointOut> + <relPosition x="52" y="12"/> + </connectionPointOut> + <expression>T#3s</expression> + </inVariable> + <comment localId="15" height="212" width="675"> + <position x="27" y="16"/> + <content> + <xhtml:p><![CDATA[This example shows logging functionality in Beremiz. +Here are shown two ways of logging: +- from IEC PLC program; +- 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. +]]></xhtml:p> + </content> + </comment> </FBD> </body> </pou> @@ -293,8 +338,8 @@ <configurations> <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"/> </task> </resource> </configuration> diff -r a375e31bf312 -r c1298e7ffe3a tests/logging/py_ext_0@py_ext/py_ext.xml --- 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 = None -Stop = False - -def StartLog(): - global MyT - MyT=threading.Thread(target = DoLog) - MyT.start() - -def DoLog(): - global Stop - while not Stop: - PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus) - time.sleep(0.3) - -def StopLog(): - global MyT,Stop - Stop=True - -_runtime_init.append(StartLog) -_runtime_cleanup.append(StopLog) -]]> -</Python> diff -r a375e31bf312 -r c1298e7ffe3a tests/logging/py_ext_0@py_ext/pyfile.xml --- /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"> + <variables/> + <globals> + <xhtml:p><![CDATA[import threading, time + +MyT = None +Stop = False + +def StartLog(): + global MyT + MyT=threading.Thread(target = DoLog) + MyT.start() + +def DoLog(): + global Stop + while not Stop: + PLCObject.LogMessage("Python side Logging (PLC is %s)"%PLCObject.PLCStatus) + time.sleep(0.3) + +def StopLog(): + global MyT,Stop + Stop=True + +_runtime_init.append(StartLog) +_runtime_cleanup.append(StopLog) +]]></xhtml:p> + </globals> + <init> + <xhtml:p><![CDATA[]]></xhtml:p> + </init> + <cleanup> + <xhtml:p><![CDATA[]]></xhtml:p> + </cleanup> + <start> + <xhtml:p><![CDATA[]]></xhtml:p> + </start> + <stop> + <xhtml:p><![CDATA[]]></xhtml:p> + </stop> +</PyFile> diff -r a375e31bf312 -r c1298e7ffe3a tests/python/plc.xml --- 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"> <coordinateInfo> <pageSize x="1024" y="1024"/> <fbd> @@ -54,6 +54,22 @@ <pou name="main_pytest" pouType="program"> <interface> <localVars> + <variable name="mux1_sel"> + <type> + <INT/> + </type> + <initialValue> + <simpleValue value="3"/> + </initialValue> + </variable> + <variable name="mux2_sel"> + <type> + <INT/> + </type> + <initialValue> + <simpleValue value="3"/> + </initialValue> + </variable> <variable name="pytest_var1"> <type> <string/> @@ -128,17 +144,30 @@ <WORD/> </type> <initialValue> - <simpleValue value="300"/> + <simpleValue value="151"/> </initialValue> </variable> + <variable name="Test_BCD_WRONG"> + <type> + <WORD/> + </type> + <initialValue> + <simpleValue value="154"/> + </initialValue> + </variable> + <variable name="Test_BCD_CONVERTED"> + <type> + <BOOL/> + </type> + </variable> <variable name="Test_BCD_RESULT"> <type> <UINT/> </type> </variable> - <variable name="Test_BCD_ENO"> - <type> - <BOOL/> + <variable name="Test_BCD_WRONG_RESULT"> + <type> + <UINT/> </type> </variable> <variable name="Test_DT"> @@ -208,24 +237,24 @@ </interface> <body> <FBD> - <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"/> <connectionPointOut> <relPosition x="160" y="15"/> </connectionPointOut> <expression>'time.sleep(1)'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="TRIG"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -233,8 +262,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -253,15 +282,15 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -275,17 +304,17 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <connectionPointOut> @@ -293,17 +322,17 @@ </connectionPointOut> <expression>pytest_var2</expression> </inOutVariable> - <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"/> <inputVariables> <variable formalParameter="TRIG"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -311,8 +340,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -331,31 +360,31 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointOut> <relPosition x="290" y="15"/> </connectionPointOut> <expression>'sys.stdout.write("FBID :"+str(FBID)+"\n")'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="290" y="15"/> </connectionPointOut> <expression>'PLCBinary.Simple_C_Call(5678)'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="TRIG"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -363,8 +392,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -383,24 +412,24 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointOut> <relPosition x="290" y="15"/> </connectionPointOut> <expression>'MyPythonFunc(42)'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="TRIG"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -408,8 +437,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -429,20 +458,22 @@ </outputVariables> </block> <comment localId="16" height="90" width="680"> - <position x="50" y="25"/> + <position x="35" y="275"/> <content> - <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> </content> </comment> - <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"/> <inputVariables> <variable formalParameter="K"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -450,10 +481,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -461,10 +492,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -472,10 +503,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -483,8 +514,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -498,33 +529,28 @@ </variable> </outputVariables> </block> - <inVariable localId="18" height="30" width="20"> - <position x="1010" y="510"/> - <connectionPointOut> - <relPosition x="20" y="15"/> - </connectionPointOut> - <expression>3</expression> - </inVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>pytest_var1</expression> </outVariable> - <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"/> <inputVariables> <variable formalParameter="K"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -532,8 +558,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -541,10 +567,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -552,10 +578,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -563,10 +589,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -580,51 +606,51 @@ </variable> </outputVariables> </block> - <inVariable localId="22" height="30" width="20"> - <position x="930" y="180"/> - <connectionPointOut> - <relPosition x="20" y="15"/> - </connectionPointOut> - <expression>3</expression> - </inVariable> - <outVariable localId="23" height="35" width="125"> - <position x="1150" y="180"/> + <inVariable localId="22" height="30" width="65" executionOrderId="0" negated="false"> + <position x="945" y="390"/> + <connectionPointOut> + <relPosition x="65" y="15"/> + </connectionPointOut> + <expression>mux1_sel</expression> + </inVariable> + <outVariable localId="23" height="35" width="125" executionOrderId="0" negated="false"> + <position x="1235" y="400"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>pytest_var3</expression> </outVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>FromC</expression> </outVariable> - <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"/> <connectionPointOut> <relPosition x="30" y="15"/> </connectionPointOut> <expression>23</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -638,139 +664,129 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointOut> <relPosition x="90" y="15"/> </connectionPointOut> <expression>TestInput</expression> </inVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>TestOutput</expression> </outVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>FromInput</expression> </outVariable> - <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"/> <connectionPointOut> <relPosition x="30" y="15"/> </connectionPointOut> <expression>10</expression> </inVariable> - <comment localId="30" height="90" width="405"> - <position x="245" y="825"/> + <comment localId="30" height="75" width="465"> + <position x="50" y="945"/> <content> <xhtml:p><![CDATA[You will be ready to use beremiz with C and Python when you will understand why "FromInput" is equal to 75. -Enjoy. ]]></xhtml:p> +Happy hacking! ]]></xhtml:p> </content> </comment> <comment localId="31" height="60" width="345"> - <position x="295" y="265"/> + <position x="295" y="485"/> <content> <xhtml:p><![CDATA[Sleep here is bad. It blocks other py_eval instances. Whith a wxGlade GUI, GUI freeze for a second.]]></xhtml:p> </content> </comment> <comment localId="6" height="60" width="345"> - <position x="295" y="380"/> + <position x="295" y="600"/> <content> <xhtml:p><![CDATA[Prints FBID to stdout of PLC runtime. FBID is a unique reference to py_eval instance.]]></xhtml:p> </content> </comment> <comment localId="10" height="60" width="345"> - <position x="295" y="500"/> + <position x="295" y="720"/> <content> <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> </content> </comment> <comment localId="32" height="105" width="235"> - <position x="25" y="285"/> + <position x="25" y="505"/> <content> <xhtml:p><![CDATA[Fast clock, at least faster that sleep(1). See what happens when python takes time to answer : PLC continues.]]></xhtml:p> </content> </comment> - <outVariable localId="33" height="30" width="130"> - <position x="1060" y="740"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <outVariable localId="33" height="30" width="130" executionOrderId="0" negated="false"> + <position x="580" y="1564"/> + <connectionPointIn> + <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"/> </connection> </connectionPointIn> <expression>Test_BCD_RESULT</expression> </outVariable> - <inVariable localId="34" height="30" width="75"> - <position x="785" y="740"/> - <connectionPointOut> - <relPosition x="75" y="15"/> + <inVariable localId="34" height="30" width="75" executionOrderId="0" negated="false"> + <position x="60" y="1564"/> + <connectionPointOut> + <relPosition x="75" y="16"/> </connectionPointOut> <expression>Test_BCD</expression> </inVariable> - <block localId="35" width="105" height="60" typeName="BCD_TO_UINT"> - <position x="900" y="705"/> - <inputVariables> - <variable formalParameter="EN"> - <connectionPointIn> - <relPosition x="0" y="30"/> - </connectionPointIn> - </variable> + <block localId="35" width="105" height="60" typeName="BCD_TO_UINT" executionOrderId="0"> + <position x="265" y="1539"/> + <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <relPosition x="0" y="50"/> + <relPosition x="0" y="41"/> <connection refLocalId="34"> - <position x="900" y="755"/> - <position x="860" y="755"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="ENO"> - <connectionPointOut> - <relPosition x="105" y="30"/> - </connectionPointOut> - </variable> + <position x="265" y="1580"/> + <position x="135" y="1580"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="105" y="50"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="36" height="30" width="65"> - <position x="790" y="815"/> - <connectionPointOut> - <relPosition x="65" y="15"/> + <relPosition x="105" y="41"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="36" height="30" width="65" executionOrderId="0" negated="false"> + <position x="60" y="1774"/> + <connectionPointOut> + <relPosition x="65" y="16"/> </connectionPointOut> <expression>Test_DT</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -779,22 +795,22 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="255" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <block localId="38" width="195" height="45" typeName="DATE_AND_TIME_TO_DATE"> - <position x="900" y="875"/> + <relPosition x="255" y="31"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <block localId="38" width="195" height="45" typeName="DATE_AND_TIME_TO_DATE" executionOrderId="0"> + <position x="265" y="1834"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -803,53 +819,53 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="195" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <outVariable localId="40" height="30" width="80"> - <position x="1215" y="890"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <relPosition x="195" y="31"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <outVariable localId="40" height="30" width="80" executionOrderId="0" negated="false"> + <position x="580" y="1849"/> + <connectionPointIn> + <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"/> </connection> </connectionPointIn> <expression>Test_Date</expression> </outVariable> - <outVariable localId="42" height="30" width="90"> - <position x="1100" y="985"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <outVariable localId="42" height="30" width="90" executionOrderId="0" negated="false"> + <position x="465" y="1944"/> + <connectionPointIn> + <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"/> </connection> </connectionPointIn> <expression>Test_String</expression> </outVariable> - <outVariable localId="43" height="30" width="80"> - <position x="1100" y="1055"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <outVariable localId="43" height="30" width="80" executionOrderId="0" negated="false"> + <position x="465" y="2014"/> + <connectionPointIn> + <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"/> </connection> </connectionPointIn> <expression>Test_Bool</expression> </outVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -858,27 +874,27 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="135" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="45" height="30" width="55"> - <position x="795" y="1055"/> - <connectionPointOut> - <relPosition x="55" y="15"/> + <relPosition x="135" y="31"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="45" height="30" width="55" executionOrderId="0" negated="false"> + <position x="60" y="2014"/> + <connectionPointOut> + <relPosition x="55" y="16"/> </connectionPointOut> <expression>'True'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -887,27 +903,27 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="130" y="30"/> + <relPosition x="130" y="31"/> </connectionPointOut> </variable> </outputVariables> </block> <inVariable localId="50" height="30" width="105" executionOrderId="0" negated="false"> - <position x="200" y="1085"/> + <position x="75" y="2275"/> <connectionPointOut> <relPosition x="105" y="15"/> </connectionPointOut> <expression>Global_RS.Q1</expression> </inVariable> <block localId="51" width="70" height="85" typeName="AND" executionOrderId="0"> - <position x="365" y="1065"/> + <position x="240" y="2255"/> <inputVariables> <variable formalParameter="IN1" negated="true"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -915,8 +931,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -930,51 +946,51 @@ </variable> </outputVariables> </block> - <inVariable localId="52" height="30" width="95"> - <position x="210" y="1120"/> - <connectionPointOut> - <relPosition x="95" y="15"/> + <inVariable localId="52" height="30" width="105" executionOrderId="0" negated="false"> + <position x="75" y="2310"/> + <connectionPointOut> + <relPosition x="105" y="15"/> </connectionPointOut> <expression>BOOL#TRUE</expression> </inVariable> <outVariable localId="13" height="30" width="105" executionOrderId="0" negated="false"> - <position x="510" y="1085"/> + <position x="385" y="2275"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>Global_RS.S</expression> </outVariable> <outVariable localId="20" height="30" width="105" executionOrderId="0" negated="false"> - <position x="510" y="1200"/> + <position x="385" y="2390"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>Global_RS.R1</expression> </outVariable> <inVariable localId="24" height="30" width="105" executionOrderId="0" negated="false"> - <position x="200" y="1200"/> + <position x="75" y="2390"/> <connectionPointOut> <relPosition x="105" y="15"/> </connectionPointOut> <expression>Global_RS.Q1</expression> </inVariable> <block localId="41" width="70" height="85" typeName="OR" executionOrderId="0"> - <position x="365" y="1180"/> + <position x="240" y="2370"/> <inputVariables> <variable formalParameter="IN1"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -982,8 +998,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -997,46 +1013,33 @@ </variable> </outputVariables> </block> - <inVariable localId="48" height="30" width="100"> - <position x="205" y="1235"/> - <connectionPointOut> - <relPosition x="100" y="15"/> + <inVariable localId="48" height="30" width="105" executionOrderId="0" negated="false"> + <position x="75" y="2425"/> + <connectionPointOut> + <relPosition x="105" y="15"/> </connectionPointOut> <expression>BOOL#FALSE</expression> </inVariable> - <outVariable localId="53" height="30" width="115"> - <position x="1060" y="700"/> - <connectionPointIn> - <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"/> - </connection> - </connectionPointIn> - <expression>Test_BCD_ENO</expression> - </outVariable> - <outVariable localId="54" height="30" width="135"> - <position x="1565" y="815"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <outVariable localId="54" height="30" width="135" executionOrderId="0" negated="false"> + <position x="930" y="1774"/> + <connectionPointIn> + <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"/> </connection> </connectionPointIn> <expression>Test_TOD_STRING</expression> </outVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -1045,90 +1048,90 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="125" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inOutVariable localId="39" height="30" width="75"> - <position x="1215" y="815"/> - <connectionPointIn> - <relPosition x="0" y="15"/> + <relPosition x="125" y="31"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inOutVariable localId="39" height="30" width="75" executionOrderId="0" negatedOut="false" negatedIn="false"> + <position x="580" y="1774"/> + <connectionPointIn> + <relPosition x="0" y="16"/> <connection refLocalId="37" formalParameter="OUT"> - <position x="1215" y="830"/> - <position x="1155" y="830"/> - </connection> - </connectionPointIn> - <connectionPointOut> - <relPosition x="75" y="15"/> + <position x="580" y="1790"/> + <position x="520" y="1790"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="75" y="16"/> </connectionPointOut> <expression>Test_TOD</expression> </inOutVariable> - <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"/> <connectionPointOut> <relPosition x="30" y="15"/> </connectionPointOut> <expression>42</expression> </inVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>TOTO</expression> </outVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>TUTU</expression> </outVariable> - <inVariable localId="58" height="30" width="145"> - <position x="715" y="985"/> - <connectionPointOut> - <relPosition x="145" y="15"/> + <inVariable localId="58" height="30" width="145" executionOrderId="0" negated="false"> + <position x="60" y="1944"/> + <connectionPointOut> + <relPosition x="145" y="16"/> </connectionPointOut> <expression>Second_Python_Var</expression> </inVariable> - <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"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>Test_Python_Var</expression> </outVariable> - <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"/> <connectionPointOut> <relPosition x="30" y="15"/> </connectionPointOut> <expression>23</expression> </inVariable> <block localId="61" typeName="function0" executionOrderId="0" height="45" width="110"> - <position x="1680" y="255"/> + <position x="760" y="1170"/> <inputVariables> <variable formalParameter="LocalVar0"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1143,23 +1146,147 @@ </outputVariables> </block> <inVariable localId="62" executionOrderId="0" height="30" width="55" negated="false"> - <position x="1585" y="270"/> + <position x="665" y="1185"/> <connectionPointOut> <relPosition x="55" y="15"/> </connectionPointOut> <expression>fefvsd</expression> </inVariable> <outVariable localId="63" executionOrderId="0" height="30" width="55" negated="false"> - <position x="1825" y="270"/> + <position x="905" y="1185"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> <expression>fefvsd</expression> </outVariable> + <comment localId="53" height="65" width="420"> + <position x="75" y="2160"/> + <content> + <xhtml:p><![CDATA[Shows global variables access from resource configuration (res_pytest) and from project's configuration.]]></xhtml:p> + </content> + </comment> + <inVariable localId="18" height="30" width="65" executionOrderId="0" negated="false"> + <position x="950" y="720"/> + <connectionPointOut> + <relPosition x="65" y="15"/> + </connectionPointOut> + <expression>mux2_sel</expression> + </inVariable> + <comment localId="60" height="45" width="930"> + <position x="60" y="1480"/> + <content> + <xhtml:p><![CDATA[Here is shown how to convert values between different types (BCD, DT, TOD, STRING and others) using standard functions.]]></xhtml:p> + </content> + </comment> + <comment localId="64" height="55" width="300"> + <position x="665" y="1095"/> + <content> + <xhtml:p><![CDATA[Example of usage of user-defined function.]]></xhtml:p> + </content> + </comment> + <comment localId="65" height="45" width="410"> + <position x="55" y="1315"/> + <content> + <xhtml:p><![CDATA[Shows access variable defined in python extension. ]]></xhtml:p> + </content> + </comment> + <inVariable localId="66" height="30" width="130" executionOrderId="0" negated="false"> + <position x="60" y="1685"/> + <connectionPointOut> + <relPosition x="130" y="15"/> + </connectionPointOut> + <expression>Test_BCD_WRONG</expression> + </inVariable> + <block localId="67" width="105" height="100" typeName="BCD_TO_UINT" executionOrderId="0"> + <position x="265" y="1620"/> + <inputVariables> + <variable formalParameter="EN"> + <connectionPointIn> + <relPosition x="0" y="40"/> + </connectionPointIn> + </variable> + <variable formalParameter="IN"> + <connectionPointIn> + <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"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="ENO"> + <connectionPointOut> + <relPosition x="105" y="40"/> + </connectionPointOut> + </variable> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="105" y="80"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <outVariable localId="68" height="30" width="185" executionOrderId="0" negated="false"> + <position x="580" y="1685"/> + <connectionPointIn> + <relPosition x="0" y="15"/> + <connection refLocalId="67" formalParameter="OUT"> + <position x="580" y="1700"/> + <position x="370" y="1700"/> + </connection> + </connectionPointIn> + <expression>Test_BCD_WRONG_RESULT</expression> + </outVariable> + <comment localId="69" height="135" width="375"> + <position x="795" y="1590"/> + <content> + <xhtml:p><![CDATA[Incorrect BCD number is not converted to UINT. + +151 (16#97) is good BCD number , but +154 (16#9A) is not. + +Try this out and look at value of Test_BCD_CONVERTED variable. + + +]]></xhtml:p> + </content> + </comment> + <outVariable localId="70" height="30" width="185" executionOrderId="0" negated="false"> + <position x="580" y="1645"/> + <connectionPointIn> + <relPosition x="0" y="15"/> + <connection refLocalId="67" formalParameter="ENO"> + <position x="580" y="1660"/> + <position x="370" y="1660"/> + </connection> + </connectionPointIn> + <expression>Test_BCD_CONVERTED</expression> + </outVariable> + <comment localId="71" height="170" width="680"> + <position x="35" y="30"/> + <content> + <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. +]]></xhtml:p> + </content> + </comment> </FBD> </body> </pou> @@ -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*) Global_RS(); ]]></xhtml:p> </ST> diff -r a375e31bf312 -r c1298e7ffe3a tests/svgui/plc.xml --- 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" - productName="Beremiz" - productVersion="0.0" - 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"> <coordinateInfo> <pageSize x="1024" y="1024"/> <fbd> @@ -33,57 +26,17 @@ <INT/> </type> </variable> - <variable name="DigitalBit0"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit1"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit2"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit3"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit4"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit5"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit6"> - <type> - <BOOL/> - </type> - </variable> - <variable name="DigitalBit7"> - <type> - <BOOL/> - </type> - </variable> <variable name="Start_Stop"> <type> <derived name="Button"/> </type> </variable> - <variable name="Compteur"> + <variable name="Counter_TextCtrl"> <type> <derived name="TextCtrl"/> </type> </variable> - <variable name="Temoin"> + <variable name="State_LedCtrl"> <type> <derived name="Led"/> </type> @@ -92,15 +45,15 @@ </interface> <body> <FBD> - <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"/> <inputVariables> <variable formalParameter="EN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -108,8 +61,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -117,12 +70,12 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -141,71 +94,71 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointIn> - <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"/> </connection> </connectionPointIn> <connectionPointOut> - <relPosition x="85" y="15"/> + <relPosition x="85" y="17"/> </connectionPointOut> <expression>counter</expression> </inOutVariable> - <inVariable localId="39" height="35" width="70"> - <position x="90" y="470"/> - <connectionPointOut> - <relPosition x="70" y="15"/> + <inVariable localId="39" height="35" width="89" executionOrderId="0" negated="false"> + <position x="55" y="289"/> + <connectionPointOut> + <relPosition x="89" y="17"/> </connectionPointOut> <expression>BOOL#1</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="120" y="15"/> </connectionPointOut> <expression>'stop_back'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="120" y="15"/> </connectionPointOut> <expression>'stop_sele'</expression> </inVariable> - <inVariable localId="46" height="30" width="180"> - <position x="675" y="265"/> - <connectionPointOut> - <relPosition x="180" y="15"/> - </connectionPointOut> - <expression>'text_compteur'</expression> - </inVariable> - <inVariable localId="51" height="30" width="110"> - <position x="725" y="80"/> - <connectionPointOut> - <relPosition x="110" y="15"/> + <inVariable localId="46" height="30" width="121" executionOrderId="0" negated="false"> + <position x="694" y="755"/> + <connectionPointOut> + <relPosition x="121" y="15"/> + </connectionPointOut> + <expression>'text_counter'</expression> + </inVariable> + <inVariable localId="51" height="30" width="119" executionOrderId="0" negated="false"> + <position x="692" y="568"/> + <connectionPointOut> + <relPosition x="119" y="15"/> </connectionPointOut> <expression>'led_stop'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="120" y="15"/> </connectionPointOut> <expression>'led_start'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="IN"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -219,24 +172,24 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="sele_id"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -244,19 +197,19 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="set_state"> <connectionPointIn> - <relPosition x="0" y="165"/> + <relPosition x="0" y="167"/> </connectionPointIn> </variable> <variable formalParameter="state_in"> <connectionPointIn> - <relPosition x="0" y="210"/> + <relPosition x="0" y="209"/> </connectionPointIn> </variable> </inputVariables> @@ -264,45 +217,45 @@ <outputVariables> <variable formalParameter="state_out"> <connectionPointOut> - <relPosition x="200" y="40"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="93" height="30" width="70"> - <position x="95" y="265"/> - <connectionPointOut> - <relPosition x="70" y="15"/> + <relPosition x="187" y="41"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <inVariable localId="93" height="30" width="120" executionOrderId="0" negated="false"> + <position x="21" y="659"/> + <connectionPointOut> + <relPosition x="120" y="15"/> </connectionPointOut> <expression>BOOL#1</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="set_text"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="text"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -310,31 +263,31 @@ <inOutVariables/> <outputVariables/> </block> - <inVariable localId="1" height="30" width="70"> - <position x="80" y="85"/> - <connectionPointOut> - <relPosition x="70" y="15"/> + <inVariable localId="1" height="30" width="88" executionOrderId="0" negated="false"> + <position x="59" y="220"/> + <connectionPointOut> + <relPosition x="88" y="15"/> </connectionPointOut> <expression>BOOL#1</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="sele_id"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -342,8 +295,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -351,28 +304,28 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <inputVariables> <variable formalParameter="IN1" negated="true"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> <variable formalParameter="IN2"> <connectionPointIn> - <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"/> </connection> </connectionPointIn> </variable> @@ -381,68 +334,96 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="80" y="30"/> + <relPosition x="80" y="31"/> </connectionPointOut> </variable> </outputVariables> </block> <connector name="CLOCK" localId="97" height="30" width="90"> - <position x="345" y="60"/> + <position x="345" y="198"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> </connector> <connector name="COUNT" localId="98" height="30" width="90"> - <position x="485" y="180"/> + <position x="461" y="575"/> <connectionPointIn> <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"/> </connection> </connectionPointIn> </connector> - <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"/> + <connectionPointOut> + <relPosition x="120" y="15"/> + </connectionPointOut> + </continuation> + <inVariable localId="4" height="35" width="85" executionOrderId="0" negated="false"> + <position x="419" y="835"/> + <connectionPointOut> + <relPosition x="85" y="17"/> + </connectionPointOut> + <expression>counter</expression> + </inVariable> + <continuation name="COUNT" localId="5" height="30" width="90"> + <position x="504" y="261"/> <connectionPointOut> <relPosition x="90" y="15"/> </connectionPointOut> </continuation> - <inVariable localId="4" height="35" width="85"> - <position x="470" y="345"/> - <connectionPointOut> - <relPosition x="85" y="15"/> - </connectionPointOut> - <expression>counter</expression> - </inVariable> - <continuation name="COUNT" localId="5" height="30" width="90"> - <position x="520" y="440"/> + <block localId="99" width="80" height="110" typeName="AND" executionOrderId="0"> + <position x="199" y="264"/> + <inputVariables> + <variable formalParameter="IN1"> + <connectionPointIn> + <relPosition x="0" y="42"/> + <connection refLocalId="39"> + <position x="199" y="306"/> + <position x="144" y="306"/> + </connection> + </connectionPointIn> + </variable> + <variable formalParameter="IN2"> + <connectionPointIn> + <relPosition x="0" y="87"/> + <connection refLocalId="6"> + <position x="199" y="351"/> + <position x="144" y="351"/> + </connection> + </connectionPointIn> + </variable> + </inputVariables> + <inOutVariables/> + <outputVariables> + <variable formalParameter="OUT"> + <connectionPointOut> + <relPosition x="80" y="42"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <continuation name="CLOCK" localId="6" height="30" width="90"> + <position x="54" y="336"/> <connectionPointOut> <relPosition x="90" y="15"/> </connectionPointOut> </continuation> - <block localId="99" width="80" height="110" typeName="AND"> - <position x="215" y="445"/> - <inputVariables> - <variable formalParameter="IN1"> - <connectionPointIn> - <relPosition x="0" y="40"/> - <connection refLocalId="39"> - <position x="215" y="485"/> - <position x="160" y="485"/> - </connection> - </connectionPointIn> - </variable> - <variable formalParameter="IN2"> - <connectionPointIn> - <relPosition x="0" y="85"/> - <connection refLocalId="6"> - <position x="215" y="530"/> - <position x="160" y="530"/> + <block localId="100" width="125" height="45" typeName="BOOL_TO_INT" executionOrderId="0"> + <position x="349" y="274"/> + <inputVariables> + <variable formalParameter="IN"> + <connectionPointIn> + <relPosition x="0" y="32"/> + <connection refLocalId="99" formalParameter="OUT"> + <position x="349" y="306"/> + <position x="279" y="306"/> </connection> </connectionPointIn> </variable> @@ -451,45 +432,41 @@ <outputVariables> <variable formalParameter="OUT"> <connectionPointOut> - <relPosition x="80" y="40"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <continuation name="CLOCK" localId="6" height="30" width="90"> - <position x="70" y="515"/> - <connectionPointOut> - <relPosition x="90" y="15"/> + <relPosition x="125" y="32"/> + </connectionPointOut> + </variable> + </outputVariables> + </block> + <continuation name="CLOCK" localId="3" height="30" width="122"> + <position x="693" y="796"/> + <connectionPointOut> + <relPosition x="122" y="15"/> </connectionPointOut> </continuation> - <block localId="100" width="125" height="45" typeName="BOOL_TO_INT"> - <position x="365" y="455"/> - <inputVariables> - <variable formalParameter="IN"> - <connectionPointIn> - <relPosition x="0" y="30"/> - <connection refLocalId="99" formalParameter="OUT"> - <position x="365" y="485"/> - <position x="295" y="485"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="125" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <continuation name="CLOCK" localId="3" height="30" width="90"> - <position x="765" y="305"/> - <connectionPointOut> - <relPosition x="90" y="15"/> - </connectionPointOut> - </continuation> + <comment localId="101" height="152" width="816"> + <position x="27" y="8"/> + <content> + <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. +]]></xhtml:p> + </content> + </comment> + <comment localId="102" height="101" width="544"> + <position x="17" y="409"/> + <content> + <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> + </content> + </comment> </FBD> </body> </pou> diff -r a375e31bf312 -r c1298e7ffe3a tests/svgui/svgui@svgui/py_ext.xml --- 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"> -<![CDATA[]]> -</Python> diff -r a375e31bf312 -r c1298e7ffe3a tests/svgui/svgui@svgui/pyfile.xml --- /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"> + <variables/> + <globals> + <xhtml:p><![CDATA[ + +/* + 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> + </globals> + <init> + <xhtml:p><![CDATA[ +]]></xhtml:p> + </init> + <cleanup> + <xhtml:p><![CDATA[ +]]></xhtml:p> + </cleanup> + <start> + <xhtml:p><![CDATA[ +]]></xhtml:p> + </start> + <stop> + <xhtml:p><![CDATA[ +]]></xhtml:p> + </stop> +</PyFile> diff -r a375e31bf312 -r c1298e7ffe3a tests/traffic_lights/plc.xml --- 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"> <coordinateInfo> <fbd> <scaling x="0" y="0"/> @@ -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"/> </connection> @@ -512,7 +512,7 @@ <reference name="GREEN_LIGHT"/> </action> </actionBlock> - <actionBlock localId="9" width="219" height="125"> + <actionBlock localId="9" width="232" height="125"> <position x="711" y="250"/> <connectionPointIn> <relPosition x="0" y="15"/> @@ -554,7 +554,7 @@ <relPosition x="37" y="17"/> </connectionPointOutAction> </step> - <actionBlock localId="11" width="203" height="103"> + <actionBlock localId="11" width="235" height="103"> <position x="710" y="413"/> <connectionPointIn> <relPosition x="0" y="15"/> @@ -696,7 +696,7 @@ <relPosition x="148" y="13"/> </connectionPointOutAction> </step> - <actionBlock localId="19" width="246" height="110"> + <actionBlock localId="19" width="236" height="110"> <position x="708" y="573"/> <connectionPointIn> <relPosition x="0" y="15"/> @@ -731,7 +731,11 @@ <relPosition x="10" y="2"/> </connectionPointOut> <condition> - <reference name="STOP"/> + <inline name=""> + <ST> + <xhtml:p><![CDATA[NOT SWITCH_BUTTON]]></xhtml:p> + </ST> + </inline> </condition> </transition> <jumpStep localId="21" height="13" width="12" targetName="Standstill"> @@ -796,7 +800,7 @@ <relPosition x="148" y="13"/> </connectionPointOutAction> </step> - <actionBlock localId="25" width="238" height="110"> + <actionBlock localId="25" width="233" height="110"> <position x="708" y="748"/> <connectionPointIn> <relPosition x="0" y="15"/> @@ -831,7 +835,12 @@ <relPosition x="10" y="2"/> </connectionPointOut> <condition> - <reference name="STOP"/> + <connectionPointIn> + <connection refLocalId="48"> + <position x="400" y="858"/> + <position x="290" y="858"/> + </connection> + </connectionPointIn> </condition> </transition> <jumpStep localId="27" height="13" width="12" targetName="Standstill"> @@ -896,7 +905,7 @@ <relPosition x="56" y="13"/> </connectionPointOutAction> </step> - <actionBlock localId="31" width="154" height="110"> + <actionBlock localId="31" width="227" height="110"> <position x="709" y="931"/> <connectionPointIn> <relPosition x="0" y="15"/> @@ -1112,6 +1121,92 @@ </variable> </outputVariables> </block> + <comment localId="45" height="681" width="645"> + <position x="1021" y="21"/> + <content> + <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 +become active. + +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 +anyway. + +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. +]]></xhtml:p> + </content> + </comment> + <comment localId="46" height="160" width="375"> + <position x="8" y="326"/> + <content> + <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> + </content> + </comment> + <leftPowerRail localId="47" height="40" width="3"> + <position x="189" y="838"/> + <connectionPointOut formalParameter=""> + <relPosition x="3" y="20"/> + </connectionPointOut> + </leftPowerRail> + <contact localId="48" height="15" width="21" negated="true"> + <position x="269" y="850"/> + <connectionPointIn> + <relPosition x="0" y="8"/> + <connection refLocalId="47"> + <position x="269" y="858"/> + <position x="192" y="858"/> + </connection> + </connectionPointIn> + <connectionPointOut> + <relPosition x="21" y="8"/> + </connectionPointOut> + <variable>SWITCH_BUTTON</variable> + </contact> + <comment localId="13" height="66" width="375"> + <position x="9" y="28"/> + <content> + <xhtml:p><![CDATA[ +Sequential function chart (SFC) is commonly used to describe state machines.]]></xhtml:p> + </content> + </comment> </SFC> </body> </pou> @@ -1158,57 +1253,19 @@ <derived name="Led"/> </type> </variable> - <variable name="TEST_DATE"> - <type> - <DATE/> - </type> - <initialValue> - <simpleValue value="D#2012-12-03"/> - </initialValue> - </variable> - <variable name="RESULT_STRING"> - <type> - <string/> - </type> - </variable> - <variable name="TEST_STRING"> - <type> - <string/> - </type> - <initialValue> - <simpleValue value="TOTO"/> - </initialValue> - </variable> - <variable name="TEST_ULINT"> - <type> - <ULINT/> - </type> - </variable> - <variable name="RESULT_INT"> - <type> - <INT/> - </type> - </variable> - <variable name="RESULT_BYTE"> - <type> - <BYTE/> - </type> - </variable> </localVars> </interface> <body> <FBD> - <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"/> <inputVariables> <variable formalParameter="SWITCH_BUTTON"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1216,8 +1273,10 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1251,15 +1310,15 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1267,8 +1326,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1276,8 +1335,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1301,15 +1360,15 @@ </variable> </outputVariables> </block> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1317,8 +1376,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1347,50 +1406,50 @@ </variable> </outputVariables> </block> - <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"/> <connectionPointOut> <relPosition x="18" y="13"/> </connectionPointOut> <expression>1</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="105" y="13"/> </connectionPointOut> <expression>'SWITCH_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="105" y="13"/> </connectionPointOut> <expression>'SWITCH_ON'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="137" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="137" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_ON'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1398,8 +1457,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1407,8 +1466,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1416,29 +1475,29 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="79" y="13"/> </connectionPointOut> <expression>'RED_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="79" y="13"/> </connectionPointOut> <expression>'RED_ON'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1446,8 +1505,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1455,8 +1514,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1464,29 +1523,29 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="111" y="13"/> </connectionPointOut> <expression>'ORANGE_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="106" y="13"/> </connectionPointOut> <expression>'ORANGE_ON'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1494,8 +1553,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1503,8 +1562,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1512,29 +1571,29 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="111" y="13"/> </connectionPointOut> <expression>'GREEN_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="106" y="13"/> </connectionPointOut> <expression>'GREEN_ON'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1542,8 +1601,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1551,8 +1610,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1560,29 +1619,29 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="171" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_RED_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="166" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_RED_ON'</expression> </inVariable> - <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"/> <inputVariables> <variable formalParameter="back_id"> <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1590,8 +1649,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1599,8 +1658,8 @@ <connectionPointIn> <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"/> </connection> </connectionPointIn> </variable> @@ -1608,236 +1667,52 @@ <inOutVariables/> <outputVariables/> </block> - <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"/> <connectionPointOut> <relPosition x="190" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_GREEN_OFF'</expression> </inVariable> - <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"/> <connectionPointOut> <relPosition x="185" y="13"/> </connectionPointOut> <expression>'PEDESTRIAN_GREEN_ON'</expression> </inVariable> - <inVariable localId="24" height="27" width="84"> - <position x="289" y="1141"/> - <connectionPointOut> - <relPosition x="84" y="13"/> - </connectionPointOut> - <expression>TEST_DATE</expression> - </inVariable> - <block localId="25" width="128" height="40" typeName="DATE_TO_STRING"> - <position x="426" y="1124"/> - <inputVariables> - <variable formalParameter="IN"> - <connectionPointIn> - <relPosition x="0" y="30"/> - <connection refLocalId="24"> - <position x="426" y="1154"/> - <position x="373" y="1154"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="128" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <outVariable localId="26" height="27" width="116"> - <position x="640" y="1141"/> - <connectionPointIn> - <relPosition x="0" y="13"/> - <connection refLocalId="25" formalParameter="OUT"> - <position x="640" y="1154"/> - <position x="554" y="1154"/> - </connection> - </connectionPointIn> - <expression>RESULT_STRING</expression> - </outVariable> - <inVariable localId="27" height="27" width="90"> - <position x="294" y="1271"/> - <connectionPointOut> - <relPosition x="90" y="13"/> - </connectionPointOut> - <expression>TEST_ULINT</expression> - </inVariable> - <outVariable localId="28" height="27" width="89"> - <position x="630" y="1271"/> - <connectionPointIn> - <relPosition x="0" y="13"/> - <connection refLocalId="29" formalParameter="OUT"> - <position x="630" y="1284"/> - <position x="551" y="1284"/> - </connection> - </connectionPointIn> - <expression>RESULT_INT</expression> - </outVariable> - <block localId="29" width="107" height="40" typeName="ULINT_TO_INT"> - <position x="444" y="1254"/> - <inputVariables> - <variable formalParameter="IN"> - <connectionPointIn> - <relPosition x="0" y="30"/> - <connection refLocalId="27"> - <position x="444" y="1284"/> - <position x="384" y="1284"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="107" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="30" height="27" width="89"> - <position x="139" y="1032"/> - <connectionPointOut> - <relPosition x="89" y="13"/> - </connectionPointOut> - <expression>RESULT_INT</expression> - </inVariable> - <block localId="31" width="68" height="85" typeName="LIMIT"> - <position x="419" y="994"/> - <inputVariables> - <variable formalParameter="MN"> - <connectionPointIn> - <relPosition x="0" y="30"/> - <connection refLocalId="33"> - <position x="419" y="1024"/> - <position x="390" y="1024"/> - </connection> - </connectionPointIn> - </variable> - <variable formalParameter="IN"> - <connectionPointIn> - <relPosition x="0" y="51"/> - <connection refLocalId="38" formalParameter="OUT"> - <position x="419" y="1045"/> - <position x="335" y="1045"/> - </connection> - </connectionPointIn> - </variable> - <variable formalParameter="MX"> - <connectionPointIn> - <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"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="68" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="33" height="27" width="20"> - <position x="370" y="1011"/> - <connectionPointOut> - <relPosition x="20" y="13"/> - </connectionPointOut> - <expression>0</expression> - </inVariable> - <inVariable localId="34" height="27" width="26"> - <position x="363" y="1054"/> - <connectionPointOut> - <relPosition x="26" y="13"/> - </connectionPointOut> - <expression>31</expression> - </inVariable> - <block localId="35" width="100" height="45" typeName="INT_TO_BYTE"> - <position x="529" y="992"/> - <inputVariables> - <variable formalParameter="IN"> - <connectionPointIn> - <relPosition x="0" y="32"/> - <connection refLocalId="31" formalParameter="OUT"> - <position x="529" y="1024"/> - <position x="487" y="1024"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="100" y="32"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <outVariable localId="37" height="27" width="100"> - <position x="681" y="1011"/> - <connectionPointIn> - <relPosition x="0" y="13"/> - <connection refLocalId="35" formalParameter="OUT"> - <position x="681" y="1024"/> - <position x="629" y="1024"/> - </connection> - </connectionPointIn> - <expression>RESULT_BYTE</expression> - </outVariable> - <block localId="38" width="67" height="60" typeName="MUL"> - <position x="268" y="1015"/> - <inputVariables> - <variable formalParameter="IN1"> - <connectionPointIn> - <relPosition x="0" y="30"/> - <connection refLocalId="30"> - <position x="268" y="1045"/> - <position x="228" y="1045"/> - </connection> - </connectionPointIn> - </variable> - <variable formalParameter="IN2"> - <connectionPointIn> - <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"/> - </connection> - </connectionPointIn> - </variable> - </inputVariables> - <inOutVariables/> - <outputVariables> - <variable formalParameter="OUT"> - <connectionPointOut> - <relPosition x="67" y="30"/> - </connectionPointOut> - </variable> - </outputVariables> - </block> - <inVariable localId="39" height="27" width="18"> - <position x="211" y="1071"/> - <connectionPointOut> - <relPosition x="18" y="13"/> - </connectionPointOut> - <expression>1</expression> - </inVariable> + <comment localId="24" height="262" width="804"> + <position x="22" y="13"/> + <content> + <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. +]]></xhtml:p> + </content> + </comment> + <comment localId="102" height="126" width="411"> + <position x="20" y="319"/> + <content> + <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> + </content> + </comment> </FBD> </body> </pou> diff -r a375e31bf312 -r c1298e7ffe3a tests/traffic_lights/svgui-0@svgui/pyfile.xml --- 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"> <variables/> <globals> - <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[ +/* + 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> </globals> <init> - <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[ +]]></xhtml:p> </init> <cleanup> - <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[ +]]></xhtml:p> </cleanup> <start> - <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[ +]]></xhtml:p> </start> <stop> - <xhtml:p><![CDATA[]]></xhtml:p> + <xhtml:p><![CDATA[ +]]></xhtml:p> </stop> </PyFile> diff -r a375e31bf312 -r c1298e7ffe3a util/BitmapLibrary.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. import os diff -r a375e31bf312 -r c1298e7ffe3a util/MiniTextControler.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 """ diff -r a375e31bf312 -r c1298e7ffe3a util/ProcessLogger.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 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. -# -#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 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. import time import wx @@ -49,11 +48,12 @@ def run(self): outchunk = None self.retval = None - 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() + if self.endcallback: + self.retval = self.Proc.poll() + else: + 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.errdata = [] self.keyword = keyword self.kill_it = kill_it + self.startsem = Semaphore(0) self.finishsem = Semaphore(0) self.endlock = Lock() @@ -124,6 +125,12 @@ elif wx.Platform == '__WXGTK__': popenargs["shell"] = False + if timeout: + self.timeout = Timer(timeout,self.endlog) + self.timeout.start() + else: + self.timeout = None + self.Proc = subprocess.Popen( self.Command, **popenargs ) self.outt = outputThread( @@ -138,12 +145,8 @@ self.Proc.stderr, self.errors) self.errt.start() - - if timeout: - self.timeout = Timer(timeout,self.endlog) - self.timeout.start() - else: - self.timeout = None + self.startsem.release() + def output(self,v): self.outdata.append(v) @@ -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() + if self.timeout: + self.timeout.cancel() self.exitcode = ecode if self.exitcode != 0: self.log_the_end(ecode,pid) if self.finish_callback is not None: self.finish_callback(self,ecode,pid) + self.errt.join() self.finishsem.release() def kill(self,gently=True): + # avoid running kill before start is finished + self.startsem.acquire() + self.startsem.release() + self.outt.killed = True self.errt.killed = True if wx.Platform == '__WXMSW__': @@ -196,9 +207,9 @@ def endlog(self): if self.endlock.acquire(False): - self.finishsem.release() if not self.outt.finished and self.kill_it: self.kill() + self.finishsem.release() def spin(self): diff -r a375e31bf312 -r c1298e7ffe3a util/TranslationCatalogs.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# 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. + import os import wx diff -r a375e31bf312 -r c1298e7ffe3a util/misc.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + """ Misc definitions """ diff -r a375e31bf312 -r c1298e7ffe3a version.py --- /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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + + +import subprocess, os + +def GetAppRevision(): + rev = None + app_dir=os.path.dirname(os.path.realpath(__file__)) + try: + pipe = subprocess.Popen( + ["hg", "id", "-i"], + stdout = subprocess.PIPE, + cwd = app_dir + ) + rev = pipe.communicate()[0] + if pipe.returncode != 0: + rev = None + except: + pass + + # if this is not mercurial repository + # try to read revision from file + if rev is None: + try: + f = open(os.path.join(app_dir,"revision")) + rev = f.readline() + except: + pass + return rev + +def GetAboutDialogInfo(): + import wx + info = wx.AboutDialogInfo() + + info.Name = "Beremiz" + 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' + '\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' + '\n' + '\n' + '\n' + '') + + # read license file + path=os.path.join(os.path.dirname(os.path.abspath(__file__))) + license_path = os.path.join(path, u"COPYING") + license='' + 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>") + return info + +app_version = "1.2" +rev = GetAppRevision() +if rev is not None: + app_version = app_version + "-" + rev.rstrip() + + + diff -r a375e31bf312 -r c1298e7ffe3a wxglade_hmi/__init__.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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 * diff -r a375e31bf312 -r c1298e7ffe3a wxglade_hmi/wxglade_hmi.py --- 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 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# 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. + import wx import os, sys, shutil from xml.dom import minidom diff -r a375e31bf312 -r c1298e7ffe3a xmlclass/__init__.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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. # Package initialisation diff -r a375e31bf312 -r c1298e7ffe3a xmlclass/xmlclass.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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 import re @@ -1690,7 +1690,7 @@ return etree.QName(self.tag).localname def tostring(self): - 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 @@ return tree, None 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) diff -r a375e31bf312 -r c1298e7ffe3a xmlclass/xsdschema.py --- 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 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#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, re import datetime