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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRange (uint32_t modid, nai_rtd_range_t rawdata, float64_t *outrange)
 NOTE: This API only applies to the G4 module. Returns the resistance associated with RTD Module ID and resistance range code.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRangeRaw (uint32_t modid, float64_t range, nai_rtd_range_t *outrawdata)
 NOTE: This API only applies to the G4 module. Returns the range code associated with RTD Module ID and resistance range.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistance (uint32_t modid, nai_rtd_range_t range, uint32_t rawdata, float64_t *outresistance)
 NOTE: This API only applies to the G4 module. Calculates the resistance in ohms associated with the RTD Module ID and given range and raw data.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRaw (uint32_t modid, nai_rtd_range_t range, float64_t resistance, uint32_t *outrawdata)
 NOTE: This API only applies to the G4 module. Returns the raw data code for the resistance value associated with the RTD Module ID and resistance range.
 

Detailed Description


Function Documentation

◆ naibrd_RTD_ConvertToResistance()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistance ( uint32_t modid,
nai_rtd_range_t range,
uint32_t rawdata,
float64_t * outresistance )

NOTE: This API only applies to the G4 module. Calculates the resistance in ohms associated with the RTD Module ID and given range and raw data.

Parameters
modid: (Input) RTD Module ID.
range: (Input) Range Code
      G4                     Range
Resistance Range            Register Value              LSB (ohm)
______________________________________________________________________
0-200 ohm                          0                      0.005
0-400 ohm                          1                      0.01
0-800 ohm                          2                      0.02
0-2000 ohm                         3                      0.04
0-4000 ohm                         4                      0.08
0-6500 ohm                         5                      0.16
rawdata: (Input) Raw data code
outresistance: (Output) Resistance value in ohms.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid range parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RTD_ConvertToResistanceRange()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRange ( uint32_t modid,
nai_rtd_range_t rawdata,
float64_t * outrange )

NOTE: This API only applies to the G4 module. Returns the resistance associated with RTD Module ID and resistance range code.

Parameters
modid: (Input) RTD Module ID.
rawdata: (Input) Range Code
      G4                     Range
Resistance Range            Register Value              LSB (ohm)
______________________________________________________________________
0-200 ohm                          0                      0.005
0-400 ohm                          1                      0.01
0-800 ohm                          2                      0.02
0-2000 ohm                         3                      0.04
0-4000 ohm                         4                      0.08
0-6500 ohm                         5                      0.16
outrange: (Output) Range Code.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid range parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RTD_ConvertToResistanceRangeRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRangeRaw ( uint32_t modid,
float64_t range,
nai_rtd_range_t * outrawdata )

NOTE: This API only applies to the G4 module. Returns the range code associated with RTD Module ID and resistance range.

Parameters
modid: (Input) RTD Module ID.
range: (Input) Resistance range in ohms.
outrawdata: (Output) Range Code
      G4                     Range
Resistance Range            Register Value              LSB (ohm)
______________________________________________________________________
0-200 ohm                          0                      0.005
0-400 ohm                          1                      0.01
0-800 ohm                          2                      0.02
0-2000 ohm                         3                      0.04
0-4000 ohm                         4                      0.08
0-6500 ohm                         5                      0.16
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid range parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RTD_ConvertToResistanceRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RTD_ConvertToResistanceRaw ( uint32_t modid,
nai_rtd_range_t range,
float64_t resistance,
uint32_t * outrawdata )

NOTE: This API only applies to the G4 module. Returns the raw data code for the resistance value associated with the RTD Module ID and resistance range.

Parameters
modid: (Input) RTD Module ID.
range: (Input) Range Code
      G4                     Range
Resistance Range            Register Value              LSB (ohm)
______________________________________________________________________
0-200 ohm                          0                      0.005
0-400 ohm                          1                      0.01
0-800 ohm                          2                      0.02
0-2000 ohm                         3                      0.04
0-4000 ohm                         4                      0.08
0-6500 ohm                         5                      0.16
resistance: (Input) Resistance value
outrawdata: (Output) Raw data code
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_RANGE when invalid range parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.