Beckhoff Automation GmbH & Co. KG TX1200 — 7.2.6.2 MAX

Reference programming Example in IL: Var1 :BYTE; LD 2#1001_0011 ROR 3 ST Var1 (* Result is 2#0111_0010 *) 7.2.6 Selection Operators 7.2.6.1 SEL Binary Selection. OUT := SEL(G, IN0, IN1) means: OUT := IN0 if G=FALSE;OUT := IN1 if G=TRUE. IN0, IN1 and OUT can be any type of variable, G must be BOOL. The result of the selection is IN0 if G is FALSE, IN1 if G is TRUE. Example in IL: LD TRUE SEL 3,4 ST Var1 (* Result is 4 *) LD FALSE SEL 3,4 ST Var1 (* Result is 3 *) Example in FBD: For the purpose of the run time optimization, one processes as follows: An expression, which is upstream IN0, is calculated only if G is FALSE. An expression of the IN1 is upstream, is calculated only if G is TRUE!

7.2.6.2 MAX Maximum function. Returns the greater of the two values. OUT := MAX(IN0, IN1) IN0, IN1 and OUT can be any type of variable. Example in IL: LD 90 MAX 30 MAX 40 MAX 77 ST Var1 (* Result is 90 *) TX1200 204 Version: 1.3