How mavati56/classicladder works
Classic Ladder is a GTK-based PLC ladder and sequential-logic editor with an execution runtime, project persistence, variable access, and local or remote monitoring. The main user flow is to edit and organize sections, save or load a project, then run its logic and inspect variables or connect to a target. The README also documents event logs, Modbus/TCP serving, project transfer, and real-time operation. Some paths are linked only where the README or source index supports the relationship; unsampled implementations limit finer-grained call-flow claims.
Main entry points: vars_access.c Variable access · classicladder_gtk.c Main window · files.c Project files · monitor_protocol.c Remote monitor protocol
Components 28
Logic authoring
- Ladder editor
src/edit.c - Sequential editor
src/edit_sequential.c - Section manager
src/manager.c - Logic search
src/search.c
Execution runtime
- Ladder execution
src/calc.c - Sequential execution
src/calc_sequential.h - Periodic tasks
src/tasks.c - Hardware I/O
src/hardware.c
Project and variables
- Variable access
src/vars_access.c - Variable names
src/vars_names.c - Project files
src/files.c - Project metadata
src/files_project.c - Preferences
src/preferences.c - Symbols
src/symbols.c
Monitoring and operations
- Event logging
src/log_events.c - Remote monitor protocol
src/monitor_protocol.c - Project transfer
src/monitor_transfer.c - Modbus/TCP server
src/protocol_modbus_slave.c - Modbus master
src/protocol_modbus_master.c
GTK interface
- Main window
src/classicladder_gtk.c - Menus and toolbar
src/menu_and_toolbar_gtk.c - Sections UI
src/manager_gtk.c - Ladder drawing
src/drawing.c - Sequential drawing
src/drawing_sequential.c - Monitor windows
src/monitor_windows_gtk.c
Other components
- Engineer
- PLC target
- SCADA client
Connections 37
- Engineer → Main window: uses
- Main window → Menus and toolbar: opens actions
src/classicladder_gtk.c - Menus and toolbar → Sections UI: opens manager
src/menu_and_toolbar_gtk.c - Main window → Ladder drawing: displays rungs
src/classicladder_gtk.c - Main window → Sequential drawing: displays steps
src/classicladder_gtk.c - Ladder editor → Ladder drawing: updates display
src/edit.c - Ladder editor → Section manager: uses section data
src/edit.c - Sequential editor → Ladder drawing: uses drawing
src/edit_sequential.c - Sections UI → Section manager: adds sections
src/manager_gtk.c - Engineer → Ladder editor: edits logic
- Engineer → Sequential editor: edits steps
- Engineer → Project files: loads or saves
- Project files → Section manager: loads section data
src/files.c - Project files → Event logging: loads log config
src/files.c - Project files → Variable access: loads variables
src/files.c - Project files → Project metadata: handles project info
- Periodic tasks → Ladder execution: runs cycles
- Ladder execution → Variable access: reads and writes
src/calc.c - Ladder execution → Section manager: uses sections
src/calc.c - Ladder execution → Sequential execution: uses sequential logic
src/calc.c - Sequential editor → Variable access: uses variable names
src/edit_sequential.c - Logic search → Section manager: navigates sections
- Logic search → Ladder editor: finds elements
src/search.c - Variable names → Variable access: names variables
- Symbols → Variable access: annotates variables
- Main window → Monitor windows: opens monitor
src/classicladder_gtk.c - Menus and toolbar → Remote monitor protocol: starts connection
src/menu_and_toolbar_gtk.c - Remote monitor protocol → Variable access: reads variables
src/monitor_protocol.c - Remote monitor protocol → Project transfer: uses transfer
src/monitor_protocol.c - PLC target → Remote monitor protocol: connects remotely
- Remote monitor protocol → Project files: transfers projects
src/monitor_protocol.c - SCADA client → Modbus/TCP server: connects via TCP
- Modbus master → Variable access: accesses variables
src/protocol_modbus_master.c - Hardware I/O → Variable access: updates I/O
- Event logging → Variable access: logs configured variables
- Main window → Preferences: uses preferences
src/classicladder_gtk.c - Engineer → Logic search: searches logic