Success story · Fortaps · Tarragona, Spain
Fortaps runs eight lines. Four M-Duino PLCs feed MySQL and the ERP.
Fortaps makes about 30 million plastic parts a year. M-Duino PLCs from Industrial Shields read the machines on its production lines, start and stop them, and write the data to a MySQL database. The ERP reads it for stock and orders.
Every machine already knows how it is doing.
The PLC writes it into a table your ERP can read.
Fortaps is a family owned business, established in 1996, with two generations of expertise in plastic parts. It designs, makes and sells plastic protectors, ferrules, caps and stoppers, mainly in LDPE, and in HDPE when a part needs more hardness. It does not use PVC. It makes about 30 million units a year with its own moulds, in a plant of over 7,000 m² in Tarragona, Spain. Fortaps adopted open source software early in its manufacturing process. Then it brought open source hardware to its production lines: the Arduino based PLCs from Industrial Shields.
From the field
The cabinet, the parts and the plant.
Real material from the original Fortaps success story.



The challenge
See every line, from the machine to the ERP.
The Fortaps plant is designed to optimise the whole flow: receiving goods, production, stock holding and shipment. In many plants, the link between the machines and the ERP is a count made by hand. At Fortaps, the data follows one path: from the encoders and sensors on the machines to the MySQL table that the ERP reads.
Machine status
Is the machine running, stopped or waiting? Encoders and sensors on each machine already have the answer. The PLC reads them.
Real counts
Pieces per hour come from the line itself. Other equipment that reads the production status is connected too.
Stock and orders
Production data goes to MySQL. The ERP uses it to control stock and orders.
Tarragona summers, 24 hours a day
Fortaps makes plastic parts, so in summer its production lines work at very high temperatures. The M-Duino PLCs have run 24 hours a day for more than two years without issue.
How it works
Two loops: from the machine to the table, and from the table to the order.
These panels show the general pattern. Change the state of a line, move the cycle time, start an order. They are illustrative simulations: generic lines, scaled times, example values. They do not show the program or the data of Fortaps.
Each machine becomes a row of data
Encoders and sensors tell the PLC if a machine runs, and how fast. The PLC counts the pieces, works out pieces per hour and sends the result over Ethernet to MySQL. One PLC can watch more than one line. At Fortaps, each M-Duino is labelled for two lines.
- Inputs: encoders and sensors on each machine
- State per line: run, micro stop, stop (example states)
- Count and pieces per hour
- A row in MySQL at a fixed interval (example)
Rows written to MySQL (example)
Illustrative simulation. Generic lines, scaled times, example values, no data from Fortaps.
The ERP sees the lines. The lines follow the order.
MySQL keeps the history of every line, so you can check performance and efficiency. The ERP reads the same data for stock and orders. The PLC outputs close the loop: start and stop of machines and the production output, according to the user configuration. Here, an example rule stops a line when its order is complete.
- Availability per line from the MySQL history (example values)
- Stock and orders in the ERP
- Start and stop of machines from the PLC outputs
- Example rule: stop the line at the end of the order
ERP events (example)
Illustrative simulation. Generic lines, scaled times, example values, no data from Fortaps.
See OEE, downtime and alarms in the Machine Monitor simulator
System architecture
How do M-Duino PLCs send line data to MySQL and the ERP?
Each M-Duino reads the machines of two lines and controls their outputs. All of them are on the production LAN over Ethernet. Their data goes to MySQL, where it is analysed, and MySQL is connected to the ERP for stock and orders. The case does not publish the protocol or the table layout. The diagram shows one possible layout.
| Flow | Between | Type | Purpose |
|---|---|---|---|
| Machine status | Encoders and sensors → M-Duino | Inputs | Shows if each machine runs, and how fast |
| Production status | Counting equipment → M-Duino | Connection not published | Brings counts such as pieces per hour |
| Machine control | M-Duino → machines | Outputs | Start and stop of machines and production output, per user configuration |
| Production data | M-Duino → MySQL | Ethernet, production LAN | Stores the data to check performance and efficiency. Protocol not published |
| Stock and orders | MySQL ↔ ERP | Database link | The ERP controls stock and orders with the production data |
Why Fortaps chose M-Duino
Reliable, flexible and open.
Fits the installation
The signal types of the M-Duino are configurable, so the PLC adapted easily to the existing installation and its data acquisition. The high performance of the controller was another key factor.
A program Fortaps can change
Fortaps programmed its application with the Arduino IDE, open source software. The plant upgrades it when its needs change.
Open source, end to end
Fortaps already used open source software in its manufacturing process. With open source hardware from Industrial Shields, its production lines follow the same approach, from the PLC to the database.
Source: the interview with Ramon Boncompte, Sales Director at Industrial Shields, in the original success story (2015).
Hardware used
M-Duino PLCs with Ethernet, one for every two lines.
M-DUINO ETHERNET PLC ARDUINO 58
An Arduino Mega based PLC for DIN rail with 58 I/O, Ethernet, RS-485 and RS-232. It reads encoders and sensors, drives start and stop outputs and sends the data over the production LAN.
- Inputs
- 36, of which 16 analog (0-10 V)
- Outputs
- 22, of which 8 analog/PWM
- Communications
- Ethernet, RS-485, RS-232, TTL, I2C, SPI
- Programming
- Arduino IDE over USB or Ethernet
- Inside
- Arduino Mega 2560, RTC, microSD slot
- Power and mounting
- 12 to 24 Vdc, DIN rail, IP20
The case does not publish the exact M-Duino model. The units in the photo are an earlier M-Duino generation. The image shows the M-DUINO ETHERNET PLC ARDUINO 58, a current M-Duino with Ethernet. Count the signals of your machines first, then choose the model of the family.
Questions about this case
What does a PLC measure to monitor a production line?
In this case, the M-Duino PLCs read encoders and sensors on each machine to know its status, and they are connected to other equipment that reads the production status, for example pieces per hour. They also control outputs such as start and stop of machines. For a pulse counting example, see Production pulse counter in the Solution Library.
How does the PLC send production data to MySQL?
The M-Duino PLCs are connected over Ethernet to the production LAN, and all the data goes to a MySQL database. The case does not publish the protocol. A common pattern: the PLC publishes its values over Modbus TCP or MQTT, and a small service on a server writes the rows. For a logging example, see MySQL alarm logging with Node-RED. The same MySQL database is connected to the ERP to control stock and orders. The case does not publish how.
Who is Fortaps?
Fortaps is a family owned business from Tarragona, Spain, established in 1996. It designs, makes and sells plastic protectors, ferrules, caps and stoppers, about 30 million units a year. The original success story (2015) says it works aligned to the ISO 9001:2008 quality standard. More at fortaps.com.
Can I monitor machines that are already installed?
Yes. That was one of the reasons for the choice here: the M-Duino adapts easily to the existing installation and its data acquisition, and its signal types are configurable. List the encoders, sensors and signals of each machine first. For a full plant register map, see Modbus TCP register map.
Can an Arduino based PLC run 24 hours a day in a hot plant?
In this plant, the production lines work at very high temperatures in summer, and the M-Duino PLCs have run 24 hours a day for more than two years without issue. For your project, check the operating temperature in the datasheet of the model you choose.
Which parts of this story are facts, and which are examples?
Facts from the original success story: Fortaps, its plant in Tarragona and about 30 million units a year, M-Duino PLCs on the production LAN over Ethernet, inputs from encoders and sensors, start and stop outputs, MySQL for performance and efficiency, the link to the ERP for stock and orders, 24 hours a day for more than two years, and the cabinet photo with four PLCs for lines 1 to 8. Examples: the protocol, the table layout, the rates, the availability values, the order rule and the exact M-Duino model.
Download the success story
4-page PDF with the challenge, the logic, the architecture and the hardware. No form required.
Similar project?
Tell us your lines and your machines. An engineer will answer.
Tell us how many lines and machines you have, which signals they give and where the data should go: MySQL, an ERP, an MES or a dashboard. We will tell you which controller fits and how to connect it.
- You get an answer from our technical team
- Signal count and controller sizing per line
- Arduino, ESP32 or Raspberry Pi based PLCs