Test Manager minimum duration condition

3 views (last 30 days)
Nicolas Broch
Nicolas Broch on 5 May 2021
Commented: Nicolas Broch on 21 Jun 2021
Hello,
I would like to create in the Test Manager the following assessment:
At any point of time, if myCondition == true becomes true then, with no delay, myCondition == true must stay true for at least 1s.
This sounds like a "standard" kind of assessment to check minimal timing and my conditions sounds correct to me. Unfortunately, when I define that assessment, I get the following error:
Error evaluating assessment 'Assessment1'.
Caused by: Error during assessment evaluation. Error during evaluation of expression 'Assessment1: At any point in time, if isTrue becomes true then, with no delay, isTrue must stay true for at least 2.5e-06 seconds'. Error during evaluation of expression 'isTrue must stay true for at least 2.5e-06 seconds'.
Unsupported signal: time vector must be strictly increasing.
I'm running my simulation in fixed-step and funny enough, this error occurs only and only if the time I set for "must stay true for at least" is exactly the time the condition is true. If I deduced 1 ns, then it works.
Has anyone a idea how I could avoid that issue or whether it is a bug in Simulink Test?
Thank you for your answer, Nicolas
  2 Comments
Giovanni Miraglia
Giovanni Miraglia on 18 Jun 2021
This usually happens when a signal has more than one value for the same point in time. This phenomenon might be caused by multiple things. For instance, it can be caused by rounding errors. Without having more information about your setup and model it's difficult to provide a comprehensive answer. I would suggest providing more information about your setup including which release you are currently using.
Nicolas Broch
Nicolas Broch on 21 Jun 2021
ahhhh, so I see the issue and thanks to your explaination, I could debug my model.
My issue was that, to avoid having to unclick on each inport the "interpolate data" flag, I was generating such input vectors:
t = [0 1 1 2 2 3];
in = [0 0 1 1 0 0 1];
Then, of course, I get 2 values at each input sample time! So I just tested with a small model without interpolated data and with the following input signal and it works:
t = [0 1 2 3];
in = [0 1 0 1];
Thank you for your feedback and I hope this could help future users of the Test Manager.
Have a good week.
Nicolas

Sign in to comment.

Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!