Writing Tag Using Motorola FX7400 Reader Through Biztalk

Answered Writing Tag Using Motorola FX7400 Reader Through Biztalk

  • Monday, August 16, 2010 8:56 AM
     
     

    Hi all,

                    We are planning to commission tags using Motorola FX7400 fixed reader. We are using BizTalk 2009 RFID as our middleware. Reading tags is perfect; we have successfully developed multiple event handlers to read tags. However while trying to commission tags using BizTalk RFID’s Synchronous Commands, it is giving error as MemoryOverRun.

     

    I request you to help me out.

     

     

    My Code is as follows:

    Step 1: Tag Count Checking

    Prior to write onto Tag I am checking whether there are multiple Tags near the Antenna, if I found multiple Tags, then I am not commissioning the Tag.

     

     

    Step 2: Tag Commissioning:

    DeviceConnection connection = new DeviceConnection(DeviceName);

                TagDataSelector selector = TagDataSelector.All;

                try

                {

                    connection.Open();

                    System.Text.Encoding encoding = null;

                    encoding = new System.Text.ASCIIEncoding();

                    string strHex = "061600000045161600000045";

                    newTagID = encoding.GetBytes(strHex);

                    connection.WriteTagId("Antenna_4", newTagID, null, null, null, null);

                    connection.Close();

                    return (true);

                }

                catch (Exception ex)

                {

                    connection.Close();

                    MessageBox.Show(ex.Message);

                    return (false);

                }

                finally

                {

                    connection.Close();

                }

     

    And it is giving Following Error:

     

    System.IO.SensorServices.Rfid.Client.CommandExecutionFailedException was caught

      Message=The command execution failed due to error <commandError><errorCode>Command execution failed. See the error message for more information.</errorCode><message>TagMemoryOverrunError</message><errorKey>TagMemoryOverrunError</errorKey><parameters></parameters><providerException></providerException></commandError>. Resolve the issue that is causing the exception, and then retry the operation.

      Source=Microsoft.Rfid.Client

      ErrorCode=CommandExecutionFailed

      StackTrace:

           at System.IO.SensorServices.Rfid.Client.DeviceConnection.ExecuteCommand[TCommand](String deviceSourceName, TCommand cmd, VendorDefinedParameters parameters)

           at System.IO.SensorServices.Rfid.Client.DeviceConnection.WriteTagId(String deviceSourceName, Byte[] tagId, Byte[] newAccessCode, Byte[] newKillCode, Byte[] passCode, VendorDefinedParameters parameters)

           at TagCommissionDesk.TagCommissioning.CommissionTags(Byte[] newTagID, Byte[] SourceTagID, Byte[] newKillCode) in C:\Users\Administrator\documents\visual studio 2010\Projects\TagCommissioning\TagCommissionDesk\Form1.cs:line 276

      InnerException:

All Replies

  • Monday, August 16, 2010 5:11 PM
     
     

    Please check the length of the byte array you are trying to write to the tag. I believe you are trying to write a 12-byte tag id, but the code you are using will result in an attempt to write 24 bytes.

    HTH,

    Kranthi.

  • Tuesday, August 17, 2010 9:47 AM
     
     Answered

    Hey Kranthi Thanks,

    You are right, I was trying to write 24 byte in Tag Memory which is not possible. Yesterday only I realized the problem and made changes, now my code working fine.

    I thought 96 bit means 24 Hex bytes, so I used 24 Hex chars. Could you help me to write 24 Hex chars into tag. I am also trying, if successed I'll replay with used logic.

    Thanks.

     

  • Tuesday, August 17, 2010 1:34 PM
     
     

    You can use the method HexUtilities.HexDecode provided by BizTalk RFID.

    (As a side note, do check whether the byte order is correct.)

    HTH,
    Kranthi.

  • Wednesday, August 18, 2010 12:01 PM
     
     

    Hey Kranthi,

    Thanks.

    It worked fine.

    Thanks