8

Exploring Variables and Tags

In Chapter 4, we explored the basics of how computer memory works. In this chapter, we’re going to take those principles and apply them to PLC programming. Unless you’re working on a very trivial program, you’re going to have to implement variables at one point or another. Moreover, it is a necessity for a programmer, no matter whether they are a PLC programmer or a person writing code for more traditional applications, to understand what variables are and how they work.

In automation, variables are everything. If a sensor is connected to a PLC, the software will require a variable to read the incoming data. If the PLC needs to take an input, a variable will be needed to store the input data. All in all, variables ...

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.