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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToVoltage (uint32_t modid, uint32_t rawdata, float64_t *p_outvoltage)
 Calculates the voltage in volts associated with the Discrete Module ID from the given raw data.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToVoltageRaw (uint32_t modid, float64_t voltage, uint32_t *outrawdata)
 Calculates the raw data associated with the Discrete Module ID and a given voltage.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToCurrent (uint32_t modid, uint32_t rawdata, float64_t *outcurrent)
 Calculates the current in Amps associated with the Discrete Module ID and given raw data.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToCurrentRaw (uint32_t modid, float64_t current, uint32_t *outrawdata)
 Calculates the raw current associated with the Discrete Module ID and given current.
 

Detailed Description


Function Documentation

◆ naibrd_DT_ConvertToCurrent()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToCurrent ( uint32_t modid,
uint32_t rawdata,
float64_t * outcurrent )

Calculates the current in Amps associated with the Discrete Module ID and given raw data.

Parameters
modid: (Input) Discrete Module ID.
rawdata: (Input) Raw Data Code.
outcurrent: (Output) Current in amps.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_ConvertToCurrentRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToCurrentRaw ( uint32_t modid,
float64_t current,
uint32_t * outrawdata )

Calculates the raw current associated with the Discrete Module ID and given current.

Parameters
modid: (Input) Discrete Module ID.
current: (Input) Current in amps.
outrawdata: (Output) raw data code.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_ConvertToVoltage()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToVoltage ( uint32_t modid,
uint32_t rawdata,
float64_t * p_outvoltage )

Calculates the voltage in volts associated with the Discrete Module ID from the given raw data.

Parameters
modid: (Input) Discrete Module ID.
rawdata: (Input) Raw Data Code.
p_outvoltage: (Output) Voltage in volts.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DT_ConvertToVoltageRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DT_ConvertToVoltageRaw ( uint32_t modid,
float64_t voltage,
uint32_t * outrawdata )

Calculates the raw data associated with the Discrete Module ID and a given voltage.

Parameters
modid: (Input) Discrete Module ID.
voltage: (Input) Voltage in volts.
outrawdata: (Output) raw data code.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.