Royal Mail RM4SCC

 

The RM4SCC is a clocked code which uses a central track made up of evenly spaced small bars, with the data encoded by the bars extending above and/or below the clocking bars.

The character set for RM4SCC consists of upper case letters and numbers only. The dLSoft barcode font includes a zero width space character, so that text copied from conventionally spaced postcodes may be translated into a barcode symbol.

This code must begin with a start character and must end with a stop character. The start character is § (Chr$(167)) and the stop character is ¬ (Chr$(172)).

For convenience in typing the open bracket ( may be used as the start character, and the close bracket ) may be used as the stop character.

The check digit is normally obtained by a table-lookup procedure, but a simple algorithm may also be used. The character values are shown in the table.

 

Character

Value

0 - 9

0 - 9

A - Z

10 - 35

 

The character values may be determined directly from the corresponding ASCII values, and then two parameters calculated (tu and tl) representing the row and column of the 6*6 table-lookup.   

For i = 1 to len(code$)
     z=ASC(MID$(code$,I,1))
     If (z < 65) Then
            z = z - 48
         Else
            z = z - 55
          End If

         ii = Int(z / 6)
         If (ii >= 5) Then k = 0 Else k = ii + 1
         tu = tu + k' row ref
         ii = Int(z - ii * 6)
         If (ii >= 5) Then k = 0 Else k = ii + 1
         tl = tl + k' col ref

    Next i

Then the check digit value is calculated

    tu = tu Mod 6: If (tu = 0) Then tu = 6    ' checksum
    tl = tl Mod 6: If (tl = 0) Then tl = 6
    k = (tu - 1) * 6 + tl - 1

And finally the value is converted to ASCII

    If (k < 10) Then
        chn = (k + 48)
    Else
        chn = (k + 55)
  checkchar$ = Chr$(chn)

 

The dFont program provided with the dLSoft Barcode fonts calculates check digits for RM4SCC codes, and the source code is provided and may be adapted to the users needs - for example, for automating the calculation in a spreadsheet or database.

Some other European countries use a virtually identical 4 state clocked code for barcoding the mail. In some of these countries the start and stop characters are NOT used, and in some case the check digit is not used. In such cases the text of the postcode may be reproduced directly using the dLSoft barcode font.

In all cases the size of the printed barcode is important, and a font size of 20 point should always be used.

 

 

More:

PostNet