SA0162: Missing commentsPermalink

Detects uncommented locations in the program

Justification: Complete commenting is required by many programming guidelines, and it increases the readability and maintainability of the code.

Importance: Low

PLCopen rule: C2

Comments are required in the following cases:

  • Declaration of variables (Comments are located either above the declaration or to the right of the declaration.)

  • Declaration of programs, function blocks, or methods (Comments are located above the declaration in the first line.)

Example

PROGRAM PLC_PRG
VAR
	iMaxValue:  INT;
END_VAR

--> SA0162: Missing comment for 'PLC_PRG'
--> SA0162: Missing comment for 'iMaxValue'