LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can make a bar like a thermometer with the fill rate of a 1D array?

i have a 1D Array in a real time system, wich i use as buffer. i want to display the fill rate of this buffer on the front panel, maybe with a thermometer or something like that. the user of the panel needs the chance to stop the system, when the array is nearly full. (i have a stop button already, only need to display the fill rate of the buffer.) i can change the length of my buffer on the panel. can i use the length of my buffer as maximum level of my thermometer???
thx and regards
0 Kudos
Message 1 of 2
(2,519 Views)
Mue,
You need a way to know how much data that you have in your buffer. A simple way is to dynamically resize the array as you fill it and then use array size to read it's current size. This is of course extremely bad for memory management and I would not recommend it at all. It sounds like you have a fixed size buffer, and I assume that you have some way of telling how much data is in the array (maybe you know the index of the first and last data point). How you determine the amount of data in the buffer depends on how you have implemented the buffer. Once you have the value you could simply wire this value to any of the slides or bar indicators on the Numeric palette.
You can use a property node to set the min and max values of the slide indicator. Howe
ver beware that the property node will only work when you are connected to the RT using default communication. If you are not connected or just using a remote front panel then they will not work. I recommend developing a user interface that runs on your host and communicates with your embedded process.
0 Kudos
Message 2 of 2
(2,519 Views)