Faculty Tracking System Using RFID

lesh03

New member
Joined
Jul 2, 2013
Messages
1
Programming Experience
Beginner
Please help. We are currently working a tracking ID using RFID system with a limitation of small distance. We're using VB.Net, the problem is RFID reader is only reading the most current entry for example. we try to swipe two IDs at a consecutive time and the only accepted entry was the second. This is the code for accepting and displaying the ID number:
#Region "DisplayData"
    ''' <summary>
    ''' Method to display the data to and
    ''' from the port on the screen
    ''' </summary>
    ''' <remarks></remarks>
    '''     'Private Sub DisplayData(ByVal msg As String)
    <STAThread()> _
    Public Sub DisplayData()
        RichTextBox1.Invoke(New EventHandler(AddressOf DoDisplay))
    End Sub
#End Region


#Region "DoDisplay"
    Public Sub DoDisplay()
        RichTextBox1.AppendText(Now() & "        " & Detected & ControlChars.Cr) ' Show Card ID with Date Time
        RichTextBox1.ScrollToCaret()
        If (Detected = Detected) Then
            If Detected = Room601.Label1.Text Then
                Room601.Label1.Visible = True
            End If
            If Detected = Room601.Label2.Text Then
                Room601.Label2.Visible = True
            End If
            If Detected = Room601.Label3.Text Then
                Room601.Label3.Visible = True
            End If
            If Detected = Room601.Label4.Text Then
                Room601.Label4.Visible = True
            End If
            lblStatus.Text = "Valid Card Match: " & Detected
            lblStatus.BackColor = Color.MistyRose
        Else
            lblStatus.Text = "Invalid Card Match: " & Detected
            lblStatus.BackColor = Color.LightGreen
        End If




    End Sub
#End Region

 Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
        Try
            Dim msg As String = SerialPort1.ReadExisting


            indata = indata + msg
            Dim where As Integer = InStr(indata, ControlChars.Cr) ' Locate End of Line character 0x13
            If (where > 11) Then
                Detected = indata.Substring(where - 11, 10)
                : DisplayData()
                indata = ""
            End If
        Catch ex As Exception


        End Try
    End Sub

What do you think could we do to show all ID numbers when swipe?
 
Back
Top