Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > คัยรู้เรื่อง rfid ช่วยดูหน่อยคับ (vb.net) คือผมลองทำตามลิ้งนี้ อ่ะคับ แล้วมันอ่านแล้วก้อเขียนไม่ได้คับ โค้ดผิดตรงไหนหรือป่าวช่วยดูทีคับ



 

คัยรู้เรื่อง rfid ช่วยดูหน่อยคับ (vb.net) คือผมลองทำตามลิ้งนี้ อ่ะคับ แล้วมันอ่านแล้วก้อเขียนไม่ได้คับ โค้ดผิดตรงไหนหรือป่าวช่วยดูทีคับ

 



Topic : 029278



โพสกระทู้ ( 10 )
บทความ ( 0 )



สถานะออฟไลน์




คือผมลองทำตามลิ้งนี้ http://www.rfidbasic.com/main.php?topic_id=31
อ่ะคับ แล้วมันอ่านแล้วก้อเขียนไม่ได้คับ โค้ดผิดตรงไหนหรือป่าวช่วยดูทีคับ

อันนี้ส่วนอ่านข้อมูลคับ

Code (VB.NET)
Imports VB = Microsoft.VisualBasic

Imports System.Data.SqlClient

Public Class frm_ReadTag

    Dim j As Short

    Dim port, baud As Integer

    Dim buf(200) As Byte

    Dim b1 As Byte

    Dim s1 As String

    Dim counttags As Short

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Me.Close()

    End Sub

    Private Sub frm_ReadTag_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim flag As Object

        Dim lb_info As Object

        Dim port, i, baud As Integer

        Dim j As Short

        Dim buf1(200) As Byte


        port = 2 'กำหนด port 

        If (port = 0) Then

            lb_info.Caption = "Please select COM Port!"

        End If

        baud = CInt(9600) ' กำหนด Rate

        If (baud = 0) Then

            lb_info.Caption = "Please select Baud rate!"

        End If

        'Open Port

        i = rf_init_com(port, baud)

        If (i <> 0) Then

            MsgBox("Open Port Fail!")

            Exit Sub

        Else

            flag = True

        End If

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        ' ตั้งเวลา อ่าน Tag 

        Dim s As Short

        Dim sdata(200) As Byte

        Dim sLen As Byte

        Dim b3, b2 As Byte

        'b3 = CByte(3)

        b2 = CByte(3)

        TextBox1.Text = ""

        If ISO15693_Read(0, 0, buf(1), b3, b2, sdata(0), sLen) <> 0 Then

            MsgBox("Red data faile", MsgBoxStyle.Critical, "")

            Exit Sub

        Else

            For s = 0 To sLen - 1

                TextBox1.Text = TextBox1.Text & VB.Right("0" & Hex(sdata(s)), 2)

            Next

            TextBox1.Text = TextBox1.Text.Substring(0, 8)

        End If

    End Sub

End Class




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-07-17 01:10:49 By : moshi555 View : 3287 Reply : 5
 

 

No. 1

Guest


ลองตรวจสอบเครื่องอ่านผ่าน hyperterminal หรือ debug tool(มีรึป่าวไม่แน่ใจ) ที่มากับ strong
link ยังครับ ถ้าอ่านได้ค่อยไปเช็คโค้ดต่อครับ






Date : 2009-07-17 14:57:38 By : zZzZzZ
 


 

No. 2



โพสกระทู้ ( 10 )
บทความ ( 0 )



สถานะออฟไลน์


ตัว demo ที่ติดมากับโปรแกรมหรือป่าวคับ debug tool ที่ว่า -*-
Date : 2009-07-17 19:31:02 By : moshi555
 

 

No. 3



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์


ISO ผิดครับ

มันไม่ใช่ ISO15693 มันเป็นอีก ISO ครับ
Date : 2012-08-20 19:44:07 By : palamorter
 


 

No. 4



โพสกระทู้ ( 394 )
บทความ ( 0 )



สถานะออฟไลน์


รองขอ SDK จากบริษัทที่จำหน่ายดูครับ เค้าน่าจะมีให้ครับ
Date : 2012-08-21 08:26:18 By : Nameless
 


 

No. 5



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์


ผมว่า .dll ของ จขกท. มันเป็น ISO_rfid iso 14443 ครับ ต้องเขียนอีกแปปครับ ในส่วน declare.vb ต้องแก้ครับ

Code (VB.NET)
Option Strict Off
Option Explicit On
Module mo_declare
   
   
    Public Declare Function rf_init_com Lib "MasterRD.dll" (ByVal port As Integer, ByVal baud As Integer) As Integer
    
    Public Declare Function rf_ClosePort Lib "MasterRD.dll" () As Integer



    '******************************************MF1*****************************************
    
    Public Declare Function rf_request Lib "MasterRD.dll" (ByVal icdev As Short, ByVal model As Byte, ByRef TagType As Short) As Integer

  
    Public Declare Function rf_anticoll Lib "MasterRD.dll" (ByVal icdev As Short, ByVal bcnt As Byte, ByRef ppsnr As Byte, ByRef pRLength As Byte) As Integer

  
    Public Declare Function rf_select Lib "MasterRD.dll" (ByVal icdev As Short, ByRef pSnr As Byte, ByVal srclen As Byte, ByRef size As Byte) As Integer

    
    Public Declare Function rf_M1_authentication2 Lib "MasterRD.dll" (ByVal icdev As Short, ByVal model As Byte, ByVal block As Byte, ByRef key As Byte) As Integer

    
    Public Declare Function rf_M1_read Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByRef buff As Byte, ByRef pLen As Byte) As Integer

    
    Public Declare Function rf_M1_write Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByRef buff As Byte) As Integer

    
    Public Declare Function rf_halt Lib "MasterRD.dll" (ByVal icdev As Short) As Integer
   
    Public Declare Function rf_M1_initval Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByVal Value As Integer) As Integer


    Public Declare Function rf_M1_readval Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByRef pValue As Byte) As Integer


    Public Declare Function rf_M1_increment Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByVal Value As Integer) As Integer


    Public Declare Function rf_M1_decrement Lib "MasterRD.dll" (ByVal icdev As Short, ByVal block As Byte, ByVal Value As Integer) As Integer

    Public Declare Function rf_beep Lib "MasterRD.dll" (ByVal icdev As Short, ByVal Value As Integer) As Integer

    Public Declare Function rf_light Lib "MasterRD.dll" (ByVal icdev As Short, ByVal color As Integer) As Integer



    '////////////======== Function ISO14443B Function ================================
End Module


แบบนี้ก่อน แล้วไปแก้ code ใน from อีกทีครับ
Date : 2012-08-21 13:19:00 By : palamorter
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : คัยรู้เรื่อง rfid ช่วยดูหน่อยคับ (vb.net) คือผมลองทำตามลิ้งนี้ อ่ะคับ แล้วมันอ่านแล้วก้อเขียนไม่ได้คับ โค้ดผิดตรงไหนหรือป่าวช่วยดูทีคับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่