Members Only | Ezine | Links | Address | Contact us | Copyright


PLCopen 15 years anniversary brochure!

IEC 61131-3 improves Fuels Management

Anton Käsbeck, Sakura Endress Co., Ltd., Japan

Fuels management is an area of the process industry where instruments and software might stay over a decade or longer in place. The use of a standardized language like IEC 61131-3 and new technology like a SoftPLC offer a substantial benefit in the operation of a tank farm or refinery.

Market Situation

Sakura Endress Co., Ltd., Japan together with the Whessoe Group have become the major supplier of tank gauging systems for the oil & gas industry worldwide. Until recently, customers simply asked for highly accurate level gauges, but now the vast majority demand turnkey solutions for tank gauging systems which include:

SCADA functionality
Control of valves for more complex operations
Interfacing with other devices within the tank farm or refinery

What are the needs of tank gauging customers?


Only few countries build new tank farms, most systems are installed as add-on and must be compatible with a variety with existing hardware.

User friendliness:

User friendly Operator screens: Tank operators have very limited experience with computers or software.


Tank gauging systems are installations, which operate over a very long period of time (i.e. 10 to 20 years). Service people face an extremely wide range of products out in the field.

Besides "measuring how high the level of oil in the tank is" a multitude of parameters is of interest to the person or organization that operates a tank.

First, the volume or mass of oil in a tank cannot easily be derived from the measured level of the surface. Temperature, density, bottom levels of other fluids and size and shape of the tank influence the available product volume in a tank.

Second, filling and emptying a tank with products like oil or chemicals is a critical operation that requires excellent support. Although some of these features can be added on to other system, that is where customers can really benefit from a SCADA system, specifically and originally designed for tank gauging.

Figure 1: Components of a tank farm

How does a typical tank farm or refinery look like?

A tank farm can be divided into three components:

The SCADA system , where data is stored and visualized. Located in the control room. In former times simple local display with a connection to a DCS system. New systems include impressive graphic displays, interfaces to other computers, LAN connectivity, etc.

The interfaces , where data from the device level are collected. Interfaces are located in the control room and close to the SCADA system

The measuring devices , where measurement via servo gauges, temperature sensors, pressure transmitters etc. is taken. These devices are located directly at the process, in our case usually on the tank roof or inside the tank
Additionally device setup, local display, etc. are available. "Figure 2: Instrumentation on a tank" shows a tank with typical instrumentation:

a servo gauge
a temperature sensor and
a tank side monitor

Figure 2: Instrumentation on a tank

Tank Gauging is mostly a refitting or add-on business: Except few countries in South East Asia there are hardly any new tank farms built. Requirements include:

Tank farms cover large areas, cable lengths up to 3 km

Upgrades often have to use existing cabling and connect existing instruments.

Computer and software knowledge is usually limited at customer site

Moving oil in and out from tanks is an essential functionality of a complete tank gauging system. Control programming via IEC 61131-3 is beneficial.

Configuration model for IEC 61131-3

The full model for the possibilities described above in IEC 61131-3 consists of three independent resources connected via a fieldbus. Each of the resources is located on a control unit with a powerful processor and a multitasking operating system:

In the measuring device
In the RTU interface or
In the SCADA software

Resources exchange runtime information via SEND and RECEIVE function blocks, which allow application programming, independent of the fieldbus used. This is especially important for integration of existing applications.

Systems with reduced functionality will be available and can be custom tailored. The location of controls programs and their interfacing are dependent on system requirements and are part of a system design.

Special requirements for control programming in a tank gauging system

A crude oil tank with a diameter of 30m and a height of 20m may take more than a day to fill up. It seems no problem to interrupt a process of filling for a couple of seconds, but it needs to be guaranteed, that the so-called transfer movement is continuously controlled and monitored. Movements will be used as an example for control in tank gauging systems.

What is a movement? A movement involves one (or several) sources and one (or several) destinations

a storage tank
an oil tanker
an outlet into a pipeline

What are the requirements to control a movement?

Valves to control the flow of product
Flow meters to give information on actual product moved
Calculation of sales tax: In many countries this is based on level change in the tank, from where volume is calculated
Archiving: Movements and tank data are stored to show records for legal or ecological proof.
Matching measurements from various sources: The volume pumped out from the tank and the volume being added to a tank can be calculated. Flow meters in operation on the way the oil is pumped calculate transferred volume. Even with the high accurate sensors the calculated volumes of all sources will not match. Are the discrepancies within a certain range? Or may there be another destination (illegal pumping out is major concern in some countries)?

Control of the valves and matching measurements is the task to be programmed with IEC 61131-3:

- Control is done by the operator from the SCADA station, independent of where the actual control is located. A operator command is transmitted to the SoftPLC, where it is defined as an input signal VAR_INPUT (%IX). The scanning of this input is done in a task (PUMP_TASK), which is event driven by %IX.

- The input signal (e.g. to start emptying a tank) is then processed in the programmed control logic in a PROGRAM PUMP, where

Checks on status of other components in the control system are done. This could be the check, that other valves are opened as well to avoid reverse flow
Finally the actual signal (an VAR_OUTPUT %QX) is initiated to control the valve
Check on moved volumes: Calculation of differences and setting of alarms in case of discrepancies

Implementation of the runtime engine

The components of a tank gauging system as described above allow several options to integrate the runtime engine. Other factors in a tank gauging system and implementation cost give advantages and disadvantages for each of them:

A SoftPLC could be integrated into the control unit of a sensor , where electronic boards are already designed for modular communication and control of the sensor

A SoftPLC in the device allows very close control of the process near the measuring devices
Built in analog output or local HART interface are available
Size of sensors, explosion proof requirements do restrict this approach
The need for a complex protocol from programming system to a sensor does add additional cost. The protocol from interface to sensor is also a main factor in performance

The RTU interface allows the integration of a specifically designed board for a SoftPLC or a SoftPLC as an additional task on the main board.

A SoftPLC in the RTU interface benefits from various interfaces available directly to sensors and can access memory on the RTU.
Its location in the control room allows its connection via serial link to the IEC 61131-3 programming system.

The SCADA software used for tank gauging is a modular system running on Windows NT. A SoftPLC is integrated as an additional task under Windows NT. An interface to the database of the SCADA software allows read/write access.

A SoftPLC on the same platform as the SCADA software has easy access to the database of the visualization and it allows consistent data and easy update.
Transmission of data from the SCADA system to/from the RTU requires a powerful protocol. Communication between SCADA and RTU is a time critical path.
The SoftPLC connects inputs and outputs via the SCADA data base. The SoftPLC does not access inputs and outputs directly.

Implementation of a Fieldbus interface

Each of the components above running a control unit connects via a fieldbus. Sakura Endress Proservo NMS53 is a servo gauge sensor with a modular design. Communication interfaces are separate boards in the sensor, which have a standard interface to the communication board.

The Whessoe Coggins RTU/8130 interface is based on a main board with up to 4 fieldbus cards. Special interfaces for tank gauges as well as standard field busses are available.

The SCADA software FuelsManager will interface to a fieldbus via built in interfaces or via OPC (OLE for Process Control).

A control unit can be integrated into each of these components. With this concept customer requirements at each level can be satisfied.

Market needs define which approach is cost effective and where benefits are highest.


Tank gauging systems are delivered as turnkey solutions to the companies running a tank farm or refinery. The end customer himself usually does little or no change. Systems are configured and programmed at the manufacturer of the tank gauging system.

How can the usage of a standard programming language like IEC 61131-3 improve the performance of a system integration center (SIC)?

Tank gauging systems are being distributed all over the world and therefore cannot be based on country or manufacturer specific languages. Worldwide cooperation of the system integration demands standardization in manufacturing tools and software
Tank gauging systems are installations, which remain in operation for decades. Service people face an extremely wide range of products on site
Systems are independent of third party PLC’s, giving flexibility in design and implementation


The language standard IEC 61131-3 and commercially available SoftPLC give manufacturers of industrial controls equipment a better chance of offering complete tank gauging systems.

Manufacturers benefit from:

Commercially available products, which require little investment to adapt to existing hardware and software
Concentrating engineering effort on the application, not on developing base technology

Customers benefit from:

Turnkey systems delivered by the tank gauge manufacturer as the application specialist
One source, that provides design, implementation, commissioning and service
Better quality of systems, as standard interfaces are used, resulting in higher reliability