如何在C#中获得体重秤指标 [英] How to get weight scale indicator in C#

查看:99
本文介绍了如何在C#中获得体重秤指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HELLO,

我正在尝试开发一个小软件来保存sql数据库中的重量记录。我正在使用c#环境。我是c#的新手,但尽可能多地编码。我编码从指标读取。但是有一些问题,

1.我无法获得数字?标记而不是实际阅读。

2.我的阅读指标为25.07。但我只有1?标记作为回报。

在超级终端我获得实际读数但在我的应用程序中我遇到了问题。







Image1

Image2

Image3

Image4



我尝试过:



我使用的是端口RS232。指示灯名称(USA Inc DELTA-7)。附加用户手册。

HELLO,
I am trying to develop a little software fro keep record of weight in sql database. i am using c# environment. i am newbie to c# but coded as much as i can. i coded to get reading from indicator. but there is some problems,,
1. i cant get digits i am getting ? mark instead of actual reading.
2. my reading is 25.07 on indicator. but i m getting only 1 ? mark in return.
in hyper terminal i m getting actual readings but in my application i am getting problem.



Image1
Image2
Image3
Image4

What I have tried:

I am using port RS232. indicator Name (USA Inc DELTA-7). user mannual is attached.

推荐答案

首先使用HyperTerminal或类似方法检查通信设置 - 当您可以使用它正确读取数据时,传输这些设置(波特率,每个字符位,奇偶校验,停止位)到您的代码中,看看您是否可以复制超级终端显示的内容。在你能做到这一点之前,你无法确定到底发生了什么!
Start by checking your communications settings using HyperTerminal or similar - when you can read the data properly using that, transfer those settings (Baud rate, bits per char, parity, stop bits) into your code and see if you can duplicate what hyperterminal shows. Until you can do that, you can't be sure what the heck is happening!


?表示您需要检索/解析状态字节以获取有关比例当前状态的其他信息(例如运动中;等)。
"?" means that you need to retrieve / parse the "status byte" to get additional information about the current status of the scale (e.g. "in motion"; etc).


此讨论应该关闭。我解决了我离开c#项目的问题。在vb.net中,我得到了我想要的阅读。感谢所有和我在一起的朋友...
this discussion should be closed. i solved my issue leaving c# project. in vb.net i got the reading as i want. thanx to all friends being with me...


这篇关于如何在C#中获得体重秤指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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