Digital Twin: Establishing a Single Source of Truth in Pharmaceutical Manufacturing

PiSA, a Mexican pharmaceutical manufacturer operating 16 plants and 17 specialty production lines, recorded data machine by machine according to its own criteria, resulting in conflicting readings that made real-time decisions unreliable and required evidence for every batch to be reconciled manually. Working with the integrator EISOT, the company used Barbara's platform to normalize data from each line at the edge and consolidate it into a single authoritative repository within its own facilities, completing the first phase of its digital twin.
Customer:
Industry:
Region:
North America
Ecosystem:
EISOT
Technologies:
OPC-UA
MQTT
InfluxDB
Grafana
Node-RED
Container Application

Business Overview

A digital twin of a pharmaceutical operation is only as reliable as its underlying data, and PiSA, a Mexican manufacturer operating 16 plants and 17 specialty production lines, set out to build one. Its first obstacle was the data itself. Each machine and process recorded information according to its own criteria, with no uniform standard across the company. This lack of consistency produced conflicting readings that made real-time decisions unreliable, directly affecting product quality and operational efficiency.

The equipment generating this data added another layer of complexity. PiSA's production lines combined modern IoT systems with legacy machinery, often using incompatible protocols and formats. As a result, information reached the people who needed it too late, delaying responses to production anomalies and quality issues. Manually reconciling these sources created a permanent operational cost in a sector where evidence must be provided to regulators for every batch.

Phase 1 of the digital twin therefore focused not on the model itself, but on the foundation beneath it: a Single Source of Truth. This unified, authoritative repository would consolidate data from machines, processes, and facilities, allowing production, quality control, and management teams to work from the same reliable dataset. Working with the integrator EISOT, PiSA chose Barbara as the edge infrastructure on which to build it.

Challenges

Establishing a Single Source of Truth across PiSA's manufacturing operations presented four challenges:

  1. Fragmented and non-standardized data: Each machine and process stored its output according to its own criteria, leaving no authoritative version of any figure. Reports and analyses contained inconsistencies that had to be resolved manually before anyone could act on them.
  2. Modern IoT systems alongside legacy equipment: The production lines combined recent installations with older machinery using incompatible protocols and data formats. Both needed to feed into a single repository before the SSOT could be established, yet no single integration approach covered them all.
  3. Cybersecurity and compliance in a highly regulated market: Pharmaceutical manufacturing operates under GxP requirements. Connecting production equipment to new data infrastructure could not introduce further exposure, and the resulting architecture needed to produce evidence that regulators would accept.
  4. Replication across heterogeneous production lines: With 16 plants and 17 specialty lines, an approach that worked on one line offered little value unless it could be replicated across the rest without being rebuilt each time.

Solution

With support from the integrator EISOT, PiSA built an edge computing architecture to serve as the backbone of its Single Source of Truth strategy. Barbara Core ran on edge nodes installed at the manufacturing site, providing a secure runtime for the containerized microservices, or workloads, that formed the solution and connecting them to the surrounding production equipment. Its management agent maintained permanent communication between every node and Barbara Panel. From there, the team remotely handled data integration, deployment, execution, and the automated configuration of applications and algorithms without requiring staff on the plant floor. Many of these workloads came ready-made from Barbara Marketplace, allowing the team to assemble the deployment from certified applications rather than packaging each one independently. This shortened the time required to bring each new line into the architecture.

The architecture operated in two tiers. Each edge node acquired data from the equipment on its production lines, normalized and pre-filtered it locally, and wrote the validated output both to its local database and to a second database hosted on PiSA's on-premises servers. This second copy, rather than the individual node, held the authoritative record. It brought together data from every line in the unified repository on which the digital twin would later be built.

Reference architecture for PiSA: OPC UA acquisition, MQTT broker, Node-RED, InfluxDB and Grafana on each edge node, writing to an on-premise InfluxDB single source of truth
Reference architecture for PiSA

The following components formed the deployment:

Data Acquisition

  • OPC UA Connector: Collected data from industrial devices on the production lines, bringing sensors, PLCs, and SCADA systems into the node through a single interoperable interface. Standardizing on OPC UA at the point of acquisition allowed equipment from different manufacturers and generations to enter the same architecture without requiring a separate integration for each device.

Data Processing and Storage

  • MQTT Broker: Acted as the node's central hub. Using the publish-subscribe model, applications shared data without being coupled to one another, allowing heterogeneous systems to exchange information in real time.
  • Node-RED: Provided a low-code interface for building the data processing and device control workflows that ran on the node. It subscribed to the broker, applied transformations to normalize and filter the data from each line, and published the result back. This allowed the logic for a new line to be assembled and modified without developing an application from scratch.
  • MQTT to InfluxDB Ingester: Wrote information circulating through the broker to the time-series databases on both the node and the on-premises instance. This single application fed the Single Source of Truth. Because the same validated stream was retained on site and sent to the central repository, the two copies could not drift apart.
  • InfluxDB: Served as the time-series database on the node, storing real-time and historical data from connected equipment and keeping it available on site for trend analysis and monitoring.

Visualization and Central Repository

  • Grafana: Visualized the data stored on the node, providing plant staff with dashboards showing the performance of their own production lines without relying on the central repository.
  • On-Prem InfluxDB: Served as the central copy of the data on PiSA's own servers. Validated streams from every edge node converged there to form the single authoritative repository, giving the company access to data from every production line without connecting to each node individually.
  • On-Prem Grafana: Created company-wide dashboards from the central repository, ensuring that production, quality control, and management teams all viewed the same figures from the same source across the entire operation.

Plant staff did not need to stand in front of a node to work with it. Barbara's built-in VPN service provided secure remote access to the web interfaces of the workloads running on each device. This kept the data inside the plant while allowing authorized users to access it from wherever they were. Underneath, Barbara Core's out-of-the-box compliance with IEC 62443-4-2 secured both the devices and the data travelling between production equipment and the central repository. Connecting the lines therefore introduced no new points of exposure, and the architecture as a whole was designed to comply with GxP standards.

Results

Consolidating data from every production line into a single authoritative repository changed how PiSA reported, audited, and operated its manufacturing processes:

  1. Real-time visibility across the operation: Stakeholders in production, quality control, and management gained access to current data from a single source, eliminating the reporting and analysis errors caused by conflicting versions of the same figure.
  2. A reliable audit trail for regulators: The Single Source of Truth gave PiSA a consolidated and validated record of its manufacturing data. Demonstrating compliance became a matter of consulting the repository rather than compiling evidence system by system.
  3. Anomaly detection on the line itself: Acquiring heterogeneous data from every machine allowed anomalies to be detected locally. Production issues could therefore be identified and addressed as they occurred rather than surfacing later, minimizing disruption.
  4. Third-party tools integrated quickly: The architecture's straightforward integration and data export capabilities allowed PiSA to connect third-party reporting and monitoring tools to the repository efficiently, advancing its broader digitalization strategy.

Conclusions

By consolidating data from its machines, processes, and facilities into a Single Source of Truth built on Barbara's platform, PiSA completed the first phase of its digital twin. Unified, pre-filtered, and validated data from every production line was held in a single authoritative repository within the company's own facilities. Manual reconciliation gave way to a record that production, quality control, and management teams interpreted consistently. Traceability, regulatory compliance, and operational efficiency now rested on the same foundation rather than on separate reporting exercises.

This foundation was deliberately designed to remain open-ended. Because the edge model normalized the data from each line before it reached the repository, the same architecture could be replicated across PiSA's plants and warehouses without being rebuilt for every new set of machines. The second phase of the digital twin could therefore begin with a consistent, company-wide dataset. For a manufacturer operating 16 plants under strict regulatory scrutiny, this combination of local processing and a single shared record turned digitalization from a series of isolated projects into a strategy on which the entire operation could be built.

About the Company

PiSA is a 100% Mexican company with 80 years of history and a leading position in the development of medicines, products, and comprehensive services for both the public and private healthcare sectors. The group is supported by a multidisciplinary team of more than 20,000 highly qualified employees working across its different business units.

Its manufacturing operation spans 16 plants and 17 specialty production lines, supporting a portfolio of more than 1,500 products and integrated healthcare solutions that serve millions of families. Each specialty line has its own equipment and processes, and the company maintains this breadth while complying with the healthcare regulations and regulatory frameworks of Mexico and every other country in which it operates.