如何阅读&从COM端口写入值。 [英] How to read & write Value From COM Port.

查看:78
本文介绍了如何阅读&从COM端口写入值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ObjCOm.readLine()和ObjCOm.WriteLine()。当编译器编译代码时,它不会给出任何错误。在运行时程序进入死锁状态。

解决方案

我不确定你是怎么做的。找到几个与COM端口相关的示例。希望它可以帮到你。



http://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v = vs.110).aspx [ ^ ]



http://codereview.stackexchange.com/questions/29807/better-approach-to-using-the-c-serialport-class [ ^ ]



http://stackoverflow.com/questions/17964864/how-to-read-data-from-serial-port-and-write-to-serial-port [ ^

I am use ObjCOm.readLine() & ObjCOm.WriteLine().when Compiler compile the code so it not give any error. at run time program going to deadlock condition.

解决方案

I am not sure how you are trying to do it. Found few samples related to COM port. Hope it helps you.

http://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx[^]

http://codereview.stackexchange.com/questions/29807/better-approach-to-using-the-c-serialport-class[^]

http://stackoverflow.com/questions/17964864/how-to-read-data-from-serial-port-and-write-to-serial-port[^]


这篇关于如何阅读&从COM端口写入值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆