Borrar filtros
Borrar filtros

GUI problem while doing serial communication

2 visualizaciones (últimos 30 días)
Nachiket Patki
Nachiket Patki el 12 de Abr. de 2016
Comentada: Walter Roberson el 9 de Mayo de 2016
I am doing serial communication between matlab and controller. I have created a GUI. The problem is whenever I am starting serial communication the GUI doesn't appears but when I terminate the program GUI appears. I want GUI to appear in real time.I am not getting the problem.

Respuestas (1)

Walter Roberson
Walter Roberson el 13 de Abr. de 2016
Create serial object BytesAvailableFcn callbacks to handle the serial data, instead of looping around checking for data.
There is a sample GUI for serial communications in the File Exchange
  5 comentarios
Nachiket Patki
Nachiket Patki el 9 de Mayo de 2016
so how to slove this calling function problem? Where should I call it?
Walter Roberson
Walter Roberson el 9 de Mayo de 2016
It would seem to make the most sense to put the display code in pushbutton1_Callback, or at least have pushbutton1_Callback call the display code.
Note: fgets() returns the line terminator as part of the string, but you are using == to do comparisons. You should use fgetl() and you should use strcmp()

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by