Chapter 4. Ladder Diagram (LD) Programming
106
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
4.5.2
Edge Detectors
Falling Edge Trigger
Rising Edge Trigger
These function blocks detect the changing state of a Boolean signal and produce a single pulse when
an edge is detected.
When transitional instructions, such as
, are used inside a
function block, there is a problem when the same function block is called more than once per scan.
The first call executes the transition correctly but subsequent calls do not because they see the state
as adjusted from the first call. The rising and falling edge trigger instructions solve this problem.
These instructions have their own instance data that can be a member or an input of the function
block so that the transition state follows that of the function block instance and not the function
block.
If an edge detector function block is used within a UDFB, its instance data must be a member
variable of the UDFB.
Operands
Parameter Description
Allowed Operands
Optional
????
Instance data for function block. This is a
structure variable, described below.
F_TRIG, R_TRIG
No
CLK
Input to be monitored for a change in state. All
Yes
Q
Edge detection output.
Must be flow in LD. In other languages all
types allowed except S, SA, SB, SC and
constants.
Yes
Instance Data Structure
These elements cannot be published or written to.
Element Name
Type
Description
CLK
BOOL
Edge detection input. Not accessible in user logic.
Q
BOOL
Edge detection output. Accessible in user logic. Read only.
STATE
BOOL
Internal value. Not accessible in user logic.
ENO
BOOL
Enable Output. User logic can access as read-only.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...