MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB GUI] serialport函数中writrline函数部分不能连续写入问题 (https://www.labfans.com/bbs/showthread.php?t=27450)

Liu_1 2024-12-16 19:57

serialport函数中writrline函数部分不能连续写入问题
 
代码片段如下
writeline(s,"speakon"); /开启设备
writeline(s,"stop");/关闭设备
此时串口设备可以正常读取开启设备指令,但无法读取关闭设备指令
writeline(s,"speakon"); /开启设备
pause(1);
writeline(s,"stop");/关闭设备
只有加入pause时关闭设备指令才能被读取
我想请问该如何解释并去除pause使得writeline函数能够正常使用,谢谢!
下位机的串口芯片用的是CH340,主控为STM32


所有时间均为北京时间。现在的时间是 06:30

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.