Why do I get an error 'The file name is too long' when creating harness model in Simulink Design Verifier 2.5 (R2013b)?
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 12 Feb. 2014
Kommentiert: andrewop pit
am 1 Nov. 2014
I am generating the harness model for a model named 'KnxSimInt_SPM_CL_InvConv.slx' and using sldvblockreplacement.m to replace blocks. During building, I receive an error:
Making simulation target "KnxSimInt_SPM_CL_InvConv_replacement_sfun", ...
Make successful for machine: "KnxSimInt_SPM_CL_InvConv_replacement"
The file name is too long.
0 file(s) copied
It seems that Simulink adds a postfix '_replacement' on my original model name. How can I avoid this error.
Akzeptierte Antwort
MathWorks Support Team
am 12 Feb. 2014
The maximum length allowed for MATLAB identifiers, which include variable, function and model names, is 63 in R2013b. You can call NAMELENGTHMAX to get the maximum identifier length.
During block replacement, in order to avoid name length error, following workarounds are available:
1. Reduce original model name length less than 63.
2. Rename postfix of output model. Click Simulation -> Model Configuration Parameter -> Design Verifier -> Block Replacements -> File path of the output. The default name is '$ModelName$_replacement'. You can modify it like '$ModelName $_rpc'.
3. If you are using sldvblockreplacement.m scripts, execute:
opts = sldvoptions;
opts.BlockReplacement = 'on'
opts.BlockReplacementModelFileName = '$ModelName$_rpc'
[status, newmodel] = sldvblockreplacement('KnxSimInt_SPM_CL_InvConv', opts);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Best Practices for Simulink Design Verifier Analysis 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!