2. Memory Structure &
Organization
As mentioned previously, there are three
basic types of memory structures and
organizations:
Address-based memory
Tag-based memory
Combination of Address/Tag-based memory
3. Rack-Based Memory
Representation of
most rack/slot
address-based PLCs.
Represented by a
two drawer file
cabinet.
One drawer for data
files
One drawer for
program files
James A. Rehg, Glenn J. Sartori, Programmable Logic Controllers, 2nd Edition, Pg. 85
4. Program Memory
The user program
accounts for most of the
memory in a PLC system.
Program files contain the
logic that controls the
machine operation. This
logic consists of
instructions that are
programmed in ladder
logic format.
James A. Rehg, Glenn J. Sartori, Programmable Logic Controllers, 2nd Edition, Pg. 85
5. Memory Addressing
A memory address is a location within the PLC
memory where information is stored.
The Allen Bradley SLC500 series PLC uses an
alpha numeric sequence separated by delimiters
that specifies the:
Type of data (bit level or word level)
Slot location of an I/O module in a rack when
addressing field I/O
Word number in memory, (Word is also referred to as
an element)
Input or output number for field I/O and bit number for
internal coils and contacts.
7. AB SLC500 I/O Address
Format
I1:4.0/4
File type
File number
File delimiter
Slot or element number
Word delimiter
Word number
Bit delimiter
Bit or terminal
number
States: Input module in slot 4 IN4
O0:5.0/13 – Output module, slot 5, OUT13
8. AB SLC500 I/O Address
Format
I1:4.0/4
File type
Required
File number
Only required when a
user defined file is
being specified.
File delimiter
Required
Slot or element number
Required
Word delimiter
Only required when
specifying a word number.
Word number
Only required if pointing to a
word other than word zero.
Defaults to word zero.
Bit delimiter
Only required when
addressing to “bit level”.
Bit or IN/OUT number
Only required when addressing to “bit
level”.
This address can be rewritten as: I:4/4
9. SLC500 Default File Types
File Type Identifier File Number
Output O 0
Input I 1
Status S 2
Bit B 3
Timer T 4
Counter C 5
Control R 6
Integer N 7
Floating Point * F 8
* Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 &
SLC-5/05 processors
10. SLC500 User Defined File
Types
File Type Identifier File Number
Bit B 91 - 255
Timer T 91 - 255
Counter C 91 - 255
Control R 91 - 255
Integer N 91 - 255
Floating Point * F 91 - 255
String * St 91 – 255
ASCII * A 91 - 255
Special Note1 Computer Interface File (CIF)1 9
•Available in SLC-5/03 OS301, OS302 & SLC-5/04 OS400, OS401 & SLC-
5/05 processors
1 The only file that data can be xmitted/received to/from non-IP devices
11. Data Files in the Project
Window
RSLogix 500 Default Files
12. Input/Output Elements
I/O modules are considered to be one element (word)
files. In the SLC500 series this means that a 16-point
module uses one 16-bit word. An SLC500, 32-point
module will use two 16-bit words (32-bits).
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
15 10 9 8 7 6 5 4 3 2 1 014 13 12 11
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
0
1
2
Bit numbers (16-bit word(s))
Element or word number
13. Addressing Input/Output
Elements (Words (16-bit PLC))
I/O addressing for modules that have 8-points, 16-points & 32-points.
To address bit-9 of the input module in slot-1; I1:1.0/9 or I:1/9
To address bit-5 of the input module in slot-3; I1:3.0/5 or I:3/5
To address bit-14 of the input module in slot-6; I1:6.0/14 or I:6/14
To address bit-6 in the second word of the module in slot-6; I1:6.1/6 or I:6.1/6 or I:6/22
16-point module in slot-1
Requires 1-word
16-point module in slot-4
Requires 1-word
8-point module in slot-3
Requires 1-word
only uses the lower byte
32-point module in slot-6
Requires 2-word
Word-0 for the first 16-bits
Word-1 for the last 16-bits
Screen shot of an input data table from RSLogix 500
14. Bit File, File #3
File #3 is the bit file and is designated with
the letter ‘B’.
One application for the bit file is for internal
control relays where each bit can be a relay
coil.
In the SLC500 the bit file contains 256, 16-bit
words for a total of 4,096 bits.
Each bit, when used as a coil, can have an
unlimited number of normally open and/or
normally closed contacts programmed to it.
15. Addressing the Bit File
The bit file is addressed using the same
address structure as the Input/Output file.
The differences are:
The letter used for the file designator will now be
the letter ‘B’
There is no slot number. What was the slot
number, now becomes the word number within
the file.
The following address references word 0, bit
0, of the default bit file.
B3:0/0 or B:0/0
16. Addressing the Bit File
Addressing Bit 12 in word 255 of the
default bit file would be:
B3:255/12 or B:255/12
Addressing Word 42, bit 7, of the user
defined bit file number 12 would be:
B12:42/7
In this example the file number is required
because it is a user defined file.
17. Input Interaction
Limit switch is open, or off.
It is wired to IN7 of the input
module. If this input module is
in slot-1 of the PLC rack, the
switch status will be stored in
bit-7 of the word associated
with slot-1.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
VDC
2
4
5
6
3
1
0
7
COM
02040506 03 0107 0010121314 11 0915 08
Word I:1.0
Limit
Switch
Input
Address
I:1/7
18. Input Interaction
Limit switch is closed, or on.
It is wired to IN7 of the input
module. If this input module is
in slot-1 of the PLC rack, the
switch status will be stored in
bit-7 of the word associated
with slot-1.
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
VDC
2
4
5
6
3
1
0
7
COM
02040506 03 0107 0010121314 11 0915 08
Limit
Switch
Input
Address
I:1/7
Word I:1.0
19. Output Interaction
The logic of the control
program evaluated bit-5 of the
output module in slot-2 as
false, or off.
The output device wired to
OUT5 of the output module in
slot-2 will turn off.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
VDC
2
4
5
6
3
1
0
7
COM
02040506 03 0107 0010121314 11 0915 08
Word O:2.0
Output
Device
Tag and
O:2/5
20. Output Interaction
The logic of the control
program evaluated bit-5 of the
output module in slot-2 as
true, or on.
The output device wired to
OUT5 of the output module in
slot-2 will turn on.
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
VDC
2
4
5
6
3
1
0
7
COM
02040506 03 0107 0010121314 11 0915 08
Output
Device
O:2/5
Word O:2/0
21. SLC500 Basic Bit Level
Instructions
Normally Open
Examine if Closed
XIC
Normally Closed
Examine if Open
XIO
Output Coil
Output Energize
OTE
Rung Comment
Instruction
Description
Address Symbol
Address
Shown split with
bit number at the
base of the
instruction
Bit number
Rung number
Default color scheme shown
22. Processor Scan
The processor evaluates the program logic
similar to the way we would evaluate
electromechanical ladder logic:
Top to bottom, left to right, one rung at-a-time.
This process is called Processor Scan or
simply Scan.
Read Input
Device Status
Solve the control program
logic based upon the
status of the input devices
Update the
status of
the output
devices
Housekeeping
and
communications
Scan Cycle
Read input
status
Solve the control
program and turn
internal coils on/off
Update the
outputs
Housekeeping
and
Communications
23. Other One Element Files
(16-bit PLC)
The input and output files are not the only 1-element (1-word) files.
The following files are also 1-element (1-word) files:
Status (file-2) Number of words in the file depends upon the processor
type
Bit (file-3) 256, 16-bit words are available in each bit file
Integer (file-7) 256, 16-bit words are available in each integer file
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
15 10 9 8 7 6 5 4 3 2 1 014 13 12 11
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
0
1
2
Bit numbers
Element or word number
24. Three or more Element
Files (16-bit PLC)
Some file types in the Allen Bradley SLC500 series PLC
require more than 1-word per instruction.
Timers, Counters and Control instructions are such files.
Each timer, counter or Control instruction requires 3-
words.
0 0 0 0 0 0 0 00 0 0 0 0 0 0 0
15 10 9 8 7 6 5 4 3 2 1 014 13 12 11
0
1
2
Element or word number. Word-0 will contain instruction
status bits. Values stored in words-1 & 2 will depend upon
the file type being addressed.
Bit numbers
Notes de l'éditeur
Addressed-based memory is used in the SLC500, MicroLogix, many systems in the Automation Direct family of PLCs, etc.
Tag-based memory is used in the ControlLogix, CompactLogix, Automation Direct Productivity Series, etc.
Combinations of address/tag based memory can be found in the Siemens S7-300/S7-1200 series PLCs
As mentioned earlier in the course, slots are usually numbered from left to right with the left most slot starting at slot number zero. It is always best to check the manufacturers information as to how a particular rack/slot location is referenced.
Delimiter
A punctuation character or group of characters that separates two names or two pieces of data, or marks the beginning or end of a programming construct. Delimiters are used in almost every computer application. For example, in specifying DOS pathnames, the backslash (\) is the delimiter that separates directories and filenames. Other common delimiters include the comma (,), semicolon (;), quotes ("), and braces ({}).