Cannot connect to model 'time_simulink'; please try Update Diagram (Ctrl-D). Caused by: Error in 'time_simu​link/Upsam​ple': All sample times for this block must be discrete. C

24 次查看(过去 30 天)
Cannot connect to model 'time_simulink'; please try Update Diagram (Ctrl-D).
Caused by:
  • Error in 'time_simulink/Upsample': All sample times for this block must be discrete. Continuous sample time is not allowed.
  3 个评论

请先登录,再进行评论。

采纳的回答

Daniel
Daniel 2023-6-17
You're trying to upsample a continuous input. The input has to have a discrete sample time before it can be upsampled. The sample time is the period (in simulated time) between updates to the signal. E.g. a sample time of 0.2 would mean that the signal value changes at time 0, 0.2, 0.4, etc.
If the input to your upsample block is an inport, you can set a sample time under the Execution tab.
If the input to your upsample block is a constant, you can set a sample time under the Main tab.
If the input to your upsample block comes from other signals within the system, you can use a Zero-Order Hold (from the Simulink/Discrete library, among other places) to make the output have a discrete sample time.
If you post your full model or more context, we will be able to provide a more targeted suggestion. For instance, what kind of signal is going into the Upsample block? Where does it come from? What are you intending to accomplish? Is the system intended for code generation?
  20 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 HDL Code Generation 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by