The nice thing gentlemen is, that we are thinking more or less on the same direction.
@diggy as you know PLCs are very very slow devices most of them having program cycle time some ms. (1ms program cycle is the fastest I know)
I remember back in 80s I made my own "PLC" based in Z80 CPU and program in assembler with cycle time some microseconds. No PLC even today come close to that (Only Bechkoff's with EtherCAT).
What I am saying is, this USB solution will have adequate speed for many non critical applications, like burglar alarms, and many home automation (that is a lot off applications).
To our project now YES R-Pi can work together with other R-Pis forming a high speed network controllers in a master slave model. To do that you need "real time" ethernet comunication between them, but not always as you can read farther. You can achieve that only with powerlink Ethernet winch is supported by the OPENPLC org (and with Beremiz I suppose) or with EtherCAT (a Beckhoff's open real time Ethernet) but you need a CODESYS environment (very good and open but you have to pay).
So for most applications that needs not very fast I/O, I2C bus can be adequate for I/O (Digital outputs/inputs analogue boards etc) attached locally to that bus. Best will be ta have a CAN bus on R-Pi but may be in the future they put a CAN master on board. That will be nice for Automobil applications as automotive controllers are using CAN bus as a FieldBus.
Speed on this (I2C) bus is about 400KHZ to 1M . This is the speed of the old DeviceNet bus and half of the CAN bus speed. This is good for most apps.
Now for critical high speed apps like servo-controller, high speed encoder and high speed analog conversion input/output forget this kind of bus(10KHZ encoder input may fit on I2C bus speed limitations though).Les us think a bit different model.
One R-Pi will be dedicated to become a positioning controller. Axis in like encoders and outputs will attached directly to R-Pi I/O s. Think it as a “back box” that gets command and reports what happened back to to master.
So from the master R-Pi you can "order" the slave R-Pi "GO TO POSITION 3000" . So the slave device will go there and will inform the maste that "THE JOB DONE". I think you got the idea. The same model are using many modern positioning makers (one of the best is http://www.galilmc.com
DMC-40x0 Series) . This communication it is not critical. Real time here is not needed. The slave will have the responsibility to do the job done. If errors accruing slave positioning controller mast take actions immediately. Not waiting “what to do” from master. Master willmonitor “OK” or “ERROR”command from slave to issue other commands if necessary and so on.
But real time Ethernet will be needed in some cases as I stated in the beginning of this thread:
be able to communicate real time via Ethernet port to other remote Pi PLCs in a master/slave scenario.
Think having a kit like that and teach technical students the Motion Control!! having state of art hardware like this powerful “little thing” running latest technology in OPENPLC libraries!. This is a dream now for every automation student. The cost for a lab to setup this equipment is very high! Then when he became an engineer he will be able to use one R-Pi board to do the job!.
Ok I have many things in my mind (like using it with my next project THE ELECTRIC CAR) and I thing it is a good time to prepare the first white paper for R-Pi PLC. In the process we will add more info.
Yes @diggy one R-Pi can be used as HMI controller *Beremize has the software ready for that)! So forgive me but the keyword to finish this project FAST is Beremiz. AND YES! I have good news.
Yesterday I asked Edouard from Beremiz, if we can have a PLC module without any OS on it and the answer was:
"With OS" or "without OS" options are both possible with Beremiz, but
in case of no OS, features like dynamic program loading and serial or
USB or IP communication for control and debug will have to be fulfilled
in order to make the PLC usable.
Having real time with Linux is also possible today with rt-preempt
patches or Xenomai. So, if you already have Linux running, maybe is
that easier to use Linux drivers, and just use python runtime +
Everybody likes it ? So Try to download Beremiz to see what I am talking about and in the meantime to see how to pack everything in the project. At the end may be easier than it looked in the beginning.
@charly130.-mk2 said if we need drivers we can easily build them.
@diggy I will be glad to help you rebuilding your factory automation with R-Pi PLC
Ok gentlemen lets go to work! It looks that R-Pi PLC can be realized after all!