Why the Integrator block in Simulink Real Time can not work well when i download it to the target computer

12 views (last 30 days)
As the picture showed, i created a simple simulink model with a Signal Generator(Sine Wave; Amplitude = 1; Frequency = 20Hz ) and a Integrator block.
it works well in simulink Normal Simulation mode, the signal O1 and O2 are consistent with the correct result.However, when i download this model to the target computer using the Simulink RealTime code generation.
the signal O1 is consistent with the corect result, while the signal O2 is not right, and the signal will instantaneous increase to a very large value in an random way, for example, the signal O2 will suddenly increase to 1.0e20 from 0.002 in a random simulation time.
Due to the well work of signal O1, so i consider this strange result is related to the integrator block ,may be i didn't configurate a right model parameter, may be it happend in the processes of code generation, may be there were some problem in my target computer.I am stil trying to figure out the real reason of this strange result.
I would like to know how can i solve this, does anyone had meet similar problem as i described above, or can share me a Demo model using Integrator block and can work well in target computer .may be we can have a discussion to overcome it.
By the way My Matlab version is R2018a, Simulink Real-Time version is 6.8.
Best wishes to you, thanks a lot.

Answers (1)

Sebastian Kammer
Sebastian Kammer on 27 Feb 2019
Hi Brolian,
The issue you describe sounds like a bug that was recently fixed:
If you are in R2018a, you can install Update 3 or later and that should resolve the issue. Make sure you re-generate the kernel on your target machine (re-create boot disk) after the update is installed. If you are using network boot, that should be fairly trivial. If you're using USB or something else, make sure you actually update the Simulink Real-Time image that you are booting from.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!