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:
| Area | Letter | Purpose | Typical example |
|---|---|---|---|
| Input | I | Physical/process input signals read from digital and analog input modules at the start of each scan cycle | I0.0 — a start-pushbutton wired to input channel 0 |
| Output | Q | Physical/process output signals written to output modules at the end of each scan cycle | Q0.1 — a motor contactor coil |
| Bit Memory | M | Internal flags and working memory, not tied to any physical wiring — used for logic markers, timers, interlocks | M10.0 — a "system ready" internal flag |
| Data Block | DB | Structured, user-defined storage for tags, recipes, setpoints and instance data of function blocks; the main working area on S7-1200/1500 | DB1.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.
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.
| Size | Suffix | Width | Example | Typical use |
|---|---|---|---|---|
| Bit | none (dot notation) | 1 bit | M10.0, I0.3, Q0.1 | On/off signals, flags, interlocks |
| Byte | B | 8 bits | MB10, IB0, QB4 | Small numeric values, thumbwheel/DIP switch banks |
| Word | W | 16 bits | MW10, IW0, QW4 | Analog input/output raw values (0–27648 range), 16-bit counters |
| Double word | D | 32 bits | MD10, ID0, QD4 | REAL/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
| Type | Size | Description |
|---|---|---|
| BOOL | 1 bit | A single true/false value — the type behind every dot-notation bit address |
| BYTE | 8 bits | Raw bit string, no numeric meaning by default — often used for status/diagnostic bytes |
| WORD | 16 bits | Raw 16-bit bit string — common for control/status words (e.g. drive STW1/ZSW1) |
| DWORD | 32 bits | Raw 32-bit bit string, used for wide status registers and bit-level masks |
Numeric Types
| Type | Size | Range (signed unless noted) | Availability |
|---|---|---|---|
| SINT / USINT | 8 bits | −128 to 127 / 0 to 255 | S7-1200, S7-1500 |
| INT / UINT | 16 bits | −32,768 to 32,767 / 0 to 65,535 | All families (UINT: S7-1200/1500) |
| DINT / UDINT | 32 bits | −2,147,483,648 to 2,147,483,647 / 0 to 4,294,967,295 | All families (UDINT: S7-1200/1500) |
| LINT / ULINT | 64 bits | Large signed/unsigned integers | S7-1500 only |
| REAL | 32 bits | Floating-point, ~6–7 significant digits | All families — the standard type for scaled process values |
| LREAL | 64 bits | Double-precision floating-point | S7-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:
| Method | What it looks like | Where you'll see it |
|---|---|---|
| Absolute addressing | %I0.0, %M10.0, %DB1.DBX0.0 | Older S7-300/400 style programs, standard (non-optimized) data blocks, cross-reference views |
| Symbolic addressing | "StartButton", "Motor1_Run", "Recipe".SetTemp | Everyday 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.
| Type | What it is | Addressing example |
|---|---|---|
| STRUCT | An 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 |
| ARRAY | A fixed- or variable-length list of elements, all of the same data type, addressed by index | "Setpoints"[3], ARRAY[0..9] OF REAL |
| STRING / WSTRING | A 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- 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.
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).
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.
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.
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.
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.
