LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update Global Table Row headers

I have a table in my Main VI. I have created a Global Table so I can transfer data from a subvi back to my Main VI. This works perfectly. I can add a row of data I create in my subvi send it to my Global Table VI then off to my Main VI table.

The only problem I am having is getting my Main VI row headers to increment by 1 as I add rows. I don't see a way to access the header rows of a Global table using my subVI or access them with my Main VI either. Like I said I just want to increment starting at 0 on the first row header on my main VI table by 1 each time my subvi creates a new row of data.

 

I tried creating an event to detect the Main VI table updating but it didn't register an event when data was added programmatically.  

 

Thought using a Global table might be able to do that but it does not provide access to the headers. 

 

I have not included a VI as it is proprietary for the company I work for. But I could create a smaller version of the problem if needed. It is quite simple, a Main VI with a table, A global Table, and a Subvi sending data by rows to the Global table. The Main VI table then gets the data to fill it's table from the Global table. The whole thing is done with a producer consumer architecture.

 

Any suggestions or help is appreciated. 

0 Kudos
Message 1 of 6
(1,134 Views)

Hi Brian,

 

most often it helps to provide some example VIs to demonstrate your problem!

 

What is a "Global table"? What is a "Global table VI"?

 

In a table indicator you can use property nodes to access row/column headers…

 


@BrianSw wrote:

I tried creating an event to detect the Main VI table updating but it didn't register an event when data was added programmatically.  


Which kind of event did you "create"? You know writing data to a terminal does not generate an event!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,117 Views)

Put the refnum of the table on the global, instead of the table (which is a 2D array of string without header info).

 

George Zou
0 Kudos
Message 3 of 6
(1,106 Views)

If by Global Table you mean a Global Variable consisting of a table, you cannot programmatically change the headers just as you can't programmatically change the default headers of a type def. The only way you can do either of those is to open, modify, save and close. Instead, you want to edit the headers of the table that is actually displayed on screen (your Main VI Table).

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 4 of 6
(1,105 Views)

Yes, it is what I meant. A table as a global variable. It was a poor way to describe what I was meaning to say.

0 Kudos
Message 5 of 6
(1,011 Views)

I will look into that.

Thansk

0 Kudos
Message 6 of 6
(1,010 Views)