10
Unleashing Built-In Function Blocks
As a PLC programmer, whether you’re a professional, student, or hobbyist, you’ve almost certainly run into situations where you needed to copy and paste a series of instructions in multiple places. In programming, having code in more than one location is a terrible practice that should only be exercised in extenuating circumstances. This can lead to a catch-22; on one hand, you may legitimately need the functionality, but on the other, it’s a sloppy practice to have the same functionality in more than one location. In that case, what should one do?
A core tenet of any modern programming system is a concept known as code reusability. To accomplish this, entities known as functions and function blocks are ...
Get PLCs for Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.