Programming Considerations for PLC-5 Processors F–11
Publication
65566.5.1 - October 1996
Creating Data Storage Files
You create data storage files in two ways:
• by directly creating data storage files
• each time you assign an address to an instruction
Good programming techniques suggest that you keep data storage
areas as small as possible to minimize scan time and avoid wasting
memory storage.
Directly Creating Data Storage Files
You create data storage files with your programming terminal by
entering the file address of the highest numbered element that you
want in the file.
For example: If you create a file by entering the address N7:9, the
processor allocates to that address all words (or elements) from that
address down to zero (10 words) or down to the next lower assigned
address. If the next lower assigned address was N7:3, your file at
address N7:9 would include six words down to N7:3 (Figure F.5).
Figure F.5
How
the Processor Allocates Data Storage
When Y
ou Create a File or Assign an Address
File N7
If there is no other address for File N7,
assigning an address of N7:9 creates a
10word file.
N7:9
0
File N7
If you previously created File N7:3,
assigning an address of N7:9 creates a
6word file down to word 3.
N7:9
0
N7:3
Data Storage Created by Assigning Addresses
When you assign an address to an instruction, the processor allocates
memory storage in a data file. The processor creates the data file
automatically. The size of the file is equal to the number of elements,
words, or bits from the assigned address down to zero or down to the
next lower assigned address.