ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
04-09-2008 11:11 AM
Hello again basyarie,
We are glad to be of help. NathanT summarized what you basically need to do for writing the data onto a file. From this point on it more of a trial and error than a single set way of doing it.
One thing that I want to clarify is that the data type you probed is an array. Therefore it is the collection of all amplitude values in the graph. When you are creating your columns, those values correspond to the "value dB" column only and nowhere else.
Since you need the frequency value that each amplitude value corresponds to, you will have to build the frequency array yourself, the driver doesn't provide that for you.
Now if you look at the screenshot you posted, you will see three transparent comments: x0, dx, Y.
As I mentioned above, Y is the array that has all the amplitude values.
x0 is the first frequency value. Therefore it is the frequency that corresponds to the first element in Y.
dx is the step that should be added to get the next frequency that will correspond to the next element in the Y array.
In mathematical form:
Frequency of Y(0) = x0
Frequency of Y(1) = Frequency of Y(0) + dx = x0 + dx
Frequency of Y(2) = Frequency of Y(1) + dx = x0 + dx + dx + dx = x0 + 2(dx)
.
.
Frequency of Y(n) = Frequency of Y(n-1) + dx = x0 + n(dx)
You can use a simple while loop to build this array and then use the techniques Nathan mentioned to write them into a file.
I hope it helps.
Good Luck!!
04-10-2008 10:05 PM
04-10-2008 10:07 PM
04-11-2008 09:09 AM
04-20-2008 08:58 PM
04-21-2008 08:53 AM
04-21-2008 09:21 AM
04-21-2008 09:46 AM
Hey Basyarie,
Your last screenshot would automatically have the broken arrow because that "Write to Text File" VI requires at least one input in the text terminal. If you don't wire anything to that terminal, you will always get broken arrows.
Please try to mass compile your application that is giving you the errors (go to tools -> advanced -> mass compile and do this action in the folder that your application is in)
If that doesn't resolve the issue, try to rebuild the application from scratch using everything from palettes without copy - paste type of actions.
Let us know how it goes.
05-20-2008 08:07 PM
05-20-2008 08:24 PM
If what you are asking is how to do this in LabVIEW, then you just have to use the Array Subset function. Provide a start index and a length.
Array manipulation like this in LabVIEW is very basic. If you are having problems with things like this, you should really look at the free training available. You shouls alos always work with the Context Help turned on and refer to it often.