09-01-2018 08:39 AM
hello,
i have a simple vi for six different cells.i want to show its parameters on front table one by one and get it updated there once the measurement of one cell is complete instead of displaying the table when i get data of all the cells but i can't figure out the way to do it.
need help in this.
Solved! Go to Solution.
09-01-2018 11:32 AM
The table indictor/control requires a 2D array to be passed before it 'updates', no way around that.
Try individual controls plainly on the front panel or in a cluster, this way you can update only those that change.
Keep in mind, the Windows container i.e. the LabVIEW Front Panel, is owned by the WindowsOS and have a limited update speed, My last recollection is 15msec is the update rate. So 'real-time' has a limited meaning. Additionally, humans can't see things changing much faster than 15msec so it's real-time enough.
That said, LabVIEW is quite able to update a table to pretty quickly...are you seeing lags or update problems when you push data to the table?
Regards
Jack Hamilton
09-01-2018 12:49 PM
I must confess I've very rarely used Tables, as I find them daunting to program. However, Arrays are dirt-simple, so I'm going to use an array, My Data, with six elements ("cells") where you can "show the parameters one by one and get it updated once the measurement of one cell is completed".
Here's the idea: Start with an empty My Data indicator on your Front Panel -- expand it to show 6 cells. In the Block Diagram, drop a For Loop, n=6, which you will use to sequentially to initialize My Data. Add a Shift Register to the For Loop and initialize it with an Array of 6 elements holding the default value for My Data (use Initialize Array to do this for you). What you now want to do is get the User to input the first, second, third, ..., sixth value for My Data. Here you will use the Loop Index, "i" (which starts with 0 and goes to 5) -- you can create a small "pop-up" VI that asks the User to "Enter the value for Cell <i+1>" and returns whatever the user enters (by <i+1>, I mean to pass in, not "i", but i+1 because we count from 1, so you want to say "Enter the value for Cell 1", probably). So you have a value that goes in the i-th position of the Array that's sitting in the Shift Register -- use Replace Array Subset to do this. After you update the Array, but inside the For Loop, wire the My Data Indicator to the Shift Register, so it automatically "sees" the updated values.
You'll notice I wrote a lot of words, but provided no picture (even given the 1000-1 ratio of Picture/Word value difference). That's because I want you to try to create the picture. If you do this, you'll learn some aspects of LabVIEW that you might not already know, and they will "stick" with you.
Bob Schor
09-01-2018 01:10 PM - edited 09-01-2018 01:15 PM
@jyot445 wrote:i have a simple vi for six different cells.i want to show its parameters on front table one by one and get it updated there once the measurement of one cell is complete instead of displaying the table when i get data of all the cells but i can't figure out the way to do it.
A table is a 2D array of strings, so all you need is keep it in a shift register and append new rows as new data arrives (be careful using the word "real time", this is not it).
Also, the I and V belong into the table header, not into the table directly!
Dataflow ensures that the table does not update until both elements of the numeric array are updated.
Of course if the table has a fixed size, you can instead update any element|column|row using replace array subset. Make sure to initialize the shift register with the correct size.
09-02-2018 02:34 AM
@altenbench
thanks for this solution
09-02-2018 03:04 AM
@altenbench
here it is a random no.
but i have a given set of six IV datas.
how will i execute it here by replacing the random nos.?
09-02-2018 04:55 AM
@jyot445 wrote:
@altenbench
here it is a random no.
but i have a given set of six IV datas.
how will i execute it here by replacing the random nos.?
In the middle of Altenbach's code, where he does a Build Array with two random numbers to make an array that he stuffs into the table, you take your pair of IV data, get them into an array (if they are not already in that format) and stuff them into the table, just like Altenbach showed you. If you don't understand how Arrays work in LabVIEW, go back and take the Introductory Tutorials mentioned on the first page of this Forum -- pay attention to Arrays and how they interact with Loops, particularly For loops.
Bob Schor
09-05-2018 10:43 AM
@jyot445 wrote:
but i have a given set of six IV datas.
how will i execute it here by replacing the random nos.?
As you can see, your question is very ambiguous. If you want a clear answer make sure to explain exactly what you want to do and see when the program runs.