Sunteți pe pagina 1din 317

FIELD TRAINING MANUAL

For

QNX Operating System, Version 2.21


&
QLOG Data Acquisition System, Version 4.40

Version 4.0
January 2001

Corporate Mission
To be a worldwide leader in providing drilling and geological monitoring solutions to the oil and gas
industry, by utilizing innovative technologies and delivering exceptional customer service.
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

CONTENTS

1. DRILLING RIG SENSORS ............................................................................................ 8


1.1 INTRODUCTION .......................................................................................................................................... 9
1.1.1 Sensors and Signals .................................................................................................................................. 9
1.1.2 Junction boxes, DAU’s and Elcon Barriers ............................................................................................ 10
1.2 DIGITAL SENSORS ..................................................................................................................................... 15
1.2.1 Crown Depth Sensor ............................................................................................................................... 15
1.2.2 Depth Wheel............................................................................................................................................ 19
1.2.3 Draw works Depth Sensor (DDS) ........................................................................................................... 20
1.2.4 Offshore Depth Compensation................................................................................................................ 23
1.2.5 Proximity Sensor ..................................................................................................................................... 27
1.3 ANALOGUE SENSORS ...................................................................................................................................... 28
1.3.1 Ultrasonic Pit Level ................................................................................................................................ 28
1.3.2 DeLaval (Float) Pit Level ....................................................................................................................... 31
1.3.3 Mud Density ............................................................................................................................................ 32
1.3.4 Mud Temperature.................................................................................................................................... 33
1.3.5 Mud pH ................................................................................................................................................... 33
1.3.5 Mud pH ................................................................................................................................................... 34
1.3.6 Mud Conductivity.................................................................................................................................... 36
1.3.7 Pump (Standpipe) or Annular (Casing) Pressure ................................................................................... 38
1.3.8 Hookload – Pressure Transducer and Load Cell.................................................................................... 41
1.3.9 Hookload Line Tension Gauge (MDTotco)............................................................................................. 42
1.3.10 Hydraulic Torque.................................................................................................................................. 43
1.3.11 Electric Torque ..................................................................................................................................... 43
1.3.12 Potentiometer Mud Flow Paddle .......................................................................................................... 44
1.3.13 Ambient H2S Sensors ............................................................................................................................ 45
1.3.14 General Monitors S4100T In Line H2S Sensor..................................................................................... 46
1.3.15 Ambient Combustible Sensor ................................................................................................................ 47

2. QLOG MUD LOGGING SYSTEM....................................................................... 48


2.1 INTRODUCTION TO THE QLOG SYSTEM.............................................................................................. 49
2.2 QLOG ADMINISTRATORS ........................................................................................................................ 52
2.3 INTRODUCTION TO THE QLOG MENU.................................................................................................. 54
2.4 SYSTEM CONFIGURATION – USE OF THE SETUP MENU ....................................................... 58
2.4.1 Configuring Channel Numbers ............................................................................................................... 58
2.4.2 Unit Selection For Each Parameter........................................................................................................ 61
2.4.3 Decimal Place Selection ......................................................................................................................... 62
2.4.4 Calibration of Sensors ............................................................................................................................ 63
2.4.5 Creating Text Display Screens................................................................................................................ 65
2.4.6 Configuring the Printers ......................................................................................................................... 66
2.4.7 Digital Signal Switching ......................................................................................................................... 68
2.4.8 Simulator programs ................................................................................................................................ 69
2.4.9 Analog Signal Override or Simulation.................................................................................................... 70
2.4.10 Defining the Mud Pit Configuration ..................................................................................................... 71
2.5 QLOG OPERATION – THE REALTIME MENU....................................................................................... 73
2.5.1 Displaying the Information ..................................................................................................................... 73

1
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.2 Setting User and General Alarms ........................................................................................................... 74


2.5.3 Depth and Compensator Adjustments..................................................................................................... 76
2.5.4 Use of the Equipment Table .................................................................................................................... 77
2.5.5 Hole and Pipe Data ................................................................................................................................ 82
2.5.6 Ream Mode ............................................................................................................................................. 85
2.5.7 Rig and Riser Booster Pump Data ........................................................................................................... 86
2.5.8 Zeroing and Re-Setting Parameters........................................................................................................ 87
2.5.9 Recognizing In or Out of Slips ................................................................................................................ 88
2.5.10 Monitoring Incoming Signals................................................................................................................ 89
2.5.11 Trip Mode.............................................................................................................................................. 90
2.5.12 Chromatograph..................................................................................................................................... 91
2.6 DATABASE MENU..................................................................................................................................... 92
2.6.1 Depth and Time Databases ..................................................................................................................... 92
2.6.2 Database Cell References ....................................................................................................................... 94
2.6.3 Lithology Editor (lithed) ......................................................................................................................... 96
2.6.4 Accessory Symbols .................................................................................................................................. 96
2.6.5 Bit Database............................................................................................................................................ 97
2.6.6 Survey Data............................................................................................................................................. 99
2.6.7 Well Data .............................................................................................................................................. 100
2.7 REPORT MENU ........................................................................................................................................ 101
2.7.1 X-Y-Z Plots............................................................................................................................................ 101
2.7.2 Plot Configuration ................................................................................................................................ 101
2.7.3 Plotter Setup.......................................................................................................................................... 104
2.7.4 Starting and Stopping Plots .................................................................................................................. 107
2.7.5 Defining User Ratios............................................................................................................................. 107
2.8 ENGINEERING MENU............................................................................................................................ 108
2.8.1 Drill String Design................................................................................................................................ 108
2.8.2 Hydraulic Optimization......................................................................................................................... 109
2.8.3 Drilling Optimization ............................................................................................................................ 109
2.8.4 Pump Output ......................................................................................................................................... 110
2.8.5 Kick/Kill ................................................................................................................................................ 110
2.8.6 Stuck Pipe ............................................................................................................................................. 112
2.8.7 Directional Analysis.............................................................................................................................. 112
2.8.8 Casing Design ....................................................................................................................................... 112
2.8.9 Maximum ROP...................................................................................................................................... 112
2.8.10 Leak Off Test ....................................................................................................................................... 113
2.8.11 Surge Swab ......................................................................................................................................... 113
2.8.12 Pressure Test....................................................................................................................................... 114
2.8.13 Rheogram............................................................................................................................................ 114
2.9 GEOLOGY MENU..................................................................................................................................... 115
2.9.1 Ratio Analysis ....................................................................................................................................... 115
2.9.2 Coal Bed Methane................................................................................................................................. 116
2.9.3 Overburden Program............................................................................................................................ 117
2.9.4 Overpressure Program.......................................................................................................................... 118
2.9.5 Calcimeter............................................................................................................................................. 121
2.10 OTHER MENU ........................................................................................................................................ 124
2.10.1 Communications ................................................................................................................................. 124
2.10.2 Spreadsheet ......................................................................................................................................... 125
2.10.3 Word Processor................................................................................................................................... 125
2.10.4 Utilities................................................................................................................................................ 126
2.10.5 Unit Converter .................................................................................................................................... 127
2.10.6 Help Files............................................................................................................................................ 127
2.10.7 Editor .................................................................................................................................................. 127

2
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3. MISCELLANEOUS APPLICATIONS ........................................................... 130


3.1 WINDOWS.................................................................................................................................................. 131
3.1.1 To start windows ................................................................................................................................... 131
3.1.2 Windows Applications........................................................................................................................... 132
3.1.3 Menus.................................................................................................................................................... 132
3.1.4 Window Operation ................................................................................................................................ 133
3.1.5 Icons...................................................................................................................................................... 134
3.1.6 Programs menu ..................................................................................................................................... 134
3.1.7 Using the File Manager ........................................................................................................................ 134
3.1.8 Exiting Windows ................................................................................................................................... 135
3.2 PLOTTERS AND PRINTERS ...................................................................................................................... 136
3.2.1 Epson 1500/1520 .................................................................................................................................. 136
3.2.2 Printing GNUplots or chromatograms ................................................................................................. 137
3.2.3 Model HP680c Plotters......................................................................................................................... 139
3.2.4 Standard Log Comments....................................................................................................................... 140
3.3 WELLWIZARD – QLOG INTERFACE ..................................................................................................... 142
3.3.1 Administrators....................................................................................................................................... 142
3.3.2 Serial Port Settings ............................................................................................................................... 142
3.3.3 Font Settings ........................................................................................................................................ 142
3.3.4 Text Wrap Around................................................................................................................................. 145
3.4 CREATING PCX/PDF FILES..................................................................................................................... 146
3.4.1 Embedding Pictures And Creating Links With Adobe Acrobat............................................................. 147
3.5 STICK SLIP SOFTWARE ...........................................................................................................................148

4. CHROMATOGRAPH ........................................................................................................... 150


4.1 INTRODUCTION ....................................................................................................................................... 151
4.2 HARDWARE SET UP ................................................................................................................................ 152
4.2.1 Helium Supply....................................................................................................................................... 152
4.2.2 Magnesium Perchlorate Filter.............................................................................................................. 152
4.3 SOFTWARE INTERFACE ......................................................................................................................... 154
4.3.1 M200 Setup ........................................................................................................................................... 155
4.3.2 Control Keys ......................................................................................................................................... 156
4.3.3 Method Parameters............................................................................................................................... 157
4.3.4 Configuration Settings .......................................................................................................................... 158
4.4 M200 VERSIONS........................................................................................................................................ 161
4.4.1 Use of the front control panel ............................................................................................................... 161
4.5 CHROMPACK MICRO-GC ....................................................................................................................... 164
4.6 QLOG OPERATIONAL SOFTWARE ....................................................................................................... 165
4.6.1 Calibration Procedure .......................................................................................................................... 165
4.6.2 The Tweak Option ................................................................................................................................. 167
4.7 MOISTURE - C3 PROBLEM ..................................................................................................................... 168
4.8 COLUMN SATURATION .......................................................................................................................... 171
4.9 USING TWO CHROMATOGRAPHS ........................................................................................................ 172
4.10 PRINTING CHROMATOGRAM FILES .............................................................................................................. 174
4.11 TROUBLE SHOOTING ...................................................................................................................................175

3
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5. BASIC QNX COMMANDS ............................................................................................. 177


5.1 THE QNX OPERATING SYSTEM............................................................................................................ 178
5.2 MULTI-TASKING ...................................................................................................................................... 179
5.3 MULTI-USER ............................................................................................................................................. 180
5.4 REAL-TIME OPERATION......................................................................................................................... 181
5.5 NETWORKING AND DISTRIBUTED PROCESSING............................................................................. 182
5.6 FIRST STEPS .............................................................................................................................................. 183
5.6.1 Logging In............................................................................................................................................. 183
5.6.2 User Permissions .................................................................................................................................. 183
5.7 BASIC QNX OPERATIONS....................................................................................................................... 184
5.7.1 The Command Line ............................................................................................................................... 184
5.7.2 The Directory Structure ........................................................................................................................ 185
5.7.3 Changing Directory .............................................................................................................................. 185
5.7.4 Devices.................................................................................................................................................. 188
5.7.5 Copying Files ........................................................................................................................................ 189
5.7.6 Moving, Deleting and Renaming Files.................................................................................................. 190
5.7.7 Listing Files .......................................................................................................................................... 191
5.7.8 Using the ‘more’ command................................................................................................................... 192
5.7.9 Redirecting Input and Output. .............................................................................................................. 193
5.7.10 Creating and Deleting Directories...................................................................................................... 194
5.7.11 Printing Files. ..................................................................................................................................... 194
5.8 MORE ABOUT TASKS.............................................................................................................................. 195
5.8.1 Administrator Tasks .............................................................................................................................. 195
5.9 STOPPING PROGRAMS............................................................................................................................ 196
5.10 USING FLOPPY DISKS ............................................................................................................................197

6. QLOG AND QNX APPLICATIONS ..................................................................... 198


6.1 DIRECTORY STRUCTURE....................................................................................................................... 199
6.2 CONFIGURING A SYSTEM...................................................................................................................... 201
6.2.1 Basic use of sys.init files........................................................................................................................ 201
6.2.2 Creating New User Accounts ................................................................................................................ 202
6.2.3 User Directories.................................................................................................................................... 203
6.3 LOCATING TEXT AND FILES................................................................................................................. 205
6.4 TIME............................................................................................................................................................ 206
6.4.1 Setting the correct time zone ................................................................................................................. 206
6.4.2 Time Zone Examples ............................................................................................................................. 208
6.4.3 Minor changes to the time..................................................................................................................... 210
6.5 FILE PROPERTIES.................................................................................................................................... 211
6.5.1 Attributes and Permissions ................................................................................................................... 211
6.5.2 Changing Attributes .............................................................................................................................. 213
6.5.3 File Extents ........................................................................................................................................... 214
6.6 PROGRAM OPERATIONS ....................................................................................................................... 215
6.6.1 Scheduling tasks with cron.................................................................................................................... 215
6.6.2 Ditto - working on other network stations ............................................................................................ 215
6.6.3 Accessing MSDOS formatted disks ....................................................................................................... 216
6.6.4 Additional Commands and Command Options..................................................................................... 217
6.7 ARCHIVES AND FILE COMPRESSION .................................................................................................. 218
6.7.1 Using ZOO ............................................................................................................................................ 218
6.7.2 Using fbackup - large files to disk......................................................................................................... 219
6.7.3 Archiving with ZIP ................................................................................................................................ 221
6.8 CHECKING THE FILE SYSTEM .............................................................................................................. 222

4
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.8.1 FOPEN and DCHECK.......................................................................................................................... 222


6.8.2 CHKFSYS and ZAP............................................................................................................................... 222
6.8.3 Recovering Deleted Files ...................................................................................................................... 223
6.9 GNU (X-Y-Z) PLOTS ..................................................................................................................................... 224
6.10 CREATING RISTRICTED QLOG MENUS............................................................................................. 225
6.11 CHANGING DEFAULT PARAMETER NAMES.................................................................................... 227
6.12 SYSTEM INITIALIZATION FILES – ADVANCED USE .......................................................................230

7. DATABASE APPLICATIONS .................................................................................... 233


7.1 REMOVING DEPTH DATABASE RECORDS ......................................................................................... 234
7.2 DATABASE BACKUPS ............................................................................................................................. 237
7.2.1 Time Database ...................................................................................................................................... 237
7.2.2 Depth Database .................................................................................................................................... 237
7.3 VIEWING ALTERNATE DATABASES ................................................................................................... 239
7.4 COMBINING DATABASES ...................................................................................................................... 240
7.4.1 Joining a Sidetrack to a Pilot Hole....................................................................................................... 240
7.4.2 Starting a new database from a previously corrupted one ................................................................... 241
7.5 EXPORTING DATA................................................................................................................................... 242
7.5.1 Using export.......................................................................................................................................... 242
7.5.2 Export from Time Database .................................................................................................................. 243
7.5.3 Using LAS ............................................................................................................................................. 244
7.5.4 Creating Batch Files for LAS Data ....................................................................................................... 245
7.6 IMPORTING DATA ....................................................................................................................................246

8. COMMUNICATION APPLICATIONS............................................................. 248


8.1 NETWORK CONFIGURATION ................................................................................................................ 249
8.1.1 Connecting Machines............................................................................................................................ 249
8.1.2 Configuring the Network Card.............................................................................................................. 249
8.2 NETWORK COMMANDS ......................................................................................................................... 252
8.3 TERMINAL TYPES.................................................................................................................................... 254
8.4 MODEM AND PORT CONFIGURATION ................................................................................................ 255
8.4.1 External Modem Settings ...................................................................................................................... 255
8.4.2 Serial Port Settings ............................................................................................................................... 255
8.4.3 Comm – 2 Way Communication............................................................................................................ 257
8.5 QTERM ....................................................................................................................................................... 258
8.5.1 Directory Configuration ....................................................................................................................... 258
8.5.2 Call Out................................................................................................................................................. 259
8.6 QCP – FILE TRANSFER ............................................................................................................................ 260
8.6.1 Send File from Local to Remote............................................................................................................ 260
8.6.2 Sending files to different directories ..................................................................................................... 261
8.6.3 Sending Multiple Files .......................................................................................................................... 261
8.6.4 Updating Files ...................................................................................................................................... 262
8.6.5 To Download File From Remote System............................................................................................... 263
8.6.6 Relaxed Timing Option ......................................................................................................................... 263
8.6.7 Notes on File Transmission................................................................................................................... 263
8.7 TRANSMITTING THE QLOG DATABASE .................................................................................................. 264
8.7.1 Possible problems with database transfers ........................................................................................... 266
8.8 OTHER FILE TRANSMISSION PROTOCOLS ...................................................................................................... 267
8.8.1 Sealink................................................................................................................................................... 267

5
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.8.2 QT ......................................................................................................................................................... 267


8.8.3 Logging Off ........................................................................................................................................... 268
8.9 USE OF HYPER TERMINAL VIA SERIAL LINK ................................................................................................... 269
8.9.1 Cable Setup ........................................................................................................................................... 269
8.9.2 QNX2 Setup........................................................................................................................................... 269
8.9.3 Windows Setup ...................................................................................................................................... 270
8.9.4 Sending files from QNX to Windows 95/98 ........................................................................................... 271
8.10 COMMUNICATING WITH WELLWIZARD ....................................................................................................... 272
8.10.1 Serial Setup ......................................................................................................................................... 272
8.10.2 Interface Setup .................................................................................................................................... 272
8.10.3 Basic QNX4 Commands...................................................................................................................... 273
8.11 THIRD PARTY COMMUNICATION WITH WITS .......................................................................................... 274
8.11.1 System Setup........................................................................................................................................ 274
8.11.2 Configuration of wits.cfg file............................................................................................................... 275

9. TROUBLESHOOTING ....................................................................................................... 278


9.1 GENERAL SOFTWARE FAILURE ........................................................................................................... 279
9.1.1 House Cleaning..................................................................................................................................... 279
9.1.2 Database administrator ........................................................................................................................ 280
9.1.3 Programs hanging up ........................................................................................................................... 280
9.1.5 Unable to access certain files ............................................................................................................... 281
9.1.6 Procedure in the event of uncontrolled shutdowns ............................................................................... 282
9.1.7 Identifying causes of system crashes..................................................................................................... 282
9.1.8 System hang up on reboot ..................................................................................................................... 283
9.1.9 Hard drive failure ................................................................................................................................. 283
9.1.10 Checking Network Communication..................................................................................................... 284
9.2 GENERAL “USER ERRORS” OF SOFTWARE........................................................................................ 285
9.3 HARDWARE FAULTS............................................................................................................................... 288
9.3.1 System SetUp......................................................................................................................................... 288
9.3.2 Faults during normal operations .......................................................................................................... 289
9.4 DEPTH RELATED PROBLEMS (CROWN SHEAVE SENSOR)...................................................................... 292
9.5 CHROMATOGRAPH ..................................................................................................................................294

10. DATA UNIT PROCEDURES..................................................................................... 296


10.1 EXTERNAL RIG UP................................................................................................................................. 297
10.2 INTERNAL RIG UP.................................................................................................................................. 298
10.3 CHANNEL CONFIGURATIONS AND CALIBRATIONS ..................................................................... 299
10.4 COMPLETING THE SYSTEM SETUP ................................................................................................... 300
10.4.1 Completing the Equipment Setup ........................................................................................................ 300
10.5 SETUP AND CALIBRATION OF GAS SYSTEM .................................................................................. 301
10.6 PREPARING THE SYSTEM .................................................................................................................... 302
10.7 PREPARING THE REALTIME SYSTEM ............................................................................................... 304
10.8 DAILY OR FREQUENT PROCEDURES WHILE DRILLING............................................................... 306
10.8.1 The Realtime QLOG System................................................................................................................ 306
10.8.2 Logging ............................................................................................................................................... 307
10.8.3 Equipment ........................................................................................................................................... 308
10.9 REPORTING REQUIREMENTS ............................................................................................................. 309
10.9.1 Quality Control ................................................................................................................................... 309
10.9.2 Health, Safety and Environment ......................................................................................................... 309

6
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.9.3 Morning and Final Well Reports ........................................................................................................ 310


10.10 BACKING UP DATA ............................................................................................................................. 312
10.10.1 Time Database Backup ..................................................................................................................... 312
10.10.2 Daily Depth Database Backup.......................................................................................................... 313
10.10.3 Depth Database Backup for Remote Transmission........................................................................... 313
10.10.4 Complete Final Well Backup ............................................................................................................ 314

7
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1. DRILLING RIG SENSORS

8
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.1 INTRODUCTION

1.1.1 Sensors and Signals

Datalog use, essentially, two types of sensor:

1. Analog sensors that provide a 4 to 20mA, current loop, output.

4mA represents zero output from the sensor, whereas 20mA signifies a full scale output. If the reading
from a properly calibrated sensor should exceed 20mA, it is likely that there is a short in the circuit.
Should a sensor fail, but the electrical loop still be intact, a reading of 4mA will be registered. However,
once the loop has been broken, by a poor connection or cut wire, for example, then the reading will drop
to 0mA.

A current loop arrangement is used for a number of reasons:

• It has a high tolerance, or immunity, to electrical noise.


• It provides easy 2 wire circuits, a power side and a signal return side.
• It has good immunity to ground loops and ground induced noise.

Sensors operate from a 24V power supply that is situated in the DAU (data acquisition unit). The hook
up of the sensors is very straightforward with standard cables used and wiring instructions detailed with
the sensors.

The standard two wire sensors include a red wire, that carries the power (+24v, signified by “+” symbol),
and a white, signal return wire (signified by a “-“ symbol).

Standard 2 wire, 4 – 20mA current loop sensors include the following:

DeLaval float sensor for pit level (non-intrinsic)


Ultrasonic pit level indicator
Mud density
Mud temperature (non-intrinsic)
Mud pH
Mud conductivity
Pressure transducers including standpipe pressure, shut in annular pressure, hydraulic
torque and load cell hookload.
Mud flow paddle (non-intrinsic)
Ambient H2S sensors

Other sensors require 3 wires, where a black ground wire needs to be connected. These include:

DeLaval float sensor for pit level (intrinsic)


Mud temperature (intrinsic) – resistance signal converted to 4-20mA
Electric torque clamp – voltage signal converted to 4-20mA
Mud flow paddle (intrinsic) – voltage signal converted to 4-20mA
Ambient combustible gas sensors

9
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2. Digital sensors that provide a voltage output (4-20mA in the case of a non intrinsic system) and
register either an ‘on or off’ state.

A proximity type digital sensor goes to a high signal state when activated by it’s proximity to a metallic
object.

Such digital, or proximity, sensors provide INTERRUPT signals for the following:

Rotary table speed (RPM) - 2 wire, red and white

Pump stroke speed (SPM) - 2 wire, red and white

Depth wheel - 3 wire, including a black ground

Crown Depth - 4 wire, since it uses two proximity sensors

Typically, digital sensors also require a shield wire to be connected. This is a bare wire that helps prevent
stray electrical signals causing a digital pulse to be recorded by the sensor. It should be noted that it does
no harm to connect the shield wire on any sensor that has the necessary terminals.

The QLOG system also distinguishes a number of BINARY digital parameters:

On-Off Bottom
Direction of block movement, up or down
Gas sample pump alarm condition

1.1.2 Junction boxes, DAU’s and Elcon Barriers

These variations, together with variations due to whether an intrinsic (which utilizes Elcon safety barriers
to prevent power surges from passing through from the external sensor to the computer) or non-intrinsic
DAU (Data Acquisition Unit) is used, will be illustrated with each sensor.

The sensors are connected directly to terminals in the main junction boxes. One or two junction boxes
are required for the majority of wellsite requirements. The standard junction box contains terminals for
14 channels; each terminal is clearly numbered and configured as shown below.

The terminals in a junction box for a non-intrinsic system are slightly different, in that for each channel,
there are terminals for +v, signal and shield. Only every third channel contains a ground terminal.

Each terminal is then connected to one multi-core cable (the junction boxes are pre-wired for this) which
carries the signals from each sensor back to DAU or Elcon barrier.

10
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Junction box terminal connection for an Intrinsic System:

RED
+

WHITE
2
SENSOR Multi-Core DAU
BLACK
--
SHIELD
sh

Each terminal number from the junction box correlates to a specific card slot or barrier number on the
DAU. This, is turn, correlates to a specific channel number on the CPU (see sensor configuration in
Chapter 2).

The channel configuration can be determined from standard configuration sheets that will normally be
provided with the junction boxes, and relating to the system that would have been configured and tested
by technicians before being dispatched to the wellsite.

However, the mudlogger needs to be fully familiar with the procedure because they will often be
referring to it at wellsite when rigging up the system, when installing any extra sensors requested and
when troubleshooting any lost signals, for example.

The purpose of the configuration sheet is to be able to assign the correct channel number to each sensor,
so that the computer will receive the correct signals from each individual sensor. This number will relate
to a particular channel number on the DAU or ELCON board, which, in turn, will relate to a particular
channel number in the junction box/boxes that the sensors are connected to.

The numbers at each 3 ‘stages’ are not the same, but the correlation is always the same, i.e. there is a
standard configuration, that will be recorded on the configuration sheet. This will either be already
completed by a technician prior to rig up, or can be completed by the engineer as each sensor is
connected to a junction box terminal. With the channel number in the junction box then known, the
engineer simply needs to track along the line to determine the correct channel number to assign to the
computer.

For a full data unit, there are 2 standard configurations that may be used. Any variations on this will be
fully detailed by a technician before a system leaves the workshop.

11
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The 2 standards apply to the following different DAU types:

1. An Elcon barrier system, where intrinsically safe barriers are in place.

2. A standard, non-intrinsic, DAU system, where ‘circuit’ cards are used for each sensor.

If ‘CONFIGURATION SHEET’ (program name cfgsheet) is accessed from the Setup menu, the
standard sheet that is shown is from an older DAU configuration. Unfortunately, the main configurations
now being used will be different, depending on where in the world you are working and which system is
required by safety regulations, an intrinsic or non-intrinsic system.

These configuration sheets are explained as follows:

Digital Channel The CPU channel number for a digital sensor, whether interrupt (IRQ) or binary
(BIN).

Analog Channel The first number relates to the channel number on the circuit board terminals.
The number in brackets is the CPU channel number for an analog sensor. This is
the number that has to be entered into the software in order to configure the
system.

Card Slot The number of the non-intrinsic card or Elcon Barrier channel (note that each
barrier carries two channels).

Card Type For the Elcon system, this shows the particular type of safety barrier. Note that
1022 carries simple 2-wire current loop sensors, 1842 carries the digital sensors,
1012 carries the 3-wire electrical torque, 1072 carries the 3-wire temperature (T-
thermistor) and flow paddle (P-potentiometer).

For the non-intrinsic system, this shows simply whether the card is an analog or
digital card type.

Junction Box “No:” shows which junction box the sensor has been run to, normally 1 or 2.

“Chan” shows which terminal, within the junction box, the sensor has been
connected to. Note that the depth sensor is always connected to the first and
second terminals in JBox 1.

This configuration needs to be set within the QLOG system in order that the computer receives the
correct signals from each sensor. This process is described in the next chapter.

12
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Standard Configuration - ELCON Barrier System

Digital Analog Card Card Junction Box Signal Name


Channel Channel Slot Type No: Chan
___________________________________________________________________
1 (IRQ1) x 1 1842 1 1 Depth Pulse
9 (BIN1) x 1 1842 1 2 Depth Direction
2 (IRQ2) x 2 1842 1 3 Pump 1
3 (IRQ3) x 2 1842 1 4 Pump 2
4 (IRQ4) x 3 1842 1 5 Pump 3
5 (IRQ5) x 3 1842 1 6 RPM
x x 4 1882 x x System Power (spare)
x x 4 1882 x x System Power (torque)
x 4 (20) 5 1012 1 7 Analog (spare 3 wire)
x 3 (19) 5 1012 1 8 Torque (electric)
x 1 (17) 6 1022 1 9 Hookload
x 2 (18) 6 1022 1 14 Analog (spare)
x 5 (21) 7 1022 1 10 Pump Pressure
x 6 (22) 7 1022 1 11 Casing Pressure
x 7 (23) 8 1022 1 12 H2S 1
x 8 (24) 8 1022 1 13 H2S 2
x 10 (26) 9 1072P 2 1 Flow Paddle
x 11 (27) 9 1072P 2 2 Analog (spare 2K pot)
x 12 (28) 10 1072T 2 3 Temp In
x 13 (29) 10 1072T 2 4 Temp Out
x 14 (30) 11 1022 2 5 Density In
x 15 (31) 11 1022 2 6 Density Out
x 16 (32) 12 1022 2 7 Conductivity In
x 17 (33) 12 1022 2 8 Conductivity Out
x 18 (34) 13 1022 2 9 Trip Tank
x 19 (35) 13 1022 2 10 Pit 1
x 20 (36) 14 1022 2 11 Pit 2
x 21 (37) 14 1022 2 12 Pit 3
x 22 (38) 15 1022 2 13 Pit 4
x 9 (25) 15 1022 2 14 Pit 5
16
16

x 29 (45) x Internal CC signal


x 30 (46) x Internal TCD signal
x 31 (47) x Internal Internal H2S
x 32 (48) x Internal Block Temp
10(BIN2) x x Internal Gas Flow

NOTE: this is an example of a typical configuration. There may be variations depending on what sensors
are actually required.

13
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Standard Configuration - Non Intrinsic Barrier System

NOTE that there are slight variations between the more recent DAU system and the older system. The
newer version is illustrated here. The older version is that shown in the QLOG setup menu.

Digital Analog Card Card Junction Box Signal Name


Channel Channel Slot Type No: Chan
___________________________________________________________________
x 1 (17) 1 ANA 1 7 Torque
x 2 (18) 2 ANA 1 8 Pump Pressure
x 3 (19) 3 ANA 1 9 Casing Pressure
x 4 (20) 4 ANA 1 10 Density In
x 5 (21) 5 ANA 1 11 Density Out
x 6 (22) 6 ANA 1 12 Trip Tank
x 7 (23) 7 ANA 1 13 Pit 1
x 8 (24) 8 ANA 1 14 Pit 2
x 9 (25) 9 ANA 2 1
x 10 (26) 10 ANA 2 2
x 11 (27) 11 ANA 2 3
x x 12 Power Brd x x Power Board
x 12 (28) 13 ANA 2 4
x 13 (29) 14 ANA 2 5
x 14 (30) 15 ANA 2 6
x 15 (31) 16 ANA 2 7
x 16 (32) 17 ANA 2 8
x 17 (33) 18 ANA 2 9
x 18 (34) 19 ANA 2 10
x 19 (35) 20 ANA 2 11
x 20 (36) 21 ANA 2 12
x 21 (37) 22 ANA 2 13
9 (BIN1) x 23 DIG 1 2 Depth Dir (On/Off Bot)
x x 24 MUX Brd x x MUX Board
x 22 (38) 25 ANA 2 14
x x 26 ANA x x
x x 27 ANA x x
x x 28 ana/dig x x
x x 29 ana/dig x x
x x 30 ana/dig x x
5 (IRQ5) x 31 DIG 1 6 RPM
4 (IRQ4) x 32 DIG 1 5 Pump 3
3 (IRQ3) x 33 DIG 1 4 Pump 2
2 (IRQ2) x 34 DIG 1 3 Pump 1
1 (IRQ1) x 35 DIG 1 1 Depth Pulse (D.Wheel)
x x 36 digout brd x x Digital Out Board
10 (BIN2) x Internal DIG Internal Gas Flow
x (45) Internal ANA Internal Block Temp
x (46) Internal ANA Internal Internal H2S
x (47) Internal ANA Internal TCD signal
x (48) Internal ANA Internal CC signal

NOTE again, variations will depend on what sensors are required. Here, the configuration is for quite a
basic requirement including a depth wheel.

14
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.2 DIGITAL SENSORS

1.2.1 Crown Depth Sensor

The crown depth sensor operates on a system of 2 proximity sensors detecting metallic targets that are
positioned around the fast shiv wheel at the crown of the derrick.

• Measures the movement and direction of the


travelling blocks

• Voltage output 0-5V (intrinsic)

• 4-20mA output (non-intrinsic)

• Distance from target required < 15mm

• LED function on tubes indicate trigger action for


easy & fast hookup

• Resolution is set by the software

When placing the targets on the shiv wheel, you should use as many as possible to give the best depth
resolution as possible without affecting the accuracy of the sensor

ie the targets have to be big enough to accommodate both proximity sensors at the same time, but there
also has to be enough space between the targets to allow for both proximity sensors - this positioning
should never be marginal otherwise the performance of the sensor could be affected.

15
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The metallic targets are attached to the shiv with silicon glue. The proximity sensors should be
positioned at right angles to these targets. The position of the two sensors should be offset in relation to
the targets, so that one is activated before the other - this is made possible by the rotating bracket
assembly housing the sensors.

As the target then rotates past the two proximity sensors, a sequence of signals is produced allowing for
the direction to be determined.

This sequence of sensor activation is as follows:

S1
A B C
S2

D E

As the target rotates: S1 S2

A OFF OFF
B ON OFF
C ON ON
D OFF ON
E OFF OFF

There is, therefore, a specific sequence activated by the sensors; if the order is reversed, the software
determines that the direction has changed.

When installing the sensor, there is a difference in how the intrinsic and non-intrinsic sensor types should
be connected at the sensor’s terminal box.

16
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

A. For the non-intrinsic crown depth sensor, the two proximity sensors are connected directly to a
circuit board at the sensor, and, from there, to the junction box and onto the DAU.

CIRCUIT BOARD
G
Shield
+ 1 Sh
PROXIMITY A
_ 2
Ground
2
+V
3 +
Pulse
PROXIMITY B
+ 4 Sh
_ 5
Direction
1

B. For the intrinsic crown depth sensor, the two proximity sensors are connected to a terminal bar,
from there to the main junction box, and then connected to the circuit board which is housed in
the DAU, before passing through the Elcon module.
JBox
Terminal
+
+v 1
PROXIMITY A _
Signal

Sh
Shield
+
PROXIMITY B
+v 2
Signal _

Sh
Care in installation

• Ensure targets are well stuck to the wheel, and that the faces and edges are clean/smooth.

• Ensure that all nuts are tight and that the proximity sensor and brackets are secure. If there is any free
movement, they may become mis-aligned or damage the targets - this is the most common cause of
any problems.

• Ensure that both proximity sensors are activated correctly with the blocks moving in both directions.

17
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Calibration

• The blocks should be moved a known distance in both directions.

• Record the number of pulses recorded by viewing the Test Mode. If the are not the same, then
probably one sensor is not registering one target in one direction.

• Repeat this 3 times if possible; if the pulses are consistent, then you have your number for
calibration.

• This number has to be converted to ticks per 100m - this is the calibration figure, which is stored in
the equipment table.

For example, a joint of length 9.63m is used.

An average number of 151 ticks are recorded in both directions.

Calibration, Ticks per 100m = (151/9.63) x 100 = 1568

This value should be entered into the Equipment Table in Realtime-Controls. Once drilling, if the depth
is not perfectly matching the kelly down depths, the figure can be tweaked, or adjusted.

If the system records too much depth, i.e the system kelly down is deeper than the actual kelly down, the
figure should be increased.

If the system does not record enough depth, ie the system kelly down is short of the actual kelly down,
the figure should be decreased.

NOTE - if depth is being recorded in feet, the calibration Ticks per 100m is still required for metres.

18
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.2.2 Depth Wheel

• Only used with non-intrinsic systems

• 0-10VDC output voltage (3-wire)

• 3 wire sensor; +v, signal, ground. The shield


must should also be connected.

• Hooks up directly to the geolograph cable

• Resolution is set by software; 500


ticks/100m, for the standard sensor, is set in
the equipment table

• MUST BE accompanied by an ON/OFF


BOTTOM SENSOR. This is linked to the
driller’s air line which disengages the
geolograph when the driller picks off bottom.

Operational problems may be experienced if the rig’s geolograph cable does not run smoothly between
the wheels, especially if it becomes loose or slack. Ensure that the line feeds properly with free
movement. If the line is loose so that it does not run evenly, or continuously through the wheels, it is the
rig’s responsibility to tighten the line. If there is a consistent problem with the geolograph line, i.e. the
tracking is wrong but consistent, the calibration may need to be altered from the default 500 ticks/100m
(since the wheel diameter is 0.2m).

19
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.2.3 Draw works Depth Sensor (DDS)

The drawworks sensor monitors the movement of the traveling block with an optical encoder mounted on
the drawworks drum. Two versions are currently in use, a non IS system for a ‘stand alone’ environment
and the other is an IS system used in conjunction with Elcon barriers.

A Non IS system has an encoder installed on the drawworks shaft with the microprocessor
mounted close by, connection is made to the CPU via a five-pin plug into a special serial port.

The IS system positions the microprocessor in the safe area location after the Elcon barriers (type
1842 and 1881), before connection to the processor unit.

All setup is done through the QLOG software, although the DDS housing has a pair of LED’s to indicate
pulses (red) and direction (green).

Theory and Calibration

The DDS works in a similar fashion to the Crown Depth Sensor, translating the rotary movement of the
drum into a series of pulses that represent distance traveled, and a direction bit to determine block
direction. However, with the DDS, the effective diameter of the drum changes as cable is wound on or
off – this means that the distance per rotation changes with the DDS, whereas it remains constant with
the Crown Sheave.

All programming and setup is done from the QLOG software which requires another administrator to be
run whenever the ‘works draw’ option is selected in the equipment table (ticks per 100 will also have to
be set). The administrator is as follows:

dds_admin & (this needs to be run after the dau_admin)

Various parameters must be entered, through QLOG, in order for the system to function:

• Basic drum diameter (layer 0).


• Cable wraps per layer (width of drum).
• Cable diameter.
• Initial wraps (number of total wraps from the end of the cable attached to the drum (zero point)).
• Number of lines on the traveling block.

The calibration is done through QLOG by typing draw from the command line.

An important requirement is that the number of wraps must be entered as a whole number, or integer, so
that the drum must be positioned so that the last wrap is complete.

The initial hook height, or position, is ideally entered when the blocks are up during a connection (from a
top drive, this will be stand length +stick up, typically 1.5m).

If the line is slipped and cut then a recalibration of the 0 point is needed.

20
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Installation Procedure

1. Prior to installation, it is recommended to perform a functionality test of the sensor.

• This is done by connecting the sensor to the junction box with a short length of cable and
verifying that the electronics and encoder are fully functional.

• The LED in the confirmation button should be flashing, indicating the system is powered but that
the internal processor detects a calibration error.

• Using “draw”, recalibrate the DDS with previous values and test the units functionality – check
the LED’s on turning the encoder manually.

2. Determine the inputs (drum diameter, cable diameter, wraps) required – measurement of the drum
diameter is difficult, but the most accurate method as long as you ensure that both ends of the tape
are in the same groove.

• Drum Diameter = (measured circumference / π)

• Accuracy is very important:- π should be taken to 5 decimal places (3.14159); drum diameter
must be determined to the nearest millimeter and cable diameter to the nearest 1/10th of a
millimeter.

3. If access to the drum is not possible, then an indirect determination can be made.

• Have the driller lower the hook until the cable is well into the first layer

• Put chalk marks on the last few adjacent cable wraps, in a straight line parallel to the drum axis

• Have the driller lower the blocks until the first 2 marks are off the drum – measure the linear
distance between the two chalk marks.

• Repeat this for several “chalk mark pairings” in order to determine the average.

• Drum Diameter = (average linear length / π) - (diameter of cable)

4. The encoder adapter is screwed onto the drum shaft with rotorseal screwed on afterwards. The
microprocessing board, for non-IS systems, should be placed neatly out of the way from any moving
parts or walkways. For an IS system the 4 wire +shield cable is run to a junction box and then to the
Elcon DAU.

5. To install the encoder you will need to gain access to the rotorseal by removing the guard. Preferably
you should get the help of the rig crew, but certainly, the work has to be arranged with the
Toolpusher and you must ensure that all safety measures are taken, so that the drawworks are not
operated while you are working.

21
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6. Handle the encoder very carefully – it is fragile and very expensive!

7. Install the encoder, replace the guard and gain Toolpusher approval before finishing.

8. Mount the electronics enclosure near the end of the drum – try to make sure the LED’s and push-
button are easily accessible.

9. Connect the main SYSTEM cable to the junction box.

10. Run the communications cable from the electronics module connector (COMM) directly back to the
logging unit.

REFER TO THE QLOG HELP FILE “dds.theory” FOR COMPLETE INFORMATION ON THIS
SYSTEM.

22
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.2.4 Offshore Depth Compensation

REFER TO THE QLOG EQUIPMENT HELP FILE FOR COMPLETE INSTRUCTIONS

Floating vessels, semi-submersibles and drill ships, require the compensation for vertical movement
caused by wave movement, swell and tidal variations. Two components need to be compensated for, in
order to ensure accurate hole depth determination: -

1. Riser Compensator - the movement between the drilling platform and the riser.

2. Drill String Compensator - the distance between the block and the hook

Wire Retrievable Encoder

The compensator motions are measured with a linear cable-reel sensor – cable, wrapped around a spring-
loaded drum, is pulled out or drawn in during vertical compensation movements.

As the drum rotates, a basic encoder sends a digital and direction pulse to the DAU – this requires type
1882 Elcon barriers to provide power and signal.

The sensors are extremely accurate, with current models tracking to 0.5985 cm per pulse.

Installation

Two encoders are needed, one to compensate for the riser movement and the other for the block to hook
movement. Ideally the Riser compensator encoder needs to be fixed onto a welded bracket placed on the
piston housing or catwalk, the line will then need to be spooled out and fixed onto the pulley wheel.

For the block to hook movement the encoder will need to be fixed to either the block or to the hook with
the wire spooled out and fixed between these two. The cable will then need to be run along the umbilical
and back to the nearest junction box.

The sensor must be positioned so that the cable IS ALWAYS perpendicular to the sensor housing. This
will prevent unnecessary wear on the cable and components.

Depth and Reference Definitions

QLOG uses 2 reference points: –

Primary Reference: Mean Sea Level (MSL)


Hole Depth is directly referenced to this point

Secondary Reference: Kelly Bushings (KB) – either the top of the kelly bushings, or the rotary table
Bit Depth KB is directly referenced to this point

23
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The Hole Depth parameter is considered an absolute, since it does not vary with water depth, only with
new hole drilled.

Hook position, relative to KB, is determined by the block movement and drilling compensator position.

A number of parameters are measured or determined by QLOG – please refer to the QLOG help file for a
full description of these parameters:

Block Position Distance the blocks move


Riser Position Distance the riser compensator moves
Compensator Position Distance the drilling compensator moves

Bit Depth KB Determined from the total string tally (below KB) and block movement (when
out of slips)
Hole Depth Based on increasing bit movement, referenced to MSL

Bit Depth KB and Hole Depth are combined to derive the following parameters:

KB to MSL Offset (generated when setting KB-MSL) – (Riser position x Riser


factor)
Bit Depth KB displayed Bit Depth KB + Compensator Position
Hook Position Block Position + Compensator Position
Bit Depth Bit Depth KB – (KB-MSL)
Hole Depth KB Hole Depth + (KB-MSL)

QLOG Configuration

The QLOG software is used to calibrate the block to hook and riser movement using ‘ticks per 100’ in
the equipment table.

The floating rig requirements in the QLOG Equipment Table must be enabled before the compensators
are in use:

Set “Floater Rig” Yes

Set “Comp per 100” and “Riser per 100”

Determine resolution of digital sensor (currently 0.5985 cm/pulse)


Calculate pulses per 100m = (1/resolution x cm/100m)
= 16708 pulses

Set “Riser Factor” This equals the number of lines on the riser compensator hydraulic unit
(if the cable between riser and pulleys is vertical or near vertical

If the cable is at an angle, the Riser Factor should account for this:

Riser Factor = number of lines / sine angle (vertical to cable from riser)

Further “tweaking” may be required to fine-tune the factor.

24
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Set “Off Bottom Distance”

Large amounts of heave or swell may cause a discrepancy between


compensator positions and result in the software continually recognizing
on and off bottom conditions. This parameter is intended to prevent this
and should be set to between 0.5 and 1.0m – if on/off bottom changes
still occur through heavy seas, then increase the value until the problem
disappears.

Set Air Gap This is assumed to be a constant, the distance between KB and MSL.
The Rig Captain or Engineer should have this value.

Analog Configuration

Set Riser Drive and Riser Direction to the assigned IRQ and Binary channels

Set Compensator and Compensator Direction to the assigned IRQ and Binary channels

“State” may need to be changed in order to set proper direction of movement

Display Configuration

The file 3:/Datalog/text/display.txt should contain the following lines:

0330 13 Riser_Position
0331 13 Comp_Position
0332 13 Block_Position
0333 13 Hole_Depth_KB
0334 13 Bit_Depth_KB
0335 13 KB-MSL_Air_Gap
0336 13 Heave_Amplitude
0337 16 Heave_Rate
0338 00 -

Change the Decimal Place Settings for Riser Position and Heave Amplitude to 3.

Create appropriate displays in order to verify the correct operation of the compensation system:

Useful Tips

If the applicable compensators are extending, then Riser/Comp Position values should increase. If the
directions are wrong, use the “switch” facility.

Compensator Position can be set to zero when fully retracted and locked. Alternatively, a value can be
entered, and when the drilling compensator is estimated to be in that position, the value can be applied.

25
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

This can also be applied to the setting of the Riser Position, although full retraction is unlikely.

Bit Depth KB can be determined from the pipe tally, less the length of pipe remaining above the KB.
This should be set when off-bottom when there is no drilling compensator movement.

KB to MSL is the most difficult to set since it requires exact knowledge, at a given moment, of the
current water depth (considering swell), distance to KB and MSL. The distance to be entered is the
current difference between (KB to Bottom) and the MSL.

26
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.2.5 Proximity Sensor

• To measure Pump Strokes and RPM (the same sensor is used to make up
the crown depth sensor).

• Outwardly the appearance is the same for both intrinsic and non-intrinsic
systems, although there is a difference due to the different types of barrier
used.

• 0-5V DC output (intrinsic)


4-20mA output (non-intrinsic)

• 2 wire sensor; +v and signal; the shield should be connected

• Activated by metallic target; required distance <15mm

• A rotating bracket assembly allows for easy positioning and installation; the correct activation of the
sensor can be easily determined by way of an LED facility in the tube.

• Care should be taken to ensure the sensors are accurately located and are firmly anchored with C-
clamps and nuts fully tightened. The C-clamps should be greased to prevent seizure.

27
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3 Analogue Sensors

1.3.1 Ultrasonic Pit Level

• Compatible with both the intrinsic and non-intrinsic


systems

• 2 wire sensor providing 4-20mA output

• Operating range 0.25 to 5.0m

• LED display allowing easy calibration

Installation

Ensure that there is a clear path from the sensor to the


bottom of the tank, i.e. that the ultrasound pulses are not
blocked by internal pipes inside the tank.

Avoid positioning the sensor towards the edge of the tank if


the bottom is angled. This would prevent pulses from being
bounced vertically back to the sensor.

Try to position the sensor away from any agitators or flow


line entries - this will avoid exposing the sensor to
unnecessary agitation on the pit surface.

The sensor can be sited directly on to pit grating if necessary since there is a blanking facility which can
be used to tell the sensor to ignore any signals from within a certain distance (min 0.25m). This obviously
restricts the maximum pit level that can be monitored, so preferably, the sensor should be mounted above
the grating if at all possible. Ensure that the sensor is firmly anchored to avoid unnecessary vibration
from the tanks.

28
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Calibration

The calibration is initially done at the sensor by inputting the 4 and 20 mA distance settings.

4mA – the maximum height, i.e. distance between sensor and tank bottom when the tank is empty.

20mA – the minimum height, i.e. distance from sensor to mud level when the tank is full.

This is done by pressing the 4 and 20mA keys on the sensor at the same time to take you through the set
up menu:
4mA setting
20mA setting
Blanking distance
Averaging

Example:

0.30m
GRATING

MAXIMUM LEVEL 0.25m

2.50m

4mA setting = 3.05m This will give you 800 counts in test mode.

20mA setting = 0.55m To determine the counts here, position the sensor towards a
blank surface at a distance of 0.55m. You can then read the
number of counts from test mode.

• These two count readings are therefore your minimum and maximum calibration values. 800 counts
is obviously equal to zero pit volume. The maximum value has to be taken from the rig’s pit volumes
or your own measurements.

• NOTE OF CAUTION - the rig pit volumes are often determined to the level of the grating. This is
not necessarily the maximum mud level. You should be sure of this before determining the 20mA
setting.

29
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Blanking distance - can be set anywhere between 0.30 and 0.55m. You are simply eliminating any
responses from the grating.

Averaging facility: There are 3 settings 1 - high smoothing


2 - low smoothing
3 - takes every reading

The 3rd setting is never used, because this will use bad as well as good readings (bad readings may be
caused by an agitated surface sending a signal back at an angle, rebounding of walls etc - therefore not a
true, accurate reading).

Settings 1 and 2 will not accept these bad signals - the sensor will wait for the next good signal (i.e. a
vertical response) before updating its reading.

Normally, setting 1 is used. However, for the trip tank, a more rapid response is required because of the
greater resolution, i.e. a lower volume per height change - setting 2 should therefore be used.

30
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.2 DeLaval (Float) Pit Level

• Versions for both intrinsic and non-intrinsic systems.


• 4-20mA output (2-wire) non-intrinsic version
• 0-10VDC output (3-wire) intrinsic version
• 1/2” resolution on float probe

The float sensor works by a series of magnetic switches


housed inside the tubing. These are activated/de-activated
as the float passes by them.

Installation

Position the sensor so that the float has uninhibited


movement from the top to the bottom of the tank.

Locate it away from agitators and flow inlets to avoid


exposure to turbulent mud surface.

Make sure that the probe is firmly anchored at the top and the bottom.

Calibration

As with the ultrasonic pit level sensor, the maximum and minimum heights, and the equivalent pit
volume need to be determined.

Note that the diameter of the float has to be considered here; also that there is a ‘stopping’ clip
preventing the float reaching the bottom of the probe (A); also, the density (and viscosity) of the mud
will determine how far the floats ‘sinks’ in the mud (B).

i.e. A. Minimum Height B. Mud Density

Minimum
Stop clip height LOW HIGH
Tank bottom

Maintenance

During operation, you should regularly clean the probe and float in order to prevent the float from
sticking. This is especially important if using water based mud that will tend to dry, or cake, on the
assembly. If the mud level is static for a period of time, it is quite likely that the float will stick at that
position - simply check the floats regularly and prod with a bar to ensure that there is free movement.

31
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.3 Mud Density

• For use with both intrinsic and non-intrinsic systems.

• 2 wire sensor giving 4-20mA output.

• The sensor works by recording the differential pressure recorded


between 2 diaphragms that are positioned a known vertical distance
apart. This can then be converted to a density.

Calibration

This is preset: 4mA - 500 kg/m3 (4.16 ppg)


20mA - 2500 kg/m3 (20.82 ppg)

These values can be entered into the calibration file and then checked
against the value determined by the mud engineer.

Installation/Maintenance

Ensure that the height of the probe is set so that both diaphragms are
completely immersed in the mud. Avoid positioning the sensor where
there could be mud flow directly into the top of the protective casing.

For the density out sensor, located in the shaker box, check the sensor,
regularly, for cuttings built up inside the casing that could cover the
diaphragms. Clean the sensor regularly, but do not use a high pressure
hose directly onto the diaphragms - this will damage them.

32
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.4 Mud Temperature

• Non-Intrinsic system is a 2 wire sensor, giving a 4 to 20mA output.

• Intrinsic system is a 3 wire sensor, including a ground. The thermistor works on a resistance range
(100 to 138.5 Ω), which is converted by the 1072T Elcon module (IS barrier) into a 4 to 20mA
output.

Calibration

This is preset at the range 0 to 100C. This can be entered into the calibration file and then checked
against actual measurements for accuracy.

Installation/Maintenance

This is much the same as for mud density. Make sure that the sensor is kept clean, and ensure that the
temperature out sensor does not become buried in cuttings.

33
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.5 Mud pH

• For use with both intrinsic and non-intrinsic systems.

• 2 wire sensor giving a 4 to 20mA output.

• Operating range 7 to 14pH.

• The sensor is temperature compensated by a thermistor. This means


that it is quite possible that the reading may differ from that recorded
by the derrickman or mud engineer - theirs will not be compensated.

Calibration

This is quite a time consuming practice but should be done quite


regularly, once a week if possible. You will require the use of buffer
solutions and a loop calibrator.

• Disconnect the cable from the sensor and connect a 4-20mA loop
calibrator.

• Ensure that the sensor head is clean and place in the pH 7.0 buffer
solution. Take care because the glass bulb is extremely fragile. Allow
at least 30 seconds for the reading to stabilize and then adjust the
calibrator to read 4mA.

• Carefully rinse the sensor in distilled water before placing in the pH 10.0 buffer solution. After
stabilization, adjust the calibrator so that it reads 10.86 mA.

• Repeat this process, maybe 3 times, until no further adjustment is necessary.

• Reconnect the sensor to its cable, then placing the sensor, again, into each buffer solution, record the
number of counts displayed in Test Mode. This will give you your calibration range for 7 and 10pH.

Care and Maintenance

• The electrode must always remain wet, therefore during transportation or periods of downtime at
wellsite, place the supplied cap (should contain pH 4.0 solution) over the electrode.

• The electrode is very fragile; never clean with a hose, but wash with a damp cloth. Make sure the
protective guard is always in place, even during calibration.

• As with density, you will have to clean the sensor regularly to avoid mud caking on the electrode,
and to prevent cuttings building up inside the protective guard.

• Cake build up can be a particular problem over the duration of a trip. It is always a good idea to wash
the sensor head prior to getting back on bottom so that the pH sensor is fully responsive. This is also
an important time considering that H2S may have entered the wellbore and be circulated at bottoms
up following the trip.

34
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• The sensor is prone to ‘grounding’ from metallic contact. This will produce a zero response from the
sensor. You may have to cover the probe, C-clamp and bracket (or wherever there is a chance of
contact with metal) with insulating tape in order to prevent this from occuring.

Evaluation of pH

• PH is the measurement of the acidity of a liquid. A ph of “7” signifies a neutral liquid; below 7 an
acidic liquid, and above 7, an alkaline fluid.

• The degree of acidity can be determined by the changing content of hydrogen ions in the liquid.

• The presence of H2S will produce a drop in pH.

• PH sensors will not function in oil based muds since they are not ionic liquids. This means that there
are no free electrons in the fluid that we can detect. This doesn’t mean that there is no chance of an
H2S release... the potential for disaster is actually greater because we can not monitor the fluid for
free hydrogen (or sulphur in the case of the pH.S sensor).

35
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.6 Mud Conductivity

• For use with both intrinsic and non-intrinsic


systems

• 2 wire sensor giving a 4 to 20mA output

• Normal operating range is 0 to 100mS (milli-


Siemens), although variations can be set with
maximums of 200 or 400 mS.

Calibration

Preset at the above range, these are your minimum


and maximum values.

Installation/Maintenance

As with the other mud sensors, frequent observation


to prevent burial in cuttings and frequent washing to
prevent cake build up.

Evaluation of Conductivity

• The electrical conductivity of a liquid is being measured. Opposite trends to wireline Resistivity will
be seen this is the resistance to electrical conductivity. The two parameters are reciprocol.

• The operating range is small. Salt is extremely conductive, so that saltwater muds will be well
outside of the operating range of the sensor.

• Oil based mud is non-conductive, you will therefore get zero reading from the sensor.

• Changes in conductivity will be produced by changes in the salinity of the mud. Penetrating salt
formations would be an obvious example, but, more importantly, influxes of formation fluid into the
well bore can therefore be detected. Whether that change is an increase or a decrease will depend on
the initial salinity of the mud, and the salinity of the formation fluid. Normally however, you would
expect and increase in salt content from a saline formation fluid, which would lead to an increase in
conductivity.

36
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Foxboro Electrodeless Conductivity

Sensor type: 871EC-EV3

The sensor coding (EV3) can be confirmed by the model code located at both ends of the sensor cable.

• Temperature compensated with a 100kΩ thermistor


• Operating fluid temperature range of –5 to 105°C. This should be noted when the sensor is not in use
during cold temperatures.

Transmitter type: 870ITEC-AYEAA-7, intelligent transmitter.

• 2 wire, 4 – 20mA output


• Operating ambient temperature range of –25 to 55°C

37
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.7 Pump (Standpipe) or Annular (Casing) Pressure

TYPE A “Druck” Transducer

• Can be used in intrinsic & non-intrinsic


systems.

• 0 to 5000psi or 10,000psi ranges are


available

• 2 wire sensor, providing a 4-20mA


output.

• Installed in a NEMA type 12 enclosure


for protection against dirt, dust, oil &
water.

• Zero & span trim pots provide fine, or


small, adjustments.

TYPE B Rosemount Transducer

• Can be used in intrinsic & non-intrinsic


systems.

• Measures 0-6000psi, although it is


calibrated from 0-5000psi.

• Adjustable from 0-1000psi to 0-6000psi

• 2 wire sensor, with 4-20mA output.

Installation

Simple male/female hydraulic couplings,


connected to a knock on head on the standpipe
manifold or choke manifold (depending
whether pump or casing pressure).

Calibration

The transducers are pre-calibrated; the value


for the upper limit should be entered as the
maximum calibration (20mA). This can be
compared, and adjusted if necessary, against
the rigs own measurement.

38
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

TYPE C Rosemount 3051TGA Smart Pressure Transducer

• Measures absolute and gauge pressures from 0 to 10,000psi, 0 to 68950Kpa

• Single isolator design with microprocessor-based electronics

• Automatic diagnostic monitoring

• 4 to 20mA output

• For troubleshooting help,

• Saturation limits of the sensor are 3.9mA and 20.8mA

• In the event of component failure, the output is set to alarm values of 3.75 and 22.0mA.

Model 3051 is a universal pressure sensor, which means that the operational span can be set to any range
within the full range available. In other words, it can be set to a 0 to 1000psi range if it is to be used for
hookload, 0 to 5000psi range for pump pressure and 0 to 10000psi range for casing pressure.

This precludes the need for a number of different sensor types.

Technicians will conduct all spanning changes, before the sensor leaves the office. Changes in the field
will not be necessary, so the procedure is not described here. Field engineers can therefore use the sensor
in the same fashion that they would use an ordinary, single range, Rosemount transducer.

39
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Operation of all pressure transducers

A leak in the hydraulic system will obviously be recognized as falling pressure. Should air or mud get
into the hydraulic system, the compression characteristics of the hydraulic fluid will be effected. This,
typically, is can be recognized by much slower, or dampened, responses to pressure changes and lower
actual values recorded.

If a leak is detected, it will have to be determined which part of the hydraulic system is leaking:

• If Datalog’s hydraulic hose is connected directly to the rigs, then either system may be responsible
for the leak. The leak may be at the connectors. Looking around for evidence of the leaked fluid will
usually pinpoint the location!

• The knock on head may also have to be investigated because there could be a leak in the diaphragm.
The driller will usually conduct this investigation, since it is the rig’s equipment. Under no
circumstances should you tamper with this system without obtaining the consent of the driller.

• Similarly, if air or mud has got into the hydraulic system, the fault will most usually stem from the
diaphragm in the knock on head. But whatever the source, the hydraulic fluid in the hose will have to
be replaced.

To check for air and re-prime the sensor and hydraulic hose with fluid:

• Firstly, when there is no pressure


on the manifold, disconnect the
sensors hydraulic hose.

• Test for the presence of air in the


hose by applying pressure to the
nipple on the male fitting; if there
is air in the system, the fluid/air
will be released under pressure
(take an umbrella!). If there is no
contamination, the hydraulic fluid
will just flow out gently.

• If there is contamination, the


hydraulic system will have to be
purged and re-primed. Keep
pressure on the nipple until all the
hydraulic fluid has escape. Using a
priming pump, refill the system
until you cannot push the pump
any further. Gently press the nipple
to ensure that there is no air in the
hose; prime with the pump again;
repeat if necessary.

40
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.8 Hookload – Pressure Transducer and Load Cell

• Can be used with intrinsic and non-intrinsic


systems.

• Span of 0-4000psi, although typically


calibrated to 0-1000psi.

• The range is adjustable from 0-400psi to 0-


4000psi, to accommodate rigs of different
rating.

• 0-1000 psi span is also available.

• 2 wire sensor, providing 4-20mA output.

Installation

Simple male/female hydraulic couplings; to


connect (often T’d into the rigs own hookload
sensor, although then, there is no independent
system operating) to the load cell attached at the
dead line anchor.

Calibration

The sensor is measuring pressure, but obviously,


the reading we want is the weight supported by
the hook. The calibration will have to be
determined from the Test Mode.

The minimum number of counts should be recorded when only the blocks are suspended by the drill line.
Block weight can be obtained from the driller or toolpusher.

The maximum number of counts should be recorded when the string is lifted out of the slips. The larger
the string weight, the more accurate the calibration will be. Therefore, if we were setting up at the start of
a well, the hookload would have to be repeatedly recalibrated, during the first period of drilling, as the
string weight increases with drilled depth and amount of pipe.

Operation

Leaks or contamination will obviously have the same effect on the transducer as already described.
Whilst drilling, this will be shown up as continually increasing WOB (since the pressure on the hookload
is decreasing), or at connections etc or when the string is lifted, you will notice a drop in the hookload.

41
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.9 Hookload Line Tension Gauge (MDTotco)

• 2 wire, 4 to 20mA output

• Single line load up to a factory


calibrated maximum of
100,000lbs (45360kg).

• Wire rope (the drill line) can be


accepted with a diameter range of
7/8 to 2 inches (22.2 to 50.8mm).

Installation

Should be done when there is no load


on the drill line. Install close to the
deadline anchor (no closer than 1m)
where vibration and sway will be at a minimum.

Loosen the yoke by turning the crank anti-clockwise until there is sufficient gap to allow installation.
Open the clamp by lowering the clamping mechanism and rotating 180°.

Install around the drill line, close the clamp by rotating 180°. Make sure the holes in the clamping block
line up with the guide posts.

Tighten the clamp by turning the crank clockwise, one full turn after the wire rope contacts the
transducer body.

Operation

When the transducer is correctly installed and clamped to the deadline, the wire rope is bent or deflected
(over the central yoke) by ¼” or 6.35mm. When load is applied to the line, it will tend to straighten at the
deflection point, thus exerting an outward force on the yoke. This force is transmitted through the
clamping mechanism, creating reaction forces on the body of the transducer. Strain gauges detect these
stresses on the body of the transducer, producing a 4 – 20mA signal, which is proportional to the tension
on the drill line.

Calibration

This not only depends on the pre-set operating range of 0-100,000lbs, but also on the number of lines
supporting the hook. 100,000lbs represents the load on the single line, the dead line.

However, if the drill line is fed through the pulley, or “shiv” system (crown to blocks) to provide 10
lines, for example, that support the blocks, then the maximum hookload would actually be 1,000,000lbs.
Typically, 8, 10 or 12 lines are used to support the blocks.

The maximum calibration point, 20mA or 4095 counts, is equal to the single line operating span of the
gauge (100,000lbs) multiplied by the number of lines supporting the blocks.

42
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.10 Hydraulic Torque

• Can be used in intrinsic & non-intrinsic systems.

• Measures 0-1000psi (non-adjustable)

• 2 wire sensor, providing a 4-20mA output

• Installed in a NEMA type 12 enclosure for


protection of dirt, dust, oil & water

Installation
Connected direct to the rigs hydraulic power supply.

Calibration

Zero torque for 800 counts. The maximum


calibration will have to be determined from the
number of counts in test mode given by a particular
torque. This will have to be taken from the rigs
recorded value. The greater span for the calibration,
the more accurate the calibration will be.

1.3.11 Electric Torque

• Can be used with intrinsic


& non-intrinsic systems.

• Measures 0-1000A DC

• 4-20mA output, 3 wire


sensor requiring a ground

Installation/Operation

The clamp should be placed around the main power cable driving the rotary table. It is measuring the
magnetic field induced, from which the current is automatically determined. It should therefore be
positioned perpendicular to the cable and placed the right way around in relation to the current flow - the
direction is indicated on the clamp itself.

Calibration
It can only really be calibrated by reading the counts in Test Mode produced by a known current - this
should be determined from the rigs measurement. The minimum, 800 counts, is obviously 0 Amps.

If you are required to give measurements in Ftlbs or Nm, you will have to obtain a conversion table or
graph from the rig and enter the conversion factor in the equipment table. For increasing current, the
conversion is non-linear and different for each rig, depending on the make up of the equipment.

43
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.12 Potentiometer Mud Flow Paddle

• Although outwardly the same,


there are different models for the
intrinsic and non-intrinsic
systems.

• The non-intrinsic paddle is a 2


wire sensor giving a 4-20mA
output.

• The intrinsic paddle is a 3 wire


sensor requiring a ground wire.
The sensor operates on a 0-2K
potentiometer span producing a
0-10V DC output. This is
converted, by the 1072P Elcon
module, to give a 4-20mA output.

Installation/Operation

The paddle should be placed in the flowline and it’s length adjusted in order to accommodate the depth
of the flowline. While the paddle is in it’s ‘undeflected’ position, the tip of the paddle should just barely
be touching the bottom of the flowline - this ensures that minimal flow can be registered.

When there is mud flow to be recorded, you may have to adjust the positioning of the counter balance, on
the arm, to give acceptable readings. For example, if you were getting a very erratic reading, you would
move the counter balance further out on its arm to give more resistance to paddle movement.

Different mud densities may also require adjustment of the counterbalance. For example, the
counterbalance may be set so that it gives too much resistance for a light weight mud to deflect it
sufficiently - it may have to be removed all together.

For a heavy mud, there may be too much deflection so that the counter weight has to be moved outwards
to give more resistance and force the paddle to sit ‘in’ the mud.

Keep a regular check on the paddle for cuttings build up in the flowline - this may ‘bury’ the paddle
preventing movement.

Calibration

When the paddle is at the point of no deflection, record the number of counts in Test Mode - this will be
your low calibration representing zero flow. When flow is present, record the number of counts and
relate this to the actual calculated ‘mud flow in’ - this will be your high calibration.

Because of the non-linearity of “tubular” flowlines and the paddle deflection related to mud flow rate and
depth, any significant changes in flow (for example, this will occur when the hole size changes, or when
there are lower flow rates during coring) will require the high calibration being reset.

44
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.13 Ambient H2S Sensors

Non Intrinsic System (right)

• 2 wire sensor, giving 4-20mA output

• Minimum 2 years sensor life

• Installed in weather proof enclosure for added protection

• Stainless steel dust


cover for protection of
sensor against dust,
oil, or wind

Intrinsic version (left)

• 2 wire sensor, giving 4-20mA output

Installation

The sensors should be located at critical areas where the mud returns
to surface, i.e. at the bell nipple, in the cellar, on the rig floor, at the
shakers and/or flowline etc. Normally, the client will specify where
they require the sensors to be located.

Since H2S is heavier than air, the sensors should be located close to ground level but, very importantly,
away from any areas where there is a possibility of water, or any liquid, coming into direct contact with
the sensor head.

Calibration

The sensors are pre-calibrated for an operating range of 0 to 100 ppm. These should be your minimum
and maximum calibration values. Check this by exposing the sensor to your calibration gas (normally
50ppm). Ensure that the gas is properly ‘reaching’ the sensor and allow a long enough exposure for the
sensor to fully react. Checking that the sensor is responding is normally sufficient, the calibration should
not need to be altered.

If you do not get the reading expected, it is not necessarily the calibration that is at fault. H2S has a
limited ‘life span’ in retaining its original concentration - this may well have dropped rather than the
calibration being inaccurate. Be certain that the gas concentration is accurate before changing the
calibration – i.e. check with a different gas sample, check the concentration against a different H2S meter
if possible (mud engineer, safety representative).

45
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.14 General Monitors S4100T In Line H2S Sensor

• Intrinsic 3 wire sensor.

• Requires 24V for power.

• Gives 4-20 mA output.

• Constant LED display showing amount of H2S detected.

Installation

Usually mounted in polyflow line in between the filters and CPU. Can be susceptible to vibrations and
shock so ideally it should be located inside the logging unit.

Calibration

Initial calibration should be carried out in operations base so the sensor should arrive in the field pre-
calibrated. If it is necessary to perform an initial calibration then the instrument must be aloud to warm
up for at least 24 hours, without the presence of H2S.

Place a magnet on the General Monitors Logo on the nameplate. Scroll through the menu by
intermittently applying the magnet until the unit displays ‘AC’, inject 50ppm of H2S into sensor and the
instrument should display ‘CP’ when it detects gas . When the instrument displays ‘CC’ stop the
injection and the display should show ‘0’ once all of the calibration as dispersed.

Check calibrations are performed by simply injecting 50ppm of H2S into the instrument, this should be
done at regular intervals, the operator may give more specific details as to the interval required.

46
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

1.3.15 Ambient Combustible Sensor

Intrinsic and non intrinsic versions.

• Measures 0-5% combustible gas.

• Both versions are 3 wire sensors, providing a 4-20 mA


output.

• Catalytic (platinum bead) sensor head

Installation

As with the H2S sensors, these sensors should be placed at


critical areas where the mud returns to surface. The sensors
are detecting combustible gases, the most important of which
is Methane. This has almost half the density of air, so the
sensor should be placed in high locations in order to be
effective. Preventing exposure to water and moisture is,
again, an important consideration.

Operation and Calibration

As mentioned, the sensor is detecting combustible gases, principally Methane.

Methane has a Lower Explosion Limit of 5% by volume. This means that if the concentration is below
5%, it cannot be ignited. Important to the rig is when the concentration exceeds the L.E.L, so that there is
then a chance of the ambient air igniting in the event of a spark.

The sensor is therefore spanned from 0 to 5% by volume. This can be used as your calibration limits (4 to
20 mA), so that you would be measuring the actual concentration by volume.

Alternatively, you can calibrate the sensor so that you are measuring in terms of the L.E.L. In this case,
your minimum calibration would be 0, your maximum would be 100%, i.e. 100% of the L.E.L. If your
reading should reach 100%, you know that your actual concentration of Methane in air is 5%.

47
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2. QLOG MUD LOGGING SYSTEM

48
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.1 INTRODUCTION TO THE QLOG SYSTEM

QLOG is the real-time data acquisition system developed by Datalog.

QLOG is designed to be user friendly and easy to understand. It uses a menu system, which can be
operated from either normal consoles or from a windows interface. From this menu system, the entire
real-time and off-line system can be accessed and operated with no command line input necessary.

Consoles and Windows

A number of 'virtual consoles' can be installed, or mounted, allowing the user to quickly change between
normal terminal screens (typically 4 are mounted, but the number can be changed) and run more than one
program at the same time. The first screen is real and the others are virtual consoles, accessed by use of
the ctrl, alt and 1,2 or 3 or enter keys held down together. Any program can be operated from any
console. This means that several programs, and/or displays, can be operated simultaneously, with
immediate access by the user. This allows for an ideal logging/monitoring environment.

The windows interface also allows for several programs to be run at the same time, through the use of
individual windows. Thus, more than one source of real-time information can be viewed at any one time,
including real-time screen plots. The same QLOG menu can be accessed through the windows interface
through 'point and click' operation of the mouse. Once opened to a window, these normal text type
programs are operated from the keyboard as they would from a normal console environment. Programs
that are designed to run only from windows will be operated largely with the mouse.

Help Files

An integral part of the QLOG system is a comprehensive catalogue of help files. These files allow new
users to quickly understand the system with instructions and explanations on how all the different
programs and functions are operated. These individual help files can be accessed simply by pressing F1
while within a QLOG program. The complete catalogue of help files can also be accessed by selecting
the ‘Help Files’ option from the ‘Other’ menu.

User Authorization and Login

When the computer system is first switched on, you will be asked to log in and enter a password. The
purpose of logins and passwords is for system security and for allowing different levels of access to the
system for different users.

User accounts need to be set up by users (superusers) already authorized to use the system. Once logged
in, you can type qlog at the command prompt to enter the QLOG menu. In QNX2, the operating system,
the prompt will be a either a $, # or %, depending on the security access given to you when your user
account is first set up. A ‘$’ sign signifies a superuser, a user that has complete access to the system; all
field mudloggers should have superuser access.

To get a login prompt from a completely blank screen (ie no prompt), press crtl-z.

The QLOG system is designed so that a number of users can use the system at any time and carry out
operations completely independently of any other user on the system. Individual users are able to select

49
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

their own preferred units with which they want to work. They can also select their own individual alarm
set points, with the alarms only being activated on consoles that that particular user is logged on to. The
system is therefore ideal for a wellsite network where the loggers, engineer and geologist etc can all
operate the system to their own specifications without interfering with each other.

QLOG menu

Most of the essential programs required to run the QLOG Data Acquisition System at wellsite are found
in the main QLOG menu, although some functions have to be started from a command prompt. Any
specific function can be added to the menu, but this could lead to a shortage of space. A default system
menu therefore contains those programs that are most often used. Programs are grouped together under 7
menu headings:

Real-time - for real-time configuration, operation and display of the real-time


system

Reports – configuration and operation of plots

Database – access to depth, time, lithology, survey and bit databases

Engineering – drilling and engineering applications including hydraulics, stuck pipe


and well control programs

Geology - geological applications including formation pressure analysis, gas ratio


analysis, calcimetry and coalbed methane programs

Other - miscellaneous applications such as unit conversion and help file menu

Setup - user and system configuration files

Each of these headings has submenus. To move around the menu, simply use the arrow keys to move
horizontally or vertically. A particular program can be accessed, or started, by pressing 'enter' with the
cursor over the heading.

To escape from a particular menu or sub-menu, use the horizontal arrows to take you to the adjacent
menu header, or use the ‘esc’ key to take you back up the menu structure you are already in. When you
are positioned on a menu header, pressing ‘esc’ will allow you to exit QLOG and put you at a QNX
command prompt.

The '...' following some menu items indicates that a further submenu exists.

Some menu items are displayed in red when viewed from a normal screen console. This means that the
particular program contains graphics and has to be run from the windows interface.

To start this interface, type windows at a command prompt. The QLOG menu will normally appear
automatically, but if not, press the right hand button on your mouse and select Programs and then
QLOG from the menus that appear on screen. The QLOG menu will then be created at the top of the
screen. The operation of windows will be dealt with more fully later in this section.

50
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Function Keys

Certain ‘F keys’ have standard uses throughout the programs in the QLOG system:

F1 help
F4 exit without saving changes
F7 to save, proceed or calculate
F8 to create plots of program data

There are some exceptions with some programs requiring an ‘H’ for help. The Word processor (penpal)
and Spreadsheet packages have their own on-line help.

Logs and Plots

Logs or plots can be depth based or time based using either of the databases stored by QLOG. This
enables both real-time and historical data to be plotted by depth or time increments. Logs can be plotted
at 1:240, 1:500, 1:600, 1:1000 scales. All logs are completely configurable in the data they contain, track
width, position, scales and whether black and white or colour. This therefore allows clients to design
their own logs/charts if they so require, or for the loggers to tailor logs to the exact specifications of the
client.

51
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.2 QLOG ADMINISTRATORS

For the entire QLOG system to be operated correctly, a number of administrative tasks need to be
running. This enables different parts of the system to operate and enables interaction between the
different components of the system.

These tasks need to be started from a command line when the system is first booted up and the user
logged in. The tasks are run by putting an ampersand (&) after the task name, which means that they are
run as 'background tasks' without output to the screen (see Basic QNX Commands). This frees the
consoles, enabling other programs to be run.

dau_admin & administers the real-time data collection and also starts the share administrator
which handles data calculation

dbadmin d=4:/datalog/dbms &


This command starts the database administrator and allows other programs to
access or read them. The “d=” part of the command also specifies where the
depth database is located, or where it should be created if it doesn’t already
exist. In this normal case, the database will be created in 4:/datalog/dbms.
Because it is not specified (“t=”), the time database files will be automatically
created in 3:/datalog/dbms.

m200admin & Chromatograph software

plot_admin & Plotting software

dbdepth & Talks to the real-time system (dau_admin) and saves depth data through
dbadmin. NOTE that all 3 of these administrative tasks have to be running in
order for depth data to be stored.

dbtime & As above but for time based data

convert & Conversions, allowing different users to use different units from each other and
from the system (defaults to metric).

upd_prof & Updates hole and pipe configuration files, real-time, as depth increases. This
allows the correct depth and profiles to be saved and restored in the case of a
system crash or reboot.

flowalarm & Sounds an alarm should the suction on the gas line become reduced or blocked.

hotback [2]3:/ & This program will copy all depth and time database data to a second node so that
a continuous backup is kept.

bgalarms & Starts the DAUhorn administrator which allows an external alarm to be
triggered.

52
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The command dau_kill typed on the command line will produce a list of current administrator tasks
running.

The same dau_kill command, followed by the program name, is used in order to shut down an
administrator task, but the user should notice that different names have to be used when ‘killing’ these
administrators.

To kill administrators, use the following commands or procedures:

dau_kill DAUadmin This should be the last one to be killed. DAUshare will shut
down automatically at the same time.
dau_kill DBadmin
dau_kill PLTadmin
dau_kill DBdepth
dau_kill DBtime
dau_kill converts
dau_kill Hotback
dau_kill m200admin Note, the m200admin name remains the same.

The “upd_prof” and “flowalarm” names also remain the same, but do not need the ‘dau_kill’ command to
stop them. They are stopped by using the slay command:

slay upd_prof
slay flowalarms

“bgalarms” and “DAUhorns” require a slightly different procedure to reset alarms or shut them down:

If the alarm has sounded, it can be silenced by any of the following commands or methods:

bgquiet will work from anywhere on the network


slay bgalarms will only work from where the administrator was started

After silencing the alarm with either of these commands, the user MUST reset the alarm set
points, otherwise alarms will not be re-triggered by DAUhorns.

Reset the alarm setpoints, either from Realtime-Controls-Alarms-Horn or from the command
“alarms +h”.

dau_kill DAUhorns shuts down the administrator

53
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.3 INTRODUCTION TO THE QLOG MENU

Any menu items that are shown here in italics will appear red in the QLOG menu, meaning that they can
only be run from the windows interface.

Here, each menu will be briefly described to illustrate the main use. The operation of individual
programs will then be described in more detail and from the viewpoint of the user arriving at wellsite and
having to set up and configure a new system and operate it in a real-time environment.

REAL-TIME

The real-time menu holds the most often used QLOG programs from a mudloggers point of view. This
menu contains the majority of programs required to run the system on a real-time basis.

It is where, for example, displays are activated; parameter alarms set; depth adjustments made; real-time
constants stored; annular profiles stored; the chromatograph calibrated and controlled; and the trip
monitor started.

Displays... Text Display


Windows Display
Historical
Real and Historical
Alarms... Personal
Horn
Controls... Depth Adjustments
Equipment
Ream Mode... on
off
Profiles... Hole
Pipe
Casing
Hole Profile
Pump Data
Real-time Zeros
Slip Thresholds
Test Mode
Set Line Wear
Set Day
Set WOB
Trip Mode... Trip Mode
Cancel Tripmode
Chromatograph..Setup
Calibrate
Tweak Calibrations
Configuration Sheet
Example Chromatogram

54
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

REPORTS

This is where logs and real-time plots can be designed, started and stopped; ‘report style’ plots activated.
It also allows calculated ratios to be defined by the user.

X-Y-Z Plots
Plotter... Configure
Plotter Setup
Start Plotter
Plot Info
Define Ratios

DATABASE

Simply, this is where the user gains access to all the different databases stored on the system; where the
user accesses the windows lithology editor and where accessory symbols can be modified or created.

Edit... Databases
Lithology
Accessory Symbols
Bits
Surveys
Well Data

ENGINEERING

This is where a variety of engineering and hydraulic programs can be accessed. Some are completely
offline, others will also access information from the real-time system in order to function.

Drill String Design... Maximum WOB/Neutral Point


Maximum Torque
Drill Pipe Collapse
Critical RPM
Hydraulic Optimization..Current Profiles
New Profiles
Drilling Optimization... Drill Off Test
5 Point Test
Pump Output
Kick/Kill
Stuck Pipe
Sticking Mechanism
Directional Analysis
Casing Design
Maximum ROP
Leak Off Test
Surge Swab
Pressure Test
Rheogram

55
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

GEOLOGY

This is where specific logging or geological analysis/calculations are performed, including gas ratio
analysis; formation pressure analysis; calcimetry; coal bed methane calculations.

Ratio Analysis
Wireline Analysis... Induction
Neutron Density GR
Sonic
Hard Rock
Thermal Neutron Decay
Dipmeter
Water Saturation
Mineral Analyzer
Coal Bed Methane
Pressure Analysis... Overburden
Overpressure
Calcimeter

OTHER

Here, the user has access to a number of miscellaneous programs such as communication programs;
spreadsheet, word processor and editor; QLOG help files and a unit conversion program.

Communications... APB
Beep
Chat
Mail
Who is Online
Qterm/Modem
Applications Word Processor
Spreadsheet
Editor
Utilities... System Activity
Drive Usage
Task Display
Unit Converter
Help Files
About QLOG

SETUP

This is where the main components of the system are set up, primarily at the start of a job. It includes
such things as sensor configuration and calibration; parameter units and decimal place settings; the
design of display screens; defining peripheral printers and defining pit system totals.

User Unit Preferences


User Decimals
System Unit Preferences
System Decimals

56
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Analog Calibration
Create Display
Printer Controls
Sensor Configuration
Invert Binary Sensors
Override Sensors
Configuration Sheet
Pit Setups

57
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4 SYSTEM CONFIGURATION – USE OF THE SETUP MENU

When a user first arrives at wellsite at the start of a new job, sensors will have to be installed and
calibrated and the system itself will have to be configured ready for use. This means that channels have
to be configured for each sensor so that the signals can be measured and processed. The required units of
measurements and decimal places for each parameter have to be selected, and each parameter correctly
calibrated. The display screens need to be created or adjusted to suit the particular job and, also,
according to the requirements of the client. Print settings need to be confirmed to ensure that the
computer can communicate with them. Individual pit totals need to be defined, etc.

This is all done through programs accessed in the Setup menu.

2.4.1 Configuring Channel Numbers

The correct channel number needs to be defined for each sensor, so that the computer will receive the
correct signals from each individual sensor. This number will relate to a particular channel number on the
DAU or ELCON board, which, in turn, will relate to a particular channel number in the junction
box/boxes that the sensors are connected to.

As an example, a portion of an Elcon configuration sheet is illustrated:

Digital Analog Card Card Junction Box Signal Name


Channel Channel Slot Type No: Chan
___________________________________________________________________
1 (IRQ1) x 1 1842 1 1 Depth Pulse
9 (BIN1) x 1 1842 1 2 Depth Direction
2 (IRQ2) x 2 1842 1 3 Pump 1
3 (IRQ3) x 2 1842 1 4 Pump 2
4 (IRQ4) x 3 1842 1 5 Pump 3
5 (IRQ5) x 3 1842 1 6 RPM
x x 4 1882 x x System Power (spare)
x x 4 1882 x x System Power (torque)
x 4 (20) 5 1012 1 7 Analog (spare 3 wire)
x 3 (19) 5 1012 1 8 Torque (electric)
x 1 (17) 6 1022 1 9 Hookload
x 2 (18) 6 1022 1 14 Analog (spare)
x 5 (21) 7 1022 1 10 Pump Pressure
x 6 (22) 7 1022 1 11 Casing Pressure
x 7 (23) 8 1022 1 12 H2S 1
x 8 (24) 8 1022 1 13 H2S 2
x 10 (26) 9 1072P 2 1 Flow Paddle
x 11 (27) 9 1072P 2 2 Analog (spare 2K pot)
x 12 (28) 10 1072T 2 3 Temp In
x 13 (29) 10 1072T 2 4 Temp Out
x 14 (30) 11 1022 2 5 Density In
x 15 (31) 11 1022 2 6 Density Out

58
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

With this configuration, Pump 3 is wired into terminal 5 of junction box 1. This correlates with the first
channel of the 3rd Elcon barrier (card slot), which in turn correlates with Digital Channel 4 on the CPU.

Likewise, Hookload is wired into the 9th terminal of junction box 1, correlating with the first channel of
the 6th Elcon barrier, in turn correlating with Analog Channel 17 on the CPU.

Pump 3 therefore has a channel number 4, and hookload is channel number 17. It is these numbers that
should then be entered into the SENSOR CONFIGURATION program in the Setup menu (program
name aconfig).

• On entering the program, the user is placed into the menu for Analog sensors.

• The sensor is selected by moving the cursor with the arrow keys and pressing F7. The following
information needs to be entered for each sensor:

Board The number of the DAU or Elcon board. Typically 1, it will only change if more than
one DAU is being used. A zero would disable that particular sensor if it is not being
used.

Channel The number, as determined above, for each sensor

AvgSize This is a dampening effect that can be applied to a signal, allowing for different time
periods, over which, a change in sensor value will stabilize. Each sensor is sampled by
QLOG 11 times a second. By applying a factor, or averaging, of 100 means that the final
signal will be averaged of the previous 100 samples. Thus, if a value changed from 10 to
20, it would take 100/11 or 9.1 seconds for that signal to change or stabilize.

The value would now begin to change, over the calculated period, but now a rolling
average is performed. In other words, 1/11th of a second later, when the next sample is
collected, the previous 100 samples are again averaged and the process updated. In other
words, the previous 100 samples are averaged every time a new sample is collected.

An Avg value of 50 would allow 4.5 seconds for the signal to stabilize
20 ……. 1.8 seconds
500 ……. 45 seconds

An erratic signal caused by MFO, for example, may require a higher averaging, whereas
the Triptank, requiring a more rapid response, should have a lower value.

Sensor Type This is just a reference to the type of sensor and has no actual bearing on the way that the
signal is processed. All sensors here are current (i.e 4-20mA current loop), except for
Total Gas, the CC/TCD detectors and Block Temperature, which are voltage sensors.
Note that voltage signals from intrinsic sensors such as the temperature and flow paddle,
are converted by the barrier to a current loop signal, so are still entered and treated as a
current sensor.

• The F2 key is used to toggle between the analog and digital sensor configuration pages.

59
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• For the digital sensors, only the board number (again, normally 1) and channel number (as described)
need to be input.

• State refers to the binary sensors (depth direction and flow switch) which are either on or off, 1 or 0.

60
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.2 Unit Selection For Each Parameter

Parameters are stored, for internal use by the QLOG system, in metric units. This cannot be changed.

What can be changed are the system units (the units that are used by system programs) and the units used
by individual users. These are the units that will be displayed throughout the entire system when a
particular user is logged into the system.

SYSTEM UNIT PREFERENCES…………………………………………….(program name userprefs)

There is no need to change these settings, because they have no bearing on user operation. They are the
units that system programs use, and because of the convert program it makes no difference what actual
units are being used at wellsite.

The units are stored in a configuration file 3:/datalog/config/units.cfg

USER UNIT PREFERENCES………………………………………………..(program name userprefs)

The QLOG system does allow for different users to have different unit selections and work on the system
at the same time, independently (note that the convert administrator task needs to be running) from each
other.

These units will be the ones displayed throughout the system, including displays, databases, plots and
logs, etc, wherever that user is logged on to the system.

• Every parameter in the database, whether directly measured or calculated, can be selected from the
program menu.

• The parameter is selected by moving the cursor with the arrow keys and using F2 or F3 to go back
and forth through the pages.

• Press F7 to bring up the unit options available, select the unit with the arrow keys and press F7 again
to save.

When a user makes a change as described above, the units file will automatically be saved in their home
directory (eg 3:/user/fred/units.cfg). This file will then be read automatically every time that user logs in
to the system.

If principally metric or imperial units are going to be selected, it may be more convenient to use one of
the default files stored on the system, rather than having to make many changes.

The files are stored as 3:/datalog/defaults/units.cfg.met


3:/datalog/defaults/units.cfg.imp

The required file simply has to be copied to ‘units.cfg’ in the users home directory. Note that, for non
superusers, file permissions may have to be changed for the user to use this file - see the attributes
section in the Advanced QLOG/QNX section.

61
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.3 Decimal Place Selection

Within QLOG, decimal place settings have two functions; firstly to determine the actual value that is
stored by the system (system decimals) and, secondly, to determine the level of accuracy that is displayed
to the user (user decimals).

SYSTEM DECIMALS……………………………………………………………(program name ranges)

These settings have to be correct in order for the correct values to be saved by the system. There are
specific settings for particular types of parameter, and if the setting is not correct, an incorrect value will
be stored.

The system functions, initially, by recording an actual number, rather than a value. The decimal place
setting will then determine the actual value that is stored.

For example, the correct system setting for ROP is 3 decimal places in order for the correct value to be
recorded. If this setting was changed to 2, the ROP value stored would be a factor of 10 greater. If it was
changed to 1, the value would be a factor of 100 greater.

The correct settings are stored as default on the system (3:/datalog/config/dp.cfg) and under no
circumstances should they be altered. Because of this, the user cannot gain access to this program from
the QLOG menu.

USER DECIMALS……………………………………………………………....(program name uranges)

These decimal settings are particular to individual users and can be changed if required. These values
simply determine the degree of accuracy to which parameter values are displayed, and do not effect the
values that are stored by the system.

The settings may therefore be changed so that the values displayed are sensible, and applicable to the
particular parameter.

For example, if C1 (methane) is being measured in %, the decimal setting should be set to 4 so that the
value displayed is accurate to 1ppm (i.e. 0.0001%). However, if C1 units were to be changed to ppm, a
setting of 4 decimal places would obviously be meaningless. In this case, the setting should be set to 0, so
that only the whole number is displayed (i.e. 1ppm).

Note that the user decimal value cannot be greater than the default system decimal value.

Again, if changes are made to the file, through the QLOG menu, the file will be automatically saved in
the users home directory as user_dp.cfg and accessed every time the user logs in to the system.

If the default metric/imperial user unit files were to be used as described above, then recommended user
decimal settings for each are also stored on the system and could be copied to the users user_dp.cfg in the
same manner as described above.

The files are called 3:/datalog/defaults/user_dp.cfg.met


3:/datalog/defaults/user_dp.cfg.imp

62
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.4 Calibration of Sensors

When the sensor channel numbers have been properly configured and the desired units selected, the user
is ready to calibrate the sensors from the Setup menu.

ANALOG CALIBRATION………………………………………………………...(program name calib)

Here, the general method for software calibration is illustrated. Calibration techniques for specific
sensors are discussed in section 1.

Only the analog sensors need to be calibrated. The digital sensors just detect pulses. As previously
detailed, the analog sensors operate on a 4 to 20 mA range - these are the minimum and maximum
signals.

QLOG converts the milli-ampage into a number of ‘counts’ for calibration purposes.

For a non-intrinsic system, 4 to 20 mA equates to 800 and 4000 counts.


For an Elcon system, 4 to 20 mA equates to 800 and 4095 counts.

This minimum and maximum range may be used for several pre-calibrated sensors, representing the low
and high calibration settings. For example:

Mud Density 500 – 2500kg/m3 (4.17 – 20.87ppg)


Mud Conductivity 0 – 100, 0 – 400mS
Mud Temperature 0 – 100degC
H2S 0 – 100ppm
Ambient Gas 0 – 100% LEL or 0 – 5% equivalent methane
SPP 0 – 5000psi (0 – 34473KPa)
CSP 0 – 10000psi (0 – 68946KPa)

Otherwise, a high calibration setting may be taken from a current signal being read. For example, if Mud
Flow Out was showing 2200 counts and the flow rate was 1.8 m3/min, this would be the high calibration
setting.
Note that current readings can be viewed in Test Mode under the Real-time-Controls menu.

Back to the Analog Calibration file:

• The particular sensor is selected, from the top part of the display, by moving the cursor with the
arrow keys and pressing F7.

• This will put you into the lower part of the display, specific to the sensor that you have selected.

• An X, in brackets, next to the sensor name indicates that the channel has been configured. If
there is a blank, you will need to follow the procedure detailed in 2.4.1 in order to configure the
channel.

63
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Line [A] shows the Low calibration , [B] the high setting. By default, you will be placed at [A] to
begin with.

• Now – the number in brackets represents the current counts being read for that channel.

• Old - represents the counts that were used in the previous calibration.

• Current – this shows the present calibration range for the sensor. Note that the range is given for
0 to 20mA and NOT 4 to 20mA.

• Press ‘enter’ to put yourself into the ‘now’ column showing the current signal (number of counts)

• Press any key to stop, and hold, that current signal

• Press F7 to accept the current counts, or change it to your desired count value. Press F7

• Type in the parameter value that that number of counts equates to, press F7. The new calibration
range will now be displayed and you should type in Y or N (yes or no) to accept the change.

• You will be returned to the main menu and now need to repeat the process to change the high
calibration setting.

The calibration range displayed is the actual high and low values of the particular parameter, for example
the number of M3 if a pit volume is being calibrated.

The calibration settings are stored in 3:/datalog/config/calibs.cfg

64
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.5 Creating Text Display Screens

CREATE DISPLAY………………………………………………………..…(program name disply_set)

This program is used to configure or change the 10 text displays selected under the Realtime-Displays
menu option, and the two ‘text’ displays selected from the windows interface. Note that any changes
made to these displays will be seen throughout the system network; they are not particular to individual
users. It is important that the parameters selected for particular displays meet, not only the needs of the
mud logger, but also, the requirements of the operator and drilling personnel who have access to the
system.

• A particular screen display is selected using the arrow keys.

• To change the title of the display, press F2, type in the name and press F7.

• To edit the display, press F7.

• To select a new parameter, first move the cursor to where you want to position it, press F6, select the
parameter required using the arrow keys, press F7 twice.

• To delete a parameter, move the cursor onto the one in question, press F2 to highlight it, then press Y
or N to confirm the deletion.

• To move a parameter, again position the cursor on the one in question, press F3, move it to the
desired position and press F7.

• Finally, before exiting the program, all changes that have been made must be confirmed by pressing
F7.

• Pressing F4 would exit the program without saving the changes.

These display configurations are stored, 2 files for each screen, in 3:/datalog/displays as:

eg screen01.des - the actual screen design


screen01.hdr - the title of the screen

Note that the first 10 display screens listed in the menu refer to the 10 screens that are selected through
Realtime-Displays-Text, and are viewed from the normal consols. They can also be opened as a separate
window in the windows environment.

Displays 11 and 12 refer to the two displays that can only be viewed in the windows environment
(Windows-Realtime-Displays-Windows). They have the advantage that the text size can be easily
changed. The default display is 11. This will automatically change to screen 12 when the trip monitor
program is started. Likewise, the display automatically reverts back to 11 when the trip program is
stopped.

65
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.6 Configuring the Printers

In order for the computer to be able to communicate with a printer/plotter, the port (normally parallel)
has to be defined in a configuration file.

PRINTER CONTROLS………………………………………………………….(program name prt_ctl)

A typical format of this configuration file is shown below:

Printer Name Port/Filename Printer Type

Report Printer [1]$lpt2 AMT


Local Printer [1]$lpt AMT
Node 2 Printer [2]$lpt2 AMT
Node 3 Printer [3]$lpt AMT
Node 4 Printer [4]$lpt AMT
Mud Log File [1]3:/tmp/mudlog
Pressure Log File [1]3:/tmp/preslog
HP680C_A $pcla_150 PCL
EPSON $esc_180_$lpt EPSON

This file contains three columns:

Column 1 The device name, whether printer or file

Column 2 Output device, whether the port name or the file name and directory path

Column 3 Printer type, typically either Epson, PCL or AMT. Currently, this column is only used
for reference, the information is not used by QLOG.

Typically, when selecting the output for prints for plots, it is the name from column 1 that appears in the
menus for such programs as Plotter Setup and X-Y-Z Plots.

Other programs, such as the Bit and Survey Databases will give you the option of selecting the Report
or Local printer, so these names should be defined, to the correct port, in printer controls.

• To edit a particular “record”, select the appropriate printer name by using the arrow keys and press
enter. This will allow you to change the port or filename in column 2.

• To add or change an actual printer name (column 1 or new record), it has to be done by entering the
program from the following command line:

prt_ctl -l

• Press F7 to save any changes or additions.

66
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The form of the entry in column 2 will vary, depending on whether you wish to print to a file, or, in the
case of a hard print, what type of printer is being used.

AMT Printers (no longer in use)

These simply require the name of the parallel port that they are connected to (including node number),
for example [1]$lpt, [1]$lpt2 or [2]$lpt.

Epson Printers (models 1500 and 1508)

The entry here has to specify the port and that an epson printer is in use, e.g.:

$esc_180_$lpt2

“esc” specifies an Epson printer which uses the ESC/P2 printer protocol

“180” sets the quality, typically 180 dpi (dots per inch), although 90 or 360 are other settings

“$lpt2” defines the output parallel port

Hewlett Packard Printers (model HP680C)

The entry here has to specify that the PCL protocol is used by the HP printer

$pcla_150

“$pcla” specifies the name of the spooler to use. This is defined in “spool_start” which also
defines the parallel port that the printer is attached to.

“150” sets the quality, 150 dpi.

For more information on the configuration and operational requirements for these printers, refer to the
Miscellaneous Applications Section.

Print to File

Plots and logs can also be printed (and saved) to a file format, rather than to a hard copy. In this situation,
the printer name could be selected as ‘mudlog’ for example, and then the name of the actual file given in
the port/filename option (eg [1]3:/tmp/mudlog).

Note that the temporary directory is used in this particular example and that the full path should be given.

67
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.7 Digital Signal Switching

INVERT BINARY SENSORS……………………………………………………(program name switch)

This program will ‘toggle’ the ON/OFF state of the digital binary sensors. There are two binary sensors
in question, depth direction and flow in (gas sample line). The program just requires you to enter the
channel number (9 or 10 respectively) and press F7 - the signal will then be inverted.

This can be done quickly from a command line: e.g. switch 10

A typical example of this is with the depth direction when using a crown sheave sensor. Once you have
installed the sensor, wired up the junction box and configured the channel, you will then check the test
mode to ensure you are getting a signal.

On doing this, you see that as the blocks are moving up or down, the computers depth is going in the
wrong direction (this is just dependent on which of the 2 proximity sensors is activated first). To correct
this, you can simply invert the signal as described.

Note that if the system was to crash, the signal will revert to its original state upon reboot and the signal
will have to be inverted again. Therefore, the long-term solution is to switch round the position of the
two proximity sensors so that the other one is activated first.

68
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.8 Simulator programs

Simulator programs are available for the digital interrupt sensors (RPM, SPM and ROP).

NOTE: These are intended for demonstration and learning purposes and Datalog certainly does not have
a policy of simulating signals at the wellsite unless absolutely unavoidable.

Rotary Speed and Pump Strokes (program name digisim)

Again, in the case of failure at wellsite, the sensor should be replaced or repaired. However, in the case
of irretrievable failure and no replacement being available, the signal can be simulated in order that
logging can continue as accurately as possible. For example, without a pump stroke counter, the system is
unable to determine the rate of mud flow (in) and circulation times. No cuttings or gas samples can
therefore be lagged to surface, and the basis of the entire mud logging operation is lost.

Use: digisim p1=70 & where p1 refers to the pump number 1 (as defined in QLOG) and
70 is the actual pump rate.

Similarly, without a rotary sensor, the drilling exponent cannot be calculated, and one of the main
pressure evaluation tools is lost.

Use: digisim rpm=120 & where 120 is the actual rotary speed

Naturally, for demonstration purposes, all digital parameters can be simulated from the same command:

e.g. digisim p1=65 p2=65 rpm=110 &

Rate of Penetration

“digisim” can also be used to simulate ROP (upward and downward block movement, in fact).

Obviously, this serves no benefit at wellsite and should NEVER be used in the event of sensor
failure. It should only be used for demonstration purposes.

Use: digisim rop=15 cycle=30 up=5 &, for example, where…

Rop =15 represents the actual drilling speed but this also depends on the calibration
figure being used in the Equipment Table.

cycle = number of ticks in one downward cycle (drilling)


up = number of ticks in the upward cycle (lifting pipe)

Depth Simulator (program name depthsim)

An easier simulator of drilling is depthsim. Simply enter the command:

depthsim & and continuous drilling will be simulated

69
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.9 Analog Signal Override or Simulation

OVERIDES……………………………………………………………………...(program name overides)

Yes, there is a spelling mistake on the QLOG system, there should be two “r’s”!

This facility can be used to provide a signal in case of sensor failure but, again, Datalog do not
recommend it’s use unless absolutely necessary. We do not advocate this for general use - the
problem should be rectified or the sensor replaced if possible.

Very few parameters would benefit from an override, even if there is no sensor output. For example, pit
volumes, flow rates, pressures, ambient gas sensors etc, are all being monitored for a specific safety
requirement, so under no circumstances simulate the reading simply to provide a value for display
and storage.

Two situations may arise when it is necessary to simulate a signal.


Firstly, if the hookload sensor fails and there is no replacement, the system is unable to determine a
WOB value. Without WOB, the system is unable to determine that drilling is taking place, therefore will
not register or store any change in depth.

Secondly, if the mudweight (in) sensor was to fail. This is used to correct the drilling exponent and to
calculate a variety of important hydraulic parameters including the ECD. With it’s failure, a lot more
than mudweight would be lost.

(Note, that if no mudweight sensor is being used, it can be simulated from the Equipment table in order
to provide a value for further calculations, but in this case, to override a failed sensor, if the Equipment
table option was used, the mudweight channel would have to be disabled)

To simulate a sensor from “override”, the actual produced counts are reproduced, rather than the value
itself. Depending on the calibration, the number of counts required to produce the desired value need to
be entered into this program.

Simply select the parameter required using the arrow keys, press F7, enter the number of counts, and
press F7 to save.

A value of -1 disables the override function.

70
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.4.10 Defining the Mud Pit Configuration

Mud pits that are performing a similar function (for example, two suction pits or two settling pits) are
often combined, or equalized. Similarly, small pit systems may all be combined to produce an overall
PVT (pit volume total) rather than independent pits. A good mud logging system needs, therefore, not
only to monitor the mud level in individual pits, but also, to monitor the mud volume in equalized pits.

PIT SETUPS………………………………………………………………..….(program name pit_status)

This program allows individual pit volumes to be added together in separate pit totals. Up to 4 pit totals
may be selected.

The program shows the sixteen possible individual pits.


For each pit the user simply enters the number of the required pit totalizer (1 to 4) next to each pit.
Press F7 to save the setup.

The following examples show how the pit volume totalizer can be used:

Example 1

The rig has 6 pits:

Pits 1 and 2 are equalized as the suction pit


Pits 3 and 4 are equalized as the settling pit
Pit 5 is the premix pit
Pit 6 is the slug pit.

The pit setup should look like Pit1 1


Pit2 1
Pit3 2
Pit4 2
Pit5 0
Pit6 0

Pits 1 and 2 are totaled as Pit Totals 1


Pits 3 and 4 are totaled as Pit Totals 2,

Note that the individual pit volumes (pits 1 to 4) are still monitored and recorded individually.

Pits 5 and 6 are left independent and not included in any of the totals

Example 2

If in the above example, we simply wanted a PVT, a total pit volume that excludes the slug pit, the
configuration should look like:

Pit1 1
Pit2 1

71
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Pit3 1
Pit4 1
Pit5 1
Pit6 0

Pits 1 to 5 are all assigned to 1 with pit 6 left as 0.

Pit Totals 1 would then be our PVT.

Unfortunately, the system is unable to handle a number of equalized pit totals as shown in example 1,
together with an overall PVT, since a pit can only be assigned to one of the pit totalizers.

72
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5 QLOG OPERATION – THE REALTIME MENU

This menu contains the majority of information required for accurate real-time monitoring and where
most day to day operations pertaining to the real-time data acquisition and running of the QLOG system
are carried out.

2.5.1 Displaying the Information

REALTIME – DISPLAYS

TEXT……….…………..…………………………………..……………………..(program name display)

There are 10 real-time displays, which can be interchanged by using the F1-F10 keys (or simply the
numerical keys 1-0). The parameters are displayed with the units and decimal place settings selected by
individual QLOG users. As shown in 2.4.5, the layout of each display screen is configurable, through the
use of the CREATE DISPLAY option under the SETUP menu.

The user should make full use of the 10 screens to ensure that all recorded and calculated data is
represented and displayed in a format that is easy to understand at a glance. For example, you would
probably create screens that include the following information:

Screen 1 Important drilling, logging and safety parameters


Screen 2 Gas values and calculated ratios
Screen 3 Pit volumes and mud parameters
Screen 4 Hydraulic calculations
Screen 5 Annular pressures and velocities
Screen 6 Pressure calculations
Screen 7 Circulating and well control
Screen 8 Tripping, casing and cementing

As you can see, 10 screens would normally provide more than enough space to sensibly arrange all of the
required data. Spare screens may be used to put together specific information for the geologist or drilling
engineer, for example.

WINDOWS……………………………………………………………………..(program name wdisplay)

These are ‘text’ displays that are designed for use in a windows environment, enabling text size to be
increased. This is of particular benefit to drillfloor monitors so that vital information can still be viewed
from a distance.
Note, that changing the size of the window will not change the size of the text (unlike many graphic
programs). The size of the text (21 – 40pt) is changed by using the controls (right hand mouse button)
and fonts option.

Other displays available in the normal text consol:

Historical Display - a databased display showing important parameters over the last 20 records.
Historical and Real - split screen display showing real-time & databased data from the last 8 records.

73
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.2 Setting User and General Alarms

QLOG has a “two-tier” alarming system. Individual users can specify their alarm settings. These will be
saved in their user directory and accessed whenever, and wherever, they log on to the system. Other users
on the network will only be affected by these alarms if they are logged onto the same computer.

In addition to user alarms, an external alarm system is available that will sound a horn and alert everyone
in range to the alarm condition. This would be utilized for such things as hydrogen sulphide gas, rather
than ordinary drilling parameters.

REALTIME – ALARMS

PERSONAL………………………………………………………………………(program name alarms)

This allows a user to set a high and low alarm on any parameter monitored by QLOG. An alarm will
sound if the value crosses the pre-set limit.

These alarms are personal for each individual user and will not affect other users on the system. They
will be stored in the users home directory in a file called alarms.cfg and accessed every time the user
logs in to the system.

• Use F2 and F3 to go back or forward through the display pages


• Use the arrow keys to select the parameter you wish to alarm
• F7 to enter, or change, values
• Enter the desired low and high values; press F7 to accept
• F4 to exit the program.

When QLOG detects an alarm condition, the computer terminal will “beep” and a red message will
appear at base of the display screen. This message will indicate which parameter’s alarm has been
activated, and whether it is the high or low alarm. The message will remain while the parameter remains
outside of the alarm limits.

If the parameter returns to within the set points limits, the message will turn white and the user can press
‘c’ to clear the message. This procedure ‘rearms’ the alarm.

If the parameter remains outside of the alarm set points, the limits will have to be reset from the Alarm
menu.

If you are in the windows display (display 11 or 12), the alarms can be set or modified, directly, by using
the mouse.
• Move the cursor so that it is “lies over” the name of the desired parameter
• Press the left hand mouse
• This brings up an alarm window where you can set the high and low limits.
• The “Enable” button has to “turned on” in order to activate the alarm.
• Finally, changes need to be saved by clicking the “Apply” button.

When the alarm is activated, an alarm will sound and the displayed value of that parameter will change
colour - red if high alarm, green if low alarm.

74
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

At the same time, an alarm box (for each parameter activated) will appear. The box is bordered green or
red, again depending on whether the low or high alarm is activated and provides a cancel option. Even if
the cancel option is selected, the displayed value will remain coloured unless the alarm condition no
longer exists.

HORN………………………………………………………………………..……(program name alarms)

This facility is to enable an external horn to be sounded when a particular alarm condition is met.

Note that the program name is the same.

For the external alarm to be fully operational, the administrator DAUhorns has to be running through the
program bgalarms (which should be started along with all other administrators – see section).

If the alarm has been activated and sounded, it can be silenced by any of the following commands or
methods:

bgquiet will work from anywhere on the network

slay bgalarms will only work from where the administrator was started

After silencing the alarm with either of these commands, the user MUST reset the alarm set
points, otherwise alarms will not be re-triggered by DAUhorns.

Reset the alarm setpoints from this program, in the same way that user alarms are set, or reset
them by using the command “alarms +h”.

75
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

REALTIME - CONTROLS

2.5.3 Depth and Compensator Adjustments

Naturally, there may be times when a depth correction is required, such as after running wireline logs,
after strapping the pipe etc. Typically, the mud logger’s depth must conform to the official drilled depth
and must be changed if required. However, if the depth is repeatedly incorrect at the end of each drilled
kelly, or stand in the case of a top drive system, then the depth calibration must be altered.

DEPTH ADJUSTMENTS…………..(program name adjustment)

This program clearly effects the real time data acquisition system and the correct storage of data. It is
therefore only to be used by mudloggers. The inputs required depend on which depth system is being
used and this is specified in the Equipment Table.

Crown or Drawworks: bit depth, hole depth and hook position


Depth Wheel hole depth

Use the F7 key to save any changes made and to update the realtime system.

Alternatively, by holding down the Alt, Ctrl and F9 keys together, the bit depth will be changed and
made equal to the hole depth. This will “force” an on bottom status, should the bit depth be slightly short
of the actual drilled depth when going back to bottom, so that the system will recognize drilling.

A tip to recognize when the bit is fully on bottom, and creating new hole, is to watch the increases in
WOB and SPP.

The WOB will gradually increase as the bit “comes” on bottom. However, pipe squat has to be taken up,
so the bit isn’t fully on bottom and making hole until the WOB has reached it’s previous value (before
the bit was lifted off bottom) or has stopped increasing at a new setting.

The SPP is slightly different. It will obviously be constant at a value depending on the actual pump rate,
but, as the bit “comes” on bottom, and the bit “bites” into the formation, the SPP will show a
corresponding increase. Again, the bit will be fully on bottom when the SPP is at the full value registered
before the pipe was lifted off bottom.

FLOATER RIGS

If the rig is a semi-submersible or a drillship (this has to be defined in the Equipment Table – see 2.5.4),
the depth adjustment file will contain a separate “section” with the following parameters that need to be
set. For full operational guidelines and instructions, see the help file (floater) and section 1.2.4.

The following parameters need to reset by pressing the appropriate “F” keys:

F2 Hole Depth TRKB


F3 Bit Depth TRKB
F5 Block Position
F6 Riser Position
F8 Compensator Position
F9 TRKB – SRKB Difference

76
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.4 Use of the Equipment Table

EQUIPMENT...………………………………………………………………(program name equipment)

This program contains essential information required for accurate real-time operation of QLOG, data
acquisition, and data storage. It should be edited specifically for the job before mudlogging commences,
and modified accordingly during the drilling of the well.

All of the constants entered into the program are stored in 3:/datalog/config/equip.cfg

The program is divided into two separate sections. On entering the program, you will be required to press
F2 or F3 depending on which data needs to be entered (the first letters, as indicated, can also be pressed):

F2 (E)quipment Settings program name equip

F3 (C)onstant Settings program name const

F2 – Site Specific Equipment

Depth Method D(epth wheel) or C(rown) or W(drawworks)

Floater Rig Yes or No

Ticks per 100 This is the depth calibration requiring an exact value. If Depth Wheel is selected,
the figure is 500. A calibration will have to be performed for the Crown Sheave
by moving the blocks up and down a known distance and recording the number
of ticks from the test mode (see 1.2.1). The calibration for the Draw works
sensor is more complicated, and the help files (dds.theory and draw_works)
should be referred to (see also 1.2.3). Note, the calibration is always
ticks/100metres even if imperial units have been selected.

Riser per 100 Calibration for the riser compensator on floating rigs (semi-submersible or drill
ship). See 1.2.4.

Comp per 100 Calibration for the drilling compensator (typically situated between the travelling
block and hook) on floater rigs. See 1.2.4.

Riser Factor On a floater rig, this is a number derived from the number of lines (and their
angle) on the riser compensator hydraulic unit. See 1.2.4.

Gas Pump Time The time (in seconds) it takes for gas to travel from the gas trap to the logging
unit. This will normally be measured by timing a test gas response on the total
gas detector. The system will add this time to the actual sample lag time before
gas data is recorded to the database.

RPM Gear Ratio Used if the RPM sensor has to be located on the drive shaft of the rotary table
where there is more than one rotation for each rotation of the table. For example,

77
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

if the rotary shaft turns 5 times for each rotation of the table, enter the value 5.
This facility may also have to be used on some top drive units.

Surface Conn Loss This is a constant that is used in the calculation of Surface Pressure Loss (i.e.
through the kelly, standpipe, etc), part of the Total System Pressure Loss
calculated by the hydraulics program. The value will range from 0.2 to 0.5, with
0.5 being a typical default.

Mud Motor Factor If a downhole mud motor is being used, this is the number of bit revolutions
produced by a unit volume of mud pumped through the motor. This will ensure
that the RPM parameter in the database includes both table and motor RPM.

Mud Motor Threshold This is the minimum amount of mud flow required to start the mud motor
turning.

DAU/Elcon Select either the DAU system which has cards for each channel, or the Elcon
system with intrinsically safe barriers (see 1.1).

Gas Detector Mode Select either C (catalytic combustion), T (thermal conductivity) or B (Both).
This determines which sensor the Total Gas Sensor parameter receives it’s data
from. During normal operation, Both should obviously be selected, but during
the calibration process, the individual detectors should be specified.

CC Switch Point Below this value, which by default should be set at 4.5%, the Total Gas Sensor
takes it’s data from the CC detector which is linear and more accurate at these
lower values. Above 4.5% (actually 5.0%, the LEL of methane), the CC detector
becomes non linear, so the Total Gas Sensor will now take it’s data from the TC
detector which remains linear to 100% methane.

CC Shut Off Point The point at which the CC detector is turned off, when not in use, to save
filament wear (5.0% default value).

TCD Step Threshold This is the maximum difference (default setting 0.5%) allowed between the CC
value and TCD value when the CC detector is supplying the Total Gas Sensor
reading (ie when gas value < 4.5%). The CC detector is more accurate at these
low values, so when the TCD value reaches 0.5% difference, it will be reset to
equal the CC value at that time. This prevents a jump in the Total Gas Sensor
value at the CC Switch Point.

CC Stabilize Time This is the time allowed for the CC sensor to stabilize (before the Total Gas
Sensor will accept its values) after the sensor is switched on (default 30
seconds).

78
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

F3 – Site Specific Constants

Start Depth The depth at which the depth database should begin. When the logging operation
starts at some intermediate depth, it is a good idea to set this value 100m or so
above the actual hole depth. This will leave a blank area at the top of logs so that
scales can be read clearly.

Avg. Stand Length Used to determine how many stands are in or out of the hole based on the current
bit depth – this is obviously of most use in trip monitor calculations for stands
pulled and stands to go. The figure will need to be changed for casing runs where
the average joint length will be required.

ROP Average Int For each record, the ROP will be averaged over the previous interval defined by
this value, for example 1m (especially if the database is being recorded every
0.2m) or 5m.

Sample Interval Used if inputting lithology via the database - the database will expect the %
lithology based on the sample interval. Since the lithology editor has a drag
facility to copy lithology, this function is really redundant and is normally left
the same as Log interval.

Log Interval Depth resolution for depth database (metres or feet depending on your user
units). The value can be changed while drilling so that greater resolution can be
given during coring for example (minimum resolution is 0.1m).

Time Interval Determines how often records are saved to the time database, typically 60
seconds with a minimum resolution of 10 seconds.

Theta Hi 600 This is the viscometer reading taken from the mud engineers report and to be
used in the QLOG hydraulics calculations. Any pair of viscometer readings
(600/300 – high shear, 200/100 or 6/3 – low shear) can be used. If the 600 is
changed here to 200 or 6, the Theta Lo value will change accordingly, to 100 or
3.

Theta Lo 300 The low viscometer reading as described above.

Rig Cost per Hour Used to determine the cost per foot, or meter, drilled.

Trip Time The time taken for a round bit trip. Again, this is used for the cost calculations as
above.

Off Bottom Dist Large amounts of heave or swell may cause a discrepancy between compensator
positions and result in the software continually recognizing on and off bottom
conditions. This parameter is intended to prevent this and should be set to
between 0.5 and 1.0m – if on/off bottom changes still occur through heavy seas,
then increase the value until the problem disappears.

79
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Mean Sea Level The main reference point for the QLOG depth system on floating rigs. It is
defined as the mean water at that geographical position and can be obtained from
the company representative or the rig captain.

Air Gap RKB This is the distance from the kelly bushing (or rotary table if it is being used by
the rig to reference all depths) to sea-level. It will also be referenced to mean sea
level and, again, can be obtained from the company representative or rig captain.

Block to Hook This should be the distance when the drilling compensator is closed.

Lag Volume Adjust This setting can be used if the hole is washed out and the lag time is therefore
greater than the calculated. The equivalent extra hole volume should be
calculated and entered. It is calculated by taking the time difference (from a lag
check), calculating the number of strokes pumped in that time, then multiplying
by the pump output.

Air Drill Lag Time For use when drilling with air or nitrogen where there is a very short transit time
from bit to surface. By entering this lag time in seconds, the lag calculated from
hole and pipe profiles will be overridden.

Pressure Gradient This is the Normal Formation Pressure Gradient for the region being drilled e.g.
1000 kg/m3 (8.33 lbs/gal, for fresh water) in Canada; 1040 kg/m3 (8.66 lbs/gal)
in the North Sea. This value will be used, as a reference, by the normal
compaction trend, in order to calculate abnormal formation pressures.

Bulk Density This is used for the real-time calculation of Overburden Gradient. It is derived,
and updated automatically, when the overburden program is run. The value
should be set to zero the first time overburden gradient is calculated for a given
well.

Mud Density Override If no density sensor is being used, a value here will enable hydraulics, ECD and
DCexp to be calculated. In order for this facility to work, any channel that has
been configured for mud density (in) must be disabled.

Formation Gradient A value entered here will override the real-time calculation of formation pressure
and is especially useful when the drilling exponent is erratic or affected by
interbedded lithologies.

Fracture Gradient Override facility as above

Kick Tolerance A value entered here can be displayed on a screen display for the benefit of
operator personnel. The value has to be derived according to the well control
manual or as per operator instructions.

Poisson factor Used in the real-time calculation of fracture gradients and is automatically
updated from the overpressure program. The value should be calculated from
offset data if using Eatons method. Otherwise, the value can be taken from the
lithological values detailed in the overpressure help file.

80
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Pressure slope This is the gradient of the Normal Compaction Trend and is generated by and
updated from, the overpressure program. Used in the real-time calculation of
formation pressure and fracture gradient.

Pressure Offset Again updated from the overpressure program, this value is the degree of offset
off the selected trend from the NCT and is used in the real-time calculations as
above. This value may be manually adjusted should trends shift due to lithology
etc and produce erroneous real-time pressure calculations.

Amps per FtLb Torque conversion for ft/lbs to amps. This is a non-linear and will require a
conversion table, or graph, from the toolpusher. The value may have to be
changed while you are drilling as torque increases or decreases - in this situation,
the ‘converts’ program will have to be stopped and restarted for the change to
take effect.

If the equipment table is accessed from the command line with the +p option (equipment +p) then the
Padding Factor can also be accessed.

This factor ensures that records are written at the specified depth interval, without extra rogue records
being produced. This factor, by default is set at 0.5 and it should be unnecessary to change it.

81
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.5 Hole and Pipe Data

PROFILES

HOLE…………………………………………………………………………(program name hole_prof)

This file allows up to 10 “active” hole sections to be entered and stored. These are hole sections that go
to make up the current annulus and do not include previous holes or casings that are now cased away.

The diameter units are dependant on the units selected for hole depth; mm if metric units are selected,
and inches if imperial. The user cannot change these defaults.

Remember, that for the casing, liner and riser sections, the diameter entered MUST be the inside
diameter since this program is used to calculate annular volumes.

The values entered are stored in 3:/datalog/config/hole.pro

The sections are entered in the same way as if you were looking at the well in vertical profile, i.e the top of
the well should be entered into the first section and the last section used represents the hole section being
drilled.

As long as upd_prof is running, the length of the hole section will automatically be updated according to
the current hole depth and casing lengths entered. The open hole section will automatically increment
while drilling is proceeding.

Edit sections by moving the cursor to the desired position, enter the value and press enter again to move
to next hole section/diameter. Sections can be inserted at the present cursor position by pressing F2, and
deleted by pressing F3.

For an offshore rig, an extra section for the riser is provided at the top of the table, casing will be in
section 0. In addition, the length and diameters of the choke and kill lines need to be entered for floater
rigs when the BOP stack is on the seabed (A jackup is the same as a land rig, with the BOP beneath the
rig floor).

The “sections of casing” facility directs programs such as kick/kill to the section containing the current
casing shoe, i.e. beneath this is open hole. I.e. if there were one casing string and then open hole, the
sections of casing value would be entered as 0.

Three examples illustrate how the hole profile program should be configured:

1. Land rig with one casing section – the shoe depth and inner diameter of the casing go into section 0,
length and diameter of open hole (bit size) into section 1. Sections of casing should be entered as 0.

2. Land rig with casing and a liner – the casing diameter is entered into section 0, but rather than the
shoe depth, the depth of the liner hanger should be entered, since this is where the casing ends and
the liner begins. The liner diameter and shoe depth do into section 1; open hole goes into section 2.
Sections of casing should be entered as 1.

82
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3. Offshore semi-submersible with one casing section – the riser is entered into the riser section
allocated; casing entered into section 0 and open hole into section 1. Sections of casing should be
entered as 0. Choke and kill line data will also need to be entered.

The F6 Recalc option allows you to update the hole profile program based on the information that has
been entered into the casing profile.

PIPE…………………………………………………………………………....(program name pipe_prof)

Drill string sections are entered here in the same way as described above, with the length, inside and
outside diameters of each pipe section (i.e. drillpipe sections, heavy weight drillpipe, drill collar
sections).

Values are stored in 3:/datalog/config/pipe.pro)

QLOG will assume that drill collars are the last entries and uses these values for internal hydraulic
calculations (ie flow regimes). The first entry (section 0 - drill pipe) is automatically corrected for the
current hole depth if upd_prof is running, and will increment while drilling.

The “sections of drill collar” value represents the number of different diameter collars that are being
used, rather than the section number of drill collars.

For example, assume one type of standard drillpipe is being used, one type of heavy weight drillpipe, and
a BHA that consists of 2 drill collar sections of different diameter:

Drillpipe is entered into section 0; heavy weight into section 1; upper drill collars into section 2 and
lower collars into section 3. Sections of drill collar should be entered as 2.

The internal volume of the pipe and annular volumes are calculated from these profile values, and
corrections are not automatically made to take account of the larger diameter tool joints for drillpipe.
You may therefore want to edit diameters very slightly to get more accurate volumes and hence lag times,
but be aware that these changes will also affect hydraulic calculations, in particular flow regimes in each
annular section.

CASING……………………………………………………………………..….(program name case_pro)

Values are stored in 3:/datalog/config/case.pro

This program is used in conjunction with the hole profile to generate graphic illustrations of the hole in
windows. Each new casing string should be entered with length, ID and OD, start depth (ie surface,
hanger etc) and install (ie hole depth prior to running the casing) depth. When the information here is
updated, the F6 option in hole profile can be used to update the hole profile.

Note that the casing profile does not affect the calculation of annular sections - this is solely done from
the hole and pipe profiles

83
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

(WINDOWS) – HOLE PROFILE………………………..…………………..(program name hole_pict)

This is a windows function, producing a graphical display of the current well profile. It reads in data
from the casing, hole and pipe profiles to produce a real-time schematic of all previous and current hole
sections.

By clicking on the appropriate sections, the user can open a window each for annular, pipe and bit
sections. Information will include dimensions, volumes, flow regimes and hydraulic parameters.

84
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.6 Ream Mode

WOB and ROP values are only displayed if the QLOG operational status is drilling and the bit depth is
equal to the hole depth.

However, this is important information when reaming, to determine the improvement in hole condition.
The “Ream Mode” facility can therefore be set to ON to provide this information.

As long as the bit depth is set somewhere between 1 and the total hole depth, the rig status will now
display 'Reaming'. The depth database will not be overwritten by changes in depth when the system is in
reaming mode. For new records to be written, bit depth must be equal to hole depth.

The status will change automatically to ‘Drilling’ when the bit depth becomes equal to the hole depth.

Selecting ‘Off’ will disengage the reaming option.

85
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.7 Rig and Riser Booster Pump Data

It is important that the system is able to determine the pump capacity (volume per stroke), since it is
required in order to determine actual flow rate, lag time, annular velocities etc.

If the volume per stroke is unknown, it can be calculated in the pump output engineering program by
inputting liner size and stroke length for triplex pumps and, additionally, piston rod diameter for duplex
pumps.

The pump capacity can then be entered into the Realtime-Controls configuration file for access by the
realtime system.

PUMP DATA………………………………………………………………….(program name Pump_set)

Values are stored in 3:/datalog/config/pumps.cfg

QLOG allows for up to 4 pumps with different pump outputs to be operational at one time. The program
requires the volume per stroke for each pump.

You should input the theoretical value determined for 100% efficiency.

In addition, you must enter the efficiency that the pump output should be calculated at. This value can be
obtained from the toolpusher or assistant driller in most cases.

Riser Booster Pump

Due to the large annular diameter in offshore marine risers, annular velocities slow down considerably
through the riser. In many cases, an additional pump is used just to provide a greater pump rate through
the riser section.

Adding a booster pump to the riser will decrease the lag time of the drilling fluid returning to surface, so
this needs to be compensated for by the QLOG system.

The information required by the pump data program is the time reduction produced by the booster pump;
in other words the time to circulate mud (with just the booster pump) from the base of the riser to the top.
This value can be obtained from the toolpusher or determined from the booster pump capacity and the
annular volume of the riser.

86
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.8 Zeroing and Re-Setting Parameters

For ease of operation, many pertinent parameters in QLOG can be zeroed or reset.

REAL TIME ZEROS…………………………………………………………(program name dau_zeros)

Triptank Gain/Loss At the start of trips for example


If the well is flowing and lined up to the trip tank
At the start of wireline logging when the well is lined up to the trip tank

Flow Gain/Loss To reset gains or losses from the hole

Weight on Bit As new pipe is added to the string, especially at shallow depths when
BHA and heavy weight pipe is being added. This should only be done
when the driller is correctly zeroing his own gauge, i.e. with the bit just
off bottom and rotating slowly. At this point, there is unlikely to be any
drag or squat acting on the pipe.

Pit System (1-4) Gain/Loss To monitor individual totalizers

Pump (1-4) Strokes To perform a lag check


To lag a sample from bottom to surface
To spot a pill, pump or displace cement
During well kill procedures

All Pump Strokes As above

Use the arrow keys to move the cursor; pressing F7 while the cursor is positioned over the selected
option will return the value to zero.

SET LINE WEAR...…………………………………………….………………..(program name set_ton)

Line wear tracks the amount of load that the drill line has been subjected to. There are strict guide lines
as to how much work can be done before the line is replaced. It is a function of the weight supported by
the line together with the vertical distance travelled. It should be reset to zero when the drill line is “slip
and cut”, i.e. the used section is cut off and discarded, and a new section is installed. The wear on the line
will then be recorded real-time, whatever the rig operation, in order to determine the next time that the
line should be slip and cut

SET WOB………………………………..………………………………………(program name set_wob)

This facility can be used to correct the WOB while drilling. The current value, as given by the drillers
console, should be entered; F7 will save the change. It can also be used to enter a zero value, i.e. to zero
the WOB at the same time the driller is zeroing his gauge (see REAL TIME ZEROS above).

SET DAY…………………………………………………………………………(program name set_day)

87
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

This facility is used to zero or reset the day number of the well. This is defined by the operator and may
represent the number of days since the rig moved on location, or, more typically, the number of days
since the well was spudded.

2.5.9 Recognizing In or Out of Slips

Slip Thresholds…………………………………………………………..………(program name defaults)

This is a display of kelly and hook weights together with hystereses (‘margins’) values. These are used to
determine whether the rig is in or out of slips and is required for connections to be recognized and for the
trip monitor to function correctly, ie to register stands being pulled or run.

If the measured weight (hookload) falls below the total weight displayed (ie combined hook, kelly and
hysteresis in) the rig status will change to 'in slips'. The status will return to ‘out of slips’ when the
recorded weight rises above the combined values of hook, kelly and hysteresis out.

example Hook Weight 10t


Kelly Weight 5t
Hysteresis In 2t
Hysteresis Out 4t

Here, the status will change to ‘In Slips’ when the hookload falls below 17t, and only return to ‘Out of
Slips’ when the hookload increases above 19t.

When the rig status is 'tripping', only the hook weight and hysteresis should be used as the slip value,
since the kelly will be racked. In practice, you would normally have to make this change in order for the
last couple (if tripping out) of stands to be recognized.

Values are entered by moving the cursor and entering the desired value, press enter to move cursor to
next position, F7 to save, F4 to exit.

Before setting the values in this program, calibrate the hookload (the threshold program will
automatically be accessed after a calibration, with calculated values of hysteresis based on the
calibration), it will need to be checked/edited after any subsequent calibrations of the hookload).

The values that will actually be used by the QLOG system are the values displayed in the ‘New’ column.
This is a value derived from the value entered in ‘Setpoint’ and may be slightly different from the value
you entered. If you want a specific value to be used, then make slight adjustments to the value in
‘Setpoint’ until you have the desired value in the ‘New’ column.

88
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.10 Monitoring Incoming Signals

Test Mode………………………………………………………………………(program name dau_test1)

This program allows the electrical signals coming back from each sensor to be viewed. It’s use is
important when rigging up, calibrating sensors and troubleshooting.

An analog to digital converter (ADC) mounted on the data acquisition card is used by the computer to
convert the 4 to 20mA signal to digital values that can be used by the computer and QLOG.

For the analog sensors, a typical DAU board will allocate 800 to 4000 counts for the 4 to 20mA signal,
whereas an Elcon barrier system allocates 800 to 4095.

The different channels are set using the sensor configuration program in the Setup menu.

The signals (for the analog sensors, listed in the two left hand columns of the test mode), both current
and counts, for each sensor can be viewed by pressing m (mode) which toggles between the different
states.

Each channel will show the following information:-


channel number
channel or sensor name
average and instantaneous signal
state, ie configured (+)
not configured (-)
override (=)
failed or disconnected (reading < 4mA) (F N/C)

The digital sensors are listed in the right hand column, with the Interrupt sensors at the top and the binary
sensors beneath. The accumulating pulses will be displayed for the interrupts and the state (whether on or
off) displayed for the binarys’.

89
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.5.11 Trip Mode

The tripmode can only be started by a Superuser. Entering tripmode will automatically start the trip
monitor, changing the rig status from drilling, or off bottom, to 'tripping'. Once the tripmode is running,
then the same tripping display can be accessed by any other user on the network. However, only the
display on the console that the program was started on will contain the function keys that are required to
operate the program. Any other display will only contain the F4 option to exit the display. The tripmode
can only be stopped (Cancel Tripmode) at the console from where it was begun.

The tripmode will display real-time information such as pit levels, bit depth, running speed, swab and
surge pressures, strokes and pressure if breaking circulation etc etc. In addition to this, every time that a
stand is pulled or run, the calculated and actual mud displacement will be recorded and displayed. This
information will be displayed for the last 8 stands.

There is a menu at the base of the screen allowing the trip to change direction, end trip, and also select
whether its a wet or dry trip. When tripping out the monitor works by detecting changes in the trip tank
volume, it then displays how many stands have been pulled.

Trip reports can be saved to file using the F2 (here, a printer and/or a file can be specified) option. The
file will be created in 3:/datalog/trips and given the name ‘tripYYMMDD.qlog (ie the date).
In addition to this recorded information, the mudlogger should make full use of real-time plots in the
monitoring of trips.

The program has many command keys, some of which are not given on the command menu displayed on
the top of the screen.

F9 toggles between the trip direction, whether in or out. When the program is first started, the
default direction is ‘out’.

F3 to chose whether stands or singles are being tripped. The default is ‘stands’.

F8 to select which pit should be monitored for mud displacement calculations. The choice is
either the triptank or the Pit Totals 1 parameter (normally defined as the suction system or
PVT as a whole - this should be born in mind when defining pit totals at the beginning of
a well).

F6 to select either a wet trip or a dry trip - ie whether a closed end or open end displacement
should be calculated.

F5 to change the ‘actual’ hole fill recorded for a particular stand. This may be required for example,
if a slug is pumped part way through a trip, or whenever the trip tank is filled since we do not
have the option of ‘triptank + pit’ for displacement calculations. The stand needs to be specified -
this is defined by the row number on the display. For example, the top row is row 0, the next is
row 1 etc. The correct fill is then entered (you should enter the number without decimal places).

NOTE that the calculated displacements will be based on the recorded depth, rather than on an average
value per stand pulled/run. Thus, if your depth is not correct, or does not track correctly, your calculated
displacements and trip record will be incorrect. This may be quite a common problem if trip running

90
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

speeds are very fast - the crown sheave sensor may simply be unable to sense each target if the wheel is
rotating too fast.

At the end of a trip, the program will either stop automatically or should be stopped by using the Cancel
Tripmode option. The program will stop automatically when, on a trip into the hole, the bit depth
becomes equal to the hole depth, or on a trip out of the hole, when the bit depth equals zero.

2.5.12 Chromatograph

Here, this portion of the QLOG menu will just be highlighted. The operation of the chromatograph will
be looked at in more detail in the appropriate section of this manual.

Setup
This is where the chromatograph can be started and stopped; where the ‘configuration’ for each column
is stored and displayed; and where the ‘Method’, such things as injection time and column temperature
are displayed.

Calibrate
This has to be run from Windows and is where particular chromatograms can be saved, then each gas
defined and calibrated.

Tweak Calibrations
Again, this has to be run from windows and is used to make small adjustments in the position of set
points selected during the calibration process.

Configuration Sheet
One of these should accompany every chromatograph to record its history. It is a printout of the setups
used when the chromatograph was last tested. This should be updated if there are any significant changes
made, or if columns are replaced.

Example Chromatogram
Displays the gas peaks analyzed with the standard columns.

91
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.6 DATABASE MENU

2.6.1 Depth and Time Databases

All parameters are recorded in both a depth and a time database. Both are in a large spreadsheet format.
The record intervals in which the two sets of data are stored is determined by the values entered in the
equipment table.

1. Time - usually recorded every 60 seconds ( minimum 2 sec)


2. Depth - usually every meter or foot (minimum 10cm)

The depth database is called dbdepth.qlog and is usually stored in 4:/datalog/dbms. The time database
is slightly different, in that a time file is created for each day. This file will have the name
timeYYMMDD.qlog (year, month, day) and is stored in 3:/datalog/dbms. Only if a particular time file
is in this directory, will you be able to view/edit the data in the database.

The QLOG system saves all parameters in metric units by default, whereas the individual user’s unit
configuration will determine how they appear on the screen. As well as containing straightforward
recorded values (ie WOB, ROP), many of the parameters are calculations using the recorded data (eg
ECD, delta temp, Dxc). Gas values and certain mud parameters are lagged before being written to the
database. The same database is used for the storage of geological descriptions, lithology percentages etc,
although this information is input by the user from windows.

On entering Edit...Databases from the QLOG menu (program name dedit), the user will automatically
be placed in the depth database.

F2 will toggle between the depth and the time databases.

Different parameters, or fields have different displayed states. This is displayed, along with other
information, at the top of the page.

Edit the parameter can be edited


Lag Adj the parameter will be lagged to surface before being written to the database
View view only, changes will not be saved - associated with ‘recalc’
Recalc a parameter that is calculated from others. To save processing time, this function
is disabled by default. Should the user need to view this data, it has to be
recalculated by pressing F9, then page up/down. All ‘recalc’ parameters can then
be viewed.
Lock No editing possible

The command options for use with the database will be shown after typing ‘/’. The command will be
initiated by moving the cursor with the arrow keys and pressing ‘enter’. When the user becomes more
familiar with the commands, he can initiate the command simply by pressing the initial letter, rather than
bringing up the menu.

92
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

g(oto) to move to a particular record number; enter number, press F7

f(ind) to move to a particular depth; enter depth, press F7

r(eference) to move to a particular parameter. Because there are so many in the spreadsheet,
each field is given a reference number to make it quick and easy to move from
one to another. The references are typical spreadsheet references. Input the
reference and press F7.

c(opy) to duplicate a particular value in preceding or following records. Note that this
can only be done for a particular parameter, you cannot copy horizontally to
different parameters. Select ‘c’, move cursor up or down to highlight the records
you want to copy to, press F7.

k(lone) duplicates an entire record to the following record ie copies every parameter for
a particular depth to the following depth interval.

o(rder) allows you to change the position of columns. This does not change the reference
of the column, only where it is displayed on screen. This allows you to have such
things as WOB, ROP, gas, torque etc alongside each other when making
geological interpretation. Select ‘o’, enter the reference of the column you want
to move, press F7, edit the number displayed (this is the order number of the
column in the database) to the number of the position where you want to move it
to, press F7. Press F4 to exit.

These changes will be stored in the user’s home directory as dedit.order, so that
other users are not affected by these changes.

Example, to move WOB into column position 2, next to RPM:

o (to select order)


r (to select reference), followed by dd
F7
edit 108 (order for WOB) to 2
F7, F4

z(oom) changes the size of the text - there are 3 settings.

i(conify) to iconify when in windows

h(elp)

q(uit)

93
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.6.2 Database Cell References

a RPM ci H
b-e SPM 1-4 cj He
f-i Strokes 1-4 ck CO
j-m Pump Vol 1-4 cl SO2
n Triptank cm O2
o-ad Pits 1-16 cn N2
ae Temp In co-dc Chrom Gas 1-15
af Temp Out dd WOB
ag Cond In de Theo HKLD
ah Cond Out df Triptank g/l
ai Mud Dens In dg-dj Pit Total 1-4 g/l
aj Mud Dens Out dk Flow g/l
ak Hookload dl-dm Ratios 1-2
al pH In dn Chrom Hydroc’bs
am pH Out do D exponent
an Sulphide In dp DC exponent
ao Sulphide Out dq Hydrostat Press
ap Heave dr Formation Press
aq Windspeed ds Surge Pressure
ar Wind Direction dt Swab Pressure
as Total Gas Sensor du-en Ann Vel 1-20
at Total Gas Chromat eo Theo Lag Time
au Torque ep Lag Strokes
av Flow Out eq Downtime
aw Flow In er Down Strokes
ax Standpipe Press es Annular Volume
ay Casing Press et Pipe Volume
az-bb H2S 1-3 eu Pipe Displacement
bc-be Combust 1-3 ev Lag Depth Gas
bf-bi Pit Totals 1-4 ew Lag Depth
bj Analog RPM ex String Weight
bk Bit Depth ey Delta Temp
bl Hole Depth ez Delta Cond
bm Ream Depth fa Delta Mudweight
bn On Bottom Time fb Delta pH
bo Off Bottom Time fc Delta Sulphide
bp Bit Revs fd Total Stands
bq Bit Hours fe Stands to go
br Bit Start Depth ff Stands pulled
bs Bit Start Time fg Trip Direction
bt Cost/m fh Running Speed
bu Hook Position fi Fracture Grad
bv Slip Status fj Overburden Grad
bw Rig Status fk TVD
bx ROP fl Normalised Gas
by Instantaneous ROP fm Ton Miles
bz-cf C1 - C5 fn Total Circ Time
cg CO2 fo Circ Volume

94
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

ch H2S Chromat fp Total Circ Strokes


fq ECD la Gas Flow Out
fr Bit HHP lb Impact Frc Area
fs Bit Press Loss lc Molar Mass
ft Bit HHP/Area ld Gas SG
fu Nozzle Velocity le Hole Drag
fv Impact Force lf-ml Blank
fw % Ploss at Bit mm-mq Comments 1-5
fx Total HHP mr-na % Lithology
fy Lag Time nb Interpreted Lith
fz-gs Reynolds Ann 1-20 nc-nd Porosity 1-2
gt-hm Pressure Ann 1-20 ne Porosity Type
hn-ig Pressure Pipe 1-20 nf-ng Fluorescence 1-2
ih-ja Reynolds Pipe 1-20 nh Grain Size
jb Total Press Loss ni Rounding
jc-jl Pipe Weight 1-10 nj Sorting
jm Ann Press Loss nk-nl Lithology Comments 1-2
jn Pipe Press Loss nm Total Cuttings Gas
jo Mud in hole nn Calcimetry LST
jp Wet Ratio no Calcimetry DOL
jq Balance Ratio np Formation Factor
jr Character Ratio nq Shale Factor
js Hook Speed nr Shale Density
jt UD1 Sonic ns-nt Fossils 1-2
ju UD2 Resistivity nu-nv Minerals 1-2
jv UD3 Gamma nw-nx Oil Shows 1-2
jw UD4 Bulk Density ny-nz Geological 1-2
jx-ka UD 1-4 oa-ob Engineering 1-2
kb-ke User Ratios 1-4 oc-ox Index 1-22
kf Ratio Analysis
kg Calc FID Gas
kh Calc Hotwire Gas
ki Calc Est Porosity
kj Day Number
kk Sigma
kl CC Gas Sensor
km TCD Gas Sensor
kn Block Temperature
ko Average ROP
kp Pason Flow Out
kq Total Strokes
kr Table RPM
ks Mud Motor RPM
kt-kz User Defined 1-7

95
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.6.3 Lithology Editor (lithed)

This program can only be run from windows. It enables the user to enter information such as percentage
and interpreted lithology, lithology descriptions, accessory symbols, fluorescence, porosity, grain size
etc. by a simple point and click method utilizing the mouse.

On entering the program, the user will be located in ‘% lithology’. Use ‘mode’ to toggle between % and
interpreted lithology. For each mode, you will notice that there is a text column, porosity, fluorescence
etc - this relates to the 2 columns in the database ie porosity 1 and 2.

Use mode to toggle between fluorescence and grain size.

Select lithology by clicking on ‘NA’. This brings up a menu of the lithology symbols. Click on the one
you want. This can then be input into the lithology columns simply by clicking on the mouse again.

The two symbols at the bottom left of the main window allow you to toggle between ‘lithology input’
and ‘drag and click’. ie the second option allows you to copy blocks of lithology to following records.

After inputting the % lithology, the different types will be automatically placed in the correct order -
either when you change on to a new line, new page, or select the drag option.

The arrow symbols allow you to move up or down. The larger symbols move by a page, the smaller ones
by 5 records. Any changes made in the editor will only be saved when you change page, although if you
forget to do this, you will be prompted to save when you quit the program.

Accessory symbols can be selected by moving your cursor over the accessory column to the right of the
main window. A column for each of the 5 accessory types will automatically appear. Each group has 2
inputs available for each record interval. Using the right hand mouse, click on the record and accessory
group required - a menu of the symbols will be displayed. Simply click on the symbol required. Moving
your cursor back to the left side of the window will close the accessory menus.

2.6.4 Accessory Symbols

A program allowing the editing and construction of accessory symbols. These symbols are in 5
directories:
Fossils
Minerals
Oil Shows
Geology
Engineering

Load the directory of files you wish to edit (File...Load), click on the particular symbol to be changed,
pick up the pencil or eraser by use of the mouse and edit as required. Save when finished (File...Save).

To create a new symbol, select ‘Symbol...Add’, give the symbol a name, create it using the pencil and
eraser as above, save when completed (File...Save).

Selecting ‘Symbol...Gallery’ shows all of the symbols in the current file.

96
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.6.5 Bit Database

(stored in file 3:/datalog/dbms/bit.dbase)

The bit database works in 2 principal ways. Firstly, it gives information to (eg bit size, jet sizes), and
takes information from (eg bit hours, bit revolutions), the real-time system. Secondly, it provides a mean
of storing all of the details pertaining to individual bit runs; these details can then be printed out in a
report format.

A new bit run is started by entering ‘0’ in the Bit Run Number. You will be asked to confirm whether
you want to append a new bit - you should enter Y. A new Bit Run will be initiated, and given the next
number in the sequence.

For the bit database to function correctly on the real-time system, a minimum amount of information
must now be entered:-
Bit Number, and whether a re-run
Bit Size
Jet Sizes*
Whether a mud motor is in the BHA

* the jet sizes should be entered in mm if metric depth units have been selected, and in 32nds of an inch
if imperial depth units have been selected.

The ‘Time in’ and ‘Depth In’ will be automatically taken from the real-time system.

By pressing ‘F7’, this information will be saved, and the bit database will begin recording the Bit Run
real-time ie the time and depth will increment, along with bit hours and revolutions.

The remaining information, such as bit type, serial code, comments etc is not needed for the real-time
operation of the database, but will obviously need to be entered in order for a complete report to be
generated from the database.

When the bit run is completed and you need to stop the bit database from running, you should proceed as
if to enter a new bit run, ie enter 0 to append and enter Y to confirm. If you want to start the following bit
run immediately, proceed to input the information and press F7. If you just want to stop the present bit
run and not begin a new one, you should just type F4 after you have confirmed that a new run should be
appended. This will stop the present run, but not begin a new one - this would be required at casing
points for example.

When a bit run is stopped, the time and depth will be confirmed, bit hours and revolutions confirmed and
stored. Bit Run averages will also be automatically calculated from the depth database. These will also be
printed out in a final report format.

To print the report, you should type F2, then R or L to define whether the output is to the report or local
printer.

97
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

POINTS TO NOTE

• All information in the bit run pages can be edited once the run has been completed and saved.

• Once a bit run has been added and saved, it cannot be deleted. You should therefore be sure before
stopping and starting bit runs.

• Revolutions due to a mud motor will not be incremented in the Bit Rev part of the database - only
Table RPM is included. This can be approximated at the end of the bit run by multiplying the average
RPM (which includes both) by the total number of ‘on bottom hours’ x 60.

• If ream mode is run, the number of reaming hours will be included as On Bottom Hours. When the
bit gets to bottom and begins drilling, this should be corrected.

98
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.6.6 Survey Data

(stored in 3:/datalog/dbms/survey.dat)

This program requires the basic directional survey information (measured depth, azimuth and inclination)
in order to calculate directional information by way of the Minimum Curvature Method.

As with the bit database, to enter a new survey, you should enter 0, followed by the survey information.
The azimuth should be entered in a N...E format (QLOG will automatically convert it to the correct
compass direction).

Press F3 to save and F7 to recalculate. This will update the directional calculations displayed in the data
file and also update/correct the TVD’s in the depth database should they be inaccurate.

F5 can be used to insert or delete survey records.

F8 would then produce a series of directional plots that can accessed through windows via Reports...X-
Y-Z plots:

surv_nview.plot well profile viewed looking north


surv_wview.plot well profile viewed looking west
surv_tview.plot plan view of the well
surv_3Dview.plot 3-dimensional profile of the well

The 3-d plot can be modified by the user, whereas the others are default:-

Alt F8 to edit the 3-d information:

- Elevation and Direction from which the well is viewed


- Start Depth (default is 0, but you could select the Kick Off Point for example)
- With or without Impulse - ‘With Impulse’ drops a vertical line from each survey point,
and is useful in highlighting degrees of curvature in a wells profile.

The plots can also be plotted in conjunction with the target:-

This, first of all, requires the necessary target information to be entered into the database (eg target
direction, radius, and departure etc) by selecting F6 - the Plot with Target function must be set to YES.
Secondly, a target data file has to be created by using the editor. This file
(3:/datalog/plots/data/target.dat) should contain 3 columns; North-South co-ordinates, East-West co-
ordinates, and TVD. Thus, the whole of the projected well profile can be entered and plotted alongside
the well drilled. The last record will be assumed to be the target and a Target Radius will be plotted
around it. Should you only require the actual target to be plotted, then enter just the one record in your
data file.

NOTE that when either of the ‘sub-menus’ (target info or 3D info) are altered, the F3 function should be
used to save the changes.

99
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

A directional report can be generated by selecting F2 and defining either the report or local printer
(remember that these should be defined in Setup...Printer Controls).

Tie-Ins

Should the wells reference point not be the wellhead, but is in fact a Tie-in point, then the user has to
force the first record in the database and adjust accordingly the directional information for that record.

• Enter 1 in the Survey Number field


• Press Alt-F6 to allow editing of the ‘calculated’ directional data.
• Enter the TVD and the North and East co-ordinates
• Press F7 to save and recalculate.

2.6.7 Well Data

(stored in 3:/datalog/config/tomb.dat)

This file contains specific well information that will be automatically used for final log headers. Because
of this, users should be careful with the syntax they use for information.

There are 4 pages of information:

Page 1 General Well Information (location, well number, spud date etc)
Page 2 Mud data.
Page 3 Casing data
Page 4 Hole data

F2 and F3 are used to go back and forth through the file, F7 to save changes.

100
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.7 REPORT MENU

2.7.1 X-Y-Z Plots

This option can be used to access plots that are created automatically throughout the QLOG system, or
indeed, plots that are created by the user.

Examples of QLOG plots: - survey plots (Database...Surveys)


gas ratio plot (Geology...Ratio Analysis)
pressure plots (Geology...Pressure Analysis..Overpressure)
engineering plots eg Swab Surge
Leak Off Test
Kick Kill

The program needs to be operated from windows: -

• Click on the required plot with your mouse


• Select the ‘open’ option
• Select window or plotter output (remember that a plotter can be defined as a file in the printer
controls table - this enables you to save a plot to file).

By default, these plots are large format. Should you be plotting for a final report, you will need to change
the set ups on the plotter. Set horizontal and vertical scales to 50%. You may also want to change pen
colours for better presentation.

2.7.2 Plot Configuration

(program name config2)

This is where we can design the layout for real-time plots and/or final logs. One huge advantage of the
QLOG system is that we are able to exactly tailor a log to meet the clients requirements.

On entering the program, you will be shown a list of all the plots/logs presently on the system. Select one
of these by ‘edit’, then moving cursor to desired log and pressing ‘enter’. Should you wish to create a
new log, select ‘new’ and enter in the name of the log, press F7.

There are then 2 parts to the configuration editor.

Firstly, there is the Header Page (F6 to edit) that creates a file called logname.extra in
3:/datalog/script.

Secondly, there is the design of the log itself (F7 to edit), creating a file called logname.script in the
same directory (logname refers to the chosen name of the plot or log).

101
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Edit Header

(creating “logname.extra” file)

There are 3 components to this. The ‘Title’ and ‘Comments’ sections are both printed out on the log
header page. The ‘description’ is for reference only, providing a description of the log when you are in
the first, main menu of this program.

Edit Chart

(creating “logname.script” file)

The ‘chart’ is the name given to the column on the log. Within each column or chart, a certain number of
parameters will be plotted or printed. The name given to the parameter is the ‘channel’. There are then 2
components to this section of the program:

1. configuring the charts


2. selecting the channels within each chart.

Initially in the ‘chart configuration’ page, you can add, delete or move charts by positioning the cursor on
the chart number and pressing enter - your option can then be selected.

To get to the ‘select channels’ page, move the cursor down the chart menu to the #Channels option and
press enter. Channels can be added/deleted etc in the same way as detailed above.

Chart options:
Divisions The number of main divisions within the column or chart
Ticks Subdivisions within the divisions above
Width (cm) Width of the column - the total width of the log is shown at the top of
the page - this will depend on the size of your paper
Spacing (cm) Inserts a space on the right hand side of the column
Border colour Colour of borders and divisions - Default black
Grid colour Colour of the ticks - Default yellow
Type Linear, Log or Text*
#Channels Shows the number of channels or parameters that have been defined for
this chart - press enter here to go into the channel selection option.

* The text option here could be selected for parameters such as pit levels or ROP - the values
would then be printed out rather than plotted. This is a very useful addition for real-time plots.
The text option does not need to be selected if a text parameter has been selected in the channels
option - the system will recognise this by default as a text parameter.

If a log scale has been chosen, the number of divisions has to be the same as the number of
cycles in the log. For example, if gas has been chosen with a scale of 0.01 to 10.0%, there are 3
cycles in the log, therefore the number of divisions has to be 3. This is a common source of error.

102
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Channel Options:
Right Bound > left and right scales - you can have the scale increasing to the
Left Bound > right or to the left as required. Take care with log scales - do not have
them starting at zero; this is another common source of error.
Strip Colour Colour of the curve
Plot Method Histogram or Point to Point
Source Press enter here to bring up the menu of the parameters - cursor to the
one required and press F7. This should be done before selecting scales,
plot method etc. If a text or similar parameter is chosen (eg Comments,
LithComm), then the system automatically recognizes that and leaves
scales and plot method blank.

Once you have made all the changes, use the ‘save’ option before exiting the program. The next step is to
create the control file which will define whether the log will be time or depth based, real or historical
data, speed, vertical scale, output etc etc.

103
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.7.3 Plotter Setup

(Program name “starter”)

This set up menu is where the control file for the log is created. This will then create a 3rd file (in
addition to the script and extra files already detailed above), called logname.ctrl in 3:/datalog/script,
required for a log to function.

The command options with which to run this program are detailed along the bottom of the page - simply
cursor along to the appropriate one and press enter.

• The first thing on entering the program is to either select, or define a new, control file. Select Ctrl,
then select ‘new’, enter the logname and press F7. If selecting an existing control file, the previous
settings will be restored from when the file was last altered.

• Select the appropriate Script file

• Define what type of plot you require by entering on a combination of the following:

Dbase, Real, Depth, Time - this gives you these possible combinations:-

Databased - Depth or Time


Real - Depth or Time

• You should then select ‘Edit’ to set up scales and speeds etc. If a time based plot has been selected,
you will principally be concerned with the plot speed and will be editing the left side of the control
page. If depth has been selected, you will be concerned with scale, start and end depth, and will be
editing the right side of the page.

Depth Depth Scale normally 1:240 or 1:500


Start depth
End depth
m/tick interval at which depth will be printed on log
ROPAVE interval over which to average ROP - normally left as 0
Samples/plot normally left as the default 5

Time cm/hour speed speed at which paper runs through plotter


normally 20 or 30 cm/hr
plots per hour normally 60 or 120 ie once a minute or every 30 seconds
start time
end time
samples per plot this affects the granularity of the curve; the higher the
number, the smoother the curve.

Operation of plots per hour and samples per plot

For real-time plots, the combination of speed, plots per hour and samples per plot affects how smooth
plots will be, but also how much work (ie data storage and processing) is being done to slow the system
down. Speed obviously has the same has scale on depth based plots.

104
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Examples
Plots/hr Samples/plot Plot Frequency Data storage freq.
60 5 1 min 12 secs
60 10 1 min 6 secs
120 5 30 secs 6 secs
120 10 30 secs 3 secs

You therefore have to be careful that you do not overload the memory buffer on the plotter ie if the plot
frequency was larger (less often) but data storage was more frequent, then there may be too much data
for the buffer to hold and data would be lost. The maximum number of ‘data packets’ that the plotters
buffer can hold is 35.

If the plot was time-databased, then the plots per hour should be set to 60 if the time database is at 1
minute intervals. ie 60 plots/hr is 1 plot/min, the same as the database interval. No difference would be
made if a value <60 was entered, but if a value >60 was chosen, extra plots would be created.

For real-depth plots, it depends on the scale chosen, whether metric or imperial, and on samples per
plot.

Metric units; if the scale is < 1:500, plots will be every 1m


> 1:500, plots will be every 5m

If samples per plot were set at 10 in the above cases, then there would be one data point for every 0.1m
and 0.5m respectively. Increasing the samples per plot would increase the granularity.

Imperial units, if the scale is < 1:500, plots will be every 5 ft


> 1:500, plots will be every 25 ft

For depth-databased plots, the samples per plot makes no difference.

If plots are output to a windows screen, the samples per plot affects the amount of information shown
in the screen window. For example, if the samples per plot were set too low, only a portion of the
window will contain data. In order for information to cover the whole window, the samples per plot
needs to be increased.

The determination of this value is really by trial and error. The software is designed with a 20cm window
in mind, but the data required to ‘fill’ this window is dependent not only on speed/scale, plots per hour
and samples per plot, but also on the number of columns and the number of channels.

All types of screen plot are affected in this way ie whether databased, real, depth or time.

Should you start a plot running and only a portion of the window is taken up by data, simply increase the
samples per plot and restart the screen plot. Repeat this until the full 20cm is occupied.

105
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Control options continued: -

• Plot - either to end point (end depth selected) or to end of database.

• Black and white or Colour - different lines will be given different symbols if B/W is selected

• Out - the output device - you will be given the list as defined in Printer Controls from which to
choose.

• Head - toggles between header and no header ie to print with the log

• Wr - Write. Once all the changes have been made, even though many of the steps have required an
F7 to save, the file must be written to disk in order for all the changes to be saved.

106
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.7.4 Starting and Stopping Plots

There is a windows or a ‘text console’ facility for doing this.

• Start Plotter is the windows function. On entering, you will be given a list of all the control files
that are on disk. Select the one required and open - you will then have the option of selecting a
window or plotter output. It makes no difference here if the output is configured as a plotter in the
logs control file; by starting the plot with the windows option, any plot can be output to screen.

• Plot Info is the ‘normal’ facility.


F7 allows you to start a plot
F2 allows you to stop a plot (you may have to clear the plotters buffer if a large
amount of data is stored)
F3 will temporarily suspend a plot, and
F8 will resume it.
F5 allows you to put a text comment on a real-time plot (the script file has to be
configured for text to be able to do this)

When using these commands, the plot is normally referred to by the ‘slot number’. This is simply an
ordered number assigned by ‘plotinfo’ when plots are started. Commands have to followed by an F7 for
them to be carried out.

For each plot that is running, the following information is displayed:-

Node node that the plot is being run from (not necessarily the same as the node
that the printer is connected to)
Tid task identity number assigned when the plot is started
Script file
Control file
Device where the plot is being output
Status Active - data being sent to the plotter
Suspended - after using the F3 option
Doomed/Pending - after using F2 to kill the plot, the status will be
doomed until all ‘buffered’ data has been cleared.

2.7.5 Defining User Ratios

QLOG can have up to 4 User Defined ratios, primarily designed for gas analysis but able to use any
combination of 2 parameters. These ratios are stored in reference columns KB - KE. These ratios are not
stored in the database, but are ‘recalc’ parameters. There is therefore no reason, even though it is unlikely
in practice, why the ratio cannot be redefined part way through, or even after the completion of, a well.
When the F9, recalc, facility is used, the newly defined ratio will be read by the system and the ratio
calculated from it.

If the user does use the User Ratio facility, then the configuration file should be saved along with all the
well data. The file is called 3:/datalog/config/ratio.cfg

107
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.8 ENGINEERING MENU

The programs in the engineering suite may draw their information directly from the real-time system, or
maybe offline with the user entering the information, or maybe a combination of the two. There are
several programs that can help evaluate drilling and hydraulic parameters as well provide monitoring and
calculations for pressure tests or well control situations.

The user should become familiar with how the important or often used programs function so that they are
able to respond effectively at wellsite. The programs are simple to use, being principally menu driven,
requiring the input of numbers and pressing the calc F7 key !

2.8.1 Drill String Design

Maximum WOB and Neutral Point

This calculates the available bit weight (maximum weight that may be applied) and the neutral point
(where stress changes from tensile to compressive) of the current drill string design.

While the string is suspended, the stresses will be tensile throughout, but will become compressive when
the bit hits the bottom. The neutral point will move further up the string as more weight is applied to the
bit. The reality here is to keep the neutral point within the drill collar section since drillpipe could not
handle being in compression. To make sure of this, the normal is to ensure that the top 10-15% of the
drill collar section remains in tension.

Maximum Torque

This program provides an approximation to the actual torque delivered to the drillpipe while drilling. It
would be used when the torsional strength of the drillpipe becomes critical during the drilling of deep
+/or deviated holes or during reaming. The calculated value should not exceed the make up torque of the
tool joints.

Drill Pipe Collapse

This program calculates the collapse pressure of drill pipe at any given depth, should the annular pressure
exceed the pressure inside the string. The program can also be used to calculate the hydrostatic pressure
at any depth by setting the mudweight in the drillpipe to zero, and making the depth to fluid top in the
drillpipe as the required depth.

Critical RPM

This program calculates, for a given section of drillpipe, hevi-wate drillpipe or drill collar, the critical
rotary speeds that would lead to nodal and/or pendulum vibrations and therefore poor drilling conditions
and excessive stress on the pipe.

108
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.8.2 Hydraulic Optimization

Current Profiles (onhyd)

This is an optimization program that works based on real-time information such as pump output, mud
density and pressure losses. These values can be changed should a change in parameters be the reason for
running the optimization program. The minimum and maximum jet velocities are suggested values. The
program can then be run to give you the parameters required for optimum hydraulics based on both
Hydraulic Impact Force and Hydraulic Horsepower at the bit.

Impact Force relates directly to the erosional force of the drill fluid and is therefore good optimization for
bottom hole cleaning.
Hydraulic Horsepower optimization generally requires lower annular velocities so that flow type is more
likely to be laminar.

New Profiles (offhyd)

This program is offline so that you can input any hole and pipe profiles, mud parameters, flow rate and
jet size and calculate the resulting hydraulic parameters such as pressure losses, flow types, annular
velocities etc. This program would be used when pre-determining the correct parameters for a new hole
section or bit run. By changing the inputs, you can attempt to optimize the hydraulics.

To optimize for hydraulic horsepower, the %HHP at the bit should be 65% of the Total HHP. Since HHP
is determined by pressure loss, this equates to Bit Pressure Loss being 65% of the Total System Pressure
Loss.

To optimize for hydraulic impact, the %HHP at the bit should be 48% of the Total HHP.

2.8.3 Drilling Optimization

Bit Planning

By inputting information from the bit records of up to 4 offset wells (bit size, cost, depth out and rotating
hours), together with trip times and rig costs, parameters can be selected to give the lowest drilling costs.

Drill Off Test

This program requires data from physical drilling tests in order to determine the optimum WOB. This is
defined as the weight above which the ROP does not increase in proportion to WOB increases.
The test should be conducted with optimum and constant RPM and hydraulics. A known interval is
drilled with constant WOB and the time taken is recorded. This is repeated for incremental increases in
the WOB. This information is then entered into the program and the optimum WOB determined.
Use F8 to produce a plot.

5 Point Drill Test


This program calculates the drillability constants Threshold RPM and RPM exponent required for
drilling optimization and bit life expectancy. The program requires intervals of homogeneous lithology to
be drilled with combinations of low/high WOB and RPM and the ROP recorded. This information is
entered into the program and the constants calculated.

109
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.8.4 Pump Output

Determines the pump output or capacity for both triplex and duplex pumps. Remember, for duplex
pumps, you need to know the piston rod diameter in addition to liner length and diameter. If you are
calculating the value in order to enter it into the Pump Data configuration file used by the real-time
system, you should calculate the output at 100% efficiency.

2.8.5 Kick/Kill

This program takes data both from the real-time system and from user input. Any data taken from the
real-time system can be edited if required.

There are 2 pages of data required in order to run the program; use F5 to go to the second page.

Page 1 Data

Pump speed and pressure for Slow Circulation Rates. These should be performed regularly by the
driller and the mudlogger should update this program every time they are performed. The pump output
will be calculated automatically from the pump speed and the output stored in Real-time-Pump Data. Use
‘enter’ to update the calculation.

Pump to use - ie which pump are they going to use to circulate kill mud.

Drillpipe and Annular Capacities - calculated automatically from hole and pipe profiles.

Original Mudweight - taken from the real-time system.

Trip Margin - enter the required pressure if a certain overbalance on the kill mudweight is required.

Down Strokes and Lag Strokes - calculated from the current profiles, but will only be updated if the rig
is circulating and the system is registering pump strokes. Since, when running this program, the well is
likely to be shut in, you may have to enter the correct strokes.

Casing Burst Pressure - obtain from the drilling engineer

Depth of Last Casing Shoe - this will be taken from the hole profile but remember that this will be
measured depth. If the well is deviated, the True Vertical Depth should be entered here.

Formation Fracture Gradient - taken from the last Leak Off or Formation Integrity Test.

Page 2 Data

Shut in Pressures (drillpipe and casing) - taken from the driller when the well has been shut in and the
pressures stabilized.

Pit Volume Increase - ie pit gain due to the kick.

110
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Pit Volume Total - this should be the total of the pits that will be used to make up and circulate the kill
mud. This volume is required to determine how much barite is required to increase the mudweight.

Total Vertical Depth - taken from the system, it may need to be edited if the kick does not occur at the
bottom of the hole.

Kill Method - 1 for Drillers, 2 for Wait and Weight, 3 for Concurrent

Stroke/MW increment - For the Drillers and Wait and Weight methods, this is the stroke increment for
the pressure step down when the kill mud is being circulated to the bit (as the kill mud goes from surface
to bit, the pressure should be reduced from the Initial to the Final Circulating Pressure).
For the Concurrent Method, it is the incremental increase in mudweight that should be entered - the
program will then determine how many circulations will be required.

Options

F7 to calculate: Initial Circulating Pressure


Kill Mudweight
Final Circulating Pressure
Maximum Allowable Casing Pressure
Total Barite Required
Sacks of Barite to Add
Fluid Invasion Type

Trip Margin Mudweight ie kill mudweight + increment necessary to


give the defined pressure overbalance
Trip Margin Sacks (of barite)

F3 for Table: Driller/Wait and Weight - table of strokes vs pressure for the pressure
step down (Initial to Final) as the kill mud is circulated to the bit.

Concurrent - for each circulation required, the final pressure is shown

F2 to Print: Prints out the table above

F8 for Plot: Shows pressure reduction vs strokes for the above step down.

111
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.8.6 Stuck Pipe

Determine Depth Stuck

The program will determine the depth of the stuck pipe from the inputs; weight of pipe (here, enter the
weight/unit length of the drillpipe - the program assumes that there will be no stretch in drill collars),
pipe stretch, initial string weight and stretch string weight.

Determine Sticking Mechanism

This program is run from windows. By answering the questions related to pipe movement prior to and
after sticking, rotation and circulation after sticking, the program will determine which type of sticking
mechanism is involved (pack off, differential or well bore geometry) and give the correct procedure with
which to free the pipe.

This program is based upon the Amoco TRUE (training to reduce unscheduled events) course for stuck
pipe.

2.8.7 Directional Analysis

This is the survey database (ie same as Databases-Surveys)

2.8.8 Casing Design

The user must input the casing specifications obtained from the manufacturer. The program will then
calculate the maximum allowable pressures exerted on the casing to assist in the planning of casing
programs. Collapse and Burst pressure are critical in casing design.

2.8.9 Maximum ROP

This program calculates the maximum allowable ROP before the formation is subject to breakdown due
to the extra density caused by cuttings overloading the drilling fluid.

The Cuttings Transport Ratio is the ratio of cuttings velocity to annular velocity and is typically 0.7

The Maximum Mud Density is the equivalent fracture gradient of the formation and is taken from the
real-time system. You may want to edit this value should you be concerned with fracturing the formation
at a weaker zone, the last casing seat for example, rather than the current depth.

112
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.8.10 Leak Off Test

This program will read and record the pressure changes real-time and, at the end of the test, will calculate
the fracture pressure and equivalent mudweight. By default, the casing pressure sensor will be the one
monitored for pressure readings, so you should ensure that the test is being conducted on the same
manifold as your sensor.

Required information: -

Sampling interval, ie how often data will be recorded. Input by the user, typically 5 seconds.

TVD - taken from real-time system hole depth - this may need to be edited for the depth of the test

Mud Density - taken from the real-time system - this may need to be edited to show the value determined
by the mud engineer and thus the value to be used for calculations.

Mud Pump or Auxiliary pump

Pump number to use - the pump output can then be determined from the pump data file.

Volume or Time - the parameter that the pressure will be plotted against. If Mud Pump is selected
above, you can select either volume or time so that the pressure will be plotted against either the mud
volume pumped or time; if Auxiliary is selected, you have to select time here, since you will not have a
stroke indicator.

Once all the data has been entered, press F3 to start. The program will then start collecting data based on
the sample interval selected.

Once the test has finished, press any key to stop the data acquisition.

Press F7 to calculate. The program will determine the maximum pressure recorded, and from that it will
calculate the Fracture Pressure and Equivalent Mud Density.

Use F2 or F8 to produce a printout or plot of the test.

2.8.11 Surge Swab

This program is used to determine the pressures induced by the defined maximum and minimum running
speeds of the pipe. Thus, a safe speed can be deduced in order to avoid excessive pressures.

Required information: -

Bit depth and hole depth - read from the real-time system, editable if required.

Current surge/swab pressure - read from current recorded pressures, editable if required.

Current Flow In - read from real-time system, editable if required.

113
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Use Current Profile - ie current hole and pipe profiles, the user should select Y(es).

Maximum and Minimum running speed - limits defined by the user. Negative values should be used in
order to calculate swab pressures. For example, for surge pressure, the minimum running speed may be
5m/min and the maximum 50m/min. For the same limits, the swab calculation requires the minimum to
be set at -50m/min, and the maximum at -5m/min.

Current running speed - read from real-time system, editable if required.

Press F7 to calculate the maximum and minimum pressures.

Press F2 to print the data out.

Press F8 to produce a plot. The plot will be pressure against running speed and will show the pressures
against the max/min limits defined together with the current pressure/running speed situation.

2.8.12 Pressure Test

This program operates in exactly the same way as the LOT program described above. The program is
intended for use during BOP pressure tests or casing integrity pressure tests. As in the Leak Off program,
pressure is recorded real-time against time or volume pumped.

The end result will simply be the maximum recorded pressure, with a printout and plot available.

2.8.13 Rheogram

The program reads in the Viscometer Theta values stored in the equipment table, but these can be edited
if required. Any of the 600/300, 200/100 or 6/3 pairings can be used.

Press F7 to calculate: - Plastic Viscosity and Yield Point for the Bingham hydraulic model.

Shear Thinning Index and Consistency Index (n and K) for the Power Law
Model.

Press F8 for a plot: - Log Theta against Log RPM to illustrate the derivation of n and K.

114
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.9 GEOLOGY MENU

2.9.1 Ratio Analysis

This program will calculate the ratios of C1 against all other individual hydrocarbons in order to produce
a Pixler plot. These ratios have a proven usefulness in determining the likely content of any particular
zones that gave gas shows.

The user should select the background depth and gas show sample depth. On entering these depths, the
plot name is produced automatically from the well name and the depth. It may be changed if required.

The gas value above background will be read automatically from the database.

Press F7 to calculate the Pixler Ratios.

There is a facility that allows you to change the vertical scale of the plots. Remember that this is a log
scale and that for each ratio, anything less than 2 possibly indicates an unproductive zone. Generally,
there is no need for the minimum value to be any less than 1, except in the case of heavier oils that do not
contain the typical proportions of methane.

Press F8 to produce the plot which can then be accessed from windows-reports-XYZ plots.

For information on how to interpret Pixler Ratio plots, refer to the help file or the chromatograph section
of this manual.

A useful addition to the Ratio program is the ability to view sample ratio plots with an interpretation
provided. To use this facility, press Alt F7. The plots will have the name gas_eval.plot and can be
viewed from windows in the same way that you view survey.plot ie press your mouse on the red ‘no
entry’ sign to scroll through each plot in turn.

115
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.9.2 Coal Bed Methane

This program is solely for the use of Desorption Analysis on coal samples. From data manually recorded
and entered into a data file, the program will produce a desorption report together with a number of
desorption and associated plots.

• Firstly, a data file has to be created (using the editor) for each coal sample in 3:/datalog/cbm. The
information contained in this file and the format of the information and data is critical in order for the
software to run. You should refer to the help file for the information and format required.

• Once the file is completed, you can load the data by accessing the cbm program, entering the data
filename and selecting F3.

• Press F7 to calculate:-

For each of the 3 calculation methods US Bureau of Mines Direct


Smith and Williams
Decline Curve,

the Lost Gas (gas desorbed before the sample was sealed in the cannister) and Total Desorbed Gas will
be calculated.

• Press F2 to produce a report of this data together with cumulative desorption results. This report
can be output to either screen or printer. If screen is selected, a file called cbm.rpt will be
automatically created in 3:/tmp.

NOTE that for the Smith and Williams calculations to be correct, you must enter the VCF value before
the calculation.

This Volume Correction Factor (between 0 and 2.5) is determined from a plot of STR (Surface Time
Ratio) against LTR (Lost Time Ratio) which are also calculated when you press F7.

• Press F8 to produce a plot

3 plots will be created

cbm_USBM.plot USBM Direct - Lost Gas Regression


cbm_des.plot Cumulative Desorption against Elapsed Time
cbm_decl.plot Decline Method - Cumulative Desorbed Gas against Time

116
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.9.3 Overburden Program

In order for Formation Pressure and Fracture Gradient to be calculated, the Overburden Gradient must be
known. The overburden program calculates the gradient for each log interval and will update it into the
database.

The program can normally be run direct from the command line with no user input required. However,
the first time that the program is run, the command overburd +m (for manual) should be used. This
allows you to specify the start and end depths and is, in fact, the version of the program that is run from
the QLOG menu.

The overburden gradient is calculated from the Bulk Density. There must therefore be bulk density
values, for each record in the database, entered into the JW reference column. This data may be imported
from offset wireline data or measured by the mudlogger at wellsite.

Running the program for the first time:-

• Ensure that the bulk density value in the equipment table is set to zero and that the Bulk Density
column in the database has values for every record over the required interval.

• Enter the command overburd +m, or enter the program from the QLOG menu.

• Enter your start depth as the start of the database. Your end depth should be the depth of the last bulk
density value entered into the database.

• Choose to update the equipment file and database after the calculation. When the calculation is done,
the equipment table will be automatically updated with the Bulk Density (equivalent for the present
calculated overburden), which will then be used for subsequent real-time calculations.

• Calculating to the end of the database will calculate past the end depth entered.

• Press F5 to read in the bulk density values from the database.

• Press F7 to calculate the overburden gradient. If you do not select to update the database, the
program will just display the calculated end result for the present end depth.

After the first proper calculation (detailed above) run has been completed, the program should be run at
regular intervals while drilling. This should be done from a command line with overburd. The
calculation will be automatic - no manual input of depths is required, the program automatically
continues from the depth of the last calculation.

Even better, the logger can set the system so that the program runs automatically at a pre-determined time
interval, by using the cron timing facility (see Advanced QLOG).

If you wanted to recalculate for the whole database, then run the program as in the first 2 steps above,
using the overburd +m option.

117
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.9.4 Overpressure Program

This program enables you to calculate the Formation Pressure and Fracture Gradient. Before using this
program, the user should be fully familiar with the theory and techniques of Abnormal Pressure analysis.

The program requires certain information to be in place before running.

To calculate Formation Pressure; the Overburden Gradient needs to have been calculated for the given
depth interval; the Normal Formation Pressure for the given region needs to be entered into the
equipment table. The user can then determine a Normal Compaction Trend based upon a given
parameter, normally the Corrected Drilling Exponent.

The Fracture Gradient calculation is based upon the calculated Overburden Gradient and the calculated
Formation Pressure, together with a Poisson’s Ratio.

These calculations are performed offline for a depth interval already drilled. When the calculations are
completed, the Poisson’s Ratio together with Pressure Slope and Offset (relating to the Normal
Compaction Trend) are written automatically to the equipment table allowing for real-time calculation of
the formation pressure and fracture gradient.

The parameter most commonly used to determine a Normal Compaction Trend is the Corrected Drilling
Exponent using Jordan and Shirley’s formula. The limitations of this parameter, however, have to be
recognized. A trend can, normally, only be accurately determined for homogenous shale or claystone.
Varying hydraulics, formation, bit type, size and wear, will all cause changes to the DCexp trend.
Always consider DCexp along with changes in cuttings character, mud temperature and resistivity,
connection gas, background gas, torque and drag of drillstring etc.

To use the program:

• Select the parameter you wish to use for the trend line from the first menu - normally DCexp.

• For the Start and End depths of the interval that you intend to update calculations for, enter the
value of the Normal Compaction Trend (this value is determined from the scale of the source, ie
Dcexp). Use ‘ball park’ figures initially - you will probably have to run this several times before you
have the NCT in exactly the position that you want. The end depth will be the depth to which the
data is calculated and updated, so extrapolate your trend if you are in a transition zone and it will
give you the calculated pressures within that zone.

• Enter Start and End depths of the plot (in most cases, these will be the same as the NCT start and
end depths), and horizontal plot scales (this is the Equivalent Mudweight, and would normally be
left as the default 800 to 2500 kg/m3 EMW).

• Select the calculation method, Eaton or Zamora (otherwise known as the Ratio method). Eatons is
the preferred method.

118
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Enter the Poisson’s Ratio. This is only used in the Fracture Gradient calculation. Properly, this
should be a depth based value determined from offset data (overburden, formation pressure and
fracture gradient). If this is not available to you, as a fall back you can use the lithologically
determined ratios shown in the help file.

• Select Average Size. For example, if your database was every metre, and you selected an average of
10, the calculated data for each record in the database would be averaged over the previous 10
records.

• Select Interval Size. This does not affect the calculated data in the database, but determines the
frequency of data points output to the plot. If 10 was selected for example, only every 10th record
would be output to the plot. This means that the XYZ plot created (these have a limited memory
capability) is capable of taking a greater depth interval.

• BEFORE calculating and updating the database, select F8 to produce an Overlay Plot - this will be
a plot of the Dcexp together with your selected Normal Compaction Trend and is called overlay.plot,
accessed from Reports-XYZ plots. You may have to re-select your Trend start and end values before
you are completely happy with its positioning.

Once you are happy with your Normal Trend selection:

• Select whether to Update Database and Equipment Table. Obviously, this would write all of the
calculated formation pressures and fracture gradients to the database and also would write the
following parameters to the equipment table to allow for real-time calculations: -

Poisson’s Ratio, Pressure Slope and Pressure Offset (based on compaction trend)

• Calculate to end of database - this would calculate beyond the End Depth already selected.

• Press F7 to calculate. This will update your database and equipment table and also produce a
pressure profile plot, formation pressure and fracture gradient against depth, called press.plot

NOTE that the parameters written to the equipment table allow for real-time calculations of formation
pressure and fracture gradient based on your Normal Compaction Trend. Should there be a lateral shift in
this trend, caused by such things as change in lithology, bit change, change in hydraulics, then it is quite
legitimate for you to change the pressure offset in order to get accurate real-time calculations. This
facility should only be used for these types of shift changes, not changes in your drilling exponent caused
by a formation pressure change (ie do not change the pressure slope). You should only change the
pressure offset, which effectively shifts your Normal Compaction Trend, if you are fully confident of
what your formation pressure is (this only comes with experience and by taking into consideration all
pressure indicators), - you can therefore alter the pressure offset so that you get the real-time calculations
that you want.

Should you have an interbedded lithology sequence, for example sand and shale, then your Normal
Compaction Trend is effectively shifting for each lithology change. It would therefore be virtually
impossible to keep your real-time calculations accurate. In this situation, so that you have accurate

119
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

information on display for engineers and geologists, it may be advisable to use the override facilities in
the equipment table.

Normal Compaction Trends

For calculation purposes, intervals have to be calculated for a single NCT. However, if you were
producing overlay plots for a final well report, then multiple trends can be selected.

This may be due to a number of causes:-

Shift changes due to bit changes


change in hole size
change in hydraulics or drilling parameters
unconformities (this may also produce a different NCT gradient)
etc

Multiple trends can be selected by editing the plot data file /datalog/plots/data/trend.dat which would
normally contain the start and end depths plus NCT values that you selected in the overpress program.
For additional trend sections, simply add depths and NCT values required:-

50 1.26
350 1.42 #NCT 1, 50 to 350m

350 1.56
700 1.68 #NCT 2, 350 to 700m

700 1.44
1100 1.60 #NCT 3, 700 to 1100m

Again, this facility can be very useful for providing detailed plots for final well reports but cannot be
used for calculation purposes.

120
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.9.5 Calcimeter

Before using this program (calcim), the user should be familiar with the theory of calcimetry and with
the hardware involved by referring to the extensive help file. The program is run entirely from the
windows interface and the user will see tests graphically displayed as they are performed.

Components: - DGH pressure module, transducer


Sample jar
Magnetic Stirrer

2 programs are running when using the calcimeter software: -

calcim interface, controls and analysis


calcim_drvr controls DGH module, data acquisition and timing

Running the program: -

• Similar to the chromatograph, the first thing the user must do is select the correct serial port that the
calcimeter pressure sensor is connected to. This is done from Setup - Port. When you have
communication, you should see ‘idle’ status.

• Calibrate the Injection Pressure - this needs to be done so that the pressure change caused by acid
injection is ignored during the analysis of sample reactions.

Select Calibrate - Inject; this will start the run automatically; inject your volume of acid,
normally 20cc. You will see the pressure increase on the graph, when the reaction is
complete click on Stop. The inject pressure will then be recorded in Setup-Settings.

• Calibrate for 100% Limestone (ie pure CaCO3). Ensure the vessel is clean of acid and dry. Place
your limestone in the vessel (normally 1gm), ensure it is sealed, have your acid ready to inject.

Click on Start - the status will read Inject, Wait ie the program is waiting for the pressure to
increase above the inject pressure before it starts analyzing. Inject the acid - the status will

121
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

change to Run. When the reaction is complete (normally around 30sec) click on Stop. If the
pressure on the display goes off scale, wait for about 1min before stopping. Click on Calib
100% Sample and confirm. The highest pressure recorded will be stored in Setup - Settings as
Carbonate Pressure. You should repeat the process to ensure the calibration is accurate.

• Calibrate for 50% Limestone / 50% Dolomite - again, ensure that the vessel is clean, dry and
sealed, with the acid ready to inject.

Follow the same procedure as above to run the sample. When the reaction is complete (you will
have to extend the sample run time in Setup - Settings), click on Stop. Click on Calib 50/50%
Sample and confirm.

The software determines the calibration by monitoring the pressure change. When the pressure is at 50%
of the Carbonate Pressure, the slope of the curve is determined. Obviously, anything above that pressure
is regarded as being due to the dolomite reaction.

The ‘slope’ is then used by the sample analysis process to determine when the limestone reaction is
completed and the dolomite reaction begins. This allows for automatic analysis, but the value can be
adjusted or overridden if required.

Set Up Parameters

Run Time Maximum 30 minutes; can be adjusted at any time, even during a sample run

Inject Pres Pressure created by the injection of the acid - this will be subtracted from the pressure
due to sample reactions.

Carbonate Press Maximum pressure determined by the 100% Limestone calibration

Dolomite Adj Determined during the 50/50 calibration, this is a compensation factor to account for the
different reactions of limestone and dolomite.

Slope Determined during the 50/50 calibration and used for automatic analysis, this is the point
at which all of the limestone has been consumed.

50/50 Sample This is the % of limestone in your 50/50 sample and should be set to 50

Zoom Factor Allows you to change the time scale during a sample run

Analyzing Samples
Once a sample run has been completed and you have clicked on Stop, you have the option of accepting
the software calibrations and automatic analysis, or overriding this and doing your own analysis.

Automatic - once the run is complete, select Analyse - Perform Analysis. The %’s will then be
determined automatically based on the calibration settings and displayed in a sub menu. Here, you can

122
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

enter the depth interval of the sample and choose to accept or edit the calculations (on the graph of the
sample run, it is quite easy to read off the limestone/dolomite percentages). When you click on OK, the
data for that sample will automatically be written/updated to /tmp/calcimrun.

Manual - select Analyse - Select Break; immediately move your mouse to the point on the curve that
you consider to be the ‘break point’ between the limestone and dolomite reactions (effectively, you are
overriding the ‘slope’ in the automatic calibration) and click the left hand mouse. Now you should run
Perform Analysis as above.

The data will have to be manually entered in to the database if required.

Saving Individual Sample runs

The actual sample run (ie the resulting graph, calibrations and analysis) can be saved to a file if required.

Select Sample - Save, enter a filename and save as you would a chromatogram.

You also have Load and Delete options for sample files.

The file will be stored in /datalog/calcim_dat

123
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.10 OTHER MENU

2.10.1 Communications

beep

Any user on the network can be 'beeped' or alerted to a message. The message will appear on all
consoles that that user is logged on to, along with an audible alarm at the time of sending the message. In
the QLOG menu, simply enter the userid of the user you want to send a message to, type in your message
and press F7.

From a command line: beep <user name> "message"

APB

“All Points Bulletin”. This works in exactly the same way as beep, but the message will appear on every
console on the network. The message will only appear when the ‘enter’ key is used, or a program is
exited.

chat

This program enables up to 5 different users on the network to communicate with each other. On entering
the program, your userid is automatically displayed.
The usual procedure is to ‘beep’ the users you wish to talk to, with a message requesting that they enter
the 'chat' program. When you have finished ‘talking’, press ctrl_e.

Similar to the chat program, but not in the QLOG menu is ‘2chat’. This format is specifically for 2 users
to talk to each other, providing each with more space in which to enter their messages. To enter the
program, simple enter the command ‘2chat’.

mail

This allows any user to send and leave mail for any other user who can log in to the system. As soon as
that user logs in, a message will appear to indicate that there is mail waiting for them. There is a detailed
help file with this program, but the essential operations are as follows:-

To send mail select ‘send’, enter the user name to which you want the mail to go; type in your mail
message; enter on to a new line, type in 1 full stop, enter - your mail will be sent (use 3
full stops to cancel the message).

To read mail position your cursor on the message you require; select read

To delete mail position your cursor on the correct message; select delete

If your mail message is long, and you are sending it via a modem, it is best to write the message first,
rather than writing ‘live on air’. Use the editor to create a file containing your message. Transfer this file
to the remote station, then use the following command:

124
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

mail se userid < filename

who is online (Who)

This will tell you all of the users logged on to the system at any one time, and where they are logged in,
ie node and console. If a user has logged in to your network from a remote station, you will be able to
tell who it is and 'beep' a message to them if so required.

qterm

This is the communications program allowing the user to connect to other systems around the world via a
modem attachment. Once the system is set up correctly, it is simply a matter of entering qterm and a 'ctrl
a' (to display the qterm menu) and 'd' for a dialing directory. Hit the enter key on the number you wish to
call and the computer will dial and connect, giving you a login prompt from the remote system.

This procedure is detailed more thoroughly in Section 8 of this manual.

2.10.2 Spreadsheet

The spreadsheet used by QNX is called PCC and is very similar to Lotus 123 in use (ie / to get menus).
Do not use this program on the server node as it has a tendency to freeze up the system. See Pcc manual
for details on use. This can be used for morning reports.

2.10.3 Word Processor

QNX uses a word processor called Penpal. This processor may not be as sophisticated as MSDOS
processors such as Word, but it is menu driven and very easy to use. Each sub menu contains a help file
explaining the function of each option; to access, press F1 from the particular menu.

The escape key will allow you to move between the main menu and your document; the option is always
displayed in the top left hand of the screen.

To select different menus/menu options, select the letter indicated


The important menu options are shown below:-

Main Menu

Disk Access Load Document tab between files and directory structure to select your
file; press enter
Save Document enter a filename, or accept the one displayed
New Document will give you blank screen to start your document; you
will need to save on completion
View Disk Files allows you to tab between directories and list the files
Rename Document
Delete Disk File

Print Options Printer Type normally ‘standard’ is selected


Output Device i.e. node and portname

125
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Print Page will print the page you are currently located
Print Document prints the whole file
1st Page Number if you want the file pages numbered
Lines to Skip will leave a margin at the top of each page
Copies how many copies you require

Global Options Penpal Format


ASCII Format
Check Spelling
Length of Page normally 54 (Canada) or 58 (Europe)

Format Paragraph Margins allows you to set tab spacing


Single single line spacing
Double double line spacing
Left paragraphs aligned to the left
Centre central alignment
Right paragraphs aligned to the right
Justify paragraphs aligned to left and right

Block Features Bold heavy text


Underline
Move to move a block of text
Grab to hold a block of text in ‘memory’ and restore elsewhere or in
other files - akin to ‘cut and paste’
Delete remove a block of text
Restore to restore Grabbed or Deleted text

(when using these functions, follow the instructions given at the top of
the page)

Quit and Exit

2.10.4 Utilities

These facilities are simply QNX programs that give useful information about the system. The program
names are shown in brackets and are also detailed in the Basic QNX commands section of this manual.

System Activity (sac) shows the processor activity used by each priority 1 to 15. (esc to exit)

Drive Useage (query) gives details on disk space used and that free.

Task Display (tsk) gives a list of all administrators and programs running.

126
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

2.10.5 Unit Converter

As long as the program convert is running, this program will enable you to convert, for any particular
type of measurement, one type of unit to another (eg psi to KPa, tons to KN etc).

Choose the type of measurement required; press F7


Select the original units you wish to convert from, press F7
Select the new units you wish to convert to, press F7
Enter the value (to several decimal places, for accuracy); press F7

Decimal places are very important when changing from ‘larger to small’ values.

For example, changing 1000 kg/m3 to pounds per gallon:-

If you enter 1000, the result will be 8 ppg

You should enter 1000.00, then the result will be 8.35 ppg, a significant difference!

2.10.6 Help Files

This is a complete listing of all the help files currently held on the system. Many are the files accessed
from programs by pressing F1, others are on other material. Select the file and press F7 to view.

2.10.7 Editor

Only the essential and common operations will be dealt with here. For a detailed guide on how to use the
editor, the user should refer to the help file or to the back of the QNX Operating System manual under
the section title "Full Screen Editor".

The editor can be used to modify text files in QLOG and to perform simple word processing. In general,
however, the word processor Penpal will be used for all reports and document type editing, The editor is
used, typically, for editing files such as system initialization files, XYZ plot and data files and is also
used in the mail system.

The editor can be invoked from the Qlog menu system from "Editor" or by entering ‘ed’ from a
command line.

ed filename (include directory path if necessary)

If the file does not already exist, it will automatically be created.

Similar to the editor is the ‘big editor’ or bed. This works in exactly the same way as the editor, but is
intended for files that are too large to be loaded into the editor.

Command Mode

The command mode (shown as an orange bar along the top of the screen) allows the user to enter
commands to the editor.

127
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

If you are in the text editor mode of the editor, the command mode is accessed by pressing the grey plus
key located on the keypad. By pressing enter, you will be taken back to the text editor.

When the editor is first entered, the user is automatically placed in the command mode.

If the file is new, ie blank, press F1 to create a line and allowing you to enter text.

If there is already text, you can simply press enter to access the file.

A command in the editor can be ‘repeated’ in order to force the command. For example, you could not
quit a file that has been modified by entering a single ‘q’. However, a double ‘qq’ will force the
command, and the file would be left without having saved the changes.

To issue a command, you should press ‘grey +’ to access the command bar; type in the required letter or
command and press enter.

The following are some of the more common commands and functions.

w Save the file using the current file name.

r <filename> This will read a file in and place it after the current cursor position.
This is used to merge files together.

e <filename> Edit file. Loads in a new file and clears the current one. If changes have been
made to the old file without having been saved, then 'ee' must be used.

ee <filename> As above but will abandon any changes to the current file. Entering 'ee' without a
filename will load the same file as previously edited - this is useful if you wish to
backtrack to the last saved version.

q Quit file once changes have been saved.

qq Quit and abandon all changes since the file was last saved. This should be used if
you have made a mess of the edit and wish to get out while you are ahead !

ww <filename>Writes the file to a new temporary filename. This is useful to print out the whole
file.

/text/ Search for the word 'text' and leave the cursor on the found word.
To repeat this, hit F9.

Function keys:

F1 Insert Line Used to enter a new file; to insert a line after the one you are currently on, and to
create a line at the end of a file

F2 Insert Line Inserts a line prior to the line that you are currently on. By pressing twice, the
line would be removed again.

128
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

F3 Deletes the current line.

F4 If the fill option is used (Alt f) F4 will format the current paragraph according to the Left
and Right margins.

F5 Splits the current line at the cursor position.

F6 Combines the following line with the current line at the cursor position.

F7 Highlights a section of text

To highlight a whole line, simply press F7 once

To highlight a section of a line, press F7 twice (quickly) to define your starting point, move your
cursor to your end point and press F7 once.

To highlight a column, move your cursor to the bottom left of the column, press F7 twice,
move your cursor to the top right of the column and press F7 once.

F8 Brings up options such as copy, move, delete - for use with a section highlighted by F7 above.

F9 Repeats the last command made in the command mode - useful if a search for text is being made.

F10 Places you into command mode and displays the last command.

Other Keys:

Ins Ed will start in overtype mode. Ins will allow text to be inserted.

Home Takes you to the beginning of the file.

End Takes you to the end of the file.

Ctrl Left Right Arrow Moves one word left and right.

Ctrl F2 Brings back the last deleted item.

Alt r Changes the file mode from QNX to MSDOS to POSIX (UNIX).

129
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3. MISCELLANEOUS APPLICATIONS

130
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.1 WINDOWS

QNX WINDOWS provides a graphical interface well suited to the QLOG data acquisition system. Its
provides a flexible, easy to use environment, with which to make the most of the QLOG software.

QLOG was designed to be run in a windows environment, therefore allowing the user access to the
graphical facility at all times, and greatly improving the presentation of the system. Many QLOG
programs can only be run under windows as they require the graphical interface; these include the
chromatograph calibration and tweaking, calibration and use of the calcimeter; the overpressure program
since it requires the viewing of plots; and the plotting facility of many of the engineering, directional
programs etc.

It is also of great benefit in providing screen output to realtime and/or realdepth plots - of use to both
ourselves and the client. It also provides a specially designed text display screen, which provides a far
better display of information for use on the drillfloor in comparison to a normal text display.

With the addition of graphical well profiles that can be used in conjunction with realtime programs, the
QLOG system is rapidly becoming windows dependent. Normal text or command mode can still be
accessed from within windows to allow the user normal access to the operating system.

N.B Do not start any administrators from within windows as they will be stopped as soon as the
shell is quit or windows itself stopped.

3.1.1 To start windows

• Type windows from a command prompt.


• After a few seconds a grey background and a red arrow representing the mouse (cursor) will
appear.
• If the QLOG menu does not appear, click, with the right hand mouse, on the backspace for the
Workspace menu.
• From here, click on the programs menu.
• From here, qlog can be selected (the menu appears the same as in text mode).

Each application or program selected runs in its own base window, which can be resized, moved, or
iconed. Working on one window does not affect the others, so the user can multiple task.

The Workspace menu also enables you to access ‘properties’ from where you can change, or disable, the
screen saver: -

Click on the 4th button from the right to access the screen saver window; change the time or select zero
to disable; click on apply to save the changes.

131
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.1.2 Windows Applications

Buttons Used to select options or programs, issue commands, accept (Apply) or ignore (Reset)
changes made.

Scrollbars Some applications have large data files or displays and therefore cannot fit into one
window. By using the scrollbars (they will automatically be present on a window if they
are applicable) allows you to move through file, either vertically or horizontally. Simply
click on the scrollbar, or drag with your mouse to desired position.

Mouse When the mouse is moved across a desk, the ‘pointer’ on screen will move in the same
direction. To perform most tasks, you will need to move the pointer to an object and
'click' on it with the mouse button. There are normally 2 buttons on a mouse:

Left generally used to select objects or issue commands


Right display hidden menus, choose from them.

The mouse buttons can be used in different ways:

1. One click to select an option, issue a command


2. Double click quickly to select and open a file
3. Drag an object - to resize or move (not all windows have this facility)

The Mouse Pointer has 2 states:

1. an arrow normal operating state


2. a stopwatch busy state, ie when drawing a plot to the screen. You cannot select other
options while the mouse is busy

3.1.3 Menus

Can be push pin menus pin to workspace


unpin to remove (by clicking on pin with mouse)

Items followed by an 'arrow head' symbol indicates that a submenu exists.

Dimmed items are not selectable (not loaded, or not appropriate)

132
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.1.4 Window Operation

Firstly, when a window is open, the state of the bar across the top of the window indicates the current
state of the window. This bar displays what task is being run, or which file is open, in that particular
window.

If the appearance of the bar is ‘outstanding’ and light in colour, you cannot access the file change this,
click on the bar with your left mouse - the bar will then become ‘inset’ and dark in colour. You are then
able to access the file.

Once an application is open, click on the top bar with your right mouse for the menu options, or click on
window itself (right mouse again) for the internal window menu.

Window Menu

Close this will iconify the window clearing screen space, the program still runs
in this state
Fullsize For graphic windows only, this will make the window full screen size
Properties Shows you current state, size etc of the window - these are generally left
as default
Back Will bring the window hidden beneath the current one to the front
Refresh
Quit Will stop the application from running and close the window
Print picture
Print window Select printer port for this facility

Using a Base Window

An applications base window has everything you need to know about running that program:
data
controls
display commands

Header application name ie file or program


Footer has messages, current status
Window menu button produces menu
Control area buttons to display files, view and edit etc
Base window menu Close, Back, Fullsize, Refresh, Quit.
Scrollbar allows scrolling through long files
Pane workspace itself
Resize facility drag the window corner and increase/decrease the window size -
this facility is not available for the normal
QLOG ‘text’ screens
Move window click and hold on window edge, drag with mouse to new
position.

133
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Viewing and Changing properties of windows

You should generally only be concerned with changing colour or text size for example. The other
properties displayed should be left as their default settings.

1. Click on the window with right mouse button


2. Select properties
3. Select fonts and colours Changing from 12 to 15 point will increase text size
Different colours for the window can be scrolled through.
4. Apply and Save

3.1.5 Icons

These allow you to make room on the workspace without closing the current programs running. An icon
will have a picture or text illustrating which program it is. To icon a current window, either click on the
top left hand corner of the window, or select Close from the window menu.

Double clicking on the icon will reopen the window.

A single click with the right hand mouse will display the window menu. Here, you will have the option of
re-opening, quitting etc.

There is a computer memory limit to how many windows you can open at one time (5-8 depending on
memory available).

3.1.6 Programs menu

This is accessed by clicking on the workspace background with the right hand mouse. From this menu,
there are several applications available: -

File Manager see below


Shell gives you text screen and command prompt as if working on a normal
console. You have to login to the shell when first opened.
QLOG brings up the QLOG menu
Calculator
Clock digital or face

3.1.7 Using the File Manager

The top halve of the window shows you your present working directory, whereas the bottom halve of the
screen shows you the contents of that directory (files and subdirectories).

• Directories are indicated by blocked while; files are indicated by black outline; executable programs
are indicated by blue outline.

• To move around the directory structure, simply double click with the left mouse on the directory to
which you want to move.

• Highlight a particular file by clicking the left mouse once. Then press the right hand mouse for a
menu of available options: -

134
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Browse - to view the file (uses the ‘more’ program)


Edit - invokes the editor allowing you to edit the file
Print - simply select the printer destination
Copy/Move - ie to another directory, just type in the destination
File Properties - allows you access to attributes, permissions, group and member number

(NB don’t make changes here until you have studied advanced QNX)
Delete

Use of the command buttons: -

File Open a file


Print a file
Create a directory
Create a file (same as ‘ed filename’)

Edit Select all will highlight all of the files in your present directory, from
where you could copy, move or delete.
Copy/Move
Delete
Clipboard gives you the cut/copy and paste facility
File Properties access to attributes and permissions as above

Goto to change directory; give directory path or select your home directory.

3.1.8 Exiting Windows

Before leaving windows, you should ensure that all programs have been stopped. You can then leave
windows by the following ways: -

Bring up the workspace menu by clicking on the background with the right hand mouse and selecting the
Exit option.

By clicking on the circle symbol in top left corner of the QLOG menu, and then clicking on the arrow
symbol in the top left hand corner.

By pressing 'ctrl' & 'print screen' keys together. This way can be used if the windows screen has frozen
up. Having done this, you should ensure that you then close down any programs that were running and
the windows programs themselves.
On exiting windows, the administrators will remain running for a short time, and if you type the windows
command again, you will re-enter windows and any programs that were left open will still be running.

To actually stop windows running, type 'windows down' (activates a batch file to stop the program).

135
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.2 PLOTTERS and PRINTERS

N.B. The AMT 5500 series of printers are no longer in operational use by Datalog, so no longer appear in
this manual.

3.2.1 Epson 1500/1520

This colour inkjet plotter is the typical model now employed by Datalog operations.

The Epson plotter requires the following files and commands to be on the system (this is now a standard
release on the distribution software): -

/datalog/cmds/plotter
/datalog/cmds/hp2xx
/datalog/cmds/do_esc
/datalog/cmds/do_esc.gnu
/datalog/config/hp2xx.colormap
/datalog/help/Epson.help
/user/cmds/pcl_out
/user/cmds/formfeed

The printer control file should already be configured, by default, but should the system need to be
configured, use the command prt_ctl –l and enter the following information:

EPSON $esc_180_[2]$lpt EPSON

The ‘$esc_180_[2]$lpt string sets up the printer protocol (ESC/P2), the print resolution (90,180,360 DPI)
and the output destination.

A realtime plot can now be sent to an Epson plotter simply by selecting EPSON in Plotter Setup from the
QLOG menu.

To send an HPGL log or plot requires the log to be sent to a file and then converted to the Epson printer
protocol using the do_esc command.

The port will also have to be reconfigured to be able to print continuous log plots. To set the port up the
following commands need to be entered on the command line:

stty < $lpt

The computer should respond with a description of what type of port it is and a list four options:

+etab +ers +poll +lock

136
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The ‘expand tab spaces’ or etab and ‘expand record separator’ or ers, need to be taken out for the log to
print properly, this is done by entering the following command:

stty –etab –ers > $lpt

To copy a text file or to print screen the etab and ers options need to be put back.

stty +etab +ers > $lpt

Once the port has been setup correctly and the log has been sent to a file (e.g. mudlog file in the /tmp
directory) it is now ready to be sent to a plotter with the conversion automatically taking place during the
printing process.

Correct commands, for various paper sizes (determined by “paper size in inches x 180”) would be as
follows:

do_esc mudlog $lpt –M1400 - for standard A4 paper, as used in the UK

do_esc mudlog $lpt –M1960 - for standard letter sized paper, used elsewhere

In these examples, mudlog is the file name and $lpt is the output destination.

If multiple copies of the same log are needed then it would be preferable to convert the file first and then
send it to the Epson plotter, the following command needs to be entered on the command line.

do_esc mudlog mudlog_esc –M1960

Where mudlog is the original file and mudlog_esc is the destination file.
If the file is particularly large, then the command should be run in the background. Once finished
converting, the new file will need to be sent to the plotter.

cp mudlog_esc > $lpt

NOTE: During the conversion process the size of the new file will remain just 1 block until the
conversion has finished. In order to view the conversion process, the user will need to type fopen to see
how much of the original file has been converted.

3.2.2 Printing GNUplots or chromatograms

To print a gnu plot a similar process is followed - the plot needs to be sent to an output file instead of a
window (creating an HPGL file), and then the file needs to be converted using the do_esc.gnu command.

do_esc.gnu filehpgl >$lpt –M(papersize x 180)

or if multiple copies are needed;

137
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

do_esc.gnu filehpgl filehpgl_esc –M(papersize x 180)

followed by

cp filehpgl_esc > $lpt

To print a Chromatogram to an Epson Plotter, use the gcprint command in the same way that is
explained in the chromatograph section of this manual, the only change that is needed is to adjust the
output to a file (o=/tmp/cal for example).

The file that is created will then need to be converted using the do_esc command.

138
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.2.3 Model HP680c Plotters

The use of this plotter requires the updated version of the plotter command, and also the hp2xx
command.

The following files and commands also have to be on the system: -

/datalog/config/hp2xx.colormap
/datalog/help/hp680c.usage
/user/cmds/logpc
spool_start
pcl_in
pcl_out
formfeed

Using the command prt_ctl –l, ensure that the printer control file is configured in the following way: -

Printer Name Port Name Type

HP680C_A $pcla_150 PCL


HP680C_B Spclb_150 PCL

The 2 pcl port names represent the equivalent of $lpt and $lpt2.

You should then edit 3:/user/cmds/spool_start to define the pcl: -

/datalog/cmds/pcl_out n=$pcla o=$lpt &


/datalog/cmds/pcl_out n=$pclb o=$lpt2 &

You then the plot by issuing the following commands: -

spool_start this will start the 2 pcl_out programs


plotter logname &

Should you need to stop the plot for some reason, enter the following commands: -

slay plotter
slay pcl_out

139
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.2.4 Standard Log Comments

The following format for entering comments onto logs must be followed, unless specified otherwise by
the operator.

DEPTH BASED COMMENTS COLUMNS

The 5 comments columns in QLOG should be renamed from Comments#, to the following, and contain
the listed information where applicable:

Comments1 Well Information

midnight depths
casing depths (shoes and/or hangers)
survey depths and information to include TVD, azimuth and inclination
sidetrack details and kick off depths
well operations or events such as logging runs, reason for trips, BOP tests, well control,
etc
reasons for downtime such as wait on weather

Comments2 Drilling Data

new bit details and bit gradings


drilling parameters, to include WOB, RPM, TRQ, PP and FR
surface or downhole changes to drilling parameters
factors influencing ROP
stuck pipe events or tight hole occurrences, to include overpull and drag information
reaming and back reaming intervals
rotating and sliding intervals on deviated wells

Comments3 Gas Data

produced gas peaks, including any cause of swabbing, together with value in the standard
peak/BG/pumps off format
trip gases
recycled gas information
information effecting gas analysis, such as lag checks, oil additions or other identified
contaminations, bypassing shakers, etc

Comments4 Mud Circulation

mud density, PV, YP, water loss and pH


any additions, weighting up periods, engage or disengage centrifuge etc
reported losses or gains
changes in flowrate
flow checks and well condition

140
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Comments5 Pressure Gradients

noted changes in trends such as unconformities, bit change, change in drilling parameters
hole stability observations such as torque, drag, overpull, cavings, gas cut mud, etc
influxes (amount, type) or lost circulation (rate)
shut in pressures
ECD, swab and surge pressures
recorded LOT, FIT, RFT and DST results

LITHOLOGY COMMENTS COLUMNS

The Lithology comments columns will be renamed as follows:

LithComm1 Cuttings Lithology

To include typical lithology descriptions and observations

Standard font, as above

LithComm2 Stratigraphy

To include stratigraphic information, formation tops, gas/oil/water contacts, cored intervals,


sidewall core samples, coalbed methane canister samples, etc

Red text, otherwise standard font as above

TIME BASED COMMENTS COLUMNS

This will be renamed Drilling Events and will include the following significant events, as they happen: -

Changes in Operation, e.g. drilling, circulating, reaming, tripping, logging runs, testing BOP, run
casing, pull riser, etc
Reasons for trip
Kick Off, sliding, rotating
Drilling cement, float, shoe
Gains or losses
Flow checks, shut-ins, flow periods, shut-in pressures etc
Tight hole, drag/overpull, jarring up or down, etc
Reports to driller or drilling engineer

141
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.3 WELLWIZARD – QLOG INTERFACE

For detailed instruction of the installation and set up of a WW-QLOG system, refer to the WellWizard
User Manual.

3.3.1 Administrators

All standard QLOG administrator programs need to be running.

In addition, the WellWizard interface requires the following administrators:

Hotback +i & normally set to back up databases to Node 2

WWInterface p=$cti2 & this specifies which port is being used for the interface
connection. It needs to be a serial port, typically a “cti” port.

3.3.2 Serial Port Settings

The serial port that is to be used for the interface has to be set to the correct settings:

Baud rate = 38400


No parity
8 data bits
1 stop bit

Use stty <$cti2 to view the current port settings (here, assuming $cti2)

Disable unwanted settings with the command stty esc=0…..etc…..>$cti2

Set desired settings with stty baud=38400 par=none >$cti2.

The stty command string should be entered into the appropriate sys.init file in order that the port setting
is correct after any reboot.

3.3.3 Font Settings

It is therefore necessary to add special coding commands to any text comments entered in the QLOG
database, in order that they can be displayed through WellWizard with the special text characteristics.

NOTE THAT NO SUCH CODING COMMANDS NEED TO BE ENTERED INTO THE QLOG
COMMENTS COLUMNS WHEN THE STANDARD CONFIGURATION IS BEING USED.
ONLY IF THE CLIENT REQUESTS SOMETHING OTHER THAN THE DEFAULTS, SHOULD THE
FOLLOWING PROCEDURES BE USED.

142
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The following procedure will allow attributes such as font type, colour, size, border colour, background
colour, justification, orientation and weight, to be specified.

An encoding command, defining the type of text character wanted, is entered into the appropriate
comments column (ref mm – mq) within the QLOG database (much in the same way as the change of
ROP scale command used for printing out mud logs), at the desired depth.

The encoding command is in the form of a string, followed by the required text, as shown below:

f1s20w1j2o270c15b16e1|Trip out of hole

The singular letter in the command string represents a particular characteristic of the required text, such
as font type, size, colour etc.

The number assigned to each letter represents the actual font type, colour etc that is being defined.

A “pipe” then separates the command string from the required text.

Taking the above command string, the following codes are specified: -

“f” – Font Types or Names 1… Arial


2… Courier New
3… Tahoma
4… Times New Roman

So, in this example, f1 specifies Arial font type.

“s” – Font Sizes 6 – 20 (“1pt” is equal to 1/72 inch)

In this example, the largest size 20 is specified.

“w” – Font Weight 1… Regular


2… Bold
3… Italics
4… Bold Italics

In this example, w1 specifies regular weighted text.

“j” – Font Justification 1… Left


2… Centre
3… Right
In this example, j2 specifies “centred text”.

For rotated text, text would either commence from the record depth (left), end at the record depth (right),
or, in this case, is centred over the record.

143
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

“o” – Font Orientation - counterclockwise rotation, in degrees, from a normal text position.

0… horizontal, left to right…normal text


90.. vertically upwards
270. vertically downwards

In this example, o270 will write the text vertically downwards.

The remaining part of the string represents the colour selections:

“c” – Colour of the main font

“b” – Background colour

“e” – Edge or border colour

The possible selections are: 0… No colour


1… Black
2… Maroon
3… Green
4… Olive
5… Navy Blue
6… Purple
7… Magenta
8… Teal
9… Grey
10.. Silver
11.. Red
12.. Lime Green
13.. Yellow
14.. Fuchsia
15.. Aqua
16.. White

In this example, c15, b16 and e1 would create an aqua blue text with a white background and a black
border.

If no command string is entered into the database; i.e. only the text is entered, then a default font
selection will be used to generate the text. The default settings are as follows:

Times New Roman, 10pt, regular print, black with no background or border, left justified and no rotation,
printed left to right.

If only minor changes are required from the default settings, then only those changes need to be entered
into the command string.

144
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

For example, if s12w2o270|CORED INTERVAL is entered, the following selections will be chosen:

Font Type - default Times New Roman


Font Size - changed to 12pts
Weight - changed to bold
Justification - default left
Orientation - changed to vertically downwards
Colours - default black with no border and no background

3.3.4 Text Wrap Around

WellWizard text facilitates the wrap around function for long sentences. However, QLOG does not have
the same facility, with a maximum number of 32 characters per line, so this has limited the effectiveness
of comments being supplied from the QLOG system.

The new interface software now has this capability, by effectively joining the comments from
SEQUENTIAL record intervals.

To activate the facility, a backslash, “\” needs to be placed as the final character on a line. Any text
placed in the very next record depth will then automatically be continued from the text placed in the first
line.

Two records may look like the following (note 32 maximum characters):

(record 1053) During the flowcheck, continual\


(record 1054) flow was observed and the well \
(record 1055) was shut in.

If the corresponding column in WellWizard allowed for 50 characters, the text would appear like:

During the flowcheck, continual flow was observed


and the well was shut in.

Note, the backslash DOES NOT have to be the 32nd character; it has to be the LAST CHARACTER on a
given line, with no subsequent characters, or spaces, following it.

145
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.4 CREATING PCX/PDF FILES

The command do_log or do_logc allows plots and logs to be viewed using alternative graphics packages
on desktop PC’s or laptops. The logs or plots can also be compressed by a QNX machine using the zip
command and then transferred to a Windows PC via a serial link (discussed in the Advanced QLOG
section) or by a floppy disk.

Please note, that due to the size of a pcx log it would be preferable to set up a serial link and use Qterm.

Procedure

• Initially the log needs to be created on the QNX machine by sending it to a file (e.g. mudlog file).
If a color log is being produced, then some of the colors may need to be changed before starting
the log plotting process. For example, the color blue appears as light blue when viewing it in
‘Photo Paint’ or ‘Corel’.

• Once the log file has been created in HPGL format, then it needs to be converted using the
following command:

do_logc mudlog mudlog.pcx

• The file will start to convert to a pcx file, utilizing a lot of memory. Once again, typing the
command file will only show the file size as one block and this will not update until the
conversion process is finished. To see the file being converted, it is necessary to type the
command fopen which will show you how much has been converted and how much there is to be
completed.

• After the file has completed the conversion process, the log’s vertical scale will need to be
adjusted - if this is not done, then the log will be too large to be seen by alternate graphic
packages and all that will appear will be the header. With the latest versions of Qlog, this scale
adjustment is incorporated within the do_log command and will activate immediately after the
conversion – again, this can be seen by typing fopen. Once the scale change has finished, a
message will appear listing the original size compared to the readjusted size.

• If the scale message does not appear then it will be necessary to issue the scaling command
separately by typing the following command:

pcx_fix mudlog.pcx

• The pcx file is now ready to be sent to the Desktop PC via the serial link or floppy disk, but may
need to be compressed using the zip command on the QNX machine. Issuing the following
command will compress the file:

zip mudlog.zip mudlog

NOTE, the files created by using the do_logc command can be extremely large and can slow the system
down, general software housekeeping is essential in keeping these files to a minimum.

146
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.4.1 Embedding Pictures And Creating Links With Adobe Acrobat

This section contains the steps required to link a log in pdf format to pictures and other files.

Firstly, you need a log in PDF format. Please refer to the previous section about how to do this.

Secondly you need the pictures or files that you want to embed. If they are pictures, it is best to convert
them to PDF format by simply opening them in Corel Draw (for example) and then printing them to the
Adobe distiller. You will need the full version of Adobe Acrobat v 4.0

1. Open the log in PDF format.

2. Decide where you want your link to be. Usually this would be over some text e.g. a sample
description or a comment.

3. Click on the chain symbol on the left side in Adobe Acrobat.

4. You should now have a little cross which you can move around with the mouse. Move the cross
to where you want your link. Right click on the mouse and then drag it. You will see that a box
forms. Everything inside the box will be the area where the link can be activated from. As soon
as you release the mouse button an option dialog will open called “create link”.

5. Format your link. The appearance is straight forward, either a visible rectangle or invisible. If
you select visible (default) you can format the border with the boxes on the right. You can also
select what the link does when clicked. The best is probably “inset”.

6. You now need to select the action. There are lots of options. You need to select “open file” for
this particular type of link. When you select “open file” the box will change and give you the
option to “select file”. Click on this and an explorer type box opens. Simply go to your file and
select it. Then click OK.

7. That’s it. Click on the “hand” on the top left in Acrobat to test your link. Simply go to where the
link is, once you are over it the cursor will change from an open hand to a pointing hand. Click
and the picture or file should open. To go back to the original log after viewing the picture click
on the arrow pointing left below the help tab at the top on Adobe acrobat. This takes you to the
previous view, which should be the log.

NOTE: when creating links, it is very important to reproduce the directory structure exactly when
sending it to somebody else. E.g. if you have a log in C:\Datalog, then link it to a file in
C:\mydocuments\play, then give the log and the picture to a client, it will only work if they put the log
into a directory in the root called Datalog, and the picture into another directory in the root called
mydocuments\play.

If files were put into a directory called C:\Wells\Datalog, for example, then Adobe will not be able to
find the picture since it is looking for \mydocumnets\play directory, which no longer exists. The best
procedure is to create a directory in the root and put all the files into this directory. The client then just
needs to be told to create one directory, e.g. the well name, in his/her root and copy all of the pdf files
into it.

147
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3.5 STICK SLIP SOFTWARE

The stick slip software has been developed to detect torsional vibration within the drillstring. With this
software, the logging unit can now aid the driller in detecting these potentially severe oscillations and
play an important part in reducing bit ware and twist offs.

For complete theory and applications, please refer to the vibration analysis course handouts.

Drillstring vibration at surface can be classified as four major types:

• Torsional Vibration

Variable pipe rotation, acceleration and deceleration of the BHA and bit resulting in oscillations
and regular cycling in surface torque. Stick slip is the most severe form.

• Axial Vibration

Vertical vibration while bit is still in contact with the bottom of the hole. Bit bounce when
contact is repeatedly lost as the bit bounces off and on bottom.

• Lateral Vibration

Non central rotation of the bit and/or BHA causing lateral impacts. Bit whirl associated with
PDC bits where the rotation is off center and BHA whirl.

• Combined Vibration

A combination of all of the above.

Analysis

The detection and analysis of drillstring vibration involves a rapid signal processing ability and analysis
of the frequency and amplitude of wave oscillations within set limits. Qlog uses an alarm system to alert
the personnel to the event so that remedial action can take place to suppress the stick slip situation.

Parameters that are displayed by the stick slip software are Torque, Hookload and Pump Pressure (all
0.1sec acquisition), RPM is read every second. Of these parameters only torque is actually processed and
analysed, the rest are merely displayed and stored.

The stick slip software requires three administrators to be running and these are as follows:

stkslpacq &
stkslpanl &
stkslwin n=2 & (where n is the node that the software is operated from, this command
should be run from a shell in windows).

148
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Raw data is displayed on a graphical QNX windows plot - the user can define the time length for the
display and the scales for the torque, RPM SPP and Hookload.

It is also possible to scroll back historically over 30 minute period.

Wave frequency and amplitude is also reported.

Control settings for the frequency, amplitude, time out and alarm should be confirmed with the operator.
It is very important that realtime scales and threshold limits be set up correctly so that the relationship
between the drilling parameters and string vibration can clearly be seen.

Data Storage

Data is stored in daily time based database files /datalog/stkslp/data/dd_mm_yyyy.dat

HPGL files are also created /datalog/stkslp/yymmdd_hhmm.n (where hhmm = start time and n=plot
number).

ASCII data files are also created /datalog/stkslp/yymmdd_hhmm.d.

149
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4. CHROMATOGRAPH

150
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.1 INTRODUCTION

One of the most important aspects of the mud logging operation at wellsite is the detection of gases and
the analysis, in particular, of hydrocarbon gases. To enable us to do this, Datalog uses a state of the art,
high-speed chromatograph called the MTI M200. This chromatograph, based on technology conceived at
NASA, was developed at Stanford University, California.

The M200 analyses gases by way of detecting differences between the Thermal Conductivity of the
sample gas and the carrier gas (helium is used by Datalog, although hydrogen can be used aswell). Gases
with low molecular weights have the highest thermal conductivity. Features that make this
chromatograph stand out ahead of FID's and other thermal conductivity chromatographs include: -

Miniaturization, portability and low energy requirement


High speed analysis; C1 to C5 in under 30 seconds
Detection of other gases; CO2, O2 and N2 as standard; other gases by column changes
The use of Helium as a carrier gas, being non explosive
No residual gas problems therefore zones and tops are easy to determine
Accurate detection from a few parts per million up to 100%

The M200 has 2 separate columns (or channels) and is interfaced with an internal processor that controls
the chromatograph parameters and perform the analog/digital conversions together with other
'housekeeping' tasks.

The 2 channels have columns to analyze a specific range of gases: -

Column A heavy hydrocarbons Composite, C3, C4 and C5 (C6 and heavier can
be detected but would require a longer time
period for analysis)

Column B light hydrocarbons O2 and N2 Composite, C1, CO2, C2

The M200 outputs, in digital form, the voltage recorded from the 2 channels 100 times a second. This is
interfaced to the QLOG system which performs the integration of the gas peaks to determine the gas
quantity, and which also controls the operation of the chromatograph.

All of the valves, sample loop, detectors and injectors are fabricated on small silicon wafers the size of a
postage stamp. This micro technology means that only a very small gas sample needs to be analyzed, thus
the very short analysis time.

The Thermal Conductivity Detector responds to the difference in thermal conductivity between the
carrier gas and the sample components passing through the detector. The TCD is configured as 4 nickel
filaments suspended in 2 channels. These filaments are heated by applying an electrical current.

With Helium carrier gas flowing across the filament, a certain amount of heat or energy is carried away.
The filament now has a constant resistance that sets a constant baseline reference. When a compound
with a lower thermal conductivity than the helium passes over the filament, less heat or energy is carried
away. As the temperature of the filament increases, resistance is increased positively as a gaussian peak.

151
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.2 HARDWARE SET UP

It is imperative that no dust or particles get into the columns of the chromatograph since this could cause
a blockage owing to their micro size. Therefore, during the transportation of the chromatograph, ensure
that all of the ports/inlets are protected by the appropriate covers.

4.2.1 Helium Supply

Before connecting the helium supply to the chromatograph, you must ensure that there are no rogue
particles that could get into the columns: -

• If attaching the regulator to a new helium bottle, blow helium through the regulator - this will clean
out any rust/dust from the bottle and/or regulator.

• Attach the stainless steel helium tubing to the regulator - ensure that the arrow on the helium filter is
pointing in the direction of flow. Before attaching to the chromatograph, again give a good blast of
helium through the tubing to ensure that it is clean.

• Perform a Leak Test - close the high pressure side of the regulator and release any helium through the
external side. Close the external (low pressure) side. Open and then close the high pressure side to
'fill' the regulator. Note the pressure on the gauge and monitor for maybe 15 minutes for a drop. If
the pressure does drop, there is a leak on the high pressure side.

• Attach the helium tubing to the carrier gas port on the back of the chromatograph. Be very careful not
to overtighten as you could damage the tubing on the other side of the port. Use a second spanner to
lock the nut on the port to prevent it from turning and damaging the internal tubing. Take care not to
strip the threads on any of the swagelock fittings. There is no need to use Teflon/PTFE tape on these
fittings; a seal should be achieved without because of the swagelock ferrules.

• Perform a leak test as above, this time setting the pressure on the external or low pressure side to 80
psi, the operating pressure of the chromatograph. Monitor as above for a pressure drop.

• As an extra leak test, apply a small amount of snoop around the connectors and swagelock fittings.
Any leaks will cause the snoop to bubble.

4.2.2 Magnesium Perchlorate Filter

The gas sample is fed to the chromatograph from a port on the front of the CPU. This sample is therefore
supplied after passing through all of the standard filters and driers and after passing through the Total
Gas Sensor detectors.

One final filter assembly is then used for the chromatograph, being placed between the front CPU port
and the chromatograph, to reduce or eliminate any remaining moisture or impurities from the gas sample.
This is an important function, because any moisture that remains will be detected by the chromatograph
and analyzed as a gas. Unfortunately, if this moisture peak exists, it causes a response at the same time as
C3 and will be analyzed as C3.

The perchlorate filter is made up in the following way: -

152
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• An 8 to 10” length of polyflow tubing is filled with magnesium perchlorate (as coarse as the tubing
will allow) and sealed at each end by a cotton wool plug. Do not pack the cotton wool too tight
because that will restrict sample flow through the filter. On the chromatograph side of the filter, two
0.2 micron blue disk filters should be connected to prevent dust from entering the chromatograph.

• When installing the filter, you should ensure that you have a good sample flow through it. Since this
filter assembly will always be in place when sampling, the same assembly should be used when
calibrating the chromatograph, so that conditions are the same.

153
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.3 SOFTWARE INTERFACE

Before connecting the chromatograph to the CPU, ensure that the QLOG system is running and that the
m200 administrator is running (when you run ‘tsk’ you will see two m200admin’s running).

• Enter the m200 setup from the QLOG menu in order to select which serial port the chromatograph
will be connected to. This is done by selecting option F8 Edit Port, entering the port name and
pressing F7.

• The status at this point will read unplugged.

• If possible, one of the multiple CTI ports should be used due to the better communication properties
of the CTI card.

• Connect the serial cable to the CPU and the chromatograph. The cable must be a null modem type -
these are specially made up for use with the chromatograph.

• Turn on the power to the chromatograph. The chromatograph has its own power supply with a 12v
DC transformer.

NOTE - it is very important that the m200 administrator is running and that the correct port is defined
before you put the chromatograph on line. Failure to do this could allow ‘garbage’ to be sent to the
chromatograph resulting in the alteration of internal settings.

SIMILARLY, IF YOU HAVE TO REBOOT THE COMPUTER OR SHUT DOWN THE M200
ADMINISTRATOR, ENSURE THAT THE CHROMATOGRAPH IS TURNED OFF FROM THE
SETUP OPTION. DISCONNECT THE SERIAL CABLE TO PREVENT GARBAGE BEING SENT
DURING THE REBOOT.

At this point, there is now communication between the chromatograph and the computer.

If you are connecting a new or different chromatograph, the status in m200setup will read **new**. This
is because the settings on the current chromatograph differ from those that are stored on the computer
from the previous chromatograph.

The system therefore needs to be initialized before being able to use it. This is done through the
m200setup.

154
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.3.1 M200 Setup

This file contains all of the operational and configurational setups of the chromatograph. The operation
of the chromatograph is totally governed by these settings and any changes to be made are done through
this software and NOT on the chromatograph itself. All of the settings in m200setup should be carefully
checked before attempting to run the chromatograph. A copy of this file, made when the chromatograph
was last serviced or tested, should accompany every unit at all times. This allows easy comparison of the
settings, to ensure that all are correct, prior to use.

The information contained in the top box of the file is known as the Method - these are the operational
settings. Below this are the configurational setups together with the command options available.

Column A Column B Port: [1]$cti1


Temperature 40 40.0C Sample Time 2 sec
Temperature 35 35.1C Inject Time 40ms Run Time 30 sec
Inject Time 45ms Sensitivity Med Cycle Time 0 sec
Sensitivity Med Filament On On
Filament On On

CH Pressure 18.2 CH Pressure 23.5 CHP Code Offset 0


Autozero -105.2mv Autozero 99mv Ext. Wait Ready Off
Autozero On Autozero On Module Choice Both
CHP Scale 15 CHP Scale 18 Auto Run Off
Temp Offset 7 Temp Offset 6 # of Auto Runs 1
Temp Scale 13 Temp Scale 12 Run Interval 0
Column Type Other Column Type Other M200: Running

Record Sample: Not Pending Samples: 1560 Errors : 0

F2=Controls F5=Record F6=Edit Config F7=Edit Method F8=Edit Port

Check Carrier Gas

As described above, should the setup in the software vary from the one stored in the chromatograph
itself, then the status will be displayed as **new** and the software has to be initialized:-

Press F7 Initialise method will be displayed


Press F7 again The setups will now be written to the software

At this point, the chromatograph will start running automatically - you should stop it immediately and
check that the setups are correct for the chromatograph.

Do this by pressing F2 Controls, then F3 or F6 to stop the chromatograph.

155
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.3.2 Control Keys

F2 Controls F2 Start to start the chromatograph running. The status will show
idle when a sample is being injected and running when
the sample is being analyzed.
F3 Stop After Run to stop after the current sample has been analyzed
F6 Stop Run Now to stop immediately

F8 Reset Options F2 Reset Config - to restore the default factory settings


to the chromatograph should the
memory be lost
F8 Reset CHP Offset - to reset the column head
pressure to reference the local
atmospheric pressure.
F4 Abort Reset

F4 Return to Main Controls

F5 Record To record a current chromatograph sample. Enter a filename and the sample that is
currently being analyzed will be stored under that name in 3:/datalog/chrom_dat

F6 Edit Config To make changes to the configurational setups

F4 Restore Old Config i.e. don’t save changes


F7 Accept New Config i.e. save changes

F7 Edit Method To change the method settings; press twice to initialize a new method

F8 Edit Port

F4 Exit Program

156
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.3.3 Method Parameters

To change these settings, press F7 Edit Method. Move between the parameters by using the arrow keys.
To make changes, some parameters (eg temperature) require you to press enter, type in the value and
press F7 to save; others (eg sensitivity) require you to toggle between settings using the spacebar.

Once all changes have been made, press F7 to save the Method.

Temperature

The value on the left is the set value, the value on the right is the actual measured value. It is quite
normal for these to be slightly different. Increasing the temperature will shorten the elution or analyzing
time of the sample. A significant temperature change may therefore require a recalibration procedure in
order to redefine the position of individual gas peaks.

The normal operating range is in the order of 30 to 50 C. The absolute maximum operating temperature
of the columns is between 160 to 180 C (recorded on the actual column modules), but these temperatures
are only used to recondition the columns or to dry them should they have become damp.

Inject Time (ms)

This is the length of time that the injector valve is open to allow a portion of the gas sample into the
columns for analysis. By increasing the inject time, more of the gas sample will enter the columns; by
lowering it, less gas. This will change the size of the individual gas peaks and will therefore require a
recalibration. Normal operating range is in the order of 40 to 50ms.

Sensitivity

This is simply a scaling factor to allow different ‘ranges’ of gas values to be analyzed. There are 3
settings, low, medium and high. Each one is a factor of 10 larger or smaller than the next. High
sensitivity is only used for very low gas levels and when the calibration gas is in the order of 10ppm.

Normal operating settings are medium for Channel A; medium for Channel B, switching to low
sensitivity when methane reaches the order of 10% (this precise value will depend on what the injection
time is set at).

a) normal peak, on scale b) peak off scale, requiring the sensitivity to be lowered

157
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Changing the sensitivity does not require a recalibration.

Changing the sensitivity is generally only required for Channel B because of high methane. When the
column is ‘saturated’, requiring a sensitivity change, the peak in the chromatogram will be flat topped
and the displayed value will drop to zero with other gases continuing to rise.

Filament

The filaments have to be ON for the chromatograph to run. You should ensure that the second reading of
the two reads ON since this is the actual filament status. You may have to resave the method a second
time when first setting up the system.

Under no circumstances should the chromatograph be run if there is no helium. There is therefore a safe
guard built into the software - if the helium pressure falls below 5 psi, the filaments will turn themselves
off.

Sample Time

This is how long the sample pump will run for when taking each sample. This will fill the lines of the
chromatograph. The sample time should not be confused with the inject time which is the length of time
the injectors are open allowing the sample into the columns.
The default setting is 2 seconds.

Run Time

The period of time allowed for the gas sample to be analyzed. The default setting is 30 seconds, allowing
hydrocarbons through to C5 to be analyzed. Should heavier gases be required, the time can be increased.

Cycle Time

This is ‘wasted’ time between gas samples. This should be set to zero so that as soon as one sample has
been analyzed, another sample is immediately injected.

4.3.4 Configuration Settings

CH Pressure

Column Head Pressure - this is a direct reading (psi) of the pressure exerted on the column. This affects
how quickly a sample will be pushed through the column and therefore how quickly individual gases will
be analyzed. The higher the pressure, the faster the elution time.

The pressure is adjusted for each column by way of a control ‘dial’ at the back of the chromatograph.
Only gradual changes should be made.

Autozero

This should be set to ON, then you have a direct reading of the current millivoltage on the detector. This
reading is required for the chromatograph to have a base reference for each sample taken.

158
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Every time that a sample is taken, the current millivoltage is recorded. This will be the ‘zero’ point for
that sample. When the gas in analyzed, this value is subtracted from the millivoltage due to a particular
gas peak, giving a true reading for the peak.

eg autozero = 100mv peak = 400mv mv due to gas = 300mv


autozero = -100mv peak = 400mv mv due to gas = 500mv

The actual value of the autozero is not important; it can be anywhere in the range -450 to +450mv. If
either of these values are shown, the detector will probably need replacing. If parameters (ie pressure,
temperature) are kept constant, you should not see any great variation in the autozero.

The configuration sheets kept with the chromatograph therefore provide a good history of the columns.
Any significant changes in the autozero, while parameters remain constant, could be an indication that
the detector for that column is becoming worn.

CHP Scale (column head pressure scale)


Temp Offset
Temp Scale

These three settings are unique to each individual column. They are calibration and scaling factors
required to ensure that the correct pressure and temperature is being applied to each column.

They must be set correctly

If they are not set correctly, you will likely get strange looking chromatograms, anomalous gas peaks,
erroneous analysis etc.

To check them, you should refer to the m200 setup sheets accompanying the chromatograph. They are
also recorded inside the chromatograph should you wish to double check.

Column Type

This is a reference to the maximum operating temperature of the columns. The options are Other (160 to
180 C) or Haysep (140 C). Datalog only uses the one type - both columns should be set to Other.

CHP Code Offset

This has no known function !

Ext. Wait Ready

This function enables a sample to be taken when a switch is closed. It should be set to OFF.

Module Choice

This should be set to Both to allow both columns to operate.

Auto Run / Number of Auto Runs / Run Interval

159
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

If the chromatograph was not interfaced to the QLOG software, these settings would perform the same
function as Sample Time, Run Time and Cycle Time.

Auto Run must therefore be set to OFF to override these settings. The values then entered in the
Number/Interval do not matter.

M200

This is the current status of the chromatograph as already described: -

Unplugged No communication
**new** Software setup is different to the setup stored in the chromatograph
Running Sample is being analyzed
Idle Sample is being injected

Samples

The number of samples taken since the m200 administrator was last started.

Errors

These are communication errors rather than gas analysis errors. If there are repetitive errors, there may be
noise interference. Generally, you rarely see errors when using a CTI serial port; more may be seen when
using another type. It is also known for errors to occur when a longer injection time (eg 60ms) is used, or
when parameters are changed.

If you have seemingly excessive errors, you may have a hardware problem and you should seek technical
advice.

160
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.4 M200 VERSIONS

There are two versions of the m200 chromatograph being used by Datalog. Fundamentally, the two are
identical working in exactly the same way with the same setups. The difference is that the older type has
a front control panel allowing changes to the setup to be made on the chromatograph itself. The newer
type has no such panel so that all changes have to be made from the QLOG software.

For each chromatograph version, there are versions of the m200 programs: -

m200admin_old, m200admin_new
m200setup_old, m200setup_new

Depending on the chromatograph being used, these programs should be copied to m200admin and
m200setup (3:/datalog/cmds).

NOTE that the m200setup and controls already described in this section refer to the new chromatograph
type with no control panel.

The only significant difference between the two versions is that the control options in m200setup_old do
not include any options to change the configurational setups on the chromatograph - these therefore have
to be made from the front panel on the chromatograph. This procedure will be described below.

It should be pointed out that the newer software versions are completely compatible with the old
chromatograph. You can therefore use the old chromatograph with the new software and make any/all
changes from the QLOG software. One WARNING here, however, is that it has been noticed with this
combination that the filaments occasionally turn themselves off and will need resetting - be aware of this
!

NOTE, this does not work the other way around. Under NO circumstances should you attempt to run the
newer chromatograph with the old software.

The procedures described below are only to be used if you are using the older chromatograph with the
older software.

4.4.1 Use of the front control panel

The first difference is that there is a ‘remote’ control button on the chromatograph. This status is
displayed on an LED display. While in remote mode, communication is open between the chromatograph
and the computer. By pressing the button, the chromatograph is put into ‘local’ mode - this effectively
breaks the communication link in the same way as if you were to disconnect the serial cable as described
above for the newer chromatograph.

This facility can therefore be used if you intend to shut down the m200 administrator or if you are going
to reboot the computer.

161
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The status shown in the m200 setup when the chromatograph is in local mode is ‘offline’. The status’
already described (unplugged, new, idle, running) also apply to this chromatograph.

M200setup_old

This file looks and operates in principally the same way as already described.

The Method is exactly the same and edited in the same way.

The display of the configuration setups is exactly the same, but unlike the newer version, they cannot be
changed from within this program.

There are fewer control functions: -

F2 Start
F3 Stop To stop the chromatograph after the current cycle is complete -
this option should always be used to stop the chromatograph.
Stopping the chromatograph by putting it into local mode will
stop it immediately, and if a sample analysis is midway, a
communication error will result.
F4 Exit Setup
F5 Record current chromatogram

F7 Edit Method As described previously; use twice to initialize a new method.


F8 Edit Port

Changing the chromatograph configuration using the front control panel

Principally, the only reason that these setups may require changing is if one or all of the three scale
factors are incorrectly set:-

CHP Scale
Temp Scale
Temp Offset

• Stop the chromatograph running using F3

• Put the chromatograph into local mode

• Kill the administrator dau_kill m200admin

• Remove the configuration file rm 3:/datalog/config/m200admn.cfg

• Press the Reset key on the panel, and at the same time, the Config key

The display will show UPDATE CHP OFFSET

• Press Enter to confirm; you will automatically be placed in the settings for Channel A.

162
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Press Enter to take you through the options until you get to the one you need to change

• Use the ‘up and down’ keys to increase or decrease the value, press enter to save

• When you have made the changes to Channel A, press A/B to switch to Channel B and repeat the
process to make any changes

• Restart m200admin

• Disconnect and reconnect the power to the chromatograph; the setups are only read when the
chromatograph is turned on.

• The new configuration will be automatically sent to the computer.

163
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.5 CHROMPACK MICRO-GC

The Chrompack chromatograph, also used by Datalog, is constructed and operates in a very similar
fashion to the M200, and is operated through the same QLOG interface software.

The same columns are used, with similar injection cycles, and to all intents and purposes, the two
systems appear the same with identical chromatograms being produced.

Externally, there are some variations with the Chrompack front panels, and these are detailed below:

Front Panel

The front panel contains the gas sample inlet port, LED display and keypad and operational keys.

STBY (standby) and START keys To determine operational mode


As long as the Method is defined (through the QLOG
interface), START will allow operation of the
chromatograph

KEYPAD, CURSOR, TAB, ENTER These keys allow access to a menu setup, displayed on
the LED, that will take you through the Method
Configuration and allow settings to be changed. As with
the M200 however, the Method should be operated
through the QLOG Setup software.

ESC Allows a submenu to be closed without saving any of


the changes made.

F1 HELP

F2 STOP – stops a run after START is activated in local


mode

F3 STAT A – shows status of Column/Channel A

F4 STAT B – shows status of Column/Channel B

164
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.6 QLOG OPERATIONAL SOFTWARE

This suite of programs is accessed from Realtime_Controls_Chromatograph

Setup The m200setup as already described


Calibrate
Tweak Calibrations A facility to change calibration points, described later in the
section.
Configuration Sheet Printout of the m200setup file - this should accompany the
chromatograph as already described.
Ex Chromatogram A view only facility, displaying the analyzed gases on each
channel. This is illustrated below.

composite Column A
O2+N2 Column B

C1
C3

iC4
nC4 C2
iC5 nC5
CO2

10 20 elution time (seconds) 30

4.6.1 Calibration Procedure

After ensuring you have communication, that all the setups are correct and that the helium is applied at
80psi, you are ready to calibrate the chromatograph.

If the chromatograph is newly set up, you should allow a period of 5 minutes or so for the temperature
and pressure to set and the columns to stabilize - you will see this occurring by way of the autozero
changing. Once the autozero is stable, the columns are stable and you can proceed with the calibration.

165
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The calibration can only be performed from windows, using the following steps: -

• Select Calibrate from the menu

• Connect the calibration gas, via the perchlorate filter, to the chromatograph and set the gas flowing at
a constant rate of around 3 psi - if a small pressure gauge is not available, you should determine the
rate of flow by comparing the flow rate with the flow delivered from the CPU when the normal
sample line is connected and the pump is running.

• Allow 2 initial injections to ensure that the chromatograph lines are full of the calibration gas.

• Select Record - you will be asked to enter a name eg calib1. The sample that is currently being
analyzed will be stored under this name in 3:/datalog/chrom_dat. This ‘saving’ will occur when you
hear the chromatograph take its next sample.

• Access this sample by selecting Select, click on the filename with the mouse and select Open.

• You will now have a graphic display of the gases analyzed on both channels. The red graph
represents Channel A and the blue graph Channel B.

Channel A (red) Composite, C3, ic4, nC4, iC5, nC5


Channel B (blue) Composite N2 and O2, C1, CO2, C2

• If the calibration gas is low end, use the Scale to magnify the peaks. This is just a scaling factor with
options 1 to 10.

• Select Define; click on C1 for example and select the correct Channel number (B in this case).

• Just Channel B will be displayed now; move your mouse and simply click once on either side of the
peak. By doing this, you are simply defining a time interval in which the chromatograph will look for
this particular peak. The apex of the peak will be determined automatically, then the software will
follow each side of the peak back to the base line and determine its own set points.

• Once these set points are defined, enter the gas value that this peak represents.

• Repeat this process for each of the gases.

The calibrations are stored automatically. The current calibration settings can be viewed by bringing the
calibration configuration window to the front of the display. This window is always found behind the
main calibration window; simply click on it with the left mouse to bring it to the front.

The following information, for each gas calibrated, is displayed: -

Chan Name Start End Area Percent


B C1 13.71 14.77 37295302 1.5000
B C2 26.13 28.35 3595240 0.1000
A C3 8.59 9.82 4958472 0.1000

166
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The Start and End values represent the set points selected by the software that define the time interval,
between which, the apex of that gas peak will be found.

The area beneath the peak is calculated and shown in the table; this is then integrated to give the
equivalent gas value.

When the calibration procedure has been completed, open a display window showing all of the gases and
ensure that the values displayed are correct. The calibration should be accurate to within 10 ppm,
although in reality, there should be no problem in achieving an accuracy of just a few ppm.

If any of the values are not accurate enough, then repeat the calibration process by recording another
sample. If just one or two of the gases are inaccurate, there is no need to recalibrate every gas, just the
erroneous ones. For the others, the values from the previous calibration will still be saved.

4.6.2 The Tweak Option

As already described, the set points determined during calibration are selected by the software. In some
cases, they may be set well away from the actual peak. The Tweaking option allows the user to move
these set points to a position of their choosing. This procedure does not affect the calibration in any way,
it is simply changing the time interval in which the apex of the gas peak will be found.

There are two common reasons why this process may be necessary and they will be illustrated in detail in
the next section.

1. Redefining the C3 peak to exclude moisture being analyzed at the same time

2. Redefining the C1 peak when a large volume changes the appearance of the peak

Example: -

The set points shown in diagram A are those selected by the software; you wish to change these set
points to those shown in diagram B.

A B

time (s)

• Select Tweak Calibrations


• Select Select Gas and click on the appropriate gas
• Click on the ‘up and down’ arrows to change the value (the value will be the time in seconds) to what
you want and Apply. Apply will save the changes, Reset will exit without saving.

167
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.7 MOISTURE - C3 PROBLEM

Moisture is always going to be a problem when sampling from the mud line. The first priority is to try
and actually eliminate it completely from the gas sample by the use of driers and filters.

The degree of the problem will vary widely depending on climate, mud type and mud temperature and
this will determine what filters/driers are necessary. Obviously, there is a limit to how many can be used
in a sample line, because of restrictions to the sample flow.

A recommended system is as follows: -

• At the trap, bubble the sample through a drop out jar


containing glycol and then pass the sample through a drop out
jar containing Calcium Chloride drier. This combination has
been shown to be very effective in removing a large amount
of moisture, and the bubbling through glycol first prolongs
the life of the CaCl drier.

• When the sample line enters the unit, place another drop out
jar containing CaCl drier. For severe moisture problems, a
3rd drier may be beneficial, being placed outside the unit.
Preferably, place this jar where there is a temperature change
(eg if the sample line passes from a warm pit room to a cold
outside).

• Before the sample line reaches the CPU, pass it through a


combined filter assembly containing a moisture filter, a
coarse particle filter and a finite filter.

• There should be one final finite filter inside the CPU before
the gas sample reaches the Total Gas Sensor.

• Magnesium Perchlorate filter between the CPU and the


chromatograph.

Obviously, these filters and driers should be routinely checked and replaced when necessary. The
frequency that they will require changing will vary depending on the severity of the problem.

Typical frequencies may be: -

Glycol every few days


Ca Chloride twice a shift to once a day. The driers further from the trap will be less
frequent; the one in the unit may only require changing once a week.
Mg Perchlorate Once or twice a shift to every couple of days
Blue Disks Every couple of days to once a week

Should, however, moisture remain in the gas sample, it will be detected and analyzed like any other gas.
The problem is that it just happens to be detected on Channel A at pretty much the same time as C3

168
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

occurs. Therefore, even if you don’t have any actual C3 in the gas sample, any moisture will be analyzed
and recorded as if it were C3.

Our task, then, if we can’t eliminate the moisture, is to stop it being analyzed as C3. There are 3 lines of
defense with which to attempt this: -

1) Determine whether there is enough ‘time separation’ between the apex’s of the 2 peaks to be able to
use the tweak option - ie move the C3 set points so that the C3 peak is still defined, but so that the apex
of the moisture peak will be outside of the set points. A minimum of around 0.2 seconds is required to do
this.

The 2 situations are illustrated below: -

In A, the moisture peak appears inside the C3 set points and will therefore be analyzed as C3.

In B, after tweaking the C3 end point, the apex of the moisture peak now falls outside, or after, the
setpoint - it will therefore no longer be analyzed as C3.

A B

C3

Moisture

If you need to get an accurate determination of the precise time that the two peaks are being analyzed,
you can use the calibration procedure. For each of the peaks, select the appropriate chromatogram, and
proceed as if to calibrate. Proceed to the point of clicking on either side of the peak to determine the set
points, but do not click. Move your mouse to the precise apex of the point - the time will be displayed to
2 decimal places in the top right hand of the window. At this point, just select one of the other options in
order to abort the calibration process.

Now you have the precise timing of both peaks, so that changing the C3 set point is a relatively easy
process. However, there may be times when there is not enough separation between the peaks to enable
you to use the tweak option effectively.

2) Increase the temperature of column A by 10 degrees or so - this may be enough to ‘burn off’ the
moisture. A small change in temperature probably won’t significantly change the elution time, but you
should be aware of this possibility which will mean redefining all of the peaks on Channel A.

169
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

3) Decrease the column head pressure - this will push the sample through the column at a slower speed
and will have the affect of separating the gas peaks. How much you can decrease the pressure by is
governed by the position of the C5 peak - this shouldn’t exceed the 30 second run time.

This is a very time consuming process; you have to change the pressure, redefine your gas peaks because
their elution time will have changed, tweak the C3 set points, then test for both moisture and C3. The
procedure will probably have to be repeated one or two times before it is successful - it can therefore take
a long time and should only be attempted if you know you have this time to spare.

170
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.8 COLUMN SATURATION

When C1 increases to a level in excess of perhaps 50%, the peak will move to the left (ie will appear
sooner) and it’s shape changes. From being an equilateral peak, the peak ‘straightens’ up becoming near
vertical on the initial side of the peak. These changes have the effect of taking the apex of the peak to the
left of the start set point, no longer ‘inside’ it.

The software will therefore no longer ‘see’ the peak, assumes that there isn’t a peak, and thus the C1
value will fall to zero.

‘high level’ peak

‘normal’ peak

For the peak to be recognized, the Start set point has to be tweaked, or moved, to the left, ie the Start
time decreased.

171
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.9 USING TWO CHROMATOGRAPHS

A second chromatograph may be added to the system in order to analyze ‘extra’ gases that cannot be
analyzed by the columns in the usual chromatograph. This may be due to column type or limitations due
to processing time.

There are, however, certain restrictions on the operation of the second chromatograph:-

• Only gases analyzed by the first chromatograph are included in the Total Hydrocarbons and Total
Gas Chromat parameters. Any extra gases analyzed by the second chromatograph are treated as
individual gases only and not used in any of the system calculations.

• The same gas cannot be defined on both chromatographs under the same name.

• The chromatographs should run in staggered order. One chromatograph should be started and
allowed to run part way through its cycle, before starting the second chromatograph running. This
prevents both chromatographs using processing time at the same time when an analysis is done.

For the normal operation of a single chromatograph, the m200admin controlling the chromatograph must
be registered with the QNX Operating System. This allows the m200setup program to locate and
configure the m200admin and for the calibration program to operate. It also enables the ‘dau_kill’
command to locate the administrator in order to shut it down.

For a second chromatograph to operate, it’s m200admin program must be registered with the QNX OS
under a different name. This will allow the second chromatograph to operate independently of the first.

For a second chromatograph to be accessed, the following programs need to be renamed by using the ‘t=‘
option as shown:-

<command name> t=<new name>

m200admin t=m200two
m200setup t=m200two
graph t=m200two

When using dau_kill for the second chromatograph, you should use dau_kill m200two.

All calibrations, configurations and setups will be saved separately for each chromatograph, based on the
new name allocated: -

Chromat 1 Chromat 2

m200admn.gas m200two.gas
m200admn.cfg m200two.cfg

To access the second chromatograph from the QLOG menu, the realtime dial in 3:/datalog/menus will
have to be modified for the m200setup and calibration:-

172
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Chromatograph...@(Setup1|m200setup;Setup2|m200setup t=m200two;
Calibrate1|graph;Calibrate2|graph t=m200two;
Tweak Calibrations|.m200fine;
Configuration Sheet|m200sheet;
Example Chromatogram|eg_chromat.bat)^R;

Both the setup and calibration program names include the optional name defined in the ‘t=‘ option, to
differentiate between the chromatograph governed by programs that use the regular name and the
additional chromatograph using the ‘optional’ commands.

173
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.10 Printing Chromatogram Files

This facility allows you to print to hard copy, or file, any chromatograms that you have stored on the
system. This is of obvious benefit for a record of calibrations and services, but can also be used to
provide a visual aid to any significant gas peaks that you may want to record while drilling.

The command to use is gcprint

Type gcprint ? in order to see the required format and options of the command.

Standard Format:-

gcprint <printer type> <layout> <options>

Printer Type hpgl

Layout portrait (vertical) or landscape (horizontal)

Options f= name of the chromatogram file


s= scaling (same as scale in calibration)
+colour
+a_trace can plot either or both channels (default is both
+b_trace if not specified)
-recalcs the program will calculate the gas values based on the
current calibrations. The -recalcs option will disable this
o= output (filename or printer destination)

Example: -

You want to print out both channels for the chromatogram saved as ‘peak.1110m’; the current calibration
file is valid.

gcprint hpgl landscape f=peak.1110m s=2 +colour o=[1]$lpt

174
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

4.11 Trouble Shooting

Generally, most ‘faults’ with the chromatograph are due to user error and easily traceable. Should the
chromatograph actually ‘break’, there is little that can be done in the field. The unit will normally have to
be returned to base and replaced.

Genuine problems with columns can often be as a result of particles entering and causing blockages,
therefore when transporting chromatographs, ensure that all inlets are covered.

• Status reads unplugged ensure chromatograph is switched on


ensure m200 administrator is running
ensure correct port is defined in m200setup

• Ensure the port has the correct settings, and is connected via the special null modem serial lead used
by the chromatograph:

stty baud=9600 par=none stop=1 bits=8 >$cti1

• No sample flow through chromat - flow restricted in sample tubing


- perchlorate needs replacing or is packed too tight, the
cotton wool may be too tight also
- change the blue disk filter
- check flow from the CPU
- filter inside sample port maybe plugged

• Filaments will not turn on this is a problem with helium pressure - the filaments will not
turn on if the pressure at the column head is less than 5psi.
Therefore, check that bottle, regulator, leaks etc to ensure that
helium is reaching the chromatograph at the correct pressure.

Occasionally, when first setting up the chromatograph, the


filaments do not turn on. This will normally just require you to
resave the method with filament setting on.

• Slow ‘drop off’ of gases Firstly check that you have good sample flow through the
perchlorate filter and change if necessary. If this is okay, the
problem may be due to the sample not being pushed through the
columns at a high enough pressure. Normally, you can expect
columns to clear in a couple of injections. Should it be taking
several minutes or longer, the pressure in the columns is too low.

Should it be occurring on both channels, then the fault is


probably with the helium supply - check the regulator and

175
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

helium line and filter for any blockage. Should it be occurring on


only one column, then the fault is internal with a blockage in the
particular column. Check the sample exhausts at the back of the
chromat to confirm this. You should feel a little puff after each
injection. Should you not feel this, then there is a blockage.

• No gas on one channel This is probably a more serious case of the above, when the
column has been completely blocked.

Another possibility is the autozero. Should your base line on the


chromatogram be offscale, you should check the value of the
autozero in m200setup. If it is +/- 450 mV, then the column
needs replacing.

The worst scenario is that the injector is not working - the


chromat will have to be returned to base if this is the case.

• No gas on either channel It is unlikely that both channels will become blocked, so the
blockage is likely to be before the chromat
- check for restrictions in the sample tubing; check that there is
flow through the perchlorate filter - this may need changing or
may be packed too tight to allow sufficient flow; the unlikely
final possibility is that the filter inside the sample port has
become plugged.

• Generally spurious readings Strange readings, abnormal extra gasses, peaks moving
etc etc, can normally be put down to incorrect settings of
pressure and temperature. You should check that the CHP Scale,
Temp Scale and Offset are set correctly for that particular
column. This should always be checked as a matter of course
when first setting up the chromat.

• When you run the administrator, "m200admin &", two m200admin tasks will appear on the "tsk" list.
If on using dau_kill, one task remains, you will have a ongoing fault, as the next startup of
m200admin will add a further two m200admins tasks and thus you could incorrectly have 3 in total.
A reboot may be the only way to remove this rogue task.

• You should avoided booting the computer while the chromatograph is on line. For the chromatograph
with a front control panel, put the chromat into local mode. For the chromat with no control panel,
simply disconnect the serial cable before rebooting.

176
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5. BASIC QNX COMMANDS

177
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.1 THE QNX OPERATING SYSTEM

All computers require a means of communicating with system peripherals and devices such as disk
drives, screens and printers. The software that communicates directly with these periherals is called an
Operating System. Examples of other Operating Systems are MSDOS, OS/2, UNIX and WINDOWS
NT.

In order to operate the QLOG data acquisition system, it is not necessary to have an in depth knowledge
of the underlying Operating System but a good knowledge is required to configure a QLOG system,
perform certain operations or to perform any troubleshooting.

The operating system used by Datalog is called QNX. This operating system provides the QLOG system
with many advantages over other operating systems;

For example, an MSDOS system only allows one program to be run at a time by a user and all of the
peripherals are tied up by the one program.

QNX is an operating system designed to run on IBM 80*86 compatible computers such as 80486 or
80386 machines, the same computers which run MSDOS. Principally, Datalog use the ‘486’ machines
for use in the field.

QNX provides the same services to programmers as MSDOS, but also adds several important features
such as multi-tasking, a multi-user environment, rapid real-time response and networking facilities.

178
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.2 MULTI-TASKING

QNX has the capability to run many programs at the same time. This is achieved by utilizing the time that
the central processing unit (CPU) spends waiting, or doing nothing. Peripherals such as printers and disk
drives are much slower than the CPU.

Under MSDOS, the CPU would wait for a user to enter a response from the keyboard; QNX spends this
time running other programs or tasks. QNX operates by giving each task or program a portion of the CPU
processing time for a fraction of a second.

All of the tasks are allocated different priorities from 1 to 15 where 15 is the lowest. If a task is running
at a higher priority than another task, then this higher priority task will have precedence over the CPU
time. Within QLOG, the data acquisition task runs at the highest priority; other programs such as log
plotting run at much lower levels, since the speed in which the task is completed is not critical.

If the system response appears sluggish, higher priority tasks are taking precedence over non critical
functions such as displays tasks.

There are two methods of running tasks under QNX, referred to as foreground and background.
Programs that require user input are run in the foreground. The number of foreground tasks which may
be run is limited by the number of screens or consoles that are available on a particular computer.

QLOG acquisition and processing tasks are run in the background, since they are run automatically by
the system and require no user input. Background tasks are usually described as those tasks without any
user input, output, or control; or any task which is intended to run continuously.

If these acquisition tasks were run as foreground tasks, the limited number of consoles would limit the
number of acquisition tasks that could be run and also prevent the user from running any other programs
on those particular consoles.

Running the acquisition tasks in the background therefore keeps the console free for user tasks. Up to
250 tasks may be run simultaneously in the background and foreground.

The addition of an ampersand ("&") to the program name when starting the task will run it in the
background. The following command, for example, starts the QLOG data acquisition system
administrator running in the background:

dau_admin &

A task id number (Tid) is displayed after starting a background task. To see what tasks are running on
the system, enter the command tsk. For the time being, don't concern yourself with any of the columns
apart from those labelled: Program, Tid and Pri.

179
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.3 MULTI-USER

For the same reason that QNX can multi-task, it also allows many users to operate on the same system
independently of each other. QLOG has one central computer, the Server, which performs all of the data
acquisition, analyses and storage.

Other computers, linked to the server by a network, may be placed in the Mud Logging Unit, the offices
of the Engineer and Geologist and the drillfloor. Each of these users is unaware of other users sharing
the system at the same time. If the system is heavily loaded with higher priority tasks, the user may
notice a slight delay in responses from the computer. There are various ways by which the computers can
be linked:

Users may be located locally and connected directly by a cable to a host CPU through a serial port. The
user will therefore have a terminal that will only display the information sent to the CPU and transmit
back any information entered from the keyboard by the user; the terminal has no computational power.

Users can be located far away from the host computer by connections through modems. A modem
changes the electrical signal to audio frequency tones that can be transmitted over telephone lines, or by
microwaves, satellites etc. The user at the receiving end will then have a modem to turn the audio signal
back into a electrical signal which is displayed by a terminal.

The other method for users to be connected to the server is by a Local Area Network (LAN) where the
user has his own computer. The advantages of this computer (or workstation) are:

• A workstation does not slow down the server. In fact it can be used to speed up the system.

• A workstation is much more resistant to electrical noise than serial terminals.

• A workstation can perform graphics whereas serial terminals cannot do so with acceptable
performance.

Multi-user systems have to guard against illegal access and must have a certain amount of restricted
access to users.

• QLOG has a password protection as well as individual file protection.

• To see which users are logged on to your machine type who.

• To see what users are logged onto the whole network type: who net

Users can be logged onto a single node many times through the use of consoles. By pressing <Ctrl> +
<Alt> + <Enter> simultaneously, the screen will switch to the different consoles that are mounted on a
particular node. Pressing Ctrl Alt 2 would change to console 2. When the system is operated in text
mode as opposed to graphics or windows, multiple consoles allow the mud logger to instantaneously flip
between displays and programs. For example, one console could display the real time display, another
the database editor, and yet another the trip mode.

180
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.4 REAL-TIME OPERATION

QNX is designed for real-time monitoring. UNIX, which closely resembles QNX, has the great
disadvantage of being slow and unable to monitor real-time parameters.

Because of the speed of QNX, QLOG provides all of the functions required by a mudlogging system
including real-time data acquisition, and reporting much more efficiently than DOS or UNIX systems.

One of the reasons QNX is so fast is that it has very small memory requirements; very little of the
operating system is ever kept in memory. For example, all of the commands such as dir, ls, cp, tsk are
loaded in from disk every time they are run.

When a tsk is performed, the user will see a column called Pri; this is the priority that a task is running
at. Except for tasks that have priorities pre-determined by the system, a task will run at priority 8 by
default; therefore, unless a user or program changes the priority, it will run at priority 8.

A program called sac will show graphically the amount of CPU time being used.

The computer can never do nothing, so there is a task called ‘idle’ whose job is to use any priority 15
CPU time.

181
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.5 NETWORKING AND DISTRIBUTED PROCESSING

QNX passes messages between tasks or programs; for example the database administrator task which
saves data to the database will receive information from the data acquisition task.

The operating system allows these messages to be passed over the LAN at very high speeds,
approximately 1 million bits per second. This allows programmers to run tasks on any network
computers and have the results sent back to the host (or issuing) computer. This distributes the
processing power.

Qlog uses this message passing ability in many ways, two examples are:

i). Increased processing power.

If the need for more computational power is required, an additional node can be added - this node will
perform calculations and pass the results back to the server. There can be up to 256 nodes, giving more
computational power than most mainframe computers. In QNX, a node need not have any peripherals,
the server can boot the client and share its peripherals, thus a node can be disk-less and have no display.

ii) Graphical displays.

Graphics requires much of the CPU power and the information required to display graphics is too much
to transmit over serial lines. The QLOG server will pass the result of a calculation to a node which will
perform the graphics task displaying the information; which in Datalog's case is a workstation running a
windowing environment called QNX Windows.

Nodes can be in a variety of forms, for example:

i) A full computer system similar to the server node with a keyboard, hard-drive, monitor and printers.

ii) Display only with no hard drive. In this case the client will receive all of the program tasks from the
server.

iii) CPU only, providing additional computational power. The CPU has no way of communicating with
the user.

To see what nodes are available on a network type net; a listing of all available nodes is given, as well as
the total memory and CPU power if all the machines were running as a single system.

To run a task, or to access a file on another node, type the node number in brackets; the following
example would run the net program on node 4:

[4] net

182
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.6 FIRST STEPS

5.6.1 Logging In

If your screen is blank or has a message "Type a Ctrl z to login", type Ctrl z by pressing the Ctrl and 'z'
keys -simultaneously. A copyright notice followed by a login prompt should appear,

You will now be given a login prompt Login:

QNX is now waiting for you to enter your pre-assigned userid. If a user account has not already been
assigned to you, ask a system administrator to provide you with an account.

After entering your userid, you will be given a password prompt Password:

When you enter your password, it will not appear on screen as you type it for security reasons. Once you
have entered your password, you may see some messages which for the time being you can ignore, but
you should end up at a system command prompt which will be % or $ sign.

Typing logoff or bye will log the user off of the system.

5.6.2 User Permissions

QNX applies access rights to users and to any files that users create. These access levels are governed by
a pair of numbers, the group and member number, where each group or member is a number between 0
and 255.

A user with a group number of less than 255 is an ‘ordinary’ user and will be given the % command
prompt as described above. A user with a member number of 255 is the leader of that particular group
and has group privileges over the members of that group.

A group number of 255 means that that user is a superuser and is given a $ command prompt (eg
255,125).

You may notice a number before your prompt. This is the tty (terminal type) number of the console or
terminal you are currently logged on to. If you do not see the tty number, run the program promptt to
display it.

To see what access level (group and member number) a particular user has, type:

finger <userid> where <userid> is the name of the user.

Other information such as the last time he/she logged on can also be seen.

Permissions will be discussed in some detail in Section 6 of this manual, but a user with a lower group
level can not modify, delete, run or even read another users files, unless the permission is specifically
given by a higher level group user.

183
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.7 BASIC QNX OPERATIONS

5.7.1 The Command Line

When typing on the QNX command line, the following editing keys will be useful:

Up Arrow will repeat previous commands.

Insert will allow you to over type and correct mistakes

Ctrl-x will cancel the entire line.

Ctrl-c will abort a command or the current command line.

It is possible to have "odd" characters in the keyboard buffer, left over from a previous program or
command, which will have the effect of the system not accepting a command as typed. You will simply
be returned to a command line again.

For example, if the escape key is pressed before a command is entered, the command will have no effect.

To clear the command line of any "odd" characters, use the Ctrl-x option.

The following points should be remembered:

i) QNX always needs you to insert spaces between keystrokes or ‘parts to a command.

eg in QNX cd/tmp will not work, the command has to be cd /tmp.

ii) QNX is case sensitive. (It distinguishes between upper and lower-case characters). Commands are
normally lower-case. The file "TEST" and "test" are different files.

iii) QNX always uses a forward slash "/" rather than the DOS back slash "\" as the subdirectory separator.

iv) QNX is powerful and unforgiving. You are rarely asked to confirm commands, so consider carefully
your instructions before you enter them.

v) Files can have any name in QNX; executable files do not have any special extension as in DOS.
Filenames can be up to 16 characters long and can include numbers and symbols as well as letters.

vi) QNX uses numbers to represent disk drives:

There is always a semi-colon after the drive number eg 3:/


As standard, the hard drive used by Datalog is partitioned into 2 parts:-

Main working partition is 3:/


Secondary partition is 4:/
Floppy drive is 1:/

184
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

If specifying a particular node number, the number must be entered inside square brackets:-

ie [1]3:/

vii) QNX provides a command summary and available options for most commands by placing a question
mark after the command - for example: -

ls ?

use: ls [directory][options]*

options: +modified -sort p=[^]pattern +unused -dir_off +dir_on


+age_sort +Size_sort +reverse_sort +size +blocks -All
c=columns -columns_off +file_list +horizontal +verbose
+executable -executable +Modified_only +clear_screen
w=column_width +tx_time b=baud_rate -modified l=line_length

viii) To reboot a QNX node, simultaneously press the following 4 keys: CTRL ALT SHIFT DEL, not
CTRL ALT DEL as with MSDOS.

5.7.2 The Directory Structure

QNX has a rigid file structure and the user must know where important files are kept, ie in which
directories.

QNX and QLOG have predefined directories:

/config has all the system configuration files


/cmds all system utility programs (ie ls, cd, more etc.)
/tmp temporary working directory
/drivers system programs to control disks, interfaces etc.
/user the root directory for all user directories

/datalog the root directory for all QLOG files and programs
/datalog/cmds all QLOG executable programs
/datalog/config all QLOG configuration files
/datalog/dbms databases
/windows the root directory for all the windows files

The complete structure will be looked at in more detail in the Advanced QLOG/QNX section of this
manual.

5.7.3 Changing Directory

After logging in, the user is placed in his/her home directory;

185
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

eg if bob logged in, he would be located in 3:/user/bob.

In QNX, your current working directory is not shown at the command prompt as it normally is in
MSDOS - this is because QNX directory names can become very long.

To see your current directory type: pwd

The message returned could be: [1]3:/user/bob, which is node 1 drive 3, directory /user/bob.

The main command to change your current directory is ‘cd’, but there are rules on how this command
should be used:-

examples:-

cd takes you to your home directory no matter where you are located
cd /user takes you to the user directory,
cd 3:/cmds takes you to drive 3, /cmds directory

cd [4]3:/user/bill/text changes to node 4, drive 3, directory /user/bill/text

cd / takes you to the root (top) directory


cd ^ takes you ‘up’ one directory
cd ^^ takes you ‘up’ two directories
cd fred takes you into the subdirectory fred from your current directory

To better illustrate the basic rules, consider the directory structure as a tree with branches:-

Those shown are all valid directories and subdirectories from Node 1 with a partitioned hard drive and a
backup Node 2.

[1]3:/ [1]4:/ [2]3:/

cmds datalog user datalog cmds datalog user

cmds dbms datalog dbms cmds dbms datalog

In this case, the top of the branches are the root directories: [1]3:/ [1]4:/ and [2]3:/

The second ‘tier’ can be thought of as subdirectories of the root, or the initial root directories of
individual branches.

186
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

eg from [1]3:/, we have [1]3:/datalog ---------- [1]3:/datalog/cmds


[1]3:/datalog/dbms
[1]3:/cmds

[1]3:/user ------------- [1]3:/user/datalog

The main rules are as follows:-

a) as soon as you enter ‘/’ after cd, you will first be taken to the root of that particular branch - the
system will then look in that root for any particular directory name you have specified.

Therefore, in order to ‘change branches’ your directory path must begin with a ‘/’. If you are changing
‘main branches’, ie going to another drive or node, these must be specified also.

b) if you are staying on the same branch, then the slash is not required when going into a subdirectory
below your current directory. ie if no root is specified by a ‘/’, the system will automatically look into
your present directory for the directory you have specified. If you are going up the tree, then you can use
the ^ symbols to go up to different levels.

c) if no node or drive is specified, the system will default to Node 1 and drive 3. Therefore, when
located on any other node or drive, unless you are staying on the same ‘branch’, the full pathe together
with node and drive have to be specified.

These rules can be illustrated using the directory structure shown and the following examples:-

Location Command Destination

[1]3:/datalog cd cmds [1]3:/datalog/cmds


cd /cmds [1]3:/cmds
cd dbms [1]3:/datalog/dbms
cd /dbms not possible
cd 4:/datalog/dbms [1]4:/datalog/dbms
cd [2]3:/datalog/dbms [2]3:/datalog/dbms
cd ^ [1]3:/
cd ^user [1]3:/user

[2]3:/datalog cd cmds [2]3:/datalog/cmds


cd /cmds [1]3:/cmds
cd [2]3:/cmds [2]3:/cmds
cd ^cmds [2]3:/cmds
cd dbms [2]3:/datalog/dbms
cd /dbms not possible
cd 4:/datalog/dbms [1]4:/datalog/dbms

These same rules will apply, not only when changing directory, but when copying, moving or deleting
files. For each one of these operations, the system needs to know, first of all, where to find the files.

187
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.7.4 Devices

Devices are a means for input and output, to be treated by QNX in the same manner as files, giving great
flexibility in operating the system.

For example, a printer can be attached to a serial port or a parallel port (NB parallel should be normally
used); the output of a program can be directed to either device without any thought from a programmer.

A device name always starts with a dollar sign ($); some examples of valid devices are:

$lpt first printer port


$lpt2 second printer port
$mdm first "base" serial port
$term1 second "base" serial port
$con main console
$con2 second console
$win1 window terminal (QNX windows)
$cti1 CTI serial port (multiple serial port)
$null A device that does nothing

To see what devices are mounted type: mount

Files can be copied to a device, as we will see shortly.

When a device is mounted (this occurs either automatically when the machine boots, or by issuing a
mount command in the system initialization file), it is allocated a tty (terminal type) number as described
previously.

Devices can be referred to by the tty number;

For example, if the parallel port $lpt is given the tty number $tty1, that port could be referred to by either
$tty1 or $lpt.

Beware, however, that the tty number will vary depending on what devices are mounted on a particular
system. Do not assume, that because $tty1 is $lpt on one system, that it is the same on all machines or
configurations.

When tsk is run, it shows the tty number of the device on which the task was started.

When the mount command is run, you will see the drives that are mounted on the machine as well as
software libraries that are mounted.

188
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.7.5 Copying Files

Some new concepts are introduced here with the copy command. These concepts may be used with other
commands such as mv and ls. To copy files between directories use the following:

cp <source file> <destination address>

For example, there is a file called ‘newrecord’, located in the temporary directory, which we want to
copy onto a disk in floppy drive 1, in a subdirectory called records:

cp /tmp/newrecord 1:/records Note that there is no ‘/’ after 1:/records. If this


was put, the system would expect a further
subdirectory name.

In the above example, the name of the file could be changed by changing the destination name; for
example to ‘new_name’:

cp /tmp/newrecord 1:/records/new_name

Be certain that the directory you are defining actually exists. In the first example, if there was no such
directory as /records, the file ‘newrecord’ would have been copied to the root directory, ie 1:/, and its
name would have been changed to ‘records’.

To copy all of the files from the /tmp directory, to /user/dave using the wild card (*):

cp /tmp/* /user/dave

To copy only files ending in p from /tmp, to /user/dave:

cp /tmp/*p /user/dave

Note, that in all of the above examples, the assumption is that the user is not located in the /tmp
directory, so that it has to be specified. If the current working directory was /tmp, it would not need to be
specified - the system would automatically look into the current directory for those files.

The above example would therefore be:

cp *p /user/dave

To copy files to a different node on the network:

eg cp [1]3:/datalog/cmds/* [2]3:/datalog/cmds

ie the node number has to be specified. This also applies to when copying to different drives - the drive
number would have to be specified (unless copying to the default node 1 drive 3)

eg to copy all files from 3:/datalog/dbms to the same directory on drive 4 (both node 1):

cp 3:/datalog/dbms/* 4:/datalog/dbms

189
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

eg to copy all files from node 2’s temporary directory to the same directory on node 1:

cp [2]3:/tmp/* /tmp

A file can also be copied (ie printed out) to a device such as a printer. The following example will print
out the file called ‘report’, located in 3:/user/datalog, to a printer connected to the 2nd paralle port on
node 2:

cp /user/datalog/report [2]$lpt2

If a file is copied, and no destination is specified (ie cp /user/datalog/report ), your current working
console is assumed to be the destination and the file will appear on your screen.

As an exercise in copying files to devices, you should copy a text file to a printer and to a console on
another node. Mistakes that commonly occur when using the cp command, are the incorrect spelling of
the destination directory with the consequence that a new file is created;

for example, if we were copying a file called ‘test’ to /user/bob but instead issued the command:

cp test /user/bib

The result of this is that a new file called ‘bib’ would be created in /user.

Another common mistake is to forget the $ sign when copying files to a printer;

for example: cp /tmp/log lpt

will copy /tmp/log to a new file called ‘lpt’ in whatever directory we are currently in.

5.7.6 Moving, Deleting and Renaming Files

Moving Files

To move files, use the same procedure as when copying files between directories:

mv <source file> <destination name>

Examples:

mv /tmp/well.rpt /user/bob moves well.rpt from /tmp to /user/bob

mv /tmp/well.rpt /user/bob/new_well.rpt changes the name of the file as well as moving it


to another directory

mv /user/bob/demo [2]3:/tmp moves the file from bobs home directory on node 1, to
the temp directory on node 2

mv demo.script test.script simply changes the file name without moving it

190
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

If you try to move a file to a file name that already exists, the command will fail, whereas if you copy a
file to an existing file name, the existing file will be overwritten.

Deleting files

To delete a file, use the 'rm' (remove) command;

eg to delete a file called ‘report’ in /user/fred:-

rm /user/fred/report

The wild card (*) can also be used to delete multiple files;

eg delete all of the files in the temporary directory:-

rm /tmp/*

The interactive option +i provides some safety and should be used when deleting multiple files. Using
this option, you will be asked to confirm the removal of each individual file.

ie rm /tmp/* +i

If a file cannot be deleted, the user may not have permission to delete the file; the file could be busy
(someone or some program is currently holding the file open); or the file could be corrupt.

Renaming Files

The command is ren and it works in much the same way as the other ‘file’ commands:-

ren well.txt well.rpt renames file in your current directory

ren /tmp/well.txt well.rpt renames a file in a different directory - notice that you
do not need to give the full path when you give the new
file name

5.7.7 Listing Files

To list all of the files in your current working directory:

ls

The ‘ls’ command will only list the actual file names - no information about the file will be given.

To list all of the files contained in another directory:

eg ls /datalog/cmds

As an exercise the user should list all executable files in the /cmds directory beginning with the letter f.

191
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

To list the name of files together with the file size, time and date of creation, use the files command. The
size is given in blocks where one block is 512 bytes;

files [1]3:/datalog/cmds will show all files in 3:/datalog/dbms

This command will not only list the files in your present directory, but in any subdirectories within the
directory. In these cases, the directory path will be given as well as the file name.

The +d option will list just the subdirectories, no files, contained in a particular directory:

files /tmp +d will show any subdirectories in the temporary directory.

The +v option shows all information about the files, including file permissions and attributes. For the
time being, you need only be aware that these exist and how to view them. They will be covered in detail
in Section 6 of this manual.

5.7.8 Using the ‘more’ command

This command has 2 distinct functions:-

1. To view a text file


2. To view the entire output of a command (eg ls, files, tsk) that is too big to fit on one
screen.

Viewing a text file

For example, to view a file called ‘.login’ located in your current directory:

more .login

From this point, if you want to make any changes to the file, enter ‘e’ and you will automatically open
the QNX editor. Once you have saved any changes made and left the editor (ie grey +, w, enter, grey +, q,
enter), you will be placed back into the more program, viewing the file. Simply press the ‘esc’ key to exit
the program and return you to a command prompt.

The QLOG program called help uses the more program to display help text files. The following example
should be stepped through:

• At the command line enter help.

• Use the arrow keys to select the file called ‘qnx_cmds’ and press F7 to view this file, now you will
be in the more program viewing the ‘qnx_cmds’ help file.

• Press F1 for the option help screen and practice using functions listed.

• Try finding the text "ls" by pressing '/' or 'f', then enter 'ls' as the text to find. This is the fastest way
of locating a subject within a help file.

192
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Viewing Output

If the output from a command is too big to fit on one screen, all that you will be able to see is the ‘bottom
page’ of information remaining on the screen. To see any of the information that has already ‘scrolled
through’ the screen, you need to use the more command.

The command is used slightly differently, in that you are re-directing the output to a temporary file that
can then be viewed.

eg files +v /datalog/cmds |more

The pipe ‘|’ is used to redirect the output to the more program. A temporary file with the name pipe
followed by an extension will be created in the temporary directory. This is the file that you will be
viewing and it will remain in /tmp until you exit the more program. When you exit using ‘esc’ the file
will disappear.

5.7.9 Redirecting Input and Output.

As you have seen, a file can be copied to a printer, but what if we wish the output of a program to go to a
printer?

QNX provides a facility to redirect the input or output of a program using the > and < keys.

By default, the input is the keyboard


the output is your current console.

To output the contents of your current directory (ie ‘ls’) to a printer on the first parallel port on node 1:-

ls > [1]$lpt

Rather than hard copy, ie output to a printer, the output of a command can also be redirected to a file.

To output a list of files (only) to a temporary file called ‘junk’:-

files -v > /tmp/junk

The following would append (add on to) the file called junk (if it is not found, it is created):-

files -v >> /tmp/junk

To input to a program called mytask from a file called stuff:

mytask < stuff

This redirect input could redirect the input from a keyboard on a different node:-

eg this example will run mail on your node but accept keyboard input from node 4 console 2:

193
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

mail < [4]$con2

5.7.10 Creating and Deleting Directories.

To create a directory, use the mkdir command

The directory must have a different name to any file that already exists in the current directory.

eg you are located in /user/fred and which to create a subdirectory called text:-

mkdir text will create /user/fred/text

The same subdirectory could still have been created if you were located in a different directory by giving
the full path name:-

mkdir /user/fred/text

If there had been a file called ‘text’ in /user/fred, then the subdirectory ‘text’ could not have been created.

There can be directories with the same name on different drives.

A directory is similar to a file in that it has permissions like a file and these permissions need to be set.
These will be looked at in Section 6 of this manual.

To remove a directory use the 'rmdir' command. It is used in exactly the same way as ‘mkdir’, but the
directory must be empty (of files or further subdirectories) before it can be removed.

5.7.11 Printing Files.

As stated earlier, text files can be copied to a printer by using the ‘cp’ command. However, QNX
provides a method of formatting the printout by using the list command. For example:

list w=8 l=12 <filename> where w = page width


l = page length

Screen printouts:- use the keys ‘Ctrl’ ‘Alt’ and ‘Printscreen’ simultaneously:-

You have the following options:- print screen


save screen (enter a filename)
calculator (F10 to exit)

194
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.8 MORE ABOUT TASKS

As mentioned earlier, the ‘tsk’ command will tell us what tasks are running on a particular node;

for example, to see what tasks are running on node 4

tsk n=4 here, the ‘tsk’ is run from node 1, but to view the tasks on node 4.
This is the correct command to use

[4] tsk here, the ‘tsk’ is actually being run on node 4, so that the results would be
the same as above. However, if the reason we were checking the tasks
running was because of a problem on node 4, running the tsk program on
node 4 may compound the problem.

The tsk command shows the tty number of the device on which the task was started.

If you wish to start a task on another tty, use the ontty command;

eg to start the ‘dau_admin’ program on $tty99:-

ontty 99 dau_admin &.

The $tty 99 is used to run programs when no output is required.

The user should be cautioned that if a background task is started from a shell within windows, the task
will be terminated when that shell is closed.

For this reason, if you are in windows, background tasks should be started on another tty number using
the ontty command.

This could be tty99 as shown above, or perhaps the tty number of a normal consol screen.

5.8.1 Administrator Tasks

Tasks that have a higher priority than the person starting the task are called administrator tasks. As the
name suggests, an administrator task administers a particular part of the system.

Examples of QLOG administrators are dau_admin, the data acquisition administrator and dbadmin, the
database administrator. System administrators would include timing and password administrators.

Administrator tasks need to be able to communicate with other tasks over the network, thus they register
their name with the task administrator. To see the tasks names that are registered:

tsk na

195
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.9 STOPPING PROGRAMS

‘Normal’ tasks or commands can be halted by using Ctrl_c

eg dir / has a large output, to stop it part way use Ctrl_c

QLOG administrators can only be stopped by using dau_kill <administrator>

eg dau_kill DBadmin

Other (QLOG) programs have to be stopped by using the slay command.

eg to stop a program called ‘dead_program’ running

slay dead_program

If this program was running on another node, end the command with the node number

eg slay dead program n=2

Again, you should use the n= option, rather than running the slay command on node 2, to avoid potential
problems. One likely reason for you to be slaying a program is that it has ‘crashed’ and frozen up a
consol or terminal. Therefore, if you entered the command ‘[2] slay dead program’, you are risking
bringing the problem to your own node.

You can only slay programs that have been started by you or by a user with lower permissions.

As an exercise, start the mail program on tty 99 on node 1 and then slay the mail program.

When any task or program is started, it is given a unique task id (Tid), which will be displayed in the
information given by ‘tsk’.

A task can be referred to by this Tid, or by its name. If there is more than one task running (eg plot
programs) with the same name, and you try slaying the program name, you will be prompted to give the
Tid of the correct task to kill.

If you know the correct Tid, the program could be slayed directly by using the i= option.

eg slay i=4b0e n=2

196
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5.10 USING FLOPPY DISKS

To be able to use a floppy disk, there are two steps:

1. Format the disk


2. Initialize the disk

To format a disk use the fdformat command. For example to format a disk in drive 1:

fdformat 1 +1.4m where 1.4m signifies 1.4 Megabytes (2880 blocks)

If you are located on node 1, and the disk is in the floppy drive on node 2, the command would be:-

fdformat [2]1 +1.4m

To initialize the disk:

dinit 1

The disk is then ready to use, but you should check it for bad blocks before doing so:-

dcheck 1 +m The +m (mark), should any bad blocks be found, would mark the blocks,
recording them in a file bad_blks in the disks root directory. The disk
can then still be used.

You will notice a file called bitmap on every disk, in the root directory, including hard drives. This file
contains the sector allocation of the disk and must never be moved, deleted or tampered with.

WARNING all data on a disk will be deleted when the disk is initialized or formatted,

'query' will show the amount of space, used and remaining, on a floppy or hard disk.

eg query 1

May respond with: 0.7M free, 0.7M used, 50% full ( 1440 free, 1440 used of 2880 blocks )

197
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6. QLOG AND QNX APPLICATIONS

198
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.1. DIRECTORY STRUCTURE

This section shows the directory structure of the QNX system and related QLOG facilities.
Print out from the following commands:-

dir / -f > $lpt directory structure, without files, from the root directory

dir 3:/datalog > $lpt directory and files of the /datalog directory (ie QLOG)

Another useful assist would be to print out the help file 'manual', which details help files available and
details files contained in /datalog/cmds (ie QLOG programs).

Directory structure:-

/config hard drive and system configuration files


sys.init, sys.env
cti.init
tzset.sh

/cmds QNX commands - enter <command> ? for help on executing these files

/datalog QLOG directory - see next section

/drivers hard drive and graphics controller files

/netboot QNX boot files, the newest of which should be entered in the boot set up file

/dumps files dumped here in the case of errors or corruption

/mailboxes created for each user after authorization

/penpal word processor

/qterm communications

/ripcam spreadsheet

/lib program libraries

/tmp temporary working directory

/user home directory created for each user after being authorized

/windows eg /apps - applications


/config - configuration
/drivers - mouse and video controllers

199
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Breakdown of the QLOG menu , i.e. the /datalog directory:-

/datalog/calcim_dat to store calcimetry results

/cbm for coal bed methane files

/chrom_dat to store chromatograms (calibrations or samples)

/cmds QLOG programs

/config log header motifs, m200 setup, calib and set up, header, tomb,
profiles, decimals and preferences

/dbms depth databases (drive 3 or normally 4)

/default alarms, metric and imperial defaults for units and decimals

/displays realtime screen displays and headers

/help english and french

/menus dials for the QLOG menu


(modify in /user/***/windows for restrictions)

/plots GNUplot configurations

/plots/data data files for the above

/script plot control, script and extra files

/text for displays and headers

display.txt realtime displays


edits.txt extra dbase parameters
channels.txt channel names, calibration
plots.txt plot headers

/trips trip files if required

/windows

200
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.2 CONFIGURING A SYSTEM

6.2.1 Basic use of sys.init files

Configuring a QNX system can be a complicated task but from an engineers perspective, normally all
that is required are minor changes and fine-tuning of the default initialization files. The user should be
cognisant that any commands placed in the "sys.init" file are run (automatically) by the system and are
not run by any particular user.

When a node boots, a file called "sys.init.n" is executed where n is the particular node number on the
network. The file is stored in the directory 3:/config.

If there is no network "sys.init.0" is executed.

sys.init.n for each node


sys.init.0 used if system is not configured as a network. With our system,
even one
singular node is configured as a network ie node 1
sys.init.kns default for KNS work stations, copy to relevant node number

Use:- for mounting hard and floppy drives, consols, etc

for running timer, rtc at

tzset.sh (in which time offset is set)

programs run on ontty 99 (no output)


netboot
nettime
cron
passadmin etc

mounting drives

search patterns for drives and commands

video drivers:

defaults held in 3:/windows/drivers

qw.vga_bios oakland, 1 & - typical for older kns’


qw.vga_bios atiwonder, 1 & - typical for QLOG server
qw.vga16 g=2 m=5 - typical for new kns’s
qw.vga & - default for any graphics

201
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

mouse drivers:

defaults held in 3:/windows/drivers

mdrv microsoft serial mouse (200dpi) dev=$mdm


mdrv microsoft (inport) bus mouse int=3 &

set keyboard (for UK keyboards) eg kbd 102.UK

for communications - comm

stty settings for ports

eg comm b=38400 i=ATZ| a=ATA| +h +o +l l=/logs p=1 l=15


stty b=9600 +hflow +iflow +oflow +split esc=0 >$mdm

init.cti.n for multi serial port stty settings

The most common changes to be made to the sys.init files are to the mouse and video drivers and to
correct port settings. The user should familiarize themselves with these commands.

More detailed use and purpose of these files will be covered later in the manual, for the more advanced
user.

6.2.2 Creating New User Accounts

The authorize command will create accounts for new users. The user creating the account must be a
superuser and will have to supply his/her password to run the authorize program.

A non superuser may use the program to authorize a user, but no user directory or default .login file will
be created, so that that user will be unable to log in to the system.

From the authorize program you can create, edit, delete and view accounts. If you are creating a new
account you will have to provide an initial password for the user, this is normally the same as the users
name. When the user then logs onto the system, he/she can change the password to their own choosing
by issuing the command ‘pswd’.

Normally the default values in authorize are correct for new accounts, and the user can simply press
<carriage return> through most items. Required entries are:

User ID and Password - required for login


User Name (enter the user's real name)
New user group and member level (see below)
Password Expiry - set to 0 weeks to override

Once the required entries have been made, <Grey +> on the keypad should be entered in order to save the
changes.

202
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The user will then be prompted as to whether to create a user directory and a default .login file. The user
should reply Yes to these prompts.

This completes the authorization of a new user.

For security reasons, different users may be given different access levels to the system. This is governed
by the Group and Member numbers assigned through authorize. These range from 0 to 255.

Group number 255 denotes a superuser, giving complete access to the system.
Member number 255 indicates the leader of a particular group.

The command: finger <username> will show group/member numbers of a particular user

6.2.3 User Directories

As already seen, when a new user is authorized, a user directory should be automatically created for that
user:

i.e. if Bob is authorized on to the system, the directory 3:/user/bob will be created

The following files will be automatically created in the user directory:

.color default colours for screen and text


.login batch file containing commands to execute when a user logs in.

The default .login file will create a mailbox for the user when he first logs in. This enables mail to be sent
to this user.

When a user logs in, the command ec.login is run. ‘ec’ executes the user’s .login file containing the user
initialization commands. This .login file can be customised for a user’s own particular requirements.

The user directory will also hold the user units, decimal files and alarm settings (units.cfg, user_dp.cfg
and alarms.cfg). These could be copied to the user directory from the defaults on the system;
alternatively, as soon as a user makes any changes to the user units or decimals in the QLOG setup menu,
the files will automatically be created and saved in the user directory.

The .login file has many applications for procedures to be followed when a particular user logs on to the
system.

Examples:

To start a particular display (eg 2) display s=2


upon login

To start a screen plot and screen display windows


automatically on login wplot plotname &
wdisplay &

203
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

To have displays, help files and QLOG setenv LANGUAGE = french


menus in another language

For security, to enter the QLOG menu on qlog


login, but logging you off should you quit bye
QLOG i.e. giving you no access to the
QNX command line

204
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.3 LOCATING TEXT AND FILES

Text

A good example of locating text within files is when trying to find help on a particular subject. For
example is we wish to find all references to "hookload" in all the help files:

locate "hookload" /datalog/help/*

This will produce an output for every occurrence of the pattern "hookload" providing the help file name,
the line number and the line in which the match was found. This example should be sent to more.

Files

If you are trying to find a file on a particular drive a command can be made by searching the output of the
files command for the occurrence of the file name using the locate command. For example, if we wish to
find a file called "fortunes" on node 1 drive 3:

files [1]3:/ -v | locate "fortunes" | more.

The output of the files command becomes the input of the locate command, which becomes the input of
the more command.

There is a command called 'ff' which will search for a file which is easier to use than the multiple
commands. For example:

ff fortunes

If run from the root directory, the whole directory will be searched. The wildcard * can be used to find all
files of similar names.

205
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.4 TIME

6.4.1 Setting the correct time zone

Ensuring that the correct time zone is set is very important to the operation of QLOG. Data has to be
stored in a consistent worldwide format, yet displayed in regional time variations. To allow this to
happen, the QLOG system records data with time set to UTC (Coordinated Universal Time), otherwise
known as Greenwich Mean Time. Data can be displayed in regional times by using a timezone to offset
from UTC, the program which is used to perform this function is called the ‘tzd’ program and resides in
the file 3:/config/tzset.sh

Setting the time zone offset has to be done in the timezone description file 3:/config/timezone, The first
line of the file should contain a string in the following format:

STDoffsetDSToffset,start/time,end/time

Where:

STD 3 or more letters, the abbreviation for Standard (Winter) time. The actual letters
can be selected to reflect regional terminology ( eg CET for Central European
Time, MST for Mountain Standard Time).

DST 3 or more letters the abbreviation for Daylight Saving (Summer) Time. Again the
terminology can reflect regional varions ( eg BST for British Summer Time).

For both STD and DST, upper or lower case letters are allowed and it is possible to use any character
apart from a leading colon (:), nunbers, comma (,) minus (-), plus (+) and ASCII NUL (\0). It is always
preferable to use the recognised standard abbreviations of the regional zone to avoid confusion.

Offset Indicates the number that must be added to the regional time in order to derive
the equivalent UTC. Note that UTC is often referred to as Greenwich Mean
Time (GMT).

East of London, clocks are ahead of UTC, so the offset value must be negative.
West of London, clocks are behind UTC, so the offset value must be positive (the plus
sign is optional in this case).

The offset has the form: hh:mm:ss Minutes (mm) and (ss) are optional.

• One or more digits may be used; the value is always interpreted as a decimal number.

• The hour may be between 0 and 12 (e.g. New Zealand is +12; Midway Island in the Pacific
Ocean is –11)

• The minutes (and seconds), if present, must be between 0 and 59. For example, Newfoundland in
Canada, and Iran, have offset times which include a halve hour (30 minutes)….Canada is UTC
+3:30 (or simply 3:30), Iran is –3:30.

206
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

start/time indicates the date and time (local time) that the clocks will change from Standard
(winter) to Summer time.

end/time indicates the date and time that the change back occurs, i.e. Summer time to Standard
time.

The format of this part of the command is as follows:

Mm.n.d/hh:mm:ss

The dth day (where d is between 0 and 6, 0 = Sunday, 6 = Saturday)…..of the

…nth week (where n is between 1 and 5)…..of

…month m of the year (m is between 1 for January and 12 for December)…

at time hour:minute:second, i.e. 02:00:00, or simply use the hour, i.e. 2

Week 1 is the first week in which the “dth day” occurs,

Week 5 means “the last “d day” in month m”, which may actually occur in the fourth or
fifth week.

For example, take the following calendar month (October):

SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY


1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

Clocks are typically altered at 2.00 a.m. on a Sunday morning…..

If this was to be on Sunday 7th, on Sunday 28th,


d=0 d=0
n=1 n=5
m = 10 m = 10
hh:mm:ss = 02:00:00 hh:mm:ss = 02:00:00

207
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.4.2 Time Zone Examples

Alberta

Where Mountain Standard Time is 7 hours earlier than UTC; Daylight Saving Time is 6 hours earlier
than UTC. Therefore, 7 and 6 respectively, would have to be added to the regional time in order to show
the equivalent UTC time:

The time zone part of the command string is therefore: MST7MDT6

Typically, daylight saving time (summer) begins on the first (n=1) Sunday (d=0) in April (m=4), and
ends on the last (n=5) Sunday (d=0) in October (m=10)….both occasions at 2.00 a.m. in the morning.

The date/time part of the string would be: M4.1.0/02:00:00,M10.5.0/02:00:00

These times, 2:00a.m. on the first Sunday in April, and 2:00a.m. on the last Sunday in October, will be
assumed as default times by the system if nothing is specified in the command string, but should only be
considered applicable to Canada and the USA. Note that minutes/seconds do not have to be included in
the command string:

Entire command string: MST7MDT6,M4.1.0/2,M10.5.0/2

Default command: MSTMDT6

Newfoundland: NST3:30NDT2:30

Where Newfoundland Standard time is 3 ½ hours earlier than UTC, Newfoundland Daylight Time is 2 ½
hours earlier. Note, no date/time information is given, so the default would be assumed.

United Kingdom: GMT0BST-1,M3.5.0/2,M10.5.0/2

Where Greenwich Mean Time is equivalent to UTC in the winter, and British Summer Time is 1 hour
ahead of UTC. Assume BST begins the last Sunday in March, ends final Sunday in October.

Kazakhstan: KST-3KDT-4,M3.5.0/2,M9.5.0/2

Where Standard Time is 3 hours ahead of UTC, Daylight Time is 4 hours ahead. Assume Kazakhstan
Daylight Time begins the last Sunday in March, ends the last Sunday in September.

Cuba: CST5CDT4,M4.1.0/2,M10.2.0/2

The Standard Time is 5 hours behind UTC and Daylight Time is 4 hours behind. Assume the Cuban
Daylight time begins the first Sunday in April and ends the second Sunday in October.

Algeria: AST-1ADT-1

The Standard Time is 1 hour of UTC. Here, there is no Daylight Time, the clocks are not altered.

208
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Colombia: CST5CDT5

The Standard Time is 5 hours behind UTC, there is no Daylight Saving Time.

Iran: IST-3:30IDT-4:30,M3.3.0/2,M9.3.0/2

Standard Time is 3 ½ hours ahead of UTC, the Daylight Saving Time is 4 ½ hours ahead. Assume
Daylight time begins the 3rd Sunday in March and ends the 3rd Sunday in September.

QLOG System Example

Assume that the system timezone was currently set to Mountain Standard Time (i.e. winter time in
Alberta) and it should be set for winter time in Cuba.

The 3:/config/timezone file would contain the following line:

MST7MDT6,M4.1.0/2,M10.5.0/2

This line would have to be changed, using the Editor, to the following in order to be correct for the
Cuban time zone:

CST5CDT4,M4.1.0/2,M10.2.0/2

Once the changes to the configuration file are completed, it is necessary to restart the ‘tzd’ program:

slay tzd
ontty 99 tzd &

Sometimes, due to operations at wellsite, a specific time is determined for all computer systems to alter
times back/forth one hour. For example, drilling may be continuing through to 5.00am before tripping out
of hole, so it is decided that everyone will change their systems at 5.00am.

In this situation, there are several ways of over-riding the systems automatic time offset setting, but the
easiest way is simple to alter the command string in 3:/config/timezone to the time that you require the
offset to change, then restarting “tzd” as shown above.

Once you have set the time zone offsets correctly, you have to ensure that the hardware clock is set
correctly and if not, reset it. Please note that all instances of the old (pre QLOG vers4.4) ‘TZ’
environment must be removed from all of the system’s environment files (i.e. 3:/config/sys.env.X
where X is the node number).

To the check the current time on the hardware clock, use the date command. The time displayed from
this command, and on screen, should show the correct local time. This ‘system’ time is taken from the
hardware clock with the timezone offsets then applied ie the hardware clock (if viewed in CMOS) would
show UTC time.

If the time shown is incorrect (not the correct local time), reset it using the following command formats:-

209
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

date 12 8 00 5 55 pm (assume 12th Aug 2000, 5:55pm)


rtc at +s

The ‘rtc’ command will reset the hardware clock (‘at’ is the type), the +s option sets the hardware clock.
The hardware clock will therefore be set to 5.55pm in this case, +/- whatever the timezone offset is.

The hardware clock will then show UTC time, whereas the system or displayed time will be relative to
the local timezone.

The date command should, under no circumstances, be used to make actual timezone offset corrections.
Only change the time with ‘date’ if you are positive that the offsets have been set correctly.

6.4.3 Minor changes to the time

Providing the timezone offsets are set correctly, any minor time corrections required for the system or
displayed time can be made by using the date and rtc commands as shown above.

If the ‘rtc’ command is omitted, the time would revert back to the original setting when the next system
update was performed.

Obviously, you should be careful not to make changes to the time at wellsite if you are drilling. This
would affect the databases and time calculated parameters such as ROP and lag. To make these changes,
it is best to wait until rig operations allow you to shut down administrators, make the correction, and
restart the system.

210
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.5 FILE PROPERTIES

6.5.1 Attributes and Permissions

As was discussed in section 5, each user is given a group and member level which is a number between 0
and 255 where 255 is the highest access level. QNX implements a system to protect -access to all files,
directories and disks. There are two levels to this protection:

Attributes These are file characterisitics, whose restrictions apply to every user.

Permissions The level of access (or attribute) granted to members of the same group and to all other
users.

There are 5 attributes to a file:

READ allows data to be read by other files or programs; allows users to view
only
WRITE allows data to overwrite the contents of the file; ie the file can be edited
APPEND allows new data to be added to the end of a file
EXECUTE makes the file executable, ie it performs a task or tasks
MODIFY allows attributes to be changed

Directories have the following attributes:

READ allow programs to retrieve files from the directory


CREATE allow new files to be added to or created in the directory
BLOCK prevents programs from looking into the directory (ie makes files invisible)
MODIFY allows attributes to be changed

To see what attributes/permissions a file or directory has, use the following command:

files +v for files


files +v +d for directories

If the command <files +v> was run, you would see the following information:-

Blks X Loc Grp Mem Attr G-Perm-O Date Time Name


76 3 016E74 255 255 meawr e e 14-Aug-93 12:22 batch
21 1 014E20 145 065 m-awr m-awr r 01-Aug-93 17:57 test.txt
1 1 0263B6 167 012 m-awr r e 12-Aug-93 15:18 report

211
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

where:

Blks is the file size, 1 block equal to 512 bytes


X is the number of extents (see below)
Loc is the starting location of the file on disk
Grp is the group number of the file owner (who created the file)
Mem is the member number of the owner
Attr are the attributes of the file
Perm are the attributes permitted for other users where
G are permissions for the members of the same group as the owner
O are permissions that apply to all other users
Date is the creation date or the date last modified
Time is the time created/modified
Name is the file name

The first file called "batch" is 75 blocks in size (which is 38400 bytes), has 3 extents, is located at
016347 on the disk and was created by a superuser (255,255). The permissions are set such that anyone
in the same group can execute the program as well as anyone not in the same group ie any user can run
the program.

The second file is an example called "test.txt"; the person creating the file had access level of (145,65).
The attributes are set so that the Modify, Append, Write and Read are all turned on. This file is therefore
not an executable file. Members of the same group (145) have the full permissions available, whereas
members of other groups have only read permission, ie they can only view the file.

The third example is the file is called "report". The attributes are set so that the Modify, Append, Write,
and Read are all turned on. Members of the same group (167) can only view the file. Other members
have no permissions at all, they would have no access to this file.

For a directory example, the command files +v +d is run and the result looks like:

Blks X Loc Grp Mem Attr G-Perm-O Date Time Name


1 1 00034B 255 005 m-c-r r r 14-Jul-93 12:36 cbm
7 2 02CAC 255 255 m-cwr wr wr 1-Aug-93 15:06 chrom
10 2 017FE 064 255 m-c-r c-r c-r 2-Aug-93 12:48 help

The directory called "help" has modify, create and read attributes turned on. Both group and other
permissions are set to allow the creating of new files and reading files from the directory.

A group leader may access any file owned by any other members of the group. A superuser has similar
freedom over all groups.

212
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.5.2 Changing Attributes

The chattr command is used to change the attributes of a file. The following examples show the use of
the chattr command with the previous files:

Example 1 chattr batch a = −a p = −e

Turns off the append attribute (no user would be able to have this permission while the attribute is turned
off) and turns off execute permission to group and other users on the "batch" file (this means that only
the owner of the file, in this case superuser 255,255 would be able to run this batch file).

Example 2 chattr test.txt pg = −aw po = +m

Turns off the group append and write permission (no members of the same group would now be able to
add to or edit the file); turns on the other modify permission (any user would now be able to change the
file attributes).

Example 3 chattr report g=170 m=145 pg = −r n=new_file a = −m

Changes the group and member number of “report" to 170,145 (ie the owner of the file has now changed
so that file attributes would apply to this new owner, and ‘group permissions would now apply to group
170); turns off the group read permission (ie group 170 users now have no access to the file); changes the
name of the file to "new_file" and turns off the modify attribute.
The last step, turning off the modify attribute, has the effect that no one, not even a superuser, can ever
change the attributes or permissions of the file again.

Example 4 chattr cbm p = +c

Changes the permission of the cbm directory so that new files can be created in this directory by all
users.

As an exercise, the reader should:

1. Create a text file called "test" in your home directory that has the command beep as the only text in the
file.

2. View the attributes of the files and the default permissions

3. Change the attribute of the file so that it is executable. Verify this by running the "test" file.

4. Change the permissions so that group users (only) can execute the file, verify this by using the files
command.

5. Change the permissions so that anyone can execute, modify, read, write or append to the file.

213
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6. Change the attributes so that modify attribute is turned off, try to modify the file again.
The chattr command can also be used to ‘unbusy’ files:-

use files +b to determine any busy files

use chattr filename s = −b (changes the status to unbusy)

6.5.3 File Extents

Extents are an indication of how many ‘pieces’ a file is in. An extent of 1 means that the data is
continuous in on place on the hard drive. The more extents a file has, the more the file is scattered in
different pieces on the drive, the slower the access speed will be since QNX will have to physically
search through more parts of the hard drive to read a file.

Extents occur as files are appended or grow. The depth database, dbdepth.qlog is the prime example; it is
continually growing as the well deepens. As it grows it is likely to come to a portion of the disk where
the blocks are already occupied by another file - the depth database will therefore continue its growth in
another part of the disk thereby forming an extent..

Extents can not be totally avoided, but they can be minimized. The easiest way is to simply copy the file
to another directory (or even better to a floppy disk), removing the original file, then copy back to the
original directory. Simply by the act of doing this, QNX will first search for a portion of the disk large
enough to hold the entire file. If this is possible, the whole of the file will be in one place ie one extent.
If this not possible, the biggest available space will be used, whatever part of the file will not fit here will
then be located in the next largest available space.

214
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.6 PROGRAM OPERATIONS

6.6.1 Scheduling tasks with cron

Tasks can be scheduled to run at predetermined times. The program called cron must be run as a
background task, cron will then check the list of programs to be and at what time. Cron should be set to
run automatically by setting it in the system initialization file. The usual way to do this is by selecting
terminal type 99 for it to be run, since this has no output.

ie ontty 99 cron &

The list of programs to be run is contained in the file 3:/config/crontab. The list must have 6 fields:
minute, hour, day, month, day of week, program name. The following example will backup only files that
have changed from node 1 to node 2 every 24 hours at 01:30

30 01 * * * backup [1]3:/ [2]3:/ +a +n −p s=c

If the crontab file is altered, the cron program must be stopped and restarted in order for the changes to
be read by the system and take affect.

The cron program is typically used for updating the realtime clock (this is set by default within the
crontab file) and for operations such as backup, but the possibilities for the use of this program are
endless.

6.6.2 Ditto - working on other network stations

The ditto command will allow the user to view another users console and optionally use their keyboard;
this is useful if you want to help a user run a command or program remotely.

From within ditto type <ctrl e> to bring up a command menu on screen.

The ditto command will not work if you try and ditto a window terminal. In this case you would have to
use the ‘n’ option from the menu to change to a QNX console. The opposite will work, i.e a user who is
in windows can ditto another node from within a windows shell.

If you need to reboot a remote station, you can do so by from within ditto by using the ‘r’ option from the
command menu.

For example if I want to ditto node 4, and I want the keyboard enabled:

ditto n=4 +k

If you do not want the user on the other node to know that you are using ditto, you would use the +q
option:
ditto n=4 +k +q

215
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.6.3 Accessing MSDOS formatted disks

The command called dfs will start the ‘DOS file system’ dosfsys running which will enable you to copy
files to or from MSDOS formatted disks.

The format of the command is dfs start a=1

Whilst dosfsys is running, both MSDOS and QNX disks can be accessed, but the syntax is different in
the two cases.

Obviously, to access a QNX disk, the floppy drive is referred to as 1: /, whereas to access an MSDOS
disk, the floppy drive is referred to by the DOS name, ie a: /

Note that the path divider is still the QNX forslash, not the normal DOS backslash.

Any commands used whilst using an MSDOS disk will be the normal QNX commands, such as ls, cp,
rm, mkdir etc.

If copying a file from the QNX drive to an MSDOS disk, you must ensure that the file name suits the
DOS format, namely a maximum 8 characters followed by a 3 character extension. Attempting to copy a
file with 16 characters, which is fine in QNX, to a DOS disk will result in an error.

DFS will not perform any translation on the file or disk.

The DOS file system does not enable us to format an MSDOS disk. If we are required to copy files to an
MSDOS disk, the disk will have to be formatted on another computer.

Example: if we want to copy everything in 3:/datalog/reports to an MSDOS disk in floppy drive A, to a


new directory called "new_dir":

dfs start a=1 to start dosfsys running

mkdir a:/new_dir to make the sub directory

cp 3:/datalog/reports/* a:/new_dir to copy the files

To stop dosfsys:

dfs stop

Since both QNX and MSDOS disks can be accessed while dosfsys is running, if we are regularly copying
files to MSDOS disks, there is no need to stop dosfsys after each operation.

The normal use of this process is for transfer of data files that have been ‘LAS’ (see later in manual) to
MSDOS format for transfer to a DOS system, or conversely to import data to our database that is
provided on an MSDOS disk.

216
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.6.4 Additional Commands and Command Options

ff to locate a particular file ie ff <filename>


query to check disk space used and remaining on a particular drive
pswd to change your password
fopen checks which files are being held open for use by another program
slay to stop a task - this can be used with the program name, node number, tty number
or Tid number

ie slay program n=2 n = node number


slay i=3bac n=2 i = Tid number
slay i=3bac t=5 t = tty number

backup principally to back up from node 1 to node 2, but may be used to backup to
and from floppy disks

backup [1]3:/ [2]3:/ +a +n –p backup all newer files to node 2

backup 1:/ 3:/ +a backup from a floppy disk (assuming files


on floppy were copied using backup)

Common Options

+/- p pauses used for example with the chkfsys command to detail each step of a
multiple operation; requires user input at each pause

+/- v verbose used with the files command to give extra information

+n newest eg with backup command, newest files only

+a all eg with backup command, all the files

+/- b busy used with chattr to change file status

+i interactive eg when deleting multiple files, user will be asked for confirmation
for each file deletion

+r recursive continual, no user input


rebuild with chkfsys, to rebuild the bitmap

+/- f files

+/- d directories

s status with chattr, to change file status


steal with qterm, to clear port buffer
set with rtc, to set the hardware clock
s=c clear bits during backup

217
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.7 ARCHIVES AND FILE COMPRESSION

6.7.1 Using ZOO

If a file or group of files are to be archived the files can be compressed to save disk space or to save
transmission time if the file is being transmitted by modem. There are many different algorithms for
making compressed archives of files including zip, tar, arc and zoo. On the QLOG system, Datalog
typically uses the zoo format for compressing and archiving files. An archived file can not be used
directly and has to be de-archived before it can accessed or read.

The zoo command has 3 levels of help, in ascending order they are:

zoo ?

zoo h

zoo H

zoo * <file.zoo> <filename>

where file.zoo is the name of the archive file, the .zoo does not necessarily have to be included
as it will be added automatically by the program

filename is the name of the file that is to be compressed and added to the archive file.
The full directory path should normally be given as well as the filename.

* is the particular operation to be performed:-

a add to the archive


h high compression
l list
D delete
x expand files to original directories, they will be created if they do not exist
x: expand to current directory

The high compression is normally used, and should certainly be used for large files and database type
files.

When archiving, the full directory path of the file should be specified. This is recorded in the archive file
and allows the files to be restored to the same directories at a later stage - the importance of this is
evident when having to restore all the files needed to ‘recreate a well’ at a later stage.

218
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The following examples will show the use of zoo:

To zoo all the time files in 3:/datalog/dbms and archive in /tmp/time3.zoo:

zoo ah /tmp/time3.zoo /datalog/dbms/time*.qlog

If the archive (time3.zoo) does not already exist, it will be automatically created.

To list the contents of the archive file:-

zoo l /tmp/time3.zoo

To delete a particular file (eg time960720.qlog) from the archive:-

zoo D /tmp/time3.zoo time960720.qlog

To restore the files to their original directories (individual files can be specified if necessary): -

zoo x /tmp/time3.zoo

6.7.2 Using fbackup - large files to disk

If you have a file, or files, that you want to backup or archive to floppy disk that are larger than the disk,
then the fbackup command has to be used.

Note, that fbackup performs no form of compression – it is strictly copying and creating an archive on a
sequential floppy disks, depending on the file size. Before using fbackup, files should be compressed
with zoo first. This may avoid the requirement of fbackup, which can be unstable (i.e. files corrupting).

There are two steps to creating an fbackup archive;

• the disk has to be specially formatted for use by fbackup


• the files have to be copied to the disk.

Note that a QNX formatted disk is different to a fbackup formatted disk.

The fbackup program requires only the first disk that will be used to be specially formatted - this disk
will initiallise an archive directory. When further disks are required, you will be asked for them. They
need not be formatted, this will be done automatically by the program.

The most essential thing before starting an fbackup archive, is that you have enough disks for the size of
the file.

219
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Format and Initialize the first disk:-

fbackup 1 in 20 v = “___________” in - initialise


v - names the archive directory if required
20 - allows upto 20 files to be added to the
archive

To add a file to the fbackup archive: -

fbackup 1 sa filename sa - save

The archive directory on the first disk will record the number of files in the archive and the file names.

Unlike the zoo command, fbackup does not require the full pathname of the file being archived, it will be
recorded automatically.

A disk that has been formatted with fbackup cannot be accessed by normal QNX commands, therefore
special commands have to be issued in order to view or restore the contents of an fbackup archive. It is
important that the disk is identified as containing an archive by using the fbackup command. The label
should also consist of the names of the files in the archive, and their original directory.

To view all the files on the fbackup disk:

fbackup 1 fi fi = files

To restore all the files to their original path:

fbackup 1 re / re = restore

The root path "/" is necessary to restore the files to their original directories since fbackup uses the path
as stored on the disk and if the "/" is omitted the files will be restored starting from current working
directory.

If you wanted to restore the file/s to another directory, the format of the command is:-

fbackup 1 re <disk dir>, <archive dir>

where disk directory = directory in which to restore file


archive directory = original directory of file

eg if dbdepth.qlog was archived from /datalog/dbms and we wish to restore it to /user/datalog

fbackup 1 re /user/datalog, /datalog/dbms

220
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.7.3 Archiving with ZIP

For compressing data which will later be extracted onto a dos machine (for client or Datalog usage), it is
best to use the zip command.

Transmission of logs via e-mail will also be far quicker using this facility.

The command string is similar to the zoo compression in that the archive file name comes before the file
name, for example:

zip <destination file (zip)> <source file>

e.g zip log.zip mlog.pcx

Typically, the command would be used with the following options:

zip -k -1 –9 <destination file> <source file>

More files can be added to the same zip arhive file by simply repeating the previous command and
replacing the file name with the new source file; for example:

zip log.zip drllog.pcx

NOTE, it is not possible to extract from a zipped archive on a QNX machine, the relevant files must be
extracted first on a dos machine and then transferred across.

221
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.8 CHECKING THE FILE SYSTEM

6.8.1 FOPEN and DCHECK

The fopen command will tell the user what files are currently being held open by a program. This should
be determined before running any of the following operations ie all administrators and programs should
be shut done.

The dcheck command will check a disk (whether hard or floppy) for bad blocks. If bad blocks are found
the +mark option can be used to mark the blocks as bad and stop them being used by the system. The
location of these blocks will be recorded in a file called /bad_blks. There should be no open files if the
+mark option is used. For example:

dcheck 3 +mark

This will check drive 3; if bad blocks are found, /bad_blks will be created and the bitmap updated.

6.8.2 CHKFSYS and ZAP

The chkfsys command will perform a consistency check of the file system on the requested drive.
Chkfsys should only be used when the system is idle, there should be no open files when chkfsys is
running. Chkfsys searches for errors and corrupt files and should be used at the start of a new job; at
regular intervals throughout the job; at any signs of sluggishness or problems with the system.

Before running chkfsys, shut down all programs and administrators and check for open files - passadmin
and task should be the only programs open.

chkfsys 3 specifies drive 3

Running the command in this way, without options, will result in any errors or corruptions being
reported, and the user being prompted for the course of action. Many errors can be automatically fixed by
chkfsys, so the user should reply ‘yes’ when prompted as to whether to fix the problem. Other
corruptions may be reported as ‘unfixable’. Here the user has to make a note of the offending file and
when chkfsys has finished (or stop it by ‘ctrl c’ if many blocks are affected, since each affected block
will be detailed and it could take forever!), the user should zap the file.

zap filename

Zap should only be used in this or a similar instance, to deal with a corrupt file that cannot be removed
from the system in the normal manner. Zap will mark the blocks previously used by the corrupt file as
being used to prevent them being used by other files - these blocks ‘will’ be lost from the disk space.

Chkfsys should be run again, until no errors are reported. At the end of the process, chkfsys will recover
zapped blocks and rebuild the bitmap.

To run chkfsys without pauses and with automatic fixes: - chkfsys +r -p

222
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

This is good when you think the corrupt files have been eliminated, but may result in corrupt files being
missed if you run this command initially.

Zap can also be used to remove a directory structure and any files contained with the structure. Chkfsys
should always be run after this in order to retrieve the zapped blocks.

zap <directory name>

6.8.3 Recovering Deleted Files

If you accidentally delete a file, use the und command to try to undelete the file.

To undelete a file, it has to be ‘recovered’ in a directory other than the one it was removed from. This
may be on the same hard drive or on a floppy disk. Time is obviously of the essence, since the longer the
period before trying to recover a file, the more likely it is that the blocks that were made free by
removing the file will become occupied by another file.

und <filename> <directory>

eg und file.txt 1:/ the file will be recovered in the root directory on floppy disk

The und command should only be used by a superuser. If a non superuser uses the command, or if the
same directory (ie the one that the file was removed from) is given, the file may well appear to be
retrieved, but more often than not, it will be left busy or, even worse, corrupted. If its busy, no problem,
unbusy it with chattr, but check that it is not corrupted. If it is corrupted, you will not be able to access
that file ie to view, copy etc; the file will have to be zapped.

223
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.9 GNU (x-y-z) Plots

This is the software used by QLOG to produce plots of varying complexities. Examples include the
directional plots, gas ratio plot, all the plots in the engineering suite. We can also use this software to
create any plot required. All that is required is a plot command file and a plot data file.

Command file: 3:/datalog/plots/<filename>.plot

Data file: 3:/datalog/plots/data/<filename>.dat

More than one data file can be used for one particular plot; each one would have to be specified in the
‘.plot’ file. The files should be created in the editor and the data file, in particular, should be of the
correct format for the plot to work (ie columns should be lined up correctly; there should be no blank
lines or blank characters at the beginning of lines).

Format of the Plot file:

set terminal windows


set output
set nokey plot with or without illustrated key
set grid creates a grid from the ‘tic’ positions
set logscale x would plot the x axis grid as a log scale
set label 1 “_____________” at 20,140 left (or right)
any number of labels may be used; they can be aligned from the
left or to the right
set samples maximum number of data points in the data file
set data/function style lines function style - plots points only
data style - plots a curve
set tics in to plot inward tics on the graph
set xtics 0,10,100 positions tics every 10, beginning at 0, ending at 100
set ytics..............
set title titles the whole plot
set xlabel labels the x-axis
set xrange [0 : 100] scale for the x-axis
set ylabel
set yrange
set no autoscale no automatic scaling, so uses the scales defined above
plot “/datalog/plots/data/file.dat” title “anyinfo”
gives the name of the data file and the name for the key. If more
than one data file, the same format should be repeated with a
comma separating the two ‘strings’.

Refer to Section 3.2.2 for instructions on printing these plots. Further details on how to use these plots is
given in the help file:-

From a shell within windows, <plot3> gives the gnuplot prompt


<h> gives the help file selection

224
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.10 CREATING RISTRICTED QLOG MENUS

At wellsite, if several users such as geologist, engineer, toolpusher and drillfloor, are networked to the
system, it is important that their access to the system is limited to those features that they would likely
require. It would obviously be unwise for other users to be able to edit the database or to have access to
important realtime controls and setups.

These restrictions can be applied by changing what actually appears in the QLOG menu. Default menus
are already designed for the above users, but may have to be modified at wellsite.

The full, default menus are stored in 3:/datalog/menus:-

realtime.dial geology.dial
reports.dial other.dial
database.dial setup.dial
engineer.dial

These files list each item in the individual menus, and have the following format:-

menu name | program name

eg in the realtime menu; Realtime Zeros | dau_zeros

An additional file in 3:/datalog/menus is button_names, which simply contains the title names of each of
the QLOG menus.

Any user who logs in to the system will automatically be given these full, default menus, unless directed
otherwise.

To restrict the menu for a particular user, the default dial files should be copied to that user’s windows
sudirectory, and then edited as required.

eg for user bob; cp /datalog/menus/* /user/bob/windows

• To remove a particular item from a menu, simply remove that line from the appropriate dial file.

• If a complete menu is to be removed, simply remove that menu name from the “button_names” file.

• To change the database.dial so that the database can be viewed only:-

ed database.dial

change Edit Databases | dedit; to View Databases | dedit -e;

225
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

NOTE, that this should also be done for the lithology editor, otherwise other users will still be able to
change any geological data:-

change Lithology | lithed to Lithology | lithed -e

Windows menu options:-

Any program that can only be run from the windows interface is indicated as red in the QLOG menu and
that program cannot be accessed from a normal console. To set this in the .dial menu file, the program
name is preceded by a “~” or “.” symbol:-

ie Lithology | .lithed

Sub-menus are defined in the following way:-

Edit...@(Databases | dedit, Lithology | .lithed)^R;

Should the user wish to have restricted menus in another language, eg french, then the default dial files
should be copied from 3:/datalog/menus/french to the user’s windows sub-directory (ie
/user/bob/windows) and edited in the same way as described.

226
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.11 CHANGING DEFAULT PARAMETER NAMES

So as to provide good, understandable realtime displays and to give good final log presentation, it is
advantageous to change some of the default parameter names on the system. This may be to provide a
more accurate or fitting name, or simply so that a particular name will fit better in the space allocated on
logs.

Examples may include:-

Pits1, Pits2 etc Rename to suction, settling, mixing pit etc

H2S1, H2S2 etc Rename to shaker H2S, flowline H2S etc

Comments1 etc Drilling Data, Survey Data etc

Changing these names is by way of editing certain text files which are held in 3:/datalog/text.

display.txt contains the name of every measured or calculated database field,


and will affect every part of the system such as displays, units,
database, plots etc.

edits.txt contains the names of extra database parameters that are input by
the user, eg comments, lithology etc and will affect the same parts
of the system as display.txt except for plots.

plots.txt contains the same names as edits.txt, and changes here will affect
the names seen on any plots or logs.

channels.txt contains the names of configurable analog and digital parameters ie


measured parameters. Changes here will affect the calibration and
configuration menus together with the test mode.

Example of changing display.txt :- renaming pits 1 to 4 (suction1, suction2, settling, premix)

When you access the file using the editor, you will see the following information: -

0013 02 TripTank TTV1 M3


0014 02 Pits TV# M3
0030 03 Temp_In MTIA DEGC

Column 1 Field Number

Column 2 Parameter Type eg digital parameters 01


pit volumes 02
gases 08

227
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Column 3 Parameter name - note that if there are two words, they have to be joined with an
under_score.

Column 4+5 Standard abbreviation and units for WITS format

In the example, note that the ‘Pits’ parameter possesses fields 14 through 29 ie 16 fields - each field will
be named sequentially ie Pits1 to Pits16.

To rename Pits1 to Pits4, those fields have to seperated in display.txt. The edited file should look like:-

0013 02 TripTank TTV1 M3


0014 02 Suction1 TV1 M3
0015 02 Suction2 TV2 M3
0016 02 Settling_Pit TV3 M3
0017 02 Premix_Pit TV4 M3
0018 02 Pits TV# M3
0030 03 Temp_In MTIA DEGC

The remaining ‘Pits’ parameter now occupies fields 18 - 29, ie 12 fields, ie Pits1 to Pits12. The total
number of Tank Volumes is still 16. If this line was omitted, instead of having Pits 1 to 12 in the unused
channels, you would have Premix_Pit1 to Premix_Pit13.

Example of when and how to use channels.txt

The likely time that this will occur is when, because of sensors required on a particular job, the default
channel configuration is not sufficient for the sensors required.

eg you have to change a channel that, by default, is configured as H2S, to an extra pressure sensor such
as Kill Line Pressure.

Channels.txt contains two columns:-

Column 1 abbreviations that will appear in the test mode


Column 2 names that will appear in the configuration and calibration menus

Changing the names:-

Original channels.txt After editing


H2S1 H2S_1 KLP Kill_Press

This new name will now have to be changed in display.txt aswell, remembering to change the parameter
type (changing from gas to pressure), and if required, the WITS abbreviation and units.

228
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Original display.txt

0050 10 Casing_Press CHKP KPA


0051 08 H2S HSX# PPM
0054 08 Combust CBG# PPM

After editing;

0050 10 Casing_Press CHKP KPA


0051 10 Kill_Press KPA
0052 08 H2S HSX# PPM
0054 08 Combust CBG# PPM

You should also check the system and user decimal places for the new type of parameter and change if
necessary (in this case, system decimals would have to be changed from 4 to 1, and user decimal places
changed from 0 to 1).

229
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6.12 SYSTEM INITIALIZATION FILES – ADVANCED USE

Each node on the network has an individual system initialization file that is executed every time the node
is rebooted. Any changes that are made to this file will only be read, and therefore executed, during a
reboot.

This file tells the operating system what hardware is mounted, what operating system programs to run,
what utility programs to run etc.

Typically, the sys.init files are already created on the system, and any changes required to be made by the
user at wellsite are small changes. Nevertheless, the user should be familiar with what the file is doing as
a whole, in case there are any operating problems with the system. The fault may be an easy fix if the
user understands the sys.init file, but a major problem if they don’t.

The sys.init.n (where n = node number) files are located in 3:/config. When the system boots, the file for
each node on the network is read and each node is booted according to the commands in the file.

Sys.init.1 is obviously the most important since this is operating the network.

Any command string that starts with an “#” is ‘commented out’ and ignored.

A typical sys.init.1 will contain the following commands:-

Note that many of the tasks are started on ontty 99, terminal with no output.

back suppresses the screen printing of the task ID number

dots on turns on the ability to ‘cd..’, change up a directory level. In QNX, unlike DOS,
the ^ symbol is used for this purpose.

verbose with this enabled, all the commands that are executed during the boot up
sequence (ie commands in sys.init) will be displayed

mount float mounts the floating point software library. This allows non integer calculations
for C86 compiled programs do be done rapidly by a separate processor

mount lib /drivers/glib.tvga mounts the graphics library for the tvga graphics adaptor. This
allows graphic displays on the normal consols (using ‘bar’). If
windows is run, a different driver (as specified below) is used

mount lib /config/sac.slib mounts the sac shared library used by the sac processor time
program

mount disk 4 d=3 pa=qny t=*** n=** h=* p=*


this command mounts the hard drive qnx 4 partition with the options
referring to such things as heads and tracks

230
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

mount cache s=48k d=3 mounts disk drive cache for drive 3. A cache is a portion of the
RAM allocated for specific operations, saving processing time.

mount xcache s=48k mounts an extent cache to link large, fragmented files

mount bmcache d=3 mounts a bitmap cache on drive 3

mount console $con# mounts consoles, number #

search 3 sets the drive search order ie drive 3. The search ordcr would be different for other
nodes on the network, typically ‘search [1]’ where node 1 is the network server. This
specifies that the search order detailed for node 1 is the one that should be used.

path !!/cmds/!/datalog/cmds/!/Quser/cmds/!
sets the system path so that all of the above directories are searched for an executable
program when commanded. The 2 ‘!!’s’ means that /cmds will be searched first,
being the most important command directory.

cd 3:/ on entering just ‘cd’, you will be taken to the root

timer & starts the QNX timing facility required by programs. This allows programs to sleep -
they instruct the timer program to give them a ‘wake up call’ after a certain time
period has elapsed. When you run ‘tsk’, any program waiting for the timer will be
indicated in the ‘blk’ column, where the timer Tid will be displayed.

rtc at sets the system time from the hardware clock

tzset.sh contains the timezone offset settings applicable to the two system compilers

ontty 99 clearhouse start &


the network clearing house program administrates program names across the network
and will prevent an administrator which is already running on the system from being
started elsewhere.

ontty 99 dyna & starts the dynamic link library (common routines between programs)
required by programs copiled with the CII compiler

ontty 99 cii_emul_8087 &


mounts the floating point emulator for CI compiled programs (similar to the ‘mount
float’ command required by the C86 compiler)

ontty 99 envmgr /config/sys.env.1 & runs the environment manager specified

passadmin & runs the password administrator - this should only be run on node 1

cti I=15 p=30c & initializes the cti multiple serial port card

231
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

/config/init.cti & runs the cti port initialization file that contains communication set ups,
such as baud rate, for each of the cti ports

/windows/drivers/mdrv Microsoft serial mouse (200dpi) dev=$mdm

/windows/drivers/qw.vga &
initializes mouse and graphics drivers required for windows - these were
detailed in Section 7 of this manual.

ontty 99 netboot & the netboot command has to be run in sys.init.1 in order for other nodes
on the network to boot from this node

ontty 99 nettime & this updates the current time across the network

ontty 99 cron & this allows the scheduled running of programs detailed in the
/config/crontab file

ontty 99 poll l=/logs/poller &


this runs poll which checks that all nodes on the network are functioning

ontty 99 locker & this is the network file administrator which stops any corruption of files that
different users or programs are reading or writing to at the same time.

ontty 99 dumper d=/dumps & a program that crashes due to a memory exception error will be
stored in a .dmp file in /dumps for later scrutiny by
programmers.

passon turns on the password facility

nacc CPU +w allows network access to non superusers of this nodes CPU

nacc 3 +r +w allows network access to non superusers in order to read and write to
this nodes drive 3

232
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7. DATABASE APPLICATIONS

233
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.1 REMOVING DEPTH DATABASE RECORDS

A combination of two programs, dbprune and dbprune_lst, enables you to remove unwanted records
from the depth database. The changes are irreversible, therefore the user should be sure about what
he/she is doing, and as a precaution, ensure that they make a backup of the database before attempting to
‘prune’. The original database will not be altered in any way, but the end step requires the modified
database being copied to dbdepth.qlog, therefore it is important to keep an original copy incase the
process hasn’t worked for some reason.

NOTE that this process cannot be formed on the hot system, ie while you are drilling and records are
being written to the database. This should only be done when you are confident that you can complete the
task before drilling recommences ie during trips or at casing points.

Before starting the process, carefully check the database and make a note of which records you want to
remove. You should be 100% certain of these particular records before proceding.

You are likely to be removing records for 2 reasons.

Firstly, if you have had extra records created due to an incorrect setting of the padding factor. In this
case, it is simply a case of removing those extra records. In the case of a depth correction, you should
make sure which record contains the correct data. For example, if the record for 1000.0m has already
been created but you then have to make a depth correction to 998.0m, it is quite possible that instead of
1000.0m being written over, an extra record, 1000.1m will be created. In this case, the record you want to
keep is 1000.1m, so that 1000.0m should be removed.

Secondly, due to poor depth tracking, the system may record drilling before the bit is on bottom. After
correcting the depth, duplicate records may be created.

Procedure:

• Shutdown DBdepth and DBadmin and make a backup of the database.

• Restart dbadmin (remember whether drive 3 or drive 4)

• dbprune_lst this creates a datafile called dbdepth.list in the users home directory.

This data file has the following format: -

Depth Go / NoGo
1000.0 1
1001.0 1
1001.2 1
1002.0 1

This file can now be edited to remove the unwanted records. Normally, you will be able to use the editor
(ed dbdepth.list) but if the database is large, you may find that dbprune.list is too large for the editors
memory and it won’t load.

234
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

In this situation, use the big editor (bed dbdepth.list) in exactly the same way as the editor.

Before editing, check the start and end depths and confirm that the listing is correct. For the records that
you want to remove, change the ‘1’ to a ‘0’. Only the records marked by a ‘1’ will be copied over to the
new database file. When doing this, refer to the record notes you made beforehand, or simply have the
database open on another console - this way, you make sure that you are removing the correct records.

When the listing is edited, save the changes and exit the editor.

• dbprune this creates the modified database containing only the wanted records i.e.
those marked by a ‘1’.

The file is called dbdepth.qlognew and again is contained in the users


home directory.

• dau_kill DBadmin

• copy the modified database back to the original database

cp dbdepth.qlognew 4:/datalog/dbms/dbdepth.qlog

• restart dbadmin (the crc and index files will be automatically updated) and check that the new
database is okay. Check the start and end depths and ensure that the database is complete. Pay
particular attention to the depth reference column and the top display information. The depths here
must be the same and non-zero, otherwise any ensuing dbdepth or plotter work will fail.

• If everything is okay, the prune process is complete. You can now remove the original database
backups.

Occasional problems have been experienced with the prune process when the database is located in drive
4. This is usually indicated by a meaningless dbdepth.list being created.

If this situation does arise, transfer the database to drive 3 and prune using the following procedure: -

• shutdown DBdepth and DBadmin

• cp 4:/datalog/dbms/dbdepth.qlog 3:/datalog/dbms (leave the original in drive 4 as


a back up)

• dbadmin & depth.crc and dbdepth.index will be automatically created in drive 3.


They may have to be removed in order to perform dbprune_lst
successfully.

• dbprune_lst Firstly, try with the crc and index files in place; if dbprune_lst does
not perform, or if dbdepth.list is corrupt, then remove crc/index files
and try again.

235
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• ed dbdepth.list as previously

• dbprune

• dau_kill DBadmin

• cp dbdepth.qlognew 3:/datalog/dbms/dbdepth.qlog

• dbadmin &

• check database is okay as previously. If so,

• dau_kill DBadmin

• cp 3:/datalog/dbms/dbdepth.qlog 4:/datalog/dbms

• dbadmin d=4:/datalog/dbms &

• check database is still okay, if so remove dbdepth.qlog and crc/index files from 3:/datalog/dbms

236
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.2 DATABASE BACKUPS

7.2.1 Time Database

The time database consists of singular time files automatically created for each day. They are located in
drive 3
e.g. 3:/datalog/dbms/time960723.qlog

Depending on the complexity of the job and how much data is actually stored in the database, each time
file could contain up to 3000 blocks, so that the disk space used up is important. The normal procedure is
to compress the time files into an archive file, then copy the archive file to a floppy disk. To save disk
space, the time files can then be removed from the drive.

e.g. cd 3:/datalog/dbms
zoo ah time1.zoo /datalog/dbms/time960723.qlog
zoo ah time1.zoo /datalog/dbms/time960724.qlog
zoo ah time1.zoo /datalog/dbms/time960725.qlog etc

Remember that a floppy disk contains 2880 blocks, so when no more time files can be added to the
archive without exceeding this number of blocks, copy the archived file to disk and remove the time files
from the drive.

cp time1.zoo 1: /

Only the data for the particular days whose time files remain on disk will be accessed by the time
database. Should you therefore need to access data for a day that has been archived and removed from
disk, simply restore that particular time file to the system.

These procedures can be done even if the administrators are running. The only time file you will be
unable to archive or remove is the current days time file which will be held open by dbadmin.

7.2.2 Depth Database

Unlike individual time files, the depth database, dbdepth.qlog, cannot be accessed (ie copy) on a hot
system when the administrators are running.

The easiest form of backup is simply to copy dbdepth.qlog to floppy disk and/or another node. However,
this cannot be done while we are drilling. This would be undesirable, ie no backups, during bit runs that
may last several days.

dbget allows you to do depth database backups even when the administrators are running, by creating a
data file which is an image of the actual database.

The dbget procedure can be used for unit backups of the entire database and also for successive update
backups to be sent to remote work stations. Here, we will just look at the procedure for unit backups. The
user should refer to the next section in this manual for the procedure required to update, via modem,
data on a remote work station.

237
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Unit backups of the entire database

The user should be located in their user directory.

dbget creates 2 files in your user directory:-

dbdepth.newlog - the data file, an image of the database


depth.crc - marks the records extracted by the current dbget operation

While dbget is running, the display will show the record numbers being read. At the end of the process,
the total number of records read (together with the % of the database) will be displayed. You should
ensure that this agrees with the actual number of records in the database.

For a unit backup, you can simply copy dbdepth.newlog to a floppy disk.

On the next occasion you wish to make a backup, you should remove both dbdepth.newlog and depth.crc
from your user directory before running dbget.

After running dbget, both files will be recreated, representing the current, complete, database.

The newly created dbdepth.newlog can then be copied to floppy disk, replacing the previous one.

Should the situation arise that you lose dbdepth.qlog and need to restore the database: -

cp dbdepth.newlog from the floppy disk to your user directory

dbput this will write the records back to dbdepth.qlog

Naturally, only the records extracted by the previous dbget will be restored, so the importance of doing
this process on a regular basis is clear.

NOTE the file depth.crc marks the records extracted during the dbget process. This file is used when
sending database updates to a remote. If depth.crc is left in place when running dbget, only records that
have been added to the database, or changed since the previous dbget, will be extracted.

This process will be considered in more detail in Section 8.

238
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.3 VIEWING ALTERNATE DATABASES

The newdb program allows the user to switch between multiple databases on a hot system and does not
involve restarting administrators. This is particularly useful for correlating with previous wells, or for
editing and printing logs from another well without disturbing the current ‘working’ database.

For this application to work the user will need to have an additional dbdepth.qlog file along with the
relevant dbdepth.index and dbdepth.crc files, located in a separate directory.

e.g. From the command line: newdb d=3:/datalog/dbms

This will change your current, viewed, database to the new one specified in the command string.

All recorded drilling data will still be stored in the directory specified by the administrator (should be
4:/datalog/dbms), but the data that is viewed will be from the sidetrack or previous well.

With database viewing still diverted to your alternate database it is now possible to edit and print logs
relating to this data. Looking at Plotter Setup on the Qlog menu will provide the user with the start and
end database of the viewed database, not the actual recording database.

Similarly if the user performs a dbget, dbprune_lst or a dbgrab the data retrieved will be from the
alternate database. When plotting logs from an alternate database the relevant header.dat, tomb.dat and
.txt files will need to be restored.

Another useful application for this program is to view different databases side by side using multiple
shells in QNX windows. However as it is only possible to redirect the output once, the multiple database
shells that the user has open will all revert back to present alternate database directory (i.e the most
recent newdb command) once the page down key is activated.

To revert back to the current working directory the user will have to redirect back to the current directory
being run by the database administrator.

From the command line: newdb d=4:/datalog/dbms

It is also possible to view and edit time databases from previous wells by simply using the t= option and
obviously you would need to revert back to your current time database for realtime data.

From the command line newdb t=3:/datalog/dbms

239
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.4 COMBINING DATABASES

Joining databases together requires the use of two programs called dbgrab and dbshove.

They work in a similar manner to dbget and dbput in that they both require administrators to be running.

As always, it is best to make copies of the relevant databases before removing/installing any sections of
records.

In theory these programs will take a selection of records from the current working database and append
them onto another database set up in a different directory. These two functions can be used for joining a
sidetrack onto a pilot hole for example, or removing the good records from a corrupted database and
starting a new one without the corruption.

All of these tasks should only be done when no drilling monitoring is required.

7.4.1 Joining a Sidetrack to a Pilot Hole

Procedure

• Shutdown DBdepth and DBadmin and make a backup of the database(s).

• Restart dbadmin (remember whether drive 3 or drive 4)

• Grab the section of data that you will need to start your new database with by entering

dbgrab s = # e = # where s = # is the start record number


e = # is the end record number (for a pilot hole the end would be
the kick off point of the sidetrack).

This will create a dbdepth.newlog file in your user directory.

• Shutdown dbadmin.

• Make a new database directory with a new set of bmap and lmap files and initiate a new
dbdepth.qlog file along with a dbdepth.crc and dbdepth.index file.

(These three files will be created by starting up the database administrator to your new directory, i.e.
dbadmin d=4:/datalog/dbms/new).

• Once you have restarted the dbadmin to the new directory you can type

dbshove s = # e = # obviously the start and end record numbers should be the same as the
dbgrab record numbers, if this is the first section. You can now view the
new database which should contain the same number of records as
chosen by the dbgrab command.

240
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Shutdown dbadmin and restart it using the directory of the sidetrack database and choose the records
that you need to append to the new database, paying close attention to the start and end depths and
number of records in the interval.

• Remove the old dbdepth.newlog file in your user directory and type in dbgrab s=# e# for the interval
that you need to extract.

• Shutdown dbadmin and restart it using your new directory containing the semi complete new
database (i.e. dbadmin d=4:/datalog/dbms/new).

• Perform the dbshove s=# e=#, command making sure that the start record number appends correctly
onto the previous record number in the new database and that the record interval is correct. The new
database should now be complete and ready to print.

7.4.2 Starting a new database from a previously corrupted one

Situation - Your current database has become corrupted creating large amounts of unusable records, the
situation has become hopeless and you can no longer use this current database.

Procedure

• Remove the pre existing dbdepth.newlog file in your user directory and dbgrab s=# e=# the end
record should correspond to the last record of decent data before corruption. Shutdown dbdepth and
dbadmin and make a copy of your current corrupted database.

• Make a new database directory including the relevant bmap, lmap files and restart the database
administrator directed to your new directory (e.g. dbadmin d=4:/datalog/dbms/new).

• Type dbshove s=# e=# remembering the relevant record numbers, restart dbdepth and the new
database is ready to start drilling. If the new database is missing any data you can always retrieve this
from the time database and import the information using the import command, remembering that the
time based reference column needs to be changed to a depth based reference column.

241
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.5 EXPORTING DATA

There are two programs that can be used to extract, or export, data from either the depth or time database.
Both programs are operated in pretty much the same way, with the only difference being the output
format of the data.

export data will be in the ASCII format


las data will be in Log ASCII Standard format

The extracted data from both methods can then be restored to QNX or MSDOS systems.

7.5.1 Using export

Basic command:- export s=100 e=200 f=** f=** f=** o=3:/tmp/datafile


(depth database)
s = start depth
e = end depth
f = cell reference or field number
o = output file

‘f’ can be defined by either the database cell reference, or the field number which is given for
each parameter in the first column of 3:/datalog/text/display.txt

eg parameter cell ref field number

RPM a 00
ROP bx 75
Methane bz 77

An index file can be used instead of having to put references for several parameters into one command.
This can be done with the editor and is simply a vertical list of the required field numbers. The form of
the command would then be: -

export s=100 e=200 x=index.file o=output.file

(The full directory path should be given for each file)

Unless specified, the format of the output data file will be comma seperation. If required, a report format
can be given by using the +r option. In association with this, the number of lines per page can be
specified (p) and also the width allowed for each column of data (this is given along with the reference or
field number)

eg export s=100 e=200 x=index.file o=output.file +r p=54

The index file for the above parameters could be 00,10

242
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

75,10 where 10 spaces are allowed


77,10 for each data column

This command would then extract the data between 100 and 200m, producing a report style output with
each page being 54 lines long. There would be 4 columns (depth is automatically exported) each being 10
characters wide.

By default, when data is exported from the database, it will be in the system metric units. If User Units
are required, the +c option should be used.

Data can also be averaged through the ‘export’ program (a=average interval).

A database originally in metres can also be exported and displayed in feet (+f option).

For example, in the previous example, if we had desired the output data averaged over 5m intervals
instead of every metre, the command would be: -

export s=100 e=200 a=5 x=index.file o=output.file +r p=54

Parameters such as Comments, Lithology Comments, Porosity, Fluorescence, Calcimetry etc can also be
exported. These parameters are those detailed within edits.txt rather than display.txt. Viewing these files,
you will notice that the field numbers in edits.txt are the same as those in display.txt. However, this is
just a function of the two text files.

Should you wish to export these parameters, you again have the choice of specifying them by way of the
column reference or the field number. However, the field number will not be as displayed in edits.txt, but
the actual number of the column in the database spreadsheet (numbered left to right, with the first column
RPM being 0). It would therefore be alot easier to use the column references rather than number.

Unfortunately, due to the nature of the text columns in particular, the report format option cannot be used
when exporting these parameters.

7.5.2 Export from Time Database

The form of the command is identical to that used with the depth database. The differences are the way
that the start and end time are detailed, and also that a +t option must be used.

export s=“d=20-08-96 t=09:00:00” e=“d=20-08-96 t=10:00:00” x=index o=output +t

Hence, both the date and time have to be given in the format shown above. If ‘d’ is not specified, the
current day is assumed. If ‘t’ is not specified, midnight is assumed.

If difficulties are experienced with this operation, for example with error messages such as ‘this time
does not exist in the database’, the error is going to be in the the incorrect setting of the timezone offsets.

243
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.5.3 Using LAS

As already stated, the las command works in exactly the same way as the export command, using the
same options. Obviously, the command las will be used instead of export, but otherwise, the only
difference is the format of the outputted data.

eg las s=100 e=200 a=5 x=index.file o=output.file

The default format from the export program is comma separation eg

8.000,9.450,23.555
9.000,10.288,25.543
10.000,10.431,20.245

Note that individual columns are not separated as distinct columns, neither are they aligned if the
numbers are different (ie 9.000 compared to 10.000). Note, this default format for the export program
can be changed by using the +r option for a report format.

Output from the las program is different in that individual columns will be separated and aligned. As well
as the data, the las output also contains information pertaining to the las software, the parameters that
have been extracted and the units of measurement. Each individual column will also be headed by the
parameters abbreviation.

A typical output, after all the las information has been detailed, would look like:

DMEA.M :1 BL Hole Depth


ROPA.M/MIN :2 BX Rop
~
OTHER DATA
Produced by QLOG (c)1991-1996 Datalog Technology Inc.
QLOG/LAS $Revision: 2.3 $
~A DMEA ROPA
25.000 29.345
26.005 20.562
27.011 9.781
28.012 11.582

Note that the units will only be specified if they are the default system metric units. If the option +c is
used to extract the data in the user units, and these units are not the default, the space in the header
information will be left blank. The user can edit the file to specify the units by using the editor.

The default format for the output data will be MSDOS format. This can be changed by using the “m=”
option,
where m= qnx, dos or posix (for unix)

Obviously, if the DOS format is going to be used, the filename given for the output file must confirm to
the DOS system (maximum 8 characters followed by a 3 character suffix). If no suffix is specified, the
file will automatically be given a .las suffix.

+/- w (wrap)

244
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

This option will turn the wrap mode on or off. If this is not specified either way in the command, the las
program has default settings for wrap mode.

If there are less than 255 characters in a line, one continuous line will result. If there are more than 255
characters, the las program will automatically use the wrap mode - then the maximum characters on one
line will be 80. All excess characters will be wrapped.

If no wrap command is given, the default is wrap off. ie allowing up to 255 characters in one line.
However, if for example, we had 200 characters but wanted the lines wrapped (ie 80 per line), we should
use the +w option.

In practice, if we were exporting data to produce a printed report, we should use the export program
rather than the las program. Las is primarily used to export to MSDOS systems using a Log ASCII
Standard format.

7.5.4 Creating Batch Files for LAS Data

Rather than undergo the laborious task of typing out a large command string, and if the command is
going to be used regularly as part of a daily routine, then the process is simpler with a batch file,
especially if the same syntax will be used every time and the only change that is needed is the depth
interval.

For example, the geologist requires ASCII data for ROP, gas and a chromatograph breakdown at least
three times a shift, he also wants the interval to include a 5m average:

Procedure
• Make a file in /user/cmds directory called gas - this is done simply by typing in ed gas and then
F2, this will create the file.

• Enter the command string

las s=#1 e=#2 f=bx f=as f=bz f=ca f=cb f=cc f=cd f=ce f=cf a=5 o=/tmp/gas.las +c

• Save the file in the text editor and make the file executable by using the chattr command,
explained more fully in section 6.5 of this manual.

• Type the command ‘gas’ followed by a start and end depth and a las file called gas.las will be
created in the /tmp directory.

gas 400 500

This will give a gas and rop breakdown from 400m to 500m wth a 5m average interval if the
equipment table was set up to record depth every metre.

245
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

7.6 IMPORTING DATA

This program is primarily used for importing data such as wireline or MWD data into our database. As
such, this would be importing data into the ‘user defined’ columns of the database (there are 8 ‘UD’
columns, references JT through KA). Notice that as a default, the first 4 user defined columns are
assigned particular wireline data.

JT Sonic
JU Resistivity
JV Gamma Ray
JW Bulk Density

Although these would be the columns used when importing this specific wireline data, the remaining 4
‘UD’ columns can be used, as can any other column in the database.

If a datafile is presented to us in DOS format, simply run dosfsys (dfs start a=1), copy the file to the hard
drive and proceed as you would with a QNX file.

Command format import f=filename s=** u=*:* d=*:*

s lines to skip - this is used to ignore lines at the top of the file. This may be in the case
where there is text information (such as in the las format), or if data is only required from
a certain portion of the file.

u when data is being imported into the user defined columns. The first number is the
number of the column in the datafile (the first column will always be depth and is
regarded as column 0), the second column is the number of the UD column (1 to 8).

d when data is being imported into any other column of the database. The first number is
as above, the second number is the number of the column, or field reference, in the
database (the number given in the first column of display.txt).

A maximum of 8 parameters can be imported at any one time. Note that the depth does not need to be
specified. The depth of each record in the data file will be read, and this data will automatically be
written to the correct depth record in the database.

Example - the file ‘wireline.dat’ contains the following data

Depth Gamma Sonic Resistivity


500 48.5 63.6 0.875
501 49.2 64.5 0.921
502 47.8 62.8 0.856 etc

To import this data to the correct columns, the command would be

import f=wireline.dat s=1 u=1: 3 u=2:1 u=3:2


• If there was already data in the particular columns that we wanted to overwrite, the option +o should
be used.

246
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Note that with the user defined tracks, no units are specified - they are unitless by definition.
Therefore, with the data file, it does not matter what the units are, the actual value will be imported.

• However, if we are importing data into any other database column (ie using the d=*:* option), the
units do matter. Before we import, we should ensure that the user units are the same as the units in
the data file. We then import using the +c option (converts) to ensure that the correct data is
imported.

• The +f option (feet) tells the import program that the depth data is in feet rather than metres.

247
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8. COMMUNICATION APPLICATIONS

248
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.1 NETWORK CONFIGURATION

8.1.1 Connecting Machines

Two QNX machines can be directly connected together, by co-axial cable, with the connection up to
2000 feet or 600m long.

Connecting more than two machines requires an active hub. Each node must be connected directly back
to the active hub, again with each connection up to 2000 feet. An active hub acts as an amplifier,
boosting the signal, allowing longer connections. Obviously, the more nodes that are attached to the
network and the longer each connection is, the slower the communication will become.

An active hub can be connected to another active hub if more nodes are required than available on one
active hub (each hub contains 8 connections).

With one hub, the maximum size of the network would be 8: -

Node 1 -------- Active Hub -------- Nodes 2 to 8

With two hubs, the maximum size of the network would be 14:-

Node 1 -------- Active Hub -------- Nodes 2 to 7


-------- Active Hub ------- Nodes 8 to 14

Lights for each connection on the active hub will confirm that the system is active with communication
to that particular node.

8.1.2 Configuring the Network Card

The purpose of a network is to allow users on other machines to access the information being processed
by the main server or node 1. Node 1 would then be ‘driving’ the entire network with other nodes
‘feeding’ from it. Therefore, even though a user would be physically located at node 3 for example, by
default any data that that user sees will be supplied by node 1. Unless the user specifically specifies a
different node number, any work that that user does would also be on the hard drive of node 1.

A typical network at wellsite may consist of the following:-

Node 1 The CPU or server Hard drive


Node 2 Unit backup computer Hard drive
Node 3 KNS (eg for geologist) Typically no hard drive
Node 4 KNS (eg for engineer) Typically no hard drive
Node 5 Drill floor monitor Typically no hard drive

The network cards for each node on the network have to be configured when the computers are being
booted.

249
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

During the boot up sequence, press <Esc> when the screen is cleared and the following message is
displayed:

Node n, where n is the node number of the computer.

The following boot menu will be seen:

N boot from Network


D boot from Disk

Press <Esc> to take you into the network interface configuration menu.

The following items will be displayed: -

1. Boot from network

The option selects the default boot source.

Selecting No - this means that this particular node will access its own hard drive from which to boot
from. This option would be selected if we have only one computer, and would also be
selected for node 1 on a network.

Selecting Yes - will cause the computer to attempt to boot over the network. This option would be
selected for each node, other than 1, on the network.

These selections can be overidden by selecting N or D at the first boot menu.

2. Local Node ID

This is the local node number of a particular station on the network. In order for a network to function
correctly, each station must have a unique node ID. Node numbers are normally added sequentially,
being between 1 and the number of nodes licenced (max 255). If 0 is entered the network card is ignored.

3. Primary Boot Node ID

This is the node number of the computer that the local node will attempt to boot from. This is normally
node 1, the main server of the network. For example, if we were setting the configuration for node 3, the
primary boot node would be 1; on boot up, node 3 would then access the hard drive on node 1 in order to
read the boot file that will allow it to boot.

4. Alternate Boot Node ID

The node number from which to boot from should booting fail from the primary boot node. This would
typically be node 2.

5. Retries from Boot Node

The number of boot attempts allowed before a boot failure occurs. Typically set at 1

250
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6. Boot File Name

This is the actual name of the boot file on the operating system that the network will boot from. These
files are located in 3:/netboot. The same boot file name should be entered in the configuration menu for
each node in the network. This can be confirmed from the net command. If an incorrect file name is
entered, ie it does not exist in 3:/netboot, the system will not be able to boot up.

The file used (as of August 96) is called os.2.21atpb

7. Hardware Interrupt Level

This is a setting concerning the communication of the network card with external terminals. This is
determined by the EPROM setting on the network card and is normally set at 5.

8. Exit Menu & Boot

All settings are saved in the non-volatile memory when this option is selected. Once the system is
booting, the green light on the back of the network card should flash steadily at about once per second,
showing that the network is in the continual reconfiguration state (see the netstats command). In normal
operation the green light should be on and indicates network access, the red light indicates CPU access
and normally flashes sporadically.

Example: Configuration files for a network of 3, where

Node 1 is the CPU


Node 2 is a backup computer with identical hard drive
Node 3 is a KNS station with no hard drive

Node 1 Node 2 Node 3

1 N Y Y
2 1 2 3
3 1 1 1
4 2 2 2
5 1 1 1
6 os.2.21atpb os.2.21atpb os.2.21.atpb
7 5 5 5
8

251
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.2 NETWORK COMMANDS

The network size must be capable of running a new node number.

netsize To find out the number of nodes that can be added to a network. The netsize command is
also used to increase the size of the network; insert a boot or network disk when
prompted and follow the instructions. Netsize must be run on the boot server node.

alive Shows the total number of nodes allowed, and whether they are running or not.

Once the network card has been configured and the user is sure that there is network
expansion size available, the "sys.init.n" file should be edited or created, where n is the
node number.

netboot This task has to be running for nodes to be able to boot over the network. This command
should be in the boot server "sys.init" file (ie sys.init.1). The new node should now boot
over the network.

net This shows all the nodes currently alive, together with information on each node such as
Operating System version, memory used and available, CPU speed, tasks running and
available etc. There will be an asterisk that indicates your current node ie from where the
net command was issued.

netstats Displays the following network statistics:

Min Packet Queue


The minimum number of empty packets in the outgoing message queue. If this number
ever reaches 0 messages (ie data) will be lost.

Packet Queue Overruns


If the Packet Queue ever reaches 0 this number will increment. This number should
always be at zero, if it ever becomes non-zero phone for technical support.

Network Tx/Rx Packets


The number of packets sent and received by the node.

Reconfigurations
The number of times the network has been reconfigured since the node was last booted.
This value will increase everytime a new node enters or leaves the network. If this value
increases when no nodes are entering or leaving the network it could indicate faulty
network hardware, cables or noise on the cables.

Network Tx Errors
The number of packets corrupted during transmission. Errors are acceptable since these
are high speed circuits that will correct errors automatically. QNX will attempt several
times to resend these packets.

252
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Network Tx Timeouts
The number of times packets were unable to be sent to another node which has a network
card but whose software is not responding.

Network Tx Aborts
The number of times QNX has given up trying to send a packet from the node.

Network Rx Errors
How many bad packets are received by the node. Whereas it is normal for some packets
to become corrupted during transmission, under no circumstances should corrupted
packets be accepted by another node. This is a definite no no and any Rx errors should
be reported immediately to Technical Support.

Network Rx Duplicates
How many duplicate packets were received and rejected. This occurs when 1 node sends
a packet to another and awaits a message that the packet has been recieved. If it doesn’t
receive that confirmation, it will resend the packet. If in the meantime the receiving node
has accepted the packet, it will reject the duplicate packet. Excessive values could
indicate faulty wiring/hardware.

If problems are being experienced with the network start netstats+monitor, then everytime netstats is
run, a report will be generated with the node number, error type and the time of the error.

The command nettest <node number> will check the data transmission between your local node and the
given node. The number will increment rapidly showing the communication back and forth between the 2
nodes. Generally no errors are seen, but any errors occuring will be detailed by a message. Errors may be
seen for example due to interference from electrically noisy cables eg if the network cable was run close
to the main power cable at rig site.

253
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.3 TERMINAL TYPES

From a QNX perspective the user is operating through a terminal whenever they are at a screen or
console. The terminal type used to communicate with the QNX system will vary depending on the
physical connection to the QNX system and the type of hardware. For example, if the user is on a full
screen node then the terminal type would be qnx; if the user opens a window shell then a qnxw terminal
type is used.

If the terminal is not part of the network, the terminal type will vary depending on the type of terminal
connected (or the terminal type being emulated).

The command tset will show the current setting ie the current terminal type.

tset <terminal type> would set the terminal type for the current tty.

The following terminal types are commonly used in QLOG:

qnx Used on consoles, this is the default setting.


qnxs Used when remote terminal is a qnx terminal or a machine emulating a qnx
terminal (eg qt for MSDOS).
qnxw Used by QNX windows (this is set automatically by windows).

Another type of terminal would be selected if the remote terminal accessing the QNX system is not a
QNX type, for example a vt100.

A list of all the terminals supported by the QNX system can be seen by entering tcap list, the tcap
command manages the terminal capability database.

Remote Work Stations

A work station can not only view data from another Qlog system but can transfer data. This allows
remote log plotting and access to wellsite data as if the user were at wellsite, an obvious advantage to
clients.

Remote communications is achievable by way of a modem (Datalog currently use US Robotics high
speed modems) which is connected to the computer with a serial cable. The internal settings of the
modem will be looked at in more detail in the Advanced System Management section of this manual. At
this stage, the user should be familiar with the external settings of the modem and with the correct
settings of the serial ports required for the modem to operate.

254
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.4 MODEM AND PORT CONFIGURATION

8.4.1 External Modem Settings

The modem has a set of 10 external dip switches. These should always be set in the following manner:-

ON 3, 5, 8
OFF 1, 2, 4, 6, 7, 9, 10

The back off the modem contains a 25 pin serial port, a power socket for its own 16 volt transformer and
2 jacks, one for the phone line and the second should a telephone be required.

The front of the modem contains a series of LED displays:-

HS High speed
AA Auto Answer
CD Carrier detect
OH Off hook
RD Received Data
SD Send Data
TR Terminal Ready
MR Modem ready
RS Request to send
CS Clear to send
SYN Synchronous Mode
ARQ Error control

TR, MR, RS, CS These lights should be displayed when the modem is connected to the
computer and switched on

HS, AA, CD, OH These lights will illuminate when a connection is made to a remote work
station, i.e. a total of 8 lights will now be displayed

All of the lights should remain on for the duration of the communication.
Should these 4 go out, the connection has been lost.

RD or SD One (either receive or send) will light up when data is being transmitted

8.4.2 Serial Port Settings

The modem can use any of the serial ports ( $mdm, $term, $cti) on any part of the network, but
whichever port is used, the communication parameters have to be set correctly in order for the modem to
function.

255
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The following default settings are stored in 3:/config/init.cti for $cti1: -

baud rate 38400


parameters required: hflow (hardware), iflow (input), oflow (output), split, esc=0

To see the settings of the serial port:-

stty < $port name

For example, if the modem was attached to $mdm (remember node number if the modem is attached to a
node other than [1] on a network), you would issue the command:-

stty < $mdm

If the resulting information was given:-

baud 9600
+hflow +echo +edit +etabs +igate +mapcr

You would have to issue the following command to set the port correctly:-

stty b=38400 -echo -edit -etabs -igate -mapcr +oflow +iflow +split esc=0 > $mdm

In other words, settings that are not required have to be turned off with a ‘-’ and settings that are
required, but are not present, have to be turned on with a ‘+’.

After issuing this command, you should again check the port set up ( stty < $mdm) to ensure that all the
changes have occurred. You may commonly find, for long command strings, that not all of the changes
have taken place. You should issue a second command to make the appropriate changes still required.

Once the port has been set correctly, the settings should be put in the appropriate sys.init file so that the
port will reset correctly should the system have to be rebooted.

i.e. the command line in the sys.init file should be:-

stty b=38400 +hflow +iflow +oflow +split esc=0 > $mdm

The baud rate is the speed of communication. It is equal to the number of characters per second (cps),
or bits, multiplied by 10.

It should be set at 38400 because this is the maximum communication speed of the $cti ports. The base
serial ports (ie $mdm or $term) can actually communicate at bauds of 57600 but we still assign 38400 to
avoid confusion.

When two modems connect, they establish a communication baud rate which may well be less than
38400. It is a common misconception that the serial port baud rate should then be changed to match the
modem communication baud.

256
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

All this does, in effect, is limit the communication speed, thereby increasing call time and cost.

If 2 modems established a baud of 19200 but the port was set to a baud of 9600, information could only
be delivered by the port at 9600. If the port baud had been set to 38400 on the other hand, information
would be delivered by the port at 38400 and transferred between modems at 19200.

The modem has a built in buffer to hold the excess data created by this speed discrepancy.

8.4.3 Comm – 2 Way Communication

What we have done so far is set up the modem and serial port to enable us to make an outgoing call on
the modem. To allow 2 way communication, ie enable a remote station to dial in to our local system, a
task called comm has to be running.

Again, there is a correct setting for the baud rate and parameters to be run with comm. The default
command is stored in 3:/config/init.cti...

ontty $mdm comm b=38400 i=ATZ| a=ATA| +h -a + l l=/logs p=1 t=15 m=“Datalog”

i= initialization string
a= answer command
/logs directory that keeps a record of all connections made
p= number of rings to pick up on
t= time out ie if no connection is made after 15 seconds, the modem will stop
trying
m= greeting message

Here, again, the baud rate is set to the maximum capability of the cti port. This is to allow a full speed
range for the remote station.

This command string should be set within the appropriate sys.init file so that comm will always be
restarted should the system have to be rebooted.

In practice, you are never likely to want to shut comm down, but if you should wish to do so, the
following command should be issued:-

slay comm u=8000

257
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.5 QTERM

8.5.1 Directory Configuration

qterm is the communications software package used by the QLOG system. Before a particular user can
successfully use qterm, he or she must possess a ‘telephone directory’. This should be copied from the
qterm directory to the users qterm directory. The user may have to create this directory.

mkdir 3:/user/*****/qterm

cp /qterm/phone.dbase /user/*****/qterm

To add a particular number to this ‘directory’, the user has to now enter qterm. The following commands
should be issued:-

qterm m= where m specifies the correct port name (remember node number if on a
network). If no port is specified, $mdm will be assumed.

At this point, the qterm software will be loaded and a message will display
‘Qterm V1.16’. The V is just the version. You will see a flashing cursor showing
that qterm is waiting for a command.

ctrl-a brings up the qterm menu

option d takes you to the telephone directory

Alternatively, the command qterm m=$**** +d would take you directly to the phone menu. To add a
new number, the cursor arrows should be used to take you to an available position in the menu.

Type ‘e’ to edit

You will then be taken into a submenu for that particular number

The following information needs to be entered:-

System Name The name of the company or person


Phone Number The number of the remote modem
Modem Port The serial port that the modem is connected to
Input Flow On
Output Flow On
Hardware Flow On
Baud Rate 38400
Type <grey plus> to accept

You will then be taken back to the main phone directory, where the new number and the correct setups
will be stored.

258
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.5.2 Call Out

From the same menu, you can dial the remote system:-

option C to make the call once


option A attack dial - the modem will keep on dialling until a connection is achieved

Alternatively, once all of the above information is stored in phone.dbase, the number can be called
directly on entering qterm by giving the system name, eg Acme_Oil, along with the qterm command:

eg qterm Acme_Oil m=$cti2

Once a connection has been made with the remote station, you will be given information such as the time
of connection and the baud rate that the two modems have connected at.

On screen, you will see a normal QNX login prompt. You must remember that this is now on the remote
computer and any work that you do after logging in will be done on that remote machine.

If you have made this connection from wellsite, you can still see what is happening at wellsite by
changing consoles (ctrl_alt_enter). Only one of the consoles on your local machine will be taken up by
qterm - this is where you are working on the remote station. The remaining consoles are still occupied by
your local system.

Once you have finished your work on the remote station, you must log off from the system. Having done
this, qterm is still running, the connection between the two modems is still open - it is still costing
money!

You must therefore remember to hang up after your call and exit from the communications program, this
is especially true when two QLOG work stations are connected together as it is very easy to forget that
one display is actually from a remote system.

After logging off:

ctrl_a to bring up the qterm menu


option h hang up and quit qterm

You will then see a normal command prompt - you are back on your local system.

259
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.6 QCP – FILE TRANSFER

In order for files to be transferred between computers connected by modems, a program called qcp must
be run.
qcp Quantum Communications Protocol

8.6.1 Send File from Local to Remote

To send a file from your local work station over the communications link to another work station, the
following procedure should be followed. In this example we will send a file called junk.txt, which is
located in our /tmp directory, to the /tmp directory on the remote machine.

First, the user dials and logs in to the remote system as outlined above.

qcp re Entered from the command prompt on the remote system type.
This tells the remote system to expect to receive a file using the qcp file transfer
protocol.

“Ctrl a” To access the Qterm menu on your local work station. Then, simply follow
through the menu system:

s To send file
This brings up a menu of file transfer protocols

1 Selects the QCP option


A command bar will appear at the top of the screen with a message “file to send”.

Type the exact file specifications, e.g. /tmp/junk.txt

After pressing enter, the file transfer will take place automatically. The user will see the percentage of the
file sent and the actual speed of the transmission (cps). Once the transfer is complete, the user will be
returned to a command prompt on the remote machine.

When all work has been completed, the user needs to log off from the remote system, and shut down
qterm on the local system.

Here is a summary of the procedure, with commands issued on your local machine in italics and
commands issued on the remote machine in bold:

After connection is achieved login and password


qcp re
ctrl_a
s
1
/tmp/junk.txt

260
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

After transfer completed bye


ctrl_a
q

8.6.2 Sending files to different directories

To send the file to a different directory on the remote machine, for example /user/fred, then step 4 in the
above procedure would be:-

/tmp/junk.txt,/user/fred/junk.txt

A second method of doing this is to use the force (f=) option when initiating QCP on the remote station.

Instead of simply ‘qcp re’, step 1 in the procedure would be:-

qcp re f=/user/fred/junk.txt

The remaining procedure would be the same.

Both of these procedures can also be used if you should wish to change the file name. For example, to
change the name of the file to junk.rpt, the 2 commands shown above would become:-

/tmp/junk.txt,/user/fred/junk.rpt

qcp re f=/user/fred/junk.rpt

In both of these cases, the filename will be changed on transmission and the file will be taken to the new
directory.

8.6.3 Sending Multiple Files

Multiple files can be sent using wild cards. For example to receive all files ending in .plot located in
/datalog/plots from a remote machine to our local work station:

qcp se /datalog/plots/*.plot

The receive will start automatically on our machine. This option can not be used for sending large
subdirectories. For example,

qcp se /datalog/cmds/*

will not work, in fact no files would be sent and QCP will not find any files to send, instead you should
use an index file using the 'x' option. The same procedure can be used to send multiple files from our
local machine to the remote:-
initiate qcp on the remote as previously detailed (qcp re)
on your local machine, ctrl_a
s
1 as previously described

261
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

use the wild card when naming files to send:

eg /user/datalog/*.rpt

Using an Index File

Multiple files in different subdirectories, or files that can not be sent using the wild cards can be sent by
specifying an index file that contains the list of files to send. For example, if you wish to send all of the
files in /datalog/plots, except for one called "temp.plot", you would first create the index file (on the
local work station) containing a list of these files:

This file can be created simply by using the editor, or alternatively, you could use the following
procedure:-

files /datalog/plots -v >/tmp/plot.index

This would create a list of the files and any sub-directory paths and record them in /tmp/plot.index
.
Now we can edit plot.index and remove the unwanted file "temp.plot" by deleting the whole line.

Then follow the same procedure as already outlined, but when naming ‘file to send’ on your local
machine, use the following command:-

x=/tmp/plot.index The x= option specifies that there is a list of files to send.

8.6.4 Updating Files

If you wish to send all of the data files in /datalog/plots/data that have been modified, or are not present
on the other system, since the last update you would use the +n option which only sends the newest files.
The local system will compare file dates with the remote system and will send any files whose
modification date is newer on the local system.

As before, start the receive on the remote machine: qcp re

Initiate the send on your local machine:

'Ctrl a' to enter command, 's' to send a file, '1' to select qcp and file to send:

/datalog/plots/data/* +n

262
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.6.5 To Download File From Remote System

We wish to download a file called blurb.txt to our local machine. The file is located in the /tmp directory
on the remote work station:

After dialling, connecting and logging in to the remote station, the following command is issued on the
remote station:

qcp se /tmp/blurb.txt

The receiving end (your work station) will automatically start receiving data. The file will automatically
be downloaded to the /tmp directory on our local machine.

8.6.6 Relaxed Timing Option

If problems are experienced with the connection being lost before file transmission has been completed,
QCP has a ‘relaxed’ option that can be implemented.

This may result in slightly slower transmission speeds but it is more resilient to ‘noise’ or interference on
the line. This will normally allow transmissions to be completed where failure had been experienced.

The same procedure is followed as already detailed, with the following options:-

After connection is achieved login


password
qcp re +r
ctrl_a
s
1
/tmp/junk.txt +r
After transfer completed bye
ctrl_a
q

In other words, the relaxed option is given when QCP is initiated on the remote station and when the file
is named on the local station.

8.6.7 Notes on File Transmission

When sending data from your computer, make sure you start the transfer procedure on the remote
machine. QCP only starts automatically when a file is sent from a remote computer to the local.
Other protocols may or may not start automatically, check first. Once the receiving computer transfer
procedure has been initiated, QCP will allow 60 seconds before a timeout occurs and approximately 240
seconds if the relaxed timing option is used. This means you have a minimum of 60 seconds to start
sending data before the remote machine will give up.

263
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.7 TRANSMITTING The QLOG Database

The two online databases (time and depth) cannot be copied or moved in the normal manner because they
are always open for -writing/reading by the database administrator. The other concern with sending the
database is that the files can be extremely large and it would take progressively longer if the whole
database was being sent each day.

Therefore, a procedure has been developed for sending only the data that has changed since the last time
the database was sent (including edited data). This procedure accesses the database through the database
administrator so that this transfer can be performed while the database is on line and even being updated
while it is being sent.

There are three steps to send an update of the depth database:

1. Create a temporary image of changes in the depth database using dbget


2. Transfer this temporary image to the remote machine.
3. Issue a command to place this image into the remote database using dbput

Remember that for the time database, the commands dbget_t and dbput_t would be used and the files
created are dbtime.newlog and time.crc. All procedures are otherwise the same.

The temporary image of the database is called dbdepth.newlog and is created in the users home
directory when dbget is run. The time that dbget is run is the ‘cut off’ depth, therefore any data written to
the database after dbget is run will not be sent. You should always be logged in as the same user before
running dbget.

A file called depth.crc is created in the users home directory when dbget is run on the local machine.
This file is used to determine which records were ‘extracted’ during the last dbget. Only new or altered
records will be ‘extracted’ durin the ‘current’ dbget. If this file is missing or deleted, the whole database
would be ‘extracted to dbdepth.newlog.

The dbdepth.newlog file is then transferred to the remote station. The file would normally be
compressed, using the zoo command, prior to transfer so that the file size is kept to a minimum. The
users home directory path should be supplied if the user was not in his home directory prior to starting
the Qterm communications program. The file will then be sent to the same user directory on the remote
station. The user should be logged in on the remote as the same user. Dbget and dbput require the
dbdepth.newlog file to be in the users home directory, so if it transferred to a different user directory, the
process will not work.

When the transfer is complete, dbdepth.newlog will have to be restored on the remote machine, and then
placed into the remote work station's depth database:

dbput

The dbput program may take some time to place all the data thus it is quite valid to run dbput in the
background

dbput &

264
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

This will have the disadvantage that the data transfer can not be seen but it will allow the user to do any
other work on the remote work-station. It is not a good idea to log off the remote machine until the dbput
is finished as if there is an error it will never be seen. When dbput has finished it will report the number
of records written.

The 'fopen' command will show how far dbput is ‘through’ the dbdepth.newlog file; 67/450 means that
67 records out of 450 have been ‘transferred’ from dbdepth.newlog to the database.

It is worth checking that all the data is present after the dbput is finished by viewing the database with
dedit.

Summary of the whole process, commands on local machine are in italics and commands on the remote
machine are in bold.

Assume you are logged in as ‘datalog’ on your local machine:-

dbget
cd /user/datalog, with ls you should see dbdepth.newlog and depth.crc
zoo ah depth.zoo dbdepth.newlog

enter qterm and dial remote station


login datalog, give password - you will be located in /user/datalog on the remote
qcp re
ctrl_a
s
1
/user/datalog/depth.zoo

when file transfer is complete


ls, you should see depth.zoo
zoo x depth.zoo to restore dbdepth.newlog
dbput

when all records have been sent to the database, check ok


logoff
ctrl_a
q

265
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.7.1 Possible problems with database transfers

Every time you run dbget you must succesfully transfer the dbdepth.newlog file and sucessfully run
dbput on the remote machine.

Every time you run dbget a new dbdepth.newlog file is created in your home directory, so if the last one
has not been sent and dbput a gap will appear in the remote database.

If the lines are noisy and you keep on getting cut off part way through the transfer, try using the relaxed
timing option of qcp. Try using the sealink protocol especially if the transfer is via satellite (most
overseas communications are via satellite).

It is possible to have more line noise than the modems can self correct. This is rare, but could manifest
itself by hieroglyphic characters being printed randomly around the screen, or simply by totally losing the
connection. There is not much that can be done about noise apart from logging off and re-dialing to see if
the line noise clears up.

If a file transfer is successfully completed, the file will not have any corrupted data due to line noise as
all data integrity is checked by the transfer protocol.

If noisy lines are a frequent problem, perform the remote send procedure often so that the
dbdepth.newlog file is kept small and the chance of being cut off mid-way through a transfer is reduced.

When you run dbput, if you receive an error 'Could not open dbdepth.newlog' it means that you are
logged in as the wrong user or the dbdepth.newlog file does not exist in your home directory.

Both the remote and the local system have to have the database administrator running.

266
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.8 Other File Transmission Protocols

8.8.1 Sealink

Sealink is better suited to satellite transmission where there can be long propagation delays between the
sender and receiver. QCP is a QNX protocol, thus non QNX machines will not support QCP. QNX has
other protocols such as xmodem, ymodem, kermit and sealink which are supported by non QNX
machines.

For example, to send a file using sealink from your QNX system to another system. This procedure may
vary depending on the system you are connected to, so if in doubt ask the computer operator for the
remote system. If the machine was a QNX based machine the user would type:

sealink re to initiate the receive on the remote

To initiate the send on your local machine:-

Ctrl a to bring up qterm menu


s send option
8 to select sealink protocol
file to send

8.8.2 QT

QT is the MSDOS communications package which will emulate a QNX terminal and perform QCP
(Quantum Communications Protocol) file transfers.

Normally QT is used to connect a PC with a modem to a QNX system but the PC and QNX system could
be directly connected.

When the terminal connects with the QLOG system, it will normally display “CONNECT” and the baud
rate that it connects at:-

for example, "CONNECT 2400" means a straightforward 2400 baud rate connection has been
achieved.

The method of error correction and compression detected between the two modem connection will also
be shown:-

for example "CONNECT 14400/ARQ/V32/LAPM/V42BIS"

The actual connection speed can be lower than the configured rate due to line noise. The error
correcting standards such as V32BIS and V42BIS provide data compression and data correction and
should provide trouble free connections.

If the modem did not connect, a message will be displayed. Depending on the message either retry or
wait (if it was busy for example).

267
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The remote login is the same as a local login, the user will end up at the same command line.

Example Login by Modem:

CONNECT 2400 (5 seconds delay...)

QNX Version 3.15H Node 1 $tty5


Local Time: 11-Apr-92 2:10:18 pm
Copyright (c) Quantum Software Systems Ltd. 1983,1989
Login: (enter your login name)
Password: (enter your assigned password)
Last on 11-Apr-92 2:41:43 pm on [1]$tty30.
0 Login Failures
Communications Speed:

Modems may communicate comparatively slowly depending on the line or communications noise.
Please make allowances for this if the connection was slower than expected.

For example, at 1200 baud it will take approximately 5 seconds to draw a real time screen.
All keystrokes are buffered, so give the system enough time to react to a keystroke before the next key is
hit.

8.8.3 Logging Off

If possible, you should always log off the system properly, do not just hang up as it is possible to cause
problems at the remote site depending on what you were doing when you hung up.

To exit properly from the QLOG system select "exit". Always exit from the remote system first by
entering bye or logoff before hanging up your local system.

To hang up your line, type 'Ctrl a' and then 'h' to hang up the line.

If you do not hang up you may rack up a large phone bill and you will stop anybody else from dialing
into your system.

To exit from QT back to MSDOS type 'Ctrl a' and 'q' to quit.

268
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.9 Use of Hyper terminal via serial link

When transferring data from QNX/QLOG to Windows 95 or DOS, the use of floppy disks tends to be
cumbersome and slow. If a file is too large to fit on one floppy disk, then it must be zipped, and then
expanded again. If it is still too large to fit on one floppy disk after zipping, then it is impossible to
transfer it in one piece.

A more simple and reliable method of transferring data is to establish a serial link between the CPU and a
Windows 95/98 workstation. This can be used to transfer Epson logs, LAS data and any other data that
needs to be emailed or edited under Windows 95/98.

Requirements

In order to set up a serial link, you will need a serial cable (either 9 or 25 pin), a null modem adapter and
some gender changers. The Windows PC will need to have HyperTerminal installed
(Start|Programs|Accessories|HyperTerminal) and the CPU will need to have a CTI card and Qterm
installed.

8.9.1 Cable Setup

On the QNX computer, connect one end of the serial cable to a spare CTI port (preferably $cti1 but not
$cti7 or $cti8). You may need to use a gender changer and 9-25way adapter.

Connect a null modem adapter onto the cable, and connect the other end to COM1 or COM2 on the
Windows PC. On a laptop, the 9pin Male port will be COM1, and on a desktop the 25pin Male or second
9pin male will be COM2. Keep all cables as short as possible as this will make the transfer speed faster.

8.9.2 QNX2 Setup

On the QNX system, all serial port options have to be turned off and the baud rate set to 38400:

stty baud=38400 –echo –edit –etab –ers –edel –igate –oflow –mapcr –paged –iflow –hflow >$cti1

(this command line can be set into the relevant sys.init file in 3:/config, so that the port is always set
correctly.
then type qterm m=$cti1 +s

You should get a blank black screen.

269
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.9.3 Windows Setup

Through Start – Programs – Accessories - Hyperterminal, start up HyperTerminal and double click the
hypertrm.exe icon to define a new connection.

In the ‘new connection’ text box, enter Datalog, select an icon for the link and click OK.

In the next window, ignore the text boxes defining telephone numbers, but in the ‘connect using’ text
box, select ‘Direct to COM1’ or ‘Direct to COM2’ depending on which port your cable is connected to.
Click OK.

On ‘port settings’ screen, set the options as shown below:

Once this screen is accepted, with OK, you will get a blank, white, HyperTerminal screen.

Now if you type some characters on the Windows 95/98 PC, they should be echoed on the Qterm display
and vice-versa. If the character typed on one machine is not exactly on the other machine, then check all
connections, try a different COM port and also check the setup of the Qterm port.

From the Files Menu, you can choose to save the connection and settings. The icon will be displayed
whenever you enter HyperTerminal from the menu.

270
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.9.4 Sending files from QNX to Windows 95/98

On the windows 95 PC Double click on your icon link


From the Transfer menu, select Receive File
Select receiving directory and Zmodem transfer protocol, as shown
below:

Once the details have been completed, select ‘Receive’


On the Qterm screen Press ctrl-a and select “s” to send a file
A menu will appear with 8 protocols. Select Z modem (6).
Qterm will now ask for the full path of the file you wish to send e.g.
/tmp/epsonlog.

Once you have entered return, Hyper terminal should start receiving the data. This will continue until the
file has been sent and the file will be save in the directory you have specified.

271
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.10 Communicating with WellWizard

Realtime communication between QLOG and WellWizard has produced a more flexible approach to
presenting and interpreting data acquired by QLOG, by using the more user friendly WellWizard ‘point
and click’ interface.

This flexibility is achieved by connecting a PC (running WellWizard software) to a QLOG server, via a
serial link. Time and depth information is then sent from the server by using a version of hotback in sync
with QLOG.

The WellWizard software can then be distributed to other PC’s from the WellWizard QNX4 server via a
network hub using cat5 or UTP network cable

8.10.1 Serial Setup

Communication between the QNX machine and the WellWizard server is achieved via a serial RS232
cable. This should be kept as short as possible to eliminate noise and to improve the speed of
transmission.

Connect to WellWizard server incorporating a ‘null modem’ device within the serial line and use a $cti
port for connection to the QNX machine, avoid using $cti7 and $cti8. The software for the $cti port will
now have to be configured:

stty baud=38400 –echo –edit –etab –ers –edel –igate –iflow –hflow –oflow –split –mapcr > $cti4
(or whichever port is being used)

This can be entered into the sys.init.file so that the port will be automatically configured if the machine is
rebooted, or a batch file could be written to incorporate the necessary changes to all serial ports (see
section 7.5.4 for more detail on how to write a batch file).

As previously mentioned, communication to the individual PC’s on the network is via UTP (Unshielded
Twisted Pair) or cat5. This cable is preferred as it is more robust and disconnecting one PC from the
network will not affect the rest.

8.10.2 Interface Setup

Talking to the WellWizard is achieved through the use of the ‘telnet’ programme installed on the PC.

Before starting the QLOG/WellWizard interface, check to make sure that a previous database does not
already exist on the WellWizard server, using QNX4 operating language ‘telnet’ into the server from the
PC:

telnet 207.216.230.180 (TCP/IP address is type of network protocol)


Login: root
Password: root

272
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

To delete the database, type:

QLOGstop
CLEANDB

Then switch off the WellWizard server and restart it.

To setup the interface on the QNX machine type the WellWizard interface administrator:

WWInterface p=$cti4 & (or whichever port you are using)

To start the transfer of time and depth based data a hotback administrator needs to be started, type:

hotback +i &

The QNX machine should now be sending data to WellWizard, one way to verify good communication
between the two machines is to ‘telnet’ and see packets of information being received from the QLOG
server. Use the same commands to talk to the WellWizard server as mentioned above and then type:

QLOGtestint –W1

To exit simply type:


ctrl-c

8.10.3 Basic QNX4 Commands

ls list directory
cd change directory
df –h check for available drive space
zoo compression software
use how to use a program (e.g. use zoo)
pico is the equivalent of ed in QNX2
nettrap check on the settings of the ethernet cards
sin lists all tasks
stty check serial port settings
wwhelp shows system files and commands
network shows who is on the network

273
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.11 Third Party CommunicatiOn WITH WITS

WITS (Wellsite Information Transfer Specification) is a communication format used by a wide variety of
Operating and Service companies for efficient transfer of data from one computer system to another.
WITS communication is achieved through a multi level format varying in complexity and flexibility with
WITS level ‘0’ being the most basic.

A WITS data stream consists of discrete data records. Each data record type is generated independently
of other data record types and each has a unique trigger variable and sampling interval.

The QLOG system uses WITS Level 0 for exporting data and importing data from other service
companies. This system is also used for receiving data from the Gas Wizard. Obviously all exporting and
importing of data is done on a time based reference.

WITS Level 0 , also known as “Intra Rig Transfer Specification”, involves a basic ASCII transfer format.
Data items are identified by a numeric string tying the value to a particular location within a pre-defined
record. A WITS data reference library exists for every paramater used by Operating and Service
companies.

There are 25 pre-defined Record Types, for example, types that Datalog may be concerned with are
shown below:
01 General Time Based - drilling data gathered at regular time intervals
07 Survey/Directional Data
08 MWD Formation Evaluation
09 MWD Mechanical

Datalog will typically supply time based drilling data to other companies (i.e. Record Type 01), but may
be requested to receive a variety of data, perhaps the most common being MWD Formation Evaluation
data (i.e. Record Type 08).

8.11.1 System Setup

• Determine the speed of communication used by third party (e.g. baud 9600).
• Make a connection between $cti6 (or alternative $cti port) incorporating a null modem if one is
not built in.
• Set up third party machine to start transmitting data.
• In /datalog/config, edit the wits.cfg file using the text editor.

274
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

8.11.2 Configuration of wits.cfg file

The wits.cfg file contains information and setups for both sending and receiving WITS data.
Example text lines within this configuration file are shown below:

1. Edit the port for outgoing and incoming data.


# Inport is the serial channel for input
# Outport is the serial channel for output
#
Inport=[1]$cti6
Outport=[1]$cti6
#

2. Set the baud rate for each port.


# InBaud is the baud rate for input channel
# OutBaud is the baud rate for output channel
# NOTE, if ports are the same, baud rate must be the same
#
InBaud=9600
OutBaud=9600
#

3. To send and receive data the user will need to enter the WITS standard reference number
from the WITS Reference Library, and also the QLOG destination record number for the
data (i.e. the 1st column in display.txt).

4. WITS references will always have a four digit number. The first two digits represent the pre-
defined record type (01 – 25); the second two specify the element, or parameter number
within that record type.

For example, Datalog will always SEND time-based drilling data, 01


Within that record, Hole Depth is 10, and Total Gas Chromat is 40, for example (there are a
maximum of 40).
Therefore, the WITS codes are 0110 and 0140 respectively.
If we were receiving SP (Spontaneous Potential) MWD data, the WITS code required would
be 0805 – 08 for MWD Formation Evaluation Record Type, and 05 for SP.

275
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

5. The command string also requires instructions as to where data is coming from, or going to,
and in what units it is being transferred in.

A full SEND command string would contain the following 5 fields:

WITS display.txt Code Unit Reference Transfer Name


Code (ie column no.) (from units.txt) Reference

If no unit reference is entered, metric units will be the default. If other than metric is
required, you need to enter the specific reference.
For example, with Standpipe Pressure (Type 10 in display.txt), the default units would be
Kpa. For any other unit requirements, you need to determine the code from units.txt:

Under reference 10 in units.txt - 0 – Kpa


1 – PSI
2 – kg/m3
3 – bar

Nothing needs to be entered in the Transfer Reference field either – the system will then
assume reference 1.0, the standard.
To transfer Standpipe Pressure in Kpa, the wits.cfg file would look like:

#
SEND
#
0121 49 Standpipe Pressure
#
# Rate determines the number of seconds between transmissions
#
Rate=5
#
where 0121 is the WITS code
49 is the column reference for SPP, the first number in display.txt
If PSI was required, then a “1” would be entered in the 3rd field, between 49 and the
name.
Additional parameters would entered on new lines.

276
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

6. A similar format is required to receive data, but the second field will now represent the
column number where we want the data to go. In otherwords, when we are receiving MWD
data, it will be stored in one of the User-Defined columns in the database (columns 305 –
312).

For example, to receive SP data,

Witscode = 0805
User defined Column 4 (e.g) = 308
Default units are mV

The wits.cfg file would look like: -


#
RECV
#
0805 308 SP
#
Timeout determines the number of seconds until receive has failed
#
Timeout=5
#

Once the configuration has been set up correctly, the port needs to configured. Typically, this involves
changing the baud rate and switching all the options off:

stty baud=9600 –ers –edel –igate –oflow…………> $cti6 (or alternative port)

The WITS administrator will now need to be started:


wits wits.cfg & (where wits.cfg is the name of of your wits config file).

On a QLOG display screen, it should be possible to see the values being sent by the third party software.
These should also be entering into the desired channels as previously specified. Please note that the
values cannot be calibrated as they are real values, not counts.

277
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9. TROUBLESHOOTING

278
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1 GENERAL SOFTWARE FAILURE

9.1.1 House Cleaning

To try and prevent failures from occurring, there are certain operations/precautions that should be
performed on a regular basis.

• Keep the hard drive as clear as possible, ie keep as much free disk space. Therefore, on a regular
basis, remove any unwanted files, in particular large ones. This is likely to include:-

database copies or those files created by dbget or dbfixer - if these are no longer
needed, remove them. Just keep current versions if necessary.
time files archive them and copy to floppy disk. Just keep the last few days
on the hard drive.
logs printed to file backup and/or remove
out of date report files backup and/or remove
/datalog/..qlog..

The typical directories that you are going to clean in this way will therefore be user directories, the
temporary directory and 3:/datalog/dbms.

• In a similar way, if you have a second node with an automatic daily backup being performed, it is
very important to keep node 2’s hard drive clean. It is likely to become full even faster than node 1
if you are doing daily operations such as dbgets or printing logs to file. If node 2 becomes short of
disk space, the server, node 1, will obviously be affected.

• Particularly on the longer wells, keep a regular check on disk space available by using the query
command.

• For larger files, keep a regular check on the number of extents. The more fragmented that a file
becomes, the slower the system will become. This is done by using the files +v command.

• Perform regular system checks with chkfsys as a matter of course. This should be done at the start of
jobs, and during the course of a well where possible, especially on projects lasting several months.
This procedure will check for, and correct, any corruption on the system. Should a file be corrupt and
the system is unable to fix it, then you will have to zap that file and rerun chkfsys to recover the lost
blocks and rebuild the bitmap.

• When performing system shutdowns, ensure that you close down all programs and shut down all
administrators. Not doing this will be inviting files/programs to be left open or busy, or even worse,
to become corrupted.

However, things may not always go according to plan ................

279
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1.2 Database administrator

There may be times when you are unable to start the database administrator. This is more likely at the
beginning of a job. The cause of this will likely be that the dbdepth.crc and dbdepth.index files are
incompatible with the depth database, or are present from a previous database. These files should be
removed, or if you are unable to remove them, they should be zapped. You will then be able to start the
database administrator and on doing so, the index and crc files will be created automatically for the
current database.

You should check that dbdepth.lmap, dbdepth.bmap and dbtime.bmap are present in both
4:/datalog/dbms and 3:/datalog/dbms, otherwise the system will not work. If one or more is missing from
either directory, then it can be copied from the other directory.

The moral of this story is that users should not be removing any files that they are unsure about. The
bmap and lmap files will always be on the system by default, so this problem should never occur.

9.1.3 Programs hanging up

If a particular program simply hangs up and locks up either the current consol or the entire node, you
should always try to slay the program before resorting to a reboot. This is especially valid if the hangup
is on node 1.

If you do not know the actual name of the program, then perform a tsk to see which programs are
currently running - it is normally easy to determine which is the program that has hung up.

If you can do this by switching consol, then it is a simple matter of issuing the commands:

tsk followed by slay program_name

Should this not succeed, you can try the same process but using the programs Tid number. The command
would then be
slay i = 3b03 for example.

Should the whole node be locked up, then you should try slaying the affending program from another
node. The form of the commands would then be (assume node 2 is frozen):

tsk n=2 followed by slay program_name n=2

You should also check the State that tasks are running in. This information is given when you run the tsk
command.

It is normal for the first 5 programs listed to be READY, ie task, fsys, dev, idle and net. Of the
remaining programs listed, whether they are run by the system or by the user, the state should be REPLY
or RECV. If you see a program here as READY, this will cause you system hangups.

280
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1.4 System slow and sluggish

It is quite obvious if the system starts to slow up - you will notice that certain operations will take a lot
longer than normal; you may actually hear the hard drive whirring away as it is completing tasks.
There could be several causes which should be investigated:-

• As discussed above, large fragmented files will cause the system to slow so you should perform a
files +v to check larger files for the number of extents.

• Check the size of the ..qlog.. file. This file can get very large and slow the system. If this is the case,
simply remove it. A new file will automatically be created.

• Hard drive corruption should be checked for by running chkfsys.

• You should check that only current servers or drivers are running. This refers to plot servers and
calcimeter drivers for example. Should these programs not be exited properly, the servers/drivers
may be left running. As new ones are subsequently started, you will get several running at the same
time with some of them not actually servicing a plot etc. The extra, unused ones should be slayed. If
you do not know the actual Tid number of the plots you are currently running, you may have to slay
all servers and then restart the required ones.

• You can run the sac command to see which priority is taken up the processing time. If you are
wanting to run another program, you can set a higher priority so that it gets precedence. You do this
with the command pri=7 for example. Any program you then run from that consol will run at priority
7, until you change it again (the default is 8). Alternatively, if you can determine which program is
taking up the processing time, you can reduce it’s priority by entering the following command: slay
program p=9 for example. Programs with a higher priority will then take precedence.

9.1.5 Unable to access certain files

This most likely applies to files such as databases. Firstly, check that the required administrators are
running. If they are, then the problem is almost certainly that the file has been left busy for some reason,
notably a system crash, so that the file was not closed properly. If you are checking a particular file, you
should change to its directory and issue the command:-

files +b or files +v (a busy file will be shown by a capital B)

Should you just be doing a general check for busy files, you should change to the root directory and issue
the files +b command.

Should you have a busy file, use chattr /directory/filename s=-b to unbusy it.

Similarly, fopen can be used to check for tasks that are currently running. Because a system crash is the
most likely time for problems to occur, the user should take care when performing routine
shutdowns/reboots ie make sure that all files and programs have been properly closed and that all
administrators have been shut down. It is even worth taking the time to run fopen before switching the
computer off; the only open tasks should be passadmin and task.

281
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1.6 Procedure in the event of uncontrolled shutdowns

• Before rebooting, ensure that there is no communication between the computer and the
chromatograph:-

If you have an m200 with a front control panel, either put the chromat into local mode, or
disconnect the serial cable.

For an m200 without the control panel, simply disconnect the serial cable.

• If time allows, run a chkfsys to ensure that no corruption has occurred.

• Check the system for busy files or open tasks

• Before starting the m200admin, ensure that a rogue m200admin isn’t running. (in normal
operations, two m200admin’s will be shown when you run tsk. It has occasionally been known for
one to remain running after a crash or administrator shut down. This has to be killed before restarting
m200admin. ‘dau_kill’ may not be enough - a further reboot may be required to kill it)

9.1.7 Identifying causes of system crashes

• Check the ..qlog.. file stored in 3:/datalog. This file keeps a complete record of all events happening
on the system, whether performed by the user or by the system itself. By checking events
immediately prior to the crash may yield information as to the cause.

• Any program that fails or crashes will automatically be copied to the 3:/dumps directory. This
program should be copied to disk and forwarded to the programmers who can then investigate the
problem. NOTE that this dumping of programs will also occur if a failure is caused by user error, so
be sure that this wasn’t the case before reporting the program as faulty.

With all program failures, record a detailed account of the circumstances surrounding the failure; what
tasks were running at the time; what exactly you were doing at the time of the crash; rig status, ie
drilling/tripping/reaming/off bottom etc; what actions you took to remedy the fault.

This report, together with copies of the ..qlog.. file and contents of the 3:/dumps directory, should then be
forwarded to your operational base for analysis.

282
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1.8 System hang up on reboot

It is a good idea to have the “verbose” option enabled in the sys.init files so that when the system is
rebooting, all of the commands in the sys.init file will be displayed on screen as they are performed. You
can therefore see where the system is hanging up - it would normally be something quite simple like not
having an ‘ampersand’ at the end of a command so that the consol is taken up by that particular task
when it is started. In this case, the system hasn’t actually hung up, just the consol is taken up - you can
therefore switch to another consol, login and seek the problem.

By running tsk, you can see which program is running on the other consol, stop it with slay, and correct
the fault in the sys.init file.

Should the hang up be genuine, then there is no problem for any other node on the network - you can
simply edit the appropriate sys.init.file and reboot. However, if node 1 hangs up, there is nothing you can
do about it - you will have to redefine node 2 and boot from there.

9.1.9 Hard drive failure

Should the hard drive on node 1 fail, the only recourse is to switch hard drives or nodes (this is assuming
that you have a 2nd node). The procedure is straight forward:-

Reboot Node 2
Escape into the network configuration card
Redefine as node 1 and to boot from disk rather than the network.
Reboot

Obviously, this is only of any benefit if you have been backing up configuration files and using hotback
to back up the databases.

The original node 1 should then be redefined (as node 3, for example) and run from the network.
Remember, that effectively, this node no longer has a hard drive.

The system will then run principally the same, apart from the following changes.

dau_admin should be run on the ‘original node 1, ie CPU’ since this is where the DAU is
attached to. If it has been redefined as node 3, then you would start the administrator as [3]
dau_admin &.

You will have to redefine ports of any peripheral equipment still attached to the CPU ie printers,
chromatograph etc

You will no longer be able to run programs such as hotback, or scheduled back up to node 2 if
you had been doing so previously.

283
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.1.10 Checking Network Communication

Should strange things be occurring on the network; slow updates, bogus data, program crashes etc that
cannot be explained by any of the things already detailed, you should check that the communication on
the network is normal.

You should use the netstats command and pay particular attention to the following:-

Min Packet Queue should never show 0 - if it does, data is being lost
Network Rx Errors should always be 0 - if not, it means that corrupted data is
actually being accepted by other nodes.

These are very, very, very rare! but should you experience them, the fault may lie with electrical
interference. You should refer these faults immediately to your operations base.

284
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.2 GENERAL “USER ERRORS” OF SOFTWARE

System Decimal Settings.

If data or the calculated derivation of data is incorrect by a factor of 10, then the system decimal setting is
incorrect. This should not normally be a problem since these settings are default on the system and
should never be changed by the user.

Database - Recalc Parameters

To save on processing time and to provide speedy access to the database, non essential calculated data is
NOT updated automatically in the database. Therefore, when you view the parameter in the database, you
will see only zero’s. This is NOT an error, but simply means that you have to run the recalc option (F9)
to see the values. Use a screen refresh to see the updated data.

Viewing Data - User Defined Units

The convert program enables realtime conversions, for any available unit, to be made. If your user
preferences are in imperial units for example, yet the values displayed are in metric, it simply means that
converts is not running. Should you make a change to your user units, the particular program that you are
in will need to be refreshed in order for the change to take affect. For example, if you are in a realtime
display, change consol and make a unit change, then return to the consol with the display, the units will
not have changed. You will have to escape from the display and re-enter.

Command Paths

If, after typing a command or trying to access a program from the QLOG menu, a message returns that
the "command not found", it may be because the directory path of where the system has to look for the
command, has not been set or has been lost somehow.
Before investigating this, you should ensure that you have entered the correct command, ie that you have
spelt it correctly. Do this by listing the contents of either the /cmds (for QNX commands) or the
/datalog/cmds (for QLOG commands) directory. If your command is correct, then you should check the
path setting.

The path is set within the sys.init files.

If you type “path ?”, the current path will be displayed. A typical path may look like:-

path !!/cmds/!/datalog/cmds/!/Quser/cmds/!

285
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Batch Files

If you create a batch file, then you have to ensure that the following are done in able for it to be run as a
command:-

Change attributes and permissions to make it executable

If only you are going to use it, then the file can be located in your user directory in order to be executed.
However, if you want any user on the system to be able to use it,

then firstly you should ensure that the permissions are set correctly
secondly, you should copy the file to the /user/cmds directory.

Mathematical Errors

"Exponential or logarithmic function error" - This is seen occasionally after a reboot, or after adjustments
have been made to QLOG configuration files. This is caused as a result of a nonsense mathematical
calculation made by dau_admin. It is usually caused by incorrect hole or pipe sizes or incorrect
"equipment" settings.

The user should therefore be careful when making changes to these files. For example, ensure that your
hole size matches the bit size in the bit database; ensure that no outside pipe diameters are greater than
the hole size etc etc.

Incorrect lag calculations

These are usually a direct result of the user entering incorrect values in the configuration files. Therefore,
carefully check the values entered in the hole and pipe profiles, and also the values entered in the pump
output file. If the lag calculation is absurdly incorrect, check in the equipment table that no value has
been entered in the Air Drill overide facility.

Logs or plots

Crashes at the start usually have a similar cause. The vast majority of cases are simply caused by
incorrect scales. This is most common when using log scales - never start a log scale at 0, it will normally
be a factor of 10; ensure that the number of divisions entered is equal to the number of cycles defined by
the scale range.

eg if the scale is 0.01 to 10.0%, you should select 3 divisions.

Another cause of plots crashing is the use of the ‘text type’ in the chart configuration. This should only
be selected if you wish to print parameter values as well as, or instead of, plotting them. You should not
select this function when you have selected a ‘comments’ type parameter from the database. The system
knows by default that this will be text, so you should leave the chart configuration as the default ‘linear’.

286
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Windows or mouse not working

99 times out of a 100, these problems stem from the command entered in the system initialization files:-

Windows - check that the correct driver has been specified for the video card.

qw.vga & is the normal default for CPU’s and 2nd nodes
qw.vga_bios atiwonder, 1 & may be a specific type for CPU’s

KNS’s may use the specific qw.vga_bios oakland, 1 &


Newer models use qw.vga16 g=2 m=5 &

Should you be certain that the driver specified is OK, then indeed, the video card may need replacing.

Mouse - again check that the correct driver has been specified, whether bus or serial, and for serial mice,
check that the correct port has been defined.

Bus mouse mdrv microsoft (inport) bus mouse int=3 &


(note that com2 in the CPU bios should be disabled if you are using a
bus mouse - this will normally be done when the system is set up prior
to going to the field)

Serial mouse mdrv microsoft serial mouse (200dpi) dev=$mdm &

If this is correct, then you may need to check that the serial port isn’t ‘jammed’, ie the buffer overloaded.

You can clear this by using the command qterm m=$mdm +s

This command will ‘steal’ the port from the mouse, and in doing so, clear the port. Check again to see if
the mouse will function. A final check is to swap the mouse with another that you know is working. In
this way you are checking both the port and the mouse.

NB
Should windows freeze up on you, you do not have to reboot the computer. This is especially valid if this
happens on node 1, or if you are only using 1 computer.
You can escape from windows by using the following keys:-

Ctrl_Print Screen

Having done this, you should ensure that all windows related tasks, and programs that were running in
windows are shut down (eg plots, screen plots). You should use the windows down command or use slay
to shut down individual programs.

287
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.3 HARDWARE FAULTS

MOST WELLSITE FAULTS REQUIRE SIMPLE SOLUTIONS YET TEMPT USERS TO LOOK FOR
COMPLEX ANSWERS.

ALWAYS DOUBLE CHECK THE SIMPLE SOLUTIONS BEFORE PRECEDING FURTHER.

A SECOND OPINION WILL OFTEN REVEAL THE OVERLOOKED "OBVIOUS" ANSWER.

9.3.1 System SetUp

Proper Practices

• Sensors should be connected at the junction box before connecting multicores

• DAU/Elcon should be powered down before attaching multicore

• Ideally, the DAU/Elcon should be powered down before any sensors are disconnected or connected
at the junction box during the course of a job. Obviously, this is not practical if the rig is drilling, so
you should be very careful not to cause a short whilst working on connections - ensure the wire ends
do not come into contact with each other, or anything else.

• If checking the seating of, or replacing, microchips, make sure that you wear an anti-static bracelet
and/or earth yourself. These chips are sensitive to static and easily damaged if touched by hands with
no precautions taken.

No Signals on any channel

• If you have no signals coming through to the test mode, firstly ensure that you have the DAU
switched on, dau_admin running, and all cables between DAU and CPU properly attached. If so,
the problem is simply going to be that the multicore cable is not screwed in far enough. Check at
both the junction box and DAU unit. The best procedure here is to disconnect all cables, then
reconnect them all.

Intrinsic (Elcon) System

• Should you have incorrect but the same signals (eg 300 to 400 counts) on each analog channel, then
the problem is with the DAU not having reset itself.

To fix this:-
switch off the DAU
disconnect and reconnect the co-axial cable from the DAU card on the CPU
switch on DAU

288
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• Depth channel continually produces counts when there is no movement or even when the sensor is
actually disconnected. The problem here is with the multiplexer chip (CD74HCT541E) to the right of
the barriers. The chip may simply not be seated correctly or may be damaged. This can be
investigated by swapping with the depth direction chip immediately below (they are the same). If the
chip is damaged, you will now have depth ticks but no direction - this means careful vigilance and
use of the invert binary sensor facility until the chip can be replaced.

• Analog sensors are showing 4 to 20mA, but producing no counts in test mode; low end counts are
abnormally high; minimum to maximum count range is abnormally low. All of these symptons are
produced by a faulty analog multiplexer chip which will need replacing. The chip is CD4051BCN
again located to the right of the barriers.

• Restricted range of analog sensor counts, as described above, may also be as a result of a faulty chip
on the DAU card inside the CPU. The chip, MM74C901N, will need replacing.

9.3.2 Faults during normal operations

Sensor or Circuit Failure?

Here you should check the test mode in QLOG. If you are showing 4mA, then you know that the current
loop is intact and that the fault is due to signal loss from the sensor. If you are showing 0mA, then you
are dealing with a broken circuit.

Circuit Failure

The way to go here is a methodical approach and a process of elimination.


Initially, try to identify whether the fault is coming from within the logging unit or external to the unit.

Firstly, the barrier can be checked simply by swapping with a spare, or other barrier, if possible. If you
still get no signal, then you know that the barrier is okay and the problem is external to the unit.

When swapping barriers you have to be careful that you are using the correct type. This means either
digital or analog for a normal DAU, but is more involved with an Elcon system where there are several
different types - check the number on the barrier and configuration sheet.

Also, when swapping cards or barriers, you have to be careful about causing a short. Ideally, you should
switch the DAU off before removing barriers but obviously this will not be practical if the rig is drilling
ahead and you are recording data.

If you are unable to swap barriers, you will need to test current and voltages. Disconnect the sensor wires
from the hazardous side of the barrier.

For an analog channel

Connect a spare sensor or a loop calibrator to the hazardous side of the barrier, thereby completing the
current loop. You can then induce a signal from the sensor/calibrator and check the readings coming
through on the test mode. If the signal is coming through, you know that the barrier is okay. At the same
time, you can check that you have a voltage by connecting your voltmeter in parallel across the hazardous

289
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

side terminals. If necessary, you could also connect an ammeter in series within the loop to check the
current signal.

Remember, you should be reading between 4 and 20mA, and 24v.

For a digital channel

You have to create a ‘switch’. Simply connect 2 wires to the hazardous side of the barrier. By touching
the wires, you complete the circuit and this should result in a pulse. This again, can be checked by
viewing the pulses in the test mode.

Elcon ‘3 wire’ barriers (torque, temperature, flow paddle) cannot be tested in the same manner, but if the
barrier fails, the signal returned will be maxed out. You will therefore see 4095 counts in the test mode.

If you have signal failure on all channels, you are going to be checking the connections of muticores; or
that power is still being supplied by the DAU - check the green LED’s and fuses.

External to the unit

Firstly, check the obvious; connections at the junction box and at the sensor.
You are then going to check ‘loops’ in the circuit.

Check the loop between the unit and the junction box. Disconnect the wires on the unit side of the Jbox
and put your loop calibrator/signal source in series to complete the circuit. You can then check in test
mode as to whether you are receiving the signal, or you could also place an ammeter in series and take
your reading from there.

Check the loop between the Jbox and sensor, by reconnecting the wires at the Jbox, then disconnecting
the wires at the sensor. Again, place your calibrator in series to complete the loop (the loop is now
sensor-unit, but should there be a fault you know it is between the sensor and Jbox because you have
already eliminated the remainder of the circuit) and test for your signal as described above.

Should you still be getting a signal, then the faulty circuit is originating from the sensor, so you are going
to be checking internal wiring/connections.

Sensors

It is unusual to have electronic sensor failures. Sensors usually cease to function when they have been
mechanically damaged or have wiring problems. 95% of failures can be associated with wiring faults,
bad connections, trapped or broken wires, multicores not screwed home etc.

Internal DAU Cards

These rarely fail. They are best adjusted only by Technicians at the operations base. The voltage
thresholds will not normally change during normal wellsite use. If possible, replace the card or use an
alternative channel configuration in the software, rather than attempting to “fix" the cards.

DAC Card

Again, this rarely fails. The only repair is unit replacement.

290
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Computer Cards

Again, these rarely fail. If you have spares, you can make replacements to try and identify which card is
faulty. For immediate action however, you are best to swap over and use Node 2 as the principal server,
and only try to effect fixes at a time when logging is not required.

Hard Drives

Again, these rarely fail, but must be recognised as a mechanical device and thus at some point in time,
may eventually die. Software backups are therefore essential. The immediate action would be to use the
alternative server (ie Node 2), and attempt to boot the failed unit off the new server. Try to access the
"failed" hardrive and identify the problem (you may have to mount it)

ALL HARDWARE FAULTS, SUSPECTED FAULTS AND/OR THE CONSEQUENTIAL ACTIONS


TAKEN AT WELLSITE, MUST BE RECORDED ON THE APPRORIATE REMEDIAL ACTION
FORM AND RETURNED TO THE OPERATIONS BASE SO THAT QUALITY CONTROL CAN BE
MAINTAINED.

291
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.4 DEPTH RELATED PROBLEMS (crown sheave sensor)

The vast majority of crown sheave depth related problems are the result of incorrectly aligned targets.

Be sure that the sensor is mounted in a way that ensures that the targets are counted correctly. This means
that each target should be large enough to fully ‘accommodate’ both sensors at the same time, and that
the spaces between targets are large enough for the same reason. When installing, check that every target
is producing a pulse on both sensors and check with the wheel going in both directions. If any
target/sensor ‘proximity’ is marginal, either replace/reposition target or realign sensors.

Be sure that a target has not been damaged or come adrift during drilling. This will only worsen and
produce erroneous or no pulses.

Use an appropriate number of targets in order to get the best depth resolution possible. This may have to
be as few as 2 or 3 targets for small sheaves, but preferably, you should install at least 5 or 6.

Always use the fast sheave for mounting targets and locating sensor because this wheel will rotate more
per unit of vertical movement of the blocks. The fast sheave will normally be located at one end of the
sheaves, or offset from the others, and is usually a bit larger.

Ensure that the targets are being sensed correctly and producing the correct sequence of pulses. If not, the
direction could well change intermittantly. Also ensure that there are no spurrious activations of the
proximity sticks.

The order of activation is:

Prox stick 1 Prox stick 2

OFF OFF
ON OFF |
ON ON | One cycle:-
OFF ON | One depth tick
OFF OFF |
ON OFF
ON ON
OFF ON
OFF OFF

This sequence can be routinely checked by viewing the LED lights on the depth board which is normally
mounted with the DAU/Elcon unit. This saves trips to the crown ! (in some cases, this board may be
housed in the small junction box at the sensor)

A change in direction will occur when proximity sensor no.2 is activated first in the series.

The sensors should be about 5mm, maximum 10mm, from the target material when in use. The counts
will then be seen in test mode as will the direction changes on channel 9.

292
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The depth itself will not work properly unless the hookload is operational and calibrated. This is
required for the computer to detect in/out of slips.

If depth inaccuracies are seen over a connection ie the computer is still a few feet off bottom when we
are in fact drilling, or the computer reads on bottom when we are still a few feet off bottom, then the fault
will be that one target is not being sensed in both directions.

Inaccuracies are often seen during trippiing - sometimes the pipe is being moved so fast that the sensor
simply cannot keep up with the number of pulses - this is often worse in one direction than another. This
is rarely seen during slow tripping or normal drilling operations.

Possible problem with DAU cards (not Elcon).

Occasionally, counts and direction changes are being seen in the test mode but not in the realtime
display. This means that the targets are being detected, but not producing a strong enough signal to
register on the system.

i) The sensor needs to be slightly closer to the target material

ii) The DAU card thresholds may need to be reduced to increase their sensitivity.
(This does not normally occur, but could save a visit to the sheave to reduce
the gap between sensor and target material)

You should connect your voltmeter across the Ground and TP1 terminals, and adjust the voltage on the
P1 terminal. You should read 7 volts.

293
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

9.5 CHROMATOGRAPH

Generally, most ‘faults’ with the chromatograph are due to user error and easily traceable. Should the
chromatograph actually break, there is little that can be done in the field. The unit will normally have to
be returned to base and replaced.

Genuine problems with columns can often be as a result of particles entering and causing blockages,
therefore when transporting chromatographs, ensure that all inlets are covered.

Status reads unplugged ensure chromatograph is switched on


ensure m200 administrator is running
ensure correct port is defined in m200setup

Ensure the port has the correct settings, and is connected via the special null modem serial lead used
by the chromatograph:

stty baud=9600 par=none stop=1 bits=8 >$cti1

Filaments will not turn on This is a problem with helium pressure - the filaments will not turn on if
the pressure at the column head is less than 5psi. Therefore, check that
bottle, regulator, leaks etc to ensure that helium is reaching the
chromatograph at the correct pressure.

Occasionally, when first setting up the chromatograph, the filaments do


not turn on. This will normally just require you to resave the method
with filament setting on.

Slow ‘drop off’ of gases Firstly check that you have good sample flow through the perchorate
filter and change if necessary. If this is okay, the problem may be due to
the sample not being pushed through the columns at a high enough
pressure. Normally, you can expect columns to clear in a couple of
injections. Should it be taking several minutes or longer, the pressure in
the columns is too low.
Should it be occuring on both channels, then the fault is probably with
the helium supply - check the regulator and helium line and filter for any
blockage. Should it be occurring on only one column, then the fault is
internal with a blockage in the particular column. Check the sample
exhausts at the back of the chromat to confirm this. You should feel a
little puff after each injection. Should you not feel this, then there is a
blockage.

No gas on one channel This is probably a more serious case of the above, when the column has
been completely blocked. Another possibility is the autozero. Should
your base line on the chromatogram be offscale, you should check the
value of the autozero in m200setup. If it is +/- 450 mV, then the column
needs replacing.

294
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

The worst scenario is that the injector is not working – the chromat will
have to be returned to base if this is the case.

No gas on either channel It is unlikely that both channels will become blocked, so the blockage is
likely to be before the chromat - check for restrictions in the sample
tubing; Check that there is flow through the perchlorate filter - this may
need changing or may be packed too tight to allow sufficient flow; the
unlikely final possibility is that the filter inside the sample port has
become plugged.

Generally spurious readings Strange readings, abnormal extra gasses, peaks moving etc etc, can
normally be put down to incorrect settings of pressure and temperature.
You should check that the CHP Scale, Temp Scale and Offset are set
correctly for that particular column. This should always be checked as a
matter of course when first setting up the chromat.

• When you run the administrator, "m200admin &", two m200admin tasks will appear on the "tsk" list.
If on using dau_kill, one task remains, you will have a ongoing fault, as the next startup of
m200admin will add a further two m200admins tasks and thus you could incorrectly have 3 in total.
A reboot may be the only way to remove this rogue task.

• You should avoided booting the computer while the chromatograph is on line. For the chromatograph
with a front control panel, put the chromat into local mode. For the chromat with no control panel,
simply disconnect the serial cable before rebooting.

295
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10. DATA UNIT PROCEDURES

296
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.1 EXTERNAL RIG UP

This is a general guide only, intended to cover all of the necessary procedures required to prepare a unit
for operation. Each individual unit will obviously vary in what exactly is required.

The order in which procedures are detailed here is a sensible order, but again, is not intended to be
absolute. External rig ups in particular, are largely dependent on rig operations at the time.

• Rig up all of the external sensors and site the junction boxes. When positioning the sensors, take note
of the points highlighted in Section 1 of this manual (eg for pit and mud sensors, H2S sensors etc).
Make sure that the important sensors are rigged up first when time is short e.g. depth, pits, gas, so
that, even if the rig up can’t be completed before drilling commences, the essential service can still
be provided.

• When siting the junction boxes, make sure that the multi-core cables will reach back to the unit. DO
NOT connect the multi-cores to the DAU until all Jbox wiring has been completed. There will
normally be two junction boxes, both of which can usually be sited in a central position at the pits; ie
Jbox 2 will take most of the pit and mud sensors; Jbox 1 will have to take the depth and the pump
strokes, so that the pits are still in a central position.

• If using an agitator gas trap, install the trap assembly and run the power cable and two polyflow lines
back to the unit. At least one spare line should always be run so that they can be quickly swapped
over in the case of mud entering the line, excess moisture, freezing etc. Make sure that you mark the
lines, at the unit and at the gas trap, so that they are easily identified.

• If using the GasWizard, refer to the User’s Manual for full installation instructions. Mount the probe
and explosion proof unit, and run the power and WITS communication cable back to the logging
unit.

• For all cables and lines run, make sure that they are run correctly and secured neatly with cable ties -
along cable trays if possible; if not, certainly route them above ground level to minimise the risk of
damage. This not only minimises potential problems for yourselves but also leaves a good impression
with the contractor and the client. A sloppy rig up will leave a bad impression of unprofessionalism.

• Connect the sensors at the Jboxes, paying attention as to whether the sensors are 2, 3, or 4 wire
sensors and whether the shield is required. Make sure that the individual wires have clean contacts
and are connected to the correct terminals (ie red ‘+’, white ‘number’, black (-) or ground). Make
sure that you connect the sensors to the correct channel numbers by following the unit configuration
sheet, or if there isn’t a prepared configuration, ensure you record it as you go along.

• You should leave copies of the configuration sheet in each junction box and in the unit.

• Make sure all C-clamps are well greased to prevent seizure and allowing for an easy rig down.

• After confirming with the electrician or mechanic, get the main power cable connected and run to the
unit.

• Run co-axial cables if you are going to be setting up a network.

297
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.2 INTERNAL RIG UP

BEFORE TURNING THE POWER ON TO ANY PIECE OF EQUIPMENT, CHECK THE POWER
SUPPLY REQUIREMENTS AND THAT THE POWER SUPPLY IS COMPATIBLE! IS THE
VOLTAGE CORRECT? IS THE FREQUENCY COMPATIBLE? IS THE EQUIPMENT PROPERLY
GROUNDED? IF IN ANY DOUBT, CALL TECHNICAL SUPPORT.

In cold climates, allow all equipment to warm up prior to switching on.

• Connect the interfaces from the DAU to the CPU. This interface comprises the following:-

Ground

Sensor - the internal


gas system

Power - power to the


boards or barriers

Co-ax - analog signals

60 pin ribbon - digital


signals, MUX
board and multiplexers

• Set up the CPU with monitor, mouse and keyboard.


• Connect the multi-core cables to the DAU unit.
• With switches ‘on’, connect CPU and DAU power cables to the UPS (uninterrupted power supply).
Switch on the UPS. The CPU and DAU will now power up.

NB: the UPS has the facility to run 4 power cables; these would normally be occupied by the DAU, the
CPU (including monitor) and the m200 chromatograph. The 4th one could be used by the active hub or
perhaps a printer.

Once the computer has booted, login and start dau_admin (dau_admin &). Make sure you can access
the QLOG system. Check that windows and the mouse are working; if not, check the sys.init file for
correct drivers and port.
With the computer okay, you are ready to start configuring the system, calibrating sensors and hooking
up the rest of the unit equipment.

298
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.3 CHANNEL CONFIGURATIONS AND CALIBRATIONS

• Ensure dau_admin is still running; start the convert program (convert &).

• Enter DAU (non-intrinsic) or Elcon (intrinsic) in equipment.

• Enter Sensor Configuration and make sure that each sensor, analog and digital, is configured
correctly according to the configuration sheet.

• Confirm with the drilling engineer or geologists as to the units that you should be recording
parameters with, enter User Unit Preferences and ensure that each recorded and calculated
parameter is set accordingly.

• Enter Test Mode and confirm you have signals from the sensors

• Enter Analog Calibration and enter what calibrations you can (see Section 1 for calibration
procedures) :-

Mud Density 500 to 2500 kg/m3 *


Mud Temperature 0 to 100 C *
H2S 0 to 100 ppm
Mud Conductivity 0 to 100 mS
Pump Pressure 0 to 5000 psi *
Casing Pressure 0 to 10000 psi *
Ambient Gas 0 to 5%

* These can be checked and confirmed at a later stage

Pit Levels according to the rig values or your own measurements

Mud Flow and Torque - wait until they can actually be measured

Depth and Hookload if possible- enter ticks/100m in the Equipment table and
after the hookload calibration, set your
threshold values.

• Ensure that the ‘direction’ is correct. If not, switch Channel 9 in Invert Binary Sensors as a short
term solution. Go to the crown and ‘turn’ the prox sticks around for a long term solution.

299
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.4 COMPLETING THE SYSTEM SETUP

• Enter Printer Controls and ensure that the printer ports ($lpt and $lpt2 for node 1, any others that
may be connected to other nodes) are defined and that a Report and Local printer are also defined. If
these need to be added to the menu, use the command:-

prt_ctl -l

• Enter Pit Setups and define any Pit Totals within the system - you should confirm with the mud
engineer or derrickman as to what system they are going to be using.

• Check your text display screens and make any changes necessary in the Create Display option.

10.4.1 Completing the Equipment Setup

• Connect the plotters to the parallel ports on the CPU. Check that they are functioning by performing
the Self Tests in both printer and plotter modes. Ensure that there is communication with the
computer by copying a text file to both destinations.

• Set up the second node with monitor, keyboard and mouse. Ensure that it boots and that windows and
mouse are working.

If there are going to be no other nodes, connect node 2 to node 1 directly with network cable,
reboot node 2 changing the network file and ensuring that it boots as node 2 from the network.

If other nodes are going to be used, connect all nodes to an Active Hub. Boot up each node
from the network and ensure that all are functioning correctly.

300
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.5 SETUP AND CALIBRATION OF GAS SYSTEM

N.B. If using a GasWizard system, refer to the User’s Manual for installation, calibration and operational
instructions.

• Set up and calibrate the chromatograph (see Section 4 for full procedure).

1. Start the m200admin program


2. Enter m200setup and define the correct serial port
3. Attach metal tubing to regulator and blow out with a little helium
4. Attach He tubing to the chromatograph
5. Turn on regulator to 80 psi
6. Connect chromatograph to the UPS, switch on and connect serial cable
7. Check method and setups, especially the scales and offsets
8. Calibrate from windows

• Calibrate Total Gas Sensor

1. Check that CC switch point etc are set correctly in equipment


2. Switch on the sample pump on the front of the CPU
3. View the counts in testmode, when the signal is stable, zero the CC trimpot on the front of the CPU
so that you have 0095 counts (this is the 0% calibration)
4. Apply your test gas (normally 2.5% methane) to the sample port at the back of the CPU maintaining
a constant flow of 5 scfh on the flow gauge. The final, stable reading (counts) will be your high end
calibration.
5. Repeat this process for the TCD detector using high end gas (normally 99% methane)
6. Check the operation of the CC detector (switch point and shut off point) when applying the high end
gas.

• Calibrate the internal H2S sensor. For zero gas, check the number of counts in the test mode. Your
maximum calibration should be 100ppm. Check this accuracy by applying your test gas at the sample
port, maintaining constant pressure as above.

• Plug the polyflow gas line into the back of the CPU, switch on the sample pump and check that you
have good suction at the gas trap.

• Check the time it takes for gas to go from the gas trap to the mudlogging unit (butane from a cigarette
lighter is ideal for this, ie its cheaper than calibration gas). You should use the Total Gas Sensor for
this, rather than the chromatograph, since it is a continual detection. Enter the time, in seconds, as
Gas Pump Time in the equipment table.

301
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.6 PREPARING THE SYSTEM

For the time being, shut down any administrator programs that may be running.

• Ensure that the time zone offsets and system time are set correctly (Section 6.4)

• Remove any old or unwanted files from the system

eg 3:/datalog/dbms rm dbdepth.qlog
dbdepth.crc (may have to use zap)
dbdepth.index (may have to use zap)
time96......qlog
survey.dat
bit.dbdase

The only files you should have here are: dbdepth.lmap


dbdepth.bmap
dbtime.bmap

4:/datalog/dbms rm dbdepth.qlog
dbdepth.crc
dbdepth.index

3:/tmp rm any files

3:/user/.... rm any old report files etc

3:/datalog/chrom_dat rm any old chromatogram files

3:/datalog/plots/data rm any old XYZ plot data files

3:/datalog rm ..qlog..

• Once you have done this, perform a system check:

chkfsys 3 +r
chkfsys 4 +r

• If any corrupted files are found that cannot be fixed by the chkfsys program, zap the corrupted files
and re-run chkfsys to recover the blocks and re-write the bitmap.

• Restart dau_admin &

• Create user accounts, if necessary, via the authorize command

302
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• If the geologist, engineer etc have nodes on the network, ensure that they are able to login and check
the requirements for the restricted qlog menu. Adjust the ‘dial’ files if necessary (see section 6.10).
Also, check their requirements for unit selection and change if necessary.

• start other main administrators:

converts &
dbadmin d=4:/datalog/dbms & (this will create dbdepth.qlog plus the index and
crc files in drive 4:/ )
upd_prof &
plot_admin &
m200admin &
flowalarm & (should the alarm activate here, yet the sample pump is off, you
need to invert the signal - Switch 10 in Invert Binary Sensors)

It is not necessary, at this stage to start dbdepth, dbtime or hotback. This can wait until you are
nearly ready to start recording data.

Start the WellWizard Interface administrators if applicable (ensure the associated cti port settings
have been correctly configured (see section 8.10):

hotback +I &
WWInterface p=$cti5 &

Check to see that adminstrators are running by typing: dau_kill

• Create, if not already done; or modify existing script files:-

i. A Mudlog - check requirements with the geologist


ii. Any other depth databased logs that may be required, such as Drilling Parameters,
Pressure Log - again, check requirements with geologist, engineer.
iii. Realtime Mud and Gas parameters plot
iv. Realtime Drilling parameters plot
v. Realtime Trip in and Trip out plot

303
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.7 PREPARING THE REALTIME SYSTEM

• Enter all the information that you can into the Equipment table:

In particular, at this stage:

Depth Method
Ticks per 100
Compensator calibrations
Log interval (i.e. depth database record interval)
Time interval (i.e. time database record interval)
Average stand length
Start Depth (i.e. depth at which database will start)
ROP average interval

Prior to drilling out:

Amps per Ftlb (torque conversion if required; get a table from


the toolpusher or mechanic)
Gas Pump Time
RPM gear ratio (if sensor is not on rotary table - get value from
driller or mechanic)
Pressure Gradient (normal for the area)
MD overide (if no density sensor)
Theta Values (from mud engineer)
Surface Conn Loss (use default 0.5 initially)
Mud Motor details if required

• Enter the Profiles; certainly the existing Hole and Casing profiles. As soon as you have BHA
details, enter the Pipe profile.

• Enter Pump Data; ie the mud volume per stroke for each pump, and the efficiency. Get the stroke
length and liner details (derrickman) and use the pump output program to calculate the pump volume.
Confirm with the toolpusher and the engineer as to the efficiency of the pumps.

• Enter any pre-existing Bit Data (if not starting at spud) and details of the current bit as it is run into
the hole.

• Enter any pre-existing Survey Data (if not starting at spud).

• Ensure that the current Hole Depth is set correctly by using Depth Adjustments.

• Enter all the well information into Well Data - this is used for all log headings.

304
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

As they are preparing to drill: -

• Ensure that the new bit run is entered and started if not already done so

• If not done before, enter BHA and drillpipe details into the Pipe Profile

• Set the bit depth correctly in Depth Adjustments

• Start the dbdepth and dbtime administrators; make sure that the other administrators are running still.

• Check pre-set calibrations against rig values

• Set calibrations for torque and mud flow when comparisons are available

• Set Personal alarm limits on all important parameters, ie gas, ROP for drill breaks, pits for losses
and gains, mud flow, H2S, pump pressure etc.

• Check gas trap level in the header box, start the pump, total gas and chromatograph running.

• Once drilling has commenced, check that the database is updating

• As drilling continues and stringweight increases, reset your hookload calibration and slip thresholds.
Keep a check on the WOB, and reset if necessary.

305
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.8 DAILY OR FREQUENT PROCEDURES WHILE DRILLING

10.8.1 The Realtime QLOG System

• Ensure that the depth tracks correctly. Particularly at the beginning of a well, but also throughout,
check the depth at every kelly down. If the depth is not following rig depth correctly:-

i. Check that slip threshold values are correct, and that ‘in and out of slips’ is being
registered correctly. If not, reset the hysteresis values.
ii. Check the calibration, ie ticks per 100m, and slightly adjust if necessary
iii. Check the targets on the shiv to ensure that all are being sensed correctly

• Keep a constant check on alarm settings and keep set so that they are doing the required job ie it’s
pointless having pit gain/loss set at +/- 5m3 for example.

• Keep mud theta values up to date in equipment table, so that real-time and stored hydraulics are
correct.

• Keep the kick kill program updated every time that the driller records SCR pressures.

• Set up a pressure overlay (normal compaction trend) for the well and make sure that the trend is
checked regularly.

• Keep overburden, fracture and formation gradient calculations up to date

• Keep the depth database editing up to date.

• Make sure you update the survey program every time that surveys are taken.

• Keep real-time plots going 24 hours a day. One plotter should have drilling parameters (and switch to
a trip plot when tripping) and another plotter monitoring mud and gas parameters.

• Update ‘Well Data’ as the well proceeds

• Keep regular data backups – backups can be made to node 2 and to floppy disk; also, where
available, ensure that hyperlinks (section 8.9) are used to transfer data files to a windows PC and
copied, then, to CD.

306
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.8.2 Logging

• Make sure that you use the Trip Mode and the real-time plots when tripping. Preferably, keep a
manual trip sheet and monitor losses and gains extremely carefully. Monitor ALL trips, casing runs,
cementing jobs carefully.

All Data MUST be written down clearly and kept together using both trip sheets and the diary.

Remember, a different logging crew could well be quizzed by the Company Man as to losses/gains
recorded on a previous days trip. Trip data can be sent to the /datalog/trips directory in a report form.

• Perform regular lag checks; if washouts occur, use the Lag Volume Adjust in the equipment table
(this is the extra hole volume created by the washout)

• Print out logs regularly to check for accuracy, consistency and corrections; keeping this up as go
along will save a lot of time at the end of the well.

• Keep an up to date hole and casing profile, for easy reference, with all necessary annular and string
capacities, pipe and collar displacements

• Keep a Unit Diary up to date and complete with as much pertinant information as possible. This
should be information pertaining to the actual well itself, together with software or equipment
problems/changes, troubleshooting and fixes etc.

• Keep the Final Well Report up to date as much as possible while drilling. Thus, not only is the report
is compiled while the information is fresh in your mind, but it will save you a lot of time at the end of
the well.

• Keep a daily record of the IADC report and include in FWR if required

• Update the Days versus Depth plot daily

307
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.8.3 Equipment

• Perform equipment maintenance and calibration checks as per QA procedures – use appropriate
documentation on a daily, weekly, and monthly basis as required.

• If using, check the gas trap regularly for level of mud, mud entering the line, wet or hard calcium
chloride in the drop out jar.

• Keep a regular check on all filters and driers; change when required (see section 4).

• Check suction at trap regularly

• When using a GasWizard, follow the maintenance procedures detailed in the Users Manual.

• Activate the H2S sensors every 2 days for correct operation. Check the sensor for condensation.

• Run calibration gas through the chromatograph every few days if possible and re-calibrate when
necessary; the reading of the chromatograph should be accurate to within 10ppm.

• Check and zero the CC and TCD gas detectors daily. Their operation will be affected by changing
flowrate and temperature. With the suction pump on, but sample line off, re-zero the trim pots so that
you have 95 counts in the test mode.

• Do a visual check of sensors at the start of your shift. ie check that they are in position, operating,
clean, secure etc

• Clean mud sensors regularly (ie each shift) especially the ones at the shakers. Check for cuttings
build up in the header box.

• If using float pit sensors, check each shift that the floats are ‘free’.

• During bit trips, do a thorough clean of all sensors. As well as the cleaning detailed above, make sure
that all C-clamps are well greased; check that pressure, hooload, torque etc are not becoming
embedded in mud, oil etc

• Keep the logging unit clean and dust free; computers should not be exposed to a dirty, dusty
environment. This will also reflect a professional, well controlled service image to the Client.

• Maintain the printers; clean out any pieces of paper that may have collected inside; clean and oil the
‘printer head bar’; carefully clean the printer head; check condition of ribbon and the ribbon
alignment.

308
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.9 REPORTING REQUIREMENTS

10.9.1 Quality Control

All mud loggers and engineers should familiarize themselves with the Company Quality Policy, manual
and documentation. All documentation should be completed as per the instructions and guidelines in the
QA Manual.

QA is an evolving system, so all fieldstaff should also closley monitor company policy changes and
memos, in order to keep current with the system. The QHSE and Operations departments will ensure that
all staff are advised of changes, through e-mail; hard-mail, web-pages, policy handbooks, etc.

The following is a summary of the key documentation to complete in order to ensure the smooth
operation of the mud logging unit:

• Operational Status form To be signed by Company Rep for when the unit becomes
operational and for when it is released.
• Record Inventory supply/requirements
• Consumables used
• Equipment failure report
• Calibration Record
• Maintenance Checklists
• Sample Dispatch Manifest For all samples dispatched from the rigsite, to be signed
by Company Rep or Geologist.
• Corrective Action Report To be completed whenever QA procedures fail, or
whenever a complaint is received from a client.
• Goods Received and Requested keep copies so all crew members know whats been
ordered, whats on route to rig, whats arrived.
• Bug Report Report to operations base.
• Engineering Change Request This provides a mechanism to suggest changes,
improvements, or innovations, to the R+D department.
• Performance Evaluations

10.9.2 Health, Safety and Environment

HSE is everybodies responsibility as well as a company, operator, and legal requirement. All staff must
understand all the policies and procedures detailed in the company HSE manual.

Personnel safety is of paramount importance and all procedures, safety equipment and reporting
procedures are designed to achieve a goal of absolute safe operation at the wellsite.

Again, all staff should pay close attention to changes and updates in policies and procuedures – these will
be communicated through e-mail, hard-mail, web pages, manual and handbook updates.

For full HSE requirements, all personnel will undertake induction programs and ensure they are familiar
with the contents of the HSE manual.
Similarly, if individuals witness unsafe practices, near misses, or have any concern over HSE issues, they
have an obligation to report all such situations to their managers and the QHSE department.

309
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

As well as the company requirements, all wellsites and operators will have their own requirements and
procedures – all personnel must follow such requirements.

Documentation currently required on a regular basis, as per the HSE manual, are as follows:

Safety Induction Report


Safety Meeting Report
Accident, Incident, Near Miss Report*
Job Safety Analysis, where requested

* All such instances MUST be immediately reported to Operations and HSE Management. Management
will work with, and advise, field personnel on site, to ensure that all company/legally required procedures
are correctly followed.

10.9.3 Morning and Final Well Reports

Morning Report:

Determine the requirements of the Company Rep and Geologist and draw up a Report Form accordingly.

Determine whether a hydraulics report is required.

Final Well Report:

Keep this up to date as much as possible while drilling.

Use the example report in the Dataunit manual as a basic format, but again, include any components that
are specifically requested by the client. Try to include as many plots, tables and diagrams as possible.
This format is generally preferred to a lot of text.

Suggested Contents:-

General Well Information Operator, location, spud and TD date, objectives,


hole and casing depths etc

Days vs Depth Plot Prognosed against Actual

Mudlogging Services Outline of the operation, equipment etc

Geological Prognosis

Engineering Report Perhaps by hole section, or for individual bit runs -


explanation of bits/BHA used, deviation, hole problems
etc

Vibration Analysis Reports of any stick-slip occurrences, together with plots

310
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

Formation Tops

Geological Report For each Formation, full description and depths

Core Report

Gas Report Probably best done for each Formation; include background
levels, shows, produced gas etc. Tabulate the figures.

Pressure Analysis Include XYZ plots of pressure profiles, parameters


against depth (eg temp, cond, bulk/shale density).
Include Leak Off Tests and any other measurements.

Deviation Report Include survey listing and plots

IADC ie breakdown of daily operations

Time Analysis % for each operation; do for each hole section and for
well as a whole

Bit Record Use the one from the database or create one yourself

BHA’s Probably more relevant for deviated wells

Casing & Cementing Breakdown of each operation, losses incurred etc, reports of and
maybe plots of pressure testing

Leak Off Tests Use the engineering program to provide plots.

The Unit Manager is ultimately responsible for ensuring that the Final Well Report is factually accurate
and satisfactorily completed; that all logs are neat and edited; that all forms have been completed.

If any data is incomplete, the Unit Manager will be required in the office to complete the job at the end of
the Well.

311
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

10.10 BACKING UP DATA

The time and depth databases will automatically be written to node 2 if the hotback program is running.

However, additional backups should be completed as a matter of course.

10.10.1 Time Database Backup

All time data is saved in 3:/datalog/dbms. A new file is created daily (at 23:59) and has a date identifier:

eg time961023.qlog
time961024.qlog
time961025.qlog

Once the day is complete you can backup the data by compressing the time file into an archived (zoo)
file.

Any time file in this directory with the '.qlog' extension will appear in the time database; once it is zoo'd
up and removed, it cannot be viewed in the database until it is extracted. So, leave a few days data, in
hand, in the directory.

The reason for compressing and removing is not only for backup. Each time file could take up to 3000
blocks of disk space. A lot of time files will therefore take up a large proportion of the disk space. Any
resulting problems are avoided by just keeping the last few days’ time files on disk.

To compress a file:

zoo ah time1.zoo /datalog/dbms/time961023.qlog


zoo ah time1.zoo /datalog/dbms/time961024.qlog etc

Use the query command to keep a check on the size of the zoo’d file. The maximum a floppy disk can
take is 2880 blocks, so when the file reaches 2500-2600 blocks, you should not add any more files to the
archive.

time1.zoo should then be backed up to floppy:- cp time1.zoo 1:/

The original time files can be removed from the hard drive to save disk space, and another archive file
begun:-

zoo ah time2.zoo /datalog/dbms/time961025.qlog


zoo ah time2.zoo /datalog/dbms/time961026.qlog etc

If you should have to restore a particular days data in order to view it in the database:

• first, find the correct zoo file by listing the zoo file contents (although the days contained in the file
should be recorded on the floppy disk label:

312
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

zoo l time2.zoo

• copy the file to the temporary directory:- cp 1:/time2.zoo /tmp

• extract the relevant file:- zoo x /tmp/time2.zoo time961026.qlog

10.10.2 Daily Depth Database Backup

The depth file 'dbdepth.qlog' cannot be copied directly whilst drilling and the depth administrators are
running, therefore it is backed up daily by making a 'temporary image' of it by use of the 'dbget'
command.

i. Daily 'unit' Backup

Procedure:

• Ensure that you login as the same user each time. This is so that the files created are always in the
same user directory.
• Type 'dbget' at the prompt
• The computer will read all of the records in the database and return a message giving the total
number of records read when the operation iscompleted.
• Two new files will have been created in the user directory:

dbdepth.newlog the ‘image’ of the database


depth.crc an ‘index’ of the records read

• Copy the dbdepth.newlog file to a floppy disk or a different hard drive as the backup.
• Remove the depth.crc file (before you run dbget the next time).

• If you ever need to restore a depth database, copy ‘dbdepth.newlog’ to the user directory and type
'dbput' at the prompt. The data will then be automatically restored to the database.

10.10.3 Depth Database Backup for Remote Transmission

The difference in the procedure is that for preparing a backup file for transmission, we need to keep the
file size to a minimum. This is done by using the depth.crc file when dbget is run - only newly created or
changed records will be extracted. These can then be added to the remote database rather than recreating
the whole thing.

• Its very important that you login as the same user each time, because the correct ‘depth.crc’ file has
to be accessed from your user directory.
• Type 'dbget'
• Zoo up the created dbdepth.newlog file and send, via Qterm, to the remote computer.
• Once the zoo'd file has landed at its destination, extract the dbdepth,newlog file and make sure that it
is located in the user directory.
• Type 'dbput'
• Go to dedit and check the database is there.

313
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

• The next time that ‘dbget’ is run at wellsite, DO NOT REMOVE the depth.crc file in the user
directory as this ensures that only updated records to the database will be extracted.

• If sending data remotely and keeping unit backups, use one user directory (keeping the depth.crc file)
for the ‘remote’ dbgets, and use a different user directory (removing the depth.crc file) for wellsite
backup.

10.10.4 Complete Final Well Backup

At the completion of a well, all data and files should be backed up. This may be required by the client
but also allows for the well to be re-created at a later date to produce follow up data for the client. You
have to be certain, therefore, that you include all the required files.

Final logs, ie mudlog, pressure log, composite logs, drilling logs etc should all be plotted to files once
they have been edited and are complete. This allows for easy reproduction - the file can simply be copied
to a printer, rather than having to recreate the database, units, plot files etc.

The plotting of logs to a file is very easy:

• Go to Printer Controls and set the file output file name (eg, /tmp/mudlog_plot)

• Go to the starter file (Plotter Setup) for the correct control file and select this output file as you
would select a printer.

• Start the plot in the usual way ie from Plotinfo or by using the 'plotter’ command.

• Once the file has been created, it should be backed up to floppy disk. You should obviously ‘zoo’ it
first.

• A printed copy can be produced by copying this file to a plotter, ie 'cp mudlog_plot $lpt &’.

At the end of the well, it is a good idea for the Unit Manager to complete a general report which should
include:

All QLOG bugs encountered


Details on ALL computer crashes/freeze ups
Any hardware problems.
Details of Final Well Report and Logs
Report on personnel and evaluation of the job/service
Any other useful information.

314
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

For a complete software wellsite backup, the following files are needed: (Shut down all adminstrators
first). All of the files should be added to a single archive file which should be suitably named for the well
or client.

4:/datalog/dbms dbdepth.qlog
dbdepth.index
dbdepth.crc
dbdepth.bmap
dbdepth.lmap

3:/datalog/dbms time*.qlog (backup separately as already described)


survey.dat
target.dat
bit.dbase
tvd.cfg

3:/datalog/config header.dat
tomb.dat
dp.cfg
<filename>.hpgl
equip.cfg
m200admn.cfg
m200admn.gas
m200gas.cfg
m200admin.gas
hole.pro
pipe.pro
case.pro
pumps.cfg
calibs.cfg
analog.cfg
digital.cfg
ratios.cfg
units.cfg

3:/datalog/stkslp stored plot files

3:/datalog/chrom_dat any chromatograms saved

3:/datalog/script ...any script,control and extra files used in well logs

3:/datalog/plots/data
3:/datalog/plots for any XYZ plots used

3:/datalog/text display.txt
edits.txt
plots.txt
channels.txt

3:/user/<NAME> units.cfg

315
DATALOG: FIELD TRAINING MANUAL, Version 4.0, issued January 2001

user_dp.cfg
3:/datalog/trips any trip files saved

3:/datalog/cbm if applicable

3:/user/..../ morning reports


any well data files or reports

The preferred way to back up well data is via a hyperlink, from QNX2 to a Windows PC, then onto
CDROM. All units equipped with a windows node and CD burner should follow this procedure.

If a CDROM backup is not possible, then backup should be performed by compressing the files first and
then by backing up the data to floppy disks:

At the end of the well, you will therefore have 3 ‘sets’ of disks:

Set 1 Archived time files


Set 2 One archive file containing all the well files (as above)
Set 3 One archived file containing mudlog
Set 4 etc Any other logs printed to file

316

S-ar putea să vă placă și