alecar63
Hello,
We would like to port OpenPLC to an embedded system with a PowerQUICC processor and Linux OS with real-time extensions. Is this possible? If yes, what are the necessary steps? What we have in mind is the following:
1) Generate a PLC file (e.g. FBD file) with a graphical editor on Windows PC.
2) Upload this file to the embedded platform.
3) Run this file on embedded platform (Linux would call the PLC interpreter every xx milliseconds).
Our understanding is that the above is feasible with OpenPLC. Is this true? More in detail, does the interpreter (i.e. the PLC 'engine') need to be recompiled along with the PLC file every time so that an executable file is generated or is the interpreter an executable file that processes the PLC file?
Starting from scratch, how long do you think it would take to port OpenPLC (e.g. in terms of months)?

Thanks a lot you for your help [smile]
Alessandro
Reply 0 0
r2k-in-the-vortex
The PLC code is not interpreted, ladder etc are translated to structured text, structured text is translated to c and c is compiled to binary, as long as you have Linux running on the platform you should be able to compile everything. Best way to start is to try to compile and see if anything blows up in your face, there is a good chance that everything will work out of the box and there is nothing to port. I mean if you have Linux running you should already have functional GNU toolchain right?
Reply 0 0
thiagoralves
R2k is right. If your embedded Linux environment has some sort of package manager such as apt, dpkg, yum, etc, just try to install the packages that are mentioned in the Raspberry Pi installation guide on the OpenPLC website. Basically you will need a GCC toolchain, NodeJS, and some compiling tools such as make. If you can install all that, you're good. Just clone OpenPLC repository and launch the build script. It will automatically build everything on your platform. The only thing you'll need to develop later is the hardware layer to enable OpenPLC to talk to your physical I/O on the board.

Happy coding!
Reply 0 0
skv
alecar63 wrote:
Hello,
We would like to port OpenPLC to an embedded system with a PowerQUICC processor and Linux OS with real-time extensions. Is this possible? If yes, what are the necessary steps? What we have in mind is the following:
1) Generate a PLC file (e.g. FBD file) with a graphical editor on Windows PC.
2) Upload this file to the embedded platform.
3) Run this file on embedded platform (Linux would call the PLC interpreter every xx milliseconds).
Our understanding is that the above is feasible with OpenPLC. Is this true? More in detail, does the interpreter (i.e. the PLC 'engine') need to be recompiled along with the PLC file every time so that an executable file is generated or is the interpreter an executable file that processes the PLC file?
Starting from scratch, how long do you think it would take to port OpenPLC (e.g. in terms of months)?

Thanks a lot you for your help [smile]
Alessandro


Hi Alessandro,

if you are going to use it in production, I'd recommend you to use Beremiz (base project for PLCOpenEditor). It already has a lot of features needed for PLC.
- Support of Linux real-time extensions (Xenomai is supported, PREEMPT_RT should work as well (you may need to set right priorities)
- Integrated Online debugging capabilities
- Cross-compilation Support (you don't need toolchain on your target PLC)
- Program simulation using Soft-PLC .

Linux is supported out of the box. Basic stuff (programming, debugging, network protocols) will work out of the box, but as with OpenPLC to control your special hardware you have to write functions to access them.

You can look at it in action on Beremiz youtube channel
https://www.youtube.com/user/andrewskvortzov

On Beremiz website you can look at the list of known already existed Beremiz-based PLCs.
http://www.beremiz.org/apps

Reply 0 0
Reply