Introduction

What is a data type instance?

A data type instance is referenced either by:

  • a name (symbol), in which case we say the data is unlocated because its memory allocation is not defined but is carried out automatically by the system,

  • a name (symbol) and a topological address defined by the manufacturer, in which case we say the data is located since its memory allocation is known,

  • a topological address defined by the manufacturer, in which case we say the data is direct addressing, and its memory allocation is known.

Unlocated Data Instances

Unlocated data instances are managed by the PLC operating system, and their physical location in the memory is unknown to the user.

Unlocated data instances are defined using data types belonging to one of the following families:

  • Elementary Data Types (EDT)

  • Derived Data Types (DDT)

  • Device Derived Data Type (Device DDT)

  • Function Block data types (EFB\DFB)

  • Sequential Function Chart data types (SFC)

Examples:

NOTE: Sequential Function Chart (SFC) data type instances are created when they are inserted in the application program, with a default name that the user can modify.

Located Data Instances

Localizing a variable (defined by a symbol) consists in creating an address in the variable editor.

Located data instances have a predefined memory location in the PLC, and this location is known by the user:

  • Topological address for input/output modules

  • Global address (M340, Premium) or State RAM (M580, M340, Quantum)

Located data instances are defined using data types belonging to one of the following families:

  • Elementary Data Types (EDT)

  • Derived Data Types (DDT)

  • Input/Output Derived Data Types (IODDT)

The list below shows the datas instances that should be located on a %MW, %KW addresses type:

  • INT,

  • UINT,

  • WORD,

  • BYTE,

  • DATE,

  • DT,

  • STRING,

  • TIME,

  • TOD,

  • DDT structure type,

  • Table.

EBOOL or EBOOL tables, datas instances have to be located on a %M , %Q or %I addresses type.

IODDT datas instances type have to be located by %CH module channel type.

NOTE: Double-type instances of located data (DINT, DUNIT, DWORD) or floating (REAL) should be located by %MW, %KW addresses type. Only I/O objects instances type localization is possible with %MD<i>, %KD<i>, %QD, %ID, %MF<i>, %KF<i>, %QF, %IF type by using their topological address (for example %MD0.6.0.11, %MF0.6.0.31).
NOTE: For M580 and M340, verify that the index (i) value is even for double-type instances of located data (%MW and %KW).

Examples:

NOTE: Sequential Function Chart (SFC) data type instances are created the moment they are inserted in the application program, with a default name that the user can modify.

Direct Addressing Data Instances

Direct addressing data instances have a predefined location in the PLC memory or in an application-specific module, and this location is known to the user.

Direct addressing data instances are defined using types belonging to the Elementary Data Type (EDT) family.

Examples of direct addressing data instances:

Internal

Constant

System

Input/Output

Network

%M<i>

 

%S<i>

%Q, %I

 

%MW<i>

%KW<i>

%SW<i>

%QW, %IW

%NW

%MD<i> (1)

%KD<i> (1)

 

%QD, %ID

 

%MF<i> (1)

%KF<i> (1)

 

%QF, %IF

 
 

Legend:

(1) Not available for Modicon M340

NOTE: Located data instances can be used by a direct addressing in the program

Example:

  • Var_1: DINT AT %MW10

    ;%MW10 and %MW11 are both used. %MD10 direct addressing can be used or Var_1 in the program.