Software Library API naibrd 1.62
See all documentation at naii.docs.com
Channel Configuration Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetThreshold (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_thresh_type_t type, float64_t threshold)
 Sets the threshold value for the specified Discrete Switch channel and threshold type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetThreshold (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_thresh_type_t type, float64_t *outthreshold)
 Sets the threshold value for the specified Discrete Switch channel and threshold type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t debounceTime)
 Sets the debounce time for the specified Discrete Switch channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetDebounceTime (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outdebounceTime)
 Retrieves the debounce time for the specified Discrete Switch channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetPullUpSourceEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Sets the Pull Up Source enable for the specified Discrete Switch channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetPullUpSourceEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Retrieves the Pull Up Enable for the specified Discrete Switch channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_enhanced_mode_t mode)
 Sets the Operation mode in Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input. For KA and K6 modules, valid modes will be limited to PWM_FOREVER and basic modes only.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_enhanced_mode_t *outmode)
 Retrieves the Operation mode in Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_enable_t enable)
 Sets enhanced operation to disabled or enabled for specified Discrete channel.

 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dsw_enable_t *outenable)
 Retrieves the present enhance operation enable state for the specified Discrete channel. Power on default configuration for the channels is Enhanced Input.
 

Detailed Description


Function Documentation

◆ naibrd_DSW_GetDebounceTime()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetDebounceTime ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outdebounceTime )

Retrieves the debounce time for the specified Discrete Switch channel.

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]).
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 card 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_DSW_GetEnhanceTriggerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetEnhanceTriggerEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_enable_t * outenable )

Retrieves the present enhance operation enable state for the specified Discrete channel. Power on default configuration for the channels is Enhanced Input.

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]).
outenable: (Output) Refer to nai_dsw_enable_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DSW_GetOpMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetOpMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_enhanced_mode_t * outmode )

Retrieves the Operation mode in Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input.

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]).
outmode: (Input) Available operation modes: Refer to nai_dsw_enhanced_mode_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DSW_GetPullUpSourceEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetPullUpSourceEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outenable )

Retrieves the Pull Up Enable for the specified Discrete Switch channel.

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]).
outenable: (Output) 0 to disable, 1 to enable Pull Up.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DSW_GetThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_GetThreshold ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_thresh_type_t type,
float64_t * outthreshold )

Sets the threshold value for the specified Discrete Switch channel and threshold type.

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]).
type: (Input) Threshold Types: refer to nai_dsw_thresh_type_t definition.
outthreshold: (Output)Threshold Voltage (KA: 0-40 VDC, otherwise 0-60 VDC).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter.
  • NAI_ERROR_INVALID_VALUE when invalid format type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DSW_SetDebounceTime()

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

Sets the debounce time for the specified Discrete Switch channel.

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 card 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_DSW_SetEnhanceTriggerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetEnhanceTriggerEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_enable_t enable )

Sets enhanced operation to disabled or enabled for specified Discrete channel.

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]).
enable: (Input) Refer to nai_dsw_enable_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DSW_SetOpMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetOpMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_enhanced_mode_t mode )

Sets the Operation mode in Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input. For KA and K6 modules, valid modes will be limited to PWM_FOREVER and basic modes only.

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]).
mode: (Input) Available operation modes: Refer to nai_dsw_enhanced_mode_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DSW_SetPullUpSourceEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetPullUpSourceEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Sets the Pull Up Source enable for the specified Discrete Switch channel.

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]).
enable: (Input) 0 to disable, 1 to enable pull up source.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DSW_SetThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DSW_SetThreshold ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dsw_thresh_type_t type,
float64_t threshold )

Sets the threshold value for the specified Discrete Switch channel and threshold type.

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]).
type: (Input) Threshold Types: refer to nai_dsw_thresh_type_t definition.
threshold: (Input)Threshold Voltage (KA: 0-40 VDC, otherwise 0-60 VDC).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter.
  • NAI_ERROR_INVALID_VALUE when invalid format type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.