Is it possible to create a cycle counter that only increments within a specified signal range?
I'm able to create a cycle counter as explained in THIS post.
But want to expand on this by having the counter only increment when my signal's peak-maximums are between the range of 1000-1100lbs.
This is a cyclic fatigue test with varying loads, its important to capture not only total cycles but more crucially, a target number of cycles the specimen sees loads between 1000-1100lbs.
Furthermore I'd like to be able to export ONLY the portions of data where those loads were achieved. We need to prove those targets loads were achieved XX number of times.
I'm not very skilled with the statistics function.
Dear Lemmy,
thank you for reaching out to us.
I went through your request, but would kindly ask for some more clarification.
- Are you currently working with a Sequencer, or are you using mathematics as you noted in your last post?
- Cold you please make a usecase clarification on the process you would like to achieve?
In your initial thread, your requirements were as follows:
- make a counter that increments at each reversal of the cyclic load
- store data for the following cycles:
- 1-10
- 5,000-5,010
- 10,000-10,010
Our colleague presented a solution using the Sequencer, but I understand that you were, up to now, working with mathematics instead of the sequencer.
If I understand you correctly, you would now like to achieve the following (completely disregarding everything in the previous thread):
- check when the signal's peak-maximums are between 1000-1100lbs
- make a counter whose count will increase only when it detects a signal's peak-maximum to be between 1000-1100lbs
- store each count in a new datafile - this will ensure that we only store the data where the signal's peaks are between 1000-1100lbs
I understand that the above is what you mean by "export ONLY the portions of data where those loads were achieved".
If this is correct, then I believe the actual implementation isn't that straightforward, especially if we're looking to implement everything while in measure mode. The key problem is this requirement
- have the counter only increment when the signal's peak-maximums are between the range of 1000-1100lbs
because we have to look for a maximum of a signal during each reversal of the cyclic load, and any such calculation will be at least slightly delayed, since we have to wait for all the samples in the calculation to come. From the get go, my thoughts went to two options to calculate the peak:
1. Use basic statistics to calculate the maximum of a signal during each reversal of the cyclic load, then generate a pulse only if the maximum value is within 1000 lbs and 1100 lbs. After that, count every instance where the max peak within this instance is detected.
here's what this would look like: