Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

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

Tue Sep 20, 2011 7:42 pm

Quote from thepanoguy on September 16, 2011, 06:34
Where is your business plan?
Who is your target market?


Why does one need a "business plan" unless you're going to be selling the devices in question?


Where are the electrical and electronic specifications for your product?
Who is financing the design, manufacturing and sales?


Okay...you're pushing this a bit outside of the realm of something that belongs on an educational foundation's discussion forum.

There's professional quality and then there's what you're talking to. If someone wants to take and run with what we end up with and commercially support it- that would be the when YOUR questions should be asked. The big burning question I have is WHY are you making a big deal out of those details when they're absolutely NOT RELEVANT for this situation?

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

Wed Sep 21, 2011 10:28 am

@Svartalf I agree with you. May be @thepanoguy diot our point that this project will end up with a device that among using it as a file server, you can use it as an educational tool, you can us it as an alarm system, you can use it as a PLC, you can use it as... and the list goes on.
So yes @thepanoguy all you are saying are nice thing when it comes to an industrial grade PLC we want to but it on the market. At least my intention was not that. It was (and still is) to create an interest (a momentum) , to build a PLC with this little board using ARM power something really practical for many DIY people. People that start owning R-Pi the will have one more reason to have one.
My intention is not to produce a competitive PLC for marketing to industry. But a challenge to build one with R-Pi which is very processional and very low powered. To be able to do everything a real PLC can do (at least in the application level) Not in the industrial robustness.
Ok I admit it. If Beremiz was not existed this R-Pi PLC project could not started at all. Because here I am not talking to make a controller that controls outside world straight from C. This is easy to do. Arduino does it and so R-Pi will do it in the future. In my case R-Pi PLC must run PLC ladder plus HMI and more...
As I told you in a previous post a PLC vendor the Slovenian company http://www.smarteh.si a year ago tried to port Beremiz into their PLC. And yes after a year these guys they did it in their MC8 CPU. It is an industrial grade PLC with everything on it. Programs are written with Beremiz, CPU has CAN bus, Ethernet, ModeBus TCP/IP, RS485, USB !. and very low priced.
Now with R-Pi we are not making a competitive product but back home we can have with R-Pi the same programing studio Beremiz. Technical students can run and feel what a real PLC does, working with their favorite Raspberry board TOGETHER with some I/O boards plugged into R-PI . Make some DIY projects and when they want a real industrial grade PLC go to Smarteh and buy one. You will use the same software. Only change the table with inputs and outputs.
When Beremiz gets a spin off companies like Smarteh will have a better luck of selling their products because more people know Beremiz and engineers with give a vote to this FREE programming studio. And above all Beremiz is open so no rights attached, making the final product attractive in price.
So lets try to port it into R-Pi. Still we can talk any better idea.

thepanoguy
Posts: 17
Joined: Mon Sep 12, 2011 1:59 pm

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

Fri Sep 23, 2011 5:01 am

Electricity kills people.

All I am reading on this thread is that a group of people are trying to circumvent the European Union electrical specifications.

PLC’s are an electrical product designed to interface into mains operated electrical products. A security system is not by definition a PLC, nor is a server or any other electronic device that switches low voltage. ie model railway.

Maybe the people who are persistently trying to design a PLC should do some research into the European Union electrical specifications for PLC’s. The same electrical specifications are recognised worldwide by countries adhering by the same electrical standards.

http://www.elotouch.com/Produc.....encies.asp
A European Directive is a regulation imposed by the European Union, which supersedes the regulations of the member states.

The LVD (73/23/EEC) defines mechanical and electrical protection requirements relating to the safe use of electrical equipment operating between 50 and 1000 VAC, and between 75 and 1500 VDC.

The EMC Directive (86/361/EEC) defines protection requirements relating to electromagnetic compatibility. Conformance" which accompanies the product packing information. The Directive may or may not require verification by a Notified Body. The LVD, EMC and MDD Directives permit products to indicate conformity by the CE mark. MDD products may also require a Notified Body mark.

Smarteh EC Declaration of Conformity All
http://www.smarteh.si/en/suppo.....t-overview
http://www.smarteh.si/en/suppo.....rtificates
The Smarteh EC Declaration of Conformity is a statutory declaration that all products manufactured by Smarteh are manufacture compliant with European Union directives and CENELEC objectives.

http://www.cenelec.eu/

CENELEC is the European Committee for Electro-technical Standardization and is responsible for standardization in the electro-technical engineering field. CENELEC prepares voluntary standards, which help facilitate trade between countries, create new markets, cut compliance costs and support the development of a Single European Market.

CENELEC creates market access at European level but also at international level, adopting international standards wherever possible, through its close collaboration with the International Electro-technical Commission (IEC).

Created in 1906, the IEC is the world's leading organization that prepares and publishes International Standards for all electrical, electronic and related technologies collectively known as "electro-technology". In principle, most IEC standards are implemented as European and national standards in Europe.

In order to facilitate a consensus-finding process between European and international standards development activities in the electrical sector, CENELEC and IEC formalised the framework of their cooperation through the signature of an 'agreement on common planning of new work and parallel voting', known as the Dresden Agreement.

http://ec.europa.eu/enterprise.....dex_en.htm

http://www.incompliancemag.com.....;Itemid=19

http://export.gov/europeanunio...../index.asp

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

Fri Sep 23, 2011 12:53 pm

@thepanoguy all you say are correct. I agree on what you say about safety and standards in the PLC world. How many times I have to say!. My intention was not to make a commercial PLC. The are very good vendors for that. Not necessary giants nor expensive either.
I Know exactly what PLC is. In fact I am a PLC programmer for years now.
But knowing the effort done with the open source project Beremiz that "typical converts any PC into PLC" it was a nice challenge to try this with R-Pi. When the project succeeds we are going to have an excellent learning packet to technical students. These guys will have a R-Pi anyway. So it is a nice addition when somebody purchase a R-Pi to have for free a PLC controller too. Yes my advice is not to us it in avionics nor in a nuclear power plant.
I know Smarteh is a very nice and promising company. I like them . In fact I am ready to try their products. They did a fantastic job embedding Beremiz into their MC8 CPU. In fact I convinced that R-Pi PLC + Beremiz will help them. They tried the hard way and invest in Beremiz. It took time but now they have all the advantages of having a robust, not expensive product and above all they have Know how!
So we are talking for two different products. Ours IS NOT a commercial robust PLC. We are NOT going to shell it as a PLC!. But still this will be a Programmable Logic Controller. Ok lets say a "SOFT PLC" because will emulate a "PLC" (still no commercial though) . May be this document from OPENPLC org brings some light to anybody interested.
http://dl.dropbox.com/u/286265.....puters.pdf

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

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

Fri Sep 23, 2011 1:29 pm

Panoguy, I think you need to step off the soap box and re-read the posts. You're still the only person in this thread who has suggested using this product commercially. Even Diggy has only been discussing about using it on machines that he himself created.

Acting like you're the only person who understands the dangers of that electricity can bring and treating everyone else like children is more than a little patronizing.

The goal of this project is to provide hobbyist with a full PLC grade option to drive whatever they want as well as provide students learning PLCs with an option that won't cost $400 just so they can try and learn some basic PLC coding.

You're the only one trying to push this further and you're the only one freaking out about how far you're trying to push it. Just relax and join the discussion back where it's at, you obviously know about PLCs and you undoubtedly have some worthwhile input to provide if you'd just stop trying to make this more than what it actually is.
Dear forum: Play nice ;-)

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

Fri Sep 23, 2011 2:42 pm

Yes this is the idea abishur. And thepanoguy I know you have good intention of writing all these. At the end of the project even people having close connection with automation like me, will learn a lot of new things because nobody knows everything. I think with your knowledge you can offer a lot to our effort using R-Pi as a PLC. I evolved with computers and controllers as a profession since 1979 and still one thing I know for sure. NOTHING! this is my change to learn more and to help others too, if I can.
Going back to the beginning of this thread in 29 of August tomm wrote:
Hi All
This is something I have been working on for a while now. I am a hardware design engineer and would love to design some IO boards for the Raspberry PI. Where can I find detailed boards dimension and gpio specs?
That was very satisfying for me. One guy's interest triggered to start creating something. This is good.
So next week I will be able to say some more things about the project. Meanwhile we have to look what other people saying about interfacing R-Pi with the outside world.

sudrienet
Posts: 1
Joined: Mon Oct 03, 2011 11:06 pm

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

Tue Oct 04, 2011 7:48 pm

Hello everybody,
i am very hapy to find this great topic !

@Thepanoguy : I am agree with Vorrias and other guys ; I am an hobbyist and i am sure that i am not the only one here to be interested in the great possibility to linking the R-Pi to a µc board and control & exchange data with the real world via some lot of I/O for a cheap price (100$/€). Aeronuatics & industrial specs are far way from my home project so in my point of view the R-Pi + µc gonna perfectly do the job, for safety i always use opto-isolator or other tricks between logic and power ...

About realtime I don’t remember who said that’s not important to have a realtime on R-Pi but i am disagree. With R-Pi board if i add RTNET & XENOMAI (or an other Rt) i will be able to exchange data on ethernet with a network made of R-Pi board(s) and / or computer(s). It will give me the possibility to try to make some special mix & tests. exemple :  a R-Pi board (rtnet + xenomai) + scilab in order to build a « black box » be able to speak with real word via the µc and exchange data between a network made of other R-Pi board or/ and PC with scilab … It will be easy an cheap for hobbyist or student to buil flex and scalable projects.

From my point of view R-Pi + µc will me more flex, cheap, powerfull, tiny, sustainable (1w) and easier than arduino, beagleboard or other stuff …

Thanks

RichC
Posts: 20
Joined: Thu Jul 28, 2011 9:20 am

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

Wed Oct 05, 2011 10:30 pm

The I/O is key here. An industrial control system needs lots of different I/O types, many systems have a lot of sensors and actuators, and it must be fast and reliable. So you probably need to start with a bus design that can scale up. I2C sounds good but is it fast enough at 100 - 400kHz?

The I/O must also meet a whole range of electrical standards for safety and EMC, for example 1000kV isolation pushes up the price and size of I/O, and you need $$$ to get it tested. Many customers care about safety and reliability so you need to think about watchdogs, redundancy, hot-plugging, reliability and functional safety...

Cool project if you can see it through :)

RIch

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Wed Oct 05, 2011 10:51 pm

Hello, everyone!
I have more modest project then PLC, but it requires watchdog to ensure proper behavior. I was not able to find a Broadcom BCM2835 technical specifications in order to check if the SoC already has watchdog timer - most of the ARM SoC I have seen does include it. Does somebody know for sure if this SoC have or do not have a watchdog timer?

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

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

Thu Oct 06, 2011 2:31 am

I haven't heard anything about a watchdog timer, but I have heard that you should not expect to use the r-pi for extremely precise time applications (especially since the r-pi looses date/time whenever it is turned off)
Dear forum: Play nice ;-)

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Thu Oct 06, 2011 2:07 pm

Watchdog timer is needed not for precise time applications. It simply guarantees that computer will be automatically restarted if software will fail to do some simple task - update a specific register. That guarantees from occasional "freezing out" of the whole computer. It is usually required in cases when human intervention is somewhat hard.

In my case computer(s) will be installed far from any available technician for a significant amount of time. The task of these computers is to collect data and send it to central location. Occasionally we will have thousands of them. We have a solution, but we are always in search for cheaper platforms. But we need to make sure that at least OS is alive, so, I need watchdog timer. And I have seen Ubuntu Linux 9.04 freezing out for unknown (might be hardware) reason. It was doing it occasionally, once in 2 month, but that is unacceptable in my case.

Usually SoC on the base of ARM processors (actually all I have seen) are equipped with watchdog timers. ARM1176 have a lot of references on what and how watchdog timer should affect the processor, but it is up to SoC producer to add a watchdog timer and I cannot find a good description of Broadcom BCM2835.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Thu Oct 06, 2011 2:13 pm

Meanwhile - any PLC should have a watchdog timer.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Thu Oct 06, 2011 11:01 pm

It looks like it have watchdog ... But it can only be confirmed by people who have a Broadcom BCM2835 technical specification on hand. Here is what I found on ARM site for ARM1176JZF:

http://infocenter.arm.com/help.....p0_trm.pdf

They directly mention watchdog there, I found register range, but I cant find a good description how to set the watchdog up.

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

Fri Oct 07, 2011 10:51 am

@tbolsh impressive pdf you found!. But slow down a bit (the info you found still will be important later on) . Before we look for specific R-Pi CPU operations we must first to port an environment for building PLC programs according to PLCOPEN (www.plcopen.org) organization. If we do not succeed that it is no use to talk to use it as a PLC controller EVEN FOR EDUCATIONAL purpose!. I am very clear about that. The product is not intended to be used as a PLC in hush environment for Industrial critical applications. So watch dog time is no use at this moment. Other matters must be solved before. Like the environment, like I/O boards, like drivers, like...)
Of course if you want to build an environment like Arduino has(may be this is another long talk), to be used as a controller it is a different thing. This is something to consider (having in R-Pi a similar environment).
May be it takes time until we have I/O board for R-Pi.
So my intention is very clear. I will say it again: To be able to write PLC programs using the Beremiz studio, or any other known open environment anybody hat to propose. At the end we will be able to write and run professional PLC programs using libraries as composed by OPENPLC organization. Then you can use this as teaching PLCPLC and use it for professional home made applications. At your own risk use it in a spacecraft if you like.
The device will NEVER pass industrial strength standards (At least in this form). THIS IS NOT FOR COMMERCIAL INDUSTRIAL APPLICATIONS
I started using Beremiz with PLC from company Smarteh. I am very satisfied with the support I have from them and my idea was to help others learn OPENPLC using an R-Pi.
I said in the beginning. It is not an easy project. If you want industrial PLC with Beremiz NOW get it from Smarteh. (www.smarteh.si) Brilliant work. (and very nice price)

RichC
Posts: 20
Joined: Thu Jul 28, 2011 9:20 am

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

Fri Oct 07, 2011 12:26 pm

Re watchdog - that datasheet is for an ARM test chip, not an ARM core, and it refers to a watchdog peripheral. There is not a watchdog inside the ARM11 core.

If you need battery backup for the time & date, you could use a real-time clock chip with a watchdog in it.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Fri Oct 07, 2011 3:13 pm

Quote from RichC on October 7, 2011, 13:26
Re watchdog - that datasheet is for an ARM test chip, not an ARM core, and it refers to a watchdog peripheral. There is not a watchdog inside the ARM11 core.


Agreed. So, we need somebody who has the real Broadcom BCM 2835 SoC technical specification. Some SoC producers publish their SoC technical docs freely (like TI), and some other don't. And it looks that Broadcom belongs to the second group. But people who made the R-Pi board suppose to have technical documentation - so, I would like to ask them to open it and to check if it does have watchdog timer. If it does not - it is dead for my project, and, most likely dead as PLC for anything, but educational purposes.
And if it does have it - then at least one requirement for real PLC is satisfied.

I will expect to receive technical documentation for the SoC if I will buy R-Pi. Next week I will try to request this documentation from Broadcom directly. Originally I though that some people on this forum are actual developers of R-Pi board and that they can answer simple binary question - WD: Yes or No.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

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

Fri Oct 07, 2011 5:33 pm

Quote from tbolsh on October 7, 2011, 16:13
If it does not - it is dead for my project, and, most likely dead as PLC for anything, but educational purposes.


Depends on whether you ADD a timer or not. Many PLC systems use an external watchdog setup to ensure you can't turn the thing off (which is possible with most of the on-board ones...)- and be able to do a bit more sophisticated things on a restart.

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

Fri Oct 07, 2011 5:44 pm

Quote from tbolsh on October 7, 2011, 16:13
If it does not - it is dead for my project, and, most likely dead as PLC for anything, but educational purposes.

I agree and it is a good idea to look for technical documentation for the SoC. This info will be useful for some critical applications. But still as you say for educational purposes will be OK.
I do not know I start to think that a similar or better environment like Arduino maybe needed after all .Plus I/O boards. Meanwhile Arduino is ahead some years and preparing an ARM board already. May be that board will offer all the power R-Pi board has to offer. The advantage of Arduino is that is ready with many I/O boards ready to plug in to new powerful design.
So designers must be very careful on what audience R-Pi is for. Maybe they design it for everything except use it as a controller (robotics, automation etc). It is something to be seen.

RichC
Posts: 20
Joined: Thu Jul 28, 2011 9:20 am

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

Fri Oct 07, 2011 8:01 pm

Quote from Svartalf on October 7, 2011, 18:33
Many PLC systems use an external watchdog setup to ensure you can't turn the thing off (which is possible with most of the on-board ones...)- and be able to do a bit more sophisticated things on a restart.

Yes. An external watchdog gives you more control and can be made more resilient. For example if the micro goes into latch-up the watchdog is still okay. It's recommended in the IEC 61508 functional safety standard.

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

Sun Oct 09, 2011 8:59 am

Ok then so it will not be a problem even if no internal watch dog not available inside. This increases costs but anyway there is a way to do it if need it.
Porting a developing studio into an RTlinux (or similar) and having I/O R-Pi boards is the real problem that must be solved. Without these R-Pi PLC project is DEAD. We can not have The R_Pi device to teach technical students how a real PLC works and design real projects with is.
In that case R-Pi can control real world devices with C. Something that Arduino at the moment does it better by far.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Mon Oct 10, 2011 2:59 pm

Quote from vorrias on October 9, 2011, 09:59
Ok then so it will not be a problem even if no internal watch dog not available inside.


From my point of view it is a big and serious problem even if alternative solutions are available - that is why I started all this watchdog conversation. So, it is not Ok and it is a problem - indeed. Moreover when you discuss PLCs and controlling an equipment the attitude should be different comparing to discussion of gaming equipment.

The reason why it is a problem is experience - if you are proposing platform that is handicapped from the very beginning you would not be able to provide decent solution. What I mean - the watchdog requirement will be unavoidable forgotten or not implemented universally, what will lead to continuous repeated support forum threads like "there is no watchdog" - "please use X as watchdog" -" X is unavailable / not applicable" - "then find that out yourself" - "we can't, please help us" - .... And that for years.

Another scenario - you are trying to do a "budget PLC" and finally you are finding out that watchdog for your PLC cost too much (much more then your PLC do) and then it will be not installed and that manifest a serious system deficiency etc.

And I do not understand why developers could not look into the Technical Specification and provide the answer - Yes or No. It will completely answer the question and save a lot of time to many people - it is worthless to port RT Linux, open PLCs environment and even think about it if no watchdog is present in the system.

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

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

Mon Oct 10, 2011 5:56 pm

Maybe because the developers are very busy and do not have the time to track all the bulletins.
Nobody had thus far asked any of the developers (friendly) if they could please spare some time to look into this and give a definitive answer as this is very important to them. I just received such an email.
I can give you a definitive answer that YES the BCM2835 device has a watch dog timer. But.... I can't tell you when (or even if) the watchdog will be supported in the ARM <-> GUI message protocol. It will definitely not be in the SW release when the first boards come out as it is not high on the list of priorities.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Mon Oct 10, 2011 6:28 pm

Sorry if I was rude - my fault.

Thank you for YES.
I think if / when I will have the R-pi I will figure that out myself - most likely watchdog is done the same way as on ARM Development SoC, otherwise I will file a request to Broadcom - and they will share how to activate it - so, now R-pi for me have enough value for my project and, I believe, for PLC project as a whole.

User avatar
Gert van Loo
Posts: 2486
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

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

Mon Oct 10, 2011 6:51 pm

You can not file any request with Broadcom. Broadcom does nothing but supply the BCM2835 devices to the Raspberry Pi foundation. They would prefer not to do that as the foundation is not a big enough customer, but they are willing to support the foundation as a matter of goodwill. The last thing Broadcom wants is to receive email from raspberry Pi customers about their devices. The support for such a function in the 'driver' has to come from volunteers inside Broadcom who build the GPU 'binary blob'. I assume in due time a 'list of outstanding requests' has to be made available on the Raspberry Pi website.

tbolsh
Posts: 12
Joined: Wed Oct 05, 2011 9:44 pm

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

Mon Oct 10, 2011 7:06 pm

Well -
1) I will wait until I got Raspberry Pi and try to do it same way as on ARM SoC. I expect this to work.
2) If this would not work I will politely ask developers to place 1-2 pages of technical spec (may be preprocessed to avoid legal issues) into public domain - namely watchdog description from technical spec.
3) If that would not work I will try to request Broadcom for technical spec for BCM 2835, most likely without mentioning Raspberry Pi. If necessary I (our company) can sign NDA.

In general I do not understand why they are making so much fuss out of technical specs ...

Return to “Other projects”