LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scalling and mapping vi

hello,

I am running Labview 6i and need the "Scalling and Mapping.vi" or something that does the same thing.

I'm aware it may not be available for this version but if anyone can send me even a drawing of what the code looks like - it is EXACTLY what I need !!

A vi for Labview 6i would be best, but as mentioned a drawing would be fine.

thanks in advance,
Steve.
0 Kudos
Message 1 of 5
(3,384 Views)
Hello Steve, Labview 7 express has this VI. Ideally you need to use labview 7. However the Express VI's are simply built generally on lower level VI's so I have attached a screen shot of this VI. If you can tell me what options you want to select I can open the created code and attached an example for use in labview 6i by converting it.

Steven Bird
Applications Engineer
National Instruments
Download All
0 Kudos
Message 2 of 5
(3,384 Views)
Hello,

I basically need to run the "scalling and mapping" vi that is only available in version 7, I have two lines of data - one is a raw voltage and the other equates to a flow of gas, dependant on the raw voltage.

i.e. 5 volts might be 5000 SCCM's of gas, 1 volt might be 1000 SCCM's. I have a calibration program which runs to determine the raw voltage and flows but I need to automatically interpolate between these voltages i.e. if I were to read 3 volts, flow would calculate to 3000 SCCM's.

Raw data looks like this: -


volts flow

1.03 149
1.52 203
2.14 259
2.54 314

etc etc .... (so no nice round numbers)

so if I read 1.93 volts, I need to know what the flow would be by interpolating between the k
nown results ?

Hope this helps,
Steve.
0 Kudos
Message 3 of 5
(3,384 Views)
The simplest code for your linear interpolation (x are not spaced equally but both arrays increase continuously) uses a threshold and interpolate approach. (see attached code image). If the input is below or above the x-range of the array, you'll get the first or last value of the Y array. In all other cases, you'll get the linearly interpolated value.

Don't use this if your function doesn't always maintain a positive slope.
0 Kudos
Message 4 of 5
(3,384 Views)
Many thanks,

Will have a go and see how I get on.

Steve.
0 Kudos
Message 5 of 5
(3,384 Views)