LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display latest value

Solved!
Go to solution

Hi All,

I have a questions to ask. Is that i create a subvi for my table and it can display latest value at the top. Below attached snapshots of my programming. I uses a random number and stop button to control to let u guys see the whole process of what i want.

but when i change 'true/false constant' and using a numeric control. and i placed it back to my program. It won't lists down the values and it wont display the latest value at the top. what's the problem? I have been stuck at this problem for awhile.

and another question was how to keep the size of the listing be constant? for example, i onli wish to display 30readings on my table. as the programming kept running, the oldest value will be replace. because if kept running my programming, and the listing on my table getting more and more, means memory increases, result in lagging. I don't wish to happen. So is there a way to maintain the fixed table displaying values?

Download All
0 Kudos
Message 1 of 6
(3,684 Views)

One more screenshot.

 

Thanks & Regards,

Isa

0 Kudos
Message 2 of 6
(3,683 Views)
Solution
Accepted by topic author Isabella

Hi Isabella,

 

I think the problem causes from initializing a shift register in sub vi. If you initialize a shift register, every time sub vi is called, it'll replace value in shift register with initialized value. Uninitialize a shift register should solve a problem. I attached a screenshot of my sub vi for your reference.

 

Regards, Kate

Message 3 of 6
(3,669 Views)

Hi,

Thanks to KateB. Another question was how to maintain the size of the table? so that when the programming kept running, the oldest value will not be seen in the table and yet, the latest value will always be at the top of the table? because the memory will keep increasing resulting, my program to lag. which i dun wish to happen it.

And isnt initalise the array, isnt means fix the size of the table?

 

Thanks & Regards,

Isa

0 Kudos
Message 4 of 6
(3,661 Views)

Hi Isa,

you can use an AE (action engine). Use an initialize case to set your shiftregister data and your table to a defined size. Use another case , maybe change or add, to only replace the row you want. With this AE, you can reset the data inside the shiftregister and you have a fixed size.

 

Mike

Message Edited by MikeS81 on 01-19-2009 09:10 AM
Message 5 of 6
(3,656 Views)

Hi Isabella,

 

In my above attached screenshot, I build a new array by putting a new 1D array on top of 2D array taken from shift register.

This will keep a new value on top of the table.

Then, I use array subset to limit number of rows showing in table and keep it in shift register also.

Doing so will limit the size of a memory keeping this array already.

 

Regards, Kate

0 Kudos
Message 6 of 6
(3,638 Views)