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
Node-Red for PLC Logic
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
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
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
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
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
Revolution Pi Library Beta for CODESYS V1.4.0.0
https://revolutionpi.com/tutorials/downloads
Regards
Amar
KUNBUS
-
- Posts: 21
- Joined: 29 Nov 2022, 00:08
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.
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.
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.
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.