0
votes

I have a Simulink model which was created on MATLAB R2015a and I am trying to make it work on MATLAB R2017b.

The Simulink model is compiling on MATLAB R2017b but when I run a simulation, an error occurs at the first step of the simulation : Field is expected to be at the position 17, not 26.

The error is displayed in the MATLAB command window and in the Diagnostic Viewer but is not outlined anywhere in the Simulink model GUI.

The signal is part of a bus and is at position 17. I have searched through the Simulink model and is never at position 26 therefore I can't how this error can be returned.

Does anyone already encountered this type of error ? I have browsed Matlab help but was unable to find anything of relevance.

1
Could it be a parameter that does not match the bus definition? This is likely a run-time error and hence not much info is shown about origin. Since it is happening at the first step of simulation can you try using the Simulink debugger and stepping one block at a time?Navan

1 Answers

0
votes

Problem solved, thank you for your advice.

In fact, the bus didn't match exactly the appropriate structure. I made the bus match the good structure by using the function : Simulink.Bus.createMATLABStruct