Toolbox.NETMF.Hardware.Rdm630


Toolbox.NETMF.Hardware.Rdm630(Port)
  • Port The COM-port the RFID reader is connected to

Supported events

  • DataReceived(Unused1, Unused2, Time) Triggered when a tag has been read

Supported properties

  • Tag Contains the last read RFID tag

How to connect

Toolbox.NETMF.Hardware.Rdm630.png

Sample code in C#

public class Program
{
    // Makes the RFID class public so all methods can reach it
    public static Rdm630 RFID;

    public static void Main()
    {
        RFID = new Rdm630("COM1");

        // Binds the event
        RFID.DataReceived += new NativeEventHandler(RFID_DataReceived);

        // Waits infinite for RFID tags
        Thread.Sleep(Timeout.Infinite);
    }

    /// <summary>
    /// Triggered when an RFID tag is scanned
    /// </summary>
    /// <param name="Unused1">Not used</param>
    /// <param name="Unused2">Not used</param>
    /// <param name="Time">Date and time of the event</param>
    static void RFID_DataReceived(uint Unused1, uint Unused2, DateTime Time)
    {
        Debug.Print("RFID tag " + RFID.Tag + " scanned");
    }
}

Sample code in VB

Module Module1
    ' Makes the RFID class public so all methods can reach it, and bounds all events
    Dim WithEvents RFID As Rdm630

    Sub Main()
        RFID = New Rdm630("COM1")

        ' Waits infinite for RFID tags
        Thread.Sleep(Timeout.Infinite)
    End Sub

    ''' <summary>
    ''' Triggered when an RFID tag is scanned
    ''' </summary>
    ''' <param name="Unused1">Not used</param>
    ''' <param name="Unused2">Not used</param>
    ''' <param name="Time">Date and time of the event</param>
    Private Sub RFID_DataReceived(ByVal Unused1 As UInteger, ByVal Unused2 As UInteger, ByVal Time As Date) Handles RFID.DataReceived
        Debug.Print("RFID tag " + RFID.Tag + " scanned")
    End Sub
End Module

Related documents

Last edited Jan 1, 2013 at 9:15 PM by Garrcomm, version 3