What are prebuilt function blocks?
Some operations are so common in PLC programming or programming in general that the developers of the programming tool will often build them into the system. What can be considered a function will vary by name from device manufacturer to device manufacturer; however, for this book, we’re simply going to refer to this prebuilt code as functions. Thus far, we have seen prebuilt functions in the form of mathematical operations such as the trig functions, and the more complex math functions, such as the ABS operation and so on. Prebuilt functions extend well beyond mathematical applications and can be found for a variety of tasks. For those who are familiar with Ladder programming, the counter function and the timer function may ring a bell.
There is a difference between a function and a function block in IEC 61131-3. A function is akin to the mathematics functions that were explored in the last chapter. On the other hand, a function block is...