Reference programming Example in IL: LD 2 INT_TO_REAL MUL 3.5 7.2.9.11 TRUNC Converting from REAL to INT. The whole number portion of the value will be used. When you perform a type conversion from a larger to a smaller type, you risk losing some information. Examples in ST: i:=TRUNC(1.9); (* Result is 1 *). i:=TRUNC(-1.4); (* Result is -1 *). Example in IL: LD 2.7 TRUNC GE %MW8 Similar Functions LTRUNC FLOOR 7.3 Operands 7.3.1 Constants 7.3.1.1 BOOL constants BOOL-Constants are the logical values TRUE and FALSE. 7.3.1.2 TIME constants TIME constants can be declared in TwinCAT PLC Control. These are generally used to operate the timer in the standard library.
A TIME constant is always made up of an initial "t" or "T" (or "time" or "TIME" spelled out) and a number sign "#".This is followed by the actual time declaration which can include days (identified by "d"), hours (identified by "h"), minutes (identified by "m"), seconds (identified by "s") and milliseconds (identified by "ms"). Please note that the time entries must be given in this order according to length (d before h before m before s before m before ms) but you are not required to include all time increments. Examples of correct TIME constants in a ST assignment:
TIME1 := T#14ms; TIME1 := T#100S12ms; (*The highest component may be allowed to exceed its limit*) TIME1 := t#12h34m15s; would be not correct: TIME1 := t#5m68s; (*limit exceeded in a lower component*) TX1200 213 Version: 1.3