Glossary · PLC and control programming
Input variable
Also known as: VAR_INPUT, Input parameter
German: Eingangsvariable
In IEC 61131-3 programming, an input variable is a parameter declared with VAR_INPUT that passes a value into a function, function block or program at the call; the called unit reads it but does not change the caller's variable.
- PLC programming
- Standards
In one sentence
An input variable (VAR_INPUT) passes a value into a PLC function or function block at the call without changing the caller's data.
Example
The function block FB_Tank has the input variables Setpoint and Level, which the calling program supplies in every cycle.
How it applies
- Engineering: Input variables form the input side of a block's interface. They can have default values, which apply when the caller does not assign them. In function blocks, the last assigned value stays in the instance until the next call assigns a new one.
- Reuse: Well-chosen inputs make a block configurable without editing its code: limits, delays and modes become parameters.
- Testing: Tests cover the documented input range and the behavior at and beyond its limits.
- Documentation: The interface table of a library block lists every input with data type, unit, default, valid range and meaning. This is reference information that technical writers can reuse in parameter descriptions.
Input variable vs. PLC input
An input variable is a software parameter of a program unit. A PLC input is a physical signal connected to an input module. The two meet when the program passes a hardware input into a block's input variable, but they are different concepts and should be named differently in documentation.