필터 지우기
필터 지우기

Simulink buffer: How do I fix the error "All sample times must be discrete. No continuous or constant sample times are allowed."

조회 수: 161 (최근 30일)
I have a discrete scalar input into a simulink buffer and would like the buffer to output a 100x1 vector of the scalar inputs. However, I keep getting this error and I can't figure out why, because the input into the buffer is discrete.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2018년 11월 1일
Try feeding the Buffer block with a Constant block. Changing the sample time of the Constant block from "inf" to 0.1 (for example) will result in the disappearance of this error message. "inf" means constant sample time.
  댓글 수: 4
dr446
dr446 2018년 11월 2일
Thanks for your help. The diccrete sample time seems to be correct now. You're right - The block feeding into it was an enabled synchronous subsystem that I think was not definitely discrete, even though it had a discrete output.
Nits
Nits 2019년 7월 24일
Simulink#code generation
Error message: All sample times must be discrete. No continuous or constant sample times are allowed.
I am getting the above mentioned error while building the model in simulink. This error pertains to buffer block which is receiving bitwise data from Dspace via RS232 serial port. Please let me know how to get rid of this error. Thanks in advance.

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

추가 답변 (2개)

Ahmed Alfadhel
Ahmed Alfadhel 2018년 11월 14일
편집: Ahmed Alfadhel 2018년 11월 14일
Hello ,
This error is persistent even when I changed the smple time to 0.1 of the input port.
Guys your help plz.
  댓글 수: 1
dr446
dr446 2018년 11월 14일
Try changing the sample time of the cyclic decoder input to 0.1 instead of inherited. This is what worked for me.

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


Arif Hussain
Arif Hussain 2021년 7월 29일
I changed sample time of block from 0 to 0.001 and it works perfectly.

카테고리

Help CenterFile Exchange에서 Buffers, Switches, and Counters에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by