1 / 11

RWM600 (13.56MHz)

Reader. Antenna. RWM600 (13.56MHz). PCR300 硬體設備架設. RS232. VB + MSCOMM. USB. Step1 :安裝 RWM600X.OCX 元件. VB 讀取 RWM600 資料. Command1 & command2. RWM600x. label1. listbox. Step2 :設計介面. VB 讀取 RWM600 資料. VB 讀取 RWM600 資料. Step3 : 撰寫抓取資料程式 Form_Load :清空 listbox Command1_Click :啟動連線

fordon
Download Presentation

RWM600 (13.56MHz)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reader Antenna RWM600 (13.56MHz)

  2. PCR300硬體設備架設 RS232 VB + MSCOMM USB

  3. Step1:安裝RWM600X.OCX元件 VB讀取RWM600資料

  4. Command1 & command2 RWM600x label1 listbox Step2:設計介面 VB讀取RWM600資料

  5. VB讀取RWM600資料 • Step3:撰寫抓取資料程式 • Form_Load:清空listbox • Command1_Click:啟動連線 • Command2_Click:關閉連線 • RWM600x_OnTagEvent:擷取資料 • MODULE1:模組程式

  6. 變數與API函數宣告 Const LB_FINDSTRING = &H18F Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long • Private Sub Form_Load() • List1.Clear • End Sub

  7. Private Sub Command1_Click() Dim port As String, I As Integer Dim ver As String For I = 0 To 255 port = RWM600x.EnumCommPort(I) If port <> "" Then RWM600x.CommPort = Val(Mid(port, 4)) RWM600x.PortOpen = True If RWM600x.PortOpen Then ver = RWM600x.gnetVersion If InStr(ver, "PGM-T0562") > 0 Then Me.Caption = "ISO15693 Demo " & demoVer & " (" & port & ":" & ver & ")" RWM600x.EnableAutoMode = True Exit Sub End If RWM600x.PortOpen = False End If Else Exit For End If Next I Command2.Enabled = 1 Command1.Enabled = 0 End Sub

  8. Private Sub Command2_Click() MsgBox "連線關閉" RWM600x.PortOpen = False Command1.Enabled = 1 Command2.Enabled = 0 Me.Caption = "RWM600SK系統" End Sub

  9. Private Sub RWM600x_OnTagEvent(ByVal nEvent As Integer, ByVal nDSFID As Integer) Dim bUID(7) As Byte ' Byte Array for UID, Size 8 Bytes (0~7) Dim szUID As String Dim I As Long Select Case nEvent Case TAG_PRESENT With RWM600x .GetCurrentUID VarPtr(bUID(0)) szUID = BytesToHexRev(bUID) 'szUID卡號 List1.AddItem szUID Label1.Caption = "卡片數:" + Str(List1.ListCount) End With Case TAG_REMOVED With RWM600x .GetCurrentUID VarPtr(bUID(0)) End With szUID = BytesToHexRev(bUID) List1.RemoveItem (SendMessage(List1.hwnd, LB_FINDSTRING, -1, ByVal CStr(szUID))) Label1.Caption = "卡片數:" + Str(List1.ListCount) End Select End Sub 抓到的是16進制資料,需要轉換成10進制

  10. Public total_card As Integer Public Function BytesToHexRev(ByRef bData() As Byte) As String Dim I As Long, szData As String On Error GoTo Err_Proc For I = LBound(bData) To UBound(bData) szData = Right$(Hex$(&H100 + bData(I)), 2) & szData Next I Err_Exit: BytesToHexRev = szData Exit Function Err_Proc: Debug.Print "ByteToHex - " & Err.Description & "(" & Err.Number & ")" szData = vbNullString Resume Err_Exit End Function

  11. 讀取方向:天線(Antenna)前後左右上下(ㄧ次一片)讀取方向:天線(Antenna)前後左右上下(ㄧ次一片) • 卡片完全重疊讀取(兩張) • 卡片重疊但離開一段距離讀取(兩張) • 卡片錯開讀取(兩張) • 卡片與讀卡機垂直讀取(ㄧ張) • 直接丟卡片上去(三張) • 一張張放上去(三張) • 將卡片放在書裡面一本本放上去(三張) • 讀到三張卡片後,一張張拿走 • 隔著壓克力讀取,看讀取距離的變化 • 隔著水讀取,看讀取距離的變化 • 隔著鐵讀取,看讀取距離的變化 • 貼在人身上讀取,看讀取距離的變化 • 隔著PVC讀取,看讀取距離的變化 • 隔著木頭讀取,看讀取距離的變化 • 旁邊使用大哥大,看是否影響讀取 RWM600測試項目

More Related