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

Functions

NAIBRDFUNC int32_t NAIAPI naibrd_FG_GetChannelCount (uint32_t modId)
 Returns the number of channels for the specified Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetFrequency (int32_t cardIndex, int32_t module, int32_t channel, float64_t frequency)
 Sets the frequency for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetFrequency (int32_t cardIndex, int32_t module, int32_t channel, float64_t *out_frequency)
 Retrieves the frequency for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetAmplitude (int32_t cardIndex, int32_t module, int32_t channel, float64_t amplitude)
 If the user programmes a combined DC offset and amplitude over the specified range of the module, the output will be saturated at the maximum or minimum value or in a unknown state. This function sets the amplitude value for the function generator channel based on the given card index, module, and channel number.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetAmplitude (int32_t cardIndex, int32_t module, int32_t channel, float64_t *out_amplitude)
 Retrieves the amplitude for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetDCOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t dc_offset)
 Sets the DC offset for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetDCOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t *out_dc_offset)
 Gets the DC offset for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetPhase (int32_t cardIndex, int32_t module, int32_t channel, float64_t phase)
 Sets the phase for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPhase (int32_t cardIndex, int32_t module, int32_t channel, float64_t *out_phase)
 Gets the phase for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetMode (int32_t cardIndex, int32_t module, int32_t channel, naibrd_fg_mode_t mode_select)
 Sets the operating mode for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetMode (int32_t cardIndex, int32_t module, int32_t channel, naibrd_fg_mode_t *out_mode)
 Gets the current operating mode of a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetPhaseLockEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Sets the phase lock state for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPhaseLockEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *out_enable)
 Gets the phase lock state for a specified function generator channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_fg_chan_mapped_status_type_t statusType)
 Clears the mapped status for a specified function generator channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetPowerEnable (int32_t cardIndex, int32_t module, bool_t enable)
 Sets the power enable state for the function generator module.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPowerEnable (int32_t cardIndex, int32_t module, bool_t *out_enable)
 Gets the power enable state for a function generator module.
 

Detailed Description

Function Documentation

◆ naibrd_FG_ClearChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_ClearChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_fg_chan_mapped_status_type_t statusType )

Clears the mapped status for a specified function generator channel and status type.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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 of the channel mapped status to clear (see naibrd_fg_chan_mapped_status_type_t).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetAmplitude()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetAmplitude ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * out_amplitude )

Retrieves the amplitude for a specified function generator channel.

This function gets the amplitude value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_amplitude: (Output) Pointer to the variable where the current amplitude value (in Volts) will be stored.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

/*

◆ naibrd_FG_GetChannelCount()

NAIBRDFUNC int32_t NAIAPI naibrd_FG_GetChannelCount ( uint32_t modId)

Returns the number of channels for the specified Module ID.

Parameters
modId: (Input) Module ID
Returns
  • Number of channels for the Module ID.

◆ naibrd_FG_GetDCOffset()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetDCOffset ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * out_dc_offset )

Gets the DC offset for a specified function generator channel.

This function retrieves the DC offset value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_dc_offset: (Output) Pointer to the retrieved DC offset value (in Volts).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetFrequency()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetFrequency ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * out_frequency )

Retrieves the frequency for a specified function generator channel.

This function gets the frequency value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_frequency: (Output) Pointer to the variable where the current frequency value (in Hz) will be stored.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_fg_mode_t * out_mode )

Gets the current operating mode of a specified function generator channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_mode: (Output) Pointer to a variable that will hold the returned mode value (sine, triangle, or square waveforms).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetPhase()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPhase ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t * out_phase )

Gets the phase for a specified function generator channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_phase: (Output) Pointer to a variable that will hold the returned phase value (in degrees).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetPhaseLockEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPhaseLockEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * out_enable )

Gets the phase lock state for a specified function generator channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
out_enable: (Output) Pointer to a variable that will hold the returned phase lock state (NAI_TRUE for locked, NAI_FALSE for unlocked).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_GetPowerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_GetPowerEnable ( int32_t cardIndex,
int32_t module,
bool_t * out_enable )

Gets the power enable state for a function generator module.

Parameters
cardIndex: (Input) Logical Card Index assigned to the connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
out_enable: (Output) Pointer to a variable that will hold the returned power state.(NAI_TRUE for enabled, NAI_FALSE for disabled).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_SetAmplitude()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetAmplitude ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t amplitude )

If the user programmes a combined DC offset and amplitude over the specified range of the module, the output will be saturated at the maximum or minimum value or in a unknown state. This function sets the amplitude value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
amplitude: (Input) The desired amplitude value to set (in Volts).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.
  • NAI_ERROR_INVALID_VALUE when the amplitude is out of range.

◆ naibrd_FG_SetDCOffset()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetDCOffset ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t dc_offset )

Sets the DC offset for a specified function generator channel.

This function sets the DC offset value for the function generator channel based on the given card index, module, and channel number. If the user programmes a combined DC offset and amplitude over the specified range of the module, the output will be saturated at the maximum or minimum value or in a unknown state.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
dc_offset: (Input) The desired DC offset value to set (in Volts).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.
  • NAI_ERROR_INVALID_VALUE when the dcoffset is out of range

◆ naibrd_FG_SetFrequency()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetFrequency ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t frequency )

Sets the frequency for a specified function generator channel.

This function sets the frequency value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
frequency: (Input) The desired frequency value to set (in Hz).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the module ID is not supported.
  • NAI_ERROR_INVALID_VALUE when the frequency is out of range.

◆ naibrd_FG_SetMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_fg_mode_t mode_select )

Sets the operating mode for a specified function generator channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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_select: (Input) The desired operating mode for the channel. Supported modes are sine, triangle, and square waveforms.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_SetPhase()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetPhase ( int32_t cardIndex,
int32_t module,
int32_t channel,
float64_t phase )

Sets the phase for a specified function generator channel.

This function sets the phase value for the function generator channel based on the given card index, module, and channel number.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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]).
phase: (Input) The desired phase value to set (in degrees).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.
  • NAI_ERROR_INVALID_VALUE when the phase is out of range

◆ naibrd_FG_SetPhaseLockEnable()

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

Sets the phase lock state for a specified function generator channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to the 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) The desired phase lock state for the channel (NAI_TRUE for locked, NAI_FALSE for unlocked).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when an invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.

◆ naibrd_FG_SetPowerEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_FG_SetPowerEnable ( int32_t cardIndex,
int32_t module,
bool_t enable )

Sets the power enable state for the function generator module.

Parameters
cardIndex: (Input) Logical Card Index assigned to the connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
enable: (Input) The desired enable state (NAI_TRUE for enabled, NAI_FALSE for disabled).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when an invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when an invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when the handle to the board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when the function is not supported.