Simulink throws error when using multi-rate blocks for concurrent execution

조회 수: 19 (최근 30일)
I am trying to increase the performance of my model by using the multi-threading capabilities.
My model has a Signal Generation block which generates different types of signals like QPSK, Sine, FM for testing purpose. And this block is converted to a referenced model. When trying to execute the model with "Allow tasks to execute concurrently on target" = ON, Simulink throws the below error,
The block 'Cluster1_SigSources/Subsystem/Enabled Subsystem/SIG0001/Upsample' of type 'S-Function' is a multi-rate block. Currently Simulink supports only single-rate blocks of this type when the model is configured for concurrent execution.
I have attached the reference model. How do I overcome this issue? Any suggestions would help?
Matlab Version: 2017b

채택된 답변

Mark McBroom
Mark McBroom 2018년 5월 12일
The signal feeding the Upsample block is running at a slower rate that the output of the Upsample block. When you set "Allow tasks to execute concurrently on target" = ON, Simulink attempts to put the code to compute input to Upsample block on another core which means it would run asynchronously to the code processing the output of the Upsample block. THis would require additional semaphore/buffering logic to ensure correct processing on the 2 cores. You will have to rework your algorithm to remove the Upsample block
  댓글 수: 2
Niels Suzler
Niels Suzler 2019년 4월 9일
Is reworking ones algorithm really the only way to do it? I understand that rate transitions between blocks that operate on different threads is not possible, but what about if I want to do buffering with a rate transitions on the same thread? Could I configure my model in a way to make that work?

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

추가 답변 (1개)

Mark McBroom
Mark McBroom 2018년 5월 4일
Model will not update. What values are you using for the various parameters in the model?
  댓글 수: 4
johnnynoc4sh
johnnynoc4sh 2021년 4월 4일
편집: johnnynoc4sh 2021년 4월 5일
I have the same issue as the thread author. In my case the checkbox is disabled (see figure attached). Can you help me out? What is the reason for this behaviour?
Mark McBroom
Mark McBroom 2021년 4월 6일
You are using Simulink Real-Time. This option is always on for Simulink Real-Time. What version of MATLAB are you using? Which block is causing the issue?

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

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by