SA0036: Unused output variables

Function

Determines output variables that are not assigned within the respective function block.

Reason

Unused variables make a program less easy to read and maintain. Unused variables occupy unnecessary memory space and take up unnecessary runtime during the initialization.

Importance

Medium

PLCopen rule

CP24

Sample:

Function block FB_Sample:

FUNCTION_BLOCK FB_Sample
VAR_INPUT
    bIn1  : BOOL;
    bIn2  : BOOL;                // => SA0035
END_VAR
VAR_OUTPUT
    bOut1 : BOOL;
    bOut2 : BOOL;                // => SA0036
END_VAR
bOut1 := bIn1;