Falafel is delicious if you make it from scratch, but it can be quite time-consuming. The ready-made falafel or the dried mix you can buy is mediocre and doesn’t hold a candle to the real deal. But, I found an easy trick to improve the texture of the dry mix falafel by adding baking soda. The improved texture does wonders for the taste as well. Here’s how you can make it.
Connecting to a PLC from a virtual machine can be challenging. In this article I show a step-by-step guide how to connect to a Siemens Simatic PLC. Although this process is probably be similar for other PLCs. I also show a few tips and tricks on how to debug the process.
Chat-GPT is OpenAI’s latest release of it GPT series language models. Its capabilities have surpassed a threshold that made it famous outside of the IT crowd. In the mean time, it has gathered many supporters and possibly even more haters. Let me test its ability to generate structured text.
MC_TorqueControl
is a method to force or torque control an axis. In this article, I show how to set up a simple project and use this function.When you’re working with ADS, you often need to know the size of a data type or what a data type is called in your .NET language. I couldn’t find the combined information, so I decided to make the overview myself.
Earlier I talked about how you can prevent page faults from references. In this post, I try to show a complete overview of page fault origins and how to prevent them.
TwinCAT/BSD is a new operating system for the TwinCAT runtime. It has a small footprint and it’s free. Furthermore, TwinCAT/BSD allows you to run TwinCAT code locally when you have Hyper-V enabled if you install it on a virtual machine. In this tutorial, I go over the installation of TwinCAT/BSD on VMware and Virtual Box and show some basic usages of Tc/BSD.
Earlier I talked about how you can do version control of your TwinCAT code with git. In this post, I want to show a neat feature of git which I didn’t mention last time: pre-commits. Pre-commits can format, lint, or do static code analyses on your code before committing. One pre-commit is available for structured text files. But, pre-commits are also available for markdown, HTML, or JavaScript files.
Recently a user on the LinkedIn TwinCAT forum shared and example how to use the RowClassesProvider. When I tried the example and went looking for the documentation, there was none to be found! On the whole internet, there is one (1!) example which sort of shows the function. In this post I will show what the RowClassesProvider does and how you can use it to dynamically color data grids.
Over the years I’ve come across some features of TwinCAT or programming in general which can improve your code or your coding experience. Read on to level up your TwinCAT game in 2022!
Since a few years it is a tradition under programmers and puzzle enthusiasts to take part in Advent of Code. Puzzles are posted each day from the 1st of December until the 25th of December. The people of the internet try to solve them as quick as possible and their times are published. In this post I compare the time it took the top 100 to solve the puzzles over the years.
When I was a teenager I tracked my body length on the side of my wardrobe. When the wardrobe got trashed, I copied the length markings over on a piece of paper. Recently I found this paper again and decided it would be nice to plot the data. The data processing actually took me on an interesting journey which involved data interpolation and polynomial regression.
Units of values are very important, but also easy to screw up. The F# programming language found a nice solution to this problem. Because units are all over the place in an average PLC project, I started to think about how to replicate this behavior in TwinCAT. Eventually I found a method which gives compiler errors if the wrong units are used.
When you’re developing PLC code it can be difficult to test the behavior of the whole code, due to all the disconnected in and outputs. A colleague of mine found a nice solution how you can create a digital twin of the real machine. The digital twin then simulates the behavior of the real one. In this article I’ll show you how you can do this with a simple oven project.
Easy, tasty, vegan, cheap, leftovers. A simplified and Europeanized version of The Best Vegetarian Chili from The Food Lab by J. Kenji López-Alt.
My parents bought a new fridge a few years ago. After the first year the energy bill came in and it was drastically lower then the year before. A large part of the energy saving came from the new fridge. As I started to look into the savings, I learned some interesting developments in the household appliances sector.
A lukewarm semi-fresh, semi-fried summer starter dish.
Source control is an essential tool when you’re developing software. Yet, there is little information online on how to do it for TwinCAT projects. In this post, I share some tips and tricks I picked up along the way. The main focus is git, but many points apply to other source control systems as well.
I was wondering if overloading functions in TwinCAT was possible, but I found out that this is not the case. I did however realize that overloading is possible using a few work-arounds. In this article I’ll show how to mimic this behavior with extended structs.
Use this easy wok sauce to make a quick (vegan) meal which tastes great!
The other day I answered a question on StackOverflow on how to unit test code from a separate project. To increase its exposure I also added it here.
I don’t eat too much meat these days and one of the things I really miss is a good bolognese sauce. Since bolognese revolves so much around meat, it is not easy to veganize. However, I now found a really great alternative, mostly based on a recipe by J. Kenji López-Alt.
Recently I was coding up a new function block and passed another function block by reference to it. Somewhere I forgot to check if the reference was valid before using it and 💥 Page Fault! After some thinking I came up with a few solutions how this can be prevented and even how you could catch mistakes like this at compile time instead of during run time. Let me show you what I did.
Let’s be real, tofu on its own is the not most exciting thing. Recently however, we made a recipe where the tofu was really good! Let me share it with you.
Not many things can beat the taste and smell of a freshly baked bread. Unfortunately this fresh-bake taste quickly disappears and the texture becomes worse with time. After day two, the bread is nothing like it was when you bought it. Luckily you can bring it back to (almost) its new state with a simple trick!
In an earlier article, I introduced the PLC part of the TwinCAT EventLogger and showed some useful features. In this article, I go into the details on how to visualize the events using TwinCAT’s web-based HMI (TE2000).
Mijn moeder noemde het altijd slaap, mijn vriendin kladjes en een vriend kwam laatst met oogpitjes. Om erachter te komen of er nog meer woorden voor waren, plaatste ik een oproep op Reddit. Ik was verbaasd over de grote verscheidenheid aan termen voor dit fenomeen!
Keeping track of all the things that are happening on your machine can be a daunting task, whether it’s expected events or unexpected warnings and errors that you want to inform the user of. Luckily, Beckhoff provides us with a tool that can help with that: namely, the EventLogger. In this article, I will introduce the PLC part of the EventLogger and show some useful features (code: PlcPart). A second article will show how to visualize the events using TwinCAT’s web-based HMI (TE2000) (code: HmiPart).
During the first Corona wave in March-April 2020, I noticed that there was very little cloud cover in Switzerland and the Netherlands. Then, I remembered this article where they saw similar effects after 9/11. So, I collected weather data and crunched the numbers to see if it was just me or if it really was sunnier than usual.
In this article, I want to highlight a useful and fairly new TwinCAT feature: Stand-alone PLC projects. As usual, Beckhoff’s InfoSys provides a good explanation of how to set up and run such a project from scratch. However, there is little information on why the separation might be a good idea, how to separate an existing project, and some of the pitfalls you might encounter.
I came across an article where the authors used a simple model to forecast the total installed wind and solar power. I decided to do a similar analysis for the electric vehicle market.