Memory organization takes into account the way a PLC divides the available memory into different sections. The memory space can be divided into two broad categories: program files and data files.
Program flies:
Program files are the part of the processor memory that stores the user ladder logic program. The program accounts for most of the total memory of a given PLC system. It contains the ladder logic that controls the machine operation.
Program files are the areas of processor memory where ladder logic programming is stored. They may include
System functions (file 0): This file is always included and contains various system-related information and user-programmed information such as processor type, I/O configuration, processor file name, and password.
Reserved (file 1): This file is reserved by the processor and is not accessible to the user.
Main ladder program (file 2): This file is always included and contains user-programmed instructions that define how the controller is to operate.
Subroutine ladder program (files 3–255): These files are user-created and are activated according to subroutine instructions residing in the main ladder program file.
Data Files:
The data file portion of the processor’s memory stores input and output status, processor status, the status of various bits, and numerical data. All this information is accessed via the ladder logic program. These files are organized by the type of data they contain and may include:
Output (file 0): This file stores the state of the output terminals for the controller.
Input (file 1): This file stores the status of the input terminals for the controller.
Status (file 2): This file stores controller operation information and is useful for troubleshooting controller and program operation.
Bit (file 3): This file is used for internal relay logic storage.
**Timer (file 4):**This file stores the timer accumulated and preset values and status bits.
The processor operates on two different data types: integer and floating point. All data types, except the floating-point files, are treated as integers or whole numbers. All element and bit addresses in the output and input data files are numbered actually. Element and bit addresses in all other data files are numbered decimally.
The PLC store all data in global data tables and are based on 16-bit operations. You access these data by specifying the address of the data you want. Typical addressing formats for the PLC-5 controller are as follows:
-
The addresses in the output data file and the input data file are potential locations for either input modules or output modules mounted in the I/O chassis.
-
The status data file contains information about the processor status.
-
The bit data file stores bit status. It frequently serves as storage when using internal outputs, sequencers, bit-shift instructions, and logical instructions.
-
The timer file stores the timer status and timer data. A timer element consists of three words: the control word, preset word, and accumulated word. The addressing of the timer control word is the assigned timer number.
-
The counter file stores the counter status and counter data. A counter element consists of three words: the control word, preset word, and accumulated word.
-
The control file stores the control element’s status and data, and it is used to control various file instructions. The control element consists of three words: the control word, length word, and position word.
-
The integer file stores integer data values, with a range from 232,768 through 32,767. Stored values are displayed in decimal form. The integer element is a single-word (16-bit) element
-
The floating-point file element can store values in the range from 61.1754944e-38 to 63.4028237e138. The floating-point element is a two-word (32-bit) element.
-
Data files 9 through 999 may be assigned to different data types, as required. When assigned to a certain type, a file is then reserved for that type and cannot be used for any other type. Additional input, output, or status files cannot be created