Search code examples
matlabloadsimulinkmodeling

MATLAB Simulink: Error evaluating 'InitFcn' callback of block_diagram 'BLDC_control_buck_converter'


I was modeling a vehicle with BLDC motor. After simulation when i run the model i received a Error Message .So i've no idea about bldcData data. i search it many ways but didn't find any solutions.

Anyone, please help me to solve this.

Thank you.


Solution

  • It looks like you have an initialization function "load bldcData" that should load variables from the .mat file "bldcData" to your workspace. You need to have this file on your matlab search path. Or, if you don't need these variables, delete the "load bldcData" string from callbacks, for example by going Modelling-Model Explorer-select the model from model hierarchy - select the callbacks tab from model properties - select InitFcn from model callbacks - delete the "load bldcData" that you should find there. Hope I understood your question. If this is not helpful, please give some more details, for example what happens when you press the highlighted 'InitFcn' in your error message.