LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing Data From Table

I have a rather strange problem. I have a table in my program. The table recieves data from a history file when the program is loaded, and both the table and history file are (seperately) updated whenever new data is generated.
Today, I added two additional columns, raising the number from four to six. I added code that included the two additional columns on tha table in the program and on the history file. I made room for two additional columns of data on the table.
 
got all that?
 
Here's the problem: I started the program as usual, and generated new data. The four original columns updated, but the two new ones did not. I looked at the histoy file, and all six columns of data were present. On a lark, I shut down the program, restarted it, and the two new columns of data were now present, and all six columns of data appeared whenever the table was updated.
 
I am going to send my program to a customer, and I cannot tell him to generate data, shut down the program, and restart it. What can I do to prevent this problem from occuring?
 
Attached is the code responsible for putting data on the table.
 
EDIT: I tried shuting down the program, deleting the data in the two new columns, and the problem happened again. Whatever I am doing, it is reproducable.

Message Edited by BobChuck on 01-18-2007 03:33 PM

0 Kudos
Message 1 of 4
(3,195 Views)
Hello Bob,
 
From what I understand, you are having troubles populating all of the columns in your table but I am not able to reproduce this problem as the VI you attached is not executable.  There are multiple subVIs missing, such as:
 
DateStamp.vi
TimeStamp.vi
MyGlobals.vi
ProductGlobal.vi
 
I also do not see a table in the VI - there is a table reference, but where is the actual table?
 
If you could please create a zip file or build that contains all of the necessary pieces, we should be able to get this working quickly.
 
Have a great weekend!
 
Janell R | Applications Engineer
0 Kudos
Message 2 of 4
(3,172 Views)
I had the same problem with missing files and VI's, but I just replaced the missing VI's with constants.  I found the same problem you had.  Where you only get 4 columns of data although you are adding 6 columns.
 
I found this in the help file for the insert into array VI.
"This function resizes the array along only one dimension. Therefore, you can wire only one index input. The index you wire determines the dimension along which you can insert. For example, to insert row(s), wire the row index, or to insert column(s), wire the column index."
 
I did the highlighting in bold.  So you are adding a row, but you are also adding 2 columns with that row, which means you are changing both dimensions of the array.
 
Perhaps you could try comparing the number of columns in the array as it comes out of the table to the number of columns in the array you want to add.  If you find out it is short by 2, then you add 2 empty columns to the array before you add the new row.

Message Edited by Ravens Fan on 01-19-2007 11:04 PM

0 Kudos
Message 3 of 4
(3,169 Views)

The problem would be avoided if Build Array (in concatenate mode) was used instead of Insert Into Array to add your new 1D string to your 2D table.

Also, %t isn't a valid string format in LV6.1.  It only came around ~LV7 ... you want %s.

=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 4 of 4
(3,133 Views)