Siemens addresses a bit by its memory area, byte and bit number, and TIA Portal lets you give each address a symbolic name in the tag table. Blocks add their own local and data block addressing on top. This sheet lists the forms you will meet in programs and manuals.
| Item | Syntax | Meaning |
|---|---|---|
| Input bit | I0.0 | Byte 0, bit 0 of the input area. TIA Portal shows it as %I0.0. |
| Output bit | Q0.0 | Byte 0, bit 0 of the output area. |
| Memory bit | M0.0 | Byte 0, bit 0 of the bit memory area. |
| Memory byte, word, double word | MB0 MW0 MD0 | 8, 16 and 32 bits starting at byte 0. |
| Input and output word | IW64 QW64 | A 16-bit word of the input or output area, such as an analog value. |
| Peripheral (direct) access | I0.0:P | Reads the module directly instead of the process image. |
| Item | Syntax | Meaning |
|---|---|---|
| Tag from the tag table | "Motor_Start" | A symbolic name mapped to an absolute address, written in quotes. |
| Data block variable | "Pump_Data".Speed | A member of a data block, by block name and variable name. |
| Absolute data block address | DB1.DBX0.0 DB1.DBW2 | Bit 0 of byte 0, and the word at byte 2, of data block 1. |
| Local variable | #Speed | A block-local variable, marked with a hash. |
| Item | Syntax | Meaning |
|---|---|---|
| Organisation block | OB1 | Called by the CPU. OB1 is the main cyclic program. |
| Function | FC1 | Code with no memory of its own. |
| Function block | FB1 | Code with memory, stored in an instance data block. |
| Data block | DB1 | A named table of values. |
| Item | Syntax | Meaning |
|---|---|---|
| Elementary types | Bool Byte Word DWord Int DInt Real | One bit, 8, 16 and 32-bit unsigned, 16 and 32-bit signed, and floating point. |
| Time | T#3s T#500ms | A TIME literal for an IEC timer preset. |
| Item | Syntax | Meaning |
|---|---|---|
| AND and AND NOT | A bit AN bit | Combine the result with the bit, or with its inverse. |
| OR and OR NOT | O bit ON bit | OR the result with the bit, or with its inverse. |
| Assign, set, reset | = bit S bit R bit | Write the result, set the bit, reset the bit. |
| Load and transfer | L value T address | Load a value, then transfer it to an address. |
| Item | Syntax | Meaning |
|---|---|---|
| Bare bit addresses | I0.0 Q0.0 | Accepted for input and output bits. |
| Memory bits | M0.0 | Not accepted here. Use a word address such as %MW0, or declare a plain internal BOOL. |
| Declarations | START AT %I0.0 : BOOL; | IEC-style declarations in a VAR block. |
Always confirm addresses and ranges against the manual for your exact controller and software version. Want to see these addresses used in logic? Read the Siemens instruction reference.
It selects peripheral access: the program reads the input module directly instead of the process image captured at the start of the cycle. Use it when a program needs the freshest value of an input.
DB1 is data block 1. DBX means a bit, and 0.0 is byte 0, bit 0. DBB, DBW and DBD select a byte, a word and a double word at the given byte offset.
TIA Portal writes symbolic names from the tag table or a data block in double quotes. Block-local variables are marked with a hash instead.
Training material. Follow your site procedures, local electrical code and the manufacturer's instructions. Lockout/tagout and a qualified person are required for real equipment.