Why do I get an error when setting 'canBeInvo​kedConcurr​ently' to true?

18 views (last 30 days)
I received the following error when generating code for AUTOSAR and set the 'cenBeInvokedConcurrently' to be true.
Simulink Function block 'myBlock' may not be invoked concurrently because one of the outputs of block 'myBlock/mySubBlock' is global data. This diagnostic is reported because 'canBeInvokedConcurrently' option is selected on the AUTOSAR runnable mapped to this Simulink Function. You may investigate further by deselecting that option, and examining the generated code.
Component:Simulink | Category:Block diagram error

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 May 2018
The outputs are global variables because of the "Data Type Conversion" block within the "myBlock/mySubBlock" block. The "Data Type Conversion" block generates a global, and thus, the function cannot be reentrant (which is required for concurrent access).
If you want to allow for concurrency, remove the "Data Type Conversion" block and specify the output type directly within the "Out1" block:
1) Double click the "Out1" block. A dialog will appear.
2) Within the dialog, go to the Signal Attributes tab.
3) You can specify the data type in there.

More Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!