BOREHOLE LOGGING SYSTEM

Abstract: For various reasons it may be desirable to change the way a sonde is programmed to behave and respond to the data it receives and operates on, and at present each time this must be done it has been necessary to lift the sonde out of the borehole and then disassemble it to permit the removal of the old ROM and its replacement with a new ROM storing the new program. The operability and efficiency of such an arrangement is poor. To deal with this, the present invention proposes that the sonde also includes: signal processing means for processing a sampled detection signal according to a predetermined signal processing program; first memory means for storing that signal processing program; and second memory means storing a writing program for writing the signal processing program in the first memory means according to a command from the ground surface processing apparatus. In this way the sonde's program can be updated from the surface simply by downloading the new program into it, and without the need to bring the sonde up to the surface.

Description: BOREHOLE LOGGING SYSTEM Description of the Invention Field of the Invention The invention relates to a data logging system, and concerns in particular a logging system capable of efficiently rewriting a logging signal processing program stored in a logging sonde. .Background In carrying out an exploration for underground resources, such as oil, it is necessary to determine the nature of the underground formations in which the oil is suspected to be. It has therefore been conventional to drill a borehole deep into the ground, locate a logging sonde (also referred to as a downhole tool) at an appropriate position down the borehole so as to detect a signal which has propagated through the relevant ground formation, and analyse the signal thus detected so as to estimate and evaluate the underground structure. Such an exploration technique is normally referred to as well logging, and a logging system for use therein typically includes a sonde (which is moved up and down inside a borehole, and which sealingly houses therein a detection unit and a data sampling circuit) , ground surface processing apparatus (including a computer or the like located on the surface adjacent to the borehole) , and a logging cable for both mechanical and electrical coupling between the sonde and the ground surface processing apparatus. An example of such a logging system is illustrated in Figure 1 of the accompanying drawings. As shown in Figure 1, a logging sytem 1 is generally composed of ground surface processing apparatus 2 located on the ground surface 5, a sonde 3 movable up and down inside a borehole 8, and a logging cable 4 for mechanical and electrical coupling between the processing apparatus 2 and the sonde 3. The ground surface processing apparatus 2 includes a rotatable drum 6 to which one end of the logging cable 4 is connected. When the drum 6 rotates clockwise or counter-clockwise, the logging cable 4 is either supplied or taken up, so that the sonde 3 connected to the other end of logging cable 4 is moved up and down inside the borehole 8. The logging cable 4 is connected (for data transfer) to an exteension 4' of the logging cable at the rotating axis of drum 6, and the extension 4' is connected to a computer 11. In the example shown in Figure 1, a casing 9 is inserted into the borehole 8 to prevent the formation from collapsing into the borehole 8. However, the borehole 8 may be a bare borehole without the caseing 9. The sonde 3 is provided in this embodiment with a detection electrode 12 for sampling a signal which has propagated through the formation. The detection electrode 12 is connected through an internal interconnection 14 to a control unit 13, which is sealingly housed inside the sonde 3. The control unit 13 is in charge of the control of the overall operation of the sonde, and, in particular, is in charge of the control of data sampling, processing and transmission as well as of diagnosing the various functions of the sonde in accordance with commands from the computer 11 on the surface. The control unit 13 includes a microprocessor and a ROM storing a control program so as to interpret commands transmitted from the computer 11 at ground surface and carry out an operation in accordance with such commands. Each time the functions of the sonde 3 are to be changed or improved the program presently stored in the ROM within the control unit 13 cannot be used any more, and must therefore be changed. Hitherto, with such a change in functions it has been necessary to lift the sonde out of the borehole - up to the surface - and then to partly disassemble the sonde to remove the old ROM therein and replace it with a new ROM storing the new program. A ROM writer is required in order to store the new program in the new ROM, and the old ROM must then be disposed of . Not only is this throwing-away of the old ROM rather wasteful, but, because it is always necessary to have the sonde pulled up to the surface for replacement of the Ro s, the operability and efficiency of the system is poor. Summary of the invention In accordance with the present invention, there is provided a borehole logging system including a processing apparatus to be located at the ground surface, a sonde upwardly and downwardly movable within the borehole, and a logging cable for connection between the processing apparatus and the sonde, and from which the sonde may be suspended in the borehole, which system is characterised in that the sonde also includes : signal processing means for processing a sampled detection signal according to a predetermined signal processing program; first memory means for storing that signal processing program; and second memory means storing a writing program for writing the signal processing program in the first memory means according to a command from the ground surface processing apparatus . In a preferred embodiment, the two memory means are non¬ volatile, and, in a particularly preferred embodiment, the first memory means is at least a portion of an EEPROM. The second memory means is also preferably defined by another portion of the same EEPROM, but since this second memory means is for storing a program for writing a new signal processing program into the first memory means when the signal processing program stored in the first memory means has been updated, and since the programming program is rarely altered, the second memory means may be a ROM (which is not re-writable) rather than an EEPROM. It will be apparent that, because - in the invention - the sonde * s data processing program is re-writable, the logging system operator on the surface can change the processing program in the relative comfort of the surface environment. Moreover, and most conveniently, the the program can be stored on a floppy disk or any other medium, for example, and then installed on the hard disk of the ground surface processing apparatus's computer. Commands can then be transmitted from that computer to the sonde through the logging cable to activate the writing program inside the sonde, and then the new control program can be transmitted to the sonde and stored in its memory. And preferably, each time 'the transmission of command data has been carried out, the same command is echoed back to confirm the reliability of the original data transmission. In the case where an EEPROM is used as memory in the sonde, and since the sonde is typically subjected to severe downhole environmental conditions, including high pressures and high temperatures, it is desirable to record the number of time the program has been re-written, and then to replace the EEPROM with a new one when that number exceeds a predetermined value - and thus to ensure the reliability of the re-programming of the EEPROM. An embodiment of the invention is now described, though by way of illustration only, with reference to the accompanying Drawings. Brief Description of the Drawmσs Fig. 1 Scnematic illustration showing the overall structure of a logging system to which the present invention can be applied. Fig. 2 Schematic block diagram showing the principle of the present invention. Fig. 3 Schematic block diagram showing a control un t of a sonde capable of implementing on-board programming constructed m accordance with one embodiment of the presen .i invention. Fig. 4 Flow chart showing the mam routine of on-board programming based on one embodiment of the present invention. Fig. 5 Flow chart showing a write sub-routine of the on-board programming whicn s called by the mam routine of Fig. 4. Fig. 6 Flow chart showing a sub-routine for cneck g the result of writing of the on-board programming which is called by the ma n routine of Fig. 4. F g. 7 Scnematic illustration showing an example of OB? command which can be used the embodiment of on-ooard programming of Figs. 3-6. Explanation of Numerals 1: Logging System 2: Ground Surface Processing Apparatus 3 : So αe 4 , 4 ' : Logging Cable 8 : Borehole 11 : Computer 13: Control Unit 15, 16: Telemetry Interface 20: Non-volatile Programmable Memory 28a: Telemetry Buffer 26: Digital Signal Processor (DSP) 30: Data Memory 30a: rbuf 30b: sendbuffer 31 : TOR Memory Modes of Embodying the Invention Figure 1 has already been described hereinbefore. Figure 2 is a schematic illustration showing the basic principle of the present invention. That is, in Figure 2, the ground surface processing apparatus 2 (11) including a computer is mechanically and electrically connected to the sonde 3, which can be moved up and down inside a borehole, through the logging cable 4. Since the logging cable 4 can move the sonde 3 up and down inside the borehole 8 in a suspended condition, the logging cable 4 defines a mechanical coupling between the sonde 3 and the ground surface processing apparatus 2. Besides, the logging cable 4 can carry signals for communication between the control unit 13 for data sampling and diagnosis provided tne sonde 3 and tne computer 11 of ground surface processing apparatus 2 and thus includes transmission lines therefor. Incidentally, as the transmission lines, use may be made of metal wires as well as optical fibers. Tnus, in tnis speci ication, tne expression of the logging cable 4 serving as an electrical coupling between the ground surface processing apparatus 2 and the sonαe 3 includes the case in wnich the logging cable 4 has optical fibers m place of or m addition to metal wires for communication, namely tne case n whicn the ground surface processing apparatus 2 and tne sonde 3 are optically coupled. Tne logging cable 4 is operatively coupled at the side of grounα surface processing apparatus 2 to the computer 11 through a DT interface 15 and at the side of sonαe 3 to the control unit inside tne sonde 3 tnrougn a DTC interface 16. The logging cable 4, togetner with DTM and DTC interfaces 15 and 16 at its opposite ends, define a telemetry system which allows to carry cut data transmission between the ground surface processing apparatus 2 and the sonde 3. The computer 11 of ground surface processing apparatus 2 can be any general purpose computer and use may, for example, be made of a VAX computer. The computer 11 includes a hard disc 18 which stores thereon an operating system CS, and various control programs for the sonde 3, wnich runs on the operating system OS, can be stored on the hard disc 18. Incidentally, operating system OS can include extenαed functions, such as communication function, memory management function or tne l ke, rather than a simple operating system. Inside tne control unit 13 of sonde 3 is provided a non-volatile programmable memory 20, which can store a program for implementing various functions of sonde 3. Although the sonde 3 can ta/e various modes αependmg on various objectives, it has undamentally a basic data processing function of αetecting a signal whicn has propagated througn the formation, processing the signal thus detected and transmitting tne signal thus processed to tne grounα surface processing apparatus 2. Such a data processing function is often modified because of finding of bugs in tne program or improvements in performance. Even if the program has been mcdifieα in this manner, in tne present logging system, since tne memory 20 for storing a data processing program s a non-volatile programmable memory, the program stored on the narα disc 13 of computer 11 of grounα surface processing apparatus 2 can be transmitted through tne logging cable 4 to be written into the memory 20. As described above, the memory 20 is non-volatile and programmable. Preferably, use is made of an electrically erasable programmable read only memory or EEPROM or any other similar memory. In the structure shown in Fig. 2, the memory 20 is divided into a first memory region 20a and a second memory region 20b. The first memory region 20a is a region for storing a writing program to carry out the so-called on-board programming (OBP) for storing a data processing program, which has been received by analyzing the commands from the computer 11, at predetermined addresses within the second memory region 20D m the case wnen a newly developed data processing program is to be transmitted from the computer 11 at ground surface to tne sonde 3 to oe stored therein. In Fig. 2, although tnere is shown a structure m which the program for on-board programming and tne program for processing data are stored separate regions of the same memory, the program for on-board programming does not have to be stored in a programmable memory by all means. This is because, since the program for on-board programming is normally less likely to be modified, it can be stored a memory separate from the memory which stores the program for processing data and such a memory can be a non-programmapie ROM. When so constructed, although tnere are disadvantages of incapability to modify tne program for on-board programming and the necessity to provide a separate ROM, since the program for on-poard programming is stored in a memory separate from the memory for storing the program for processing data, which is most likely to be modified, there is an advantage that processing is simplified in writing the program for processing data into memory 20. Now, with reference to Fig. 2, a method for updating the program for processing data inside the sonαe 3 will oe described. It is hereby assumed that the program for on-board programming has already been stored in the first memory region 20a of memory 20 within the sonde 3. It is also assumeα here that since it was desired to add a new function to the sonde 3 m tne case of carrying out some logging with the sonde 3 located inside the borenole 8, there has been developed an update version whicn is an improvement over the program for processing data stored in the second memory region 20o of memory 20. Tne development of sucn a new data processing program can be carneα out at an^ desired location where the developer wishes and thus it can oe αor.e m an environment most suitable for sucn αevelopment. Tne data processing program thus developed is then stored on an arbitrary recording medium, such as a floppy d sc 19, and shipped to a position wnere the ground surface processing apparatus 2 is located. Since the ground surface processing apparatus 2 is coupled to the sonde 3 via the logging cable 4, it s typically located tne neighbornood at the mouth of borenole 8. Then, the operator at the ground surface processing apparatus 2 inserts the floppy disc 19 into the computer 11 and have the operating system OS started to transfer the updated data processing program stored on the floppy disc 19 to the hard disc 18. Then, the telemetry system is activated, and based on commands from the computer 11, the data processing program is transferred from the hard disc 18 to the second memory region 20b of memory 20 inside the sonde 3. In this case, preferably, order to secure the reliability of data transmission, each time when each command from the computer 11 has been interpreted and processed by a microprocessor (not shown) within the control unit 13 of sonde 3 so that data has been stored at predetermined addresses in the second memory region 20b, the same command is echoed back to the computer 11, and if the echoed back signal is identical to the original command, the next command is transmitted. In the present invention, as shown in Fig. 1, such on-board programming can be carried out with the sonde 3 located at a lowered position inside the borehole 8; however, in the present invention, it is not by all means necessary to have the sonde 3 located inside the borehole 8. That is, even if the sonde 3 is located on the ground surface, as long as the sonde 3 is coupled to the ground surface processing apparatus 2 through the logging cable 4, the above-described on-board programmir.c can be carried out, and, even in this case, the present invention can produce significant effects since the ROM is not wasted and there is no need to carry out a complicated operation for reoiacinσ memories (including partial disassembly of sonde 3) . Now, referring to Fig. 3, a specific embodiment of the control unit 13 of sonde 3 will be described in detail. In Fig. 3, DTC 16 is a telemetry interface at the side of sonde 3 and as shown in Fig. 1 it is connected to the logging cable 4. This telemetry interface 16 is connected to a pair of bus control interfaces, i.e., DTB (downhole tool bus) interface 21 and FTB ( fast transmission bus) interface 28. Although these paired bus interfaces 21 and 28 are basically same in structure, the FTB interface 28 is structured to be larger capacity and suitable for high speed processing. A telemetry buffer 28a is provided in the FT3 interface 28 as a temporary storing region. The telemetry buffer 28a may be constructed by hardware, sucn as a register, or by assigning a partial region of a RAM memory or the like using software. Bus interfaces 21 and 28 are ooth connected to I/O interface 22 which has IO_MCR register 22a as a control register. The control register 22a is used for carrying out page control of boot memory 20 cooperation with write access enable control and an address decoder as will be described later. Bus interface 28 and I/O interface 22 are connected tnrough a pair of data bus 32 and address bus 33, which are also connected to digital signal processor 26, boot memory 20, data memory 30 and TOR memory 31. In addition, address bus 33 is also connected to address decoder 27. The digital sic- al processor 25 may be comprised of ADSP-2101 DS? commercially available frcrr Analog Devices Inc. of the U.S.A. A reaα/write signal R/w is applied to the bus interface 28 from tne address αecoαer 27, and a cnip enable signal CE i ^ applieα to memories 20, 30 ana 31 to checK their operating conditions The boot memory 20, in tnis embodiment, is compriseα of an EEPROM, whose entire memory region is divided into eight pages, i.e , page 0 through page 7. It is to be noted that only four pages among the eight are shown in Fig. 3. In tne present invention, it is not particularly necessary to diviαe tne boot memory 20 into eignt pages, and it can oe set at any other desired number of pages. In this embodiment, tne program for on-boarα programming is stored on page 0 and any other logging program, such as a data processing prograir, is stored on pages 1 tnrougn Since tne OBJ program storeα on page 0 is a control program for controlling tne storage of a logging program on pages 1 througn 7, it is, m principle, not expected to be modified. Thus, in the case where on-ooard programming is to be carried out, it is necessary to tar.e preventive measures so that writing cf the OBJ program is not carried out on page 0. As a modification of the present embodiment, since the OBJ program stored on page 0 is essentially not expected to oe modified, it can oe storeα on a separate ROM connected to data pus 32 and address pus 33 Ir tr s case, a logging program can oe stored from page 0 cf boot merrory 20, ^ ich fac _ιtates tne write cor.tro- of the on-ooarc programming. The data memory 30 may, for example, be comprised of a RAM and it is used to store data temporarily. In the data memory 30 are defined a read buffer (rbuf) 30a for reading and temporarily storing the data transmitted from the computer 11 at ground surface and a transmission buffer (sendbuffer) 30b for transmitting and temporarily storing the data to be transmitted to the computer 11 at ground surface. The buffers 30a and 30b may be defined by securing desired regions of a RAM which constitutes the data memory 30. The TOR memory 31 is a tool operation recorder (TOR) memory which records the use environment and operating information, such as operating temperature and operating time, cf sonde 3. The TOR memory 31 may be composed of a RAM, ΞPROM or EEPROM. In particular, m the present invention, the TOR memory 31 has a structure to record the number of times of OB? which has been carried out to boot memory 20. The digital signal processor 26 processes the commands stored in the data memory 30 m association with the address decoder 27. In this case, the digital signal processor 26 causes the logging program transmitted from the computer at the ground surface to be stored on pages 1 through 7 of boot memory 20 in accordance with the OB? program stored on page 0 of boot memory 20. If desired, in an alternative embodiment, the digital signal processor 26 may be replaced by a microprocessor, microcontroller or the l e. The I/O interface 22 is connected to a data sampling circuit 24 which, in turn, is connected to a detection electrode 25. In the present invention, although it is not by all means necessary to have the data sampling circuit 24, since, as a normal function 5 cf sonde 3, there exists a data sampling function for detecting a signal which has propagated through the underground formation with the detection electrode 25 provided on sonde 3 and obtaining such a detection signal as a data, the data sampling circuit 24 is to represent such a typical function of sonde 3. Such a data 0 sampling function constitutes part of a logging program so that the operation of data sampling circuit 24 is controlled in accordance with the logging program stored on pages 1 through 7 of boot memory 20. When the logging program for controlling such a data sampling operation has been updated, the logging 5 program thus updated is transmitted from the computer 11 at ground surface and stored onto pages 1 through 7 of boot memory 20 in accordance with the OB? program stored on page 0 of boot memory 20. Then, with reference to Fig. 4, the operation of one 0 embodiment of OBP program stored on page 0 of boot memory 20 will be described detail. In the embodiment shown in Fig. 4, the OB? program fundamentally includes a main routine and five sub-routines (i.e., bSync, nsReceive, obp_wrιte, bSen , and obp_checksum; . Fig. 4 illustrates a flow chart of the ma = routine . The updated logging program has been installed the computer 11 of ground surface processing apparatus 2 and a preparation has been done to transmit the updated logging program to the sonde 3 tnrough the logging cable 4. Then, as shown m 5 Fig. 4, w en the sonde 3 has received a telemetry sync signal produced by the telemetry interface 16 at a predetermined time interval, the process beginning with step 21 is started as shown by step 40. At step 41, sync sub-routine bSync storeα on page 0 of boot memory 20 is called to thereby establish a synchronized -0 condition with the telemetry system and checks periodically a polling moce to determine wnether or not a command nas Dee- received at the telemetry buffer 2Sa within the bus interface 28 from tne computer 11. At step 42, if it has been determined tnat a command from the computer 11 exists in the telemetry buf er 15 28a, tne ma routine at step 43 calls reception sub-routine nsReceive to tnereby cause tne command witnin the telemetrv puffer 28a to be transferred to rbuf 30a within the data memory 30. Then, at step 44, DS? 26 interprets the commend i rbuf 30a to tnereby determine whether or not it is a command 20 CBP_INSTAL _DATA for installing the updated on-board programming data into tne ooot memory 20. If the result of determination at step 44 is affirmative, tnen it proceeds to step 45 to call writing sub-routine oop_wrιte, t.v.icn constitutes tne ma poαy of the program for on-ocard programming. As a result, writing of tne command data into tne boot memory 20 is carried out according to sub-routine obp_write, which will be described more in detail later with reference to Fig. 5. Upon completion of writing of the command, sub-routine bSend, which transmits data to the computer 11, is called at step 46, so that the same command as that which has been processed at step 45 is returned to the computer 11 through the logging cable 4 as an echo-back. Thus, at the computer 11, the echoed back command is compared with the command which has previously been transmitted to the sonde 3, and if the result of comparison indicates the equality, then it is interpreted that the transmission has been successful, whereas, if the result of comparison indicates inequality, then the computer 11 aborts the process . If the echoed back command has been checked to be OK by the computer 11, then the computer Ii transmits the next command to the sonde 3. And, then, steps 40 through 44 of the main routine shown Fig. 4 are similarly repeated also for this command. And, if it has been determined that the command is the last command of OBP programming, i.e., OBP_INSTALL_END command, at step 47, then it proceeds to step 48. At step 48, sub-routine obp_write is again called to carry out the writing of the last OBP program data into the boot memory 20. Then, at step 49, a sub-routine obp_checksum, which checks the written condition of the 03? program written in the boot memory 20, is called, thereby checking whether or not there is any error the OBP program thus written. Then, it proceeds to step 50, where the number cf times writing has been carried out, which indicates how many times OBP program has been written into the memory 20, is stored into tne TOP memory 31. This is because, m the case where tne boot memory 20 is comprised of an EEPROM, since the reliability in writing decreases if the number of write times has exceedeα a predetermined value, a signal may be sent to tne computer 11 to proαuce warning. Then, it proceeds to step 51 where an echo back is sent to computer 11, together with the checksum result. Then, if it is determined at step 52 tnat the command sent from the computer 11 is GO_IDLE, which indicates to get out of the OBP programming mode, tne OB? mode is terminated and then it proceeds to step 54, where the DSP 26 carries out a reboot operation to have the logging program stored on page 1 et. sec. cf poot memory 20 started. As a result, the updated logging program stored on pages 1 through 7 of boot memory 20 is renαereα operative. On tne other hand, if it has been determined as a result of determination at step 52 tnat it is not G0_IDLE command, tnen since it is a command which is not expected in the mam routine of Fig. 4, it is echoed back to the computer 11 as an illegal command at step 53. Nov., with reference to Fig. 5, the process of writing su p -routine ocp_wrιte of on-ooard programming OB? will oe αescnoeα detail oelow. Prior thereto, the OBP command useα Figs. 4 ana 5 will be explained with reference to Fig. 7. The OBP command has a frame which includes eight fixed length words, in which the first two words Wl and W2 define a header and the remaining six words W3 through W8 define data. In Fig. 7, what is indicated by the dotted lines above first word Wl are bit locations of each word by way of bit numbers. In the example of Fig. 7, the upper eight bits of word Wl define a region for storing module ID information, and, thus, the ID information for identifying the sonde 3 is stored therein. On the otner hand, the lower eight bits are assigned to 03? sub-commands and they indicate any of these various commands depending on the bit assignment. For example, in the case of bit assignment of "0x86" the hexadecimal number, its command may be OBP_INSTALL_DATA, and for the bit assignment of "0x84", its command may be OBP_INSTALL_END. In addition, bit 0 of word Wl is used as a continuation flag (Cf) , so that if this bit is set at "1", then it indicates that the command is continuous with the immediately preceding command. The second word W2 within the command contains address information regarding the location to store the data which follows. And, third through eighth words W3 - W8 store the data to be stored in the boot memory 20, e.g., the updated logging program the present embodiment. Thus, a smgle command includes the total of six data words W3 through W8. Since eacr, word includes two bytes (1 byte = 8 bits) , each command includes twelve bytes of data in total. Incidentally, the hexadecimal notation, the bits which can be assigned to eacn of words W2 through W8 range between "0x0" and "OxFFFF." In the ma routine illustrated in Fig. 4, if it has been determined that an OBP program should be written into tne boot memory 20, the writing program obp_wrιte illustrated in Fig. 5 is called at step 60. Then, at steps 61 and 62, initialization is carried out as a preparation for writing the OBP program into the boot memory 20. That is, m the first place, at step 61, the error bits within the read buffer rbuf 30a are cleared, anc, then, at step 62, while setting the address within rbuf 30a, wnicn is a source of supplying data to be written, as "src", the address within the boot memory 20, into which the data is to be written, is set as "dist" and then tne counter is set to oe 0. Then, at step 63, the correspondmg page number of boot memory 20 is calculated from address "dist" and the offset aαdress within tne correspondmg page is calculated. In addition, one byte cf data is extracted from the data portion of the command within rbuf 30a. Then, at step 64, it is determined whetner the page number thus calculated is "0" or not, and, if the result of determination is affirmative, then it jumps to step 72 to bypass the 03? write sequence. Tnis is because, the present embodiment, since the OBP program, which controls on-poarα p rogramming, itself is storeα on page 0 of boot memory 2C, the lumping to step 72 takes place to avoid the OBP program from oe g overwritten. On the other hanα, if tne result of determination at step 64 indicates the fact that the calculated page number is other than page 0, then it proceeds to step 65, where the IO_MCR regsiter is set to establish a write enable condition and one byte of extracted data is written into the boot memory 20 at its corresponding address. Then, at step 67, the I0_MCR register is reset to release the write enable condition. Then, at step 68, the timer counter is set, and, at step 69, it is determined whether a predetermined timer period has elapsed or not, and, furthermore, at step 70, it is determined whether the data to be written into the address and the data which has been written are identical or not, i.e., whether the data has been correctly written or not. If the result of determination at step 70 is negative, then it goes back to step 69, and, moreover, if the timer period has already elapsed, then it proceeds to step 71. in this case, since writing has not been done properly with a predetermined time period, an error bit is set. On the other hand, if the result of determination at step 70 is affirmative, then it indicates the fact that writing has been completed properly. In this manner, the fact that a predetermined timer period is set and then it is determined whether writing is completed properly within the timer period in carrying out writing into boot memory 20 is particularly meaningful when use is made cf an ΞΞ J ROM as boot memory 20. This is because, i writing data mtc an EEPROM, it is normally required to apply a rela t ively high write voltage for a relatively long period cf time, ano, thus, it is recessary to make confirmation by checking the fact that writing has been completed properly. Besides, it is not only the problem of EEPROM itself, but the present invention is also characterized by being aole to implement the OB? programming with the sonde 3 located at the ground surface as well as at a αeep location within the borehole 8. The space msiαe the borehole 8 is typically under severe environmental conditions, sucn as high temperatures and high pressures, and to write αata into a memory, sucn as EEPROM, under such severe conditions would significantly deviate from the specification conditions for writing a normal memory such as EEPROM. In the present invention, since it is expected to carry out a writing operation under sucn conditions which deviate from the normal specification conditions for writing data into a memory such as EEPROM, it is particularly of significance to provide a loop for insuring tne fact that writing has been completed properly in this manner. Then, at step 72, if the value of counter "I" is an odd numoer, then source pointer "source" is incremented to be ready for read e the next word data and then it proceeds to step 73. On tne otner hanα, if the value of counter "i" is an eve r.umoer, tnen _t proceeds to step 73. And, if value of counter "i" is less tr.an 12, i.e., six worαs W3 - W8 for all of tne data of a single conmanα, m other worαs, if writing of 12 pyte data has net peer, completed, it proceeds to step 74 to nave tne destination address "dist" and counter "1" incremented and then it returns to step 63 to thereby extract the next byte from the command stored m rbuf 30a. Upon completion of writing of all of two data bytes of the command stored m rbuf 30a, it proceeds to step 75 from step ~ > 3 to thereby terminate the writing process. Now, with reference to Fig . 6, sub-routine obp_checksum will be described below. Upon completion of writing of the last OB? command at step 48 of the mam routine illustrated in Fig. 4, as shown at step 80 in Fig. 6, sub-routine obp_checksum for checking whether tnere is any error or not is called. Step 81 is an initialization step, and parameter "temp" for storing a temporary SUM or tne result of addition is set at 0. Then, at step 82, IO_MCR register 22a m charge of management of page r.umoer is set at " j ", and, at step 83, address pointer "i" is initially set at the start address of EEPROM or boot memory 20. In addition, read counter "cm" is also initially set at the start address of tne EEPROM. At step 83, it is shown as "ROM" for the matter of convenience, but it is to be noted that this, m fact, refers to EEPROM 20. Then, at step 84, the value indicated by address pointer "I" is added to parameter "temp" and then counter "cnt" is incremented. Step 84 is carried out repetitively until it cc e≤ to the enα of the page m question. Then, upon comple ion of tne page at step 85, it proceeds to step 86 to increment page number "j", followed by returning to step 82 to repeat t e same p rocess once again. And, upon completion of the processing for all of the pages, it proceeds to step 88 from step 87 to thereby terminate the checksum process . Then, parameter "temp" having the SUM result and the hexadecimal number "OxFF" are ANDed to thereby provide only the lower eight bits of "temp" as the final result. Effects As described in detail above, in accordance with the present invention, it is possible to modify the logging program inside a sonde through a telemetry system and it is not necessary to disassemble and assemble the sonde. In addition, since the logging program is not stored a ROM, but stored in a programmable non-volatile memory, even if the legging program msidε the sonαe has been modified, no ROM is wasted. Moreover, accordance with the present invention, the logging program msiαe the sonde can be modified wnether the sonde is located at the ground surface or mside a borehole.

Claims: Claims 1. A borehole logging system including a processing apparatus to be located at the ground surface, a sonde upwardly and downwardly movable within the borehole, and a logging cable for connection between the processing apparatus and the sonde, and from which the sonde may be suspended in the borehole, which system is characterised in that the sonde also includes: signal processing means for processing a sampled detection signal according to a predetermined signal processing program; first memory means for storing that signal processing program; and second memory means storing a writing program for writing the signal processing program in the first memory means according to a command from the ground surface processing apparatus . 2. A logging system according to Claim 1, wherein the first and second memory means are non-volatile. 3. A logging system according to Claim 2, wherein the first memory means includes at least a portion of an EEPROM. 4. A logging system according to Claim 3, wherein the second memory means includes another portion of the same EEPROM. 5. A logging system according to Claim 3, wherein the second memory means includes a ROM. 6. A logging system according to any of Claims 1 to 5, wherein the sonde's processing means includes a digital signal processor. 7. A logging system according to any of Claims 1 to 6, wherein the ground surface processing apparatus includes a computer, and a signal processing program storable in a data storing means of the computer is transferrable to the sonde ' s first memory means through the logging cable in accordance with the writing program stored in the sonde' s second memory means. 8. A logging system according to Claim 7, wherein the transfer of the signal processing program may be carried out with the sonde located down the borehole.

Inventors: FUKUHARA MASAFUMI, NAKAYAMA TAKEAKI, FUKUHARA, MASAFUMI, NAKAYAMA, TAKEAKI
Applicants: FUKUHARA MASAFUMI, NAKAYAMA TAKEAKI, SCHLUMBERGER CA LTD, SCHLUMBERGER HOLDING LIMITED, SCHLUMBERGER LTD, SCHLUMBERGER OVERSEAS, SCHLUMBERGER SERVICES PETROL, SCHLUMBERGER TECHNOLOGY BV, FUKUHARA, MASAFUMI, NAKAYAMA, TAKEAKI, SCHLUMBERGER CANADA LIMITED, SCHLUMBERGER LIMITED, SCHLUMBERGER OVERSEAS S.A., SCHLUMBERGER TECHNOLOGY B.V., SERVICES PETROLIERS SCHLUMBERGER
Application year: 1997
Main classification: G01V11
IPC codes: G01V1, G01V3, G01V11, G06F9, H04Q9