Skip to main content

6.1.3.6.1 INRANGE

Function

When the ON input is 1 and IN is not less than MN and not greater than MX, the OUT output is 1; otherwise, the output is 0

LD Graphics

alt text

Parameter description

Interface variableDeclarationData typeDescription
ONVar_InputBOOLFunction input
INVar_InputANY_ELEMENTARYThe value to be compared
MXVar_InputANY_ELEMENTARYUpper range
MNVar_InputANY_ELEMENTARYRange lower limit
Return valueFunction valueBOOLFunction output
warning
  • ANY_ELEMENTARY contains all basic data types (bit strings, integers, floating point numbers, characters and strings, times and dates)
  • ST language relational expression:
OUT := ON & (MX>=IN) & (IN>=MN);

Example

  • LD sample animation is as follows:

alt text

  • ST sample animation is as follows: alt text