本文介绍了如何处理c#-serial端口通信应用程序中的超时问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个需要在80ms内发送响应的应用程序。由于接收方应用程序是如此时间关键,它会导致超时异常,因此所有操作都失败。

我正在使用波特率为10400 bps。我使用了Serialport.ReadTimeOut和SerialPort.WriteTimeout函数来设置超时。

和超时设置分别为6s和1ms。



有没有什么可以加快串口通信速度。 Plz帮助

是否可以在C#.net中使用WIN32 API?

Hi,
I have an application that needs to be send responses within 80ms. As the receiver side application is so time critical, it causes timeout exception hence all the operations are failed.
I am working with baud rate of 10400 bps. I have used Serialport.ReadTimeOut and SerialPort.WriteTimeout functions for setting timeouts.
and the time out set were 6s and 1ms respectively.

Is there any wy to speed up the serial port communication. Plz help
Is it possible to use WIN32 API in C#.net?

推荐答案


这篇关于如何处理c#-serial端口通信应用程序中的超时问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 23:29