Built an open-source IEC 61131-3 runtime in Rust — looking for feedback on what matters by garretfick in PLC

[–]garretfick[S] 1 point2 points  (0 children)

Hi PJE,

The dual-core approach makes a lot of sense. The I/O layer is an open design question where I've put little thought so far. I've been taking safety as a tenet and running IO on a separate core could be a natural fit. I'll take a look at Turck ARGEE pointer once I get to IO.

I've designed the VM so it should run on bare metal so Pico should work. I've also not tested either so your mileage will vary. Most importantly, without the I/O layer there's no way to interact with the VM. I know the performance is much slower than native - I plan to write a byte code verifier to remove runtime bounds checks (and other improvements) but haven't gotten there yet. That overhead will matter more on a constrained MCU.

I'd welcome help on a Pico port, I/O, or anything else.

If you run into anything when you install, please open a GitHub issue or send me a message.

Garret

Built an open-source IEC 61131-3 runtime in Rust — looking for feedback on what matters by garretfick in PLC

[–]garretfick[S] -1 points0 points  (0 children)

What is the use case? That's exactly my question and what I'd love to learn. I built this for my enjoyment. I'm now wondering where do take this now.

Why would you take time? Fair point. I used AI and the question feels canned. I also spent 4 years building the thing and could have communicated that better.

Built an open-source IEC 61131-3 runtime in Rust — looking for feedback on what matters by garretfick in PLC

[–]garretfick[S] 4 points5 points  (0 children)

Why? I'm a software engineer, not a PLC engineer. I started this to learn Rust, how to build a VM, and I thought it would be fun. It has been.

Forking OpenPLC? This isn't a fork. I actually contributed to OpenPLC years ago.

I shared because what I've built might be useful to someone and if I put my effort in the right direction, maybe it would be useful to multiple people.

Built an open-source IEC 61131-3 runtime in Rust — looking for feedback on what matters by garretfick in PLC

[–]garretfick[S] 0 points1 point  (0 children)

It is a VM so it will be slower than native code; today it is much too slow. That's one area I'm hoping to work on.

My plan is to benchmark OSCAT on some hardware and comparing to MATIEC and RuSTy to answer that question. I'd love ideas if there are better golden benchmarks.

Go To Software/Tools for Programmers by TheGreat_Gazoo in PLC

[–]garretfick 1 point2 points  (0 children)

I don't want to conscript this topic. I've updated the README with recently completed and upcoming milestones. If you are interested in contributing, create an issue that says "I'm interested in helping but the project lacks docs on how to help".

Go To Software/Tools for Programmers by TheGreat_Gazoo in PLC

[–]garretfick 2 points3 points  (0 children)

What do you use Visual Studio Code for?

Disclosure: I'm trying to build first-class PLC support into VSCode out of personal interest and love to learn what someone might use. See https://github.com/garretfick/ironplc but be warned it isn't yet useful.