Software Library API naibrd 1.62
See all documentation at naii.docs.com
Standard Operation Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutput (int32_t cardIndex, int32_t module, int32_t channel, float32_t *output)
 This function will return the measurement data for the specified SG channel by reading the dataword, internally scaled by the channel's range, sensitivity, and sensor output scaling settings. Units are determined by the user's entry for Sensor Full Scale, e.g. pound force(lbf) or newtons (N). This function is only supported by Generation 3 SG modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutputVV (int32_t cardIndex, int32_t module, int32_t channel, float32_t *outputvv)
 This function will return the Volts per Volt floating point data value for the specified SG channel. Units in V/V: e.g. 0.0030 represents 3.0 mV/V. Internally adjusted for range selection. (Not scaled by the sensitivity or full scale settings.) This function is only supported by Generation 3 SG modules.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetStrain (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outstrain)
 Retrieves the calculated strain for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutputVoutVexc (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outoutputvv)
 Retrieves the Vout/Vexcitation voltage ratio for the specified SG Channel in units of V/V. This function is only supported by modules that are Generation 5 or later.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetMinStrainValue (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outminStrainValue)
 Retrieves the minimum strain value recorded for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetMaxStrainValue (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outmaxStrainValue)
 Retrieves the maximum strain value recorded for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetRawADReading (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outrawADReading)
 Retrieves the raw A/D channel voltage reading for the specified SG Channel. This function is only supported by modules that are Generation 5 or later.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_sg_status_type_t type, nai_status_bit_t *outstatusBit)
 Retrieves the BIT, Open, AD Error, AD No Reference, High Strain Alert 1, High Strain Alert 2, Low Strain Alert 1, or Low Strain Alert 2 Status for the specified SG channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_sg_status_type_t type)
 Clears the BIT, Open, AD Error, AD No Reference, High Strain Alert 1, High Strain Alert 2, Low Strain Alert 1, or Low Strain Alert 2 Status for the specified SG channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetBusy (int32_t cardIndex, int32_t module, uint32_t *outbusy)
 This function will read the Busy state word for all the SG Channels in the specified module. This function is only supported by Generation 3 SG modules.
 

Detailed Description


Function Documentation

◆ naibrd_SG_ClearStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_ClearStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_sg_status_type_t type )

Clears the BIT, Open, AD Error, AD No Reference, High Strain Alert 1, High Strain Alert 2, Low Strain Alert 1, or Low Strain Alert 2 Status for the specified SG channel.

For Generation 2 and Generation 3 Strain Gauge modules, reading any status bit will unlatch the entire register. BIT Status and Open Status is part of the background testing and the status register may be checked or polled at any given 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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_sg_status_type_t definition.
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 type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SG_GetBusy()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetBusy ( int32_t cardIndex,
int32_t module,
uint32_t * outbusy )

This function will read the Busy state word for all the SG Channels in the specified module. This function is only supported by Generation 3 SG 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]).
outbusy: (Output) A pointer to where the Busy Status is returned.
D0  = 0 if not BUSY, resistance data is being updated
D0  = 1 if BUSY (i.e. not performing BIT/OPEN detection or background calibration)
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_SG_GetMaxStrainValue()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetMaxStrainValue ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outmaxStrainValue )

Retrieves the maximum strain value recorded for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.

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]).
outmaxStrainValue: (Output) A pointer to where the maximum strain value is returned.
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_SG_GetMinStrainValue()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetMinStrainValue ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outminStrainValue )

Retrieves the minimum strain value recorded for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.

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]).
outminStrainValue: (Output) A pointer to where the minimum strain value is returned.
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_SG_GetOutput()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutput ( int32_t cardIndex,
int32_t module,
int32_t channel,
float32_t * output )

This function will return the measurement data for the specified SG channel by reading the dataword, internally scaled by the channel's range, sensitivity, and sensor output scaling settings. Units are determined by the user's entry for Sensor Full Scale, e.g. pound force(lbf) or newtons (N). This function is only supported by Generation 3 SG 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]).
output: (Output) A pointer to where the output value is returned.
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_SG_GetOutputVoutVexc()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutputVoutVexc ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outoutputvv )

Retrieves the Vout/Vexcitation voltage ratio for the specified SG Channel in units of V/V. This function is only supported by modules that are Generation 5 or later.

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]).
outoutputvv: (Output) A pointer to where the Vout/Vexc ratio is returned.
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_SG_GetOutputVV()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetOutputVV ( int32_t cardIndex,
int32_t module,
int32_t channel,
float32_t * outputvv )

This function will return the Volts per Volt floating point data value for the specified SG channel. Units in V/V: e.g. 0.0030 represents 3.0 mV/V. Internally adjusted for range selection. (Not scaled by the sensitivity or full scale settings.) This function is only supported by Generation 3 SG 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]).
outputvv: (Output) A pointer to where the output voltage ratio value is returned.
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_SG_GetRawADReading()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetRawADReading ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * outrawADReading )

Retrieves the raw A/D channel voltage reading for the specified SG Channel. This function is only supported by modules that are Generation 5 or later.

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]).
outrawADReading: (Output) A pointer to where the raw A/D reading is returned.
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_SG_GetStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_sg_status_type_t type,
nai_status_bit_t * outstatusBit )

Retrieves the BIT, Open, AD Error, AD No Reference, High Strain Alert 1, High Strain Alert 2, Low Strain Alert 1, or Low Strain Alert 2 Status for the specified SG channel.

For Generation 2 and Generation 3 Strain Gauge modules, reading any status bit will unlatch the entire register. BIT Status and Open Status is part of the background testing and the status register may be checked or polled at any given 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]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_sg_status_type_t definition.
outstatusBit: (Output) 0 for Normal, 1 Failure Detected.
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 type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SG_GetStrain()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SG_GetStrain ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outstrain )

Retrieves the calculated strain for the specified SG Channel in units of microstrain. This function is only supported by modules that are Generation 5 or later.

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]).
outstrain: (Output) A pointer to where the strain value is returned.
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.