R_TRIG block

Short summary

Name

R_TRIG

→POU type

→function block

Category

IEC-block, Edge

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/check.svg no restrictions

Graphical interface

images/download/thumbnails/414781791/R_TRIG-version-1-modificationdate-1535026792566-api-v2.png

Available since

version 1.4.1 (for logi.CAD 3)

Functionality

This block detects a rising edge.

→Turning input CLK on triggers output Q to return value TRUE (or an equivalent) from one execution of the function block to the next. Output Q returns value FALSE (or an equivalent) at the next execution .

Observe:

If the input CLK is connected to value TRUE, output Q returns TRUE after its first execution following a →cold restart. Output Q returns FALSE following all subsequent executions.

In-/outputs


Identifier

→Data type

Description

Inputs:

CLK

BOOL

current value

Outputs:

Q

BOOL

flag showing rising edge detection

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

Example for usage within ST-editor

PROGRAM Test
VAR
Activator : R_TRIG;
Out : BOOL;
Trigger : BOOL;
END_VAR
 
Activator(CLK := Trigger, Q => Out);
(* Instance of block 'R_TRIG' is called. *)
(* Input 'CLK' gets value from 'Trigger' variable. *)
(* Output 'Q' returns TRUE for one cycle, if 'Trigger' was FALSE and is now TRUE. *)
(* Variable 'Out' accesses the output 'Q'. *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.