Why the UBI (Universal Barcoding Interface)

It is sometime necessary to support legacy PCL5 barcoding sequences present in print flows, when those sequences have been arbitrarily defined by their vendor, or set some permanent parameters such as Freescape by sending a file to the printer.
The BarDIMM Universal Barcoding Interface is a feature of BarDIMM Pro v8 and later that allows to create a print file that sets the Freescape value or configures BarDIMM Pro to print barcodes with the exact same PCL5 sequence that was used with another printer barcode solution.

Configuring the default Freescape character

It is possible to define the default Freescape character by creating a UBI command that contains the ASCII code for the Freescape character.

Converting PCL5 sequences

BarDIMM Universal Barcoding Interface converts the legacy font sequence into a legitimate BarDIMM Pro PCL5 sequence.
The command to configure the converter uses the following font parameters:

  • Font symbol set (“< Esc >( “ parameter)
  • Font number (T parameter)
  • p parameter
  • v parameter
  • h parameter
  • b parameter
  • s parameter
    All parameters must be defined; a * value is used for parameter not found in new font sequence

How to use the UBI and send the configuration to the printer

The Universal Barcode Interface is configured through a binary PCL5 file sent to the printer in example using a FTP connection. The UBI settings are then stored permanently in the printer.
The settings are made of a text file encapsulated in a PCL5 header and footer. That text file defines the PCL5 sequence received from the host (PC, server), with the symbol set, T, p, b, s, v and h parameters, one line defines one barcode/font sequence conversion.
For each of the parameters the text file defines the conversion from the value received in the print flow to the value BarDIMM Pro can process.

UBI text file format for default Freescape character

The text file is made of lines separated by < cr >< lf >
F#value
#value is the ASCII value of the Alternate Escape Code: 34 (″), 35 (#), 36 ($), 47 (/), 92 (\), 63 (?), 123 ({), 125 (}), 124 (|), 126 (~) or 27. Indicating 27 disables Freescape.

Example, UBI command to set the Freescape value to ~ character:
F126< cr >< lf >

UBI text file format for font conversion

The instructions are in an ASCII text file made of lines separated by < cr >< lf > (use Notepad or Notepad++ to create that file, don’t use Word)
R#R1;T#T1=#T2;(#(1=#(2;P#p1=#p2;V#v1=#v2;B#b1=#b2;S#s1=#s2< cr >< lf >
#R1: the unique record number (1 to 50), no need to have them contiguous, the file can contain any number of records as long as that’s less than 51.
#T1: received font number (i.e.: 20010) #T2: corresponding BarDIMM font ID
#(1: received font symbol set (i.e.: 8U) #(2: Any font symbol set (BarDIMM won’t use it)
#p1: received font p parameter (i.e.: 0) #p2: corresponding BarDIMM p parameter
#v1: received font v parameter (i.e.: 12) #v2: corresponding BarDIMM v parameter
#h1: received font v parameter (i.e.: 12) #h2: corresponding BarDIMM v parameter
#b1: received font b parameter (i.e.: 1) #b2: corresponding BarDIMM b parameter i.e.: 4,8
#s1: received font s parameter (i.e.: 1) #s2: corresponding BarDIMM s parameter i.e.: 4,8

  • is a wildcard for the parameters that end with 1, to make a match with any received font parameter.
    It can only be used for received font sequence, not for BarDIMM parameters and not for ‘T’
    All parameters must be defined and a * value can be used for parameter not found in received font sequence (i.e. the h or v parameters)

Example of UBI text file

Below is an example of three UBI text file records for font conversion:

R1;T3000=24700;(*=10U;p1=2;v12=10;h*=0;b1=3,6,8,12;s*=4,6,8,12
R2;T3010=24710;(8U=8U;p0=2;v*=10;h*=2402;b3=2,4,6,8;s*=2,4,6,8
R3;T3012=24720;(1Q=1Q;p0=1;v*=20;h22=2;b1=6,12,18,24;s0=7,12,18,24

The first record states that a PCL5 font sequence ending with 3000T, of any symbol set, with value 1 for its p parameter, value 12 for its v parameter, any value for its h parameter, value 1 for its b parameter and any value for its s parameter, will be converted into: < Esc >(10U< Esc >(2p0h10v3,6,8,12b4,6,8,12s24700T
Received PCL5 sequence -> PCL5 sequence processed by BarDIMM with that sample UBI text file:
< Esc >(14U< Esc >(s1p12v1b0s3000T -> < Esc >(10U< Esc >(2p0h10v3,6,8,12b4,6,8,12s24700T
< Esc >(8U< Esc >(s0p12h3b1s3010T -> < Esc >(8U< Esc >(2p2402h10v2,4,6,8b2,4,6,8s24710T
< Esc >(1Q< Esc >(s0p22h1bs3012T -> < Esc >(1Q< Esc >(1p2h20v6,12,18,24b6,12,18,24s24720T

How to build the UBI definition file

You can use any text editor such as notepad to write the UBI text file.
The UBI text file definition must then be converted into a binary file, then sent to the printer that host BarDIMM v8 or later to be usable by BarDIMM Pro.
The no-charge UBIwrapper command line utility provides that service, it:
• Converts a UBI test file text file into a UBI binary file
• Sends the UBI binary file to a target printer (that printer must be equipped with BarDIMM Pro v8 or newer)
The UBIwrapper utility can be downloaded from www.bardimm.com, Download/Manual and tools menu. You need to create an account on the support portal, it is free.

Installation of UBIwrapper

Just unzip the content of the UBIwrapper.zip file in a directory, it contains the utility, a readme.txt file and two sample files.

Using UBIwrapper

Using UBIwrapper is about running a command line with all appropriate parameters.
You can run the utility with no parameter to get the syntax:
D:\bardimmpro>ubiwrapper
BarDIMM Pro UBI wrapper v8.0.1.09 20160922 ©2016 Jetmobile Pte Ltd
Syntax: ubiwrapper < options > < textfileIn > < binaryfileOut >
Options: -s for silent mode -o< IP > for sending the file to an IPv4 address
Example: ubiwrapper -s -o146.94.80.10 settings.txt settings.prn

UBIwrapper syntax

UBIwrapper < options > < textfilein > < binaryfileout >
Where:
< textfilein > must be replaced with the path and filename for the UBI text file
< binaryfileout > must be replaced with the path and filename for the resulting UBI binary file ready to be sent to the printer equipped with BarDIMM Pro
< options > is empty or one or more of the following options: -s to remove screens messages during the process -o to send the resulting file to a network printer IP address, using its IPv4 address
Once the UBI settings have been received by the printer, the printer recognizes the new PCL5 font commands and converts them to the appropriate BarDIMM Pro barcode-related PCL5 commands.

Limitations of the UBI technology

You must verify the data that goes with the legacy PCL5 barcoding command to support, is of a data compatible with BarDIMM Pro.
As an example, and not limited to those:

  • the data for barcode 128 should be received exactly the way it will be read by a barcode reader, without any special encoding (some low-level barcode solutions require such awkward custom encoding)
  • the data for GTIN/EAN128 should not include changes between sets A/B/C as those encoded in the legacy application may be proprietary and not follow the norm. Some tests should be performed to verify if the legacy encoding follows the standard.
  • the data for GTIN/EAN/JAN 8/A/10/13 needs to be sent to the printer exactly as it shows up below the barcode, no proprietary encoding is supported.

Need more help with this?
BarDIMM support portal

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.