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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetTestEnable (int32_t cardIndex, int32_t module, nai_da_test_type_t type, bool_t enable)
 Sets the D/A D2 or D3 BIT Test Enable state for the specified D/A module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetTestEnable (int32_t cardIndex, int32_t module, nai_da_test_type_t type, bool_t *outenable)
 Retrieves the D/A D2 or D3 BIT Test Enable state for the specified D/A module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_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_DA_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_DA_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_DA_SetModuleBITEnable (int32_t cardIndex, int32_t module, nai_da_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_DA_GetModuleBITEnable (int32_t cardIndex, int32_t module, nai_da_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_DA_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_DA_CheckD2TestVerify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_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
  • 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_DA_CheckPowerOnBITComplete()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_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 DA2, DA3 & DA4.
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_DA_ClearD2TestVerify()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_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_DA_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_DA_GetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetModuleBITEnable ( int32_t cardIndex,
int32_t module,
nai_da_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:

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

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetTestEnable ( int32_t cardIndex,
int32_t module,
nai_da_test_type_t type,
bool_t * outenable )

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

The D2 Test initiates automatic background BIT testing. Each channel is checked to a test accuracy of 0.2% Full
Scale and monitored for shorted output. Any failure triggers and 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 uses an internal D/A to measure all D/A channels while they remain connected
to the I/O. Each channel will be checked 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.
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_da_test_type_t definition.
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_DA_SetModuleBITEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetModuleBITEnable ( int32_t cardIndex,
int32_t module,
nai_da_test_type_t type,
bool_t bitEnable )

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

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

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetTestEnable ( int32_t cardIndex,
int32_t module,
nai_da_test_type_t type,
bool_t enable )

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

The D2 Test initiates automatic background BIT testing. Each channel is checked to a test accuracy of 0.2% Full
Scale and monitored for shorted output. Any failure triggers and 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 uses an internal D/A to measure all D/A channels while they remain connected
to the I/O. Each channel will be checked 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.
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_da_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.