Beckhoff Automation GmbH & Co. KG TX1200 — 7.5 Compiler Errors

Reference programming An assignment i:=10*y implicitly produces the following in this example: i := CheckRangeSigned(10*y, 0, 4095); Even if y for example has the value 1000, then i still has only the value 4095 after this assignment. Value of variable/continuous loop NOTICE If neither of the functions CheckRangeSigned [ } 221] or CheckRangeUnsigned is present, no type checking of subrange types occurs during runtime! The variable i could then take on any value between –32768 and 32767 at any time! If a function CheckRangeSigned or CheckRangeUnsigned is is implemented as shown above, a continuous loop can develop with the use subrange types in a FOR loop.

This occurs exactly if the area indicated for the FOR loop is just as large or larger than that subrange types! Example: VAR ui : UINT (0..10000); END_VAR FOR ui:=0 TO 10000 DO ... END_FOR The FOR loop is not left, because ui cannot became larger than 10000. Likewise, the contents of the CheckRange functions are to be considered when using increment values in the FOR loop! 7.5 Compiler Errors Here you will find the error messages that the parser displays (italics) and possible causes. TX1200 223 Version: 1.3