Software Library API naibrd 2.24.0
See all documentation at naii.docs.com

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables/disables status reporting for the specified DT channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable)
 Retrieves the enabled/disabled state of status reporting for the specified DA channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_ioformat_t format)
 Sets the Input/Output configuration for the specified Discrete channel. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_ioformat_t *p_outFormat)
 Retrieves the Input/Output configuration for the specified Discrete channel. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetOutputState (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_state_t state)
 Sets the Output State for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetOutputState (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_state_t *p_outState)
 Retrieves the Output State for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetThreshold (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_thresh_type_t type, float64_t threshold)
 Sets the threshold value for the specified Discrete channel and threshold type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetThreshold (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_thresh_type_t type, float64_t *p_outThreshold)
 Sets the threshold value for the specified Discrete channel and threshold type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetPullUpDownResConfig (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_pullresconfig_t config)
 Sets the Pull-Up/Down Resistor configuration for the specified Discrete channel. Feature available only on PD and KB modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetPullUpDownResConfig (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_pullresconfig_t *p_outconfig)
 Retrieves the Pull-Up/Down Resistor configuration for the specified Discrete channel. Feature available only on PD and KB modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetGndSwitchConfig (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_gndswcfg_t config)
 Sets the Ground Switch configuration for the specified Discrete channel. Feature available only on PD and KB modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetGndSwitchConfig (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_gndswcfg_t *p_outconfig)
 Retrieves the Ground Switch configuration for the specified Discrete channel. Feature available only on PD and KB modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetEnhancedMode (int32_t cardIndex, int32_t module, int32_t channel, naibrd_dt_enhanced_mode_t *p_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_DT_IsIOConfigurable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outconfigurable)
 Indicates if the specified Discrete channel is Input/Output configurable. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_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_DT_GetOpMode (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_enhanced_mode_t *outmode)
 Retrieves the Operation mode in Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input.
 

Detailed Description

Function Documentation

◆ naibrd_DT_GetChanStatusEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetChanStatusEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outenable )

Retrieves the enabled/disabled state of status reporting for the specified DA 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]).
p_outenable: (Output) 0 if channel status reporting is disabled or 1 if channel status reporting is enabled.
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 is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetEnhancedMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetEnhancedMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_enhanced_mode_t * p_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]).
p_outmode: (Input) Available operation modes: Refer to nai_dt_enhanced_mode_t definitions.
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 is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetGndSwitchConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetGndSwitchConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_gndswcfg_t * p_outconfig )

Retrieves the Ground Switch configuration for the specified Discrete channel. Feature available only on PD and KB modules.

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_outconfig: (Output) Ground Switch Configuration: NAIBRD_DT_GNDSWCFG_DISABLED, or NAIBRD_DT_GNDSWCFG_ENABLED.
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_GetIOFormat()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetIOFormat ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_ioformat_t * p_outFormat )

Retrieves the Input/Output configuration for the specified Discrete channel. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.

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_outFormat: (Output) NAIBRD_DT_IOFORMAT_INPUT, NAIBRD_DT_IOFORMAT_OUTPUT_LOW, NAIBRD_DT_IOFORMAT_OUTPUT_HIGH or NAIBRD_DT_IOFORMAT_OUTPUT_PUSHPULL.
*    Each channel have two bits to represent IO format,
*        For KA modules, only Channels 13-16 are configurable. Channel IO format can be one of the two values:
*              D1   D0
*              0    0     Input
*              0    1     Output, Low-side switched
*
*        For K6 modules, Channel IO format can be one of the four values:
*              D1   D0
*              0    0     Input
*              0    1     Output, Low-side switched, with/without current pull up
*              1    0     Output, High-side switched, with/without current pull down
*              1    1     push-pull </param>
* 
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 is specified or for KA modules, a non-configurable channel is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetOpMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetOpMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_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_dt_enhanced_mode_t definitions.
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 is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetOutputState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetOutputState ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_state_t * p_outState )

Retrieves the Output State for the 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]).
  • Parameters
    channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
    p_outState: (Output) NAIBRD_DT_STATE_LO or NAIBRD_DT_STATE_HI.
    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 is specified.

    NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_GetPullUpDownResConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetPullUpDownResConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_pullresconfig_t * p_outconfig )

Retrieves the Pull-Up/Down Resistor configuration for the specified Discrete channel. Feature available only on PD and KB modules.

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_outconfig: (Output) Pull Up/Down Resistor Configuration: NAIBRD_DT_PULLRESCONFIG_OFF, NAIBRD_DT_PULLRESCONFIG_PULLDOWN, NAIBRD_DT_PULLRESCONFIG_PULLUP, or NAIBRD_DT_PULLRESCONFIG_BOTH.
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_GetThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetThreshold ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_thresh_type_t type,
float64_t * p_outThreshold )

Sets the threshold value for the specified Discrete 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 Type: refer to naibrd_dt_thresh_type_t definition.
p_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 module 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_DT_IsIOConfigurable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_IsIOConfigurable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outconfigurable )

Indicates if the specified Discrete channel is Input/Output configurable. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.

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]).
outconfigurable: (Output) 0 if channel is not configurable, 1 if channel is configurable.
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 is specified or for KA modules, a non-configurable channel is specified.

◆ naibrd_DT_SetChanStatusEnable()

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

Enables/disables status reporting for the specified DT 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 or 1 to enable status reporting for a channel.
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 is specified.
  • NAI_ERROR_INVALID_VALUE when invalid enable parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_SetGndSwitchConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetGndSwitchConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_gndswcfg_t config )

Sets the Ground Switch configuration for the specified Discrete channel. Feature available only on PD and KB modules.

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]).
config: (Input) Ground Switch Configuration: NAIBRD_DT_GNDSWCFG_DISABLED, or NAIBRD_DT_GNDSWCFG_ENABLED.
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_SetIOFormat()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetIOFormat ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_ioformat_t format )

Sets the Input/Output configuration for the specified Discrete channel. For KA modules, only channels 13-16 are configurable, channels 1-12 are output-only channels, and channels 17-28 are input-only channels.

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]).
format: (Input) NAIBRD_DT_IOFORMAT_INPUT, NAIBRD_DT_IOFORMAT_OUTPUT_LOW, NAIBRD_DT_IOFORMAT_OUTPUT_HIGH or NAIBRD_DT_IOFORMAT_OUTPUT_PUSHPULL.
*    Each channel have two bits to represent IO format,
*        For KA, KB modules, Channel IO format can be one of the two following values, with only Channels 13-16 configurable
*        on the KA module)
*              D1   D0
*              0    0     Input
*              0    1     Output, Low-side switched
*
*        On all other DT modules, Channel IO format can be one of the four values:
*              D1   D0
*              0    0     Input
*              0    1     Output, Low-side switched, with/without current pull up
*              1    0     Output, High-side switched, with/without current pull down
*              1    1     push-pull </param>
* 
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 is specified or for KA modules, a non-configurable channel is specified.
  • NAI_ERROR_INVALID_VALUE when invalid format type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_SetOpMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetOpMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_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_dt_enhanced_mode_t definitions.
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 is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_SetOutputState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetOutputState ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_state_t state )

Sets the Output State for the 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]).
state: (Input) NAIBRD_DT_STATE_LO or NAIBRD_DT_STATE_HI.
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 is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_SetPullUpDownResConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetPullUpDownResConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_pullresconfig_t config )

Sets the Pull-Up/Down Resistor configuration for the specified Discrete channel. Feature available only on PD and KB modules.

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]).
config: (Input) Pull Up/Down Resistor Configuration: NAIBRD_DT_PULLRESCONFIG_OFF, NAIBRD_DT_PULLRESCONFIG_PULLDOWN, NAIBRD_DT_PULLRESCONFIG_PULLUP, or NAIBRD_DT_PULLRESCONFIG_BOTH.
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_SetThreshold()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetThreshold ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_dt_thresh_type_t type,
float64_t threshold )

Sets the threshold value for the specified Discrete 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 Type: refer to naibrd_dt_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 module 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.