Glossary · Automation software engineering and architecture
Software module
Also known as: Module
German: Softwaremodul
In software engineering, a software module is a self-contained unit of source code, such as a file, package, program organization unit or namespace, that groups related functionality behind a defined interface.
- Software engineering
In one sentence
A software module is a self-contained unit of source code that groups related functionality behind a defined interface.
Example
The infeed module of the PLC program contains the function blocks, data types and global variables for the infeed conveyor and exposes only a start, stop and status interface.
How it applies
- Engineering: Modules are the smallest units for unit testing and code review. Good modules have high cohesion and low coupling.
- Functional safety: Standards for safety-related software require modular design with limited module size and complexity and defined interfaces, since this supports verification.
- Documentation: Module structure can guide the software design documentation: one section per module with responsibility, interface and dependencies. User documentation should follow functions, not modules.
Software module vs. software component
A module organizes source code. A Software component is an architectural and deployable unit with explicit interfaces; one component may contain several modules.