Skip to main content

Search

Search

Encoding Rfid Tags That Have Both Ascii And Binary Data In The Database

Comments

8 comments

  • Avatar
    Shotaro Ito

    Hi Ed,

    Use Hexadecimal data instead of Text data - so you could enter hex text as database field data.

     

    0
  • Avatar
    Legacy Poster

    Hi Shotaro,

     

    I rebuilt the database in BarTender to use Hexidecimal data instead of Text data, but the problem remains and in fact it is now worse. Using the same expected encoding, I now get:

     

    Expected Encoding:

    50 61 71 00 00 00 00 00 | 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 | 30 30 37 37 37 37 37 37 | 47 49 43 31 32 33 00 00 00 00 00 00 | 55 E3 99 00 | 00 00 00 00 00 00 00 00 | 30 30 2E 30 | 30 30 2E 30 | 30 30 2E 30 | 30 30 2E 30 | 30 30 2E 30 | 30 30 2E 30 | 45 34 DE CC 

     

    Actual:

    00 00 00 00 00 00 00 00 | 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 | 30 30 37 37 37 37 37 37 | 00 00 00 00 00 00 00 00 00 00 00 00 | 00 00 00 00 | 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | 00 00 00 00 | 00 00 00 00 | 00 00 00 00 | 00 00 00 00 | 00 00 00 00

     

    Please can you suggest something different. Note that the database (a .txt file) is currently a mix of data for printing on the label and the fields for the RFID tag. I use BarTender to pick the appropriate fields out for the RFID Encoder tag, to generate the expected encoding above (a mix of ASCII and binary). I don't know whether this makes any difference to the behaviour of the encoder?

     

    Sincerely,

     

    Ed King

    0
  • Avatar
    Ian Cummings
    Moderator

    1. Note that BarTender renders ALL data in the RFID commands as hexadecimal data in its output.

     

    2. When you select "Hexadecimal" in the format for the RFID properties this means that BarTender is expecting data source values of: 0123456789ABCDEF

     

    3. I suggest you work on presenting all data sourced for the RFID object to be consistent, and the same, and to then choose the data type formatting in the RFID properties accordingly.  Use the data source's "Data type" and "Transforms" tabs to help you do this.  Maybe a bit of VB script in the transforms will be required.

    0
  • Avatar
    Legacy Poster

    Hi Ian,

     

    Thanks for your reply, but I'm afraid I need more information.

     

    If I have a mixed binary and ASCII .txt file that looks like this:

     

    'A' 'B' 'C' '1' '2' '3' '0' 0x00 0x01 0x02, 'h' 'e' 'l' 'l' 'o', 0xAA 0xBB 0xCC

     

    I.e., it has three fields, separated by a comma. one of which has ASCII characters and non-ASCII characters, one which is all ASCII and one which is all non-ASCII.

     

    If you say I need to present this consistently to BarTender, how do I format the database? Do I just make one massive field with a completely binary representation?

    0
  • Avatar
    Ian Cummings
    Moderator

    Am I to assume that the only binary data items you have in the text file are for the representation of control codes like <NUL>, <SOH>, and <STX>?  Or would the binary values potentially be anything between 00-FF?  How much binary data are we talking about on a per record basis?

     

    Can you attach an actual data file example so we can see what you're dealing with better.

    0
  • Avatar
    Legacy Poster

    Please see attached for an example of the database, with 3 records.

     

    We do not use control codes, and the binary values can potentially be anything between 00 and FF. So, when you view this file you will just happen to see the control code representation for anything that's not obviously ASCII; you will also see some weird characters for some of the other binary information.

    0
  • Avatar
    Legacy Poster

    Dear Ian or Shotaro,

     

    Please can I have an update on this topic. I am still unable to encode the labels properly. I have tried moving to a .dat file, using fixed-width fields, but I get a completely blank encoding if I do this.

     

    Sincerely,

     

    Ed King

    0
  • Avatar
    Shotaro Ito

    Dear Ed, your text data was not encoded to Hex. Try encode as HEX (Null as "00", Asc(255) as "FF" etc.) It's not about fixed or delimited.

    From application, create data file like "5061710000000000","30303030303030303030303030303030" for fields used in RFID object.

    0

Please sign in to leave a comment.