Configuration | Rules nDeceleration : UINT; nDirectionChange : USINT; END_STRUCT END_TYPE Structure ST_4Byte: TYPE ST_4Byte : STRUCT fDummy : REAL; END_STRUCT END_TYPE 4.2.1.7.2 SA0162: Missing comments | SA0162: Missing comments Samples: The following sample generates the error "SA0162: Missing comment for 'b1'" for variable b1. // Comment for MAIN program PROGRAM MAIN VAR b1 : BOOL; // Comment for variable b2 b2 : BOOL; b3 : BOOL; // Comment for variable b3 END_VAR 4.2.1.7.3 SA0163: Nested comments | SA0163: Nested comments Samples: The four nested comments identified accordingly in the following sample each result in the error: "SA0163: Nested comment ' '".
(* That is (* nested comment number 1 *) *) PROGRAM MAIN VAR (* That is // nested comment number 2 *) a : DINT; b : DINT; (* That is (* nested comment number 3 *) *) c : BOOL; nCounter : INT; END_VAR TE1200 73 Version: 2.11.1 Function Detects uncommented locations in the program. Comments are required for: • the declaration of variables. The comments are shown above or to the right. • the declaration of POUs, DUTs, GVLs or interfaces. The comments are shown above the declaration (in the first row). Reason Full commentary is required by many programming guidelines. It increases the readability and maintainability of the code.
Importance Low PLCopen rule C2 Function Determines code positions with nested comments. Reason Nested comments are difficult to read and should be avoided. Importance Low PLCopen rule C3