Potential conflicting usages of identifier 'vol_step': a global identifier from model vol, and a global data store memory with that alias (vol_step)

19 visualizzazioni (ultimi 30 giorni)
I have a data store in my model with name as "vol_step". And my subsystem name is "vol". If I try to generate code I am getting the following error message. If I change my subsystem name as "Vol", it will generate code with out any issues. I don't have any other variable with "vol_step" name. If anyone knows the reason for the error, kindly share.
Thank you.
### Build procedure for model: 'vol' aborted due to an error. Error using tlc_c (line 178) Potential conflicting usages of identifier 'vol_step': a global identifier from model vol, and a global data store memory with that alias (vol_step) The conflict may be resolved by increasing the maximum identifier length on the Symbols pane of the Configuration Parameters dialog box. Otherwise the conflicting identifiers need to be renamed.
Error in coder.internal.ModelBuilder/make_rtw (line 599) [buildResult, codeInstrResult] = tlc_c(h,...
Error in coder.internal.ModelCodegenMgr/make_rtw (line 8) buildResult = obj.make_rtw(varargin);
Error in make_rtw (line 18) buildResult = h.make_rtw(varargin{:});
Error in build_target>RunBuildCmd (line 93)
Error in build_target (line 5)
Error in build_standalone_rtw_target (line 59)
Error in slbuild_private>loc_codegenentry (line 749)
Error in slbuild_private (line 421)
Error in sl (line 15) [varargout{1:nargout}]=feval(varargin{:});
Error in slbuild (line 61) sl('slbuild_private', mdl, varargin{:});
Error in rtwbuild (line 189) slbuild(sys, 'StandaloneRTWTarget', ...
Error in CodeGen>generate_code (line 535) rtwbuild(sys_name);
Error in CodeGen (line 225) generate_code(sys_name,sim_targ_config);
Error in run (line 63) evalin('caller', [script ';']);

Risposte (1)

Jeevan Thomas
Jeevan Thomas il 11 Set 2015
From a simple model created using the available information, it works fine and the code generation works well and good.
Just a hypothesis: From the way the error is written, it looks as if your model name is "vol". Every model will have a step function (which is the main function called as the application code) which follows the naming standard as model-name_step(). In your case, if the name of the model is "vol" the step function would become "vol_step()". You mentioned that you have a DSM by name "vol_step". Assuming the DSM "vol_step" is configured to be generated as a exported global variable ("vol_step") , there will now be two conflicting symbols with same name (one as a function and other one as a global variable). Code generator finds this conflicting and reports an error.
One way to get around this is to give a different alias-name in the storage class definition of DSM (vol_step). Second way is to rename the model and get a different model step function.
I prefer the first.

Categorie

Scopri di più su Dependency Analysis in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by