Skip to main content

7.8.5 LT

Function

Increasing sequence, when IN1< IN2< ....< IN(n-1)< IN(n), OUT outputs 1; otherwise, it outputs 0

LD graphics

Alt text

Parameter description

Interface variableDeclarationData typeDescription
IN1Var_InputANY_ELEMENTARYComparison value 1
IN2Var_InputANY_ELEMENTARYComparison value 2
Function nameReturn valueBOOLOutput result
warning
  • ANY_ELEMENTARY contains all basic data types (bit strings, integers, floating point numbers, characters and strings, times and dates)
  • Extensible function, inputs can be added by clicking the "+" in the graph

Example

  • LD sample animation is as follows:

alt text

  • ST example is shown in the following code:
OUT:=LT(IN1:=2,IN2:=1);
OUT2:=LT(IN1:=1,IN2:=2,In3:=3,IN4:=4,IN5:=5);