I was already looking for controllers that support Rust. Why? Because C/C++ gives you power and freedom but is a risk with systems that have to have reliability. PLC programs (Structured Text) just lack libraries and functionality and so on. Rust is great for Controllers, as the compiler is checking so much. It's great for industrial use for more advanced PLC programs. Great you guys invest in Rust! I have a question though, C# uses a non deterministic garbage collector for the heap. How did you manage to get C# deterministic?? (C# was developed for the enterprise, why did you guys choose C# will Rust get the same status?) Also in the video you showed how you can make C++ deterministic trought the PLM, does the same counts for Rust? (Would love to see Rust getting a more prominent place, as it's memory model really suits industrial systems.)
Hi, thanks for your questions. For more about how C# is implemented into the PLCnext Ecosystem, see here: www.plcnext.help/te/Programming/Csharp/Csharp_in_PLCnext.htm Regarding Rust: There are currently no plans within Phoenix Contact to do any specific developments on Rust. We encourage the PLCnext Community (plcnext-community.net) to develop solutions in languages that are of interest to them. There are PLCnext Community members who agree that Rust is a great fit for PLCs, and some work is being done by individuals in this area, e.g. bindings that allow I/O and other PLCnext runtime services to be accessed from a Rust application. At the moment the Program Library Manager (PLM - see here: www.plcnext.help/te/Programming/Cpp/Cpp_program_structure/PLM_Program_Library_Manager.htm) can only instantiate components and programs that are written in C++, but it is possible to write a C++ shim between the PLM and a Rust program. Other users have already done something similar for Python programs. Alternatively, rather than using the PLM, it is possible to schedule real-time threads from a Rust application directly on the operating system. This bypasses the PLCnext Runtime and so loses some of the benefits of using the PLM, but for low-level programmers who know what they are doing, this is another way to write real-time Rust applications that run on the PLC.
As always, that depends on what you want to accomplish with your program! But don't worry: with a PLCnext Control, there's no need to stick to only one programming language. You can run code in different languages together in a program. That's what the "Execution and Synchronization Manager" of PLCnext Technology is made for.
Yes, this is possible. We currently do not have a specific example using node.js/javascript, but the principle is the same as for the Sample Runtime example in Github (github.com/PLCnext/SampleRuntime), and requires the use of the PLCnext ANSI-C interface.
Hi Alex, thanks for this suggestion, we will consider that. We'll never have enough resources to support the wide range of libraries and tools that can be used with the open PLCnext Technology platform. But for any topic there's hopefully someone out there who has made a similar project and shares his or her experience with you. Did you see the "Makers Blog" section and the "Forum" in the www.PLCnext-Community.net? There are a lot of tips and tutorials given by users of node.js in PLCnext context. If there are any questions that have not been touched by now, please log in to the PLCnext Community (it's free of charge and ads) and open a new thread in the Forum.
I’m new to the Next and you laid out the architecture well enough to grasp the concepts. Thanks.
Great to hear!
Super video! Well done!
I was already looking for controllers that support Rust. Why? Because C/C++ gives you power and freedom but is a risk with systems that have to have reliability. PLC programs (Structured Text) just lack libraries and functionality and so on. Rust is great for Controllers, as the compiler is checking so much. It's great for industrial use for more advanced PLC programs. Great you guys invest in Rust!
I have a question though, C# uses a non deterministic garbage collector for the heap. How did you manage to get C# deterministic?? (C# was developed for the enterprise, why did you guys choose C# will Rust get the same status?)
Also in the video you showed how you can make C++ deterministic trought the PLM, does the same counts for Rust? (Would love to see Rust getting a more prominent place, as it's memory model really suits industrial systems.)
Hi, thanks for your questions.
For more about how C# is implemented into the PLCnext Ecosystem, see here:
www.plcnext.help/te/Programming/Csharp/Csharp_in_PLCnext.htm
Regarding Rust: There are currently no plans within Phoenix Contact to do any specific developments on Rust. We encourage the PLCnext Community (plcnext-community.net) to develop solutions in languages that are of interest to them. There are PLCnext Community members who agree that Rust is a great fit for PLCs, and some work is being done by individuals in this area, e.g. bindings that allow I/O and other PLCnext runtime services to be accessed from a Rust application.
At the moment the Program Library Manager (PLM - see here: www.plcnext.help/te/Programming/Cpp/Cpp_program_structure/PLM_Program_Library_Manager.htm) can only instantiate components and programs that are written in C++, but it is possible to write a C++ shim between the PLM and a Rust program. Other users have already done something similar for Python programs.
Alternatively, rather than using the PLM, it is possible to schedule real-time threads from a Rust application directly on the operating system. This bypasses the PLCnext Runtime and so loses some of the benefits of using the PLM, but for low-level programmers who know what they are doing, this is another way to write real-time Rust applications that run on the PLC.
What's the best programming language to learn for the PLCnext control !?
Thank you !
As always, that depends on what you want to accomplish with your program! But don't worry: with a PLCnext Control, there's no need to stick to only one programming language. You can run code in different languages together in a program. That's what the "Execution and Synchronization Manager" of PLCnext Technology is made for.
Is possibe control of axio in/outs with nodejs AND javascript only?
Yes, this is possible. We currently do not have a specific example using node.js/javascript, but the principle is the same as for the Sample Runtime example in Github (github.com/PLCnext/SampleRuntime), and requires the use of the PLCnext ANSI-C interface.
Hi Alex, thanks for this suggestion, we will consider that. We'll never have enough resources to support the wide range of libraries and tools that can be used with the open PLCnext Technology platform. But for any topic there's hopefully someone out there who has made a similar project and shares his or her experience with you. Did you see the "Makers Blog" section and the "Forum" in the www.PLCnext-Community.net?
There are a lot of tips and tutorials given by users of node.js in PLCnext context. If there are any questions that have not been touched by now, please log in to the PLCnext Community (it's free of charge and ads) and open a new thread in the Forum.
Good Job!!
Thanks!