02-17-2010 07:43 AM
Hello,
I have a sub-vi that loads up a table indicator with data and also labels the row and col headers. When I try to put the table into a cluster the table row and col headers disappear. Any ideas what is going on?
02-17-2010 08:06 AM
For every control in LabVIEW there is a data part and a user interface part. For numeric controls, the data part is the number, the user interface part might be the radix display (indicating whether the number is decimal / hexadecimal).
For a table control, only the main table contents is the data, the headers, line colours, etc are all part of the user interface.
When you wire a control on the block diagram, only the data element is carried, and this means that when you wire a table control to a cluster you just get the table contents, not the header. If you also need these you would either need to append them to your table's data array, or add separate items in your cluster.
Hope this helps,
Shaun
02-17-2010 08:14 AM
Hello,
Ok, thanks for the explanation. I am using a table indicator (not a control) but I will assume that does not make a difference. I will have to figure out out to get the data and header info into the cluster easily. I may make the header as part of the data for the table or just output a string indicator. Thanks for the explanation, I was pulling the hair out of my head.
Stay tuned for further details
02-17-2010 09:13 AM - edited 02-17-2010 09:19 AM
Kaspar wrote:Hello,
I will have to figure out out to get the data and header info into the cluster easily. I may make the header as part of the data for the table or just output a string indicator.
I think you will have to define those headers as separate values. Maybe like this:
But it is very unlikely that I am right anyway.
02-17-2010 09:36 AM
I went down this same path a few months ago... losing the column headers between sub-vi's.
I passed around the table's reference number and accessed the column headers that way... but Kaspar's idea has a nice efficiency to it if you don't want to or can't modify the connector panes of the sub-vi's to pass around the refnums.
i didn't think of it but if the column headers got inserted into the first row before sending the table data to the sub-vi, you could strip that row and assign it to the column headers[] property later.
Sweet!
i attached my example file. it's in LV 8.5
02-17-2010 11:28 AM
Hello,
As a result of the responses I have received on this forum combined with talking to my co-workers, I have arrived at a solution to my problem. My generic programming approach is to have a output cluster to every sub-vi that contains "all of the stuff" that the sub-vi outputs , this means I only need one pin for the output.
The solution is to have a pin that just contains the table...and presto the headers come out and I can create tables inside a sub-vi and pass them around to where ever they need to go!
Thanks again for you responses to this issue.....