Real-time tracking system

Project Summary

ASP.NET Web based tracking system for steel pipes. A C# process hostend in the web server, continuously reads data from a PLC. Data exchange with the PLC is done through a C++ COM Library that can be invoked by C# processes.

  • OS: Windows
  • Databases: MSSQL 2005
  • Languages: C# ASP.NET, C++
  • Tools used: COM, IDL, SQL


The Ultrasonic inspection machine generates a set of curves for each pipe inspected. It is of great importance to store this set of curves along with data recovered from field. The tracking system provides the “what” pipe belongs “what” set of curves.


The handling of pipes in the line is controlled by a Programmable Logic Controller (PLC). The tracking system is continuously reading data from PLC by using OPC, which involves deep knowledge of COM / DCOM Microsoft technologies. The acquisition process which lives in the acquisition server, was implemented using C#, most of it using unsafe code to guarantee a good performance. The low level communication with PLC is directly done through a C++ COM Library that I developed using Visual Studio 2005, this library exposes C# friendly methods so it can be invoked and used in C# processes. The acquisition process also broadcasts the acquired data through a network using UDP over TCP. On the Web server side we developed a Multithreaded C# component to receive and decode the broadcasted data by the Acquisition server. This receiver process in turn communicates with a Shared Memory Manager also designed and developed by me. Both server and shared memory manager communicates through named pipes. In order to build this manager I had to develop a wrapper for the win32 libraries that allow the creation and handling of the shared memory segments. Finally Web clients connect to a Web Service developed in C# for reading data from the Shared Memory Manager. This architecture was the solution created in order to avoid that every single web client establish a connection to the Acquisition server or even worse, directly to the PLC, compromising the proper operation of the production line.