LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

previews Data

Hi
Just if somebody can give me idea how I can compare between old data and new data in same Numeric indicator.
I have a old value  and I wanna compare with the new data . but always the new Data it added to the old one.
Best Regards
 
0 Kudos
Message 1 of 5
(2,938 Views)
Put simply, you can't. A numeric indicator can only hold a single value. That's true in every programming language and not just LabVIEW. If you want to display multiple values, use an array, two different indicators, or a string where you concantante the two numerics (i.e. "old=1.2 new = 1.3").
0 Kudos
Message 2 of 5
(2,933 Views)

What is your definition of old and new data? Is the old data the value before the last indicator update (could be the same as the new data)? Is it before the last significant change in value?


@zamjir wrote:
but always the new Data it added to the old one.

Typically, the new data overwrites the old data. If it gets added, you must do something additional in the code.
 
Maybe you could explain exactly what you want to do and we'll find a solution. 🙂
 
(Under LabVIEW 8.0, you could probably create an XControl that displays old or new data depending on a boolean switch.)
0 Kudos
Message 3 of 5
(2,925 Views)

Hi

The Old Data is the value before the last indicator and the new it could not be the same like the old, also the new data it will add to the old. Just I want to compare the new data with the old.

I think this idea it will work but how I can creat Xcontrol???

(Under LabVIEW 8.0, you could probably create an XControl that displays old or new data depending on a boolean switch.)
 
Thank you for your help
0 Kudos
Message 4 of 5
(2,880 Views)
Zamjir,

As mentioned before, you would have to somehow code that you wanted to keep the old values.  You could easily code something that would display the old or new data without using an Xcontrol.  If you only want to display one data point, you could use a while loop and shift register to keep track of older values and a case structure attached to the boolean that would control how that data is displayed (old data or new data).  Is that what you were thinking?

Hope this helps!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 5 of 5
(2,854 Views)