Simulink buffer: How do I fix the error "All sample times must be discrete. No continuous or constant sample times are allowed."
129 次查看(过去 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.
0 个评论
采纳的回答
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 个评论
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
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194973/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194974/image.png)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!