Simulink block doesn't inherit sample time but seem use one previously specified.

3 views (last 30 days)
Hello,
I'm trying to perform a code generation of a model that has to be load on the FRDM-kl25z.
I set the MultiTasking mode.
Building the code the following error occurs:
"The sample time 2.5e-05 of 'Model/Switch' at input port 1 is different from the sample time 5e-05 of 'Model/Counter' at output port 1. Consider inserting a Rate Transition block between the two ports. Alternatively, you can control the diagnostic action for unspecified rate transitions by changing the option "Multitask (or Single task) rate transition" on the Sample Time Diagnostics pane of the Configuration Parameters dialog box."
Is strange that sample time of the Switch is specified to be inherited . The sample time 2.5e-05 that seems to be "stored" in the switch was specified in the Counter previously but no more. In addition as inputs to the Switch there are two counters (one in free running, one in up counting) and one constant. As input for the Up Counter a pulse generator with a different sampling time is linked by mean of a rate transition block.
Using the Upgrade Advisor it reports this warning:
"The following files call get_param('block','CompiledSampleTime'). Examine MATLAB code which uses the block CompiledSampleTime returned by get_param. Single rate blocks return a pair of doubles. Multi-rate blocks return a cell array of pairs of doubles. If your code accepts CompiledSampleTime from multi-rate blocks, ensure the code can accept this parameter as a cell array of pairs of doubles (e.g. {[0,1.0];[0.2,0.001]}.
The following p-coded MATLAB files may call get_param('block','CompiledSampleTime'):
C:\MATLAB\SupportPackages\R2014b\armcortexm\toolbox\target\supportpackages\arm_cortex_m\blocks\masks\@InterruptBlockDialog\@InterruptMask\getDialogSchema.p The results for the current set of directories on the MATLAB path have been saved. Upgrade Advisor reports these results for all models when the MATLAB path remains the same. Click the following link to clear the saved results and recompute them the next time you run this check. Clear Saved Results"
Clicking on the "Clear Saved Results" link nothing happens (it seems that it links to nothing).
That problem happened after some tries also using the Advisors. I should have changed some settings or something else but now I don't know how to fix the problem.
Modifing the Switch and the other block's Sample time the the desired one doesn't work. In addition the problem is verified also if I create a new model. I noticed also that setting the variable-step solver or fixed-step with SingleTasking mode things work .
Could any body help me?
Thanks in advance.
P.S. I'm using the FreescaleCupCompanion so the Frdm-kl25z support package and ARM cortexM support package

Answers (0)

Community Treasure Hunt

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

Start Hunting!