2014-03-25 37 views
0

我想爲實時目標準備一個Simulink文件。在Simulink文件中,我有一個Model參考塊,我設置爲在Accelerator模式下運行。 Model塊也包含幾個S-functionsModel文件也被配置爲使用固定步長解算器。加速器模式下帶C S函數的模型引用

不過,我得到這個錯誤:

Caused by: 
    Error using do_rt (line 410) 
    The noninlined S-function 'whatever/Model' in a referenced model is not allowed 
    to call macros that use the generic function in the SimStruct. To find such macros, 
search for GenericFcn in simstruc.h 

SIM目標建築時。

如果我切換到Model塊的Normal模式,一切正常。

我該如何解決這個問題?

回答

2

我想我找到了我的答案。下面是S-功能+模型參考侷限性: http://www.mathworks.se/help/simulink/ug/using-s-functions-with-model-referencing.html#bsp24qn-6

A referenced model cannot use noninlined S-functions in the following cases:

  • The model uses a variable-step solver.
  • Simulink Coder™ generated the S-function.
  • The S-function supports use of fixed-point numbers as inputs, outputs, or parameters.
  • The model is referenced more than once in the model reference hierarchy. To work around this limitation, use Normal mode.
  • The S-function uses string parameters.
+0

我不知道字符串參數不被支持。 – remus