01-17-2012 06:07 AM
For the graph, try clearing the data each time you start the VI.
You can do this by right clicking on the chart (in the block diagram) and selecting 'Create > Property Node > History Data'
Right-click the new Property Node and click 'Change to Write'. Right-click again and select 'Create > Constant'. Wire the new constant to the Property Node and place the constant and the node outside of the while loop. Wire the error out from the property node to the edge of the loop to force dataflow.
Now right-click on the chart on the front panel and deselect 'Autoscale X' and change the range of the X axis to a suitable scale.
This should look a bit better and more useful. I've attached an edited version of the code with these modifications.
I just got your last message, so I'll look into what's wrong with the power spectrum vi.
Kind Regards,
01-17-2012 06:48 AM
Thanks,
I did the changes and will try to test them as soon as it will be available.
I have included the last version of the code I have.
It does not include changes to Power Spectrum as it did not work.
01-17-2012 07:25 AM
I'm not sure why that other version of Power Spectrum gives you erroneous results. Perhaps it is due to the datatype being a waveform.
I'm using your programs with simulated hardware, so I don't know if it's giving meaningful results. There are a number of different Power Spectrum VIs in LabVIEW. I would suggest you try alternative ones. I would suggest trying 'Functions Palette > Signal Processing > Wfm Measure > Spectral Measurements'. This should perform the same functions as the original Power Spectrum VI.
I will try and find out the reason behind the error with the original VI, but in the mean time, one of the other spectrum VIs should get you up and running.
Kind Regards,
01-17-2012 07:32 AM
I could stick so far to my old one, as it gives an error only when I close the program.
I'll take a look at other options for power spectrum as well.
Sergey.