Exact parameter type strings preserved from workbook definitions (STRING (255), INT, TIME, etc.)
Expected parameter style and type hints for common Standard and Util FBs (TIMELOW : TIME, OUT : BOOL, ACTUAL : REAL, etc.)
ENABLE => used instead of EN/ENO
Examples of Issues Detected
(* Array bounds *)
myArray : ARRAY[5..0] OF INT; (* ERROR: start > end *)
(* REAL literal *)
myVal : REAL := 42; (* WARNING: should be 42.0 *)
(* FOR loop *)
FOR i = 0 TO 9 DO (* ERROR: use := not = *)
FOR i := 0 TO 9 (* WARNING: missing DO *)
(* CASE *)
CASE myVar (* ERROR: missing OF *)
(* Constant *)
VAR CONSTANT pi : REAL; END_VAR (* ERROR: missing := *)
(* Assignment *)
myVar = 5; (* WARNING: use := *)
(* Timer call *)
myTon(Q => result); (* WARNING: missing IN and PT *)
(* Util.BLINK call *)
myBlink(ENABLE := start, TIMELOW := T#100ms, TIMEHIGH := T#200ms, OUT => led);
(* WARNING: missing expected BLINK parameters or incorrect parameter styles *)
(* Block mismatch *)
IF cond THEN
...
END_FOR; (* ERROR: END_FOR closes FOR, not IF *)