Appendix B
Function Reference
B-20
ni.com
ni54xx_SetAdjustedGainAndOffset
Format
__declspec(dllexport) long __stdcall
ni54xx_SetAdjustedGainAndOffset(unsigned long sessionHandle,
double offsetInVolts,
unsigned long attenuationInDb,
unsigned long terminatedState );
Purpose
Configures the device to output with a certain level of attenuation and a certain offset. It uses
the calibration constants for the session (including those that have been changed during the
session) to calculate the appropriate settings for the calibration DACs. The user must also
provide the termination state, whether the device is unterminated (high-impedance load)
or terminated (50-ohm load).
Parameters
Name
Description
sessionHandle
The handle of the calibration session for the device,
created with a call to
ni54xx_CalStart
.
offsetInVolts
The DC offset of the waveform can be from –2.5 to 2.5 volts.
attenuationInDb
The amount of post-amplifier attenuation applied to the
signal from 0 to 73 dB in 1dB increments.
terminationState
NI54XX_UNTERMINATED
(high-impedance load)
NI54XX_TERMINATED
(50-ohm load).