LT
Function Name |
LT (Less Than) |
---|---|
Description |
Outputs a True value when Input 1 is less than the other inputs. |
Arguments |
Input 1 to Input n {ANY} For more information on the data types for the inputs and outputs, see Data Type Hierarchy. |
Returns |
Output {BOOL} The output is True only if Input 1 is less than the other input values. If Input 1 is greater than or equal to any of the other inputs, the LT function outputs a False value. |
Example:
Function Block Diagram - LT:
An LT function has 2 inputs (in this case, 2 constant values). Input 1 is has a value of 2 and Input 2 has a value of 4. The LT function outputs a True value as Input 1 is less than the other inputs.
If Input 1 was changed to have a value of 4, the LE function would output a False value as Input 1 would be equal to Input 2; it would not be less than Input 2. It is only when Input 1 is less than the other Inputs that the LT function outputs a True value.
ST Program - LT:
The syntax for an LT function in an ST Program is:
- Output := LT (Input 1, Input n)
Where Output, Input 1 and Input n are defined as variables earlier in the ST program. Each input is separated by a comma and is a Boolean. The Output value is also a Boolean.
Alternatively, you can use an operator:
- Output := (Input 1 < Input n);