GUI SERIAL COMMUNICATION INTERRUPT FUNCTION

4 visualizaciones (últimos 30 días)
Daniel
Daniel el 21 de Abr. de 2016
Comentada: Jeff King el 16 de En. de 2018
I want to run a serial communication with a device.
i want all incoming messages to be displayed automatically. don't want to press a special button for that.
i tried using the
handles.serPIC.BytesAvailableFcnCount = @MyInterruptFcn
...
...
...
function MyInterruptFcn(hObject, eventdata)
{code for the interrupt function}
end
but this has no result

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Abr. de 2016
handles.serPIC.BytesAvailableFcn = @MyInterruptFcn;
handles.serPIC.BytesAvailableFcnCount = 1; %or as appropriate
fopen(handles.serPIC)
  6 comentarios
Daniel
Daniel el 21 de Abr. de 2016
thanks you its working
Jeff King
Jeff King el 16 de En. de 2018
Thanks, this post was extremely helpful!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by