Skip to content

FB: Monitor Physical Pulse Button (2 Outputs) - v1.0

This function block monitors a physical pulse button and generates two independent pulse outputs based on how long the button is held. A watchdog monitors for stuck-button conditions.

  • Short press = one action (e.g., step forward); long press = another action (e.g., jog continuous).
  • Mode selection via button hold duration.
TypeNameVersion
functionTP_TIMESiemens FB
functionTON_TIMESiemens FB
ParameterDeclarationTypeInit. valueDescription
buttonInputBoolIW: 1= Button is pressed
ACTION_1_TIMEInputTimeT#2sIR: Upper time limit for Q1. Must be less than ACTION_2_TIME
ACTION_2_TIMEInputTimeT#5sIR: Lower time limit for Q2. Must be less than WATCHDOG_TIME
WATCHDOG_TIMEInput RetainTimeT#10sIR: Watchdog time. 0= Disabled; >0= Maximum allowed press duration
PULSE_TIMEInput RetainTimeT#500msIR: Output pulse duration
Q1OutputBoolOR: Pulse on release — button held between 0s and ACTION_1_TIME
Q2OutputBoolOR: Pulse on release — button held between ACTION_2_TIME and WATCHDOG_TIME
ETOutputTimeOR: Elapsed time while button is pressed
a2w_1_watchdogOutputBoolOR: 1= Alarm warning — button held longer than WATCHDOG_TIME
OutputCondition
Q1Button released with ET > 0s and ET < ACTION_1_TIME
Q2Button released with ET > ACTION_2_TIME and ET < WATCHDOG_TIME
a2w_1_watchdogButton held longer than WATCHDOG_TIME