Simulink not respecting the sampling time

조회 수: 13 (최근 30일)
Oussama Djedidi
Oussama Djedidi 2018년 6월 5일
답변: Mark McBroom 2018년 6월 8일
I have a Simulink model that have to acquire data from a device every 20 ms and then run this data through a neural network. I used a function call generator to call the acquisition every 20 ms but Simulink seem to not respect that timing.
What to do ?
  댓글 수: 2
Birdman
Birdman 2018년 6월 6일
How do you know that Simulink does not respect the sampling time? What do you observe?
Oussama Djedidi
Oussama Djedidi 2018년 6월 6일
The sampling time is around 0.5 second most of the time. It is like a simulation and a real-time execution.

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

답변 (1개)

Mark McBroom
Mark McBroom 2018년 6월 8일
Do you have Simulink connected directly to the device? Simulink is not a real-time program. It will run the simulation as fast as it can. If your model runs faster than real-time, you can slow it down to pseudo-real time by using the Simulation -> Pacing Options.

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by