Introduction to memory classification of PLC system

Understanding PLC Memory Classification

Programmable Logic Controllers (PLCs) are the backbone of modern industrial automation. A critical component governing the performance and reliability of any PLC system is its memory architecture, which stores data, variables, and execution instructions. Proper understanding of PLC memory types—RAM, ROM, and EEPROM—is essential for efficient control programming, memory optimization, and system troubleshooting.

Memory Type Comparison

PLC memory is structurally divided based on volatility and programmability. Below is the technical breakdown of the three primary memory classifications used in industrial controllers.

Memory Type Volatility Primary Function Characteristics
RAM (Random Access Memory) Volatile (Requires Power/Battery) Data Memory & Active Program Execution Stores constantly changing values (sensor inputs, outputs, timers, counters). Data is lost upon power failure unless battery-backed.
ROM (Read-Only Memory) Non-Volatile Firmware & System OS Storage Permanently programmed at the factory. Retains critical boot instructions and operating system data even without power.
EEPROM (Electrically Erasable Programmable ROM) Non-Volatile User Programs, Recipes & Setpoints Can be written, erased, and reprogrammed by the user. Ideal for variable data that must survive power cycles. Has a limited write-cycle lifespan.

Application & Architecture: Data vs. Program Memory

Within the RAM architecture, memory is functionally split into two distinct areas to ensure deterministic scanning and execution:

  • Data Memory: Acts as the scratchpad for the PLC. It temporarily holds dynamic I/O statuses, internal flags (M-bits), and register values during the scan cycle.
  • Program Memory: The dedicated space where the user's control logic (Ladder Logic, Structured Text, etc.) resides during execution. Optimizing code to reduce program memory footprint is crucial for older or lower-tier PLCs with limited capacity.

Koeed Tool: Tag Memory Footprint Matrix

Enter the quantity for each data type you plan to use. The system automatically calculates the total memory footprint. No submission or clicking required.

12
2
3
4
5

Total Memory Allocation:

Bits: 0
Bytes: 0.00
Words (16-bit): 0.00

Troubleshooting & Maintenance FAQ

Why did my PLC lose its dynamic data and variable states after a power outage?

This typically occurs due to a depleted backup battery. The RAM (Random Access Memory) used to store dynamic data is volatile. PLCs use a small lithium battery to keep the RAM powered during main power loss. If the battery voltage drops below the threshold, all RAM data is erased. Action: Replace the PLC battery at the manufacturer's recommended intervals (usually every 1 to 3 years) while the PLC is powered on.

Can EEPROM wear out over time?

Yes. EEPROM memory has a finite number of write/erase cycles (typically between 100,000 and 1,000,000 cycles). Continuously writing rapidly changing data (like millisecond sensor readings) to EEPROM via your control logic will quickly degrade the memory, causing permanent write failures. Action: Only write static configurations, recipes, or infrequently changed setpoints to EEPROM. Use RAM for rapidly updating variables.

How do I fix a "Memory Full" or "Memory Exceeded" compile error?

This indicates your control program or data tags exceed the allocated RAM or ROM footprint. Action: 1) Delete unused tags and unreferenced logic. 2) Change overly large data types (e.g., using a 32-bit DINT for a value that only needs an 8-bit SINT). 3) If the hardware allows, install an expanded memory cartridge or upgrade the CPU unit.

 

Related Articles

Terug naar blog