Compare in Advanced Ladder

See also: Limit in Advanced Ladder

See also: Project Toolbox for Advanced Ladder

 

Topic Menu

Compare Functions in Cscape

 

Home > View > Project Toolbox > Compare Operations

The Compare Operations act as conditions for a rung of ladder logic, like contacts but for values instead of bits. If the comparison is TRUE, then power can pass through the function and on down the ladder rung. If the comparison is FALSE, power cannot pass through. A comparison operation that has already been placed in the Ladder Logic program may be changed to a different type of comparison by right-clicking the function and selecting Change Compare Type (except Limit).

Equal

This comparison checks the equality of two values. If Equal, power can pass through.

TRUE if IN1 = IN2

Equal Parameters

Power Flow

The Equal function will allow power to pass through if IN1 is Equal to IN2. There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Not Equal

This comparison checks the equality of two values. If Not Equal, power can pass through.

Not Equal Parameters
  • IN1/IN2: Variables/registers or static numbers to compare

  • Type: The data format of the values being compared. BYTE, INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow

The Not Equal function will allow power to pass through if IN1 is Not Equal to IN2. There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Less Than

This comparison checks for a value to be Less Than another value. If TRUE, power can pass through.

TRUE if IN1 < IN2

Less Than Parameters
  • IN1: Variable/register or static number to be compared

  • IN2: Variables/register or static number to compared against

  • Type: The data format of the values being compared. BYTE, INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow

The Less Than function will allow power to pass through if IN1 is Less Than IN2. There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Greater Than

This comparison checks for a value to be Greater Than another value. If TRUE, power can pass through.

TRUE if INI1 > IN2

Greater Than Parameters
  • IN1: Variable/register or static number to be compared

  • IN2: Variables/register or static number to compared against

  • Type: The data format of the values being compared. BYTE, INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow

The Greater Than function will allow power to pass through if IN1 is Greater Than IN2.

There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Less Than or Equal To

This comparison checks for a value to be Less Than or Equal To another value. If TRUE, power can pass through.

TRUE if IN1 ≤ IN2

Less Than or Equal To Parameters
  • IN1: Variable/register or static number to be compared

  • IN2: Variables/register or static number to compared against

  • Type: The data format of the values being compared. BYTE, INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow
  • The Less Than or Equal To function will allow power to pass through if IN1 is Less Than or Equal To IN2.

  • There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Greater Than or Equal To

This comparison checks for a value to be Greater Than or Equal To another value. If TRUE, power can pass through.

TRUE if IN1 ≥ IN2

Greater Than or Equal To Parameters
  • IN1: Variable/register or static number to be compared

  • IN2: Variables/register or static number to compared against

  • Type: The data format of the values being compared. BYTE, INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow

The Greater Than or Equal To function will allow power to pass through if IN1 is Greater Than or Equal To IN2. There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Return to the Top: Compare in Advanced Ladder