C code generator problem with Virtual port

1 次查看(过去 30 天)
Hi!
I'm developing a Simulink block to generate C code. I had my module in Matlab version 2017, but when I've updated the model to 2022a version, this error has been generated:
In model 'MyModel', for Outport block 'MyModel/RESP_OUT', block parameter 'Ensure outport is virtual' is selected and arguments are configured for the Step Function. Change the block parameter or step function specification.
I need this port to be Virtual (to avoid memory copy at the output), but I don't understand why with the Matlab model version updating (to R2022) generates this error. I've searched this error on internet, but nothing appears related to it (any example about how modify step function specification?)
Thanks in advance!
Juan

采纳的回答

Hassaan
Hassaan 2024-1-30
Check Compatibility and Updates:
  • Ensure that your model is fully compatible with the newer version of MATLAB/Simulink. MathWorks provides tools and guidance for upgrading projects to newer releases.
Review Release Notes:
  • Check the release notes for MATLAB and Simulink between 2017 and 2022a versions for any changes in code generation, S-functions, or virtual blocks that might affect your model.
Block Configuration:
  • Examine the configuration of the Outport block 'RESP_OUT' and ensure that it meets the requirements for being virtual in R2022a. This might involve looking into the Step Function configuration and making sure it's consistent with the new version's requirements.
Step Function Specification:
  • The error message suggests there might be an issue with the Step Function configuration. Check the documentation for how to configure Step Functions in the newer version. It's possible that there have been changes to the API or the way Step Functions need to be specified.
Contact MathWorks Support:
  • If you cannot find the solution through documentation or release notes, consider contacting MathWorks technical support. Since the error message doesn't seem to be documented widely, their support team may be able to provide specific insights.
Simulink Project Upgrade Advisor:
  • Use the Simulink Project Upgrade Advisor to help identify compatibility issues and recommended actions when upgrading your project to a newer version.
Manual Tweaking:
  • As a last resort, try manually tweaking the settings on the Outport block and related blocks or the Step Function to see if there are configurations that resolve the error.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  2 个评论
Hassaan
Hassaan 2024-2-12
@Juan Martin de las mulas You are welcome.
-----------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
It's important to note that the advice and code are based on limited information and meant for educational purposes. Users should verify and adapt the code to their specific needs, ensuring compatibility and adherence to ethical standards.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by