LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFO File Write?

Hello,

               I am rading 5 channel data, for that i want to show to the user Last in first out data (LIFO) using Table on front panel, also the file should be saved as a format of Spread sheet as Last in first out.

 

How to do this? 

Regards,
Balaji DP
0 Kudos
Message 1 of 3
(2,607 Views)

It sounds like you want to reverse the rows of a 2d array while keeping the collumn the same. THe following code will;

 

 

1) Accept a 2d array of data.

 

2) Get the number of rows in the 2d array by indexing ou the frist elelemnt returned by "Array Size".

 

3) THe number of rows is decremented because we will be working with zero based indexes.

 

4) Use the data passed to init a Shift Register where will be building the desire array.

 

5) In the For loop we iterate through each row (start at the top) and use that dat to replace the row in the shift register starting at the bottom (max index) and working up.

 

You can use that code construct with other data types and then write the results to your table and "Write to Spreadshhet File".

 

Have fun!

 

Ben

Message Edited by Ben on 11-25-2008 07:47 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,586 Views)

is there any possibilities.. if i use the file I/O--> set file position  there is a start, end, current.. using this we can append the data in to file...

 

can i use for LIFO?

Regards,
Balaji DP
0 Kudos
Message 3 of 3
(2,555 Views)