Overview

The PLC memory supports:

  • located application data

  • unlocated application data

  • the program: task descriptors and executable code, constant words, initial values and configuration of inputs/outputs

Structure

The data and program are supported by the processor module’s internal RAM.

The following diagram describes the memory structure.

State RAM

For Data (see graphic above) also State RAM is available, if you select Mixed topological and State RAM in the Configuration tab of a Modicon M340 processor.

To use this option you need Modicon M340 firmware 2.4 or later.

NOTE:

If you want to import a legacy LL984 Compact application which uses Modbus request to communicate with an HMI, you have to use State RAM addressing to preserve the Modbus exchange between PLC and HMI.

The State RAM contains the following located data:

Address

Object address

Data use

0xxxxx

%Qr.m.c.d,%Mi

output module bits and internal bits

1xxxxx

%Ir.m.c.d, %Ii

input module bits

3xxxxx

%IWr.m.c.d, %IWi

input words of input/output modules

4xxxxx

%QWr.m.c.d, %MWi

output words of input/output modules and internal words

NOTE: Not all data represented in topological addressing is available in State RAM.

Please refer to Topological/State RAM Addressing of Modicon M340 Discrete Modules and Topological/State RAM Addressing of Modicon M340 Analog Modules.

Program Backup

If the memory card is present, working properly and not write-protected, the program is saved on the memory card:

  • Automatically, after:

    • a download

    • online modification

    • a rising edge of the system bit %S66 in the project program

  • Manually:

    • with the command PLC > Project backup > Backup Save

    • in an animation table by setting the system bit %S66

    NOTE: For detail on %S65, refer to chapter System Bits.

The memory card uses Flash technology, therefore no battery is necessary.

Program Restore

If the memory card is present and working properly, the program is copied from the PLC memory card to the internal memory:

  • Automatically after:

    • a power cycle

  • Manually, with the Control Expert command PLC > Project backup > Backup Restore

NOTE: When you insert the memory card in run or stop mode, you have to do a power cycle to restore the project on the PLC.

Saved Data

Located, unlocated data, diagnostic buffer are automatically saved in the internal Flash memory at power-off. They are restored at warm start.

Save_Param

The SAVE_PARAM function does both current and initial parameter adjustment in internal RAM (as in other PLCs). In this case, the internal RAM and the memory card content are different (%S96 = 0 and the CARDERR LED is on). On cold start (after application restore), the current parameter are replaced by the last adjusted initial values only if a save to memory card function (Backup Save or %S66 rising edge) was done.

Save Current Value

On a %S94 rising edge, the current values replace the initial values in internal memory. The internal RAM and the memory card content are different (%S96 = 0 and the CARDERR LED is on). On cold start, the current values are replaced by the most recent initial values only if a save to memory card function (Backup Save or %S66 rising edge) was done.

Delete Files

There are two ways to delete all the files on the memory card:

  • Erasing the memory card (delete all files of the file system partition)

  • Deleting the content of directory \DataStorage\ (delete only files added by user)

Both actions are performed using %SW93.

The system word %SW93 can only be used after download of a default application in the PLC.

%MW Backup

The values of the %MWi can be saved in the internal Flash memory using %SW96. These values will be restored at cold start, including application download, if the option Initialize of %MW on cold start is unchecked in the processor Configuration screen.

For %MW words, the values can be saved and restored on cold restart or download if the option Reset of %MW on cold restart is not checked in the processor Configuration screen. With the %SW96 word, management of memory action %MW internal words (save, delete) and information on the actions’ states %MW internal words is possible.

Memory Card Specifics

Two types of memory card are available:

  • application: these cards contain the application program and Web pages

  • application + file storage: these cards contain the application program, data files from Memory Card File Management EFBs, and Web pages