Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI9215 limit analog input voltage range

Solved!
Go to solution

Hi,

 

I am using a NI9215(mounted in a cdaq 9174) to acquire a voltage signal. I wish to store the voltage as an integer and then convert it to a voltage in Fortran script later on. For this to work I must know the relation between integers and voltage. If i use an unsigned integer I want 0 to correspond to -10 for example(the numbers are not important as long as I know what they are).

 

I have tried to sample a voltage signal(see the attached vi), where I limit vmin and vmax to -10 and +10 V respectivly. When I input a voltage outside this range I expect the signal to saturate at -10 or +10 V, but this doesn't happen. I typically get +/- 10.4 V which understand is the maximum range. This range would have been ok if it was exactly +/- 10.4 V but it varies by something of the order of 0.5% between the different channels I am using.

 

Is it not possible to set vmin and vmax as I try to do and if so, what is then the point of vmin and vmax?

 

Regards

 

Pål Egil

0 Kudos
Message 1 of 3
(3,863 Views)
Solution
Accepted by topic author Pål_Egil

Hi Pål_Egil-

 

I assume you are trying to save processor time or (perhaps more likely) storage space by scaling the data yourself.  I would suggest that you use the 'unscaled' version of DAQmx Read.  This will give you the most fundamental datatype available and will save both processing time (because it won't be scaled to voltage and then re-scaled to a simple integer value on a linear scale by your application) and storage space (because you will be able to store a simple 2-byte value for each data point from your device).

 

In order for those unscaled readings to be scaled to voltage later, you'll also want to log the device scaling coefficients for your module.  These are accessible from the DAQmx Channel Property Node in LabVIEW, and a description of how to apply them to unscaled readings can be found in the LabVIEW Help for NI-DAQmx.

 

coeff.PNG

 

Hopefully this helps-

Tom W
National Instruments
Message 2 of 3
(3,850 Views)

Hi Tom_W_[DE]

 

Thank you for your quick reply, it came just in time for me to fix my problem before the christmas holidays.

 

The unscaled reading combined with the scaling factors where exactly what I needed. My reason for using it is both to save storage but also because it is convienient for my later analysis of the data.

 

Thank you

 

Pål Egil

0 Kudos
Message 3 of 3
(3,796 Views)