Can an Arduino PLC talk the same language as a Beckhoff PLC? Absolutely yes! In this video we will make an Arduino PLC talk to a Beckhoff PLC using Modbus TCP. The Arduino PLC will act as a Modbus TCP client, and the Beckhoff PLC will act as a Modbus TCP server. By utilizing two function blocks, we will make the Arduino both read and write registers in the Beckhoff PLC.
Arduino PLC
The Arduino PLC and the Arduino PLC IDE… there has been a lot of buzz around it since it was announced recently. I’m a long-time user of the Arduino eco-system and have been using their IDE for over 10 years for various projects. Guess if I was surprised when they released their new IDE aimed at the industrial automation industry! The Arduino PLC IDE only supports one board right now, the Arduino Portenta Machine Control, and luckily I had just been using one of these boards for another project recently, so I could try the new PLC IDE that Arduino have released.
I thought I’d share my initial impressions, findings, praises & complaints with all of you by making a YouTube video where I go through the complete process of installing the IDE and configuring one Arduino board to run a simple PLC program.
XPlanar with Isaac Spear – Part 3
The final part of the XPlanar series is out now! In this third and last part we will finish the TwinCAT 3 project we started and finally run the whole project in simulated mode.
XPlanar with Isaac Spear – Part 2
Part 2 of the XPlanar series is out now! In this second part we will create a new TwinCAT 3 project and get introduced to the XPlanar configurator. We will also start writing the software for XPlanar.
XPlanar with Isaac Spear – Part 1
Together with Isaac Spear from Beckhoff Automation USA I’ve created a series of three videos where we will look into XPlanar, which is Beckhoff’s planar motor system, which combines the advantages of conventional transport technologies with magnetic levitation. In this first part we will get an introduction to the system and the theory behind it. In the later videos we will do some practice.
4 things we want in TwinCAT 4
I’ve been using TwinCAT 3 more or less since it was released, and since then it has become such an integrated part of my daily work that it’s my main software development platform. I like to develop software using TwinCAT 3, but I’ve come to the conclusion that there are some features I miss. I’m not the only person that uses TwinCAT 3, and this video is made in collaboration with someone that has vastly more experience in industrial automation than me – Peter Kurhajec. As we both work with TwinCAT 3 on a daily basis, we decided to do a video with the title “4 things we want in TwinCAT 4”. Consider this as a wish list for a future version of TwinCAT, so some kind of dream session.
Local enumerations in TwinCAT 3
One of the things that have annoyed me ever since I started using TwinCAT is the fact that if you create an enumeration, it will automatically have a global scope. It will be accessible from all functions and function blocks. What’s even worse is that if you create a library project with an enumeration and include that library in another project, the enumeration will be visible there, too. This pollutes the namespace by creating unnecessary types. But no more.
Handling different versions of TwinCAT
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.
The five best and worst things with TwinCAT
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.
PLC naming conventions
Name a few things that software developers always have strong opinions about and naming conventions on code is one of the things that surely will come up. What lengths for identifiers should we use? Should we use hungarian notation? CamelCase or under_score case? While programming guidelines covering these topics have been existing since the rise of the early programming languages, they are much less common for industrial control.
Initially the only one that I found was Beckhoffs for TwinCAT3. Most of Beckhoffs libraries and example code used this, even though even Beckhoff themselves have not been consistent. More recently PLCopen have released their coding guidelines written specifically for IEC61131-3. Just out of curiosity I decided to compare the two standards and their take on naming conventions, and comparing them to my own personal opinions.