Jossk
According to Wikipedia, this is an open source implementation of Ethernet/IP.
 
 
GitHub Page:
 
Anyone have any more information on it? Is it stable
 
Is it possible add to OpenPLC in order to take advantage of this real-time protocol?
Reply 0 0
thiagoralves
I've seen it before. If I'm not mistaken, this library implements the device portion of the protocol (i.e. the "slave" side that is usually associated with devices). For OpenPLC, we need the master side, to be able to talk to the slave devices.
Reply 0 0
Jossk
So if i am understanding correctly, this is only useful for those creating devices to be controlled by an A-B PAC (pretty much the only PLC manufacturer that uses it, that I'm aware of).
 
If anyone is on either the Users, or Developers mailing list, could you ask if they have any plans to work on the master side of the protocol?
 
It would be nice if there was at least one real-time protocol that is open or at least royalty-free (like Modbus). If they could add the master side, this could be it.
 
Thanks for the info @thiagoralves.
Reply 0 0
RaynoP
Ethernet/IP is Allen Bradley's proprietary/originated fieldbus (AFAIR) network which is Ethernet based, comparable with ModbusTCP. They have Devicenet and Controlnet as well, of which some parts are open to anyone.
 
Then you get EtherCAT which was originated by Beckhoff for fast and open interchangeable devices. However, since EtherCAT natively runs at sub-millisecond speeds, microcontrollers cannot run that fast and run other programs; you will need FPGAs. Devicenet and Controlnet is much slower and easier to implement - but you can also slow EtherCAT down that much. The EtherCAT consortium consists of big vendors in the market, I propose this will be useful to consider for OpenPLC, but I will do some hardware testing first to see if it is feasible. It will be for certain controller types only, unfortunately.
 
As with Modbus there is a master and a slave component in all of them and some like ProfiBUS, requires dedicated ASICs which is licensed per chip, in order to implement the master or the slave code/interface - last I checked. EthernetIP master and slave code also differs very significantly and if memory serves it is a little tricky. Beckhoff had only slaves modules for a very long time before they could bring out a master - it had something to do with royalties and proprietarism. (I used to be the technical lead for a Beckhoff subsidiary many years ago here is SA).
 
Most of these Ethernet based protocols is very sensitive to timing on the network - many <4ms. Network congestion or packet drops will cause major IO device errors or hick-ups, causing your outputs to momentarily de-enrgise and re-energise. This is very dangerous and serious consideration needs to be place if this is to be put into anything.
 
Kind regards,
RaynoP
------------------------------------------------------------
If you forever think inside the box...
You will never live outside of it.
 
Red pill or blue pill Neo? All I offer is the truth.
Follow the white rabbit.
Reply 2 0
Jossk
Thanks @RaynoP for your detailed reply. Yes, I am aware Ethernet/IP is proprietary to Allen-Bradley/Rockwell. That is why I'm interested in the work of this open implementation.
 
Ethernet/IP, DeviceNet, and ControlNet have been grouped into the "Common Industrial Protocol (CIP)" https://en.wikipedia.org/wiki/Common_Industrial_Protocol. Kind of a presumptuous name, as it's not very common outside of North America (as far as I'm aware). https://en.wikipedia.org/wiki/ODVA_(company)
 
Ideally, the controller & devices would be on its own, separate network, with no internet access. Once setup, you would only need to connect a computer when uploading a new program (seeing as how OpenPLC does not yet have the ability to retrieve programs from the controller).
 
Just out of curiosity, since ProfiBUS requires a licensed chip, but what about ProfiNET?
 
As you may have surmised, I keep talking and asking about Ethernet/IP.  I'm in North America, where Allen-Bradley is the de facto standard.
Reply 0 0
RaynoP
I love the fact that you understand the complexity of OT networks (and we can stress it here) and that one needs to split them. But according to CIS, most attacks now is from within the network and we need to remember that OpenPLC is humble now with a massive vision. I foresee it becoming sort of a competition to other vendors, in a way and just my opinion of course.
 
I have not checked into that ProfiNET aspect yet. Been a while since I played with the protocols on that level. I will investigate, however.
 
Ethernet/IP is a solid idea, but the feasibility of its implementation needs to be assessed.
 
From my side I will pledge some time towards that study and/or implementation, EtherCAT and Ethernet/IP. Both are solid protocols, very versatile and will open a world of possibilities of interoperability to the OpenPLC project. But a lot of water needs to flow for that to happen. Then again, Home Assistant has a EtherCAT Python library if I remember correctly...
 
The main hurdle is, I have a Beckhoff PLC to test EtherCAT with all the Arduinos, ESP etc. I have here. Ethernet/IP I will need to get additional hardware and then look at the lisencing impact(s).
 
BTW, Modicon from Schneider also has a very strong Ethernet/IP implementation and I have SIM PLCs, so effectively I have a master to work with. Then we can cover the American and some European ideas. MQTT is perhaps also a good idea. Wow, so many ideas so little time!
 
But first, I need to start on the help files/documentation and some additional library blocks I have in mind, forum and project permits of course.
Kind regards,
RaynoP
------------------------------------------------------------
If you forever think inside the box...
You will never live outside of it.
 
Red pill or blue pill Neo? All I offer is the truth.
Follow the white rabbit.
Reply 0 0
thiagoralves
There is a possibly (haven't tested yet) working implementation of EtherCAT on OpenPLC Runtime for Linux made by @r2k-in-the-vortex . Check his commit here: https://github.com/thiagoralves/OpenPLC_v3/commit/d7fa92bd6eb00f012dd1e83e18d219570a45d594
I think from the last time we spoke that there are a few things yet to be added, but it seems to be working reliably so far. The only catch is that it does not work on microcontrollers (and probably never will).
 
About MQTT, I'm working on adding MQTT blocks for all platforms on the OpenPLC Editor. It will work both as subscriber (read data from broker) or writer.
Reply 0 0
Jossk
Wow, so many ideas, never enough devs. I apologize, I don't have any knowledge or experience to assist in that regard. All I can do is make suggestions and ask questions (like you don't already have enough on your plate).
 
As for MQTT, I thought that protocol was more for home (building?) automation. Speaking of building automation, what is the difference between a PLC and a DDC?
 
They sound like they're the same thing.
 
Anyway, thank you @thiagoralves for making this. I too also want to see this compete with the major vendors.
Reply 0 0
RaynoP
Hi all,
 
I did some digging today and found some awesome resources, Even one that makes an Arduino UNO a EtherCAT slave device...
 
Here are the links for EtherCAT:
For this first one I doubt that I will have the skill to implement the Ethernet component in the PCB designs, but will still have a look:
I like the following one quite a lot
Thiago I know you like the Raspberry PIs a lot, they have an HAT:
I think @r2k-in-the-vortex may have used this:
 
Some links for Ethernet/IP:
 
But, all of these takes quite a lot of testing and implementation to do and achieve.
So, have a look at Anybus gateways...
I have some soon to be implemented to pull my UPS into my network and to control my irrigation valves running simple Modbus RS-485 slaves:
 
I built a 24VAC to 24VDC PSU. So I run one power and data cable to each valve: WIP - still need to finalise BOM and then PCB layout,
[203128%2F8124345%2Fmceclip0]
 
 
But although the hardware and field-busses are awesome to look at, we need to make the software run well...
 
 
 
Kind regards,
RaynoP
------------------------------------------------------------
If you forever think inside the box...
You will never live outside of it.
 
Red pill or blue pill Neo? All I offer is the truth.
Follow the white rabbit.
Reply 0 0
RaynoP
I made this for the Raspberry PI. It is a spin-off of the 8 channel replay board from Chine:
[203128%2F8124358%2Fmceclip0]
 
Still fixing the Silkscreen...
 
All boards:
[203128%2F8124360%2Fmceclip0]
 
Kind regards,
RaynoP
------------------------------------------------------------
If you forever think inside the box...
You will never live outside of it.
 
Red pill or blue pill Neo? All I offer is the truth.
Follow the white rabbit.
Reply 0 0
Robbudge
I have a selection of industrial hardware on my test rig. 

Both masters and slaves and most industrial protocols. 

the rig does have VPN. If you are looking for test hardware give me a shout. 
Reply 0 0
yonush
You can find another OSS Ethernet/IP library at https://libplctag.github.io/. I have used this library before to communicated to some AB PLCs. I also used the same library to make a 'fake PLC' to test the code.
 
I have not tested it with the Arduino compiler yet but I dont it would be too much of an issue to integrate as it is straight C code.
Reply 0 0
RaynoP
@Robbudge thank you for the offer!
 
@yonush thanx for the reference. Do you have the code available for the demo PLC you built should others want to explore it a bit please?
 
Kind regards,
RaynoP
------------------------------------------------------------
If you forever think inside the box...
You will never live outside of it.
 
Red pill or blue pill Neo? All I offer is the truth.
Follow the white rabbit.
Reply 0 0
Reply