Function blocks under the hood
Thus far, we’ve explored function blocks a little, mostly how they work at a high level. However, only knowing how a function block works in practice will only get you so far. To fully understand what a function block is, we need to explore function blocks at a conceptual level.
What is a function block?
Okay, so we have established that a function block is analogous to a class in C++ or Java, and that a function block is a digital blueprint, but what exactly does that mean? Well, in short, a function block is a thing and contains all the necessary support logic for that thing to function. For example, consider a car. For a car to work, it needs things such as an engine, wheels, and a chassis. It will also need certain data such as the number of miles the car gets per gallon of gas. If you think about it in terms of manufacturing, you don’t want to have to draw a blueprint for each car that comes off an assembly line. Instead, you...