An Introduction To WITS
An Introduction To WITS
What is WITS?
I get quite a few emails from people asking simple questions about WITS, so I
thought it was time to write a simple introduction. WITS stands for “Wellsite
Information Transfer Specification” and it’s a specification, however loose it may be,
that allows for data transmission between Oil and Gas digital systems. Even though
this specification has been succeeded, a lot of rigs and other oilfield equipment still
use it. I personally enjoy it for it’s simplicity.
Don’t be afraid.
If you get ahold of the WITS specification you might be a little scared at the
complexity and all of the “levels” it mentions. So far we’ve interfaced to a dozen
different WITS systems and everyone employs some form of WITS, which is the first
level. This means the majority of the spec sometimes goes unused. At it’s simplest
WITS defines very straightforward data packets that are exchanged over serial.
Everyone does things a little different, but not different enough to worry about, and
your code will work with most vendors if you do it right.
WITS Transmission.
WITS over serial works by exchanging packets over a full-duplex serial bus. So far,
we’ve experienced two methods of transfer between systems, synchronous and
asynchronous. In the synchronous method, one system will request transmission of
a packet from another system by sending a “dummy” packet. For example, some
EDR systems require a dummy packet, or a data packet, to be received before they’ll
transmit back a packet. Sometimes a system will accept an empty dummy packet,
other times it’s best to transmit some data in the dummy packet. For your dummy
packet choose a null value or something non-volatile like the vendor string. (Rec: 19
Item: 84) With the asynchronous method both systems will exchange data (usually at
some specified interval) without any sort of request, basically just streaming. 1
packet per second is a typical rate for most systems using the time-trigger method.
With the asynchronous method it is not necessary for both systems to exchange
data, one may simply transmit to the other continuously while the other receives.
The first line “&&” state that a packet is beginning. The following lines (zero or more)
contain data. A data line has a simple structure, it starts of with two characters that
represent the record number or the item. The next two characters represent the item
number in the record. Together the record identifier and item identifier precisely
identify a data type. The specification lists that only certain data types of certain
lengths can be transferred. This is pretty much ignored; be prepared for anything of
any length in this section. The last line “!!” ends the packet.
Delimiters.
The most common delimiter is “\r\n”, you’ll sometimes find other delimiters “\n” or
others used.
Null Values.
A lot of companies like to use null values to represent a data item that isn’t present.
A typical null value is -9999.9 or -9999.0. When you see a value like this you’re
supposed to ignore it. It is not the current reading for that item. Make sure you talk to
the vendor you’ll be interfacing with and understand what they consider to be null
values or you might end up displaying some odd values.