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

19 views (last 30 days)
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 Comments

Sign in to comment.

Accepted Answer

Daniel
Daniel on 17 Jun 2023
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 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Code Generation in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!