niSE_WaitForDebounce
- Updated2023-02-21
- 1 minute(s) read
Waits for all of the switches in the NI Switch Executive virtual device to debounce.
Function Prototype
NISEStatus __stdcall niSE_WaitForDebounce( | NISESession sessionHandle, |
NISEInt32 maxTime); |
Parameters
Input
Name | Type | Description |
---|---|---|
sessionHandle | NISESession | The session referencing this NI Switch Executive virtual device session. |
maxTime | NISEInt32 | The amount of time to wait (in milliseconds) for the debounce to complete. A value of 0 checks for debouncing once and returns an error if the system is not debounced at that time. A value of -1 means to block for an infinite period of time until the system is debounced. |
niSE_WaitForDebounce Details
This function does not return until either the switching system is completely debounced and settled or the maximum time has elapsed and the system is not yet debounced.
In the event that the maximum time elapses, the function returns an error indicating that a timeout has occurred.
To ensure that all of the switches have settled, NI recommends calling niSE_WaitForDebounce after a series of connection or disconnection operations and before taking any measurements of the signals connected to the switching system.