09-15-2009 05:10 AM - edited 09-15-2009 05:12 AM
Hi all.
Situaton:
Measuring data from device in inpedent loop, where measured data is writing to queue in Array format. In other loop I am trying to edit that array and write it to file. I tryid use "write to spreadsheet file.vi" but this vi just write array to file, no editin possibility. I have tryid to use write to text file, but first have to seperate elements from the array and so on...
I have attached image where:
-Column-n only mark inserted to at the start of the array data
-Header "elements number"
-Array1, array2, array-n queue's data
How I should do this?
Thx again 🙂
09-15-2009 05:19 AM
Please also post the vi files what you have did so far.
Mathan
09-15-2009 06:13 AM
Hi Mathan. Here is something i have trying to do. This vi does not write it correct... and have I done something wrongly or "stupidly" in code 🙂
Problems:
-Second row is inroccet
-If i know that device returns array where is 10 elements. Can I trust that and just return 10 elements from array and changed it to string?
-Can I trust queue in this way?
I think hardest in labview coding is that you dont know what kind component you should use and what is the right way to use them.
09-15-2009 07:48 AM
Alias,
Is that jpg the error or is it the desired output? In the collect elements from array for loop, you can enable indexing of the data to allow the whole queue to run. If there is 10 elements in the queued data, it'll process all 10. I also suggest moving the write header for loop to be inside of the true condition of the case structure; no need in building the header each loop. I'd also reverse the order tab constant and the indexed header; this shifts the header row to the right by 1. Your second row is generated in this true case also. This is where you need to reformat the string for the second row.