Today on this day five years ago, I published my first entry on this blog. These last five years have been an amazing trip, and the number of visitors has seen a steady growth.
Dear existing & future PLC software developers, I have published part 8 of my free PLC programming using TwinCAT 3 tutorial.
As TwinCAT 3 conforms to the IEC61131-3 standard, there are certain things it has to be able to do. The Tc2_Standard library has many of the standard IEC functions such as timers and triggers, which we will look into in this part of the tutorial.
Dear existing & future PLC software developers, I have published part 7 of my free PLC programming using TwinCAT 3 tutorial.
In this part we will go back to basics of IEC 61131-3 and structured text and look into instructions. This will cover
FOR/WHILE-loops. We will utilize our knowledge to write a CSV (comma separate value) event logger by using a state machine.
Dear existing & future PLC software developers, I have published part 6b of my free PLC programming using TwinCAT 3 tutorial.
In this part we will continue our journey of the object oriented features of IEC 61131-3 and look into something called interfaces. Interfaces provide a layer of abstraction so that you can write code that is ignorant of unnecessary details. Interfaces aid you in designing more modular and robust software. With interfaces it’s possible to decouple direct dependencies between objects in your software.
I have reached 1000 subscribers on YouTube! I never thought I’d get anywhere close to this huge amount of subscribers, especially not this fast! Since I published the first episodes of the “PLC programming using TwinCAT 3 tutorial” in the beginning of March on YouTube, the channel has received over 30.000 views. It seems free PLC programming tutorials are appreciated. It’s time to celebrate and answer some questions that I’ve got from you viewers!
Some time ago I wrote a post about developing code for different runtimes, and since then I’ve come to the realization that there is so much information missing in that blog post that I simply needed to write another one. What’s even worse is that the information regarding development, deployment, and just general handling of several TwinCAT versions on the Beckhoff website is not that good. I’ve talked to numerous automation engineers regarding this topic, and everyone seems to have a different understanding about it. As I was working in a development project that had many PLCs (hundreds!) with different versions of TwinCAT, I finally had a good excuse to dive into the details of this. With this blog post, I’d like to share some of the facts and misconceptions.
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.
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.