Mon, 20 Aug 2018 15:17:24 +0300Use static library for Modbus
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Mon, 20 Aug 2018 15:17:24 +0300] rev 2291
Use static library for Modbus

It makes easier deployment of projects with Modbus (similar to BACnet implementation)

Thu, 16 Aug 2018 16:29:06 +0300Cleanup WAMP example
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 16 Aug 2018 16:29:06 +0300] rev 2290
Cleanup WAMP example

Closes #39

Thu, 16 Aug 2018 13:42:18 +0300Update README for WAMP example to use crossbar with python3
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 16 Aug 2018 13:42:18 +0300] rev 2289
Update README for WAMP example to use crossbar with python3

crossbar python2 support is broken in v18.7.2.
I've submitted with fixes for that.
https://github.com/crossbario/crossbar/pull/1376

But they don't test crossbar with python2 in CI, so it's going to be
broken again in the future.
And there is no much reason to use crossbar with python2.

Thu, 16 Aug 2018 11:01:54 +0300Make ID in WAMP project match with ID PLC runtime.
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 16 Aug 2018 11:01:54 +0300] rev 2288
Make ID in WAMP project match with ID PLC runtime.

See project_files/wampconf.json. ID for runtime is "wamptest". The
same id should be used in project's location URI: WAMP://127.0.0.1:8888#Automation#wamptest

Thu, 16 Aug 2018 10:53:54 +0300Fix SetServer method in WAMP
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 16 Aug 2018 10:53:54 +0300] rev 2287
Fix SetServer method in WAMP

Thu, 16 Aug 2018 10:52:20 +0300Remove non-existed PLCObject method 'ForceReload'
Andrey Skvortsov <andrej.skvortzov@gmail.com> [Thu, 16 Aug 2018 10:52:20 +0300] rev 2286
Remove non-existed PLCObject method 'ForceReload'

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