Tue, 14 Aug 2018 17:00:01 +0300remote execute permissions from README file
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 14 Aug 2018 17:00:01 +0300] rev 2285
remote execute permissions from README file

Mon, 13 Aug 2018 18:29:07 +0300Fix wxHMI example after upgrading wxGlade
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 13 Aug 2018 18:29:07 +0300] rev 2284
Fix wxHMI example after upgrading wxGlade

Newer wxGlade generates code to initialize GridSizer's with empty
elements.

...
grid_sizer_1.Add(self.window_1, 1, wx.ALIGN_CENTER, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
sizer_2.Add((0, 0), 0, 0, 0)
...

That causes following traceback, if new buttons are added
to already full sizer.

PLCobject : Traceback (most recent call last):

File "./Beremiz_service.py", line 389, in default_evaluator
res = (tocall(*args, **kwargs), None)

File "/tmp/tmpQS8ct2/runtime_0.py", line 540, in _runtime_0_start
wx.MessageBox(_("Please stop PLC to close"))

File "/tmp/tmpQS8ct2/runtime_0.py", line 504, in Init
lambda axis:( MakeButtonFunc(self, sizer, axis+"axisMinus"),

File "/tmp/tmpQS8ct2/runtime_0.py", line 502, in <lambda>
lambda btname: MakeButtonFunc(self, sizer, btname), ActionButtons)

File "/tmp/tmpQS8ct2/runtime_0.py", line 461, in MakeButtonFunc
print sizer, btname

File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 14453, in Add
return _core_.Sizer_Add(*args, **kwargs)

PyAssertionError: C++ assertion "Assert failure" failed at
../src/common/sizer.cpp(1401) in DoInsert(): too many items (11 > 2*5)
in grid sizer (maybe you should omit the number of either rows or
columns?)


Tested with wxGlade version 0.8.3
Closes #41

Mon, 13 Aug 2018 18:21:10 +0300Remove useless print statement from wxHMI GUI code
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 13 Aug 2018 18:21:10 +0300] rev 2283
Remove useless print statement from wxHMI GUI code

It's py3k incompatible.

Mon, 13 Aug 2018 18:19:17 +0300Rename extension instance 'wxHMI' to 'wxglade_hmi'
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 13 Aug 2018 18:19:17 +0300] rev 2282
Rename extension instance 'wxHMI' to 'wxglade_hmi'

It is necessary because of following commit 7f59aa398669 ('WxGlade HMI extension now does
only instanciate wx object who's name match extension's name. If no
object match the name and no code is provided in 'start' user python
code section, then a warning is issued')

Mon, 13 Aug 2018 18:05:16 +0300Remove backup .bak files
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 13 Aug 2018 18:05:16 +0300] rev 2281
Remove backup .bak files

Mon, 13 Aug 2018 11:33:30 +0300Drop EtherCAT examples, because they are non-functional without releasing motion control library
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 13 Aug 2018 11:33:30 +0300] rev 2280
Drop EtherCAT examples, because they are non-functional without releasing motion control library

Closes #38

Fri, 10 Aug 2018 18:07:38 +0300merge
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 10 Aug 2018 18:07:38 +0300] rev 2279
merge

Fri, 10 Aug 2018 17:45:33 +0300Dirty fix for error '_object_has_no_attribute_'getSlave' in EtherCAT extension
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 10 Aug 2018 17:45:33 +0300] rev 2278
Dirty fix for error '_object_has_no_attribute_'getSlave' in EtherCAT extension

traceback:
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 1433, in OnPouSelectedChanged
window.RefreshView()
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/ConfigEditor.py", line 837, in RefreshView
self.RefreshProcessVariables()
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/ConfigEditor.py", line 886, in RefreshProcessVariables
slaves = self.Controler.GetSlaves(**self.CurrentNodesFilter)
File "/home/developer/WorkData/PLC/beremiz/beremiz/etherlab/EthercatMaster.py", line 341, in GetSlaves
for slave in self.Config.getConfig().getSlave():
<type 'exceptions.AttributeError'>:_'lxml.etree._Element'_object_has_no_attribute_'getSlave'

Steps to reproduce problem:

- Add new EtherCAT master
- Add new EthercatNode to the master
- double click on


this is looks like dirty hack to fix strange problem with initial[0]
changing its type after returning from _init_ method to lxml.etree._Element
As a result all methods generated by class factory are lost.

For example, in function initMethod initial[0].__class__ points to
xmlclass.xmlclass.Config. After map(self.append, initial)
self.Config.__class__ is 'xmlclass.xmlclass.Config' as well.
But after returning from initMethod (_init) in CreateElement
self.Config.__class__ has changed to lxml.etree._Element.


I've noticed similar behavior if copy/deepcopy is used for any child
of etree.ElementBase. See simple example below.
[-------------------------------------------------------------]
#!/usr/bin/python

from __future__ import print_function
from lxml import etree
import copy

class DefaultElementClass(etree.ElementBase):
def getLocalTag(self):
return etree.QName(self.tag).localname


def printInformation(x):
print(x, x.__class__, "getLocalTag" in dir(x))


a = DefaultElementClass()
printInformation(a)

#
printInformation(copy.copy(a))
printInformation(copy.deepcopy(a))
[-------------------------------------------------------------]

Fri, 10 Aug 2018 15:58:40 +0300Fix wrong ST code generation in case of several coils connected to each other.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Fri, 10 Aug 2018 15:58:40 +0300] rev 2277
Fix wrong ST code generation in case of several coils connected to each other.


For example,
|---|Var0|----(Var1)--(Var2)---|

Closes #32

Thu, 09 Aug 2018 14:00:14 +0300Update README with instruction to build BACnet library for BACnet support
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 09 Aug 2018 14:00:14 +0300] rev 2276
Update README with instruction to build BACnet library for BACnet support

Thu, 09 Aug 2018 13:58:47 +0300Improve fix wrong code generation if EN/ENO are used in FBD/LD/SFC
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 09 Aug 2018 13:58:47 +0300] rev 2275
Improve fix wrong code generation if EN/ENO are used in FBD/LD/SFC

Commit c9915bc6 "Fix wrong code generation if EN/ENO are used in
FBD/LD/SFC" caused following backtrace in some cases:

File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 476, in GenerateProgram
self.GeneratePouProgram(pou_name)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 258, in GeneratePouProgram
program = pou_program.GenerateProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1713, in GenerateProgram
self.ComputeProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 997, in ComputeProgram
eno_var = self.GetUsedEno(body, connections)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 929, in GetUsedEno
for invar in blk.inputVariables.getvariable():
File "/home/developer/WorkData/PLC/beremiz/beremiz/xmlclass/xmlclass.py", line 1363, in getattrMethod
return DefaultElementClass.__getattribute__(self, name)
<type 'exceptions.AttributeError'>: 'inOutVariable' object has no attribute 'inputVariables'

Wed, 01 Aug 2018 14:09:12 +0300Load images for EtherCAT extension
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 01 Aug 2018 14:09:12 +0300] rev 2274
Load images for EtherCAT extension

Fixes following backtrace:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_core.py", line 16765, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/home/developer/WorkData/PLC/beremiz/beremiz/BeremizIDE.py", line 1074, in AddConfNode
self._Refresh(TITLE, FILEMENU, PROJECTTREE)
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 917, in _Refresh
self.RefreshFunctions[element]()
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 1526, in RefreshProjectTree
self.GenerateProjectTreeBranch(root, infos)
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 1565, in GenerateProjectTreeBranch
self.GenerateProjectTreeBranch(item, values)
File "/home/developer/WorkData/PLC/beremiz/beremiz/IDEFrame.py", line 1554, in GenerateProjectTreeBranch
self.TreeImageDict[icon_name] = self.TreeImageList.Add(GetBitmap(icon_name))
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 6735, in Add
return _gdi_.ImageList_Add(*args, **kwargs)
ValueError: invalid null reference in method 'ImageList_Add', expected argument 2 of type 'wxBitmap const &

Wed, 12 Sep 2018 11:36:50 +0200Flush standard output when runtime ready, so that IDE knows it, and can continue connection to LOCAL:// uri
Edouard Tisserant [Wed, 12 Sep 2018 11:36:50 +0200] rev 2273
Flush standard output when runtime ready, so that IDE knows it, and can continue connection to LOCAL:// uri

Tue, 11 Sep 2018 16:08:21 +0200Change behaviour of python_eval function block : if TRIG is false, then ACK is also false except a pulse precisely when receiving answer from interpreter
Edouard Tisserant [Tue, 11 Sep 2018 16:08:21 +0200] rev 2272
Change behaviour of python_eval function block : if TRIG is false, then ACK is also false except a pulse precisely when receiving answer from interpreter

Wed, 05 Sep 2018 12:58:41 +0200Removed useless condition in Worker.py that was allowing misfit non-serialized call when worker still not running its loop.
Edouard Tisserant [Wed, 05 Sep 2018 12:58:41 +0200] rev 2271
Removed useless condition in Worker.py that was allowing misfit non-serialized call when worker still not running its loop.

Tue, 21 Aug 2018 16:11:02 +0200Refactoring. Separated PLC Object, PYRO Server and MainWorker :
Edouard Tisserant [Tue, 21 Aug 2018 16:11:02 +0200] rev 2270
Refactoring. Separated PLC Object, PYRO Server and MainWorker :
- PLC Object is now a Singleton, instantiated through runtime.CreatePLCObjectSingleton(...)
- Pyro server doesn't hold any reference to PLCObject, and doesn't create it anymore
- PLC Object class doesn't inherit from Pyro.ObjBase anymore
- Pyro related code moved to runtime.PyroServer.py
- MainWorker class moved to runtime/Worker.py
- Both PLC Object and MainWorker creation happens in runtime/__init__.py

Thu, 16 Aug 2018 11:22:40 +0200Fixed new code-generation code, that was making exception with simple variable-to-variable assignments.
Edouard Tisserant [Thu, 16 Aug 2018 11:22:40 +0200] rev 2269
Fixed new code-generation code, that was making exception with simple variable-to-variable assignments.

Tue, 14 Aug 2018 13:10:15 +0200BACnet : Fixed missing header include in server.c introduced in 37ef7a3c6b8b
Edouard Tisserant [Tue, 14 Aug 2018 13:10:15 +0200] rev 2268
BACnet : Fixed missing header include in server.c introduced in 37ef7a3c6b8b

Tue, 14 Aug 2018 12:43:43 +0200merged
Edouard Tisserant [Tue, 14 Aug 2018 12:43:43 +0200] rev 2267
merged

Tue, 14 Aug 2018 11:14:20 +0200NevowServer : Added minimalist css style customization and a link to go to settings page and back
dporopat <denis.poropat@smarteh.si> [Tue, 14 Aug 2018 11:14:20 +0200] rev 2266
NevowServer : Added minimalist css style customization and a link to go to settings page and back

Mon, 13 Aug 2018 15:00:51 +0200fixed setServer call in WampClient module. Was doing nothing because _PySrv wasn't global.
Edouard Tisserant [Mon, 13 Aug 2018 15:00:51 +0200] rev 2265
fixed setServer call in WampClient module. Was doing nothing because _PySrv wasn't global.

Mon, 13 Aug 2018 14:58:59 +0200Removed now deprecated ForceReload from WAMP exposed calls
Edouard Tisserant [Mon, 13 Aug 2018 14:58:59 +0200] rev 2264
Removed now deprecated ForceReload from WAMP exposed calls

Mon, 13 Aug 2018 13:24:48 +0200fixed documentation bug
Edouard Tisserant [Mon, 13 Aug 2018 13:24:48 +0200] rev 2263
fixed documentation bug

Mon, 13 Aug 2018 13:24:28 +0200NevowServer : added addInfoString to allow extensions to declare some read-only strings to be displayed in settings. Also renamed addExtension in addSettings for clarity.
Edouard Tisserant [Mon, 13 Aug 2018 13:24:28 +0200] rev 2262
NevowServer : added addInfoString to allow extensions to declare some read-only strings to be displayed in settings. Also renamed addExtension in addSettings for clarity.

Mon, 13 Aug 2018 11:10:23 +0200fixed problems reported by certification testing : vendor identifier acces rights (now read only), and bvlc_maintenance timer was increasing too fast.
Mario de Sousa <msousa@fe.up.pt> [Mon, 13 Aug 2018 11:10:23 +0200] rev 2261
fixed problems reported by certification testing : vendor identifier acces rights (now read only), and bvlc_maintenance timer was increasing too fast.

Thu, 09 Aug 2018 09:07:09 +0200Some blank lines to make bitbucket's PEP8 2.2.0 happy
Edouard Tisserant [Thu, 09 Aug 2018 09:07:09 +0200] rev 2260
Some blank lines to make bitbucket's PEP8 2.2.0 happy

Wed, 08 Aug 2018 13:46:19 +0200merged Andrey's default
Edouard Tisserant [Wed, 08 Aug 2018 13:46:19 +0200] rev 2259
merged Andrey's default

Wed, 01 Aug 2018 13:09:45 +0300Fix wrong code generation if EN/ENO are used in FBD/LD/SFC
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Wed, 01 Aug 2018 13:09:45 +0300] rev 2258
Fix wrong code generation if EN/ENO are used in FBD/LD/SFC

This problem appears for example here

--------
------- | MOVE |
| MOVE1 |------|EN ENO|
------- | |
| |
------- | | -----------
| 23 |------|IN OUT|---| LocalVar0 |
------- -------- -----------


--------
------- | MOVE |
| MOVE2 |------|EN ENO|
------- | |
| |
------- | | -----------
| 15 |------|IN OUT|---| LocalVar0 |
------- -------- -----------

Before wrong code was generated for this case:

MOVE6_OUT := MOVE(EN := move1, IN := 23, ENO => MOVE6_ENO);
LocalVar0 := MOVE6_OUT;
MOVE4_OUT := MOVE(EN := move2, IN := 15, ENO => MOVE4_ENO);
LocalVar0 := MOVE4_OUT;

With this patch now following code is generated:

MOVE6_OUT := MOVE(EN := move1, IN := 23, ENO => MOVE6_ENO);
IF MOVE6_ENO THEN
LocalVar0 := MOVE6_OUT;
END_IF;
MOVE4_OUT := MOVE(EN := move2, IN := 15, ENO => MOVE4_ENO);
IF MOVE4_ENO THEN
LocalVar0 := MOVE4_OUT;
END_IF;


See discussion here:
https://sourceforge.net/p/beremiz/mailman/message/36378805/

Tue, 31 Jul 2018 14:17:41 +0300Fix flickering in debug panel
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Tue, 31 Jul 2018 14:17:41 +0300] rev 2257
Fix flickering in debug panel

This flickering made debug panel unusable, because most of the time
panel was white. This problem effects wxPython with GTK3+ backend
(at least on GNU/Linux systems).

Removed code IIUC draws box with content of moved debug variable, I
don't see any effect of it neither on GNU/Linux nor on Windows. It
should be safe to remove.

Mon, 30 Jul 2018 19:28:39 +0300Fix non-usable toolbar on wxPython with GTK3+
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 30 Jul 2018 19:28:39 +0300] rev 2256
Fix non-usable toolbar on wxPython with GTK3+

On GNU/Linux if wxPython uses wxWidget with GTK3+ backend (this is
what most modern distributions do), then size of EditorToolBar was
always to store only one button.
This is because GetBestSize() is updated only after pane is shown and
updated.
The code does work correctly on python-wxgtk3.0 (gtk2 backend) on
GNU/Linux and with wxpython 2.8 on Windows.