11-17-2011 07:53 AM - edited 11-17-2011 07:57 AM
Hi,
I am quite new on labview, I just started to use it roughly a month ago.
I am trying to simulate impedance measurement (not connected to any load units yet).
I am struggling to find a proper way to change the frequency of the sinwave, after a certain length of time, to make it describe a full spectra of frequency. I don't want to change it at every iteration, but like every 80 seconds, after the start/stop button has been pressed.
To be more clear, I want to set a Max frequency, a Min frequency, and have the program dividing the frequencies by two (10000, 5000, 2500... Assuming the Max is 10000 for example) every 80 seconds. And stopping at the min frequency.
Here is the vi attached.
If you think of better way to run my .vi, please let me know.
Kentmey.
11-17-2011 10:42 AM
The frequency is set by the 'w' parameters in your sine wave function.
So basically, you want a function that reads in the current time and outputs a frequency value starting at 10000 and decreasing by 50% every 80 seconds.
Here is a simple VI that will do exactly that. It takes the data from Elapsed time (s) and delivers a frequency to w.
Right now, it's set to start at 10,000 but you can wire Fmax instead.
11-17-2011 11:22 AM
I couldn't resist the urge to clean up the rest of it.
11-17-2011 12:04 PM
Thanks a lot, it looks a lot nicer. Massively better (And a lot faster than mine as well).
11-17-2011 12:06 PM
The increase in speed is probably because your program wrote data to the file with each iteration, while my version waits for it to complete (either Stop button or F<Fmin) and then saves all the data at once.