Convert the UID read from a project card
When you configure the RFID interface for autonomously reading a card's UID (serial number), you can convert the UID before it's transmitted to the host. To do so, you can use the following options in the RFID interface component of your configuration.
The available options depend on your card type's frequency (if you're unsure, check your frequency here).
13.56 MHz cards
Rotate Bytewise
Use this option to convert MSB first encoding to LSB first or vice versa. This option applies to the binary format of the UID, i.e. the bits (zeros and ones) that the UID ultimately consists of (learn more about encoding). You'll get a mirror reflection of bytes (a byte is a block of 8 bits): The order is reversed, i.e the last byte is read first. The order of bits within a byte is not affected.
125 kHz cards
Sample UID
Here, you can enter the UID of a sample project card. This helps you verify if following manipulations convert it into the expected number.
To find the required conversion options using the sample UID:
- Enter the UID in decimal encoding as returned by an unconfigured reader.
-
The UID will be displayed below in binary and hexadecimal format (learn more about encoding). For the conversion, the binary format is relevant.
-
Convert the expected number into binary format using a converter such as this one.
- Use the Bit Stream Manipulation options to convert the UID. The interim result will be displayed at the end of the section.
-
Compare this interim result in binary format with the expected number in binary format to find out which options you need.
-
The converted UID will be displayed below in the original decimal encoding.
- If needed, you use the Decimal Stream Manipulation option to further convert the UID.
-
The final number in decimal format will be displayed at the bottom.
Bit Stream Manipulation
These options apply to the binary format of the UID, i.e. the blocks of zeros and ones that the UID ultimately consists of (learn more about encoding).
Rotate Bytewise
Use this option to convert MSB first to LSB first or vice versa. You'll get a mirror reflection of bytes (a byte is a block of 8 bits). The order is reversed, i.e the last byte is read first. The order of bits within a byte is not affected.
Rotate Bitwise
You'll get a mirror reflection of bits within each byte: The order of bits is reversed, i.e. the last bit is read first. The order of bytes is not affected.
Extract Subsequence of Bits
Cut out a certain sequence of the UID in binary format.
- In the First Bit of Subsequence field, enter the position of the first digit you want to keep. Counting starts at position 0.
- In the Number of Bits field, enter the number of digits you want to keep.
To extract the subsequence in the example below, the First Bit of Subsequence is 7 and the Number in Bits is 11.
Decimal String Manipulation
Extract Subsequence of Digits
Cut out a certain sequence of the UID in decimal format.
- In the First Digit of Subsequence field, enter the position of the first digit you want to keep. Counting starts at position 0.
- In the Number of Digits field, enter the number of digits you want to keep.
To extract the subsequence in the example below, the First Digit of Subsequence is 3 and the Number in Bits is 6.