Software Library API naibrd 1.62
See all documentation at naii.docs.com
Enhanced Input Measurement Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_SetTimebaseInterval (int32_t cardIndex, int32_t module, int32_t channel, float64_t interval)
 Sets the timebase for frequency measurements for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetTimebaseInterval (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outinterval)
 Retrieves the timebase for frequency measurements for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ReadFIFORaw (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count, uint32_t outdata[], uint32_t *outread)
 Retrieves the data elements from the Discrete channel's FIFO buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ReadFIFORawEx (int32_t cardIndex, int32_t module, int32_t channel, uint32_t count, uint32_t timeout, uint32_t outdata[], uint32_t *outread, uint32_t *countremaining)
 Retrieves the data elements from the Discrete channel's FIFO buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetCountData (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount)
 Retrieves the measurement count data for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ClearCountData (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the measurement count data for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ClearFIFO (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the FIFO Data for the specified Discrete channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetFIFOStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount, nai_dif_fifo_status_t *outstatus)
 Retrieves the Discrete channel's FIFO Buffer Status.
 

Detailed Description


Function Documentation

◆ naibrd_DIF_ClearCountData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ClearCountData ( int32_t cardIndex,
int32_t module,
int32_t channel )

Clears the measurement count data for the specified Discrete channel.

Measurement count data applies to the following nai_dif_enhanced_mode_t modes:
NAI_DIF_MODE_COUNT_RISING_EDGES          - Rising Edges Total Count
NAI_DIF_MODE_COUNT_FALLING_EDGES         - Falling Edges Total Count
NAI_DIF_MODE_COUNT_ALL_EDGES             - All Edges Total Count
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])
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DIF_ClearFIFO()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ClearFIFO ( int32_t cardIndex,
int32_t module,
int32_t channel )

Clears the FIFO Data for the 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])
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DIF_GetCountData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetCountData ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * outcount )

Retrieves the measurement count data for the specified Discrete channel.

Measurement count data applies to the following nai_dif_enhanced_mode_t modes:
NAI_DIF_MODE_COUNT_RISING_EDGES          - Rising Edges Total Count
NAI_DIF_MODE_COUNT_FALLING_EDGES         - Falling Edges Total Count
NAI_DIF_MODE_COUNT_ALL_EDGES             - All Edges Total Count
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]).
outcount: (Output) Measurement count value.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DIF_GetFIFOStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetFIFOStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * outcount,
nai_dif_fifo_status_t * outstatus )

Retrieves the Discrete channel's FIFO Buffer Status.

FIFO Buffer status applies to the following nai_dif_enhanced_mode_t modes where the FIFO is used to store
the measurements:
NAI_DIF_MODE_MEASURE_HIGH_TIME           - High Time Measurement
NAI_DIF_MODE_MEASURE_LOW_TIME            - Low Time Measurement
NAI_DIF_MODE_TIMESTAMP_RISING_EDGES      - Rising Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_FALLING_EDGES     - Falling Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_ALL_EDGES         - All Edges Timestamps
NAI_DIF_MODE_MEASURE_FREQUENCY           - Frequency Measurement

FIFO Buffer Status Definition:
------------------------------
Data count bits 8 .. 0     0x01FF
FIFO empty bit 9               0x0200
FIFO full bit 10               0x0400
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]).
outcount: (Output) number of elements in Discrete channel FIFO .
outstatus: (Output) FIFO Buffer Status.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DIF_GetTimebaseInterval()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_GetTimebaseInterval ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * outinterval )

Retrieves the timebase for frequency measurements for the specified Discrete channel.

Timebase for frequency measurement applies to the following nai_dif_enhanced_mode_t mode:
NAI_DIF_MODE_MEASURE_FREQUENCY           - Frequency Measurement
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]).
outinterval: (Output) Timebase interval specified in milliseconds, increments of 0.000008 ms (8ns). (Range 0.000008 to 34359.73836 milliseconds) (0x1 to 0xFFFFFFFF at 0.000008 ms LSB)
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DIF_ReadFIFORaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ReadFIFORaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t count,
uint32_t outdata[],
uint32_t * outread )

Retrieves the data elements from the Discrete channel's FIFO buffer.

FIFO Buffer applies to the following nai_dif_enhanced_mode_t modes where the FIFO is used to store
the measurements:
NAI_DIF_MODE_MEASURE_HIGH_TIME           - High Time Measurement
NAI_DIF_MODE_MEASURE_LOW_TIME            - Low Time Measurement
NAI_DIF_MODE_TIMESTAMP_RISING_EDGES      - Rising Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_FALLING_EDGES     - Falling Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_ALL_EDGES         - All Edges Timestamps
NAI_DIF_MODE_MEASURE_FREQUENCY           - Frequency Measurement
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]).
count: (Input) Number of data elements to retrieve.
outdata[]: (Output) Array of 32-bit raw data.
outread:(Output) Number of data elements read from the Discrete channel's FIFO buffer.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DIF_ReadFIFORawEx()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_ReadFIFORawEx ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t count,
uint32_t timeout,
uint32_t outdata[],
uint32_t * outread,
uint32_t * countremaining )

Retrieves the data elements from the Discrete channel's FIFO buffer.

FIFO Buffer applies to the following nai_dif_enhanced_mode_t modes where the FIFO is used to store
the measurements:
NAI_DIF_MODE_MEASURE_HIGH_TIME           - High Time Measurement
NAI_DIF_MODE_MEASURE_LOW_TIME            - Low Time Measurement
NAI_DIF_MODE_TIMESTAMP_RISING_EDGES      - Rising Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_FALLING_EDGES     - Falling Edges Timestamps
NAI_DIF_MODE_TIMESTAMP_ALL_EDGES         - All Edges Timestamps
NAI_DIF_MODE_MEASURE_FREQUENCY           - Frequency Measurement
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]).
count: (Input) Number of data elements to retrieve.
timeout: (Input) The amount of time, in milliseconds, to wait for the FIFO's count to reach count before timing out.
outdata[]: (Output) Array of 32-bit raw data.
outread:(Output) Number of data elements read from the Discrete channel's FIFO buffer.
countremaining: (Output) The number of elements remaining in the FIFO.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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_DIF_SetTimebaseInterval()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DIF_SetTimebaseInterval ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t interval )

Sets the timebase for frequency measurements for the specified Discrete channel.

Timebase for frequency measurement applies to the following nai_dif_enhanced_mode_t mode:
NAI_DIF_MODE_MEASURE_FREQUENCY           - Frequency Measurement
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]).
interval: (Input) Timebase interval specified in milliseconds, increments of 0.000008 ms (8ns). (Range 0.000008 to 34359.73836 milliseconds) (0x1 to 0xFFFFFFFF at 0.000008 ms LSB)
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card 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.