필터 지우기
필터 지우기

Make Timer in Simulink

조회 수: 19 (최근 30일)
Aashish Bhandari
Aashish Bhandari 2023년 6월 7일
댓글: Aashish Bhandari 2023년 6월 28일
Hello. I have 1 or 0 Signal coming as a input from my Ultrasonic Sensor. I want to make a Timer in simulink so that, if my input is 1 continuous for 5 seconds ,it gives me 1 at end, if not the timer starts again ,when 1 comes from the Sensor. I have Speed of Car and my distance. I wanted to integrate the distance to get time. Thankyou so much.
  댓글 수: 2
Sathvik
Sathvik 2023년 6월 28일
You can use Timer APIs to access timers programatically. Here's a link to the documentation.
Aashish Bhandari
Aashish Bhandari 2023년 6월 28일
Thankyou so much:)

댓글을 달려면 로그인하십시오.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2023년 6월 28일
It might be easier to implement it through Simulinnk block diagram, similar to this one.
  댓글 수: 1
Aashish Bhandari
Aashish Bhandari 2023년 6월 28일
Thankyou. I also used Integrator (Discrete) with reset to 0, if the conditon doesnot match and if condition match then compare to 10 for 10 seconds.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by