how to handle serial communications when using timer callbacks

조회 수: 1 (최근 30일)
Thomas
Thomas 2014년 5월 26일
답변: Thomas 2014년 8월 4일
Hello, I am using a timer function to get a callback for a GUI update. In my application there are also some functions that use serial communication. I am afraid of the case, that my program is inside such a function calling the serial commands while getting a timer callback inside it.
fprintf(...)
---> let the timer do the callback here, while the fscanf()-command gets lost and the data s well.
fscanf(...)
is there any way to get an exception for the program being in these functions?

답변 (1개)

Thomas
Thomas 2014년 8월 4일
Got it.
Inside a function, MATLAB will produce an intrinsic mutex, so this won't happen.

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by