Software Library API naibrd 1.62
See all documentation at naii.docs.com
Input Debounce Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t debounceTime)
 Sets the debounce time for the specified Discrete channel. Enter time in milliseconds. When a signal level is within a valid logic range (Logic High > 2.0 v, and Logic Low < 0.6 v) and maintains that level for a period longer than the Debounce time a logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored. Once valid, the interrupt transition register channel flag is set and the output logic changes state. Enter a value of 0 to disable debounce filtering. Debounce defaults to 0 upon power on or reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outdebounceTime)
 Retrieves the debounce time for the specified Discrete channel in milliseconds. When a signal level is within a valid logic range (Logic High > 2.0 v, and Logic Low < 0.6 v) and maintains that level for a period longer than the Debounce time a logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored. Once valid, the interrupt transition register channel flag is set and the output logic changes state. Enter a value of 0 to disable debounce filtering. Debounce defaults to 0 upon power on or reset.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetDebounceLSB (int32_t cardIndex, int32_t module, float64_t *p_outdebounceLSB)
 Retrieves the debounce LSB unit value in milliseconds, applicable for all Discrete channels on the module.
 

Detailed Description


Function Documentation

◆ naibrd_DT_GetDebounceLSB()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetDebounceLSB ( int32_t cardIndex,
int32_t module,
float64_t * p_outdebounceLSB )

Retrieves the debounce LSB unit value in milliseconds, applicable for all Discrete channels on the module.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
p_outdebounceLSB: (Output) Debounce Time LSB, in units of milliseconds.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetDebounceTime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetDebounceTime ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outdebounceTime )

Retrieves the debounce time for the specified Discrete channel in milliseconds. When a signal level is within a valid logic range (Logic High > 2.0 v, and Logic Low < 0.6 v) and maintains that level for a period longer than the Debounce time a logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored. Once valid, the interrupt transition register channel flag is set and the output logic changes state. Enter a value of 0 to disable debounce filtering. Debounce defaults to 0 upon power on or reset.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
p_outdebounceTime: (Output) Valid time, units of milliseconds (0 to disable Debounce)(debounce default is 0 upon reset).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_SetDebounceTime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetDebounceTime ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t debounceTime )

Sets the debounce time for the specified Discrete channel. Enter time in milliseconds. When a signal level is within a valid logic range (Logic High > 2.0 v, and Logic Low < 0.6 v) and maintains that level for a period longer than the Debounce time a logic transition is validated. Signal pulse widths less than debounce time are filtered or ignored. Once valid, the interrupt transition register channel flag is set and the output logic changes state. Enter a value of 0 to disable debounce filtering. Debounce defaults to 0 upon power on or reset.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
debounceTime: (Input) Valid time, units of milliseconds (0 to disable Debounce)(debounce default is 0 upon reset).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.