Simulink + Arduino Uno: Problem logging two signals

2 views (last 30 days)
I am controlling a cascade system using Simulink, two PI-regulators, two analog inputs and one PWM output. However, I am having trouble logging the signals that I am reading. When I delete the part inside the red, dotted line, the display-block works fine and shows the correct value. However, when I add the second PID-controller (which is just a copy of the ne outside the red, dotted box), the display box only shows the value 'zero' when running, and the value disappears when the "simulation" is done.
Some additional information: I am using the continuous integration block inside the PID-regulator. Not sure if this is relevant, and except for the logging problem is seems to work fine.
  2 Comments
Alain Kuchta
Alain Kuchta on 11 May 2017
You seem to be referring to a model or image in your description of the problem, but there is no model or image attached to your question. Please upload the model or image so we can better understand your question.
Trinidad Gonzalez graniel
Trinidad Gonzalez graniel on 12 Jun 2020
ufff apenas veo este mensaje, pero creo quetu problema era los baud; a mi me pasaba lo mismo e implemente esto:
codertarget.arduinobase.registry.setBaudRate('F2F3_000',921600). Lo que está entre comillas es el nombre de mi proyecto en simulink y lo que he marco en letras negritas son los baud. No hace falta que cambies los baud del puerto com de tu computador.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!