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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t active)
 Sets the bit corresponding to the specified channel in the Active Channel Register. Setting the active channel bit to "inactive" for unused channels will prevent false alarms (BIT or Open, for example) from being generated for unused channels. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outactive)
 Retrieves the bit corresponding to the specified channel in the Active Channel Register. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetD0TestParams (int32_t cardIndex, int32_t module, naibrd_ad_polarity_t polarity, float64_t range, float64_t testLevel)
 Sets the D0 Test Range and D0 Test Voltage for A/D module under test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetD0TestParams (int32_t cardIndex, int32_t module, naibrd_ad_polarity_t *p_outpolarity, float64_t *p_outrange, float64_t *p_outtestLevel)
 Retrieves the D0 Test Range and D0 Test Voltage for A/D module under test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_ad_test_type_t type, bool_t *p_outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_CheckPowerOnBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outpbitComplete)
 Retrieves the Power-On BIT (PBIT) status (complete or incomplete) for the specified module. The PBIT result will be in the BIT status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetModuleBITEnable (int32_t cardIndex, int32_t module, naibrd_cd_test_type_t type, bool_t *p_outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter.
 

Detailed Description

Function Documentation

◆ naibrd_AD_CheckPowerOnBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_CheckPowerOnBITComplete ( int32_t cardIndex,
int32_t module,
bool_t * p_outpbitComplete )

Retrieves the Power-On BIT (PBIT) status (complete or incomplete) for the specified module. The PBIT result will be in the BIT status register.

Note
This feature is only available on the ADE, ADF & ADG.
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_outpbitComplete: (Output) NAI_TRUE = PBIT complete, NAI_FALSE = PBIT not complete.
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 the module does not support Power-On BIT.

◆ naibrd_AD_GetActiveChannel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetActiveChannel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outactive )

Retrieves the bit corresponding to the specified channel in the Active Channel Register. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.

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_outactive: (Output) NAIBRD_AD_STATE_INACTIVE or NAIBRD_AD_STATE_ACTIVE.
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_AD_GetD0TestParams()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetD0TestParams ( int32_t cardIndex,
int32_t module,
naibrd_ad_polarity_t * p_outpolarity,
float64_t * p_outrange,
float64_t * p_outtestLevel )

Retrieves the D0 Test Range and D0 Test Voltage for A/D module under test.

* The D0 Test is used to check the module and the interface. All channels are disconnected from the outside world,
* allowing the user to write any voltage to all channels on the module and then read the data from voltage data
* registers.  External reference is not required.
*
*      D0 Test Range:
*                                           Register Value
*       AD1/AD4/ADE AD5 AD2/AD6/ADF  Unipolar Mode   Bipolar Mode
*      ---------------------------------------------------------------
*           N/A     N/A     N/A          0x0A           0x1A
*           N/A     N/A     N/A          0x09           0x19
*         10.00   50.00   100.00         0x00           0x10
*          5.00   25.00    50.00         0x01           0x11
*          2.50   12.50    25.00         0x02           0x12
*          1.25    6.25    12.50         0x03           0x13
*      ---------------------------------------------------------------
*
*      D0 Test Voltage:
*      The D0 Test Voltage specify the voltage to be applied to the A/D module. For C3 module, enter up to 2.5V for
*      full scale range from 0 - 25 mA.
* 
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_outpolarity: (Output) NAI_AD_POLARITY_UNIPOLAR or NAI_AD_POLARITY_BIPOLAR.
p_outrange: (Output) Range Mode as specified in table above.
p_outtestLevel: (Output) D0 Test Level.
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_AD_GetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetModuleBITEnable ( int32_t cardIndex,
int32_t module,
naibrd_ad_test_type_t type,
bool_t * p_outbitEnable )

Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

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]).
type: (Input) The BIT type to check.
p_outbitEnable: (Output) BIT Enabled (0 = disabled, 1 = 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_AD_SetActiveChannel()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetActiveChannel ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t active )

Sets the bit corresponding to the specified channel in the Active Channel Register. Setting the active channel bit to "inactive" for unused channels will prevent false alarms (BIT or Open, for example) from being generated for unused channels. The A/D multiplexes active channels. There are two separate banks of multiplexed channels; channels 1-8 are in the first bank and channels 9-16 are in the second bank. Note: Banks must have the same number of channels active- if bank 1 has two channels active, then bank 2 must also have two channels active.

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]).
active: (Input) NAIBRD_AD_STATE_INACTIVE or NAIBRD_AD_STATE_ACTIVE.
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_AD_SetD0TestParams()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetD0TestParams ( int32_t cardIndex,
int32_t module,
naibrd_ad_polarity_t polarity,
float64_t range,
float64_t testLevel )

Sets the D0 Test Range and D0 Test Voltage for A/D module under test.

* The D0 Test is used to check the module and the interface. All channels are disconnected from the outside world,
* allowing the user to write any voltage to all channels on the module and then read the data from voltage data
* registers.  External reference is not required.
*
*      D0 Test Range:
*                                          Register Value
*      AD1/AD4/ADE AD5 AD2/AD6/ADF  Unipolar Mode   Bipolar Mode
*     ---------------------------------------------------------------
*          N/A     N/A     N/A          0x0A           0x1A
*          N/A     N/A     N/A          0x09           0x19
*        10.00   50.00   100.00         0x00           0x10
*         5.00   25.00    50.00         0x01           0x11
*         2.50   12.50    25.00         0x02           0x12
*         1.25    6.25    12.50         0x03           0x13
*     ---------------------------------------------------------------
*      D0 Test Voltage:
*      The D0 Test Voltage specify the voltage to be applied to the A/D module. For C3 module, enter up to 2.5V for
*      full scale range from 0 - 25 mA.
* 
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]).
polarity: (Input) NAIBRD_AD_POLARITY_UNIPOLAR or NAIBRD_AD_POLARITY_BIPOLAR.
range: (Input) Range Mode as specified in table above.
testLevel: (Input) D0 Test Level.
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_AD_SetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetModuleBITEnable ( int32_t cardIndex,
int32_t module,
naibrd_ad_test_type_t type,
bool_t bitEnable )

Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:

UBIT (D0) - An off-line test that is used to check the card and interface. This will disconnect all channels from the I/O and to connect them across an internal stimulus. Test parameters are controlled by the user and are entered in the D0 Test Level and D0 Test Polarity registers. The outputs from the channels are monitored internally for proper conversion. External stimulus is not required.

IBIT (D3) - An off-line test that starts an initiated BIT test that disconnects all channels from the I/O and then connects them across an internal stimulus. Each channel will be checked to a pre-determined test accuracy. Test cycle is completed when D3 changes from 1 to 0. Results can be read from the Status registers. The test can be enabled or disabled at any time.

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]).
type: (Input) The BIT type to enable/disable.
bitEnable: (Input) BIT Enable (0 = disable, 1 = enable).
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 the function is not supported.

◆ naibrd_CD_GetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_CD_GetModuleBITEnable ( int32_t cardIndex,
int32_t module,
naibrd_cd_test_type_t type,
bool_t * p_outbitEnable )

Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter.

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]).
type: (Input) The BIT type to check.
p_outbitEnable: (Output) BIT Enabled (0 = disabled, 1 = 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.