Skip to content

FB: Monitor 2-Position Physical Key (2 Non-Equivalent Channels) - v1.0

This function block monitors a two-position physical key with two non-equivalent channels (normally open + normally closed) and detects discrepancy errors between them.

  • Safety-rated key switches where both NO and NC contacts must be monitored.
  • Detecting wiring faults or contact failures through discrepancy monitoring.

None.

ParameterDeclarationTypeInit. valueDescription
DI_noInputBool—IR: Normally open digital input channel
DI_ncInputBool—IR: Normally closed digital input channel
discrepancyTimeInputTimeT#500msIR: Maximum allowed time for channels to be in discrepancy state
QOutputBool—OR: 0= Off; 1= On
changingOutputBool—OR: 1= Key is transitioning between positions
errorOutputBool—OR: 1= Discrepancy error detected
statusOutputInt—OR: Current state code (see table below)
ValueDescription
0Off — key in off position
1On — key in on position
2Changing — transition in progress
0x8000Discrepancy error — channels disagree beyond discrepancyTime