Digitalization World of digital twins and programmable logic controllers Digitalization As the world is getting increasingly complex with products controlled by a variety of software implementations, testing methods need to keep pace. Share this story: Digital twins offer a great possibility to simulate real world products before the actual product even exists. As product development is conducted in this kind of digital environment, there should be tools and methods the product in the very same environment and preferably in an effective way. Product testing by a human operator is of course possible but in many cases not feasible. Humans are prone to mistakes, repeatability is not the same and naturally the speed of testing is usually slower, not forgetting the work itself, which might be quite tedious if the same things need to be tested repeatedly. These are same reasons that have led SW testing on the path of automatization. With the help of test automation, the SW design industry has been given a powerful tool that can keep product quality on a high level. Nowadays, many industrial machines are relying on PLC (Programmable Logic Controller) technology. PLCs are present in many industry sectors and in a number of different applications. In the end, developing PLC SW is quite close to traditional SW development even though it might not require coding skills from the developer. In terms of quality, the same high level problem impacts both – SW regression. SW regression refers to an issue or bug in the program that has worked before but has stopped working due to the development of new features. These new features have usually, for a number of reasons, impacted the functionality of the older parts of the SW code. The main purpose of automated SW testing is to catch these regression bugs by running various tests continuously. Some other areas where SW test automation can be powerful are non-functional testing scenarios like performance or load testing. SW test automation is suitable for many areas The power of modern SW test automation tools and technologies is that they can be integrated into a variety of environments. Etteplan for example, offers SW and HW design services and solutions in the areas of embedded, cloud, web, mobile and industrial automation technologies. Therefore, for us it´s natural that we apply the best possible regression testing practices regardless of the technology domain. A while back we started to look for the best way to automate testing of PLC SW and run those tests in a digital twin simulator. As soon as we learned that our digital twin partner Mevea offers an API (Application Programming Interface) in their product and that they have a suitable demo machine, an excavator to be exact, available in their simulator, it was pretty obvious that we wanted to build a demo to automatically test the PLC SW controlling the excavator. Excavator in a digital twin simulator With the help of Python scripts and Robot Framework we built a test sequence that automatically sends excavator control commands to PLC SW running in the PLC HW and then verifies from the simulator that the given control commands result in the correct response with the simulated excavator model. This solution offers a possibility to replace a human test operator with a computer thus making the testing very solid, effective and fast. Automation goes even further Sometimes SW test automation requires some additional automation to its side to allow for completely autonomous processes. Let´s imagine that you are working as a PLC automation developer who creates PLC programs. In traditional SW development, the designer keeps the different code versions under version control. In order to track the new versions of the code, there´s typically some sort of CI/CD (Continuous Integration / Continuous delivery) engine or tool set up. The purpose of this tool is to automate various process steps such as building, programming to target and deploying the new code versions. Naturally, automated testing can also be just one step in this kind of process. Similarly, as in traditional SW development, PLC SW design can benefit from this kind of CI/CD practices and tools as well. So who knows, maybe the next target for our demo is to automate a new PLC SW version programming to PLC HW after the new program version is available in some location and on top of that, execute tests automatically. How would you benefit from this kind of automated process and technologies? Let us know and we´re more than happy to assist!