Memory Mapping

 

Memory Organization

Introduction

This section describes the memory size for different areas of the Magelis SCU HMI Controller.

Memory Mapping

The memory size of the controllers is 128 Mbytes.

The table presents the memory specifications of the non-HMI control component:

Area

Element

Size (bytes)

System Area

System area reserved memory

131072

System and diagnostic variables

Physical input addresses (%I)

256

Physical output addresses (%Q)

256

Retain variables (1)

16360

Persistent retain variables

2044

Application Area

Compiled control application

1024000

User Area

Symbols

Dynamic allocation of 1228800

Variables

Libraries

(1) Not all of the 16360 bytes are available for the customer application because some libraries may use retain variables.

The memory is composed of four areas:

ocontroller dedicated application memory

ocontroller OS memory

oHMI application memory

oHMI OS memory

Memory containing Persistent and Retain variables is preserved and protected. The Persistent and Retain variables will be retained during power outages or when the HMI controller is powered off.

System and Diagnostic Variables

Variables

Description

PLC_R

Structure of HMI controller read-only system variables.

PLC_W

Structure of HMI controller read/write system variables.

ETH_R

Structure of Ethernet read-only system variables.

ETH_W

Structure of Ethernet read/write system variables.

SERIAL_R

Structure of Serial Lines read-only system variables.

SERIAL_W

Structure of Serial Lines read/write system variables.

For more information on System Variables, refer to the Magelis SCU SoMachine PLCSystem Library Guide.

Library Sizes

Library Name

Average Size

Comment

HMISCU HSC

10 kbytes

Depends on the functions used.

HMISCU PLCSystem

25 kbytes

Always embedded in the application.

The use of the functions does not consume additional memory.

HMISCU PTO/PWM

10 kbytes

Depends on the functions used.

PLC Communication

20 kbytes

Depends on the functions used.

CANopen Stack

115 kbytes

Depends on the functions used. Each CANopen Slave consumes approximately an additional 10 kbytes of memory.

SE_ModbusTCP_Slave

23 kbytes

Depends on the number of connections.

Differences Between Byte Addressing and Word Oriented IEC Addressing

See the table below for a comparison of byte addressing and word-oriented IEC addressing for bits, bytes, words, and dwords. It visualizes the overlapping memory areas in case of byte addressing mode (see the example below the table).

Concerning the notation, consider that, for bit addresses, the IEC addressing mode is always word-oriented. This means that the place before the dot corresponds to the number of the word, the place behind names the number of the bit.

Comparison of byte and word oriented addressing for the address sizes D, W, B and X:

DWORDS/WORDS

Bytes

X (bits)

D0

W0

B0

x0.7

...

x0.0

B1

x1.7

...

x1.0

W1

B2

 

 

 

B3

 

 

 

D1

W2

B4

 

 

 

B5

 

 

 

W3

B6

 

 

 

B7

 

 

 

D2

W4

B8

 

 

 

...

 

 

 

...

...

 

 

 

...

 

 

 

Example for overlapping of memory ranges in case of byte addressing mode:

oD0 contains B0...B3

oW0 contains B0 and B1

oW1 contains B2 and B3

oW2 contains B4 and B5

In order to get around the overlap do not use W1 or D1, D2, D3 for addressing.