SA0048: AT declarations on direct addresses
Function | Determines AT declarations on direct addresses. |
Reason | The use of direct addresses in the code is an error source and leads to poorer readability and maintainability of the code. We therefore recommend using the placeholders %I* or %Q*, for which TwinCAT automatically carries out flexible and optimized addressing. |
Importance | High |
PLCopen rule | N1/CP1 |
Samples:
PROGRAMM MAIN
VAR
b1 AT%IX0.0 : BOOL; // => SA0048
b2 AT%I* : BOOL; // no error
END_VAR