VikTan
Posts: 11
Joined: Wed Nov 11, 2015 2:36 pm
Location: Bratislava

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Nov 27, 2015 10:29 am

In this moment none of our boards can't be driven by CODESYS because of this problems with drivers what I wrote before. I tried CODESYS forum, but there is only basic support, eg.
http://forum.codesys.com/viewtopic.php?f=21&t=6494
and same problem also without response
http://forum.codesys.com/viewtopic.php?f=21&t=6546

If anyone can help with it, or have any idea what can direct me, I'll be very grateful.

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Nov 27, 2015 6:53 pm

[quote="VikTan"..If anyone can help with it, or have any idea what can direct me, I'll be very grateful.[/quote]

Ok VinTan. looks that people in CODESYS forum are a bit slow in providing the info you want or it is not the proper thread.
I sujest to write direct to 3S the company that invent CODESYS.
At the end you will find what you are looking for. I understand what is that, but I can not help you on that.

Keep looking on that because CODESYS is a must for automation engineers.
Do not forget if the PLC supports IEC 61131-3 is a success. And CODESYS is a stable platform with a huge installed base.
Do what other manufactures did. Be a CODESYS member as a manufacturer. Then you can support and sell your product trough other channels. You will find recognition.

Now another soluton you have to examine on top of the CODESYS solution is open source program Beremiz (http://www.beremiz.org/).

When I fist started this thread my idea was to use Beremiz with Raspberry. So you could have both hardware and software open source.

I ever use 3 years ago a commercial PLC with Beremiz (Smarteh's MC8)
I still have Smarteh's MC8 in my desk. That was a working comercia PLCBeremiz. Stll is The company has developed it more.

I even had a privet chat with the a great guy Edouard TISSERANT who started Beremiz. High knowledged engineer and whiling to help me.

But that time Beremiz was not fully ready on Smarteh's MC8 and i needed solution fast for the company I am working so I choose CODESYS instead with ABB.

If you look back into this thread there are people that started beremiz with raspberry but then do not know what happened.
Anyway as far as I see koreans started a ne vertion 2 years ago and project is still allive if you see here: http://sourceforge.net/p/beremiz/mailman/beremiz-devel/
Have a look. Beremiz is not a joke ! It is a serius project
Beremiz looks abandonded but it is not
look discutions at: http://sourceforge.net/p/beremiz/mailma ... nth=201511

So I suggest go for Beremiz as well for CODESYS. Whichever comes first. Both environments support all IEC 61131-3 languages

Raspberry is a little miracle and deserves more effort to bring your interfaces into 61131-3 support .
I already use a CODESYS automation in my home. Even my dishwasher is using CODESYS!
So keep trying...

Still what is the suggested price for I/Os?

VikTan
Posts: 11
Joined: Wed Nov 11, 2015 2:36 pm
Location: Bratislava

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Thu Dec 03, 2015 11:53 am

I wrote last Friday at codesys support, some guy tried to help me, now he claim that he writing some document for me how to do that.
After your last reply I install Beremitz only for quick overview, it looks fine. Maybe if I write document with well described SPI communication between our boards and RasPi, those guys can make support for it in Beremitz. For they it will be question of hours, for me question of days or weeks to learn everything around it

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Sun Dec 06, 2015 4:30 pm

VikTan wrote:I wrote last Friday at codesys support, some guy tried to help me, now he claim that he writing some document for me how to do that.
After your last reply I install Beremitz only for quick overview, it looks fine. Maybe if I write document with well described SPI communication between our boards and RasPi, those guys can make support for it in Beremiz. For they it will be question of hours, for me question of days or weeks to learn everything around it
VikTan that is grate news. I went trough my first posts in this tread and saw that my "dream" came true

in 25 Aug 2011 22:26 which was my second post I state about the possibility Beremiz + Raspberry plus CODESYS + Raspberry
So until now
CODESYS ported in Raspberry and works fine
Beremiz ported in Raspberry but i am not sure...(but I thing people in Beremiz and you will make it happen)
But nobody made the hole packet to look what I was dreamed then
I dreamed exactly what you are trying to do.
I am sure at the end you will do Both:
As I see CODESYS ( CODESYS + Raspberry) gets down on bussines with you, BEREMIZ (Beremiz + Raspberry) gets down on bussines with you as well to make a professional working PLC

Community will love it. Everybody will use it at least for Home Automation. I will use it for industrial use as well (despite some arguments).

If you can put Beremiz on that and support it, users will get exited because then the whole packet will be open source. You can still make money making your boards open source. Only visionaries have feature. And thanks God we have a lot on them on this planet!
Go ahead people...and make THIS happen!

thiagoralves
Posts: 8
Joined: Sat Jan 09, 2016 3:45 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Sat Jan 09, 2016 10:59 pm

Hi all,

I found this post online and couldn't refrain from commenting here. I'm the creator of the OpenPLC project. It is basically an effort to create an opensource PLC. Recently I made the OpenPLC software to run on a RaspberryPi board. The results were really good. The application supports ladder logic and MODBUS. If you want to try it out, just go to the openplc website and follow the instructions: http://www.openplcproject.com/#!boards/dfjzr

Please feel free to contact me if you have any suggestions or comments about my project.


Thanks,

Thiago Alves

RubePi
Posts: 14
Joined: Fri Apr 01, 2016 4:51 am
Location: Florida

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Sat Apr 30, 2016 4:34 am

Ok, Nubie alert. (kinda long)
Got the pi2 in Jan. Was working at a bottling plant - operator. Understand programming (hacking around abt 35 yrs)

>>The deal: I am building a working model of a plant with motor controls (Ada 16 i2c pwm pca9685 board), PEs PRX switches, counters, timers et.al. (basically a PLC). We used AB500s w/ ASI comm. I'm using i2c comm.on a RasPi.
I'd like to be able to take this presentation around to High School voc classes to introduce the concepts involved.

To make it interesting it'l have conveyors w/ jam cutoff, Fast catchup, lane switching... machines will be represented by Rube type Great Ball Contraption loops, ferris wheeels, Arc screws etc.
I can write to the PCA9685 registers to control motors, and am now banging my head on tkinter radio buttons to make my Manual HMI work. It will be automated, but all systems need a manual backup!
the electricians considered me a great operator - only called them when I was a) over my head (not afraid to admit) or b) over my pay grade (you're not allowed to open that cabinet.) & I could usually tell them exactly what I needed. I'm not an engineer, but I've fooled a few.

Any way, any guidance, web sites, books (kindle) or other learned thoughts are greatly appreciated. I'll be following this forum.

Thanx,
RubePi - the Rube machine, controlled by Pi project.
-- Jeff

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Tue May 03, 2016 8:27 am

thiagoralves wrote:......Please feel free to contact me if you have any suggestions or comments about my project.......
Congratulations. This is a great project but unless you go on at least with an editor that can write in Function Blocks and in ST language, supporting only ladder in 2016 is a bit difficult if you want to make a complicated program.

So instead redesigning the wheel why don't you join beremiz (http://www.beremiz.org/) project. Last update was in 2012 but it is Free Software with huge capabilities, conforming to IEC-61131 among other standards. .All these are solved there and you can contribute to the open project .

So I would like to know why you reinvent the wheel? If it will be just for fun of programming OK but this will make you stay in the same place...

But this is my opinion...

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Tue May 03, 2016 8:32 am

Hi Jeff

Can you send us a link to see this "RubePi - the Rube machine, controlled by Pi project" ?

Thanks
Bill Vorrias

thiagoralves
Posts: 8
Joined: Sat Jan 09, 2016 3:45 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Wed May 04, 2016 2:49 am

vorrias wrote: ..So instead redesigning the wheel why don't you join beremiz (http://www.beremiz.org/) project. Last update was in 2012 but it is Free Software with huge capabilities, conforming to IEC-61131 among other standards.
I'm trying to work with the Beremiz project for a while. It is really a very nice project. However, the lack of documentation is slowing me down considerably. I still can't understand how to integrate the OpenPLC code with the Beremiz editor. But I haven't given up yet. I'll let you guys know once I have figured it out.

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Wed May 04, 2016 4:08 pm

thiagoralves wrote: I'm trying to work with the Beremiz project for a while. It is really a very nice project. However, the lack of documentation is slowing me down considerably. I still can't understand how to integrate the OpenPLC code with the Beremiz editor. But I haven't given up yet. I'll let you guys know once I have figured it out.
Yes Beremiz project looks dead but I do not think that is the case. Try to make contact with them and join the team. Something good will come out.

Until now IT IS THE ONLY WORKING PROFESSIONAL PLC coding environment TOTALLY FREE and open source as good as CODESYS
There is a Korean version RC5 .
I do not know why Beremiz is not the de-facto free plc coding environment.
One day many people will cooperate to make it happen..
There is no other (free) near close to it

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Wed Jun 01, 2016 11:45 am

Hi people
I have to Inform that user thiagoralves finaly did a grate job integrating Beremiz with Raspberry
Here what he reports:

******************
".....I agreed with your comment, and so for the last 5 months or so I started trying to port the Beremiz editor (aka PLCopen Editor) in order for it to be used with the OpenPLC. I finally succeeded!! The OpenPLC is now a much larger project, supports all the IEC 61131-3 languages, runs on the Raspberry Pi, Arduino, UniPi and also on Windows and Linux PCs and is very easy to install/use.
Check out my website for more information: http://www.openplcproject.com "
****************

ALL OPEN SOURCE. NO LIMITS IN USE
This is grate news . You must try and celebrate.
This is done of course because many people put a lot of work in Beremiz and many more programs
more to come...

ThickCloud12C
Posts: 11
Joined: Tue May 31, 2016 10:20 pm

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Jun 03, 2016 9:54 pm

Here is Python code loaded by A.Ruscito to github that let's you access RA PLC.
You could use it for rpi to read/write to AB PLC via Ethernet/IP

https://github.com/ruscito/pycomm/tree/master/pycomm

ThickCloud12C
Posts: 11
Joined: Tue May 31, 2016 10:20 pm

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Jun 03, 2016 9:55 pm

How do you want to work-out safety aspects with you OpenPLC ? I guess SafetyPLC may be something that may stop you with your project progressing further or maybe you have already overcome this problem somehow ?

thiagoralves
Posts: 8
Joined: Sat Jan 09, 2016 3:45 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Jun 03, 2016 10:29 pm

Safety on PLCs is a topic that deserves a lot of attention. I don't believe I'll be able to simply just solve this problem. But for sure I will use the OpenPLC as my main tool for my cyber security research. Once I realize that the OpenPLC is stable, I will start building the "SecurePLC" on top of that.

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Sun Jun 05, 2016 4:45 pm

thiagoralves Is right. Safety needs a lot of attention and this is not a simple thing. IT IS SAFETY and this is what it must deliver.
To do that as thiagoralves said
Once I realize that the OpenPLC is stable, I will start building the "SecurePLC" on top of that
.
My main job is working in Automation Industry. I work excursively with CODESYS. Actually CODESYS ver 2. The PLC brand we use did not transfer yet to CODESYS ver3. And the reason was that safety was not present to CODESYS ver3 until 2015. Why? becouse safety is a dificult thing and most of all if you make safety you must pass serius expensive tests (if you need to go comercial).
So let see OPENPLC mature first and I am sure we can see incredible things in the process.
So far the only free IDE to compete with CODESYS is BEREMIZ (now editor embeded in OPENPLC). The Actual BEREMIZ project is a bit "underground" at the moment. I do not know why. Instead thiagoralves made a fresh clever start.
I wish to have more programing skils to help you but I am sure a lot of people will embrace this nice project.
So lets stick to RasPi + OPENPLC + BEREMIZ.
Both will make not only the cheapest and highly recognized PLC platform as well.
Think how many people in Africa (and the rest of the world) will not only teach themselves PLC but can make actual working projects without paying anything in program rights. I am sure many of them they will contribute back.
Meanwhile do not forget that doing so we increase creativity and invention as well.
CODESYS and specialy CODESYS ver 3 is a fantastic environment to work. But OPENPLC is for people that love to do extraordinary thinks. Like the guys that made RasPi.

A Greek poet wrote: You wish the road to Ithaki (Ithaki island was the homeland of Odysseus) to be long. Because what mater is the voyage not the destination.

OPENPLC is the voyage . Lets do not care too much about the destination.
Have fun doing beautiful thinks...

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Wed Jun 15, 2016 10:54 am

Hi vitag.
What is actually the status of your board now?
Did you see thiagoralves openplc project? http://www.openplcproject.com/

Looks very nice solution with this BEREMIZ (plcopen) editor + plcopen soft PLC.
Do you think you can make your board compatible with this? On the top of the CODESYS driver you are bulding.
May be it is not as complete as a CODESYS solution but this is completely free spitit and open source plus it in full development.
This will give room for people to evolve with it. It is a working thing!
This will have room for plcopen motion libraries (www.plcopen.org) . I use these libraries with CODESYS 2.2 now in my job as automation eng. with an ABB PLC.

alferrar
Posts: 2
Joined: Thu Jul 07, 2016 1:34 pm

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Jul 15, 2016 2:06 pm

We recently developed a complete software PLC engine (programmable logic controller) for the Raspberry Pi. This engine is called easyLadder.
With easyLadder you can program your Raspberry Pi using ladder logic just like other industrial PLCs. This way it is very simple to develop any automation project with your Raspberry Pi.
You can use Raspberry GPIOS as inputs and outputs, or expand the system with I/O ethernet devices.
A graphical ladder editor is freely provided, running under Microsoft Windows, so you can build your project easily and fast.
A hardware board called RasPICER will be available soon for your industrial projects. This board will include a power manager with a rechargeable 3000 mAh backup battery that allows powering the Raspberry through a standard 12-24VDC industrial power supply. This board includes 8 12-24VDC inputs, 4 transistor outputs, 4 relay outputs, 2 0-20mA analog inputs, 2 0-20mA analog outputs, 1 serial RS232 port and 1 serial RS485 port. It also includes a real time clock (RTC). This board is designed to work with easyLadder or with your custom application (a software library for C and Python is provided).
Complete information available at http://www.ferrariehijos.com/easyLadder

Binarii
Posts: 2
Joined: Fri Nov 25, 2016 9:39 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Fri Nov 25, 2016 9:43 am

Hi all!
Any updates? Want to have news about Beremiz in OpenPLC!
These days we are testing Codesys in RaspberryPi and works fine, but want an OPEN solution!
It is possible to run Ethernet/IP in OpenPLC?

Best Regards

skv
Posts: 1
Joined: Thu Dec 08, 2016 6:51 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Thu Dec 08, 2016 7:22 am

Binarii wrote:Hi all!
Any updates? Want to have news about Beremiz in OpenPLC!
These days we are testing Codesys in RaspberryPi and works fine, but want an OPEN solution!
It is possible to run Ethernet/IP in OpenPLC?

Best Regards
Hi,
I just want to say that Beremiz project is a live. We've fixed tons of bugs in our repo since latest release and working very actively on it now. The next RC installer for Windows is already available here: https://drive.google.com/open?id=0Bwuvg ... UNwM0Z3b0E
But if you want latest version, please take it from our development repository on https://bitbucket.org/skvorl/beremiz/.

Feel free to ask any question regardless Beremiz on our development mailing list (beremiz-devel@lists.sourceforge.net).
You can subscribe to it here https://lists.sourceforge.net/lists/lis ... emiz-devel.

Best Regards

ranpitime
Posts: 73
Joined: Sat Mar 23, 2013 5:21 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Contro

Sun Jan 15, 2017 5:22 pm

Hi,
there is a new Version (3.5.10.0) available which now has additional the posibility to connect the CODESYS Raspberry PI as
Profinet-Device/Slave to a Profinet Master.

BR
ranpitime
Attachments
PNSlave_.jpg
PNSlave_.jpg (38.13 KiB) Viewed 6992 times

ranpitime
Posts: 73
Joined: Sat Mar 23, 2013 5:21 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced

Sat Dec 23, 2017 6:49 am

Hi,
there is a new release of CODESYS on Raspberry PI (3.5SP12)
available which support now the wonderful sense hat too.

And check the example how to access by phython the variables in the plc
https://www.youtube.com/watch?v=R9x-QX28to8

BR
ranpitime
Attachments
CODESYS_SenseHat.jpg
CODESYS_SenseHat.jpg (246.22 KiB) Viewed 5108 times

ranpitime
Posts: 73
Joined: Sat Mar 23, 2013 5:21 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced

Sun Jan 07, 2018 10:16 am

Hi,
an example how to access the plc variables by a OPCUA Client written in python.
(Either running on the same Pi as the plc or running on an remote Pi, both is possible)

https://www.youtube.com/watch?v=nNEAiRywtT0


BR
ranpitime

aagore
Posts: 1
Joined: Sat Feb 17, 2018 12:15 pm

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced

Thu Feb 22, 2018 11:27 am

Excuse me if this question felt off topic, but i am trying to a plc like system using raspberry pi where i can read/write digital input output , i am using CodeSys for this.
But i am stuck at analog input read and write
How can i do this using some other hardware which can make able raspi to read analog input, but then how to use them in CodeSys to take it as analog input.?
I have seen some videos on external input module can be used (backoff ethercat) for digital input output. But i don find same for it analog input.
What should i do to do my project ?
Should i use CodeSys for raspi..?
Should i use external input output module with raspi.?
Should i make control system using Python programming.?(i am new to programming)
Or should use some kind of low cost small plc like velocio ?

ranpitime
Posts: 73
Joined: Sat Mar 23, 2013 5:21 am

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced

Tue Apr 24, 2018 12:11 pm

Hi,
sure you could use any Beckhoff Analog Input terminal (or any other manufacturer of this industrial slave devices) for doing this.
So you need EK1100 and EL3061 connect them to the Ethercat Master, that's it.
See the faq how to start with this:
https://faq.codesys.com/display/CDSFAQ/Raspberry+-+FAQ


BR
ranpitime
Attachments
PI_CODESYS_PLC.jpg
PI_CODESYS_PLC.jpg (103.7 KiB) Viewed 4031 times

vorrias
Posts: 65
Joined: Mon Aug 15, 2011 3:31 pm
Location: Greece
Contact: Skype

Re: Turn Raspberry Pi into a P.L.C (Programable Logic Controller) Advanced

Tue Apr 24, 2018 2:18 pm

On top of what :@ranpitime suggested I use a lot Berghof's EtherCat modules for industrial use (ECC DIO / ECC AIO).
https://www.berghof-automation.com/en/p ... -dio-1616/

It is the cheapest Input output EtherCat module in the market . Works like a charm with Raspberry and CODESYS on it.
I fact we are using Raspberry as a backup device running a hole machine 2 x axis motion with 2 x 15KW heavy duty drives with servomotors from Control Technics. Drives have EtherCat cards on them
Everything is controlling with this litle thing (Raspberry) running CODESYS 3.
I advice to put a USB to Ethernet adaptor and use this port as the EtherCat master connection
To this moment Raspberry & CODESYS is the best combination in the market. It is a serous platform!
Also what CODESYS visualization can do looks impossible to imagine (after some digging of course)

Return to “Other projects”