Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I determine the analog input ranges with LabVIEW and DAQmx

I have several NI-DAQ devices with analog inputs. When measuring with labview and DAQmx I can select the input range by software. If I select a range to high for the analog input, I get error -200077  with the error msg similar to "desired value is not supported, max valid value ist 10, min valid value is -10". Valid value depend on the device. The result: No datas are aquired.
 
Now my question is: can I determine the available ranges or at least the maximum valid range of an analog input by software with Labview7 and DAQmx. I know, I can look into the manual of the devices and find the maximum range, but I´d like it more that labview does that for me and limits the desired range programaticaly to the valid values.
 
Are the any ideas for my problem?
0 Kudos
Message 1 of 3
(3,444 Views)

Try the code shown below. I've got LabVIEW 8.5 and the latest DAQmx so I hope the properites are the same with your old version.



Message Edited by Dennis Knutson on 05-14-2008 08:10 PM
0 Kudos
Message 2 of 3
(3,433 Views)

Hi All-

The properties that Dennis mentioned were added in NI-DAQmx 8.3.  That release of NI-DAQmx only supports LabVIEW 7.1 and later, so if you are using LabVIEW 7.0 you will unfortunately not be able to use that method.

If you are stuck using LabVIEW 7.0, you could use another less optimal method to determine the available ranges.  Before these properties were available, I would sometimes determine device-specific information by looping around DAQmx Create Channel (or Timing, etc) while increasing parameters and then trap errors for out of range attribute values.  By handling and masking the errors you could determine the upper bounds or allowed values and only present those to the user in your application. 

Unfortunately for the case of channel limits this only helps you find the maximum range and not the entire list of allowable ranges.  If you really need to get that info programmatically from the NI-DAQmx driver then you'll need to upgrade your LabVIEW version or use the C API.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 3 of 3
(3,416 Views)