05-20-2019 05:34 AM
Morning everyone,
I'm fairly new to labview and have recently bumped into a problem using the spectral measurements block running an FFT on my signals.
I've three line-voltage waves with harmonics on them feeding into the signals input of the Spectral Measurements block and an FFT on the RMS magnitude as the output. This is breaking my wave down nicely into it's harmonic components. However, for what I'm trying to do I want these harmonics displayed as a percentage of the fundamental on Y-axis and the number of the harmonic on the X-axis i.e. if I have a fundamental at 60 Hz I would like the 2nd harmonic to be labeled as 2 on the x axis rather than 120 Hz, 3 for the third rather than 180 Hz etc.
I've managed to scale my X and Y axis and values respectively to give me a percentage of the fundamental at each specific harmonic, however, what I can't seem to do is re-label the X-axis as "Harmonic" rather than "Frequency". Everytime I try to change it, labview changes the axis straight back to "Frequency"?
Unfortunately I cant share the VI but hope the description above makes it clear enough to understand!
Cheers 🙂
Solved! Go to Solution.
05-20-2019 05:50 AM
It may be something as simple as changing the Time Scale factor to 1/fundamental, so a frequency of 60 becomes 1, 120 becomes 2, etc. If this simple change doesn't work, make a copy of your VI (call the copy "For Forum"), strip out all the "proprietary bits" that have nothing to do with acquiring and post-processing your Secret Data, and post it, preferably with a Waveform Constant consisting of "Representative Data", the FFT, and the Graph/Chart you are using for the display. We can then "see what you did" and can better "tell you how to do what you want to do".
Bob Schor
05-20-2019 05:57 AM
05-20-2019 06:50 AM
Thanks for the advice bob,
Yeah I'm dividing throughout by my fundamental frequency so it's giving me the harmonics correctly, it's literally just changing the actual label of the graph from "Frequency" to "harmonic" that doesn't want to play.
Attached is screencap of the waveform graph front panel with a mock wave having been put into it - this is all I'm okay to share at the moment - circled is the issue
05-20-2019 06:52 AM
Yeah, at the moment I'm using the express VI - was hoping there may be a way to change it without having to change out the express VI, but think you may be right here unfortunately 😕
05-20-2019 07:55 AM
05-20-2019 08:16 AM
Brilliant thank you! does exactly what I was after