1/while using Model Based Design Toolbox indicating a problem with ???
Error calling slsfnagctlr('Clear',...)
A viewer named "DAS" already exists.
Error calling slsfnagctlr('GetNags',...)
A viewer named "DAS" already exists.
One or more output arguments not assigned during call to "varargout".
2/How to put the path for the model code?
Solved! Go to Solution.
Hello,
Can you please provide more details. What version of the toolbox are you using rev1.0.0 or rev2.0.0 ?
Do you have a block or more called DAS in your model? The diagnostic view indicates a Simulink modelling error: two blocks with the same name.
Can you share your model ?
Best regards,
Daniel
Hello dumitru-daniel.popa
I have the same problem with my modified model from PMSM Workshop Module 5.
The Simulation is successful but after I want to build the model this error occurs:
Could you help ? I attached the model with KV4x.
Do you have a block or more called DAS in your model?
I already searched in the model Explorer and didn't found any match.
Best regards
Leon
Your last attachment works fine on my side. Perhaps you have an issue with the code gen license. Try to change the Matlab Workspace to a fresh new one. Perhaps something is saved in the slprj an cause this issue.
I see others had similar issues like that with Matlab.
How can I return simulink memory back to OS? - MATLAB Answers - MATLAB Central
Sometimes a simple restart helps !
Daniel is correct to recommend deleting the slprj folder, especially when you see odd code generation errors. Typically the code generator looks at what has changed and generates code based on your changes. (so it only generates code for what it needs to). Deleting the slprj folder forces the code generator to start fresh, and this can solve a whole host of odd issues.
Cheers,
-Brian
I think it was related somehow with the amount of java heap or stack used by MATLAB.
Hi Leon,
You need to eliminate all continuous time blocks from the model. The Code Gen from MATLAB works only for discrete blocks.
Here is the model i hacked by removing the RAMP block.
Attached is the project with code generated for your reference.
Hope this help!
Daniel