Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Why must the DAC Ext Ref Value be specified when using AO Ext Ref with DAQmx ?

I set an AO channel to use External Reference by

DAQmxSetAODACRefSrc (AO_TaskHandle, 'Dev1/AO0', DAQmx_Val_External);

When attemptign to read back the setting using DAQmxGetAODACRefSrc, I
get error -200540 DAQmxErrorDACRefValNotSet.

If Icall DAQmxSetAODACRefVal (AO_TaskHandle, 'Dev1/AO0', 10.0 );
then this error is not produced and I get back the correct setting
indicating Ext Ref is being used.

Why is it necessary to specify a value for the External Reference
Voltage ? It is an external value capable of being changed.

Steve
0 Kudos
Message 1 of 6
(4,124 Views)
Hello Steve,

This is an expected behavior. The external reference value value is required. Although you are given the choice to choose an external reference for your analog voltage generation, the Data Acquisition device does not measure the reference and therefore requires you to provide the value.
Thanks for calling National Instruments.

Serges Lemo
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(4,124 Views)
But why ??

The Ext Ref provides a means to modulate a waveform for example. In
such cases, the Ext Ref voltage is not a fixed value, but will be
changing dynamically as a result of elecronically changing the voltage
being fed into the card. So there's no way to be telling the driver
what its value is.

Apparently, the reason the driver needs this value is because it takes
the user requested AO DAC values and scales them by that Ext Ref value
so it can know what the correct voltage is to output. For example, if
Ext Ref is the deafult 10 V and the user wants to output 2V, it will
sclae (2/10)*4095 to arrive at the correct binary value. If Ext Ref
is 2 V, then it would scale (2/2)*4095. So if one is varying the Ext
Ref externally , just specify a va
lue of 10 V for Ext Ref, and then
your output will scale by however much you change Ext Ref. i.e. if
you actually connect 2 V, then a binary value of 4095 that normally
outputs 10 V will now only output 2 V.

Steve

On Mon, 1 Nov 2004 22:18:06 -0600 (CST), sergesl wrote:

>This is an expected behavior. The external reference value value is
>required. Although you are given the choice to choose an external
>reference for your analog voltage generation, the Data Acquisition
>device does not measure the reference and therefore requires you to
>provide the value.
0 Kudos
Message 3 of 6
(4,126 Views)
Hello Steve,
You are totally right, that option could have been provided. But given that you can measure the voltage from an analog input channel, you could use that value as the input to your external reference value so that any change is reflected directly. We did not see the need to reserve one analog input just for this purpose.
Hope this answers your question. Thank you for contacting National Instruments.

Serges Lemo
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(4,124 Views)
Hi Steve,

Yes, your assumption is correct, the value you set is used for scaling purposes, and as such it is a required input. however, you may still change the external reference whenever you want (just not change the scaling on the fly). As such, if you wanted to perform amplitude modulation over a (for example) 10KHz signal, you would connect your data source to the external reference of the board, then set the external reference value to the maximum voltage you're going to provide. this will ensure that you won't clip the signal and will still be able to get your modulated result. Also, make sure that, regardless of the value you wrote to the driver, your external reference never exceeds the specifications of the board. You can find this information in the datasheet (i.e. the 6052 can take up to 15V). Any external reference value above 10V could cause the output to be out of spec.

I hope this helps, let me know if you have any other questions. I suggest you post AO related issues in the Multifunction DAQ forum.

Greetings

Daniel
Message 5 of 6
(4,113 Views)
Hello Steve,

QuantumByte is right except for the fact that the 6052 should be provided voltages between -10V and 10V and not +-15V. Outside of this range, you might get correct results, but they are not guaranteed.

Serges Lemo
0 Kudos
Message 6 of 6
(4,102 Views)