SA0047: Access to direct addresses
Function | Determines direct address access operations in the implementation code. |
Reason | Symbolic programming is always preferred: A variable has a name that can also have a meaning. An address does not provide an indication of what it is used for. |
Importance | High |
PLCopen rule | N1/CP1 |
Samples:
PROGRAM MAIN
VAR
bBOOL : BOOL;
nBYTE : BYTE;
nWORD : WORD;
nDWORD : DWORD;
END_VARbBOOL := %IX0.0; // => SA0047
%QX0.0 := bBOOL; // => SA0047
%QW2 := nWORD; // => SA0047
%QD4 := nDWORD; // => SA0047
%MX0.1 := bBOOL; // => SA0047
%MB1 := nBYTE; // => SA0047
%MD4 := nDWORD; // => SA0047