Is concurrent execution not possible for a Simulink model with sample time less than 1ms ?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a simple simulink model same as the example Mathworks Data Parallelism. When I change the sample time of this model from 1 (original value in the sample model) to 0.0001 and try to build the model, simulink throws a block diagram error,
### Build procedure for model: 'data_parallel_model' aborted due to an error.
Error: The periodic trigger Periodic of model data_parallel_model has a base rate smaller than 1 ms. The current base rate is 0.0001 seconds. Increase the base rate of the periodic trigger by increasing the rate in the model.
For easy reference, I have attached the snippet of the concurrent execution window,
The periodic Trigger has a period of 0.0001 and also the same for every Task under it.
Is this because the concurrent execution or the CPU cores have a Limitation for sample time less than 1ms or am I doing something wrong?
0 件のコメント
回答 (3 件)
Dimitri Lindt
2019 年 2 月 22 日
Hello, I have the same problem.
How can I automatically generate a code with a cycle time (periodic time/sample time) shorter than 1 ms?
Can one help?
Thanks in advance!
0 件のコメント
Qing Liu
2019 年 12 月 16 日
I answered the same question here:
An tricky method : manually modify the tlc file( <MATLAB_ROOT>/rtw/c/tlc/mw/ertwinthread.tlc )
comment out lines 773-780 (as follow) from
773 %if ((period * 1000) < 1)
774 %if LibIsDeploymentDiagram()
775 %assign errormsg = "The periodic trigger %<LibGetTriggerName(ehIdx)> of model %<::CompiledModel.Name> has a base rate smaller than 1 ms. The current base rate is %<period> seconds. Increase the base rate of the periodic trigger by increasing the rate in the model."
776 %else
777 %assign errormsg = "%<::CompiledModel.Name> has a base rate smaller than 1 ms. The current base rate is %<period> seconds. Increase the base rate of the model."
778 %endif
779 %exit %<errormsg>
780 %endif
to this
773 /%%if ((period * 1000) < 1)
774 %if LibIsDeploymentDiagram()
775 %assign errormsg = "The periodic trigger %<LibGetTriggerName(ehIdx)> of model %<::CompiledModel.Name> has a base rate smaller than 1 ms. The current base rate is %<period> seconds. Increase the base rate of the periodic trigger by increasing the rate in the model."
776 %else
777 %assign errormsg = "%<::CompiledModel.Name> has a base rate smaller than 1 ms. The current base rate is %<period> seconds. Increase the base rate of the model."
778 %endif
779 %exit %<errormsg>
780 %endif%/
and the Code Generation process will skip the check of the time step greater than 1ms.
Hopes to help you!
0 件のコメント
参考
カテゴリ
Help Center および File 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!