[Simulink Test] Detect Signal Change in Logical & Temporal Assessment Without Modifying Harness
이전 댓글 표시
Hello MATLAB Community,
I am working with Simulink Test (version R2025b) and want to create a temporal assessment that triggers a verification when a logged signal (`CMD_MODE`) changes value, without modifying my existing test harness.
Problem:
I have tried the following syntaxes in Logical & Temporal Assessment, but none work:
- changed(CMD_MODE) → "Invalid call"
- CMD_MODE != CMD_MODE[1] → "Not a valid MATLAB expression"
- prev(CMD_MODE, 1) → "Unknown function"
The signal `CMD_MODE` is of type int8, and I want to verify a condition on another signal (`OUTPUT`) whenever it changes.
Questions:
1. What is the correct syntax to detect a signal value change in a Temporal Logic Assessment?
2. Is there an official operator (like rise()/fall()) for non-boolean signals?
3. If no solution exists without modifying the harness, what is the least intrusive workaround?
What I’ve Already Tried:
- rise()/fall() (only works for boolean signals)
- prev() or signal[1] (syntax not recognized)
- Adding a Memory block in the harness (works but prefer to avoid)
Environment:
- MATLAB/Simulink: R2025b
- CMD_MODE` type: nt8
- Example condition to verify: OUTPUT == 1 after change
Thanks
댓글 수: 2
Midhulesh Vellanki
2026년 6월 4일
Hi Theo,
To use Logical and Temporal Assessments, you'll need to create symbols and map them to the model.

Based on your description, it looks like this mapping step may not have been completed yet. In the image above, the signals I added are showing warnings because they haven't been mapped. You can right-click on a signal and select the option to map it to a signal in your model.
Théo
2026년 6월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Inputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!