LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to the invoke node "Reinit to Default"? (see attached VI)

Solved!
Go to solution

First of all, I apologize for asking too many table questions. I want to at least specialize in something. There are lots of labview experts in this forum specialized in everything. I just want to specialize in table that way I can also get "Kudos" and get my answers selected as best answer for the future 😉.  Ok, I am done.

 

Back to my question. So  I am collecting data on the table. All I want to do is to reset the table to default as shown below  (The table will be reset every 10 seconds). Then restart counting from the top row (3rd).

GRCK5000_0-1652827040270.png

So I was exploring the invoke node for the table and came across this block below .

GRCK5000_1-1652827174164.png

I was wondering how I can wire it so I can be able to reinitialize my table automatically without stop the run.

 

#I did not forget to make my enum type def. this time. Please make sure you put all the VIs in the same folder; otherwise, you will get a broken VI. 

 

 

 

Download All
0 Kudos
Message 1 of 23
(1,624 Views)

You put the node into a case structure that executes the node as needed.

 

(Most likely you don't need it at all, just change the data in the wire going to the table indicator. I sure hope it is an indicator! Cannot look at your code at this moment)

0 Kudos
Message 2 of 23
(1,605 Views)

I tried to put the node in the case structure and it's not really working as expected. 

I also tried a different method and still not being able to reinitialize the table. 

I have attached the two codes here. 

Download All
0 Kudos
Message 3 of 23
(1,569 Views)

That's not a table, it's a listbox.

 

The value of a listbox is the line(s) selected, not the strings in it.

 

Use the Item Names property to clear it.

0 Kudos
Message 4 of 23
(1,546 Views)

Since you did not attach the typedef, I cannot run your code, but it looks horrible.

 

(to build an array from elements, you don't start with a hidden empty array and a sequence of "insert into array" nodes. all you need is "built array"!!!)

 

What exactly is the "default value" of the table that you want to see? You don't have a table, but a multicolumn listbox (naming it "table" does not make a difference!)

 

The value of a listbox (as configured) is a simple numeric that indicates the selected row, so setting it back to default, just changes the selected row to default. If you want to clear the table, you need to rewrite the item names, of course.

0 Kudos
Message 5 of 23
(1,540 Views)

I assume you wan to rewrite the 2D array of item names. All you need to to is get rid of the feedback node and replace it with a shift register that passes trough all cases vial a linked input tunnel. In one case you would append new data and one another case you could for example write your "fake headers" back, eliminating all added data.

 

 


@altenbach wrote:

(to build an array from elements, you don't start with a hidden empty array and a sequence of "insert into array" nodes. all you need is "built array"!!!)

 


 

altenbach_0-1652886435026.png

 

0 Kudos
Message 6 of 23
(1,536 Views)

No I want to reset the "listbox" (table looking like structure)  every 10 seconds. So basically make the listbox restart displaying data every 10 seconds starting from 3rd row.

I attached my type def here.

0 Kudos
Message 7 of 23
(1,520 Views)

 


@GRCK5000 wrote:

No I want to reset the "listbox" (table looking like structure)  every 10 seconds.


So follow my advice with keeping the contents as 2D array of strings in a shift register. Clear enough?

Message 8 of 23
(1,512 Views)

Think of it this way:

 

When you write strings to the listbox, the listbox shows strings.

 

If you write "123.456" to the listbox, it shows "123.456".

 

If you write "Hello" to the listbox, it shows "Hello".

 

So switching it around, if you want the listbox to show "" (i.e., nothing), what might you write to the listbox?

Message 9 of 23
(1,504 Views)

I always follow your advice. It seems to work. Thank you Mr. Altenbach. 

So  I am able to reinitialize only the first column of the table every 10 seconds (see this updated attached code).Now how do I go about reinitializing the whole table every 10 seconds? I attached my updated code.
Another problem I am having is when I reinitialize, I would like to restart loading data from the very top (3rd row). If you run  the code, you'll see what I am talking about. 
Also, sorry in advance for not making my enum type def. I didn't forget it. I just did not want to attach two codes. 
Your codes have been helping me a lot achieve what I'm able to achieve. 
0 Kudos
Message 10 of 23
(1,488 Views)