The DAQmxGetAIGain can only be used to retrive the gain settings for SCXI channels. It is not possible to directly get the current gain for the daq board. But it is possible to read the Range of the daq board.
For more information see:
Using Min/Max or High/Low to Set DAQmx Channel GainMet vriendelijke groet / Kind regards,
Karsten
Applications Engineer
National Instruments