3PLC Data Types
3PLC Data Types
Types of Memory
When power is
removed,
Types of Memory Erasing Programming Memory
contents are:
RAM Random Access Memory Electrical Electrical Volatile
Using masks in
ROM Read Only Memory Manufacturing
Not possible process
PROP Programmable ROM
CPU
Work Memory (RAM)
contains the executable user program
(for example logic and data blocks)
Load Memory
(FEEPROM/EEPROM) System Memory (RAM)
Contains the entire
Block stack, Interrupt stack
User Program
Diagnostic buffer, Local data stack
process image input/output tables,
bit memory, timers, counters
Nikini
PLC Memory
MSB LSB
27 26 25 24 23 22 21 20
LS Byte
MS Byte
Double Word MD100
LS Byte
Nikini
PLC Memory
• Bit is the abbreviation for binary digit.
– The BIT is the smallest binary (bivalent) information
unit.
– It can accept a signal status of “1” or “0”. 0
• BYTE.
– A byte has the size of 8 bits.
0 1 0 1 1 0 0 1
Nikini
PLC Memory
• WORD
– The word length corresponds to the number from 16
binary characters.
– A word also has the size of 2 bytes or 16
MSB LSB
1 0 1 0 0 0 0 1 1 0 1 0 0 1 0 0
• DOUBLE-WORD
– A double-word corresponds to the word length of 32
binary characters.
MSB LSB
1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0
Nikini
Memory addressing
MSB LSB
7 6 5 4 3 2 1 0
0
Bit
1
I 0 . 3
2
The CPU samples the physical input points at the beginning of each
scan cycle and writes these values to the input image register.
At the end of the scan cycle, the CPU copies the values stored in the
output image register to the physical output points.
Format:
Bit M [byte address]. [bit address] M2.3
Byte, Word, Double Word M [size]. [Starting byte] MD5
Nikini
Variable (V) memory
Variable (V) memory :
Format:
Bit V [byte address]. [bit address] V3.1
Byte, Word, Double Word Q [size]. [Starting byte] VW4
Nikini
Special Memory (SM) bits
Special Memory (SM) bits :
e.g A bit that turns on for the first scan, bits that toggle at fixed
rates.
• Timer bit : This bit is set when the current value is greater
than or equal to the preset value.
15 0
15 0
Nikini
Analog Inputs (AI) and
Outputs (AQ)
Analog Inputs (AI)
• Indirect Addressing: