In Industrial Automation Engineering, Programmable Logic Controller (PLC) plays a vital role in controlling and automating different industrial processes. PLC is an industrial standard computer machine which is designed to control specific industrial processes efficiently. During the development of the PLC code, it is very important to have the concept of modularization. Modularization means dividing a system into subsystems or modules that are independent of one another and can be used in multiple applications of industries. In most of the current industries the PLC code is being developed manually by the developers which means that even if it is modular like in function blocks with minor changes still there are too many manual entries for the parameters values. Due to this PLC programs are much prone to human errors. This thesis promotes the usage of modern programming environments in the development of PLC code like Visual Studio, Pycharm, etc where developers have much flexibility in the development. This thesis focuses on designing PLC code by using PLC programming, Jinja2 templating engine and TOML configuration tool. The obtained PLC code is compared with manual code written by the programmer to check its similarity and correctness. To assess the outputs of both automatically generated and manual code, they are run on the same hardware setup and the output of the motor and photocell signals are compared and found identical. In the real world testing scenario, the automatic PLC code is implemented on same conveyor system on which the code written by the programmer was written and same functionality in terms of output motion is obtained. By the combination of these tools a PLC programmer can completely design and structure the PLC program by creating templates of the existing function blocks with defined position for parameters and using python automating the process of code generation.
Automatic generation of PLC code using Python templating
XXX, AHAD
2023/2024
Abstract
In Industrial Automation Engineering, Programmable Logic Controller (PLC) plays a vital role in controlling and automating different industrial processes. PLC is an industrial standard computer machine which is designed to control specific industrial processes efficiently. During the development of the PLC code, it is very important to have the concept of modularization. Modularization means dividing a system into subsystems or modules that are independent of one another and can be used in multiple applications of industries. In most of the current industries the PLC code is being developed manually by the developers which means that even if it is modular like in function blocks with minor changes still there are too many manual entries for the parameters values. Due to this PLC programs are much prone to human errors. This thesis promotes the usage of modern programming environments in the development of PLC code like Visual Studio, Pycharm, etc where developers have much flexibility in the development. This thesis focuses on designing PLC code by using PLC programming, Jinja2 templating engine and TOML configuration tool. The obtained PLC code is compared with manual code written by the programmer to check its similarity and correctness. To assess the outputs of both automatically generated and manual code, they are run on the same hardware setup and the output of the motor and photocell signals are compared and found identical. In the real world testing scenario, the automatic PLC code is implemented on same conveyor system on which the code written by the programmer was written and same functionality in terms of output motion is obtained. By the combination of these tools a PLC programmer can completely design and structure the PLC program by creating templates of the existing function blocks with defined position for parameters and using python automating the process of code generation.| File | Dimensione | Formato | |
|---|---|---|---|
|
Thesis_Ahad.pdf
accesso aperto
Dimensione
840.89 kB
Formato
Adobe PDF
|
840.89 kB | Adobe PDF | Visualizza/Apri |
È consentito all'utente scaricare e condividere i documenti disponibili a testo pieno in UNITESI UNIPV nel rispetto della licenza Creative Commons del tipo CC BY NC ND.
Per maggiori informazioni e per verifiche sull'eventuale disponibilità del file scrivere a: unitesi@unipv.it.
https://hdl.handle.net/20.500.14239/33204