matlab - How to set up a level 2 s function with no direct feedthrough? -
i have simulink model being compiled executable through embedded coder (rtw) , have sfunction know has no connection between input , output turn off direct feedthrough on input port. in fact make 2 sfunctions replace it, 1 input, 1 output, complication external system addressing two-way communication in single function call.
we use legacy code tool compile of our sfunctions, have read , verified forces inputs direct feedthrough whether or not (with no explanation of why.) have had sfunction builder block, makes no reference direct feedthrough on inputs. have looked @ msfuntmpl_basic.m template builder script seems limited inputs , outputs primitive data types (via datatypeid.)
your question asks integrating c code s-function, you're looking @ msfuntmpl_basic.m m-code template. should looking @ c template: sfuntmpl_basic.c.
within it, @ line 75, uses macro sssetinputportdirectfeedthrough
set feedthrough characteristics of each port, way it.
since legacy code tool explicitly doesn't generate code uses macro, going have either write own s-function does, or edit auto generated code does.
Comments
Post a Comment