Simulink scope not updating smoothly when usng Simulation Pace block
조회 수: 18 (최근 30일)
이전 댓글 표시
I have a Simulink model of a toy spring-mass-damper system. I am using the Simulation Pace block and the Pilot Joystick All block. The joystick represents the forcing function u(t). When I run the simulation, the scope does not update every second (or which ever pace I set). Instead the rate at which the simulink scope updates is erratic. Sometimes it updates after 2 seconds, sometimes after 10 seconds. I had this issue before but I fixed it by reinstalling Matlab. I'm thinking this likely restored a specific setting to a default. Which setting might this be?
댓글 수: 0
답변 (1개)
Anshuman
2023년 2월 21일
If you go the scope window, go to View -> Configuration Property -> Time tab, and there you will find ‘Time Span’ and ‘Time display offset’ settings, which you can set accordingly. Now if you run the simulation, the scope block starts recording values from ‘Time display offset’ time and continues to record for ‘Time span’ amount of time. For example, if you set the Time display offset to 10 and the Time span to 5, the scope will display the values from T=10 to T=15.
When you reinstalled MATLAB, maybe these settings were restored to default.
Hope it helps!
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!