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

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 Discrete channel. Feature supported in FPGA Version >= 1.9.
 
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 Discrete channel. Feature supported in FPGA Version >= 1.9.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, nai_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, nai_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_IsIOConfigurable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_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_SetBasicOpModeEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_iomode_t enable)
 This routine applies for Gen 5 Discrete Modules with FPGA Revision 10.2 or earlier. Sets the mode to either Basic or Enhanced mode for the specified Discrete channel.
Default configuration for the channels is Enhanced Input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetBasicOpModeEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_iomode_t *p_outenable)
 This routine applies for Gen 5 Discrete Modules with FPGA Revision 10.2 or earlier. Retrieves the present mode setting of either Basic or Enhanced mode for the specified Discrete channel. Default configuration for the channels is Enhanced Input.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_enable_t enable)
 Sets enhanced operation to disabled or enabled for specified Discrete channel.

 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetEnhanceTriggerEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_dt_enable_t *p_outenable)
 Retrieves the present enhance operation enable state for the specified Discrete channel. Power on default configuration for the channels is Enhanced Input.
 
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 *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_SetThreshold (int32_t cardIndex, int32_t module, int32_t channel, nai_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, nai_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, nai_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, nai_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, nai_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, nai_dt_gndswcfg_t *p_outconfig)
 Retrieves the Ground Switch configuration for the specified Discrete channel. Feature available only on PD and KB modules.
 

Detailed Description


Function Documentation

◆ naibrd_DT_GetBasicOpModeEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetBasicOpModeEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_iomode_t * p_outenable )

This routine applies for Gen 5 Discrete Modules with FPGA Revision 10.2 or earlier. Retrieves the present mode setting of either Basic or 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_outenable: (Output) Refer to nai_dt_iomode_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_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 Discrete channel. Feature supported in FPGA Version >= 1.9.

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_GetEnhanceTriggerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetEnhanceTriggerEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_enable_t * p_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]).
p_outenable: (Output) Refer to nai_dt_enable_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,
nai_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: NAI_DT_GNDSWCFG_DISABLED, or NAI_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,
nai_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) NAI_DT_IOFORMAT_INPUT, NAI_DT_IOFORMAT_OUTPUT_LOW, NAI_DT_IOFORMAT_OUTPUT_HIGH or NAI_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 * 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_GetPullUpDownResConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_GetPullUpDownResConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_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: NAI_DT_PULLRESCONFIG_OFF, NAI_DT_PULLRESCONFIG_PULLDOWN, NAI_DT_PULLRESCONFIG_PULLUP, or NAI_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,
nai_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 nai_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 * p_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]).
p_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_SetBasicOpModeEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetBasicOpModeEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_iomode_t enable )

This routine applies for Gen 5 Discrete Modules with FPGA Revision 10.2 or earlier. Sets the mode to either Basic or 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]).
enable: (Input) Refer to nai_dt_iomode_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_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 Discrete channel. Feature supported in FPGA Version >= 1.9.

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_SetEnhanceTriggerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetEnhanceTriggerEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_dt_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_dt_enable_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_SetGndSwitchConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetGndSwitchConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_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: NAI_DT_GNDSWCFG_DISABLED, or NAI_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,
nai_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) NAI_DT_IOFORMAT_INPUT, NAI_DT_IOFORMAT_OUTPUT_LOW, NAI_DT_IOFORMAT_OUTPUT_HIGH or NAI_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_SetPullUpDownResConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_SetPullUpDownResConfig ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_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: NAI_DT_PULLRESCONFIG_OFF, NAI_DT_PULLRESCONFIG_PULLDOWN, NAI_DT_PULLRESCONFIG_PULLUP, or NAI_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,
nai_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 nai_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.