Software Library API naibrd 2.24.0
See all documentation at naii.docs.com

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_da_mode_t mode, float64_t data)
 Sets the output voltage, current, or engineering uints (depending on the channel's operation mode) for the specified D/A channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetData (int32_t cardIndex, int32_t module, int32_t channel, naibrd_da_mode_t mode, float64_t *p_outdata)
 Retrieves the output voltage, current or engineering units (depending on the channel's operation mode) for the specified D/A channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetWrapVoltage (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outvoltage)
 Retrieves the wrap voltage (internally measured voltage, or engineering units in FloatingPoint mode) for the specified D/A channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetWrapCurrent (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outcurrent)
 Retrieves the wrap current (measured current, or engineering units in FloatingPoint mode) from the specified D/A channel data register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_da_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the specified D/A Status for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_da_chan_mapped_status_type_t statusType)
 Clears the latched or realtime status for the specified DA channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetEnablePowerSupply (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables/Disables the power supply for the channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetEnablePowerSupply (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable)
 Retrieves the state of the power supply of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetOutputEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Sets the channels enable output bit in the enable output register. Allows channel to output. This function is for DA2 only.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetOutputEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable)
 Gets the channels enable output bit in the enable output register. Shows if channel can output. This function is for DA2 only.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetInternalVoltage (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outinternalVoltage)
 Gets the internal voltage reading off the channel. This function is only for DA2.
 

Detailed Description

Function Documentation

◆ naibrd_DA_ClearChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_ClearChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_da_chan_mapped_status_type_t statusType )

Clears the latched or realtime status for the specified DA channel and status type.

Note
If any realtime status type is provided, the function will return NAI_ERROR_INVALID_VALUE since realtime status bits are not cleared by the user.
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]).
statusType: (Input) Status Type: refer to naibrd_da_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 status type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_DA_GetChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_da_chan_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Retrieves the specified D/A Status for the specified channel.

* A status bit value of 0 (zero) indicates a "Normal/No Error" condition, and a value of 1 (one) indicates an "Error" condition. Real-Time
* statuses set and clear in real-time as their corresponding set/clear conditions are meet. Latched statuses set and latch once a
* real-time status is set. Latched statuses are cleared by writing a 1 to the bit that is to be cleared.
* 
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]).
statusType: (Input) Status Type: refer to naibrd_da_status_type_t definition.
p_outstatusBit: (Output) 0 for Normal, 1 BIT failure or Overcurrent 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_DA_GetData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetData ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_da_mode_t mode,
float64_t * p_outdata )

Retrieves the output voltage, current or engineering units (depending on the channel's operation mode) for the specified D/A 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]).
mode: (Input) Type of data to set (Voltage or Current) - refer to naibrd_da_mode_t.
p_outdata: (Output) Voltage in volts or Current in mA.
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.
  • NAI_ERROR_INVALID_MODE when 'mode' param is invalid.

◆ naibrd_DA_GetEnablePowerSupply()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetEnablePowerSupply ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outenable )

Retrieves the state of the power supply of the channel specified.

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]).
p_outenable: (Output) enabled = NAI_TRUE, disabled = NAI_FALSE.
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_GetInternalVoltage()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetInternalVoltage ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outinternalVoltage )

Gets the internal voltage reading off the channel. This function is only for DA2.

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]).
p_outinternalVoltage: (Output) Internal voltage read off channel (volts)
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_GetOutputEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetOutputEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * p_outenable )

Gets the channels enable output bit in the enable output register. Shows if channel can output. This function is for DA2 only.

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]).
p_outenable: (output) enable 1 or disable 0.
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_GetWrapCurrent()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetWrapCurrent ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outcurrent )

Retrieves the wrap current (measured current, or engineering units in FloatingPoint mode) from the specified D/A channel data register.

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]).
p_outcurrent: (Output) Current reading in mAmps.
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_GetWrapVoltage()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetWrapVoltage ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * p_outvoltage )

Retrieves the wrap voltage (internally measured voltage, or engineering units in FloatingPoint mode) for the specified D/A 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]).
p_outvoltage: (Output) Voltage in volts.
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_SetData()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetData ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_da_mode_t mode,
float64_t data )

Sets the output voltage, current, or engineering uints (depending on the channel's operation mode) for the specified D/A 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]).
mode: (Input) Type of data to set (Voltage or Current) - refer to naibrd_da_mode_t.
data: (Input) Voltage in volts or Current in mA.
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.
  • NAI_ERROR_INVALID_MODE when 'mode' param is invalid.

◆ naibrd_DA_SetEnablePowerSupply()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetEnablePowerSupply ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Enables/Disables the power supply for the 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]).
enable: (Input) NAI_TRUE to enable, NAI_FALSE to disable.
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_SetOutputEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetOutputEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Sets the channels enable output bit in the enable output register. Allows channel to output. This function is for DA2 only.

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]).
enable: (Input) enable 1 or disable 0.
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.