The Behavior Behind niSwitch Wait for Debounce VI

Updated Mar 24, 2026

Reported In

Hardware

  • Switch
  • Relay

Driver

  • NI-SWITCH

Issue Details

  • How do the niSwitch Wait For Debounce VI know if the hardware debounce is already settled? What is the behavior of this function?
  • How does the niSwitch Wait for Debounce VI work behind the scenes?
  • I am using the Wait for Debounce VI on my PXI(e) switch or relay. What steps is this VI performing in the background?

Solution

The niSwitch Wait for Debounce VI blocks the device until the settling time has expired. The settling time varies depending on the type of relay on the instrument. However, this can be configured by the user via the NISWITCH_ATTR_SETTLING_TIME attribute.

 

When the hardware driver flips a relay, a countdown timer starts based on the duration specified by NISWITCH_ATTR_SETTLING_TIME. The VI continuously polls the hardware to check if the timer has expired. The polling mechanism varies depending on the hardware architecture (e.g. CA4, CA3, SwitchBlock).

 

Once the timer has expired, the VI unblocks the device, allowing the next function to proceed.

Additional Information

The default settling time should be enough to ensure relays have settled in most cases. However, this does not cover all possible applications. If it is necessary to modify the settling time, it is recommended to observe the signal with an oscilloscope to determine a settling time that is balances program execution speed and device safety.