Tag Usage
Every rungs.dev tag has a usage — Input, Output, or Local — that controls where its value comes from, where it appears in the editor, and whether logic can write to it.
Every tag declares a usage that says where its value comes from. Usage controls where the tag appears in the editor and whether the program can write to it.
| Usage | Meaning |
|---|---|
| Input | Value passed into the AOI. Read-only inside the AOI. |
| Output | Value set by the AOI and returned to the caller. |
| Local | Private internal memory used only inside the AOI. |
Choosing a usage
- A pushbutton or limit switch → Input
BOOL - A motor contactor or pilot light → Output
BOOL - A sensor reading a real-world value → Input
DINTorREAL - A setpoint or running total → Local
DINTorREAL - Any
TIMER,COUNTER,FBD_TIMER, orFBD_COUNTER→ Local (structured tags cannot be I/O tags)
Reading vs writing
Coils and math instructions write to tags, which means they require Output or Local usage. Trying to drive an Input tag from logic produces a compile-time diagnostic:
Operand 'Cmd_Reset' is an input parameter and should not be modified
If you need to drive a value from logic, create an Output or Local tag — do not mark it Input.
In the Studio editor
- I/O Panel — only Input parameters can be modified at runtime. Output and Local tags are read-only in the panel.
- Trend — Local tags are not plotted. Use Input or Output if you want a signal to appear on the Trend.
Practice
See tag usage in the Start/Stop Motor exercise — Input, Output, and Local tags working together.
Data Types
Reference for tag data types in rungs.dev — BOOL, DINT, REAL, TIMER, COUNTER, FBD_TIMER, FBD_COUNTER, FBD_ONESHOT — what each holds and which instructions read or write it.
Array Tags
Use array tags in rungs.dev to store lists of BOOL, DINT, REAL, TIMER, COUNTER, FBD_TIMER, or FBD_COUNTER values under one name and reference elements with Tag[index].