GUI SERIAL COMMUNICATION INTERRUPT FUNCTION

5 Ansichten (letzte 30 Tage)
Daniel
Daniel am 21 Apr. 2016
Kommentiert: Jeff King am 16 Jan. 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

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by