Short answer. WITS0 is the ASCII level of the Wellsite Information Transfer Specification. Each frame runs from && to !!, with one item per line written as RRIIvalue: a two-digit record, a two-digit item, then the value. It carries no units or timezone, so the receiver supplies them before rows become WITSML logs.
Many rig systems still pass live data on as WITS Level 0, a plain text stream that is easy to read and easy to misread. A wrong unit, a clock read in the wrong time zone or a date sent in the wrong order can turn a healthy feed into wrong data without a single error message. This article decodes one hypothetical frame, checks its units and time by hand, and follows it into WITSML.
What is WITS0?
WITS, the Wellsite Information Transfer Specification, defines how systems at a wellsite pass data to one another. It has several levels. Level 0 is the plain ASCII one: text lines that a person can read on a terminal. Level 1 sends the same records in a binary format, and the levels above it add two-way exchange between the two ends. A Level 0 receiver simply takes the lines as they arrive, over a serial line or a network socket.
Data is grouped into numbered records, and each record holds numbered items. The WITS Rev 1.1 pre-defined record map has 25 records and 1,026 items. Of those, 175 are header items (seven at the start of every record), 134 are spares, and 717 carry data. A record also has a trigger that says when it should be sent. Record 1 is sent at a time interval, record 2 at a depth interval, record 7 when new survey values arrive, and the mud report, record 20, when an operator starts it.
WITS0 is simple to produce and simple to check by eye, which helps explain why rig equipment still sends it. WITSML, the XML standard that followed, adds wells, wellbores, units and history to the same readings. WITSML explained covers that object model. This article stays with the WITS0 side and the step between the two.
One frame, line by line
A frame starts with a line holding && and ends with a line holding !!. Each line between them is RRIIvalue: two digits for the record, two for the item, and the rest of the line is the value. The frame below is from a hypothetical rig feed, with the metric unit agreement and a rig clock at UTC+04:00.
| Line | Mnemonic | Unit | Value | In the row |
|---|---|---|---|---|
0101EXAMPLE | WELLID | EXAMPLE | Header, not a curve | |
0105261127 | DATE | 261127 | Builds TIME | |
0106101500 | TIME | 101500 | Builds TIME | |
01081000.0 | DEPTBITM | m | 1000.0 | Curve |
01101000.0 | DEPTMEAS | m | 1000.0 | Curve |
011320.0 | ROPA | m/h | 20.0 | Curve |
0114100.0 | HKLA | kdaN | 100.0 | Curve |
01168.0 | WOBA | kdaN | 8.0 | Curve |
011812.0 | TORQA | kN.m | 12.0 | Curve |
0120120 | RPMA | rpm | 120 | Curve |
012115000 | SPPA | kPa | 15000 | Curve |
0122 | CHKP | kPa | (empty) | Left out |
01302500 | MFIA | L/min | 2500 | Curve |
There are no separators between record, item and value, so 01168.0 reads as record 01, item 16, value 8.0. The meaning comes from the record map. Item 14 is average hook load only because the map says so.
A network or serial read can stop anywhere. We cut this 145-byte frame (with its line endings) after 81 bytes, part-way through the hook load line. DrillIQ's rig agent, Rig Connect, returned no record from the first part and exactly one from the second, identical to the uncut frame. The result is one row with ten curves: nine measurements and a TIME curve built from items 05 and 06.
Which records a rig sends
A rig sends only the records and items its supplier has configured, so a feed is usually a small part of the map. Record 1 is the general time-based drilling record, with 45 items. Record 2 is the depth-based one. Record 7 carries surveys, record 15 cuttings and lithology, record 16 hydrocarbon shows, record 20 the mud report, record 21 the bit report, record 22 remarks and record 23 well identification. Suppliers may also add their own records above 25. The standard gives those no names, so the receiver has to be told what each item means.
- Data items
- Header items 01 to 07
- Spare items
Counted from the WITS Rev 1.1 pre-defined record map that Rig Connect ships (wits_rev11.json). The figure at the end of a bar is the total. Records 1 and 2 are written as logs only; the other seven are also read as WITSML objects or names. A rig sends only the records and items it is set to send.
Show the data
| Data items | Header items 01 to 07 | Spare items | |
|---|---|---|---|
| 1 Time-based drilling | 33 | 7 | 5 |
| 2 Depth-based drilling | 20 | 7 | 4 |
| 7 Survey | 14 | 7 | 5 |
| 15 Cuttings and lithology | 47 | 7 | 5 |
| 16 Hydrocarbon show | 34 | 7 | 5 |
| 20 Mud report | 53 | 7 | 5 |
| 21 Bit report | 33 | 7 | 9 |
| 22 Remarks | 3 | 7 | |
| 23 Well identification | 26 | 7 | 4 |
The report records are the large ones: 65 items for the mud report, 59 for cuttings and lithology. Remarks are the smallest, with ten items, three of which carry data. The seven header items identify the well, the sidetrack, the record, its sequence, the date, the time and the activity code. They describe the frame, so none of them becomes a measurement curve.
How are units and time set in a WITS0 feed?
A WITS0 line carries no unit. The two ends agree a unit system, metric or imperial, and sometimes exceptions item by item. The number on the wire looks the same either way.
| Item | Mnemonic | Metric | Imperial |
|---|---|---|---|
| 0108 | DEPTBITM, bit depth | m | ft |
| 0113 | ROPA, rate of penetration | m/h | ft/h |
| 0114 | HKLA, hook load | kdaN | klbf |
| 0116 | WOBA, weight on bit | kdaN | klbf |
| 0118 | TORQA, rotary torque | kN.m | klbf.ft |
| 0121 | SPPA, standpipe pressure | kPa | psi |
| 0130 | MFIA, mud flow in | L/min | gal/min |
| 0132 | MDIA, mud density in | kg/m³ | ppg |
The metric force unit catches people out. The standard's metric hook load and weight on bit are in kdaN, kilodecanewtons, each equal to 10 kN. A rig may report tonnes-force instead, which needs a per-item override, such as setting item 0114 to t in Rig Connect's source settings.
Time has the same gap. Item 05 is the date, YYMMDD in the standard, and item 06 the time, HHMMSS. Rig Connect also reads YYYYMMDD and HHMM. Neither says which time zone the rig clock keeps. The receiver has to be told, and Rig Connect takes an offset such as +04:00 or UTC+3 for each source. It doesn't accept named zones such as Asia/Dubai. It then writes the time as UTC.
If a frame carries no time that can be read, Rig Connect stamps the row with the moment it received the frame, flags the row and counts it in its status. That keeps the data, at a cost shown below.
A hand check
Check the clock and one force by hand before trusting a new feed. Both take a minute.
- The date. Line
0105261127is item 05 with value 261127: year 26, month 11, day 27, so 27 November 2026. - The time. Line
0106101500is 10:15:00 on the rig clock. - The offset. The clock keeps UTC+04:00, so subtract 4 hours: 10:15:00 − 04:00 = 06:15:00 UTC. The row's time is
2026-11-27T06:15:00.000Z, which is what the decoder produced. Had the rig clock been read as UTC, every row would be stamped 4 hours ahead of the truth. - The force units. 1 kdaN = 10,000 N. 1 klbf = 1,000 × 4.44822 N = 4,448.22 N. So 1 kdaN = 10,000 ÷ 4,448.22 = 2.2481 klbf.
- The hook load. The frame's 100.0 kdaN is 100.0 × 2.2481 = 224.8 klbf. Read as klbf, it shows as 100.0 klbf: 124.8 klbf low, or 55.5 % under the true value. DrillIQ's unit converter gives the same 224.8 klbf.
The mistake works both ways. An imperial rig's 100 klbf, filed as kdaN, converts to 224.8 klbf on screen when the true load is 100. Smaller errors are harder to see: 100 kdaN is 102.0 tonnes-force, so a tonnes feed read as kdaN looks believable and is out by about 2 %. Compare one reading with the driller's display, in the driller's units, to catch both.
How do you convert WITS0 to WITSML?
Conversion has two parts. Every record becomes rows of a WITSML log. Some records are also events or reports, and WITSML has an object for those.
Time and depth rows
Rig Connect turns each frame into one row: a record number, a log name, an index (time or depth), curves and units. Rows of the same record go into one growing WITSML 1.4.1.1 log. The write for the frame above looks like this.
| Part | Content |
|---|---|
| Log name and uid | General Time-Based, wits0-rec01-time |
| indexType, indexCurve | date time, TIME |
| mnemonicList | TIME, |
| unitList | s, |
| data | 2026-11-27T06:15:00.000Z, |
The log keeps each value as the rig wrote it, and names its unit in the unit list. Record 2, and record 13 on returns depth, are depth logs indexed by their depth item, and their rows carry no date or time curve. A record 2 frame without its depth gives no row and is counted as skipped. The other records are time logs, including records 8, 9 and 14, which the standard allows by time or depth. A source can switch any of them to a depth log.
Reports and events as objects
| Record | WITSML object | Each frame |
|---|---|---|
| 7, survey | trajectory | Adds a trajectory station, keyed by survey depth |
| 15, cuttings | mudLog | Adds a geology interval |
| 16, show | the same mudLog | Adds a show interval |
| 20, mud report | fluidsReport | One report, keyed by report number |
| 21, bit report | bhaRun | One bit run, keyed by bit number |
| 22, remarks | message | One message per remark |
| 23, well identification | none | Supplies the well name, unless one is configured |
A hypothetical survey frame with depth 1000.0 m, vertical depth 995.0 m, tool type MWD, inclination 10.00°, corrected azimuth 45.00° and dogleg severity 1.50°/30 m becomes the station st-1000.00. Its elements are md, tvd, incl, azi and dls with their units, the station time in UTC and a station type of magnetic MWD. The same frame sent twice builds the same identifier, so the store replaces the station instead of adding a second. A frame without the survey depth, item 0708, builds no station. Its log row is still written, and the status records why.
Units mostly pass through. In objects, a few are respelled for WITSML, and kdaN is sent as kN: a bit report with an average weight on bit of 8.0 kdaN is written as 80 kN in the bit run, while its log row keeps 8.0 kdaN. How a reader then follows these logs is covered in WITSML explained, and the newer transport in WITSML 1.4.1 against 2.0 and ETP.
What goes wrong on real feeds
These are the faults to look for when a feed is connected and the numbers still look wrong. The behaviour in the table is that of Rig Connect and DrillIQ's store. We checked the decoding cases and the shared timestamp by running the code on made-up frames.
| Fault | What happens |
|---|---|
| Split frame | A frame split across two reads is held until the closing !! arrives, then decoded once. |
Lost !! | A frame that lost its end marker is dropped when the next frame is complete; its items don't leak into that frame. |
| Empty item | No curve value for that row. |
| No-value marker | −999.25, −9999 and −8888 are left out of WITSML objects but kept as sent in log rows, so the receiving system must treat them as empty. |
| Odd time format | A time written 101500.00, or 81500 without its leading zero, is not read; the row takes the receipt time. |
| Day-first date | 271126 is read as year first, so 26 November 2027, with no error. |
| Same second | Two frames stamped in the same second share one index; DrillIQ's store keeps one row, and later non-empty values win. |
| Clock drift | Used as sent; Rig Connect doesn't correct it. |
| Wrong units | The wrong unit agreement gives plausible-looking numbers with the wrong labels. |
Why the rig's own time matters
Take a feed of one record 1 frame a second. Suppose something between the rig system and the agent, such as a serial converter or a network hop, holds the frames from second 60 and delivers them all from second 120, 10 ms apart. We ran 181 such frames through the decoder twice, with and without items 05 and 06, then wrote both logs into DrillIQ's WITSML store.
- Stamped on receipt
- With items 05/06
- Stall
Simulation of a hypothetical feed through Rig Connect's decoder: one record 1 frame a second for 180 s; frames from 60 s are held and delivered from 120 s, 10 ms apart. Seconds are counted from the first frame.
Show the data
| Sent at | With items 05/06 | Stamped on receipt |
|---|---|---|
| 0.0 | 0 | 0 |
| 3.0 | 3 | 3 |
| 6.0 | 6 | 6 |
| 9.0 | 9 | 9 |
| 12.0 | 12 | 12 |
| 15.0 | 15 | 15 |
| 18.0 | 18 | 18 |
| 21.0 | 21 | 21 |
| 24.0 | 24 | 24 |
| 27.0 | 27 | 27 |
| 30.0 | 30 | 30 |
| 33.0 | 33 | 33 |
| 36.0 | 36 | 36 |
| 39.0 | 39 | 39 |
| 42.0 | 42 | 42 |
| 45.0 | 45 | 45 |
| 48.0 | 48 | 48 |
| 51.0 | 51 | 51 |
| 54.0 | 54 | 54 |
| 57.0 | 57 | 57 |
| 60.0 | 60 | 120 |
| 63.0 | 63 | 120 |
| 66.0 | 66 | 120 |
| 69.0 | 69 | 120 |
| 72.0 | 72 | 120 |
| 75.0 | 75 | 120 |
| 78.0 | 78 | 120 |
| 81.0 | 81 | 120 |
| 84.0 | 84 | 120 |
| 87.0 | 87 | 120 |
| 90.0 | 90 | 120 |
| 93.0 | 93 | 120 |
| 96.0 | 96 | 120 |
| 99.0 | 99 | 120 |
| 102 | 102 | 120 |
| 105 | 105 | 120 |
| 108 | 108 | 120 |
| 111 | 111 | 120 |
| 114 | 114 | 120 |
| 117 | 117 | 120 |
| 120 | 120 | 120 |
| 123 | 123 | 123 |
| 126 | 126 | 126 |
| 129 | 129 | 129 |
| 132 | 132 | 132 |
| 135 | 135 | 135 |
| 138 | 138 | 138 |
| 141 | 141 | 141 |
| 144 | 144 | 144 |
| 147 | 147 | 147 |
| 150 | 150 | 150 |
| 153 | 153 | 153 |
| 156 | 156 | 156 |
| 159 | 159 | 159 |
| 162 | 162 | 162 |
| 165 | 165 | 165 |
| 168 | 168 | 168 |
| 171 | 171 | 171 |
| 174 | 174 | 174 |
| 177 | 177 | 177 |
| 180 | 180 | 180 |
With the rig's date and time, all 181 rows keep their own second and the store holds 181 rows. Stamped on receipt, 61 frames land in second 120. They give 121 distinct times, and the store holds 121 rows: 60 readings are overwritten, and the surviving row at that second has the last frame's values. The record then has a minute with no rows, although the rig was working normally. A missing minute followed by a pile-up at one time is a reason to check where the times come from.
The stall that matters is the one ahead of the agent. Rig Connect stamps a row when the frame reaches it, before buffering, so a later outage between the rig and the office doesn't change any time. On-premises deployment and drilling data sovereignty works through that outage and its catch-up.
A checklist for the rig team
- Agree the unit system in writing, with every item that departs from it, such as hook load in tonnes-force.
- Set the rig clock's offset on the receiver, and keep that clock synchronised.
- Confirm that items 05 and 06 arrive in every time-indexed record, as YYMMDD and HHMMSS with leading zeros.
- Compare one value each of depth, hook load and standpipe pressure with the driller's display.
- Ask the supplier what it sends when a sensor has no value.
- Review skipped frames, rows without rig time and unmapped records in the first hour.
- Send one survey and one report frame, and check that they arrive as objects.
- Keep a copy of the raw stream from the source during commissioning, so a doubtful value can be traced to the wire.
How DrillIQ handles it
Rig Connect runs as a Windows service on a rig PC. It reads WITS0 over TCP (listening or connecting), UDP or a serial line, and maps record and item numbers to curves with the WITS Rev 1.1 dictionary, using a unit system and clock offset set for each source, plus overrides for single items. Its settings page shows a live value beside each item and lists items the standard doesn't define. It writes a WITSML 1.4.1.1 log for each record and the objects in the table above, buffers them on disk through link outages, and sends them only to the DrillIQ WITSML store it is enrolled with.
In DrillIQ, a well that an enrolled agent writes to is set up and followed by itself. Its data is stored raw until an engineer approves the channel mapping, and the engineering modules use it from then on.
Book a demo See all capabilities
Frequently asked questions
What does a WITS0 line mean?
The first two digits are the record number, the next two the item number, and the rest of the line is the value. The WITS record map says what that record and item measure, so 0114 is average hook load in record 1.
Which units does WITS0 use?
The line carries none. Sender and receiver agree on a metric or imperial set, with exceptions item by item. The standard's metric hook load and weight on bit are in kdaN, where 100 kdaN equals 224.8 klbf.
Does WITS0 include a time zone?
No. Items 05 and 06 give a date and a time from the rig clock, with no offset. The receiver must be told the clock's offset, for example +04:00, before it can write the time as UTC.
How does a WITS0 record become WITSML?
Each record becomes rows in a time-indexed or depth-indexed WITSML log. Rig Connect also writes survey, lithology, show, mud, bit and remark records as objects such as trajectory, mudLog, fluidsReport, bhaRun and message.
References
- Jantzen, R.E., Foreman, R.D., Keltner, L. and McCoy, R. Wellsite Information Transfer Specification (WITS) for Digital Rig-Site Data. SPE Drilling Engineering 4 (4): 291–299, 1989. SPE 16141.
- Energistics. WITSML Data Schema, version 1.4.1.1.
- Energistics. WITSML Store Application Program Interface (API), version 1.4.1.