Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66688

How do you subtract different values for specific array elements?

$
0
0

Hi LabVIEW Community,

 

I am new to LabVIEW and Im working on my first application. One of my challenges that I am having problems solving is how to  subtract specific values from specific elements in an array.

 

My aplication is to measure the distance between a sensor and a magnet, however the initial distance for each sensor  to magnet is different. I have converted the voltage to a distance using the Math Node for each element and now need to  correct these values by subtracting their individual initial value.

 

The source is a 1D array of DBL64  consisting of 32 elements and each of these values needs to have a different value subtracted.

 

eg:

Element 1 - 5.557

element 2  - 2,34

element 3 - 7,654  and so on

 

I have tried to seperate (index the array) and subtract the values from each element and then combine them again. This has not been effetive. I need to write these values to an .txt file and also use them in another calculation.

 

I have attached my attemted sub VI.

 

Any advise would be really apprecieated.

 

 

 

 


Viewing all articles
Browse latest Browse all 66688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>