Pemex uses LabVIEW and WSN for Wireless Monitoring in Oil Tanks

  Read in   |   Print Print

"We chose NI for the great software experience, the fact that it makes it easier to scale or reproduce the project to other facilities and the savings offered by their approach."

- Arnulfo Carrera, Petroleos Mexicanos - PEMEX

The Challenge:
Measure and log level, temperature, pressure and alarm data for several tanks containing oil and petroleum products in an accurate and reliable way. The long distances between the tanks present an additional challenge.

The Solution:
Use WSN to create a mesh of wireless nodes that acquire the different parameters from the tanks’ internal systems through MODBUS serial, and create an application using LabVIEW to read and concentrate these parameters from the WSN nodes, log them and analyze them in a centralized TPC.

Arnulfo Carrera - Petroleos Mexicanos - PEMEX















































































































































































































































































































































































































































































































































































































































































































































































































































































Pemex is the largest Mexican company, as well as one of the largest in Latin America, and it is in charge of developing the complete supply chain for the oil and gas industry in the country. Pemex Refinación is the organism in charge of the industrial processes of refining and creating oil products, as well as their distribution, storage and first sale.

As part of the commitment to continuous improvement that will allow us to keep offering world-class products and services, we seek to leverage the best technology available to implement innovative and efficient processes.

With this approach, Pemex’ Pajaritos logistics terminal required a solution to monitor different parameters, such as temperature, pressure and alarm status, acquired from 58 storage tanks for oil, gasoline and diesel. This task is extremely important, as it is essential to guarantee the integrity of the contents, and helps to provide statistical data for analysis that can yield improvements in the process.

The solution needed to fulfill the following requirements:

- Maintain reliable and secure communication between the measurement systems in the tanks and the HMI where data is collected.

- Easily integrate with existing devices and databases.

- Reduce implementation and maintenance costs in the long term.

After evaluating other third-party custom solutions and rule out a wired approach because of the high maintenance costs and issues associated with it, we chose to develop a solution based in LabVIEW and the WSN wireless nodes platform for its flexibility, ruggedness and reliability.


For the implementation of the system, we used WSN programmable nodes that communicate with the tanks’ internal measurement systems through serial communication and digital I/O. The WSN serial nodes receive level, temperature and pressure data via the MODBUS protocol. The node itself is running LabVIEW code that interprets and manages the MODBUS data.

We created two main meshes for the communication: one for level, temperature and pressure data, and the other for alarm status. Each mesh is divided in sub-meshes that connect a number of WSN nodes to a gateway and a Touch Panel Computer. This TPC gathers all the data, displays the current state of the system to the operator, logs the relevant information and communicates with the enterprise database and Pemex’ PI Server. We do all this in an application developed with LabVIEW.

To guarantee communication quality, we configured the nodes in each sub-mesh to use different channels of the wireless range, to avoid possible interference with other nodes or other wireless devices in the complex.


One of the many advantages we obtained with this solution was the flexibility of NI’s platform, which allowed us to adapt to the specific data communication, translation and integration requirements, without the need to invest the time and resources associated with developing a custom solution from scratch. We chose NI for the great software experience, the fact that it makes it easier to scale or reproduce the project to other facilities and the savings offered by their approach. NI technical support also allowed us to face the challenges normally associated with implementation and troubleshooting of the system much faster and with fewer issues.

This new system has simplified data acquisition and report generati on that includes valuable information about our processes, which allows us to take the best decisions and achieve our goals to continue being among the best oil and gas companies in the world.

Author Information:
Arnulfo Carrera
Petroleos Mexicanos - PEMEX
Av. Marina Nacional 329.Col Petroleos Mexicanos
México DF

Bookmark and Share

Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community

Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI