04-28-2017 10:53 AM
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.
04-28-2017 11:28 AM
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.
Please let me know if that helps.
04-28-2017 11:38 AM
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
04-28-2017 11:47 AM
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.
04-28-2017 11:48 AM - edited 04-28-2017 11:49 AM
Just store your high temperature in a Shift Register. You can use the Max & Min function to do the comparison for you.
04-28-2017 11:57 AM
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
04-28-2017 12:07 PM
What is not possible?
Attach some code so we can see what you are doing and point you in the right direction.
04-28-2017 01:57 PM - edited 04-28-2017 02:02 PM
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.