[Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

Daniel Mirkin
Dear Andrey:

I have installed Beremiz_service onto Raspbian Stretch Lite (non GUI) in an old Raspberry Pi 1B (512 MB RAM).

I have previously installed all its required dependencies: python pyro python-nevow python-zeroconf.
I've created /beremiz, /beremiz/images/ , /beremiz/runtime/ , /beremiz/util/ , and /beremiz/service (for working directory).
Then I copied, from my Beremiz install on Arch Linux to RPi /home/pi/beremiz directories, all the files listed in /beremiz/runtime_files.list, adding xenomai.py to /beremiz/runtime (now required by Beremiz_service.py).

I compiled and saved my test program stating URI_location: PYRO://192.168.0.50:3000.
<code>
Start build in /home/daniel/Beremiz/Programs/LD_TEST3/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
PLC :
   [CC]  Config0.c -> Config0.o
   [CC]  Res0.c -> Res0.o
Linking :
   [CC]  plc_main.o plc_debugger.o Config0.o Res0.o -> LD_TEST3.so
Successfully built.
</code>

Finally I've launched Beremiz_service:
pi@raspberrypi:~/beremiz $ python Beremiz_service.py -p 3000 -i 192.168.0.50 -x 0 -a 1 ~/beremiz/service HTTP interface port : 8009 Pyro port : 3000 Current working directory : /home/pi/beremiz/service UI thread started successfully.

PLC IS STOPPED

But when I try to transfer the compiled program to RPi from the BeremizIDE running in my Arch Linux, stating URI_location: PYRO://192.168.0.50:3000, I receive this error log:

PLCobject : NewPLC (bb86ff70fbd82812ccda54c558a74257)
PLCobject : Traceback (most recent call last):
  File "/home/pi/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC
    self._PLClibraryHandle = dlopen(self._GetLibFileName())
OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so: wrong ELF class: ELFCLASS64

My program is a very simple TON/TOF flip-flop, I've NOT asigned any input/output to real inputs/outputs in RPi, so those I/O declared in my program are all Local (thus, only internal variables, if I'm not wrong) for test and debug purposes.

Or the clue is the last line in log?
OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so: wrong ELF class: ELFCLASS64

User program for RPi must be compiled in BeremizIDE running in RPi Raspbian OS, so generated .so file matchs architecture and bitness? BTW: I have not knowledge on cross-compilation :-(

This will lead in that I will have to install a GUI (xorg and a minimal WM like dwm or spectrwm, to not "inflate" RAM and SD usage), and then install the complete Beremiz suite.
Also, perhaps I could have to install some VNC server (realvnc-vnc-server, tigervnc-standalone-server, tightvncserver) to allow remote programming from another computer.

But I want to maintain Raspbian at the bare minimum, if possible!

Lately, I want to add Modbus RTU support to my programs in RPi (I don't know if Beremiz really have this module, I supose it does for Modbus TCP).

Your answers and tips will be welcome!
Best regards,

Daniel Mirkin
[hidden email]
Cel. +54 9 223 524 2171

------------------------------------------------------------------------------
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
skv
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

skv
Administrator
On 18-07-19 13:01, Daniel Mirkin wrote:

> Dear Andrey:
>
> I have installed Beremiz_service onto Raspbian Stretch Lite (non GUI) in an
> old Raspberry Pi 1B (512 MB RAM).
>
> I have previously installed all its required dependencies: python pyro
> python-nevow python-zeroconf.
> I've created /beremiz, /beremiz/images/ , /beremiz/runtime/ ,
> /beremiz/util/ , and /beremiz/service (for working directory).
> Then I copied, from my Beremiz install on Arch Linux to RPi /home/pi/beremiz
> directories, all the files listed in /beremiz/runtime_files.list, adding
> xenomai.py to /beremiz/runtime (now required by Beremiz_service.py).
>
> I compiled and saved my test program stating URI_location: PYRO://
> 192.168.0.50:3000.
> <code>
> Start build in /home/daniel/Beremiz/Programs/LD_TEST3/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
> PLC :
>    [CC]  Config0.c -> Config0.o
>    [CC]  Res0.c -> Res0.o
> Linking :
>    [CC]  plc_main.o plc_debugger.o Config0.o Res0.o -> LD_TEST3.so
> Successfully built.
> </code>
>
> Finally I've launched Beremiz_service:
> pi@raspberrypi:~/beremiz $ python Beremiz_service.py -p 3000 -i
> 192.168.0.50 -x 0 -a 1 ~/beremiz/service HTTP interface port : 8009 Pyro
> port : 3000 Current working directory : /home/pi/beremiz/service UI thread
> started successfully.
>
> I can see at http://192.168.0.50:8009/
> PLC IS STOPPED
>
> But when I try to transfer the compiled program to RPi from the BeremizIDE
> running in my Arch Linux, stating URI_location: PYRO://192.168.0.50:3000, I
> receive this error log:
>
> PLCobject : NewPLC (bb86ff70fbd82812ccda54c558a74257)
> PLCobject : Traceback (most recent call last):
>   File "/home/pi/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC
>     self._PLClibraryHandle = dlopen(self._GetLibFileName())
> OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so:
> wrong ELF class: ELFCLASS64
>
> My program is a very simple TON/TOF flip-flop, I've NOT asigned any
> input/output to real inputs/outputs in RPi, so those I/O declared in my
> program are all Local (thus, only internal variables, if I'm not wrong) for
> test and debug purposes.
>
> Or the clue is the last line in log?
> OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so:
> wrong ELF class: ELFCLASS64
>
> User program for RPi must be compiled in BeremizIDE running in RPi Raspbian
> OS, so generated .so file matchs architecture and bitness? BTW: I have not
> knowledge on cross-compilation :-(
>
> This will lead in that I will have to install a GUI (xorg and a minimal WM
> like dwm or spectrwm, to not "inflate" RAM and SD usage), and then install
> the complete Beremiz suite.
> Also, perhaps I could have to install some VNC server
> (realvnc-vnc-server, tigervnc-standalone-server, tightvncserver) to allow
> remote programming from another computer.
No, you don't need GUI on RPi.


> But I want to maintain Raspbian at the bare minimum, if possible!
>
> Lately, I want to add Modbus RTU support to my programs in RPi (I don't
> know if Beremiz really have this module, I supose it does for Modbus TCP).
>
> Your answers and tips will be welcome!
> Best regards,

Hi Daniel,

apparently you compiled your PLC program for amd64 architecture, for
your host machine.
Beremiz project contains settings for settings compiler and
linker. You have to use cross-compiler here. Something like 'arm-linux-gnueabi(hf)-gcc'
instead of default 'gcc'. That's it.
This is why I asked you about existance of ARM cross-compiler on Arch.

I think Mario's Modbus extension does have support for Modbus RTU as
well as for Modbus TCP (master and slave).

There is plan to implement native(remote) compilation, but I can't say
where it will be.

--
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

signature.asc (849 bytes) Download Attachment
skv
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

skv
Administrator
On 18-07-20 13:21, Daniel Mirkin wrote:

> Hi Andrey,
>
> *About compiling for Raspbian on RPI:*
> You're right: I've compiled using gcc for amd64. My fault!
>
> <quote myself>
> BTW: I have not knowledge on cross-compilation :-(
> </quote myself>
>
> I have searched in Arch Linux repository and only have found
> aarch64-linux-gnu-gcc - The GNU Compiler Collection - cross compiler for
> ARM64 target; my Raspbian Stretch target is 32 bit.
> In the other hand, arm-none-eabi-gcc 8.1.0-1 is the cross compiler for ARM
> EABI (bare-metal) target; is it not Linux target? It pulls
> arm-none-eabi-binutils as dependency (linker?).
> I don't know if it can compile for Linux (Raspbian) on armhf. I will
> install it and try...
>
> How to set another installed compiler in Beremiz, for target Linux running
> on ARMv6hf?
> Perhaps a full path explicity declared in Project > Config > Target Type -
> Linux > Compiler and  > Linker?
> Could you confirm this?
yes, this should work. I usually put cross-compiler in user's PATH and
put in project settings just the name of compiler.

> *BTW: I'm not sure if this is the way to compile for Raspbian running on
> ARMv6 (armhf 32 bit, hardware floating point) in Arch Linux; <quote myself>
> again...*
This is why I asked you about existance of prebuilt cross-compiler in
Archi. We've done recently similar things on Ubuntu without any
problem. It does support multilib and cross-compiler are available
from repo. The same is of course for Debian.

>
> *However, Raspbian has gcc for ARMv6: gcc-arm-linux-gnueabihf/stable
> 5.2.1-14+really5.2.1-13cross1 all - GNU C cross-compiler for architecture
> armhf.*
> I will install xorg-server, gcc-arm-linux-gnueabihf and the complete
> Beremiz suite in my RPi 1B, and try to program, debug and compile directly
> on it.
>
> Another bennefit of this aproach: due a mismatch of versions between wxgtk3
> 3.0.4-1 and python2-wxpython3 3.0.2.0-1 in Arch Linux, launching Beremiz
> various issues arise:
> daniel@hardwork beremiz]$ python2 Beremiz.py
> /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")
This is because wxpython is built against 3.0.2 and wxgtk3 is
3.0.4. Package maintainers of python2-wxpython3 should accordingly
update the package.

> Perhaps due this mismatch, BeremizIDE on Arch Linux does not show buttons
> for add graphical objects in Buttons Bar: I have to add program objects by
> means contextual menu: right click > Add > [Block, Variable, Connection,
> language objects, Comments].
> It also does not properly show the graphic time scales in Debugger (they
> are present but hided, only one scale is showed when cursor hover it,
> blinking all the time at task cycle interval).
>
> This issues apparently can not be solved in Arch, neither by searching
> through Arch old archives: wxgtk3 3.02 does not longer exists,
> python2-wxpython3 never reached 3.0.4...
> (I know, I know: Debian stable hasn't those colissions).
Unfortunately the reason for that seems to be switching to gtk3+
backend for wxPython. On Debian Testing I see the same
problems. Couple of them I fixed, I just have to find some time to
look at others.

 
> I hope that when I have running BeremizIDE on Raspbian Stretch, those
> graphical glitches does not arise ;-)

>
> *About Modbus RTU support:*
>
> I have tried, adding Modbus support > Modbus RTU Client > Modbus Request
> for Digital Inputs and Digital Outputs.
> Then, I have assigned its addresses in Config0.Res0, using buttons in
> Location fields >Browse Location dialog.
> Finally, I have tried to compile, and found this error log:
> <code>
> /home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c:28:10: fatal error:
> mb_slave_and_master.h: No such file or directory
>  #include "mb_slave_and_master.h"
>           ^~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> "gcc" -c "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c" -o
> "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.o" -O2  -fPIC
> -I"/home/daniel/Beremiz/beremiz/../Modbus"
> exited with status 1 (pid 4064)
> C compilation of MB_0.c failed.
> C Build failed.
> </code>
>
> I don't see any mb_slave_and_master.h in my system.
> sudo find / -iname mb_slave_and_master.h > No results.
>
> So, I've downloaded Mario's Modbus extension from Bitbucket.
> How to add it to Beremiz? Is necessary to declare its files in any
> configuration?
The problem is here, that compiler (gcc) can't find headers (*.h
files) for Modbus library, that is used by this extensions. This is because the
library and headers are not installed in the system.

You can use CFLAGS and LDFLAGS to tell compiler where headers and
library are by using gcc flags:
CFLAGS: -I<path_to_header_files>
LDFLAGS: -L<path_to_library>

 

> Your answers will be welcome!
> Best regards,
>
>
> *Daniel [hidden email] <[hidden email]>*
> *Cel. +54 9 223 524 2171*
>
>
> El vie., 20 jul. 2018 a las 4:42, Andrey Skvortsov (<
> [hidden email]>) escribió:
>
> > On 18-07-19 13:01, Daniel Mirkin wrote:
> > > Dear Andrey:
> > >
> > > I have installed Beremiz_service onto Raspbian Stretch Lite (non GUI) in
> > an
> > > old Raspberry Pi 1B (512 MB RAM).
> > >
> > > I have previously installed all its required dependencies: python pyro
> > > python-nevow python-zeroconf.
> > > I've created /beremiz, /beremiz/images/ , /beremiz/runtime/ ,
> > > /beremiz/util/ , and /beremiz/service (for working directory).
> > > Then I copied, from my Beremiz install on Arch Linux to RPi
> > /home/pi/beremiz
> > > directories, all the files listed in /beremiz/runtime_files.list, adding
> > > xenomai.py to /beremiz/runtime (now required by Beremiz_service.py).
> > >
> > > I compiled and saved my test program stating URI_location: PYRO://
> > > 192.168.0.50:3000.
> > > <code>
> > > Start build in /home/daniel/Beremiz/Programs/LD_TEST3/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
> > > PLC :
> > >    [CC]  Config0.c -> Config0.o
> > >    [CC]  Res0.c -> Res0.o
> > > Linking :
> > >    [CC]  plc_main.o plc_debugger.o Config0.o Res0.o -> LD_TEST3.so
> > > Successfully built.
> > > </code>
> > >
> > > Finally I've launched Beremiz_service:
> > > pi@raspberrypi:~/beremiz $ python Beremiz_service.py -p 3000 -i
> > > 192.168.0.50 -x 0 -a 1 ~/beremiz/service HTTP interface port : 8009 Pyro
> > > port : 3000 Current working directory : /home/pi/beremiz/service UI
> > thread
> > > started successfully.
> > >
> > > I can see at http://192.168.0.50:8009/
> > > PLC IS STOPPED
> > >
> > > But when I try to transfer the compiled program to RPi from the
> > BeremizIDE
> > > running in my Arch Linux, stating URI_location: PYRO://192.168.0.50:3000,
> > I
> > > receive this error log:
> > >
> > > PLCobject : NewPLC (bb86ff70fbd82812ccda54c558a74257)
> > > PLCobject : Traceback (most recent call last):
> > >   File "/home/pi/beremiz/runtime/PLCObject.py", line 269, in _LoadPLC
> > >     self._PLClibraryHandle = dlopen(self._GetLibFileName())
> > > OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so:
> > > wrong ELF class: ELFCLASS64
> > >
> > > My program is a very simple TON/TOF flip-flop, I've NOT asigned any
> > > input/output to real inputs/outputs in RPi, so those I/O declared in my
> > > program are all Local (thus, only internal variables, if I'm not wrong)
> > for
> > > test and debug purposes.
> > >
> > > Or the clue is the last line in log?
> > > OSError: /home/pi/beremiz/service/bb86ff70fbd82812ccda54c558a74257.so:
> > > wrong ELF class: ELFCLASS64
> > >
> > > User program for RPi must be compiled in BeremizIDE running in RPi
> > Raspbian
> > > OS, so generated .so file matchs architecture and bitness? BTW: I have
> > not
> > > knowledge on cross-compilation :-(
> > >
> > > This will lead in that I will have to install a GUI (xorg and a minimal
> > WM
> > > like dwm or spectrwm, to not "inflate" RAM and SD usage), and then
> > install
> > > the complete Beremiz suite.
> > > Also, perhaps I could have to install some VNC server
> > > (realvnc-vnc-server, tigervnc-standalone-server, tightvncserver) to allow
> > > remote programming from another computer.
> > No, you don't need GUI on RPi.
> >
> >
> > > But I want to maintain Raspbian at the bare minimum, if possible!
> > >
> > > Lately, I want to add Modbus RTU support to my programs in RPi (I don't
> > > know if Beremiz really have this module, I supose it does for Modbus
> > TCP).
> > >
> > > Your answers and tips will be welcome!
> > > Best regards,
> >
> > Hi Daniel,
> >
> > apparently you compiled your PLC program for amd64 architecture, for
> > your host machine.
> > Beremiz project contains settings for settings compiler and
> > linker. You have to use cross-compiler here. Something like
> > 'arm-linux-gnueabi(hf)-gcc'
> > instead of default 'gcc'. That's it.
> > This is why I asked you about existance of ARM cross-compiler on Arch.
> >
> > I think Mario's Modbus extension does have support for Modbus RTU as
> > well as for Modbus TCP (master and slave).
> >
> > There is plan to implement native(remote) compilation, but I can't say
> > where it will be.
> >
> > --
> > 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
> >
--
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

signature.asc (849 bytes) Download Attachment
skv
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

skv
Administrator
In reply to this post by skv
On 18-07-27 11:26, Daniel Mirkin wrote:

> Dear Andrey:
>
> Thanks you, very much!!!
> hg pull && hg update default
> Your commit is now in my system (Arch Linux), WOW!!!
>
> But executing the same commands in Beremiz installed on my Raspberry Pi,
> nothing was updated :-(
> <code>
> pi@raspberrypi:~/Beremiz/beremiz $ hg pull && hg update default
> pulling from http://dev.automforge.net/beremiz
> real URL is https://hg.beremiz.org/beremiz
> searching for changes
> no changes found
> 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
> </code>
> What I am doing wrong?
You are using slowly updated repository. The main development happens
on bitbucket.org. Beremiz development team's repository is
https://bitbucket.org/automforge/beremiz

hg.beremiz.org/beremiz is more for backup/stable releases and is updated not very
often. Don't use it if you want all latest and greatest like every
Arch user. =)

>
> I wish to test it, and then probably I will write a new article on this in
> Beremiz wiki.
> I'm (slowly) learning on Beremiz, and on hg and git, too.
> I'm not an engineer, nor a technician. Sixty two winters have pased over
> me, but I do not want to say "there is no place for old men" ;-)
>
> OT?
> About my article on Beremiz install on RPi, pushed yesterday to Beremiz
> wiki:
> It doesn't appear on wiki page, yet.
> Please, see my previous email to [hidden email] about
> this issue.
Sorry haven't seen so far, SF has apparently some problems today:
https://sourceforge.net/p/forge/site-support/18210/
https://sourceforge.net/p/forge/site-support/18209/


>
> Perhaps I have made a mistake: in my commit, I've stated DanielH as my name.
> But after this, creating an account in Bitbucket, DanielH name exists, so I
> change my name to DanielArg.
> With this new name and my password, I pushed my article to Beremiz wiki;
> apparently all went well.
> Is this mistake related to the delay on wiki? Or previously it needs to be
> approved by an administrator?
What do you mean by 'pushed to Beremiz wiki'? You don't need to use hg
for wiki and don't need to commit your article. Just edit wiki page
online. Here is link to Beremiz wiki:

https://bitbucket.org/automforge/beremiz/wiki/


> BTW: you have send me a personal email on this topic (Modbus), too.
> I very, very appreciate your gentleness, but I'm confused, due your
> previous solicitude on to use [hidden email] to share
> news and knowledge.
> Could you kindly resend this updated information to beremiz-devel list?
That was my sloppiness, I've bounced it almost immediately to
beremiz-devel and it should appear as SF mail server is up.

> Best regards, and thanks you, again!
>
>
> *Daniel [hidden email] <[hidden email]>*
> *Cel. +54 9 223 524 2171*
>
>
> El vie., 27 jul. 2018 a las 10:09, Andrey Skvortsov (<
> [hidden email]>) escribió:
>
> > On 18-07-20 13:21, Daniel Mirkin wrote:
> > > Hi Andrey,
> > >
> > > *About Modbus RTU support:*
> > >
> > > I have tried, adding Modbus support > Modbus RTU Client > Modbus Request
> > > for Digital Inputs and Digital Outputs.
> > > Then, I have assigned its addresses in Config0.Res0, using buttons in
> > > Location fields >Browse Location dialog.
> > > Finally, I have tried to compile, and found this error log:
> > > <code>
> > > /home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c:28:10: fatal error:
> > > mb_slave_and_master.h: No such file or directory
> > >  #include "mb_slave_and_master.h"
> > >           ^~~~~~~~~~~~~~~~~~~~~~~
> > > compilation terminated.
> > > "gcc" -c "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c" -o
> > > "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.o" -O2  -fPIC
> > > -I"/home/daniel/Beremiz/beremiz/../Modbus"
> > > exited with status 1 (pid 4064)
> > > C compilation of MB_0.c failed.
> > > C Build failed.
> > > </code>
> > >
> > > I don't see any mb_slave_and_master.h in my system.
> > > sudo find / -iname mb_slave_and_master.h > No results.
> > >
> > > So, I've downloaded Mario's Modbus extension from Bitbucket.
> > > How to add it to Beremiz? Is necessary to declare its files in any
> > > configuration?
> > >
> >
> > Daniel,
> >
> > I've added example for Modbus extension. Check it out, it does have
> > small instruction what is necessary.
> >
> >
> > https://bitbucket.org/automforge/beremiz/commits/de3f7c183e62ede05b419d0c740ddf62f633d148
> >
> >
> > > Your answers will be welcome!
> > > Best regards,
> >
> >
> > >
> > > > > Lately, I want to add Modbus RTU support to my programs in RPi (I
> > don't
> > > > > know if Beremiz really have this module, I supose it does for Modbus
> > > > TCP).
> >
> > > > >
> > > > > Your answers and tips will be welcome!
> > > > > Best regards,
> > > >
> > > > Hi Daniel,
> > > >
> > > > apparently you compiled your PLC program for amd64 architecture, for
> > > > your host machine.
> > > > Beremiz project contains settings for settings compiler and
> > > > linker. You have to use cross-compiler here. Something like
> > > > 'arm-linux-gnueabi(hf)-gcc'
> > > > instead of default 'gcc'. That's it.
> > > > This is why I asked you about existance of ARM cross-compiler on Arch.
> > > >
> > > > I think Mario's Modbus extension does have support for Modbus RTU as
> > > > well as for Modbus TCP (master and slave).
> > > >
> > > > There is plan to implement native(remote) compilation, but I can't say
> > > > where it will be.
> > > >
> > > > --
> >
> > --
> > Best regards,
> > Andrey Skvortsov
> >
--
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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

Daniel Mirkin
Hi Andrey!
Thanks for your tips!

<quote>
What do you mean by 'pushed to Beremiz wiki'? You don't need to use hg
for wiki and don't need to commit your article. Just edit wiki page
online. Here is link to Beremiz wiki:
https://bitbucket.org/automforge/beremiz/wiki/
</quote>

Done!

Best regards,
Daniel Mirkin
[hidden email]
Cel. +54 9 223 524 2171


El vie., 27 jul. 2018 a las 11:56, Andrey Skvortsov (<[hidden email]>) escribió:
On 18-07-27 11:26, Daniel Mirkin wrote:
> Dear Andrey:
>
> Thanks you, very much!!!
> hg pull && hg update default
> Your commit is now in my system (Arch Linux), WOW!!!
>
> But executing the same commands in Beremiz installed on my Raspberry Pi,
> nothing was updated :-(
> <code>
> pi@raspberrypi:~/Beremiz/beremiz $ hg pull && hg update default
> pulling from http://dev.automforge.net/beremiz
> real URL is https://hg.beremiz.org/beremiz
> searching for changes
> no changes found
> 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
> </code>
> What I am doing wrong?
You are using slowly updated repository. The main development happens
on bitbucket.org. Beremiz development team's repository is
https://bitbucket.org/automforge/beremiz

hg.beremiz.org/beremiz is more for backup/stable releases and is updated not very
often. Don't use it if you want all latest and greatest like every
Arch user. =)

>
> I wish to test it, and then probably I will write a new article on this in
> Beremiz wiki.
> I'm (slowly) learning on Beremiz, and on hg and git, too.
> I'm not an engineer, nor a technician. Sixty two winters have pased over
> me, but I do not want to say "there is no place for old men" ;-)
>
> OT?
> About my article on Beremiz install on RPi, pushed yesterday to Beremiz
> wiki:
> It doesn't appear on wiki page, yet.
> Please, see my previous email to [hidden email] about
> this issue.
Sorry haven't seen so far, SF has apparently some problems today:
https://sourceforge.net/p/forge/site-support/18210/
https://sourceforge.net/p/forge/site-support/18209/


>
> Perhaps I have made a mistake: in my commit, I've stated DanielH as my name.
> But after this, creating an account in Bitbucket, DanielH name exists, so I
> change my name to DanielArg.
> With this new name and my password, I pushed my article to Beremiz wiki;
> apparently all went well.
> Is this mistake related to the delay on wiki? Or previously it needs to be
> approved by an administrator?
What do you mean by 'pushed to Beremiz wiki'? You don't need to use hg
for wiki and don't need to commit your article. Just edit wiki page
online. Here is link to Beremiz wiki:

https://bitbucket.org/automforge/beremiz/wiki/


> BTW: you have send me a personal email on this topic (Modbus), too.
> I very, very appreciate your gentleness, but I'm confused, due your
> previous solicitude on to use [hidden email] to share
> news and knowledge.
> Could you kindly resend this updated information to beremiz-devel list?
That was my sloppiness, I've bounced it almost immediately to
beremiz-devel and it should appear as SF mail server is up.

> Best regards, and thanks you, again!
>
>
> *Daniel [hidden email] <[hidden email]>*
> *Cel. +54 9 223 524 2171*
>
>
> El vie., 27 jul. 2018 a las 10:09, Andrey Skvortsov (<
> [hidden email]>) escribió:
>
> > On 18-07-20 13:21, Daniel Mirkin wrote:
> > > Hi Andrey,
> > >
> > > *About Modbus RTU support:*
> > >
> > > I have tried, adding Modbus support > Modbus RTU Client > Modbus Request
> > > for Digital Inputs and Digital Outputs.
> > > Then, I have assigned its addresses in Config0.Res0, using buttons in
> > > Location fields >Browse Location dialog.
> > > Finally, I have tried to compile, and found this error log:
> > > <code>
> > > /home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c:28:10: fatal error:
> > > mb_slave_and_master.h: No such file or directory
> > >  #include "mb_slave_and_master.h"
> > >           ^~~~~~~~~~~~~~~~~~~~~~~
> > > compilation terminated.
> > > "gcc" -c "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.c" -o
> > > "/home/daniel/Beremiz/Programs/LD_TEST3/build/MB_0.o" -O2  -fPIC
> > > -I"/home/daniel/Beremiz/beremiz/../Modbus"
> > > exited with status 1 (pid 4064)
> > > C compilation of MB_0.c failed.
> > > C Build failed.
> > > </code>
> > >
> > > I don't see any mb_slave_and_master.h in my system.
> > > sudo find / -iname mb_slave_and_master.h > No results.
> > >
> > > So, I've downloaded Mario's Modbus extension from Bitbucket.
> > > How to add it to Beremiz? Is necessary to declare its files in any
> > > configuration?
> > >
> >
> > Daniel,
> >
> > I've added example for Modbus extension. Check it out, it does have
> > small instruction what is necessary.
> >
> >
> > https://bitbucket.org/automforge/beremiz/commits/de3f7c183e62ede05b419d0c740ddf62f633d148
> >
> >
> > > Your answers will be welcome!
> > > Best regards,
> >
> >
> > >
> > > > > Lately, I want to add Modbus RTU support to my programs in RPi (I
> > don't
> > > > > know if Beremiz really have this module, I supose it does for Modbus
> > > > TCP).
> >
> > > > >
> > > > > Your answers and tips will be welcome!
> > > > > Best regards,
> > > >
> > > > Hi Daniel,
> > > >
> > > > apparently you compiled your PLC program for amd64 architecture, for
> > > > your host machine.
> > > > Beremiz project contains settings for settings compiler and
> > > > linker. You have to use cross-compiler here. Something like
> > > > 'arm-linux-gnueabi(hf)-gcc'
> > > > instead of default 'gcc'. That's it.
> > > > This is why I asked you about existance of ARM cross-compiler on Arch.
> > > >
> > > > I think Mario's Modbus extension does have support for Modbus RTU as
> > > > well as for Modbus TCP (master and slave).
> > > >
> > > > There is plan to implement native(remote) compilation, but I can't say
> > > > where it will be.
> > > >
> > > > --
> >
> > --
> > Best regards,
> > Andrey Skvortsov
> >

--
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
skv
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

skv
Administrator
On 18-07-27 13:31, Daniel Mirkin wrote:

> Hi Andrey!
> Thanks for your tips!
>
> <quote>
> What do you mean by 'pushed to Beremiz wiki'? You don't need to use hg
> for wiki and don't need to commit your article. Just edit wiki page
> online. Here is link to Beremiz wiki:
> https://bitbucket.org/automforge/beremiz/wiki/
> </quote>
>
> Done!
> See
> https://bitbucket.org/automforge/beremiz/wiki/How%20to%20install%20and%20run%20Beremiz%20in%20RPi%20Raspbian%20Lite
Good job, Daniel!


--
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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

Daniel Mirkin
Hi Andrey,

Thanks you!
I think Beremiz Team and you are doing a very good job.

My article is only a humble collaboration (to be continued).
BTW: I have to improve my Markdown syntax...

Best regards,

Daniel Mirkin
[hidden email]
Cel. +54 9 223 524 2171


El vie., 27 jul. 2018 a las 15:26, Andrey Skvortsov (<[hidden email]>) escribió:
On 18-07-27 13:31, Daniel Mirkin wrote:
> Hi Andrey!
> Thanks for your tips!
>
> <quote>
> What do you mean by 'pushed to Beremiz wiki'? You don't need to use hg
> for wiki and don't need to commit your article. Just edit wiki page
> online. Here is link to Beremiz wiki:
> https://bitbucket.org/automforge/beremiz/wiki/
> </quote>
>
> Done!
> See
> https://bitbucket.org/automforge/beremiz/wiki/How%20to%20install%20and%20run%20Beremiz%20in%20RPi%20Raspbian%20Lite

Good job, Daniel!


--
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
skv
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

skv
Administrator
In reply to this post by skv
Hi Daniel,

On 18-07-20 13:21, Daniel Mirkin wrote:

> Hi Andrey,
>
> Another bennefit of this aproach: due a mismatch of versions between wxgtk3
> 3.0.4-1 and python2-wxpython3 3.0.2.0-1 in Arch Linux, launching Beremiz
> various issues arise:
> daniel@hardwork beremiz]$ python2 Beremiz.py
> /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")
> Perhaps due this mismatch, BeremizIDE on Arch Linux does not show buttons
> for add graphical objects in Buttons Bar: I have to add program objects by
> means contextual menu: right click > Add > [Block, Variable, Connection,
> language objects, Comments].
> It also does not properly show the graphic time scales in Debugger (they
> are present but hided, only one scale is showed when cursor hover it,
> blinking all the time at task cycle interval).
>
> This issues apparently can not be solved in Arch, neither by searching
> through Arch old archives: wxgtk3 3.02 does not longer exists,
> python2-wxpython3 never reached 3.0.4...
> (I know, I know: Debian stable hasn't those colissions).
>
with recent commits I fixed some GTK3+ related issues. Now it's much
more usable. Could you try
latest version, probably your problem will be fixed.
In Wayland there are some minor glitches, but I'm not sure that is
Beremiz's problem and not Wayland's, wxPython's or GTK3+.
In GNOME on Xorg Beremiz works OK.

--
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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Beremiz-devel] Running Beremiz_service in Raspbian on an old RPI model 1B

Daniel Mirkin
Hi Andrey!

Thanks you, very much!
Your work is excelent!
hg pull && hg update default whith your recent commits, and BeremizIDE issues on Arch Linux are gone!

I can see and use all the icons in Program toolbar, and Debugger time scales doesn't flicker anymore.
Evidently, issues encountered running BeremizIDE on Arch Linux were not strictly related with the mismatch of versions between wxgtk3 > 3.0.4-1 and python2-wxpython3 3.0.2.0-1.
BTW: I'm using Xorg, not Wayland, and LXQt DE.

OT?
Yesterday I've found in AUR, and then installed in my Arch (after hours and hours compiling):
arm-linux-gnueabihf-gcc 8.1.0-1 - GNU Compiler Collection (arm-linux-gnueabihf)
arm-linux-gnueabihf-glibc 2.27-3 - GNU C Library (arm-linux-gnueabihf)
arm-linux-gnueabihf-binutils 2.30-4 - Set of programs to assemble and manipulate binary and object files (arm-linux-gnueabihf)

I will try to cross-compile for RPi in my Arch (x86_64) and I will report you my results in a new thread.

Best regards,

Daniel Mirkin
[hidden email]
Cel. +54 9 223 524 2171


El mié., 1 ago. 2018 a las 7:24, Andrey Skvortsov (<[hidden email]>) escribió:
Hi Daniel,

with recent commits I fixed some GTK3+ related issues. Now it's much
more usable. Could you try
latest version, probably your problem will be fixed.
In Wayland there are some minor glitches, but I'm not sure that is
Beremiz's problem and not Wayland's, wxPython's or GTK3+.
In GNOME on Xorg Beremiz works OK.

--
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