Hardware

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.

Basic principle of a write filter

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.

Read more

Most people who have developed software have at some point or another used virtualization technology. Software development for PLCs in a virtual environment is often overlooked, since PLC development is so close to the hardware. Nevertheless, there are still advantages. Working for several projects with various requirements, but where a Beckhoff PLC/TwinCAT was the common delimiter, made me ask myself “How much use of virtualization can I do for TwinCAT software development?”

Read more

I’ll admit it, I’m a sucker for Thinkpad laptops. I’ve used the Thinkpad-series laptops since ~20 years or so (when IBM still owned the brand and manufactured them). They are high quality, they are easy to upgrade, they are maintainable, and they just got that “Engineer”-type of look over them. Most parts in a Thinkpad are replaceable, and that’s just one of the reasons why people have them for so long time. This is in contrast to other manufacturers which in most cases require you to send the computer in to a licensed repair-shop (no names mentioned, but one example starts with an A and ends with an E, and has PPL in between. The Thinkpad laptops are simply for people that want to get shit done. That’s why I’m not surprised that you almost never see Thinkpads in trendy cafeterias, but instead where people do actual work.

Read more

We’re finally at the last post of this series! Patiently we’ve written all our tests and done all our code that implements the required functionality and made sure that our code passes all the tests. But in the end of the day, despite all the theory and coding we want our code to run on a real physical device. Now it’s time for the favorite part of every PLC programmer, which is getting down to the hardware and micro controllers! Let’s get to the grand finale, and test our code on a real PLC, IO-Link master and IO-Link slave.

Read more

When I develop software I mostly do the testing on my development computer. It is after all one of the big strengths of being able to run your code on a PC platform – it should more or less work the same on a PC based PLC. But then there is only so much testing you can do in your development machine, at some point you still end up needing to have the real hardware. I’ve already ended up with having some EtherCAT-slaves connected to the development computer so I decided I’ll go for a PLC to split the development computer and run-time environment completely. As Beckhoff has released PLCs from their embedded line with Windows 10 IoT Enterprise LTSB I though that was another reason good enough to buy one and experiment with it. Ended up with a CX5140 with 4gb of RAM and 32GB of flash-storage. Works like a charm out of the box, and I’ve already noticed some changes compared with running a controller with Windows 7 embedded. Since Windows 8 embedded, Microsoft have apparently replaced the FBWF (File-Based Write Filter) with the new UWF (Unified Write Filter). I’ll continue running/testing all my code on this controller, and will be posting new content to this blog as often as I can.

Read more