使用RS232发送和读取十六进制代码VB.NET 2008 [英] Using RS232 to send and read Hex codes VB.NET 2008

查看:230
本文介绍了使用RS232发送和读取十六进制代码VB.NET 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我需要发送和读取十六进制代码到RS-232 RFID读卡器/读卡器.

因此,当我向RFID阅读器发送读取"命令时,它会给出RFID卡中内容的结果.

我还需要每秒轮询一次,以查看读取器中是否有卡.如果有卡,我需要发送读取命令,以便可以读取卡中的数据.

谁能给我最好的解决方案,如何通过RS232端口发送和读取十六进制数据

我需要发送/接收的代码是十六进制格式.


谢谢


Didier

Hello,


I need to Send and read Hex codes to a RS-232 RFID card writer/reader.

So when i have send a ''Read'' command the RFID reader, it gives the result of what is in the RFID card.

I also need to ''poll'' every second to see if there is a card in the reader. If there is a card i need to send a read command so i can read out the data in the card.

Can anyone give me the best solution how to send and read Hex data thru RS232 ports

The code''s i need to send/receive are Hex format.


Thanks


Didier

推荐答案

没有十六进制格式"之类的东西.您读取和写入字节值.

诸如此类的RFID设备通常都具有一个可用的SDK,该SDK可以解决您所要求的低级内容.请与读写器的制造商联系以获取更多信息.

如果不是,则可以使用SerialPort类读取值并将其写入设备所连接的串行端口.

您可以找到此类 ^ ].只是不要期望找到特定于您设备的示例.
There is no such thing as "Hex format". You read and write byte values.

RFID devices like that usually have an SDK available for them that takes care of the low-level stuff you''re asking about. Contact the manufacturer of the reader/writer for more information.

If not, you''d use the SerialPort class to read and write values to the serial port the device is connected to.

You can find examples of such here[^]. Just don''t expect to find examples specific to your device.


这篇关于使用RS232发送和读取十六进制代码VB.NET 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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