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.
The label at a glance
The numbers in the drawing match the list. Sample data is made up.
- Hole ID and projectWhich hole the sample came from, in large text, and the project.
- Depth intervalThe from and to depths, as text.
- Linear barcodeThe sample number as Code 128, with the same text under the bars. Logging and receiving scan it.
- Sample type and trayWhat kind of sample it is and the tray it came from.
- 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
| Barcode | Why it is on the label | Edition |
|---|---|---|
| Code 128 | A 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 Matrix | A 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
| Field | Sample value | Where it goes |
|---|---|---|
| Hole ID and project | DH-0142, EX-01 | Large text, element 1. |
| Depth interval | 112.40 m to 113.40 m | Text, element 2. |
| Sample number | S-0087213 | The barcode, element 3, and the same characters as text under it. |
| Sample type | Core, half | Text, element 4. |
| QC role | Blank, standard or duplicate | Not 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.
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.
Keep reading
Asset tags ZPL linear barcodes: Code 128, Code 39, EAN, UPC ZPL 2D codes: QR Code, Data Matrix, PDF417 Barcodes: the symbology registry Templates and data Server-side label printing for .NET Laboratory specimen labels: what they carry and how they print Use cases Pricing: what each edition coversNew 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.