05-16-2012 05:04 AM
Hello,
I'm trying to write a simple program but I can't seem to figure out how to write it.
I have a dynamic series of data (about 16,000 values) running inside of a while loop.
I want to add 180 to a value if that value drops below 30.
My idea was to:
1. Do a comparison: "x < 30" to get a true or false value.
2. Send the Boolean along with Use a case structure to say if true
2. Then,if "true" x = x + 180, If "false" x = x (just passes straight through the case structure)
However, this always adds 180 to the value.
Please Help!!!!
Thanks, Jake
Solved! Go to Solution.
05-16-2012 06:25 AM
Hi,
If my uderstanding is correct, this should help you..Please refer the attached image..
Accept as sollution if solved the problem.... ![]()
Thanks,
Yogesh
05-16-2012 07:22 AM
Thanks for that you're a legend.
However, whenever I change the dynamic data to an array like that, I loose my time values (sampling at 1000 hz). That causes heaps of issues with other parts of my programme, is there any way around this?
05-16-2012 07:53 AM
You can retain the time values also. Since the sampling rate is 1kHz, the DBL array and the dt (1/1kHz) can be used to buid the waveform again.
Please refer the attached VI.
Regards,
Yogesh