Comparator

Name

Description

MLCompCheck

Verifies if the reference of a comparator Pipe Block has been crossed.

MLCompInit

Initializes a comparator Pipe Block with user-defined settings for use in a PLCClosed "Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events Program.

MLCompReadRef

Returns the reference position of a comparator block.

MLCompReset

Clears the Transition Flag of a comparator Pipe Block.

MLCompWriteRef

Sets the reference position of a comparator block.

Examples: Comparator Functions

When you call the MLCompWriteRef function, the output for MLCompCheck becomes TRUE as soon as the input value reaches the reference.

Comparator Functions Usage

Comparator Functions Usage

The same function can also be called for a cyclic input value.

Comparator Functions Usage

Comparator Functions Usage

When the THROUGH_ZERO parameter is set to YES, the output for MLCompCheck becomes TRUE as soon as the input value reaches the reference, but not before it has passed through zero.

Comparator Functions Usage

Comparator Functions Usage