09-20-2019 04:08 AM
Good morning gents, I am new to Labview and I would ask you something about integrated waveforms.
I have a waveform signal and I have tried to integrate it in different ways (see pictures attached).
The results plotted on the graphs seems fine and right (I think integrated waveform 1 is the correct one), but I cannot understand well why in the other graphs the time scale on the x axis varies and why also the amplitude on the y axis is different in the integrated waveform 3.
I think that the problem regards the dt of the signal.
I want also ask which are the differences between the integral blocks I used.
Finally I would like to ask some suggestions on how to correct the visible "offset error" on the integrated signals and how to implement this offset error correction.
09-20-2019 04:22 AM
We cannot run or debug images. (Especially if there are express VIs, a lot is hidden from view).
Please attach your VI instead. Make sure it contains some typical default data for the signal array. Thanks.
(SIDE NOTE: to get an element of an array, "index array" is the right tool. Doing an "array to cluster ...unbundle" dance is not the right way...)
09-20-2019 05:07 AM - edited 09-20-2019 05:19 AM
Thank you for your suggestion.
Here I attach my VI, it is basic and simple.
I cannot attach the data I work with because the .pnrf is not accepted as a format I can send here.
But the signal that comes out from from the read data channel is an array of waveforms and every signal contains a current waveform and a voltage waveform.
09-20-2019 07:28 AM
@EdmondDantes wrote:
I cannot attach the data I work with because the .pnrf is not accepted as a format I can send here.
But .zip files are an accepted format! So just zip up your file and attach it.
09-20-2019 08:38 AM
ZIP FILE: I cannot attach the data I work with,but I attach a test .pnrf file with two sinusoidal signals.
You can import on labview via hbmpnrf plug in.
09-20-2019 08:45 AM - edited 09-20-2019 08:48 AM
@EdmondDantes wrote:
The results plotted on the graphs seems fine and right (I think integrated waveform 1 is the correct one), but I cannot understand well why in the other graphs the time scale on the x axis varies and why also the amplitude on the y axis is different in the integrated waveform 3.
The time scale issue to due to the fact that your last 2 graphs have nothing to give them a time reference. Use Build Waveform to just change the Y portion of your waveform to use the new integration array.
The amplitude of the third waveform is different because you did not supply a dt. Integration involves a multiplication of dt.
Here is a much cleaned up version of your code that should fix what you are having issues with.
09-20-2019 10:25 AM
@EdmondDantes wrote:I cannot attach the data I work with because the .pnrf is not accepted as a format I can send here.
No need to attach the data. Simply run the VI until it displays typical data. Now right-click the terminal of the "Original waveform" graph, followed by "create constant". Now delete the upstream code, the constant has a copy of the data. Save the VI under a new name (it will be a little larger on disk) and attach it here. (Please also give it a reasonable and unique name to prevent confusion. My downloads folder already has several "Try.vi", so the browser will rename yours to e.g. Try(3).vi when I try to download, potentially making me to open the wrong code by accident. A better filename might be WaveformIntegrationTest.vi, for example)