Siemens · Technical Blog

Siemens PLC Addressing and Data Types in TIA Portal

A practical, TIA Portal-focused walkthrough of how Siemens PLCs address memory — the I, Q, M and DB areas, bit/byte/word/dword addressing on S7-1200 and S7-1500, and the elementary and complex data types every SCL or ladder program is built from.

2,500+ engineers trained 4.9/5 Google rating 21+ years, Chinchwad, Pune Next batch: contact for dates
Quick answer

Every Siemens PLC tag lives at an address made of a memory area, a size, and a location: for example M10.0 is Memory area, bit 0 of byte 10, and DB1.DBX0.0 is bit 0 of byte 0 inside Data Block 1. The four working memory areas are I (Input), Q (Output), M (Bit memory/Merker) and DB (Data Block); each can be addressed as a single bit (.X), byte (B), word (W) or double word (D). On top of that address sits a data type — BOOL for a bit, BYTE/WORD/DWORD for raw bit strings, or INT/DINT/REAL for numeric values — which tells TIA Portal how to interpret and calculate with the value stored there.

  • Every Siemens address = memory area (I/Q/M/DB) + size (bit/byte/word/dword) + location, e.g. M10.0 or DB1.DBX0.0
  • BOOL is 1 bit; BYTE/WORD/DWORD are 8/16/32-bit raw bit strings; INT/DINT/REAL are numeric types built on those same sizes
  • S7-1200/S7-1500 optimized data blocks hide absolute offsets by default — you address tags by symbolic name, not by DBX/DBB numbers

What Addressing Means in a Siemens PLC

Every value a Siemens PLC scans, calculates or writes out — a sensor bit, a motor speed, a batch counter — lives at a specific address in the CPU's memory. Addressing is simply the naming system that lets a program, and the engineer reading it, point at that exact location. Get comfortable reading addresses and you can look at almost any line of ladder logic or SCL and know instantly what physical signal or stored value it touches, without opening the hardware configuration.

In TIA Portal, an address is built from three pieces read left to right: the memory area (which block of memory), the size (how many bits you're reading as one unit), and the location (which byte and bit within that area). M10.0 reads as "Memory area, byte 10, bit 0." DB1.DBX0.0 reads as "Data Block 1, byte 0, bit 0." Once that pattern is familiar, every other address in a Siemens program follows the same logic.

Memory Areas: I, Q, M and DB

A Siemens S7-1200/S7-1500 CPU splits its working memory into a handful of named areas, and every tag you create belongs to one of them. Four areas cover almost everything an engineer touches day to day:

AreaLetterPurposeTypical example
InputIPhysical/process input signals read from digital and analog input modules at the start of each scan cycleI0.0 — a start-pushbutton wired to input channel 0
OutputQPhysical/process output signals written to output modules at the end of each scan cycleQ0.1 — a motor contactor coil
Bit MemoryMInternal flags and working memory, not tied to any physical wiring — used for logic markers, timers, interlocksM10.0 — a "system ready" internal flag
Data BlockDBStructured, user-defined storage for tags, recipes, setpoints and instance data of function blocks; the main working area on S7-1200/1500DB1.DBX0.0 — bit 0 of byte 0 in Data Block 1

I and Q addresses are refreshed automatically by the CPU's process image at the start and end of every scan cycle, so program logic reads and writes I/Q like ordinary memory without touching the physical bus directly. M is pure working memory that survives between scans (though not, by default, a power cycle unless retentive). DB is where almost all structured data lives on modern hardware — recipe values, timers' preset/elapsed values, communication buffers, and instance data for function blocks (FBs) all sit inside data blocks.

Want to practice addressing on real hardware?

Live TIA Portal session covering I/Q/M/DB addressing, data types and SCL programming — Pune classroom or online.

Book a Free Demo Class

Bit, Byte, Word and Double-Word Addressing

Any memory area (I, Q, M or DB) can be addressed at four different granularities, and the suffix letter after the area tells you which one you're looking at. The same physical memory can be read as a single bit or as a wider chunk covering several bits at once — which one you use depends on whether the value is a true/false flag or a numeric quantity like a temperature or a count.

SizeSuffixWidthExampleTypical use
Bitnone (dot notation)1 bitM10.0, I0.3, Q0.1On/off signals, flags, interlocks
ByteB8 bitsMB10, IB0, QB4Small numeric values, thumbwheel/DIP switch banks
WordW16 bitsMW10, IW0, QW4Analog input/output raw values (0–27648 range), 16-bit counters
Double wordD32 bitsMD10, ID0, QD4REAL/DINT values — scaled process values, large counters

A byte, word or double word address always starts at the same first byte number as its overlapping bit addresses — for example MW10 occupies the same two bytes as M10.0 through M11.7. This is exactly why mixing sizes carelessly at the same starting byte causes bugs: writing to MW10 silently changes the bits at M10.x and M11.x underneath it. Good addressing hygiene keeps bit flags and multi-byte values in clearly separated byte ranges, or — on S7-1200/1500 — simply lets TIA Portal assign non-overlapping addresses automatically inside a data block.

Elementary Data Types in TIA Portal

Where addressing tells you where a value lives, the data type tells the CPU how to interpret the bits stored there — as a logical true/false, a raw bit pattern, a whole number, or a number with a decimal point. TIA Portal enforces this strictly: you cannot add a BOOL to an INT, or move a REAL into a WORD tag, without an explicit conversion instruction.

Binary and Bit-String Types

TypeSizeDescription
BOOL1 bitA single true/false value — the type behind every dot-notation bit address
BYTE8 bitsRaw bit string, no numeric meaning by default — often used for status/diagnostic bytes
WORD16 bitsRaw 16-bit bit string — common for control/status words (e.g. drive STW1/ZSW1)
DWORD32 bitsRaw 32-bit bit string, used for wide status registers and bit-level masks

Numeric Types

TypeSizeRange (signed unless noted)Availability
SINT / USINT8 bits−128 to 127 / 0 to 255S7-1200, S7-1500
INT / UINT16 bits−32,768 to 32,767 / 0 to 65,535All families (UINT: S7-1200/1500)
DINT / UDINT32 bits−2,147,483,648 to 2,147,483,647 / 0 to 4,294,967,295All families (UDINT: S7-1200/1500)
LINT / ULINT64 bitsLarge signed/unsigned integersS7-1500 only
REAL32 bitsFloating-point, ~6–7 significant digitsAll families — the standard type for scaled process values
LREAL64 bitsDouble-precision floating-pointS7-1200, S7-1500

In everyday PLC work, INT and DINT cover most counters and setpoints, and REAL is the default type for anything scaled from an analog input (temperature, pressure, level) since NORM_X/SCALE_X instructions output REAL. TIME (for timer preset/elapsed values), DATE, TOD (time of day) and DTL (date-and-time structure, S7-1200/1500) round out the types used for scheduling and timestamping.

Symbolic vs. Absolute Addressing, and Optimized Blocks

Two ways exist to write the same address in TIA Portal, and knowing when each shows up saves confusion when reading someone else's program:

MethodWhat it looks likeWhere you'll see it
Absolute addressing%I0.0, %M10.0, %DB1.DBX0.0Older S7-300/400 style programs, standard (non-optimized) data blocks, cross-reference views
Symbolic addressing"StartButton", "Motor1_Run", "Recipe".SetTempEveryday S7-1200/1500 programming — TIA Portal shows the symbolic name while the absolute address sits underneath it

By default, data blocks created in TIA Portal for S7-1200/1500 are optimized: the compiler manages the internal byte offsets itself, tags are accessed purely by symbolic name, and there's no fixed DBX/DBB layout for the programmer to track. This is why a modern DB tag looks like "MotorData".RunFeedback rather than DB1.DBX4.2. A block can be switched to standard (non-optimized) access instead, which restores fixed byte offsets and absolute addressing — this is required for cases like ANY-pointer access, some communication blocks, or compatibility with S7-300/400-style code. Both approaches store the same data; optimized access simply hides the offset bookkeeping from the programmer.

Complex Data Types: STRUCT, UDT, ARRAY, STRING

Beyond the elementary types, TIA Portal lets you group and repeat data so a whole recipe, a whole conveyor's status, or a whole batch of readings can be addressed as one tag instead of dozens of separate ones.

TypeWhat it isAddressing example
STRUCTAn anonymous grouping of different data types declared inline inside a single tag or block"Motor1".Status.Fault
PLC data type (UDT)A named, reusable structure template — define it once, then declare many tags of that type (e.g. one "Motor_UDT" reused for every motor)"ConveyorA".RunFeedback, "ConveyorB".RunFeedback
ARRAYA fixed- or variable-length list of elements, all of the same data type, addressed by index"Setpoints"[3], ARRAY[0..9] OF REAL
STRING / WSTRINGA sequence of characters with a maximum and current length header, used for text such as recipe names or alarm messages"BatchName" (STRING[20])

UDTs are the workhorse of scalable programming: build one "Motor_UDT" containing Run, Fault, Speed and Runtime members, and every motor on the line gets a consistent, self-documenting tag structure instead of a wall of loosely related M and DB addresses. This is also the pattern behind most furnace and SCADA reporting projects, where each equipment instance reuses the same UDT so that SQL/reporting scripts can walk through them predictably.

For the full, authoritative list of every data type and its exact bit layout, range and conversion rules, Siemens maintains the reference documentation directly in the online help.

Step-by-Step Lab: Addressing and Data Types in TIA Portal

Hands-on
Before you start
  • TIA Portal installed (V17 or later), any S7-1200 or S7-1500 project — a PLCSIM simulation is enough, no physical hardware required.
  • A CPU already added to the project, with the default PLC tag table open.
  • Basic familiarity with opening the PLC tags editor and a Data Block.
  • Estimated time: 12 minutes.
1

Create bit, byte and word tags in the PLC tag table

Open the default PLC tag table and add three tags: StartButton (data type BOOL, address I0.0), StatusByte (data type BYTE, address MB20), and SpeedSetpoint (data type INT, address MW22).

On screen: three rows in the tag table, each showing its symbolic name alongside the absolute address TIA Portal assigns.
All three tags compile without error, and MW22 is shown starting right after MB20/MB21 with no overlap warning.
2

Add a data block and compare optimized vs. standard access

Insert a new global Data Block, add a BOOL member and a REAL member, and check its properties. Note that "Optimized block access" is ticked by default. Untick it, and observe how the DB view changes.

With optimized access on, only symbolic names are shown. With it switched off, an Offset column appears showing absolute byte/bit numbers like DBX0.0 and DBD2.
3

Build a UDT and reuse it for two instances

Create a PLC data type named Motor_UDT with members Run (BOOL), Fault (BOOL) and Speed (REAL). Then declare two DB tags of this type: Motor1 and Motor2.

Both Motor1 and Motor2 expand in the tag tree to show identical Run/Fault/Speed members, addressed as "Motor1".Run and "Motor2".Run.
4

Trigger and read a data type mismatch error

In a new SCL block, try assigning the BOOL tag StartButton directly to the INT tag SpeedSetpoint (e.g. SpeedSetpoint := StartButton;) and compile the block.

Compilation fails with a data type mismatch error — read the exact wording, then fix it using a proper conversion instruction (e.g. BOOL_TO_INT) instead of a direct assignment.
Checkpoint — how to know you did it right

If Step 2 showed you the hidden DBX offsets appear only with optimized access off, and Step 4's compile error correctly blocked an invalid BOOL-to-INT assignment, you've demonstrated the two ideas this lesson is built on: addresses have a fixed structure whether or not TIA Portal shows you the offsets, and data types are enforced strictly at compile time. Keep tags symbolically named and correctly typed from the start — it's far cheaper than untangling a byte-overlap bug on the shop floor.

Frequently asked questions

What do I, Q and M stand for in a Siemens PLC address?

I is Input (physical/process input signals), Q is Output (physical/process output signals), and M is Bit Memory or "Merker" — internal working memory not tied to any physical wiring. DB, Data Block, is where most structured tag data lives on S7-1200/1500 projects.

What is the difference between M10.0 and MW10?

M10.0 addresses a single bit — bit 0 of byte 10 in Bit Memory. MW10 addresses a 16-bit word starting at the same byte 10, covering bytes 10 and 11. Writing to MW10 changes the bits that M10.0 through M11.7 also point to, since they overlap the same memory.

What is the difference between absolute and symbolic addressing?

Absolute addressing uses the raw address directly, like %M10.0 or %DB1.DBX0.0. Symbolic addressing uses a human-readable tag name, like "StartButton", which TIA Portal maps to that same absolute address behind the scenes. Modern S7-1200/1500 programs are written almost entirely with symbolic names.

What does "optimized block access" mean for a data block?

It means TIA Portal manages the internal byte offsets of that DB automatically, so tags are addressed only by symbolic name with no fixed DBX/DBB layout. Turning it off restores standard access with visible absolute offsets, which some communication instructions and legacy code require.

Why can't I assign a BOOL value directly to an INT tag?

TIA Portal enforces data types strictly at compile time: a BOOL is a single bit with no numeric meaning, while an INT is a signed 16-bit number. A direct assignment between incompatible types is rejected; use an explicit conversion instruction such as BOOL_TO_INT if the conversion is genuinely needed.

Reviewed by Bhawesh Kumar Singh Industrial Automation Trainer and Industry 4.0 Consultant · Softwell Automation · 21+ years industry experience

Get the full syllabus + free demo class

Share your details — a Softwell training advisor will call you within 24 hours with batch dates, fees and hardware access options.

No spam. Used only to share course details for this enquiry.

Learn with practical industrial examples

Join live online, Pune classroom or corporate in-plant automation training.

Request Course Details
Verified learning pathway

Discuss This Technical Course

Explore practical curriculum, software, hardware and batch options for this technology.

Content reviewed: 1 August 2026

Siemens PLC & TIA Portal Learning Path

Continue with the related Siemens PLC tutorials in this practical learning series.

  1. SCL vs Ladder Logic
  2. Upload PLC Program
  3. TIA Selection Tool
  4. Analog Input Scaling
  5. PLC Counters
  6. PLC Timers
  7. Addressing & Data Types
  8. Hardware & PLC Tags
  9. OB, FB, FC & DB
☎ Call WhatsApp ✉ Email Enquire Now