LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table problem

Hello everyone,
 
i'm creating this sub vi which is able to run a list of commands after the for loop stop indexing from the array constant (see attached: table_block.jpg). Each command will give me a list of results which i intend to display it on a table (see attached: table.jpg).
 
Problem is the data will not continue to write onto the next column and so forth instead it will replace the initial row 0 values. In order for my next command's results will be written on blue column and so forth, what should i do to change the vi programming?
 
Lastly how do i save the data to a file without constant prompting? I tried write to spreadsheet and write to file and it will prompt me 'save the file at location...' at every command (due to the indexing...)
 
Any help will be greatly appreciated!
 
regards
Download All
0 Kudos
Message 1 of 21
(4,202 Views)
Hi,
   I'll quickly try to help with file problem...

    You have to Open a file before writing in data, and close it when you no longer needs. Are you using OPEN FILE and CLOSE FILE function? From the pictures I can't see them...

    If you use OPEN function, you have a terminal "advisory dialog", which you have to set to FALSE.

    If you already use OPEN file, forgive this answer, and maybe the problem is elsewhere...

    Have a nice day!

graziano

Message Edited by Graziano on 09-27-2007 03:53 AM

Message 2 of 21
(4,180 Views)
And for you other problem, each time you are creating a new array and writing that to the table. To append, you should create a shift register to hold the array and with each iteration of the loop, use the build array function to add new elements.
0 Kudos
Message 3 of 21
(4,154 Views)

Sorry if i'm slow, since i'm using a build array function in the for loop, how do i wire the right terminal of the shift register? I'm creating the shift register for every data type i'm getting for my results, is that right?

Thanks!

0 Kudos
Message 4 of 21
(4,139 Views)

Use insert array. Give input to this array from the left shift register and connect output of insert array to the right shift register.

Give build array output as an inserted element to the insert element. connect table at the output of the insert array.

i hope it will helu u....

Ranjeeta

Message Edited by Ranjeeta on 09-27-2007 11:00 PM

0 Kudos
Message 5 of 21
(4,124 Views)

No insert array is necessary. Just the shift register and build array. Make sure the Build Array is set to concantanate inputs.

Message Edited by Dennis Knutson on 09-27-2007 10:15 PM

Message 6 of 21
(4,114 Views)
If you rt click on the For loop left border & tell Add Shift Register [SR], it ll automatically create the rt terminal of the SR. You dont ve to create it seperately. However, on the lt terminal of the SR, if you rt click & tell Add Element, it ll add an additional element only on the left border of the For loop. This ll represent the Current-1 data element in the SR.
 
So, be a bit careful while configuring the SR. Keep open the online help n start coding.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 7 of 21
(4,108 Views)
I'm trying out the solution you guys gave me facing the same problem cause my data is being overwritten at column 0 when running different tests. According to picture attached, A is Array constant Table and B is Array constant Numeric created from 'Test average offset' etc right so i would have a few of the same draft up in the for loop?
 
Is it correct? cause i'm still at my wits end...
 
 
0 Kudos
Message 8 of 21
(3,983 Views)
Posting back the same I image that I posted doesn't tell us what you did to your program. You should have added a shift register to your for loop and where you are creating the 2D array, write that to a Build Array function that is wired to the shift register. If you would post your actual code, that would be much better than an image.
0 Kudos
Message 9 of 21
(3,975 Views)
Sorry for my wrong. Here's the program that i did so far...
 
Thank you for helping.
0 Kudos
Message 10 of 21
(3,968 Views)