I have an algorithm developed in Simulink (Matlab 2013b) that I use to produce Embedded Code. Since I am using an IIR filter atomic blockset several times I decide to make this function reusable. I tried to implement 2 istances of the same fileter but I keep getting this error:
"The subsystems 'PM_drive/1ms_ISR/IdqefCalc/FilterSpeedRef2' and 'PM_drive/1ms_ISR/IdqefCalc/FilterSpeedRef1' have the same function name 'IIR_Filt'. This is not legal unless the systems are identical copies of each other. Please ensure that these subsystems will have different function names by either modifying the function name of one of them or modifying the 'Maximum identifier length' parameter on the Code Generation > Symbols pane of the Configuration Parameters dialog"
As sugegsted the 2 functions are identical (obtained but copy and paste). I don't understand why the error tells to ensure that the functions have different names when the purpose of reusable functions is to call the same function passing different parameters.
Best Answer