D AT A T ABLE O R G A N I Z AT I O N

D AT A T ABLE O R G A N I Z AT I O N

The data table’s organization, or configuration as it is sometimes called, is very important. The configuration defines not only the discrete device addresses, but also the registers that will be used for numerical and analog control, as well as basic PLC timing and counting operations. The intention of the following discussion of data table organization is not to go into detail about configuration, but to review what you have learned about the memory map, making sure that you understand how memory and I/O interact.

First, let’s consider an example of an application memory map for a PLC. The controller has the following memory, I/O, and numbering system specifications:

• total application memory of 4K words with 16 bits • capability of connecting 256 I/O devices (128 inputs and 128 outputs) • 128 available internal outputs • capability of up to 256 storage registers, selectable in groups of 8-

word locations, with 8 being the minimum number of registers possible (32 groups of 8 registers each)

• octal (base 8) numbering system with 2-byte (16-bit) word length Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Memory System C HAPTER 2 and Systems

and I/O Interaction 5

To illustrate this memory map may seem unnecessary, but at this point, we do not know the starting address of the control program. This does not matter as far as the program is concerned; however, it does matter when determining the register address references to be used, since these register addresses are referred to in the control program (i.e., timer preset and accumulated values).

With this in mind, let’s set the I/O table boundaries. Assuming the inputs are first in the I/O mapping, the input table will start at address 0000 8 and end at address 0007 8 (see Figure 5-15). The outputs will start at address 0010 8 and end at address 0017 8 . Since each memory word has 16 bits, the 128 inputs require 8 input table words, and likewise for the outputs. The starting address for the internal output storage area is at memory location address 0020 8 and continues through address 0027 8 (8 words of 16 bits each totaling 128 internal output bits). Address 0030 8 indicates the beginning of the register/word storage area. This area must have a minimum of 8 registers, with a possibility of up to 256 registers added in 8-register increments. The first 8 required

Word Address

Octal 0000 8

Input Table

Output Table

User Program

Figure 5-15. I/O table and user memory boundaries.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION Components The Memory System C HAPTER 2 and Systems

and I/O Interaction 5

registers, then, will end at address 0037 8 (see Figure 5-16). Any other 8- register increments will start at 0040 8 , with the last possible address being

0427 8 , providing a total of 256 registers. If all available storage registers are utilized, then the starting memory address

for the control program will be 0430 8 . This configuration will leave 3816 (decimal) locations to store the control software. Figure 5-15 showed this maximum configuration.

Word Address

Figure 5-16. Breakdown, in groups of eight, of the register storage area at its

maximum capacity.

Most controllers allow the user to change the range of register boundaries without any concern for starting memory addresses of the program. Nonethe- less, the user should know beforehand the number of registers needed. This will be useful when assigning register addresses in the program.