How Can I Change the Settling (Debounce) Time of my NI Switch Device?Primary Software: Driver Software>>NI-DAQmxPrimary Software Version: 8.3 Primary Software Fixed Version: N/A Secondary Software: N/A Hardware: Switches
Problem: How Can I Change the Settling (Debounce) Time of my National Instruments Switch Device? Solution: You can change the switch settling time (sometimes called debounce time) for your device using either the NI-DAQmx or NI-Switch driver. To do this, use the Settling Time property of either driver. Both drivers will add the time to the settling time of the motherboard. To access this property: In LabVIEW Place either a DAQmx Switch Device or an niSwitch Property Node from the Measurement I/O subpallet of the functions pallet on the block diagram. If you are using the DAQmx Switch Device Property Node, click the property and select Settling Time. If you are using the niSwitch Property Node, click on the property and select Module Characteristics » Settling Time as shown in the screenshot below.
In C Language APIs In C language APIs (e.g. Visual Basic, Visual Studio .NET, etc.) your functionc all will depend on which driver you intend to use. If you are using the DAQmx driver, you should call the DAQmxSetSwitchDevSettlingTime property. If you are using the NI Switch driver, call the niSwitch_SetAttributeViReal64 function with the ViAttr attributeID set to "NISWITCH_ATTR_SETTLING_TIME" . To learn more about these functions, consult the NI-DAQmx C Reference Help and the NI Switches Help, respectively. These can be located from the start menu by navigating to Start » All Programs » National Instruments and selecting the appropriate folder for your driver of choice. Note: Modify this time only if the default settling time is insufficient. This will modify the debounce time for all programs that access the switch, including Switch Executive. A common use case is to change the debounce time of switches called by the Switch Executive API in TestStand. To do this, call a step in the beginning of the TestStand Sequence that references the switch and changes the settling time. This step can be in any programming language. Refer to the attached screenshot below for an example of the step in LabVIEW. Related Links: Product Manual: NI Switches Help Product Manual: NI Switches Getting Started Guide Getting Started with NI-DAQmx Attachments:
Report Date: 02/09/2007 Last Updated: 12/17/2008 Document ID: 4688CMOY |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

