Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tool string depth and tension are readily consumable gauges of the progress and status of logging operations. During logging operations, JRSO convention widely distributes Schlumberger winch position (WPS) data via RigWatch displays. 

...

Schlumberger provides JRSO with winch position telemetry. Software systems have (repeatedly) been implemented to make that data more widely available. The present "SLB to RW system" converts Schlumberger WPS protocol winch position data to WITS. The WITS data is passed to RigWatch.

SLB to RW is presently hosted on a Dell laptop. The software system processes WPS telemetry through three serial devices:

  • COM4 - Input. WPS Winch position telemetry is received via an RS485 serial connection from the Schlumberger rack.
  • The telemetry is a binary stream.
  • It is delivered at 19200 baud, 8 bits, no parity, 1 stop bit, no flow control.
    These settings are supplied by the software. These are not the defaults you will see in Windows Device Manager.
  • COM3 - Output. SLB to RW--a LabVIEW 2020 executable program--processes incoming WPS telemetry (COM4) to WITS format. The WITS stream is output via COM3 (RS232).
    • The decoded telemetry is readable text. No need to run PuTTy--SLB to RW displays the data stream.
    • It is delivered at 9600 baud 8 bits, no parity, 1 stop bit, no flow control.
  • COM1 - SLB to RW output; RigWatch input.
    • COM3 is physically connected in loopback fashion to COM1. The loopback cable is known as a null-modem or cross-over cable.
    • The data is delivered at 9600 baud, 8 bits, no parity, 1 stop bit, no flow control.

During operations the RigWatch Master receives WITS data on device "COM1 - Remote 6" (via the network)--i.e. via the winch telemetry laptop aka  RigWatch Remote 6 aka 192.168.1.11.

Image Removed

Starting the Winch Telemetry Laptop

Cabling review

As-delivered, the COM-port wiring is placed as indicated

  • COM4 is a National Instruments device RS-485 to USB.
    • The RS485 connector is tied to the Schlumberger WPS output.
    • The USB connector ties to the (only) left-hand-side (toward the back) USB connector.
  • COM3 is provided via a Tripplite Keyspan USB to Serial RS232 device.
    • The USB cable ties to the (only) laptop backplane (right-hand-side) USB connector.
    • The 9-pin RS232 connector attaches to a null-modem cable.
    • The null-modem cable attaches to the only RS232 on the laptop backplane (left-hand-side).

Power up

...

  • COM3 - Output. "SLB to RW" formats incoming winch telemetry (COM4) to WITS. The WITS stream is forwarded to COM3 (RS232).
  • COM1 - Output from "SLB to RW". Input WITS to RigWatch.
    • COM3 is physically connected in loopback fashion to COM1. The loopback cable is known as a null-modem or cross-over cable.
  • During operations the RigWatch Master receives WITS-formated winch telemetry--across the network--on device "COM1 - Remote 6". Rephrased: the RigWatch instance on the Dell laptop (i.e. Remote 6  or 192.168.1.11) passes COM1 data to the RigWatch Master--only when the Master is configured to listen for that device.

Image Added

This diagram accurately depicts the flow and handling of winch position telemetry through the present Dell laptop (and any subsequent system that may be put in place). The COM port numbers in the diagram are inaccurate and superseded by the text above.

Starting the Winch Telemetry Laptop

Cabling review

As-delivered, the COM-port wiring is placed as indicated

  • COM4 is a National Instruments device RS-485 to USB.
    • The RS485 connector is tied to the Schlumberger WPS output.
    • The USB connector ties to the (only) left-hand-side (toward the back) USB connector.
  • COM3 is provided via a Tripplite Keyspan USB to Serial RS232 device.
    • The USB cable ties to the (only) laptop backplane (right-hand-side) USB connector.
    • The 9-pin RS232 connector attaches to a null-modem cable.
    • The null-modem cable attaches to the only 9-pin RS232 connector on the laptop backplane (left-hand-side).

Power up

  1. A single deliberate press of the laptop power button suffices (upper-right of the built-in keyboard).
  2. Login as DAQ. The usual. Wait, up to a minute.
    • SLB to RW is run automatically.
    • RigWatch is run automatically.
    • Windows profile startup processing takes precedentprecedence. It may be up to 30 seconds 30 sec - 1 min before SLB2RW and RW start.
    • SLB2RW will typically launch faster than RW.
    • If the Schlumberger winch feed is on, SLB2RW will begin displaying winch telemetry within 3 seconds.

Notes

...

Because logging occurs at such wide intervals, it is best to catch the RigWatch startup before it defaults to the previously used hole. Choose "Start New Well", register to reconnect to the Master (192.168.1.7), and then continue RigWatch startup.

Notes

  • The DAQ profile is configured for Windows Remote Desktop access via 192.168.1.11.
  • SLB to RW is installed in C:\Users\daq\Documents\WPS to WITS - SLB to Rigwatch: SLB2RW.exe
  • RigWatch is installed in C:\RWPRO. The executable resides at C:\RWPRO\Tools\interfaces\rw.exe.
  • The shortcuts used to launch both programs reside in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\.

...

The code could be upset if illusory pauses in reception are seen due to delays between when characters come in to the serial port and when VISA's "Bytes at Port" function registers them. The code might then identify these as packet delimiting pauses.The 54-byt length check will almost always catch this, but there is a slim chance that 2 delays exactly 250 ms apart might create a bogus packet read. Once possible cause might be a large FIFO buffer (>54 bytes) on the serial hardware. It is recommended to turn off the FIFO on the WPD serial port (Device Manager > Serial Ports > COM4: right-click Properties, Advanced...). This change requires a restart of the host to take effect.

While this algorithm has run stably for years, it is tuned to the rate at which the Schlumberger hardware presents data. If Schlumberger equipment changes, this code will likely need to change.

Recapitulation of the Schlumberger WPD protocol specification

Depth data is transmitted from Schlumberger to our system over an RS422 serial line using the WPD protocol. The protocol is documented in Schlumberger's SSD Maintenance Manual, Appendix C. This is an old standard. The version in use on the JR is slightly different than what is documented. A summary specification of the JR WPD protocol variant is as follows.

Data packets are

  • 54 bytes long
  • transmitted 4 times per second at 19200 baud, no parity, 8 data bits
  • the packets are delimited by a pause in transmission of ~200 ms
    "This timing critical protocol is a real pain to decode reliably."

The interesting parts of the data packet are

  • Byte 0 - Flags. Bit 5 is units: 0=feet, 1=meters. JR usage has always been in feet.
  • Bytes 3, 4, 5 - Depth. 24-bit 2's complement number. Specified in 0.1-inch units or an unspecified fraction of meters.
    • Byte 3 is LSB.
    • Byte 5 is MSB.
  • Bytes 7, 8 - Speed. 16-bit unsigned integer. Units of ft/hr or m/hr, depending on byte 0.
  • Bytes 12, 13 - Tension. 16-bit unsigned integer. Unit of pounds.

Software Dependencies

SLB to RW

SLB2RW is a compiled, 64-bit, LabVIEW 2020 executable.

  • To communicate with the NI RS485 to USB device established at COM4, National Instruments (NI) Serial drivers are required.
  • The SLB2RW executable requires the LabVIEW Runtime Environment (LVRTE) 2020 to operate.

The full LabVIEW development environment that is installed on this system is not required for operation of SLB2RW. The development environment is solely for the convenience of rebuilding the tool if the serial ports are changed.

RigWatch

The RigWatch installation is dependent on

  • 1-Wire iButton drivers appropriate to the Windows environment. Stored in the JRSO software repository.
  • NTVDM. A software layer to eke out more years of software compatibility for old Microsoft technologies: new technology virtual DOS machine.

RigWatch is not dependent on an external installation of Oracle's Java. It is better for RigWatch to run only with the components that its installer provides. This ensures that, for example, wits1.dll and other serial drivers will load and communicate effectively across the network with the Master station.

PuTTY

Provides the ability to communicate with serial ports. Provides an independent testing facility if operational tools are not working as expected.

Troubleshooting

Normal operational state

Windows Device Manager normally shows these devices. This view was captured with "View > Show hidden devices" checked.

Image Removed

These are the device configurations as of this writing and implementation. Note that a different driver supports each serial port established.

COM4 - Schlumberger winch position data - incoming

Image RemovedImage Removed

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied when the NI serial drivers were installed for the RS485 device. There is no need at this time to change them.

Image Removed

COM3 - SLB2RW program outputs WITS content to this serial port

Image RemovedImage Removed

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied when the drivers were applied for the Tripplite Keyspan USB-to-Serial. There is no need identified at this time to change them.

Image Removed

COM1 - device COM3 is physically looped back into the computer

Image RemovedImage Removed

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied by the Microsoft-provided serial driver. There is no need identified at this time to change these settings.

Image Removed

If there is a change in USB-to-serial equipment

Drivers must be changed. If the drivers are changed, the designated COM#'s may too. 

  • Be sure to find and apply the current USB-to-serial driver for the device.
  • Modern Windows (10 and above) driver Properties present an Advanced... button in their interfaces.
    • Typically it presents FIFO queue configuration options AND a field to assign the COM#.
    • Recommend changing the COM# to those specified at the beginning of this document
      OR recompile SLB2RW to reflect the new ports, revise this document, and retrain both crews.

(As seen above) the "Advanced Settings" for COM ports allows an administrative account to change the assigned COM port number. Re-assign COM ports sparingly. Each change breaks communications for current operations, and requires a restart of the host computer. 

PuTTY serial communications

PuTTY may be used to verify transmission of WITS data to COM1.
Nota bene: while PuTTY has a lock on the serial port, RigWatch Master cannot see or use device "COM1 - Remote 6".

If the NI RS485 to USB device is unplugged

The Windows Device Manager will disable the serial driver. This will interrupt the telemetry stream to RigWatch.

These recovery methods have not been tested. TBD. Each item is one step along the communication path.

  • Best case. Plug the USB to RS485 (or other serial device) back in and it picks right up again.
  • Middle of the road.
    • SLB2RW program must be shutdown and restarted to resynchronize with the WPS feed.
    • Possibly the instance of RigWatch at Remote 6 would need to be restarted.
  • Worse case. The whole winch telemetry host must be shutdown and restarted.
  • Worst case. Even if the winch telemetry host is working as expected after restart, it is possible that a "hang-up" and "re-connect" at the RigWatch Master may not work (seen once).

That "seen once" was corrected by a restart of RigWatch. Not a desirable activity during rig-floor operations and continuous data collection.

Change

20210803 df Adapt Schlumberger Winch Data transfer to RigWatch System (SLB to RW) document to this form.

20210728click Properties, Advanced...). This change requires a restart of the host to take effect.

While this algorithm has run stably for years, it is tuned to the rate at which the Schlumberger hardware presents data. If Schlumberger equipment changes, this code will likely need to change.

Recapitulation of the Schlumberger WPD protocol specification

Depth data is transmitted from Schlumberger to our system over an RS422 serial line using the WPD protocol. The protocol is documented in Schlumberger's SSD Maintenance Manual, Appendix C. This is an old standard. The version in use on the JR is slightly different than what is documented. A summary specification of the JR WPD protocol variant is as follows.

Data packets are

  • 54 bytes long
  • transmitted 4 times per second at 19200 baud, no parity, 8 data bits
  • the packets are delimited by a pause in transmission of ~200 ms
    "This timing critical protocol is a real pain to decode reliably."

The interesting parts of the data packet are

  • Byte 0 - Flags. Bit 5 is units: 0=feet, 1=meters. JR usage has always been in feet.
  • Bytes 3, 4, 5 - Depth. 24-bit 2's complement number. Specified in 0.1-inch units or an unspecified fraction of meters.
    • Byte 3 is LSB.
    • Byte 5 is MSB.
  • Bytes 7, 8 - Speed. 16-bit unsigned integer. Units of ft/hr or m/hr, depending on byte 0.
  • Bytes 12, 13 - Tension. 16-bit unsigned integer. Unit of pounds.

Software Dependencies

SLB to RW

SLB2RW is a compiled, 64-bit, LabVIEW 2020 executable.

  • To communicate with the NI RS485 to USB device established at COM4, National Instruments (NI) Serial drivers are required.
  • The SLB2RW executable requires the LabVIEW Runtime Environment (LVRTE) 2020 to operate.

The full LabVIEW development environment that is installed on this system is not required for operation of SLB2RW. The development environment is solely for the convenience of rebuilding the tool if the serial ports are changed.

RigWatch

The RigWatch installation is dependent on

  • 1-Wire iButton drivers appropriate to the Windows environment. Stored in the JRSO software repository.
  • NTVDM. A software layer to eke out more years of software compatibility for old Microsoft technologies: new technology virtual DOS machine.

RigWatch is not dependent on an external installation of Oracle's Java. It is better for RigWatch to run only with the components that its installer provides. This ensures that, for example, wits1.dll and other serial drivers will load and communicate effectively across the network with the Master station.

PuTTY

Provides the ability to communicate with serial ports. Provides an independent testing facility if operational tools are not working as expected.

Troubleshooting

Normal operational state

Windows Device Manager normally shows these devices. This view was captured with "View > Show hidden devices" checked.

Image Added


These are the device configurations as of this writing and implementation. Note that a different driver supports each serial port established.

COM4 - Schlumberger winch position data - incoming

Image AddedImage Added

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied when the NI serial drivers were installed for the RS485 device. There is no need at this time to change them.

Image Added

COM3 - SLB2RW program outputs WITS content to this serial port

Image AddedImage Added

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied when the drivers were applied for the Tripplite Keyspan USB-to-Serial. There is no need identified at this time to change them.

Image Added

COM1 - device COM3 is physically looped back into the computer

Image AddedImage Added

This dialog is obtained from the Advanced... button above. The settings reflect the defaults applied by the Microsoft-provided serial driver. There is no need identified at this time to change these settings.

Image Added


If there is a change in USB-to-serial equipment

Drivers must be changed. If the drivers are changed, the designated COM#'s may too. 

  • Be sure to find and apply the current USB-to-serial driver for the device.
  • Modern Windows (10 and above) driver Properties present an Advanced... button in their interfaces.
    • Typically it presents FIFO queue configuration options AND a field to assign the COM#.
    • Recommend changing the COM# to those specified at the beginning of this document
      OR recompile SLB2RW to reflect the new ports, revise this document, and retrain both crews.

(As seen above) the "Advanced Settings" for COM ports allows an administrative account to change the assigned COM port number. Re-assign COM ports sparingly. Each change breaks communications for current operations, and requires a restart of the host computer. 

PuTTY serial communications

PuTTY may be used to verify transmission of WITS data to COM1.
Nota bene: while PuTTY has a lock on the serial port, RigWatch Master cannot see or use device "COM1 - Remote 6".

If the NI RS485 to USB device is unplugged

The Windows Device Manager will disable the serial driver. This will interrupt the telemetry stream to RigWatch.

These recovery methods have not been tested. TBD. Each item is one step along the communication path.

  • Best case. Plug the USB to RS485 (or other serial device) back in and it picks right up again.
  • Middle of the road.
    • SLB2RW program must be shutdown and restarted to resynchronize with the WPS feed.
    • Possibly the instance of RigWatch at Remote 6 would need to be restarted.
  • Worse case. The whole winch telemetry host must be shutdown and restarted.
  • Worst case. Even if the winch telemetry host is working as expected after restart, it is possible that a "hang-up" and "re-connect" at the RigWatch Master may not work (seen once).

That "seen once" was corrected by a restart of RigWatch. Not a desirable activity during rig-floor operations and continuous data collection.

Change

20210804 df Smoke test. Last logging run of the expedition. TBD.

20210803 df Adapt Schlumberger Winch Data transfer to RigWatch System (SLB to RW) document to this form.

20210729 df WPS feed not working. See what can be done to make this more repeatable, stable.

  • Last bit: restart RigWatch Master. It was insufficient to "hang-up" and reconnect the "COM1 - Remote 6" device.
    Full system observed to operated end-to-end. But once again only for the latter portion of a logging cycle.
  • Run a repair install of NI Serial. Some event (unplug?) caused the driver to uninstall.
  • Observed that COM1 and COM2 designations in software were swapped with respect to the physical configuration. Re-assigned the serial ports using the Device Manager > Properties > Advanced... settings.
  • Conducted a variety of tests to gauge the effects of serial port driver removal, device disable/enable, and COM port renumbering. Every variant requires a host system restart.

20210720 df Delivered winch telemetry over the Dell 53043. Demonstrated workable for the remainder of that logging cycle.

20210718 df, nl Commit to rebuilding winch telemetry on new hardware. Selected the ruggedized Dell (53043), though any of the others would suffice, an NI RS4585 USB-to-serial device, and a Tripplite Keyspan USB-to-serial device.

  • Repeated install and rollback attempts with the NI PXI-8106 embedded controller led to the realization that its on-board network controller is failing.
  • The device has been carried forward as a one-off without spares for some time.


Archived versions

Logging Winch Telemetry to Rigwatch - 27Sept2022