FB_BA_RFTrig

FB_BA_RFTrig 1:

The function block FB_BA_RFTrig is used to detect a rising or falling edge on a boolean variable.

Syntax

FUNCTION_BLOCK FB_BA_RFTrig
VAR_INPUT
  bValue    :BOOL;
END_VAR
VAR_OUTPUT
  Q         :BOOL;
  Qr        :BOOL;
  Qf        :BOOL;
END_VAR

FB_BA_RFTrig 2: Inputs

Name

Type

Description

bValue

BOOL

Value to be monitored.

FB_BA_RFTrig 3: Outputs

Name

Type

Description

Q

BOOL

TRUE for one cycle if a rising or falling edge was detected at bValue.

Qr

BOOL

TRUE for one cycle if a rising edge was detected at bValue (monitored value changes from FALSE to TRUE).

Qf

BOOL

TRUE for one cycle if a falling edge was detected at bValue (monitored value changes from TRUE to FALSE).

Requirements

Development environment

Required PLC library

TwinCAT 3.1 4024.35

Tc3_BA2_Common from V2.1.20.0