SA0115: Declarations with data type UNION

Function

Determines declarations of a UNION data type and declarations of variables of the type of a UNION.

Reason

The IEC-61131-3 standard has no provision for unions. The code becomes easier to port if there are no unions.

Importance

Low

Samples:

Union U_Sample:

TYPE U_Sample :                  // => SA0115 
UNION
    fVar    : LREAL;
    nVar    : LINT;
END_UNION
END_TYPE

MAIN program:

PROGRAM MAIN
VAR
    uSample : U_Sample;          // => SA0115
END_VAR