Software Library API naibrd 1.62
See all documentation at naii.docs.com
Built-in Test Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChannelState (int32_t cardIndex, int32_t module, int32_t channel, nai_ad_state_t state)
 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) from being generated for unused channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChannelState (int32_t cardIndex, int32_t module, int32_t channel, nai_ad_state_t *p_outstate)
 Retrieves 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) from being generated for unused channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConfigureD0Test (int32_t cardIndex, int32_t module, nai_ad_range_mode_t mode, 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_GetD0TestSettings (int32_t cardIndex, int32_t module, nai_ad_range_mode_t *p_outmode, 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_SetTestEnable (int32_t cardIndex, int32_t module, nai_ad_test_type_t type, bool_t enable)
 Sets the A/D D0, D2 or D3 BIT Test Enable state for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetTestEnable (int32_t cardIndex, int32_t module, nai_ad_test_type_t type, bool_t *p_outenable)
 Retrieves the A/D D0, D2 or D3 BIT Test Enable state for the specified A/D module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_CheckD2TestVerify (int32_t cardIndex, int32_t module)
 Checks the D2 Test Verify register for the value of 0x55. When the D2 Test is enabled, the board will write 0x55 to the D2 Test Verify register. This register can be cleared to 0x00 and then read again, after approximately one second, to verify that background BIT testing is activated.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearD2TestVerify (int32_t cardIndex, int32_t module)
 Clears the D2 Test Verify register. When the D2 Test is enabled, the board will write 0x55 to the D2 Test Verify register. After this register is cleared to 0x00, after approximately one second, call naibrd_AD_CheckD2TestVerify to verify that the board wrote 0x55 to the D2 Test Verify register, verifying that background BIT testing is activated.
 
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.
 

Detailed Description


Function Documentation

◆ naibrd_AD_CheckD2TestVerify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_CheckD2TestVerify ( int32_t cardIndex,
int32_t module )

Checks the D2 Test Verify register for the value of 0x55. When the D2 Test is enabled, the board will write 0x55 to the D2 Test Verify register. This register can be cleared to 0x00 and then read again, after approximately one second, to verify that background BIT testing is activated.

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]).
Returns
  • NAI_SUCCESS when D2 is complete
  • 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.
  • NAI_ERROR_NOT_READY when D2 is not complete

◆ 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_ClearD2TestVerify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ClearD2TestVerify ( int32_t cardIndex,
int32_t module )

Clears the D2 Test Verify register. When the D2 Test is enabled, the board will write 0x55 to the D2 Test Verify register. After this register is cleared to 0x00, after approximately one second, call naibrd_AD_CheckD2TestVerify to verify that the board wrote 0x55 to the D2 Test Verify register, verifying that background BIT testing is activated.

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

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_ConfigureD0Test ( int32_t cardIndex,
int32_t module,
nai_ad_range_mode_t mode,
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
       C4      C2      C1  AD1/AD4/ADE AD5 AD2/AD6/ADF  Unipolar Mode   Bipolar Mode
     ------------------------------------------------------------------------------------
     50.00   40.00     N/A     N/A     N/A     N/A          0x0A           0x1A
     25.00   20.00     N/A     N/A     N/A     N/A          0x09           0x19
     12.50   10.00   10.00   10.00   50.00   100.00         0x00           0x10
      6.25    5.00    5.00    5.00   25.00    50.00         0x01           0x11
       N/A     N/A    2.50    2.50   12.50    25.00         0x02           0x12
       N/A     N/A    1.25    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]).
mode: (Input) NAI_AD_RANGE_MODE_UNIPOLAR or NAI_AD_RANGE_MODE_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_GetChannelState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetChannelState ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ad_state_t * p_outstate )

Retrieves 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) from being generated for unused 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_outstate: (Output) NAI_AD_STATE_INACTIVE or NAI_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_GetD0TestSettings()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetD0TestSettings ( int32_t cardIndex,
int32_t module,
nai_ad_range_mode_t * p_outmode,
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
       C4      C2      C1  AD1/AD4/ADE AD5 AD2/AD6/ADF  Unipolar Mode   Bipolar Mode
     ------------------------------------------------------------------------------------
     50.00   40.00     N/A     N/A     N/A     N/A          0x0A           0x1A
     25.00   20.00     N/A     N/A     N/A     N/A          0x09           0x19
     12.50   10.00   10.00   10.00   50.00   100.00         0x00           0x10
      6.25    5.00    5.00    5.00   25.00    50.00         0x01           0x11
       N/A     N/A    2.50    2.50   12.50    25.00         0x02           0x12
       N/A     N/A    1.25    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_outmode: (Output) NAI_AD_RANGE_MODE_UNIPOLAR or NAI_AD_RANGE_MODE_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_GetTestEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_GetTestEnable ( int32_t cardIndex,
int32_t module,
nai_ad_test_type_t type,
bool_t * p_outenable )

Retrieves the A/D D0, D2 or D3 BIT Test Enable state for the specified A/D module.

The D2 Test initiates automatic background BIT testing. Each channel is checked every 10% from Positive Full Scale
to Negative Full Scale to a testing accuracy of 0.2% Full Scale and each Signal and Reference is always
monitored. Any failure triggers an interrupt (if enabled) and the results are available in BIT Status register.
The testing is totally transparent to the user, requires no external programming, has no effect on the standard
operation of the board, and can be enabled or disabled.

The D3 Test initiates a BIT test that disconnects all channels from the outside world and connects them across
an internal stimulus that generates and tests each channel to a test accuracy of 0.2% Full Scale. The results are
available in BIT Status register. The testing requires no external reference, no external programming and
can be initiated or stopped.

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.
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) Test Type: refer to nai_ad_test_type_t definition.
p_outenable: (Output) 0 to disable, 1 to enable test.
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_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AD_SetChannelState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetChannelState ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_ad_state_t state )

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) from being generated for unused 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]).
state: (Input) NAI_AD_STATE_INACTIVE or NAI_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_SetTestEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AD_SetTestEnable ( int32_t cardIndex,
int32_t module,
nai_ad_test_type_t type,
bool_t enable )

Sets the A/D D0, D2 or D3 BIT Test Enable state for the specified A/D module.

The D2 Test initiates automatic background BIT testing. Each channel is checked every 10% from Positive Full Scale
to Negative Full Scale to a testing accuracy of 0.2% Full Scale and each Signal and Reference is always
monitored. Any failure triggers an interrupt (if enabled) and the results are available in BIT Status register.
The testing is totally transparent to the user, requires no external programming, has no effect on the standard
operation of the board, and can be enabled or disabled.

The D3 Test initiates a BIT test that disconnects all channels from the outside world and connects them across
an internal stimulus that generates and tests each channel to a test accuracy of 0.2% Full Scale. The results are
available in BIT Status register. The testing requires no external reference, no external programming and
can be initiated or stopped.

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.
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) Test Type: refer to nai_ad_test_type_t definition.
enable: (Input) 0 to disable, 1 to enable test.
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_VALUE when invalid type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.