Use case

Mining labels: sample and core tags

A drill hole becomes hundreds of samples, and each one has to stay matched to its hole, its depth and its result for years. This page covers the labels that make that possible: core tray labels, sample interval tags, tags for quality-control samples and equipment tags for harsh places. It covers the barcodes they typically carry, where the data comes from and how it reaches the printer. No standard defines these tags: they are practice, so your geology team's own procedure decides what is on them.

What is built today: Status

The label at a glance

The numbers in the drawing match the list. Sample data is made up.

Schematic of a drill-core sample tag with five numbered elements A portrait tag. From the top: 1 the hole ID in large type with the project; 2 the depth interval as text; 3 the sample number as a linear barcode with its text under it; 4 the sample type and the tray; 5 an optional 2D symbol. The bars and the 2D symbol are decorative, not scannable. HOLE ID PROJECT EX-01 DH-0142 1 INTERVAL 112.40 m to 113.40 m Length 1.00 m 2 S-0087213 3 SAMPLE TYPE Core, half Tray 31 4 2D 5
Schematic, not scannable. A sample interval tag with made-up sample data. Your tag follows your own procedure: nothing here is a required format.
  1. Hole ID and projectWhich hole the sample came from, in large text, and the project.
  2. Depth intervalThe from and to depths, as text.
  3. Linear barcodeThe sample number as Code 128, with the same text under the bars. Logging and receiving scan it.
  4. Sample type and trayWhat kind of sample it is and the tray it came from.
  5. 2D symbol (optional)A Data Matrix: more data in a small area, such as the hole and the interval with the sample number.

What is printed, and why

Core tray labels say which hole and which depth range a tray holds. Sample interval labels are printed one per interval: the hole ID, the depth interval and the sample type go on the tag that travels with the sample. Quality-control samples, such as blanks, standards and duplicates, are inserted into the sequence by a rule, so each one gets an ordinary-looking tag and the sequence decides which numbers they are. Equipment tags identify tools and instruments that live in dust, wet and sun.

No standard governs these tags: the format of the hole ID and the sample number, and the layout, are decided by your own procedure.

Which barcodes, and why

Barcodes on mining tags, why they are used and the edition each needs
BarcodeWhy it is on the labelEdition
Code 128A linear barcode for the sample number. Code 128 holds letters and digits in one line of bars, and the site's symbology table pairs it with data that has no GS1 structure.Basic
Data MatrixA 2D symbol holds more data in a small area and carries error correction. It suits a small tag, and it can hold the hole and the interval along with the sample number.Ultimate

BarcoderX enforces quiet zones, snaps the module width to whole dots and reports the effective size. Symbol options

The data that fills it

Fields a mining sample tag needs, a sample value and where each goes
FieldSample valueWhere it goes
Hole ID and projectDH-0142, EX-01Large text, element 1.
Depth interval112.40 m to 113.40 mText, element 2.
Sample numberS-0087213The barcode, element 3, and the same characters as text under it.
Sample typeCore, halfText, element 4.
QC roleBlank, standard or duplicateNot printed. It stays in your geology database, so a quality-control sample's tag looks like any other.

The sampling plan lives in your geology database: one row per interval, with the hole, the depths, the sample number and the type. One label is generated per row. The rule that inserts blanks, standards and duplicates runs in your database. Its result is just more rows, and each prints like any other.

Many labels come out as one multi-page PDF or as a ZIP of files when you export, and when you print a job with many labels, static content is stored on the printer once and recalled for each label.

The values come from objects, a DataTable, CSV, JSON or XML. Counters, masks and more than 100 built-in functions produce the values that change on every label. Templates and data

Why generate it from code

A hole is sampled in one session, and the plan changes when a geologist re-cuts an interval. A tag typed by hand can carry a wrong depth for years. Generated from the plan, the tag says what the database says, and a change in the plan is a new run of the job. That is server-side printing: a service builds the label and sends it to a printer, with nobody signed in, no browser open and no print dialog. Server-side label printing

How it reaches the printer

The printer commands are the same on both routes, and both run on infrastructure you operate.

  • Direct, from your application. The SDK packages send the printer commands from your own .NET process over TCP port 9100, serial, the Windows spooler, CUPS or USB. No API server and no agent is in the path.
  • Through your API server. Your application queues a print job through the REST API on your API server. A print agent on the printer's network collects it and writes it to the printer beside it. The agent only dials out, so the printer network needs no inbound port.

The printer usually sits at the core shed or in the sample preparation area. A program on the computer beside it can print directly, or queue the job on your API server for a print agent on that site's network.

Delivery to the agent is at-least-once and the agent de-duplicates by job id, so a reconnect does not print a label twice. Print jobs honor an idempotency key, so a retried request does not queue a second label.

Weatherproof stock is your choice. A tag may sit in dust, rain, sun and mud, and a sample bag may be handled for months. Direct thermal media darkens under the heat of the print head and the print fades with heat, light and age; thermal transfer melts ink from a ribbon and lasts longer (see direct thermal and thermal transfer). In ZPL, ^MT tells the printer which one is loaded. Test the stock and ribbon where the tag will live.

Which edition covers it

EditionsBasic covers the linear (1D) and postal symbologies, including every GS1 DataBar variant; Ultimate adds the PDF417 family, other multi-row symbologies, every matrix (2D) symbology and GS1 composites, as set out on the pricing page.

For mining tags, that means Code 128 is in Basic. A Data Matrix is a matrix (2D) symbology and needs Ultimate.

The ZPL behind it

Printer commands a label like this can use. Each page explains one command in our own words.

^BC
Prints a Code 128 barcode.
^BX
Prints a Data Matrix barcode.
^BY
Sets the module width of the barcodes that follow.
^FB
Turns text into a block that wraps.
^PQ
Sets how many labels print, how many print between pauses and how many times each serial number repeats.

What BarcoderX does not do here

BarcoderX prints the tag. It does not model drill holes, run the sampling plan, insert quality-control samples or exchange data with a laboratory: your geology database does, and it calls the print. BarcoderX does not read barcodes, so scanning a tag at logging or at receipt is your scanner and your software.

New to the printer language? Read the ZPL guides and command reference.

Sources What this page says about BarcoderX comes from its published barcodes, pricing, printing, templates and data, FAQ, glossary and server-side printing pages. The description of mining tags is general and ours; no standard or reporting code is cited because none defines these tags.

Written by BarcoderX in its own words.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.