rPLC project allows to write PLC programs for Linux systems in Rust using classical PLC programming approach.
rPLC supports Modbus and OPC-UA input/output protocols out-of-the-box and can be easily extended with custom I/O as well.
rPLC is a part of https://www.eva-ics.com EVA ICSĀ® open-source industrial automation eco-system.
```rust,ignore use rplc::prelude::*;
mod plc;
fn tempmon() { let mut ctx = plccontextmut!(); if ctx.temperature > 30.0 { ctx.fan = true; } else if ctx.temperature < 25.0 { ctx.fan = false; } }
fn main() { initplc!(); tempmonspawn(); run_plc!(); } ```
Available at https://info.bma.ai/en/actual/rplc/index.html