How do I configure the Barcode Label Definitions for the Laboratory in LIMS-plus v5?

Barcode label definitions are configured for each Lab separately and include the elements needed to generate the actual barcode label. While the barcode printer settings are accessed directly from the Admin menu, the barcode label definitions are accessed off of the Lab screen. Barcode printer settings will be covered in another topic.

LIMS-plus v5 assumes that the barcode printer is using the EPL printer language. Other languages may be compatible, but will require manual configuration of the definition. Contact Tech Support to determine if the Laboratory's printer language is compatible with LIMS-plus v5.

Of note, at least ten permissions need to be added to a Security Role given to users who will be configuring barcodes:

  • Admin - Lab - Edit
  • Admin - Lab - View
  • Admin - Lab | Barcode - Add
  • Admin - Lab | Barcode - Barcode Definition - Add
  • Admin - Lab | Barcode - Barcode Definition - Delete
  • Admin - Lab | Barcode - Barcode Definition - Edit
  • Admin - Lab | Barcode - Delete
  • Admin - Lab | Barcode - Edit
  • Admin - Lab | Barcode - View
  • Admin - Barcode Printer Settings

At a very minimum, users must be given the Admin - Lab - View, Admin - Lab | Barcode - View and Admin - Barcode Printer Settings permissions. Users without the Admin - Lab - View permission will see a grayed out Lab command on the Admin menu and will not be able to access the Lab screen. Users given the Admin - Lab - View permission but not the Admin - Lab | Barcode - View permission will not be able to access the barcode configuration screens. Users not given the Admin - Barcode Printer Settings permission will see a grayed out Barcode Printer Settings command on the Admin menu.

Access the List of Labs


To access the list of Labs, open the Admin menu and select Lab.

Access Barcodes Label Settings for a Lab


If the Lab is listed in the grid list of Labs, click on the Barcode icon for that Lab.

If the Lab needs to be added, click the Add Lab button toward the top left, under the screen name "Lab" and add at least the new Lab name, then click Save. Find the new Lab in the grid list and click on the Barcode icon for that Lab.

2D Barcodes


Some Laboratories may use two-dimensional (2D) barcodes as well as one-dimensional (1D) barcodes. While LIMS-plus v5 cannot produce 2D barcodes, already existing 2D barcodes can be registered for use in LIMS-plus v5.


To allow the acceptance of 2D barcodes for a specific Lab, after clicking on the Barcode icon for the specific Lab, click on the Barcode Setting button for that Lab. Place a checkmark in the Allow 2D Barcode checkbox, set the Start ID number and the End ID number, then click Save.

Barcode Label Types


There are 15 barcode label types available for use with LIMS-plus v5. Barcodes can be used for:

  • Agency Representatives
  • Attachments
  • Auto Text
  • Batch Samples
  • Case Requests
  • Containers
  • Controls
  • Evidence Submissions
  • Instruments
  • Laboratory Case Numbers
  • Laboratory Staff Members
  • Raw Materials
  • Request Batches
  • Requests
  • Storage Locations

Barcode Definitions

To edit one of the 15 barcode definitions, click on the Edit Barcode Label icon corresponding to the Barcode Label Type in the grid list. The Barcode Label Definition window for that barcode type will open.


In the Barcode Label Definition window, a checkmark in the Active Only checkbox (1) means only the active barcode label definitions will appear in the list. Remove the checkmark to show both active and inactive label definitions.

To import barcode label definitions in XML format, click the Import Selected Items button (2). A Browse button will appear, allowing for navigation to and selection of an XML file to import. Click the associated Import button (which will also appear) to import the barcode label definition.

To copy an existing barcode label definition, click the Make a Copy icon (3). This copy can then be renamed and edited for a new barcode label definition.

To export an existing barcode label definition, click the Export icon (4) for that barcode label definition. This will produce an XML file that can be saved for import elsewhere, perhaps for another Lab's barcode label definition. Note that this Export icon (4) is different than the Export icon for the list (7). The Export icon for the list (7) will export the entire list of Label Definitions.

To edit the barcode label definition, click the Edit icon (5) for that specific label definition in the grid list.

To deactivate the barcode label definition, click the Deactivate icon (6) for that specific label definition in the grid list.

To add a new barcode label definition, click the Add New Definition button (8).

When finished with this window, click the Close button (9).

Add or Edit a Barcode Label Definition


Whether adding a new barcode label definition or editing an existing one, the window that will open will be the Barcode Label Definition Details window. The different parts of this window include:

  1. Description (1). Type in or edit the description of the barcode label definition.
  2. If a test barcode will be printed, select the printer from the Test Printer picklist.
  3. To use SQL commands for the barcode label definition, type them in the Select SQL Command window (3) and click the Execute button. See below for more information about SQL commands.
  4. The actual barcode label code goes in the Label Code box (4).
  5. Hot Keys (5) can be used for inserting the field into the label. Double-click on the hot key in the list to insert it where the cursor is located in the Label Code box (4).
  6. If this barcode label definition will be the default definition for this label type, place a checkmark in the Default Definition checkbox (6).
  7. By default, the barcode label definition is Active (7). To mark it as inactive, remove the checkmark from the Active checkbox.
  8. To test print the barcode when all of the information has been entered, click the Test Print button (8).
  9. When finished, click the Save (9) button.

SQL Commands

SQL commands are an optional component of barcode label definitions. The SQL statement pulls the necessary information from the database. For example, if the label is for an Evidence item, the results of the SQL statement should only return one item. A SQL statement that returns multiple results will cause multiple barcode labels to print. The possible columns of information about the SQL statement's results are derived from the SQL statement and are items that can be added to the label definition. The label definition must be entered manually or copied and pasted into the Select SQL Command textbox.

SQL commands can be used to add additional data fields into barcode label definitions, beyond those automatically available based on the label type. SQL commands are simply SELECT statements which return the desired data. To use the data in the barcode label definition, simply enclose it within double chevrons (<< >>) as if it were one of the fields automatically available for the label type. However, when using SQL commands, the following caveats apply:

  1. SQL commands should be written in such a way as to ensure that only one row of data is returned. If this is not the case, multiple labels will print when the barcode label definition is used, one for each row of returned data. If no data is returned, no barcodes will print.
  2. All fields returned by a SQL command should be "aliased" with a column name of eight (8) or fewer characters.
  3. SQL statements cannot include a WHERE clause, as the WHERE clause for each label type is hard-coded. These hard-coded WHERE clauses are as follows:

- DNA: " WHERE Evidence.evid_id = '" + lcEvid_id + "'"
- Lab Staff: " WHERE Lab_Reps.rep_id = '" + lcRep_id + "'"
- Agency Rep: " WHERE Agc_Reps.rep_id = '" + lcRep_id + "'"
- Storage Location: " WHERE Location.loc_id = '" + lcLocationID + "'"
- Lab Case: " WHERE Cases.case_id = '" + lcCase_id + "'"
- Evidence: " WHERE Evidence.evid_id = '" + lcEvid_id + "'"
- Request: " WHERE Requests.req_id = '" + lcReqID + "'"
- Container: " WHERE Container.cont_id = '" + lcCont_id + "'"
- DNA Control: " WHERE dnaSmplSumry_Dtl.dnasmpldtl_id = '" + lcDNAsmpldtl_id + "'"
- DNA Batch: " WHERE dnaBatch.batch_num = '" + lcItem_num + "'"

After entering the SQL commands, click the Execute button.

Label Code / EPL Printer Control Language

The label code definition is the coded language that is sent to the barcode printer. Barcode definitions in LIMS-plus v5 consist of printer control language commands that are sent to the selected barcode printer to generate a barcode label. LIMS-plus v5 includes sample barcode label definitions for all non-DNA label types. These sample barcode definitions are all written in the EPL printer control language, which is used by most Elton/Zebra printers, such as the TLP 2844.

Here is a sample barcode definition for an Agency Representative written in the EPL printer control language:

V00,50,N,"Agency Name"
V01,50,N,"Bar Code"
V02,50,N,"Agency Rep Full Name"
<<Agency Name>>
<<Bar Code>>
<<Agency Rep Full Name>>

NOTE: Barcode label definitions written in the EPL printer control language must include leading and trailing carriage returns.

And here is a breakdown of the above barcode definition, with notes regarding to what each line and line element does in relation to modifying the standard barcode definitions:

  • FK"E" - The Delete Form (FK) line deletes the form named "E."
  • FS"E" - The Store Form (FS) line starts the form named "E."
  • V00,50,N,"Agency Name"; V01,50,N,"Bar Code"; V02,50,N,"Agency Rep Full Name" - The Variable Definition (V) line(s) define the variables to be used in the barcode label definition and consist of Vp1,p2,p3,p4, where p1 is the variable number (variable number 00 must be the first variable); p2 is the maximum allowable characters in the variable; p3 is the desired justification for the variable (L = Left / R = Right / C = Center / N = No Justification); and p4 is the variable prompt or variable name, which must be enclosed in double quotes ("") and should match the name of the column or the SQL command. So V00,50,N,"Agency Name" is variable number 00, with a maximum of 50 characters in the variable, not justified, and the column name is "Agency Name."
  • q710 - The Set Label Width (q) line sets the label width in dots (this example sets the label width to 710 dots or 3.5 inches on a standard 200 dpi printer). This is optional.
  • D10 - The Set Print Density (D) line sets the print density or darkness for this label, which overrides any printing preferences (the allowable range is form 1 to 15). This is optional.
  • ZB - The Set Print Direction (Z) line sets the print direction for the label (T = Print from the Top of Image Buffer / B = Print from Bottom of Image Buffer).
  • A120,8,0,4,1,1,N,V00; A120,140,0,3,1,1,N,V02 - The Print Text (A) line(s) print the specified text and consist of Ap1,p2,p3,p4,p5,p6,p7,p8, where p1 is the horizontal start position, in dots from the upper left-hand corner of the label; p2 is the vertical start position, in dots from the upper left-hand corner of the label; p3 is the rotation (0 = No Rotation / 2 = 90° / 3 = 180° / 4 = 270°); p4 is the font (see below for a chart of available fonts); p5 is the horizontal multiplier, which expands the text horizontally (accepts the following values: 1, 2, 3, 4, 5, 6, & 8); p6 is the vertical multiplier, which expands the text vertically (accepts the following values: 1, 2, 3, 4, 5, 6, 7, 8 & 9); p7 specifies normal vs reverse image (N = Normal / R = Reverse); and p8 is the data to be printed - this can be either text, which must be enclosed in double quotes (""), a variable, or a combination of both text and a variable.
  • B120,50,0,3,2,4,60,B,V01 - The Print Barcode (B) line(s) print a barcode and consist of Bp1,p2,p3,p4,p5,p6,p7,p8,p9, where p1 is the horizontal start position, in dots from the upper left-hand corner of the label; p2 is the vertical start position, in dots from the upper left-hand corner of the label; p3 is the rotation (0 = No Rotation / 2 = 90° / 3 = 180° / 4 = 270°); p4 is the barcode selection (3 = 3 of 9 barcode); p5 is the narrow bar width, in dots (accepts integer values from 1 to 10); p6 is the wide bar width, in dots (accepts integer values form 2 to 30); p7 is the barcode height, in dots; p8 specifies whether or not to print the human readable code (B = yes / N = no); and p9 is the data to be encoded as a barcode (this will typically be whichever variable has been defined as "Barcode").
  • FE - The End Form Store (FE) line ends the form.
  • N - The Clear Image Buffer (N) line clears the image buffer.
  • FR"E" - The Retrieve Form (FR) line retrieves form "E."
  • ? - The Download Variables (?) line indicates that the next several lines will contain the data for the variables declared earlier.
  • <<Agency Name>>, <<Bar Code>>, <<Agency Rep Full Name>> - LIMS-plus v5 replaces the data enclosed by double chevrons (<< >>) with the appropriate data for the barcode, which can be either a built in data field for the label type or a column from a SQL command. These fields must be in the same order here as they were in the Variable Definition (V) line(s) above.
  • P1 - The Print (P) line specifies the number of labels to print.


NOTE: The programming manual for the printer control language used by a barcode printer is typically available via the manufacturer's website and is also frequently included on the installation CD that comes with the printer.

Return to the List of Labs from the Barcode Screen


After adding or editing barcode label definitions, click the Back button to return to the list of Labs, where barcode configurations for other Labs can be accessed.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk