User guide

Chapter 4
Data File Organization and Addressing
419
The SLC 500 controller provides the flexibility of a user-configured memory.
Data is created, in the Offline mode, in two ways:
Assign addresses to instructions in your program When you assign
an address to an instruction in your ladder program, you are allocating
memory space in a data file. Data files are expanded for instructions that
use File Addresses. As more and more addresses are assigned, the
various data files increase in size, according to the needs of your program.
Memory space is allocated in element blocks, beginning with element 0.
For example, suppose the first address you assign in your program is
B3/16. This allocates two elements to your program: B3:0, which
consists of bits B3/0 through B3/15; and B3:1, which consists of bits
B3/16 through B3/31. Since B3/16 is the first bit of element B3:1, all 16
bits of that element are created, therefore, the highest bit address now
available to you is B3/31. If the first timer element you assign in your
program is T4:99, you allocate timers T4:0 through T4:99. As described
on page 49, timers are 3word elements. By assigning timer T4:100
you allocate 100 elements using 300 words of memory. So whether you
use timers T4:0 through T4:98 later in the program, they are allocated in
memory.
Obviously, you can keep the size of your data files to a minimum by
assigning addresses beginning at element 0 of each data file, and trying to
avoid creating blocks of addresses that are allocated but unused.
Create files with the memory map function The memory map
function of the programming device allows you to create data files by
entering addresses directly, rather than assigning addresses to instructions
in your program. You can create data files to store recipes and lookup
tables if needed.
You create a data file by entering the highest numbered element you want
to be included in the file. For example, entering address N7:20 creates 21
integer elements, N7:0 through N7:20.
Creating Data for Indexed Addresses
Data tables are not expanded automatically to accommodate indexed
addresses as described on page 414. However, the data tables are expanded
for file addresses. You must create this data with the memory map function
as described in chapter 6.
Creating Data