Riassunto analitico
Lo scopo di questa tesi è quello di rinnovare, implementare e successivamente testare il firmware che controlla il riempimento delle bottiglie di una macchina riempitrice, in una nuova scheda slave customizzata con microcontrollore a bordo. Il fine è quello di preparare la scheda per il collaudo con il nuovo firmware annesso. Questa tesi è stata completamente elaborata in Sidel S.p.a. , azienda partner del gruppo TetraLaval e leader a livello mondiale nel settore packaging di prodotti liquidi. Il motivo di tutto ciò è stata l’obsolescenza hardware del precedente microcontrollore. Il lavoro quindi non è partito dalla necessità di fare un semplice upgrade del software, ma da un radicale problema che ha visto nella sua risoluzione, il passaggio dalla comprensione delle conseguenze fino alla loro accurata risoluzione. Poichè la scheda slave può essere considerata parte integrante della mente della macchina, dal momento in cui è lei che gestisce il riempimento delle bottiglie, una parte sicuramente corposa del lavoro è stata la fase iniziale. In questa fase è stato fatto un’approfondito studio di analisi sul funzionamento della macchina e sulla complessità della logica da implementare nel microcontrollore, derivata dalle diverse sfaccettature della realtà durante il riempimento in velocità delle bottiglie. Nello studio della scheda sono state analizzate tutte le funzionalità dei vari componenti e della loro finalità, e specialmente di come il microcontrollore comunicasse con loro gestendo al tempo stesso gli eventi con l’esterno. Una volta comprese le necessità e i vincoli della struttura del programma, l’implementazione è avvenuta attraverso linguaggio di programmazione C, verificandone la consistenza passo per passo attraverso fasi di debug e opportuni test preliminari. L’utilizzo dell’STM32F0 al posto dell’ HD64F3644H della Renesas ha visto necessari cambiamenti di alcune soluzioni funzionali di parti del programma. Il risultato è stato anche il miglioramento della struttura del firmware rendendone più fluida l’interpretabilità del codice. Nella fase successiva è stata delineata una modalità di test per la nuova scheda. Essa è stata comparata con la scheda e il firmware preesistenti, inviando i comandi e simulando le varie fasi della macchina attraverso una terza scheda: la trasmettitrice TX della scheda master. Per far questo si è scelto di sfruttare uno NI cDAQ-9174 della National Instruments in grado di fare aquisizione e gestione di segnali. L’ambiente di sviluppo utilizzato per la gestione dei segnali in questa procedura di test a banco è stata LabView. Attraverso di esso sono stati sviluppati due ulteriori programmi, uno per l’invio dei comandi e uno per l’aquisizione delle uscite delle due schede comparate. Infine dai test dei due slave, è stato riscontrato che il nuovo slave riproduceva le funzionalità richieste. Questo ha suggerito il corretto comportamento del nuovo firmware pronto da collaudare. In ultima fase è stato fatto anche un test reale, verificando il riempimento di una bottiglia caricata su una macchina in collaudo.
|
Abstract
The purpose of this thesis is to renew, implement and then test the firmware that controls the filling of the bottles in a filling machine, in a new customized board with a microcontroller assembled on it. The aim is to prepare the card for an experimental testing with the new firmware attached. This thesis has been fully processed in Sidel Spa , a partner company of the group TetraLaval and leading global provider of packaging liquid products.
The reason for this was the obsolescence of the previous microcontroller. The work then is not started from the need to make a simple software upgrade, but from a radical problem that has seen in its resolution, the transition from understanding the consequences to their accurate resolution.
Since is the Slave board who manages the filling of the bottles, it can be considered an integral part of the mind of the machine. A substantial part of the work was definitely the initial phase. In this phase was made a deep analysis to study the operation of the machine and the complexity of the logic to be implemented in the microcontroller. This was to understand the different facet of reality during the movement of the bottles in filling phase. In the study of the board were analyzed all the functionality of the various components and their purpose, and especially as the microcontroller communicated with them while managing the events with the outside.
Once understood the needs and constraints of the program structure, the implementation was made through the C programming language verifying the consistency step by step with debug phases and appropriate tests. The use of STM32F0 microcontroller instead of HD64F3644H (Renesas) has seen some necessary changes in the solutions of functional parts of the program. The result was the improvement of the structure of the firmware, with a more fluid interpretability of the code.
In the next step was outlined a test mode for the new card. It was compared with the previous card and the pre-existing firmware sending commands and simulating the various phases of the machine through a third board: the TX of master card. To do this it was decided to exploit an NI cDAQ-9174 of National Instruments able to make acquisition and management of signals. The development environment used for the management of the signals in this test procedure was LabView. Through it were developed two additional programs, one for sending commands and one for the acquisition of the outputs of the two compared cards.
Finally, with the test of the two slaves, was found that the new slave reproduces the required functionality. This suggested the correct behavior of the new firmware ready for the experimental testing.
In the final stage was also done a real test verifying the filling of a bottle loaded on a machine under test.
|