Model SIMULINK中代码生成符号的命名冲突

Model SIMULINK中代码生成符号的命名冲突,model,simulink,name-mangling,Model,Simulink,Name Mangling,我的问题是针对SIMULINK、模型和代码生成顾问以及嵌入式编码器的 我在一个更大的模型(即集成系统)中使用了参考模型,并且我的参考模型具有相似或同名的信号。当我使用模型和代码生成顾问检查模型的健全性时,在“为严格的单精度操作识别有问题的设置”下出现了以下错误 我甚至尝试删除任何信号名称,并使用非虚拟数据总线对信号进行分组,以便将它们转换为C代码中的结构(生成时)。然而,它仍然抱怨同样的事情 我尝试的另一件事是操纵名称混乱。但它与MISRA C代码安全要求(最小损坏字符和最大标识符/var长度)

我的问题是针对SIMULINK、模型和代码生成顾问以及嵌入式编码器的

我在一个更大的模型(即集成系统)中使用了参考模型,并且我的参考模型具有相似或同名的信号。当我使用模型和代码生成顾问检查模型的健全性时,在“为严格的单精度操作识别有问题的设置”下出现了以下错误

我甚至尝试删除任何信号名称,并使用非虚拟数据总线对信号进行分组,以便将它们转换为C代码中的结构(生成时)。然而,它仍然抱怨同样的事情

我尝试的另一件事是操纵名称混乱。但它与MISRA C代码安全要求(最小损坏字符和最大标识符/var长度)相冲突

我很难理解这个问题是SIMULINK的局限性还是可以解决的。我不能简单地去改变我的信号名称,因为这是盲目地适应SIMULINK,而不是调查核心原因。另外,我认为这个模型在功能上是正确的。有人经历过这样的事情吗


作为参考,我认为使用数据总线与此无关。我只是尝试了这种方法,因为有人建议。

一旦我更改了标识符名称允许的最大字符长度,问题似乎就消失了。但我必须在所有型号中进行更改


可以从模型配置参数的“代码生成”菜单的“符号”窗格中执行此操作。

Ah!我记得我也有过一次这样的经历。顺便说一下:如果您对所有模型层次结构使用配置引用,您只需更改一次?仅供参考,该设置被称为
MaxIdLength
,因此您可以调用
set_参数(BaseConfigSet,'MaxIdLength',127)
从命令行更改它。
{code}Error occurred during model compile.

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model

Potential usage conflicts for identifier 'MdlrefDW_Other_Systems_Inputs_T'. This might occur when multiple referenced models have similar model names and similar naming rules. You can resolve this conflict by: increase the maximum identifier length parameter on the Symbols pane of the Configuration Parameter dialog, add different literal strings in identifier naming rules for each referenced model, or use dis-similar names for each referenced model{code}