11-25-2008 03:14 AM
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?
11-25-2008 07:46 AM - edited 11-25-2008 07:47 AM
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
11-25-2008 11:17 PM
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?