如何从机器获取数据? [英] How to get data from a machine?

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

问题描述

大家好,

我想知道如何从机器上获取数据吗?

挤奶机...在奶牛场里.

您可以在以下网站上看到牛奶计:

http://www.algantarim.com/index.php/ueruenlerimiz/suet-sam-odalar [^ ]

我想在牛奶计上获取数据,然后发送到软件.
有谁知道吗?

问候

Haluk

Hello guys,

I would like to know how to get data from a machine?

Milking machines...in the farm for cows.

You can see the milk meter in this website:

http://www.algantarim.com/index.php/ueruenlerimiz/suet-sam-odalar[^]

I would like to get the data on the milk meter and then sending to the software.
Is there anyone who knows that?

Regards

Haluk

推荐答案

如果haluk_78不懂组装并且具有电子背景,他将很难实现该软件

网站上的仪表仍然使用旧的16f芯片,我敢肯定编程是在汇编中完成的.
编写软件以读取数据很容易,但是(总是存在,但是)牛奶读取器和计算机之间必须有硬件接口

如果有硬件接口,则必须使用超级终端(900,N,1通讯端口设置)来检查阅读器的响应,然后他可以从那里编写任何高级语言的接口

examples命令:-"e"
语法:-"11e"
其中"11" =内存芯片上分配的任何地址


这实际上是一门技术性很强的主题,我已经尽力将其简单化了

许多年前,在我之前的公司中,我们设计了时间和出勤阅读器,除了出勤计划软件外,其他所有东西都是在组装中完成的.

这是Vb中的CRC检查示例

IF haluk_78 doesnt know assembly and have an electronics background he will really struggle to implement the software

The meters on the website still use the old 16f microchips and I am certain the programming is done in assembly
Writing the the software to read the data is easy but (there is always a but) there must be a hardware interface between the milk readers and the pc

If there is a hardware interface he must use Hyper Terminal(900,N,1 comms port settings) to check the responses from the readers and from there he can write an interface in any high level language

examples Command:- "e"
Syntax:- "11e"
where "11" = whatever adress is allocated on the memory chip


This is actually a very technichal subject and Ive tried to put it as simple as I can

Many years ago at my previous company we designed time and attendance readers and everything except the software for the attendance program was done in assembly

Here is an CRC Checking example in Vb

Function Odd_Parity(ByVal Dat As Long) As Long
Dim n As Long
Dim i As Long
n = 0
For i = 0 To 7
n = n + Dat And 1
Dat = (Dat And 65534) / 2
Next i
Odd_Parity = n And 1
End Function
' For CRC
Function DoCRC16(ByVal Dat As Long) As Long
Dat = (Dat Xor (CRC16 And 255)) And 255 '/ 255
CRC16 = (CRC16 And 65280) / 256
If (Odd_Parity(Dat)) = 1 Then CRC16 = CRC16 Xor 49153
Dat = (Dat * 64) And 65535
CRC16 = CRC16 Xor Dat
Dat = (Dat * 2) And 65535
CRC16 = CRC16 Xor Dat
CRC_Test = CRC16
End Function
' for CRC
Sub CRC()
Dim crc_lsb As Long
Dim crc_msb As Long
Dim X As Long
Dim i As Integer
crc_lsb = Asc(Mid


(InString, 32 1 )) crc_msb = Asc(Mid
(InString, 32, 1)) crc_msb = Asc(Mid


(InString, 34 1 )) CRC_Long =(crc_lsb * 256 )+ crc_msb CRC16 = 0 对于 i = 1 30 X = Asc(Mid
(InString, 34, 1)) CRC_Long = (crc_lsb * 256) + crc_msb CRC16 = 0 For i = 1 To 30 X = Asc(Mid


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

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