LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit array data and write it to file

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 🙂 

Message Edited by Alias A on 09-15-2009 05:12 AM
0 Kudos
Message 1 of 4
(2,763 Views)

 

Please also post the vi files what you have did so far.

 

Mathan

0 Kudos
Message 2 of 4
(2,753 Views)

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.

 

 

0 Kudos
Message 3 of 4
(2,736 Views)

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.

Why do geeks think Halloween and Christmas occur on the same day?
Because 31oct = 25dec!
0 Kudos
Message 4 of 4
(2,710 Views)