Glossary · PLC and control programming
Variable (PLC programming)
Also known as: Variables, Tag, PLC tag
German: Variablen
In IEC 61131-3 programming, a variable is a named data element with a declared data type whose value can change during program execution, stored in the controller's memory or mapped to an input or output.
- PLC programming
- Standards
In one sentence
A PLC variable is a named, typed data element whose value can change at runtime, stored in memory or mapped to I/O.
Example
The variable bConveyorRun of type BOOL is written by the conveyor logic and read by the HMI, which shows the conveyor as running.
How it applies
- Engineering: Variables carry all data of a PLC program: signals, states, parameters, measurements. Their scope (local, global, interface), data type and retentive behavior are set in the Variable declaration. Many HMI and SCADA systems call variables tags.
- Integration: Variables exposed to HMI, SCADA, OPC UA or MES form interfaces. Names, types and units must stay stable or be versioned.
- Maintenance: Online monitoring and watch tables show variable values in the running controller, which is the basis of most diagnosis.
- Documentation: Variables that users see or set, such as parameters and measured values, need names, units and ranges that match between program, HMI and manual. An Engineering unit belongs to every physical value.
Variable vs. tag
In IEC 61131-3, variable is the formal term. Tag is common in HMI, SCADA and some PLC environments for the same concept or for a variable exposed to external systems.