Siemens PLC-ohjelmoinnin integrointi ohjelmistokehitykseen
Illikainen, Niko (2019)
Illikainen, Niko
2019
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2019051710368
https://urn.fi/URN:NBN:fi:amk-2019051710368
Tiivistelmä
Insinöörityön aiheena oli Siemens logiikkaohjelmoinnin liittäminen osaksi yrityksen ohjelmistokehitystä. Työn tavoitteena oli perehtyä Siemensin tarjoamiin kirjastomuotoihin, simulaattoreihin ja Openness-rajapintaan, sekä kehittää niistä versionhallintajärjestelmään ja jatkuvaan integraatioprosessiin soveltuvat ratkaisut. Versionhallintaa tullaan käyttämään PLC-lohkojen säilytyspaikkana ja niiden kirjanpitojärjestelmänä. Jatkuva integraatioprosessi hoitaa PLC-lohkojen automaattisen testauksen automaatiopalvelimien simulaattoreilla.
Työ aloitettiin teoriaosalla perehtymällä yleisesti versionhallintajärjestelmiin, jatkuvaan integraatioprosessiin ja Siemens TIA Portal -ohjelmistoon sekä sen eri kirjastomuotoihin. Tämän jälkeen siirryttiin tutkimaan tarkemmin TIA Portalin eri kirjastotyyppejä ja niiden potentiaalia versionhallintajärjestelmän kanssa työskentelyssä. Kun asianmukainen ratkaisu löytyi, siirryttiin kirjaston käytön suunnitteluun. Suunnitellun kokonaisuuden rakentamisen jälkeen liitettiin kirjasto versionhallintajärjestelmään ja testattiin toimivuus. Kirjastojen valmistuttua tutkittiin TIA Portalin logiikkasimulaattoreita ja Opennes-rajapintaa sekä C#-ohjelmointikieltä, jotta voidaan tehdä automaattitestejä edeltävät toimenpiteet C#-sovelluksella Openness-rajapinnan kautta automaatiopalvelimella. Tarpeellisen tiedonhaun jälkeen aloitettiin sovelluksen rakentaminen, joka automaattisesti avaa ja konfiguroi annetun TIA-projektin sekä lataa logiikkaohjelman konfiguroituun simulaattoriin automaatioympäristössä. Lopuksi tuotettiin yrityksen sisäiset TIA Portal -kirjastojen ja simulaattorien käyttöohjeet, sisältäen myös ohjeen muutoksien viemisestä versionhallintaan ja sieltä muutoksien tuomisesta omaan säilytyskansioon.
Työn lopputuloksena saatiin TIA Portal -kirjastot versionhallintaan ja niiden dokumentoinnin seurauksesta syntyneet käyttöohjeet sekä sovellus, joka hyödyntää Openness-rajapintaa ohjelmien latauksissa automaatiopalvelimen logiikkasimulaattoriin. Työn tuotoksia tullaan hyödyntämään tulevaisuudessa kehittäjien luomien PLC-sovelluksien laitteiden ja lohkojen organisoinnissa, versioinnissa sekä automaatiopalvelimilla suoritettavissa automaattitesteissä. The main subject of this thesis was to incorporate Siemens PLC programming to be a part of the company’s software development. The goal of this thesis was to study library formats, simulators and Openness API provided by Siemens and to develop suitable solutions for version control systems and continuous integration concerning PLC libraries and actions in automation servers.
The thesis was started by studying the basics of version control, continuous integration and the TIA Portal. After the basics, the work continued with a deeper investigation of different library possibilities of the TIA Portal and how they would work with version control. When a suitable solution was found, the planning of the library started. After the desired library was created it was transported to version control and its functionality was tested. Upon the completion of the libraries, the work continued by studying the PLC simulators and Openness API of the TIA Portal and also C# programming language in order to program an appropriate application for the automation environment. The application will perform a necessary number of steps via C# software that utilizes Openness API before automatic tests can be ran on the automation environment. After necessary search of information, the programming of the application started. It would automatically do a certain number of actions required to download the program to a simulated PLC instance. At the end of the work, instructions of TIA Portal libraries and simulators for the company’s internal use were created, including a guide on how to commit and update changes in and from the version control system.
As a result, libraries in version control were created and by documentating them and simulators, a manual for other developers was produced. Also, software which uses Openness API in order to download a PLC program into an instance in an automation server was created. These results will be exploited in the future in managing and versioning the PLC workpieces of the developers and in automatic tests which take place in automation servers.
Työ aloitettiin teoriaosalla perehtymällä yleisesti versionhallintajärjestelmiin, jatkuvaan integraatioprosessiin ja Siemens TIA Portal -ohjelmistoon sekä sen eri kirjastomuotoihin. Tämän jälkeen siirryttiin tutkimaan tarkemmin TIA Portalin eri kirjastotyyppejä ja niiden potentiaalia versionhallintajärjestelmän kanssa työskentelyssä. Kun asianmukainen ratkaisu löytyi, siirryttiin kirjaston käytön suunnitteluun. Suunnitellun kokonaisuuden rakentamisen jälkeen liitettiin kirjasto versionhallintajärjestelmään ja testattiin toimivuus. Kirjastojen valmistuttua tutkittiin TIA Portalin logiikkasimulaattoreita ja Opennes-rajapintaa sekä C#-ohjelmointikieltä, jotta voidaan tehdä automaattitestejä edeltävät toimenpiteet C#-sovelluksella Openness-rajapinnan kautta automaatiopalvelimella. Tarpeellisen tiedonhaun jälkeen aloitettiin sovelluksen rakentaminen, joka automaattisesti avaa ja konfiguroi annetun TIA-projektin sekä lataa logiikkaohjelman konfiguroituun simulaattoriin automaatioympäristössä. Lopuksi tuotettiin yrityksen sisäiset TIA Portal -kirjastojen ja simulaattorien käyttöohjeet, sisältäen myös ohjeen muutoksien viemisestä versionhallintaan ja sieltä muutoksien tuomisesta omaan säilytyskansioon.
Työn lopputuloksena saatiin TIA Portal -kirjastot versionhallintaan ja niiden dokumentoinnin seurauksesta syntyneet käyttöohjeet sekä sovellus, joka hyödyntää Openness-rajapintaa ohjelmien latauksissa automaatiopalvelimen logiikkasimulaattoriin. Työn tuotoksia tullaan hyödyntämään tulevaisuudessa kehittäjien luomien PLC-sovelluksien laitteiden ja lohkojen organisoinnissa, versioinnissa sekä automaatiopalvelimilla suoritettavissa automaattitesteissä.
The thesis was started by studying the basics of version control, continuous integration and the TIA Portal. After the basics, the work continued with a deeper investigation of different library possibilities of the TIA Portal and how they would work with version control. When a suitable solution was found, the planning of the library started. After the desired library was created it was transported to version control and its functionality was tested. Upon the completion of the libraries, the work continued by studying the PLC simulators and Openness API of the TIA Portal and also C# programming language in order to program an appropriate application for the automation environment. The application will perform a necessary number of steps via C# software that utilizes Openness API before automatic tests can be ran on the automation environment. After necessary search of information, the programming of the application started. It would automatically do a certain number of actions required to download the program to a simulated PLC instance. At the end of the work, instructions of TIA Portal libraries and simulators for the company’s internal use were created, including a guide on how to commit and update changes in and from the version control system.
As a result, libraries in version control were created and by documentating them and simulators, a manual for other developers was produced. Also, software which uses Openness API in order to download a PLC program into an instance in an automation server was created. These results will be exploited in the future in managing and versioning the PLC workpieces of the developers and in automatic tests which take place in automation servers.