06-27-2007 07:47 PM
06-27-2007 08:46 PM - edited 06-27-2007 08:46 PM
From what I can tell from your VI, you are collecting all the frequency and mag data, writing it one line at a time to the text file, then in the next iteration of the main for loop you are collecting all of the frequency and phase data and writing it one line at a time to the text file.
Instead of writing one line of data at a time in a for loop, write all your data at the end. That way you have all your data together at once to format in any way you like. And that way you can use the 'write to spreadsheet file' funtion and write all your data in one hit.
Message Edited by Troy K on 06-28-2007 12:48 PM
06-27-2007 09:35 PM
06-27-2007 09:41 PM - edited 06-27-2007 09:41 PM
Yeah I think that will work, it is still writing one line at a time which is very inefficient.
You could also do it this way... (I've disabled your data acquisition code and simulated data)
All data written once at the end
Message Edited by Troy K on 06-28-2007 01:44 PM
06-27-2007 09:49 PM
06-27-2007 09:59 PM - edited 06-27-2007 09:59 PM
In the structures pallet there is a diagram disable structure.
http://zone.ni.com/reference/en-XX/help/371361B-01/glang/diagram_disable_structure/
the dice icon is a random number generator in the number pallet.
There is an even more efficient way to format your data at the end... it doesn't allow you to format each column individually though.
This is the 'write to spreadsheet file' VI I mentioned.
Message Edited by Troy K on 06-28-2007 02:01 PM
06-27-2007 10:22 PM
06-27-2007 10:46 PM - edited 06-27-2007 10:46 PM
Message Edited by Troy K on 06-28-2007 02:47 PM