Automatisk generering av PLC-kod med TIA Openness
2022 (Swedish)Independent thesis Basic level (degree of Bachelor), 20 credits / 30 HE credits
Student thesisAlternative title
Automatic generation of PLC code with TIA Openness (English)
Abstract [sv]
Projektet har utförts i samarbete med Elektroautomatik, ett företag som specialiserar sig inom automation. En del av företagets arbete består av PLC-programmering i Siemens TIA Portal. Vid uppstart av nya projekt, nyttjar företaget ett skalprojekt innehållande en struktur för PLC[1]programmen. Projektets syfte var att undersöka de möjligheter och begränsningar som finns vid automatisk generering av PLC-kod, för att eliminera repetitiva moment och förkorta ledtider vid PLC-programmeringen. Huvudmålen för projektet var att dokumentera TIA Openness användbarhet kopplat till projektet och att med hjälp av TIA Openness utveckla en applikation. Denna applikation skulle automatiskt kunna generera strukturen för PLC-programmen utifrån företagets skalprojekt och inmatning av data från användaren.
I projektet användes forskningsmetodiken Design Research Methodology, en iterativ metodik som till exempel används för att planera forskningsprojekt. Metodiken har fyra faser som kan förklaras som: klargörande av forskningsuppgift, att anskaffa kunskap kring området, att implementera lösningen och att utvärdera resultatet. Att implementera lösningen innebar i projektet planering och programmering av applikationen och dess användargränssnitt.
I projektet undersöktes möjligheter och begränsningar med TIA Openness via bland annat en litteraturstudie och Siemens demoapplikation. Projektets resultat visar att TIA Openness kan användas för att skapa applikationer med möjlighet att generera stora delar av PLC-program; de flesta funktioner som finns att tillgå i TIA Portal är möjliga att anropa genom applikationerna.
Applikationen som utvecklats under projektet kan användas för att generera grundstrukturen för uppdragsgivarens PLC-program utifrån ett skalprojekt och vissa data, såsom antal stationer i projektet. Koden som genereras stämmer väl överens med den som skapas manuellt i TIA Portal.
Tidigare forskning tyder på att automatiserad generering av kod leder till högre säkerhet och kvalitet hos program. Det kan även leda till ökad återanvändbarhet av kod och därigenom ökad effektivitet vid skapandet av nya projekt.
Applikationens användbarhet är begränsad i dagsläget, men kan vidareutvecklas för att öka dess effekt på företagets ledtider. En av de mest kritiska funktionerna att implementera härnäst anses vara generering av HMI-bilder.
Abstract [en]
The project has been carried out in collaboration with Elektroautomatik, a company that specializes in automation. Part of the company's work consists of PLC programming in Siemens TIA Portal. When starting new projects, the company uses a special PLC program, the “shell project”, containing a standardized structure that forms the basis for the company's projects. The purpose of the project was to investigate possibilities and limitations with automatic generation of PLC code, in order to eliminate monotonous tasks and shorten lead times in PLC programming. The main goals of the project were to document the usability of TIA Openness linked to the project and to develop an application with the help of TIA Openness. This application can automatically generate the structure of PLC programs by using the company's shell project and data provided by the user.
The research methodology Design Research Methodology was used during the project, an iterative methodology which is used, for example, to plan research projects. The methodology has four phases that can be explained as: clarification of the research task, to acquire knowledge about the subject, to implement the solution and to evaluate the result. During this project, implementing the solution, meant planning and programming of the application and its user interface.
The project explored opportunities and limitations with TIA Openness by, among other things, conducting a literature study and examining a demo application from Siemens. The results of the project show that TIA Openness enables the creation of applications with the ability to generate large parts of PLC programs; most of the features available in TIA Portal can be used through the applications.
The application that was developed during the project can be used to generate the structure for the company's PLC programs based on a shell project and certain data, such as the number of units in the project. The generated code matches the one created manually in TIA Portal.
Previous research shows that automated code generation has the possibility to improve the level of security and quality of the programs. It can also lead to increased reusability of code and thereby increased efficiency in the creation of new projects.
The usability of the application is limited, but can be further developed to increase its effect on the company's lead times. The ability to generate HMI images is considered to be one of the most important features to implement next.
Place, publisher, year, edition, pages
2022. , p. 72
National Category
Production Engineering, Human Work Science and Ergonomics Computer Sciences
Identifiers
URN: urn:nbn:se:his:diva-21467OAI: oai:DiVA.org:his-21467DiVA, id: diva2:1678380
External cooperation
Elektroautomatik
Subject / course
Industrial Engineering
Educational program
Manufacturing Engineer
Supervisors
Examiners
2022-06-292022-06-292022-06-29Bibliographically approved