Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:qview:qview_6:qcl_library:ir10edge [2017/01/20 11:36] – [IR10Edge] qem103 | en:software:qview:qview_6:qcl_library:ir10edge [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== IR10Edge ====== | ||
+ | |||
+ | **I = **//Input// | ||
+ | |||
+ | **R = **//Reading functions// | ||
+ | |||
+ | The IR10Edge function __detects the rising edge or falling is a digital signal__. | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **IR10Edge (Input, Type, Time, Init, Result)** | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | INPUT GLOBAL | ||
+ | | IN | CONST | Type | F |Front type to be analyzed, 0 for descent, 1 to rise.| | ||
+ | | IN | CONST | Time | L |Time signal verification. With zero value the time to check is disabled.| | ||
+ | | IN | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | In the example the " | ||
+ | |||
+ | <code QCL> | ||
+ | gfInit = 0 | ||
+ | |||
+ | MAIN: | ||
+ | </ | ||
+ | **IR10Edge ( Input, 1, 1000, gfInit, gfResult)** | ||
+ | <code QCL> | ||
+ | IF gfResult | ||
+ | | ||
+ | | ||
+ | ENDIF | ||
+ | gfInit = 1 | ||
+ | |||
+ | WAIT 1 | ||
+ | JUMP MAIN | ||
+ | END | ||
+ | </ | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | * In order to be effective, the function should be placed at a point of the application that runs on every logical round. | ||
+ | * The result flag is set to 1 only if the front condition it occurs, otherwise it remains unchanged. | ||
+ | * The Init flag this is useful if the unit was reactivated with TRESTART command and allows to initialize the function. | ||