Page 1 of 1
Node-Red for PLC Logic
Posted: 25 Jul 2023, 00:32
by mitchellday06
Hi, I am fairly new to the PLC game, and am trying to program a PLC for waste management. I currently have all the logic for processing waste, reading and checking temperatures and pressures etc done in Node-Red. I am just wondering if anyone has experience using node red for the complete PLC solution?
I am a software developer (studying software engineering) and was wondering if this approach is sufficient, or if I should look at using another programming language for the PLC logic?
Would doing the program in c++ be ok, or do I need to do in one of the five IEC certified languages? If so which one can RevPi do?
Mitchell
Re: Node-Red for PLC Logic
Posted: 27 Jul 2023, 21:49
by kjkoster
Dear Mitchell,
I’ve been pondering the same. In my opinion, the visual languages tend to scale badly and make (automated) code review quite hard. People in the industry that I’ve talked to say that they are looking to generate the PLC code instead of writing it, because it is to repetitive and brittle.
For my projects I am looking at Python, but I’ve spoken to others who use C++ and yet others who use C#.
The certification of programming languages is mainly a paper thing. Open Source programming environments and toolchains have evolved far beyond any technical benefit that certification might bring.
I believe the main consideration is long term maintenance and support: can you find a person who can 1) program in the language you chose and 2) understands your automation domain well enough to write a program for it. This is really depending your situation: if your system needs a change in 5 years, who will do it and using what toolchain?
I’m thinking to go the route of having low level control in a PLC language (probably Structured Text, so we can have “normal” source code and not some visual thing) and then have a high level control system around that in Python and TypeScript.
This may or may not fit your situation.
Kees Jan
Re: Node-Red for PLC Logic
Posted: 28 Jul 2023, 13:28
by ocean
Hi,
I am currently developing Node-Red Nodes for the realization of control tasks in Node-Red.
The Node-Red Nodes developed by me use the ladder logic according to IEC 61131-3.
I have implemented all ladder logic elements such as contact, coil, timer, counter...
You can also integrate external nodes such as MQTT, databases and dashboards into the control process.
All nodes are open source and will be available on Node-Red.
It would be nice if these nodes could also be used on Kunbus controler.
With the nodes it is super easy to implement control tasks.
Purchasing a Kunbus controller is currently not advantageous.
I asked Kunbus if you could provide me with a controller.
Hope I get an answer.
Ocean
Re: Node-Red for PLC Logic
Posted: 01 Aug 2023, 14:44
by Amar
You can refer to RevPi CODESYS Node-RED example which exchanges CODESYS application data running on RevPi device with Node red application
Revolution Pi Library Beta for CODESYS V1.4.0.0
https://revolutionpi.com/tutorials/downloads
Regards
Amar
Re: Node-Red for PLC Logic
Posted: 17 Aug 2023, 01:42
by mitchellday06
Thanks for the information. Yeah I think the main concern from my point was performance and regulations as the project itself is a technology demonstrator and has a lifespan of 6 months max.
I have played with and implemented some stuff in codesys, but as I have already developed a lot of it in Node Red, with a short time frame, don't want to risk moving across now.
I think I will fully develop the system in Node Red as it has all interface, DIO, AIO, Modbus, SNMP and HMI capabilities AND I have already done most of it.
But try to replicate it in CodeSys as a future solution for if the system becomes a long term product.
Ocean I think I have seen these around actually. Will definitely look into them.
Re: Node-Red for PLC Logic
Posted: 15 Nov 2023, 12:47
by ocean
Here is the new redPlc version:
https://github.com/redplc/redplc
There is also a small introduction to Ladder Logic with Node Red.
Unfortunately the Node driver for Kunbus devices is missing.