11-17-2015 04:02 PM - edited 11-17-2015 04:10 PM
I've built a VI that acquires a time-variant signal from a DAQ, uses a collector to store the last 20 signals, and then uses the curve fit express FI to fit a linear curve to the data. However, upon initializing the program, it gives me a warning because there's only one data point (linear fit needs >=2). Is there way to duplicate the initial value or delay initializing the curve fit VI a time step so that I no longer receive the warning? I feel like the delay block might also work, but I seem to be missing the solution.
Thanks
I've attached an example VI; obviously the DAQ signal isn't here.
11-17-2015 04:17 PM - edited 11-17-2015 04:24 PM
You can put a case structure around the part that you'd like to skip on the first iteration. Make the i=0 case not contain your curve fitting code, and make the default case have it.