SA0035: Unused input variablesPermalink

Detects input variables that are not used by any function block instance

Justification: Unused variables make a program less readable and maintainable. Unused variables unnecessarily fill memory and unnecessarily waste runtime during initialization.

Importance: Medium

PLCopen rule: CP24

Example

FUNCTION_BLOCK AFB
VAR_INPUT
	iIn1: INT;
	iIn2: INT;
END_VAR
VAR_OUTPUT
	iOut1: INT;
END_VAR

PROGRAM PLC_PRG
VAR
	Fb1: AFB;
END_VAR

Fb1(iIn1 := 99)

--> SA0035: Unused input 'iIn2'