Why do I get an error when setting 'canBeInvokedConcurrently' to true?
18 views (last 30 days)
Show older comments
MathWorks Support Team
on 21 May 2018
Answered: MathWorks Support Team
on 4 Jun 2018
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
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!