10-13-2006 05:00 AM
10-13-2006 05:45 AM
By defination, AO.Max specifies the maximum value you expect to generate. The value is in the units you specify with a units property. If you try to write a value larger than the maximum value, NI-DAQmx generates an error. NI-DAQmx might coerce this value to a smaller value if other task settings restrict the device from generating the desired maximum.
So, this property will generate an error when voltages user sends -2 or 12 Volts and max and min are set between 0 to 10 Volts, rather than coerce it to range
10-13-2006 05:49 AM
10-13-2006 06:06 AM - edited 10-13-2006 06:06 AM
That property sets the effective DAC range, or in other words it assigns the voltage range for the resolution of your card.
Consider a card which has 16 bit resolution, and default input range as +/- 10 Volts.
If your signal to be generated is in the range +/-5 Volts, You will use only half the availible resolution
Now, if you set DAQ Range max and min as +5 and - 5 Volts, you can use this entire 16 bit resolution to generate a signal of better quality and resolution.
This property does just that
Note: Not all NI AO DAQ cards support setting this Range and offset property. Which Card are you using??
Hope you understood it clearly
Regards,
Dev
Message Edited by devchander on 10-13-2006 06:11 AM
10-13-2006 06:12 AM - edited 10-13-2006 06:12 AM
Hi Dev,
oh - that is exactly what I also want to achieve. I want to set the output range to the range which gives me the best resolution. But also, I want to prevent that higher voltages can be outputted. So in your example with a 16 bit resolution board, if that board reports that +/-10Volts and +/-5 Volts both offer the full resolution, I would use the AO.DAC.Rng property to work with +/-5 Volts and 16 bit resolution, and an offset of 5 Volts which gives me the wanted output range of 0..10Volts with the full 16 bit resolution. Then I would set the AO.max/min properties to 10 and 0 Volts to make sure that an error is generated if higher/lower voltages are commanded. Is that right how I understand it??
Gabs
Oops - I have overseen your edit. Because we develop driver VIs and not applications for a special system, we do not know which board our customer is using. The only requirement is that it is DAQmx compatible. Do you know of any DAQmx compatible NI DAC card which does not support these properties??
Message Edited by Gabs on 10-13-2006 06:14 AM
10-13-2006 06:15 AM
That's right.
But, which DAQ card are you using??
10-13-2006 06:16 AM
10-13-2006 06:36 AM
Oh, that's cool!
Some NI 67xx cards have a +/- 10 Volts range that can be set using and external reference ( not sure which all )
E-Series devices offer two analog output ranges- bipolar (+/- 10 V) and unipolar (0 to 10 V).
Some M-Series DAQ devices, have programmable output ranges that distribute the bits of resolution over a smaller voltage range and also support programmable DC offsets. ( I request you to check out the specs of those cards to know more)
Hoep this Helps,
Regards,
Dev
10-13-2006 08:37 AM