"Unable to read some Variables" error when converting to FMU
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am able to compile my model successfully and it is giving the expected results. However on trying to convert it to an FMU, I am getting an error "=== Export to Standalone Co-Simulation FMU (Elapsed: 0.76 sec) ===
Error:Unable to read some variables. Variable name lengths must be less than or equal to MATLAB maximum name length of 63 characters.
".
However on checking the variable names in my model, I found out that the variable with the longest name is only 40 characters which is well below the 63 character limit that Matlab enforces. I was able to successfully convert my model into an FMU several times in the past and the only change made in the model now, is an additional input port (whose name length is 11) and an additional output port (whose name length is 6). I tried undoing these changes and generating an FMU but it is throwing up the same error again.
Is there any other model setting which influences this? Has anyone faced a similar issue?
All help and suggestions are appreciated.
0 Kommentare
Antworten (1)
Himanshu
am 21 Mär. 2024
Hello Ashwin,
I understand that you have successfully compiled your model but you are encountering an error stating, "Unable to read some variables. Variable name lengths must be less than or equal to MATLAB's maximum name length of 63 characters," when attempting to convert it to an FMU.
I faced a similar issue and found a solution that worked for me in MATLAB R2022a. Typically, this problem arises when variable names exceed the maximum length of 63 characters, as discussed in a MATLAB Answers post here:
The real challenge was pinpointing and locating where the error was occurring. Reinstalling MATLAB R2022a fixed this error.
I hope this helps.
2 Kommentare
Himanshu
am 21 Mär. 2024
Hello Ashwin,
Glad to know that your issue was resolved. Thank you for sharing the details of the issue.
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!