One of the ways I've done this without using ActiveX (usually my
first choice)is to write the output data in row format the way
you have and then, once the data has been collected, read the
whole file back into memory as a 2D array, transpose it, and
write it back to disk. This is memory intensive, but since your
datalogging is completed, it shouldn't cause you a lot of
problems.
Another way to do it is write the data to disk at each cycle in
binary logfile format using the low-level file functions. When
the datalogging is complete, you can read the log file directly
into a 1D cluster array. Use a for loop to index this array
into a 2D array, transpose, and write to disk as a delimited
string. Or, since you are done with logging, you might want to
consider poking the d
ata directly into Excel using ActiveX and
the Range method. There are some newer examples on NI's site
that have better documentation than before. You can email me if
you need more info (remove anti-spam).
MaxMar
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!