10-16-2012 10:49 AM
@jcannon wrote:
So for a 100 data point window, the outcome of the for loop with the 100 element subarray should be either 0 (1 or more elements DO NOT exceed the threshold) or 1 (ALL elements exceed the threshold).
Specifically, I would use "Array min&max ptbypt" with a sample lenght of 100, then compare the min with your threshold. If the min is larger, you got a match.
10-21-2012 05:47 PM
Hi altenback,
This is a much simpler solution; but I cannot get it to work... I am doing something wrong with the autoindexing...?
Regards,
Jack
10-21-2012 06:22 PM - edited 10-21-2012 06:32 PM
Please attach your VI.
10-21-2012 07:05 PM
Hmm... Had another quick play... Wires now seem happy to work?
I have it set-up as a subvi; so I the user can select the data of interest using the enum controls.
Do seem this look ok...?
Regards,
Jack
10-22-2012 01:09 AM
Your VI has nothing to do with my suggestions. Please explain.
10-24-2012 05:30 PM
The vi attached (MAW) uses a moving window approach (based on window length and step length controls) and determines if all data points within each window of after are greater than the threshold value and provided the index at which it occurs.... The MAW vi has other cases/controls added so that i can use it as a basic subvi and select what components of the data I want (e.g. just the first index that meet the set criteria, the first k number of indices, the last indices, etc, etc)
I have included the Array Min/Max function in the first for loop as this is where the data are compared against the set criteria...
Regards,
Jack
10-24-2012 05:35 PM
Yes, I was just puzzled by my name in the Vi file name, because I suggested using a ptbypt version, which you don't use here.
(Doing a running measurement is not new and revolutionary, so there are existing well debugged and tested tools that you can use, eliminating knitting your own.)
10-24-2012 05:39 PM
Ahhh... ptbypt... How did I not think that that? I use ptbypt functions in other aplications..
That would have saved me some hours!... Still so much to learn...
Thanks...
Jack