Howtorfid – Avery Dennison RFID User Manual
Page 36

HowToRFID
Revision: 13
Date: 31 August 2009
Page 36 of 53
Coding scheme
Description
Valid characters
Length
Bin (Binary)
Each character in a variable
presents one physical byte
Any value a byte can
have (0-255)
1 character = 1 byte of data
Hex (HexASCII)
HexAscii encoded binary data
0-9, A-F
2 characters = 1 byte of data
Dual (BinaryASCII)
Bitwise encoded binary data (MSB
first orientation)
0/1
8 characters = 1 byte of data
Dec (Decimal)
Decimal presentation of numbers
0-9
Variable depending from value of the
number
Table 15 – Data coding schemes
Examples
Data on tag
memory dump in Hex
Ascii notation
Data if directly
transferred to
Textvariable (1)(2)
Data after
conversation using
BinToHex (1)
Data after
conversation using
BinToDual (1)(3)
Date after
conversation using
BinToDec (1)
41 42 43 44
ABCD
41424344
01000001.01000010.
01000011.01000100
0
30 30 30 31
0001
30303031
00110000.00110000.
00110000.00110001
1
39 30 30 31
9001
39303031
00111001.00110000.
00110000.00110001
9001
00 10 11 FF
001011FF
00000000.00010000.
00010001.11111111
0
(1) shown here as printed text on the label
(2) stands for an unprintable (non ASCII) character
(3) dots inserted for better readability
More examples: see section 6.2 for examples how to use functions and data conversion.
5.3.3
Functions
Function + syntax
Description
DecToBin(expression)
Converts decimal part of expression into binary string of bytes. Decimal number in
expression must not exceed 2^64.
BinToDec(expression)
Converts expression into decimal number
HexToBin (expression)
Converts expression given as hexadecimal number represented in ASCII
characters into binary representation.
HexToBin(„3161“) returns „1a“
BinToHex (expression)
Converts expression to hexadecimal string
DualToBin (expression)
Converts dual expression to binary representation.
BinToDual (expression)
Converts expression to dual representation
BinToDual(„1a“) returns „0011000101100001“
PadRight(expression, character, number)
Pads expression from right with given character until string length is equal to
number
PadRight(“111”,”2”,5) returns “11122”
PadLeft(expression, character, number)
Pads expression from left with given character until string length is equal to number
PadLeft(“10101”,”0”,8) returns “00010101”
Table 16 – Functions for data conversion