Software Library API naibrd 1.62
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, nai_da_data_type_t type, float64_t data) |
Sets the output voltage or current 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, nai_da_data_type_t type, float64_t *outdata) |
Retrieves the output voltage or current 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 *outvoltage) |
Retrieves the wrap-around voltage for the specified D/A channel. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetCurrentMeasurement (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outcurrent) |
Retrieves the measured current from the specified D/A channel data register. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetAllData (int32_t cardIndex, int32_t module, nai_da_data_type_t type, int32_t arraysize, float64_t outdata[]) |
Retrieves all the output voltages or current based for all the channels of the specified D/A module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetAllWrapVoltages (int32_t cardIndex, int32_t module, int32_t arraysize, float64_t outvoltages[]) |
Retrieves the all the wrap-around voltages for all the channels of the specified D/A module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetAllCurrentMeasurements (int32_t cardIndex, int32_t module, int32_t arraysize, float64_t outcurrents[]) |
Retrieves the all the measured current for all the channels of the specified D/A module. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_da_status_type_t type, nai_status_bit_t *outstatusBit) |
Retrieves the D/A BIT or Overcurrent Status for the specified D/A channel. Reading any status bit will unlatch the entire register. BIT Status and Overcurrent Status is part of the background testing and the status register may be checked or polled at any given time. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_da_status_type_t type) |
Clears the latched status for the specified DA channel and status type. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_ResetToZero (int32_t cardIndex, int32_t module) |
Sets all channel outputs for the specified D/A module to 0V output. When a "1" is written to the Reset to Zero register, the module's channels outputs will be set to 0V. The module clears this registers when after it sets the outputs to zero. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_ReinitToZeroCal (int32_t cardIndex, int32_t module) |
Sets all calibration registers to the default values. This DOES NOT overwrite, or modify the calibration file in any way. The default values will be used until a power cycle occurs. At that time the D/A will re-initialize itself with the values in the calibration file. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_SetPowerSupplyEnable (int32_t cardIndex, int32_t module, nai_da_powersupply_ctrl_t enable) |
Enables the power supply for the module. When NAI_DA_POWERSUPPLY_CTRL_ENABLE is written to the power Supply enable register, the module's power supply will be on. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetPowerSupplyEnable (int32_t cardIndex, int32_t module, nai_da_powersupply_ctrl_t *outenable) |
returns whether the power supply for the module is enabled (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disabled (NAI_DA_POWERSUPPLY_CTRL_DISABLE). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_SetChannelPowerSupplyEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_da_powersupply_ctrl_t enable) |
Enables the power supply for the channel. When NAI_DA_POWERSUPPLY_CTRL_ENABLE is written to the power Supply enable register, the channel's power supply will be on. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_GetChannelPowerSupplyEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_da_powersupply_ctrl_t *outenable) |
returns whether the power supply for the channel is enabled (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disabled (NAI_DA_POWERSUPPLY_CTRL_DISABLE). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_DA_SetOutputEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_da_output_enable_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, nai_da_output_enable_t *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 *internalVoltage) |
Gets the internal voltage reading off the channel. This function is only for DA2. | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_ClearStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_status_type_t | type ) |
Clears the latched status for the specified DA channel and status type.
Note: NAI_DA_STATUS_OVERCURRENT_ALERT is mapped to the 'Current Range Exceeded' status register. Please specify NAI_DA_STATUS_OVERCURRENT_ALERT_LATCHED when clearing the 'Current Range Exceeded' lathced status register.
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]). |
type | : (Input) Status Type: refer to nai_da_status_type_t definition. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetAllCurrentMeasurements | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | arraysize, | ||
float64_t | outcurrents[] ) |
Retrieves the all the measured current for all the channels of the specified D/A module.
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]). |
arraysize | : (Input) Size of the outvoltage array. If specified size is less than max channels, the voltages returned will be for channel 1 to size. |
outcurrents | : (Output) Current reading in amps for all channels. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetAllData | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_da_data_type_t | type, | ||
int32_t | arraysize, | ||
float64_t | outdata[] ) |
Retrieves all the output voltages or current based for all the channels of the specified D/A module.
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]). |
type | : (Input) Type of data to get (Voltage or Current) - refer to nai_da_data_type_t. |
arraysize | : (Input) Size of the outvoltage array. If specified size is less than max channels, the voltages returned will be for channel 1 to size. |
outdata | : (Output) Voltage in volts for all channels. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetAllWrapVoltages | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | arraysize, | ||
float64_t | outvoltages[] ) |
Retrieves the all the wrap-around voltages for all the channels of the specified D/A module.
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]). |
arraysize | : (Input) Size of the outvoltage array. If specified size is less than max channels, the voltages returned will be for channel 1 to size. |
outvoltages | : (Output) Voltage in volts for all channels. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetChannelPowerSupplyEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_powersupply_ctrl_t * | outenable ) |
returns whether the power supply for the channel is enabled (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disabled (NAI_DA_POWERSUPPLY_CTRL_DISABLE).
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]). |
outenable | : (Output) enable (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disable (NAI_DA_POWERSUPPLY_CTRL_DISABLE). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetCurrentMeasurement | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
float64_t * | outcurrent ) |
Retrieves the measured current from the specified D/A channel data register.
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]). |
outcurrent | : (Output) Current reading in amps. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetData | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_data_type_t | type, | ||
float64_t * | outdata ) |
Retrieves the output voltage or current depending on the channel's operation mode for the specified D/A channel.
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]). |
type | : (Input) Type of data to set (Voltage or Current) - refer to nai_da_data_type_t. |
outdata | : (Output) Voltage in volts or Current in mA. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetInternalVoltage | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
float64_t * | internalVoltage ) |
Gets the internal voltage reading off the channel. This function is only for DA2.
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]). |
internalVoltage | : (Output) Internal voltage read off channel (volts) |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetOutputEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_output_enable_t * | outenable ) |
Gets the channels enable output bit in the enable output register. Shows if channel can output. This function is for DA2 only.
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]). |
outenable | : (output) enable (NAI_DA_ENABLE_OUTPUT) or disable (NAI_DA_DISABLE_OUTPUT). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetPowerSupplyEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_da_powersupply_ctrl_t * | outenable ) |
returns whether the power supply for the module is enabled (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disabled (NAI_DA_POWERSUPPLY_CTRL_DISABLE).
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]). |
outenable | : (Output) enable (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disable (NAI_DA_POWERSUPPLY_CTRL_DISABLE). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetStatus | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_status_type_t | type, | ||
nai_status_bit_t * | outstatusBit ) |
Retrieves the D/A BIT or Overcurrent Status for the specified D/A channel. Reading any status bit will unlatch the entire register. BIT Status and Overcurrent Status is part of the background testing and the status register may be checked or polled at any given time.
Note: NAI_DA_STATUS_OVERCURRENT_ALERT is mapped to the 'Current Range Exceeded' status register. Please specify NAI_DA_STATUS_OVERCURRENT_ALERT_LATCHED or NAI_DA_STATUS_OVERCURRENT_ALERT_REALTIME when reading the 'Current Range Exceeded' lathced/realtime status register.
A BIT status value of 0 (zero) indicates "Normal" and a value of 1 (one) indicates a non-compliant D/A conversion (outside 0.2% Full Scale accuracy specification). An Overcurrent status value of 0 (zero) indicates "Normal" and a value of 1 (one) indicates an over current draw from the output. An overcurrent is detected within 2 seconds and will latch the corresponding bit in the Overcurrent Status register. Reading this register does not cause any outputs to be enabled. only writing to the Retry Overload and Reset Overload registers can re-enable outputs.
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]). |
type | : (Input) Status Type: refer to nai_da_status_type_t definition. |
outstatusBit | : (Output) 0 for Normal, 1 BIT failure or Overcurrent Detected. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_GetWrapVoltage | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
float64_t * | outvoltage ) |
Retrieves the wrap-around voltage for the specified D/A channel.
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]). |
outvoltage | : (Output) Voltage in volts. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_ReinitToZeroCal | ( | int32_t | cardIndex, |
int32_t | module ) |
Sets all calibration registers to the default values. This DOES NOT overwrite, or modify the calibration file in any way. The default values will be used until a power cycle occurs. At that time the D/A will re-initialize itself with the values in the calibration file.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_ResetToZero | ( | int32_t | cardIndex, |
int32_t | module ) |
Sets all channel outputs for the specified D/A module to 0V output. When a "1" is written to the Reset to Zero register, the module's channels outputs will be set to 0V. The module clears this registers when after it sets the outputs to zero.
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]). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetChannelPowerSupplyEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_powersupply_ctrl_t | enable ) |
Enables the power supply for the channel. When NAI_DA_POWERSUPPLY_CTRL_ENABLE is written to the power Supply enable register, the channel's power supply will be on.
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 (NAI_DA_POWERSUPPLY_CTRL_ENABLE) or disable (NAI_DA_POWERSUPPLY_CTRL_DISABLE). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetData | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_data_type_t | type, | ||
float64_t | data ) |
Sets the output voltage or current depending on the channel's operation mode for the specified D/A channel.
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]). |
type | : (Input) Type of data to set (Voltage or Current) - refer to nai_da_data_type_t. |
data | : (Input) Voltage in volts or Current in mA. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetOutputEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
nai_da_output_enable_t | enable ) |
Sets the channels enable output bit in the enable output register. Allows channel to output. This function is for DA2 only.
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 (NAI_DA_ENABLE_OUTPUT) or disable (NAI_DA_DISABLE_OUTPUT). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_DA_SetPowerSupplyEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
nai_da_powersupply_ctrl_t | enable ) |
Enables the power supply for the module. When NAI_DA_POWERSUPPLY_CTRL_ENABLE is written to the power Supply enable register, the module's power supply will be on.
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]). |
enable | : (Input) enable NAI_DA_POWERSUPPLY_CTRL_ENABLE or disable (NAI_DA_POWERSUPPLY_CTRL_DISABLE). |