Crate plcviz

Crate plcviz 

Source
Expand description

plcviz - PLC code visualization library

Generate SVG diagrams from L5X files using layout-rs for professional graph layout and our custom SVG generation for clean, valid output.

§Graph Types

  • Structure: Containment hierarchy (Controller → Programs → Routines)
  • CallGraph: Execution flow (Routine → Routine via JSR/AOI calls)
  • Combined: Both structure and calls

§Example

use plcviz::{L5xGraph, VizConfig, GraphType};

let mut graph = L5xGraph::new();
graph.add_program("MainProgram");
graph.add_routine("MainProgram", "MainRoutine");
graph.add_call("MainRoutine", "SubRoutine");

let svg = graph.render_svg();

Re-exports§

pub use config::GraphType;
pub use config::VizConfig;
pub use config::ElementFilter;
pub use config::NodeStyle;
pub use config::NodeStyles;
pub use graph::L5xGraph;
pub use graph::L5xNode;
pub use graph::L5xNodeType;
pub use graph::L5xEdge;

Modules§

config
Visualization configuration
graph
Graph module for L5X visualization
svg
Custom SVG generation module