I have been using TwinCAT for quite some time now, and since I started developing software with TwinCAT it has changed almost everything for me as a software engineer, both as a profession and as a hobby. This includes the programming language, development environment, software development processes, hardware, communication protocols and much more. I have recently philosophized about how my life as a software developer has changed compared prior to doing automation software. Overall, I would say that I can do tremendously more things (in a reasonable amount of time) with TwinCAT by myself, than I could do before when I was developing software in the “standard” programming languages. It has given me opportunities to work with insanely fun projects that I would never have worked with if I didn’t start with PLC software development. What I would want to share with you is a list of five things that I think Beckhoff have done right, and five things that they could improve.
Write filters are an essential part of a PLC. In Beckhoff PLCs write filters redirect writes from a disk/partition to RAM or another disk/partition which is flushed after reboot.
The reason why you want to have a write filter on your PLC is simple; it’s to protect the PLC from write operations. We’ve all been in the situation where the OS is in the middle of a write, and for some reason it suddenly dies. After a reboot the system might be corrupted. With write filters, most changes in any applications or the operating system will not be persistent, which is often what you want in a system that runs 24/7 year after year. By protecting volumes from writes, the filter also reduces the wear of flash media. Because the filter puts the changes in volatile storage, it’s enough to do a simple reboot to get the system back in a well-known state. In this post I will go through the different types of write filters and discuss some of the finds I did with the new UWF (unified write filter) that comes with the Windows 10 enterprise operating system.
Doing version control is a natural part of any software engineers daily work. Doing version control for PLC software has historically mostly been hard, if not impossible. As many automation manufacturers store all software in binary blobs it has not been suitable for version control. Sometimes there have been proprietary solutions available, but it’s not until recently that a shift has started where source code is stored in plain text. For version control, Git has gained more and more popularity for over a decade.
Logging various form of data is common practice and is done in some form in more or less every industrial application. There are various ways to store the data such as databases and different cloud services. However, sometimes you just want to stick to the basics and store data as a file, for instance as comma separated values (CSV). Depending on the amount of data that needs to be written, it’s usually not the best idea to do a lot of writes to the PLCs local drive because of wear and accessibility, but rather to a network drive.
Last year in October, I got the opportunity to travel to Chile to work at Paranal and also visit Cerro Armazones, which is the site of where the Extremely Large Telescope (ELT) will be located. This post will not be about TwinCAT which I usually write about, but will solely be about this trip, simply because the trip was amazing and I need to share my experience/thoughts about it.
In one subsystem of the extremely large telescope (ELT) there are 132 Beckhoff PLCs running TwinCAT3, and this large amount has brought some interesting challenges to the ELT project. Upgrading the entire system one PLC at a time would be time consuming and prone to errors. When there is need for automation, the TwinCAT automation interface comes to the rescue. In the final part we go through the steps necessary to do the actual build and deployment to the software to all PLCs.
In part one of this series of posts an introduction was given to a very specific problem that needed to be solved in the ELT project. When doing software maintenance of a subsystem consisting of 132 PLCs, it’s not viable to do it manually as it would be prone to errors and be quite time consuming. In this part of this series we will investigate the more practical problems that needs to be solved for us to do the automated deployment of the software to all PLCs.
TcUnit is a unit testing framework made specifically for TwinCAT3. It’s an open-source project released under a MIT-license. Since the launch of TcUnit the response from users has been overwhelming! I’ve received tons of feedback from individuals and automation engineers from both small and large companies. Judging by the sheer amount of e-mails received over the last half year I would say that there is a big need for a unit testing framework for PLC developers.
The extremely large telescope (ELT) is a telescope currently under design/construction. With its 39 meter wide segmented primary mirror, once finished, it will be the largest optical telescope built. Once it will start to collect photons it will open new frontiers and extend mankinds knowledge about the universe. It’s a project with collaboration across the globe involving many universities, industries and organizations. It’s a mighty instrument including many fields of engineering such as electrical-, mechanical-, optical- and software engineering. Alright you get it. The ELT is big, cool and everything… but what does that have to do with the TwinCAT automation interface?