Trigger

Name

Description

MLTrigClearFlag

Clears the flag of an initiated Trigger block.

MLTrigInit

Initializes a Trigger object for use in a PLC program.

MLTrigIsTrigged

Checks if the selected block has been triggered.

MLTrigReadDelay

Returns the time the trigger block uses to compensate the delay of the sensor that captures the triggering signal.

MLTrigReadPos

Returns the position of the block at the moment when it was triggered.

MLTrigReadTime

Returns the time of the moment where the block was triggered in milliseconds.

MLTrigSetEdge

Sets the edge configuration for a trigger block (e.g., rising, falling, etc.)

MLTrigWriteDelay

Sets the time the trigger block uses to compensate for the delay introduced by the sensor that captures the triggering signal.

Example: Trigger Functions

When you call the MLTrigClearFlag function, the flag for trigger is reset to False.

When a Fast Input is set, the MLTrigIsTriggered function returns TRUE.

Then you can call the MLTrigReadPos and MLTrigReadTime functions to get more details.

Figure 1: Trigger Functions Usage