LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table problem

Hi

I have got a problem with my table.
I had insert column and row titles.
LV writes the row titles in, but the column titles are pushed together to the smallest column size.

Then, I like to fill the table expedient (Errors from tcp in column tcp, errors from arinc in column arinc and so on). But LV writes the arinc error into the fifth column (in the moment I will get only the error from arinc). Why?!
Why LV don't start writing in the first cell? And how could I say this value should be written into this column?

Here is my table "experiment".
~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 1 of 10
(4,376 Views)
Hi Sarah,
This is in general abt table data,we shall be writing in a 2D array of data so all you have to do is do some array maupilation so that you get the rigth format of the data,go ahead and do it it shall reflect in the table the same way,for all headers make use of the row and col header.
hope it helps
cheers
vicky
0 Kudos
Message 2 of 10
(4,371 Views)
Hi vicky,

hmm, I'm not an expert but I tried it. Do you mean it like this?
I attached the diagram (table_edit) and two pics of the table.
Pic "firstrun" shows how it looks after run the vi.
Pic "firstrun_edit" shows the content in the cells after I had emerge the cells. There you can see on the right there are some more cells which are still shorten.


Edit:
I saw a failure... I changed the position of the constant "Errors" with the constant "Cycles" so the Errorvalue is in the right column 😉

Message Edited by sarah83 on 04-29-2005 06:27 AM

~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 3 of 10
(4,367 Views)
Hmmm, I can add only one pic..
~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 4 of 10
(4,363 Views)
and the 3rd



Edit:
I saw a failure... I changed the position of the constant "Errors" with the constant "Cycles" so the Errorvalue is in the right column 😉

Message Edited by sarah83 on 04-29-2005 06:27 AM

Message Edited by sarah83 on 04-29-2005 06:28 AM

~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 5 of 10
(4,362 Views)
Hi Sarah,

I have attached an example showing a few different things.

The case select surrounding the code that builds the table shows how you can:
- Build the table all at once
- Update parts of it only, if you were to run inside of a loop for example

Also, generally speaking with tables, I would recommend sizing them manually on the front panel to appear the way you would like them to. However, I have also included code that automatically sizes the column width once the table data is written--I believe that's part of what you were trying to do.
0 Kudos
Message 6 of 10
(4,329 Views)
Hi!

Oh, thanks, this example is perfect 🙂
The empty string constant is for the emty cell?

Why there is a blue border around the written values? Where do you cut this out?

Sarah
~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 7 of 10
(4,324 Views)


The empty string constant is for the emty cell?


Yes... a null constant makes an empty cell.



Why there is a blue border around the written values? Where do you cut this out?


The blue border means that those cells are selected. Switch the cursor to the little finger pointer on the front panel. Click the top left cell of the table and it will select or unselect all cells. You may also hold the Shift key down and select or unselect multiple cells that way.
0 Kudos
Message 8 of 10
(4,307 Views)
I understand 🙂

Do you now, if it is possible to add more than one value (error) in one cell?
Because I will get (I don't hope this will happen 😉 ) many errors (So far I don't know how to display it in the table best).
Maybe it will good to write it among each other after one error a end of line, but I don't know if this is possible not to mention how (everytime my values were signed over 😞 )
~~~~
Regards
Sarah

LV 7.1.1
0 Kudos
Message 9 of 10
(4,301 Views)
If each of your errors are one line, you could concatenate them with a carriage return/linefeed or just a linefeed would probably work. If they are more than one line already, you could strip out the carriage returns and linefeed (newline) characters, so that each error occupies only one line.

For example you could take these two errors:

Error code 10033
Something is broken
It doesn't work

Error code 10044
Voltage Incorrect
Cannot Display

...and make them so they occupy only a single line:

(10033) Something is broken, It doesn't work

(10044) Voltage Incorrect, Cannot Display


...then put them together as one string:

(10033) Something is broken, It doesn't work + NEWLINE + (10044) Voltage Incorrect, Cannot Display

When displayed they would appear as:

(10033) Something is broken, It doesn't work
(10044) Voltage Incorrect, Cannot Display


Since only one line is shown in your table for each row, you would have to adjust the height of each row based on the error text entered for that row. This could be done in an identical fashion as the columns were adjusted--the rows would be adjusted the same way.

The difference would be, you would not transpose the array to look at each column in the for loop. Without transposing the array before the values are passed to the for loop, you would be looking at the value for each row. This value then is sized according to the user font and size, but instead of looking at the Right value of the cluster to determine how far over the text goes, you would look at the Bottom value of the cluster to determine how far down the text goes. This value could then have a fixed constant added (5 or 2 or whatever), which would then be used to set the height of each row.
0 Kudos
Message 10 of 10
(4,292 Views)