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

0
Avatar
Legacy Poster

I am trying to encode an RFID label using ISO 15693. I have connected a comma-separated text file database to the encoder, which contains a mixture of binary data and ASCII, for example:

 

A B C 0x00 0x00 0x00, 0 0 0, 0x01 0x02 0x03

 

In raw binary, these three fields therefore should read (without the commas) as:

 

41 42 43 00 00 00 30 30 30 01 02 03

 

Because of the mix, I want to encode everything as binary, but I cannot get BarTender to encode the 0x00 bytes, and I'm not sure what it's doing with other raw binary fields. Here's an example, with the non-ASCII parts in the expected output coloured red. I've separated each field with a | for clarity.

 

Expected Encoding (known contents of the text file database, without the commas):

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 (read back):
50 61 71 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 07 47 49 43 31 32 33 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 3F 49
 
There's obviously quite a problem here, but I don't know how to resolve it. I want for the encoded RFID data to be as the expected encoding I've written above. I generate my database dynamically offline, so the solution needs to allow for a database that can be externally constructed (i.e., a text or data file).
 
Faithfully,
 
Ed King

8 comentarios

0
Avatar
Shotaro Ito
Acciones de comentarios Permalink

Hi Ed,

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

 

0
Avatar
Legacy Poster
Acciones de comentarios Permalink

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
Moderador
Acciones de comentarios Permalink

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
Acciones de comentarios Permalink

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
Moderador
Acciones de comentarios Permalink

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
Acciones de comentarios Permalink

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
Acciones de comentarios Permalink

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
Acciones de comentarios Permalink

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.

Iniciar sesión para dejar un comentario.