SA0047: Accesses to direct address

Detects direct address access in the implementation code

Justification: Symbolic programming is always preferable. A variable has a name that can also have a meaning. An address cannot indicate what it is used for.

Importance: High

PLCopen rule: N1 / CP1

Example

PROGRAM PLC_PRG
VAR
        xVar : BOOL;
        byVar : BYTE;
END_VAR

xVar := %IX0.0;
%QX0.0 := xVar;
%MX0.1  := xVar;
%MB1    := byVar;

--> Zugriffe auf direkte Adresse '%IX0.0'
--> Zugriffe auf direkte Adresse '%QX0.0'
--> Zugriffe auf direkte Adresse '%MX0.1'
--> Zugriffe auf direkte Adresse '%MB1'