04-22-2009 08:25 AM
Hello,
I need help generating a random wave form (see attachment). How do I specify a Min/Max step duration to match the graph?
04-22-2009 09:43 AM - edited 04-22-2009 09:43 AM
You should have posted this question to the appropriate language board. It has nothing to do with DAQ hardware. You should also try to avoid attaching word files. It's simpler to just attach the image.
From an earlier post, I see you are using LabVIEW. Try the attached example.
04-22-2009 10:46 AM
Many thanks............
Would you please check the attached vi and let me know how to set a max and min dt (s) values.
Also how can I adjust the logic to automatically set the duration which is sampling time x number of samples?
04-22-2009 12:17 PM
I don't understand what you are asking for now. With my example, the dt would be the sample rate and with a waveform, has to be a constant.
Your code with the gaussian white noise seems to be being used instead of my example. Here, the dt is set with your sample rate control. If you also want this to be a random number between two values, do the sample thing as the voltage randomization. With your example, the overall duration is set by the value you wire to the for loop's 'N' terminal and the Sampling Time control. If you want to specify duration instead of loop count, divide duration by dt if dt is a constant. If dt is not, then you might want to use a while loop instead of a for loop and stop the while loop with an Elapsed Time function.
04-22-2009 01:23 PM
Would you please check the attached file.............
I tried to randomize dt as i did with the voltage control, but it does not seem to make any difference.
04-22-2009 01:32 PM
04-22-2009 01:45 PM
Dennis,
I am fairly new at this....
Would you please show me how to do it? You can use the previous vi file.
Thank you
04-22-2009 02:12 PM - edited 04-22-2009 02:14 PM
04-24-2009 01:48 PM
Dennis,
Thank you very much for your help.
In the attached vi, I specify Min, Max voltage and Min, Max step duration and the number of random steps, say 2-10(V), 300-1000(ms), and 8 steps respectively.
MM5 is to sample the voltage every 2 (ms) "sampling time", the number of samples I would like to read is 500 samples. How can I sink the output array and MM5 array so that I get the same readings?
Thanks,