Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Serial port SerialPort->Write被随机卡住?_Serial Port_C++ Cli - Fatal编程技术网

Serial port SerialPort->Write被随机卡住?

Serial port SerialPort->Write被随机卡住?,serial-port,c++-cli,Serial Port,C++ Cli,我必须通过串行通信与设备通信。 在使用C++/CLI时,我使用函数SerialPort.Write 一切正常,然后随机程序被卡住。唯一的方法是取出USB电缆。 我已将超时设置为500毫秒。超时由设备驱动程序实现。最糟糕的设备驱动程序当然可以在模拟串行端口的USB驱动程序中找到。扔掉它,再买一个。花费超过10美元。当端口打开时,永远不要断开电缆,始终使用安全的移除硬件。但我不能再购买另一个。。。硬件的另一端有一个不同类型的公接头。。。。在这种情况下,如果我们使用串行到usb转换器,然后将其连接到这

我必须通过串行通信与设备通信。 在使用C++/CLI时,我使用函数SerialPort.Write 一切正常,然后随机程序被卡住。唯一的方法是取出USB电缆。
我已将超时设置为500毫秒。

超时由设备驱动程序实现。最糟糕的设备驱动程序当然可以在模拟串行端口的USB驱动程序中找到。扔掉它,再买一个。花费超过10美元。当端口打开时,永远不要断开电缆,始终使用安全的移除硬件。但我不能再购买另一个。。。硬件的另一端有一个不同类型的公接头。。。。在这种情况下,如果我们使用串行到usb转换器,然后将其连接到这根电缆上,会有帮助吗