Table of Contents

RisingTrigger

Namespace
ZCore
Implements

This function block can be used to check if a variable changed from FALSE to TRUE by providing it to the method (Trigger)[xref:ZCore.RisingTrigger#Trigger]. If that happens, the trigger method returns TRUE for exactly one call. The function block implements the same behavior as R_TRIG.

FUNCTION_BLOCK RisingTrigger IMPLEMENTS ZCore.ITrigger

Methods

HasTriggered

returns TRUE if the last call to Trigger returned TRUE as well

METHOD HasTriggered () : BOOL

Returns

BOOL

Trigger

Returns TRUE if input changed from FALSE to TRUE in consecutive calls to this method.

IF rising.Trigger(_io.IsActive())
THEN
  ;(* do something here *);
END_IF
METHOD Trigger (
 input : BOOL) : BOOL

Inputs

input BOOL

variable or output of a function/function block which should be observed to a rising trigger

Returns

BOOL