Hi!
I think we are close to the solution! In what follows I performed all the simulations by using the fixed-step solver Ode3(Bogacki-Shampine) to all the models. Moreover, let me say that the model 'SingleWheelTEST/LocalCtrlFL' is composed by 4 input ports, 1 output port, 2 gains, one switch, one product block and one scope(so the model is very simple, I would even upload an image but I do not know if it is possible here in the forum).
Anyway, I tried to put a sample time "0" to a randomly chosen block in the 'SingleWheelTEST/LocalCtrlFL' model (for instance, I set sample time "0" to an Inport). I tried to run the simulation and I got this error
"Root Inport 'LocalController/Is Braking' has a sample time of [0 0] which does not match the sample time [0.4 0] of its destination: input port 1 of block 'LocalController/Scope'. Root inports must have the same sample time as their destinations for model reference. Please correct this situation by changing one of the two sample times or inserting a Rate Transition block. This error message is related to a hidden Inport block."
So I argued that the problem is in the Scope block. In addition, I don't want to add additional blocks in the model (otherwise is not the same model as in the case with variable-step solver, where everything works fine without additional blocks.) Then, with the same setting as above (i.e. sample time "0" to an Inport), I removed the Scope block and this time everything worked out perfectly, but with these warnings:
"Warning: Unable to determine a fixed step size based on the sample times in the model 'SingleWheelTEST', because the model does not have any discrete sample times. Picking a fixed step size of (0.4) based on simulation start and stop times. You can disable this diagnostic by explicitly specifying a fixed step size in the Solver pane of the Configuration Parameters dialog box, or setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Solver group on the Diagnostics pane of the Configuration Parameters dialog box.
Warning: The model 'SingleWheelTEST' has continuous states and is referencing (via the Model block 'SingleWheelTEST/LocalCtrlFL') the fixed-step model 'LocalController' which has blocks with continuous sample time. The solver 'ode3' used to simulate model 'SingleWheelTEST', will execute the referenced model 'LocalController' in minor time steps, where as during standalone simulation the model 'LocalController' uses a discrete solver which does not have minor time steps. This can cause results from the Model block and results obtained from standalone simulation of the referenced model to be different. You can disable this diagnostic by setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog."
Honestly, I was surprised that the problem could be the Scope block. Could you please explain me what happened with that block? And could you also tell me more about the warnings I get?
Finally, just for the sake of completeness, I also tried to run a simulation by setting sample time "-1" to all the blocks in 'SingleWheelTEST/LocalCtrlFL'and by deleting the Scope block. The result is that the sample time of this referenced model became again Discrete1 0.4.
I wonder what trick the variable-step solvers use to adapt all the sample times of all the blocks...