如何从串口读取和写入数据? [英] how to read and write data from serial port?

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

问题描述

我是VB的新手,但已创建了许多小型应用程序...



现在我正在尝试创建一个应用程序读取称重桥的数据并将在文本框中显示..我对串口编程知之甚少,我已经对网络进行了大量的研究,但仍然没有得到我想要的......



称重桥通过COM1连接到我的电脑。并且每当车辆加载时,数据应该在文本框中显示车辆的确切重量...我正在尝试下面的代码,这些代码是从多个线程中复制和混合的......但是没有数据显示在文本框中但是我可以看到读数指示器机器......



请帮帮我...

I am new to VB., but have created lots of small level apps...

Now I am trying to create a app reading data of weighing bridge and will show it in textbox.. I have no enough knowledge of serial port programming , I have done lots of research on net but still not getting what i want...

weighing bridge is connected to my pc through COM1. and whenever vehicle loads , data should show exact weight of vehicle in the textbox... I am trying below code which is copied and mixed from several threads.. but there is no data showing in textbox but i can see reading in indicator of weighing machine...

Please help me...

推荐答案

请注意:

  • 您的帖子中没有以下代码。
  • 有大量关于 VB.NET available。
  • 你必须知道wighting bridge自己的协议才能处理收到的信息。
  • (在我看来)从网上复制代码而没有正确理解什么你所做的并不是最好的方法。
Please note:
  • There is no 'below code' in your post.
  • There are tons of tutorials on serial port programming for VB.NET available.
  • You have to know the wighting bridge own protocol in order to process received info.
  • (In my opinion) Copying code from the web without properly understanding what you are doing is not the best of the approaches.


这篇关于如何从串口读取和写入数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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