如何通过comm端口更新门禁控制器? [英] How to update door access controller through comm port ?

查看:141
本文介绍了如何通过comm端口更新门禁控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有门禁设备,
我使用生产软件来更新卡的可访问设置.

我使用MS.Access打开s/w数据库,发现成员表和其中一个列控制卡并阻止卡.

"000" =不允许进入门
"001" =允许进入门

我使用我的vb项目更新了数据库数据,但是门禁设备上没有任何响应.我必须去制造厂并叫出卡,然后再次更新卡.然后只有软件才能更新控件.

是否通过vb项目发送命令并更新控制器数据?
我只想将"000"数据发送给控件成员.

I have a door access control device,
I use the manufacturing s/w to update the card accessible setting.

I open the s/w database with MS.Access, I found the member table and one of the column control the card and block the card.

"000" = Not allowed to Access door
"001" = Allowed to Access the door

I use my vb project update the database data, but there is no response on the door access device. I have to go to the manufacturing s/w and call out the card and update the card again. Then only the s/w will update the control.

Anyway to send command and update the controller data through vb project ?
I only want to send the "000" data to control member.

推荐答案

您需要使用类System.IO.Ports.SerialPort.您需要阅读设备制造商的通信参数文档,例如波特率,奇偶校验,数字数据位和停止位.可以在实例属性的构造函数中设置这些参数.您可能还需要设置高级通信参数,例如握手,启用RTS,启用DTR等,可通过实例属性进行访问.

可以使用BaseStream发送数据;您还可以检查BytesToRead/BytesToWrite-接收/发送缓冲区中的字节数.数据本身(例如"000")由某些应用程序级别的协议描述,您应该可以在设备文档中找到这些协议.

有关更多信息,请参见 http://msdn.microsoft.com/zh-我们/library/system.io.ports.serialport.aspx [ ^ ](同一页面上有一些代码示例).

—SA
You need to use the class System.IO.Ports.SerialPort. You need to read device manufacturers documentation of communication parameters, such as baud rate, parity, number data bits and stop bits. These parameters can be set in constructor of instance properties. You may also need to set up advanced communication parameters such as handshake, RTS enabled, DTR enabled, etc., accessible through instance properties.

The data can be sent using BaseStream; you can also check BytesToRead/BytesToWrite — number of bytes in receive/send buffer. The data itself (like "000") is described by some application-level protocol which you should be able to find in device documentation.

For further information, please see http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^] (with some code sample on the same page).

—SA


这篇关于如何通过comm端口更新门禁控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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