---------- Forwarded message --------- From: Daniel Mirkin <[hidden email]> Date: mié., 4 jul. 2018 a las 12:35 Subject: Learning BeremizIDE and beremiz-service To: <[hidden email]> Cc: <[hidden email]> Dear Andrey:
I'm learning on BeremizIDE and beremiz-service usage. I grabbed all the information available at Beremiz site, and the Smarteh manual too. However, I cann't found any clear information about running Beremiz as a virtualPLC on Linux (runtime?). Is that the beremiz-service that http://beremiz.readthedocs.io/en/latest/manual/connectors.html refers to? Or virtualPLC runtime for Linux is not available under Beremiz project? Meanwhile, I've decided to try, perhaps doing brute force intents ;-) For this, I've wrote a very simple test program (two digital inputs, one digital output, and one RS block). BeremizIDE succefully compiles this program and generates.st files, too. I've declared BeremizRoot URI_location as LOCAL:// in Project > Config and launched beremiz-service from terminal: [daniel@hardwork ~]$ beremiz-service /usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") HTTP interface port : 8009 Pyro port : 3000 Current working directory : /home/daniel UI thread started successfully. Then, I have connected BeremizIDE to virtual PLC and transferred the generated program. But Beremiz PLC Log complains about various errors, showed in terminal, too: <code> PLCobject : Traceback (most recent call last): File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC self._PLClibraryHandle = dlopen(self._GetLibFileName()) OSError: /home/daniel/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined symbol: __IX0_1 </code> Undefined symbol: __IX0_1 ???? But I've declared all input-output variables in my program in IEC 61131-3 style: %IX0.0 , %IX0.1 , %QX0.0 !!! I'm not able either to start or stop virtual PLC from Beremiz task icon contextual menu; http://localhost:8009/ shows PLC IS STOPPED all the time. I cann't found where the errors are originated. I send you, under my signature, all the logs in PLC Log (including live Python shell), and terminal messages too. NOTE: files attached to my original email aren't accepted by list.sourceforge.net service. Could you kindly look at these, and tell me what I'm doing wrong? Or perhaps virtualPLC is a misconcept from me? Referred to our previous conversation, on Beremiz and Modbus: If I can run any kind of virtualPLC on Linux, first I will try to do remote control onto a Siemens LOGO! v8, that has Modbus TCP enabled. If I can grab some Modbus RTU module from my friends, I will test if is possible to remote control them via RS-485 bus (I have USB/RS-485 adapters, CH340 and Prolific 2303 based). Off topic? I'm hardily testing OpenPLC Project runtime for Linux, too ( http://www.openplcproject.com/getting-started-linux ). I've succesfully managed to install it in Arch Linux, and I'm using BeremizIDE to generate the program and export to a .st file required by this runtime. The only previous action I need to upload the program to OpenPLC runtime, is to change CONFIGURATION config to CONFIGURATION Config0 in generated_plc.st file. A little question: is possible to edit this configuration name directly in BeremizIDE? Soon, I will try to run OpenPLC Project runtime in Raspberry Pi, but on Arch Linux ARM, not on Raspbian. I wish to use cheap WELLPRO Modbus RTU interfaces in the future (see http://www.shwellpro.com/products.asp ). Unfortunately, in OpenPLC v3 there is not a Modbus slave driver available yet :-( Your answers will be welcome! Best regards.Daniel Mirkin [hidden email] Cel. +54 9 223 524 2171 Beremiz logs Start build in /home/daniel/Beremiz/Programs/ld_test2/build Generating SoftPLC IEC-61131 ST/IL/SFC code... Compiling IEC Program into C code... Extracting Located Variables... C code generated successfully. PLC : [CC] plc_main.c -> plc_main.o [CC] plc_debugger.c -> plc_debugger.o py_ext : [CC] py_ext.c -> py_ext.o etherlab_ext : [CC] etherlab_ext.c -> etherlab_ext.o PLC : [CC] config.c -> config.o [CC] Res0.c -> Res0.o Linking : [CC] plc_main.o plc_debugger.o py_ext.o etherlab_ext.o config.o Res0.o -> ld_test2.so Successfully built. PYRO connecting to URI : PYROLOC://127.0.0.1:61334 Debugger ready Latest build already matches current target. Transfering anyway... PLCobject : NewPLC (d792bf5ec10db55c9fdfe5e7071c5b64) Transfer completed successfully. CRITICAL at 1970-01-01 00:00:00.000000000: Traceback (most recent call last): File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC self._PLClibraryHandle = dlopen(self._GetLibFileName()) OSError: /tmp/tmpmrfrNq/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined symbol: __IX0_1 #Launching live Python shell File "/usr/share/beremiz/Beremiz_service.py", line 303, in OnTaskBarStartPLC self.pyroserver.plcobj.StartPLC() File "/usr/share/beremiz/runtime/PLCObject.py", line 168, in func_wrapper return MainWorker.call(func, *args, **kwargs) File "/usr/share/beremiz/runtime/PLCObject.py", line 80, in do self.result = call(*args, **kwargs) File "/usr/share/beremiz/runtime/PLCObject.py", line 518, in StartPLC self.LogMessage(0, _("Problem starting PLC : error %d" % res)) TypeError: %d format: a number is required, not NoneType PLCobject : Traceback (most recent call last): File "/usr/share/beremiz/Beremiz_service.py", line 365, in OnTaskBarWXInspector InspectionTool().Show(wnd, True) File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/lib/inspection.py", line 95, in Show app=self._app) File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/lib/inspection.py", line 151, in __init__ style=wx.NO_BORDER, File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/py/crust.py", line 60, in __init__ rootIsNamespace=rootIsNamespace) File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/py/filling.py", line 294, in __init__ wx.FutureCall(1, self.SplitVertically, self.tree, self.text, 200) File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py", line 16798, in __init__ self.Start() File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py", line 16812, in Start self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_misc.py", line 1324, in Start return _misc_.Timer_Start(*args, **kwargs) PyAssertionError: C++ assertion "wxThread::IsMain()" failed at ./src/common/timerimpl.cpp(60) in Start(): timer can only be started from the main thread ----------------- #terminal logs /usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629: UserWarning: wxPython/wxWidgets release number mismatch warnings.warn("wxPython/wxWidgets release number mismatch") HTTP interface port : 8009 Pyro port : 3000 Current working directory : /home/daniel UI thread started successfully. PLCobject : Traceback (most recent call last): File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC self._PLClibraryHandle = dlopen(self._GetLibFileName()) OSError: /home/daniel/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined symbol: __IX0_1 #Trying to start or stop virtual PLC PLC is empty or already started. PLC is not started. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremiz-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremiz-devel |
Hi Daniel, I am really pressed for time today, but I can just quickly let you know that when you map variables to a specific location (%Q0.5.3, ...), then that location must have been defined by adding, for example, a communication plug-in (CANfestival, Modbus, ...). Beremiz has no way of guessing how to map that location to a specific hardware address. I suggest, for a first attempt, you try to run your code without mapping any variables to locations. Mario. On Wednesday, July 04, 2018 13:01:11 Daniel Mirkin wrote: > ---------- Forwarded message --------- > From: Daniel Mirkin <[hidden email]> > Date: mié., 4 jul. 2018 a las 12:35 > Subject: Learning BeremizIDE and beremiz-service > To: <[hidden email]> > Cc: <[hidden email]> > > > Dear Andrey: > > I'm learning on BeremizIDE and beremiz-service usage. > I grabbed all the information available at Beremiz site, and the Smarteh > manual too. > > However, I cann't found any clear information about running Beremiz as a > virtualPLC on Linux (runtime?). > Is that the beremiz-service that > http://beremiz.readthedocs.io/en/latest/manual/connectors.html refers to? > Or virtualPLC runtime for Linux is not available under Beremiz project? > > Meanwhile, I've decided to try, perhaps doing brute force intents ;-) > For this, I've wrote a very simple test program (two digital inputs, one > digital output, and one RS block). > BeremizIDE succefully compiles this program and generates.st files, too. > I've declared BeremizRoot URI_location as LOCAL:// in Project > Config > and launched beremiz-service from terminal: > > [daniel@hardwork ~]$ beremiz-service > /usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629: > UserWarning: wxPython/wxWidgets release number mismatch > warnings.warn("wxPython/wxWidgets release number mismatch") > HTTP interface port : 8009 > Pyro port : 3000 > Current working directory : /home/daniel > UI thread started successfully. > > Then, I have connected BeremizIDE to virtual PLC and transferred the > generated program. > But Beremiz PLC Log complains about various errors, showed in terminal, too: > > <code> > PLCobject : Traceback (most recent call last): > File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC > self._PLClibraryHandle = dlopen(self._GetLibFileName()) > OSError: /home/daniel/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined > symbol: __IX0_1 > </code> > Undefined symbol: __IX0_1 ???? > > But I've declared all input-output variables in my program in IEC 61131-3 > style: %IX0.0 , %IX0.1 , %QX0.0 !!! > > I'm not able either to start or stop virtual PLC from Beremiz task icon > contextual menu; http://localhost:8009/ shows PLC IS STOPPED all the time. > I cann't found where the errors are originated. > > I send you, under my signature, all the logs in PLC Log (including live > Python shell), and terminal messages too. > NOTE: files attached to my original email aren't accepted by > list.sourceforge.net service. > Could you kindly look at these, and tell me what I'm doing wrong? > > Or perhaps virtualPLC is a misconcept from me? > > Referred to our previous conversation, on Beremiz and Modbus: > If I can run any kind of virtualPLC on Linux, first I will try to do remote > control onto a Siemens LOGO! v8, that has Modbus TCP enabled. > If I can grab some Modbus RTU module from my friends, I will test if is > possible to remote control them via RS-485 bus (I have USB/RS-485 adapters, > CH340 and Prolific 2303 based). > > Off topic? > I'm hardily testing OpenPLC Project runtime for Linux, too ( > http://www.openplcproject.com/getting-started-linux ). > I've succesfully managed to install it in Arch Linux, and I'm using > BeremizIDE to generate the program and export to a .st file required by > this runtime. > > The only previous action I need to upload the program to OpenPLC runtime, > is to change CONFIGURATION config to CONFIGURATION Config0 in > generated_plc.st file. > A little question: is possible to edit this configuration name directly in > BeremizIDE? > > Soon, I will try to run OpenPLC Project runtime in Raspberry Pi, but on > Arch Linux ARM, not on Raspbian. > I wish to use cheap WELLPRO Modbus RTU interfaces in the future (see > http://www.shwellpro.com/products.asp ). > Unfortunately, in OpenPLC v3 there is not a Modbus slave driver available > yet :-( > > Your answers will be welcome! > Best regards. > > > *Daniel [hidden email] <[hidden email]>* > *Cel. +54 9 223 524 2171* > > Beremiz logs > > > Start build in /home/daniel/Beremiz/Programs/ld_test2/build > > Generating SoftPLC IEC-61131 ST/IL/SFC code... > > Compiling IEC Program into C code... > > Extracting Located Variables... > > C code generated successfully. > > PLC : > > [CC] plc_main.c -> plc_main.o > > [CC] plc_debugger.c -> plc_debugger.o > > py_ext : > > [CC] py_ext.c -> py_ext.o > > etherlab_ext : > > [CC] etherlab_ext.c -> etherlab_ext.o > > PLC : > > [CC] config.c -> config.o > > [CC] Res0.c -> Res0.o > > Linking : > > [CC] plc_main.o plc_debugger.o py_ext.o etherlab_ext.o config.o Res0.o -> > ld_test2.so > > Successfully built. > > > PYRO connecting to URI : PYROLOC://127.0.0.1:61334 > > Debugger ready > > Latest build already matches current target. Transfering anyway... > > PLCobject : NewPLC (d792bf5ec10db55c9fdfe5e7071c5b64) > > Transfer completed successfully. > > > CRITICAL at 1970-01-01 00:00:00.000000000: > > Traceback (most recent call last): > > File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC > > self._PLClibraryHandle = dlopen(self._GetLibFileName()) > > OSError: /tmp/tmpmrfrNq/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined > symbol: __IX0_1 > > > > #Launching live Python shell > > > File "/usr/share/beremiz/Beremiz_service.py", line 303, in OnTaskBarStartPLC > > self.pyroserver.plcobj.StartPLC() > > > File "/usr/share/beremiz/runtime/PLCObject.py", line 168, in func_wrapper > > return MainWorker.call(func, *args, **kwargs) > > > File "/usr/share/beremiz/runtime/PLCObject.py", line 80, in do > > self.result = call(*args, **kwargs) > > > File "/usr/share/beremiz/runtime/PLCObject.py", line 518, in StartPLC > > self.LogMessage(0, _("Problem starting PLC : error %d" % res)) > > > TypeError: %d format: a number is required, not NoneType > > > PLCobject : Traceback (most recent call last): > > > File "/usr/share/beremiz/Beremiz_service.py", line 365, in > OnTaskBarWXInspector > > InspectionTool().Show(wnd, True) > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/lib/inspection.py", > line 95, in Show > > app=self._app) > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/lib/inspection.py", > line 151, in __init__ > > style=wx.NO_BORDER, > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/py/crust.py", line > 60, in __init__ > > rootIsNamespace=rootIsNamespace) > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/py/filling.py", line > 294, in __init__ > > wx.FutureCall(1, self.SplitVertically, self.tree, self.text, 200) > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py", line > 16798, in __init__ > > self.Start() > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py", line > 16812, in Start > > self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) > > > File "/usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_misc.py", line 1324, > in Start > > return _misc_.Timer_Start(*args, **kwargs) > > > PyAssertionError: C++ assertion "wxThread::IsMain()" failed at > ./src/common/timerimpl.cpp(60) in Start(): timer can only be started from > the main thread > > > ----------------- > > > #terminal logs > > > /usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629: > UserWarning: wxPython/wxWidgets release number mismatch > > warnings.warn("wxPython/wxWidgets release number mismatch") > > HTTP interface port : 8009 > > Pyro port : 3000 > > Current working directory : /home/daniel > > UI thread started successfully. > > > PLCobject : Traceback (most recent call last): > > File "/usr/share/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC > > self._PLClibraryHandle = dlopen(self._GetLibFileName()) > > OSError: /home/daniel/d792bf5ec10db55c9fdfe5e7071c5b64.so: undefined > symbol: __IX0_1 > > > #Trying to start or stop virtual PLC > > PLC is empty or already started. > > PLC is not started. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremiz-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremiz-devel |
Administrator
|
On 18-07-04 17:32, Mario de Sousa wrote:
> > Hi Daniel, > > I am really pressed for time today, but I can just quickly let you know that > when you map variables to a specific location (%Q0.5.3, ...), then that > location must have been defined by adding, for example, a communication plug-in > (CANfestival, Modbus, ...). > Beremiz has no way of guessing how to map that location to a specific hardware > address. > > I suggest, for a first attempt, you try to run your code without mapping any > variables to locations. > https://bitbucket.org/automforge/beremiz/src/tip/tests/?at=default Most of them are shown on Beremiz YouTube channel: https://www.youtube.com/user/andrewskvortzov/videos?view=0&shelf_id=0&sort=dd -- Best regards, Andrey Skvortsov ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremiz-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremiz-devel |
Dear Mario and Andrey: First, my apologizes for my delayed response. I'm working very hard these days (yesterday 12 hours continuously), an I had no time to carefully read and implement your helpful tips. The only task on Beremiz that I have done is to remove the mapped I/O variables assignement, and relaunching Beremiz_service.py all seem worked fine. Thanks you, very much!!! I will spend more time learning about Beremiz this weekend; soon I will send you an email with my first results. I have a lot of questions to resolve, is there a Beremiz users mail list? I don't want to generate "noise" in your developers list... BTW: some examples may be hard to understand for me, I will try (perhaps Youtube examples will help me) ... @andrey >BTW, does Arch have arm cross-toolchain available (arm-none-linux-gnueabi-gcc)? Yes, of course. Best regards, Daniel Mirkin [hidden email] Cel. +54 9 223 524 2171 El mié., 4 jul. 2018 a las 17:38, Andrey Skvortsov (<[hidden email]>) escribió: On 18-07-04 17:32, Mario de Sousa wrote: ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremiz-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremiz-devel |
Administrator
|
Hi Daniel,
On 18-07-06 10:43, Daniel Mirkin wrote: > Dear Mario and Andrey: > > First, my apologizes for my delayed response. > > I'm working very hard these days (yesterday 12 hours continuously), an I > had no time to carefully read and implement your helpful tips. > The only task on Beremiz that I have done is to remove the mapped I/O > variables assignement, and relaunching Beremiz_service.py all seem worked > fine. > Thanks you, very much!!! > > I will spend more time learning about Beremiz this weekend; soon I will > send you an email with my first results. > I have a lot of questions to resolve, is there a Beremiz users mail list? > I don't want to generate "noise" in your developers list... > BTW: some examples may be hard to understand for me, I will try (perhaps > Youtube examples will help me) ... > > @andrey > >BTW, does Arch have arm cross-toolchain available > (arm-none-linux-gnueabi-gcc)? > Yes, of course. > See https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/ > > Best regards, > > > *Daniel [hidden email] <[hidden email]>* > *Cel. +54 9 223 524 2171* > > > El mié., 4 jul. 2018 a las 17:38, Andrey Skvortsov (< > [hidden email]>) escribió: > > > On 18-07-04 17:32, Mario de Sousa wrote: > > > > > > Hi Daniel, > > > > > > I am really pressed for time today, but I can just quickly let you know > > that > > > when you map variables to a specific location (%Q0.5.3, ...), then that > > > location must have been defined by adding, for example, a communication > > plug-in > > > (CANfestival, Modbus, ...). > > > Beremiz has no way of guessing how to map that location to a specific > > hardware > > > address. > > > > > > I suggest, for a first attempt, you try to run your code without > > mapping any > > > variables to locations. > > > > > > > Beremiz repo contains bunch of examples: > > https://bitbucket.org/automforge/beremiz/src/tip/tests/?at=default > > > > Most of them are shown on Beremiz YouTube channel: > > > > https://www.youtube.com/user/andrewskvortzov/videos?view=0&shelf_id=0&sort=dd > > > > -- > > Best regards, > > Andrey Skvortsov > > > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Beremiz-devel mailing list > > [hidden email] > > https://lists.sourceforge.net/lists/listinfo/beremiz-devel > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Beremiz-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/beremiz-devel -- Best regards, Andrey Skvortsov ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremiz-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremiz-devel |
Free forum by Nabble | Edit this page |