11-11-2014 11:44 PM
I am beginer for Labview environment.
I have acceleration Vs time dat in .lvm file
Then I get double integration of this
acceleration data to get displacement data.
Then I get FFT of displacement and displayed on graph.
Upto this point VI works
But if now i connect this FFT of displacement to 'write measurement file' then it shows error.
Please help me......and fix the error.... All I want is two column data, one of frequency and
other of displacement amplitude.
I have attached all files
I request you to correct the VI please..
Thanking You!
Solved! Go to Solution.
11-12-2014 01:06 AM
The issue is the "spectral measurements" output is a cluster of 3 elements (f0, df, and an array of values). The write measurements file VI expects a "signal" or "array of signal". I used build waveform to map the cluster elements to a waveform and used a FOR loop to ensure all of the elements in the array of cluster were mapped. I was not sure what to do for f0. Build waveform is expecting a timestamp -- I could map a zero into time and wire that to t0 but I believe it will be written in the file as time and it will not be obvious that it started out a as frequency.
11-14-2014 12:06 AM
Thank you so much for the reply.
As I know, FFT is complex number.
So its components are Magnitude, Phase, Real and Imaginary parts.
In the earlier solution you sent, what is the output of 'FOR loop'?
Is it the magnitude (it is written there as 'magnitude')?
I need imaginary part Vs frequency as output in my further work. How to get it?
I also request you to look into VI attached here named as 'Imaginary part of FRF extraction'
In this VI, I am basically interested in writing the data 'Imaginary part of FRF (i.e. Y/X) Vs Frequency'
I tried to introduce 'FOR loop' which you suggested, but it didnt work.
I know errors are because of mismatch of data types between source and sink,
but I could not rectify those, as my knowledge about Labview is only two week old.
Could you please send the corrected VI?
I could not attach your earlier solution because more than 3 attachments are not allowed I think......
Please save the VI in lower version (labview 11)
Thanking you again!
Regards!
11-14-2014 12:47 AM
The concepts you'll want to research are "arrays", "indexing arrays", "auto indexing", "cluster", and "waveform datatype".
The FOR loop in the first VI I sent used auto indexing to take each element from a 1D array of clusters and do operations on them separately to convert them to a waveform. The ouput tunnel also uses auto indexing so that the end result is a 1D array of waveforms. I used the FOR loop so that no matter how many elements were in the array, you would get a corresponding number of waveforms passed to the "write to measurments file".
In this case, because the output of the FRF is a single cluster (not an array of clusters), the FOR loop was not needed. The VI attached this time takes the cluster output of the FRF and maps the cluster components it to a single build waveform function and you get a single waveform result.
I do not have Sound and Vibe loaded on my computer at the moment, so I cannot run your VI and see the output of the SVL integration VI. The output datatype is "1D array of waveform" and your indicator and your FRF both can accept only single waveforms. I put an index array function in between the integration and the indicator/FRF but if there is more than one waveform in the array this would be the incorrect solution. My solution fixes the broken wires but throws away waveforms 2,3,4.... if they exist.
11-14-2014 02:13 AM
11-14-2014 02:58 AM
I don't see any obvious reasons for your symptoms in your block diagram.
A few questions:
Which indicator specifically is not responding as it should ?
Does the While loop exit normally (by pressing Stop and not on its own)?
Do you do anything different when you run "Circuit 2" in its own VI?
What do you get when you put a probe on the 4 signals coming out of the split signals function just after the DAQ assistant? Do channels 1 and 2 look similar to 3 and 4?
Is there one charging relay for both batteries?
Are you sure circuit 2 really is drawing current to be measured in this setup?