LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save analogue input data for later use?

I need to store ananlogue input data for future comparisons with the same input. That is if future ananlogue value is higher or lower than the one i previously stored, apparently you cant use variables in this over rated idiotic language and there is no way you could store your data.

0 Kudos
Message 1 of 8
(3,686 Views)

Sufi,

 

I'd be happy to try to help you. I assure you, this can be done, and quite easily.

 

It would be helpful if you could attach some of the code you've already written, so we can see where you are.

 

 

When you say you want to save the data "for future comparison", does this mean you want to save it in a data file, so you can go back and look at it days, or months later... or you just need to store it in memory while the program is running?

 

The example below shows how to retain the value of an input for future comparison.compare to input.png

 

Please let me know if that helps.

0 Kudos
Message 2 of 8
(3,663 Views)

No i want comparison just when the prigramm us runner ng and the example you showee is changong analogue value manually,my analogue pin is recieving fata from a flame sensor and its value will be changed when i rotate it, i want to know when will be the highest value therefore i m trying to record these values in each iteration if the current iteration result is higher than the prev one, therefore i kind of need a temo variable, where only the highest sensor value remains, and get replaced when next higher value comes

0 Kudos
Message 3 of 8
(3,658 Views)

I assume that your are doing the measurement(s) in a loop, to do it multiple times, if so, put the measurement data on a shift register and then the next iteration of the loop compare that measurement with the newest. You can then either put the new measurement on the shift register, or retain the first, based on your evaluation of which is greater (or whatever other criteria you decide on).

 

May I ask a question, since you don't seem to like LabVIEW why are you using it? Trust me, it is a pretty full featured language being used for some amazingly sophisticated projects (Google CERN and LabVIEW). It does, like any language, require some effort to learn how it works.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 8
(3,650 Views)

Just store your high temperature in a Shift Register.  You can use the Max & Min function to do the comparison for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 8
(3,648 Views)

Its too late to revert back, my problem is i have a flame sensor, if it detects fire it rotate toward direction of fire, i want to stop it when the intensity of flame is max that is its pointing in right direction, all of this is not possible under ng shift

0 Kudos
Message 6 of 8
(3,637 Views)

What is not possible?

 

Attach some code so we can see what you are doing and point you in the right direction.

0 Kudos
Message 7 of 8
(3,634 Views)

In this version, I have added a "Sense Flame" sub-vi inside the loop, so it compares the current value of the flame sensor to the previous maximum.  That way you don't have to "revert back" later.

 

My "sense flame" VI is just a random number generator. You should replace it with code for your flame sensor.

 

I also added a chart, so you can see where the maximum is. One problem I foresee is that you might hit a maximum value and then never quite get that high again, so you'll want to be able to see not only when you're at the max, but when you're approaching it and at a value that is reasonably comparable to it.

 

compare to input.png

0 Kudos
Message 8 of 8
(3,613 Views)