GUI SERIAL COMMUNICATION INTERRUPT FUNCTION

4 ビュー (過去 30 日間)
Daniel
Daniel 2016 年 4 月 21 日
コメント済み: Jeff King 2018 年 1 月 16 日
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

採用された回答

Walter Roberson
Walter Roberson 2016 年 4 月 21 日
handles.serPIC.BytesAvailableFcn = @MyInterruptFcn;
handles.serPIC.BytesAvailableFcnCount = 1; %or as appropriate
fopen(handles.serPIC)
  6 件のコメント
Daniel
Daniel 2016 年 4 月 21 日
thanks you its working
Jeff King
Jeff King 2018 年 1 月 16 日
Thanks, this post was extremely helpful!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by