Error occurred when evaluating apply callback [Instrument Control Toolbox]

I'm trying to send data on my serial port through Simulink with the toolbox in description, but when i configure the Serial Configuration Block, it give me this error. I don't think the problem can be the port, because i have atteched an Arduino Uno.

6 comentarios

The port might be in use.
What version of MATLAB are you using? Have you contacted support with your question?
I have the same problema. Do you got any real solution for this?
I have the same problem, i was using virtual ports to simulate what I wanted to do and it worked well... but when I conected the real serial port it just doesn't work
I also have the same problem trying to connect to a virtual port for Ti MSP430 launchpad.
Worked for me! thanks a lot!

Iniciar sesión para comentar.

Respuestas (5)

Juan Martinez
Juan Martinez el 18 de Oct. de 2016
Editada: Juan Martinez el 18 de Oct. de 2016
For anyone reading this I used to have this same problem; however, I think I found the solution. Simply connect your hardware (Arduino) to the computer before opening Matlab. Then (with the hardware connected) open Matlab, then open your Simulink model and configure the Serial Configuration Block, it should work just fine now. After doing so, you can save your Simulink model and the serial configuration will be saved as well.

8 comentarios

si funciona gracias (y)
Yang Zhang
Yang Zhang el 7 de Dic. de 2017
Editada: Yang Zhang el 7 de Dic. de 2017
great job,thanks a lot!
Its fantastic, i've tried a lot without results, thank you !
it works, gracias
Excelent, thank you.

Iniciar sesión para comentar.

I had this problem, then ran Matlab in Administrator Mode, which fixed the issue.
Have you tried using the Arduino Serial Transmit instead of the Instrument Control Toolbox one? I think that will resolve this issue.
Fox Hsu
Fox Hsu el 26 de En. de 2016
i have the same problem. In my case, it turns out it's the conflict between 2 serial ports ( i'm trying to open 2 serial port in the same simulink model) cause this error message.
XIAOMING
XIAOMING el 18 de Abr. de 2017
could u speak Chinese?

Categorías

Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Dic. de 2015

Comentada:

el 9 de Ag. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by