Is concurrent execution not possible for a Simulink model with sample time less than 1ms ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (3)
Dimitri Lindt
il 22 Feb 2019
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 Commenti
Qing Liu
il 16 Dic 2019
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 Commenti
Vedere anche
Categorie
Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!