Not all file types need to distinguish individual words and bits. When an address appears in a PLC program, special characters are used to separate (or “delimit”) different fields from each other. This file-based addressing notation bears further explanation. You would not typically see an integer word addressed as N:30 (integer word 30 in the PLC’s memory) for example, but rather as N7:30 (integer word 30 in file 7 of the PLC’s memory) to distinguish it from other integer word 30’s that may exist in other files of the PLC’s memory. Thus, file numbers and file type letters for data types other than output (O), input (I), and status (S) always appear together. Other file types such as B (binary), T (timers), C (counters), and others have their own default file numbers (3, 4, and 5, respectively), but may also be used in some of the user-defined file numbers (10 and above).įor example, file 7 in an Allen-Bradley controller is reserved for data of the “integer” type (N), but integer data may also be stored in any file numbered 10 or greater at the user’s discretion. Thus, the letter designators O, I, and S (file types) are redundant to the numbers 0, 1, and 2 (file numbers). In Allen-Bradley PLCs such as the SLC 500 and PLC-5 models, files 0, 1, and 2 are exclusively reserved for discrete outputs, discrete inputs, and status bits, respectively. For example, the first bit (bit 0) of the second element in file 3 (Binary) would be addressed as B3:2/0. Within each of the Allen-Bradley PLC’s “files” are multiple “elements,” each element consisting of a set of bits (8, 16, 24, or 32) representing data.Įlements are addressed by number following the colon after the file designator, and individual bits within each element addressed by a number following a slash mark. a word processing file or a spreadsheet file), usually stored on the computer’s hard disk drive. The following table shows a partial memory map for an Allen-Bradley SLC 500 PLCīy contrast, a “file” in a personal computer is a contiguous collection of data bits with collective meaning (e.g. However, enough legacy Allen-Bradley PLC systems still exist in industry to warrant coverage of these addressing conventions.
Note 1 : The most modern Allen-Bradley PLCs have all but done away with fixed-location I/O addressing, opting instead for tag name based I/O addressing. For these two reasons (popularity and confusion), I will focus on Allen-Bradley addressing conventions for the bulk of this section. The most common brand of PLC in use is Allen-Bradley (Rockwell), which happens to use a unique form of I/O addressing (Note 1), students tend to find confusing. This makes it difficult to write a general tutorial on PLC addressing, and so my ultimate advice is to consult the engineering references for the PLC system you intend to program. The association between I/O points and memory locations is by no means standardized between different PLC manufacturers, or even between different PLC models designed by the same manufacturer. Similarly, analog input and output channels on a PLC correspond to multi-bit words (contiguous blocks of bits) in the PLC’s memory. Virtually every microprocessor-based control system comes with a published memory map showing the organization of its limited memory: how much is available for certain functions, which addresses are linked to which I/O points, how different locations in memory are to be referenced by the programmer.ĭiscrete input and output channels on a PLC correspond to individual bits in the PLC’s memory array. This is sage advice for any programmer, especially on systems where memory is limited, and/or where I/O has a fixed association with certain locations in the system’s memory. A wise PLC programmer once told me that the first thing any aspiring programmer should learn about the PLC they intend to program is how the digital memory of that PLC is organized.