07-22-2012 09:02 AM
Hellow everybody;
I generated a sine wave in the control and simulation loop. Its frequency and amplitude may be changing along the simulation time.
I would like to contineously detect its amplitude and frequency information during the simulation, so I can observe their changes.
The VIs I used are "extract single tone information"VI and "peak detection"VI. Both of them could work but they only output the freq and amp value when the simulation finished, which means I am not able to obtain their information during the simulation.
Could anybody help me with this problem? I have posted a simple programme shows my problem and also a snapshot of it. Really appreciated if someone could offer me a help. Many thanks!
BR
Floyd
08-03-2012 01:06 PM
So each time your control and simulation loop runs through it returns your frequency and amplitude.
Why not throw the entire control and sim loop inside a while loop. That way its constantly running through that inner loop.