PLCcheck

How to Create a PLC Variable/Tag Table from Scratch

Step-by-step guide for creating a PLC symbol table or tag table when no documentation exists. Covers I/O assignment, naming conventions, and tools for STEP 7 and TIA Portal.

·10 min read
PLCvariable tabletag tablesymbol tablenaming conventiondocumentationSTEP 7TIA PortalIEC 61131-3

Diesen Artikel auf Deutsch lesen

How to Create a PLC Variable/Tag Table from Scratch

When you inherit a PLC program with no symbol table, every address is a mystery. E 0.0 could be a start button, a proximity sensor, or an emergency stop. Creating a variable table is the single most valuable documentation step — it transforms cryptic addresses into readable code. This guide covers the complete process.

What You Need Before Starting

Step 1: Generate a Cross-Reference List

The cross-reference list shows every address used in the program and where it is used.

In STEP 5: Extras → Cross-Reference (Querverweisliste / QL)

In STEP 7 Classic (SIMATIC Manager): Extras → Reference Data → Cross References

In TIA Portal: Project → Cross-references (in the Inspector window)

This gives you a complete list of every I/O address, marker, timer, counter, and data block element used in the program. Many addresses in the hardware may not be used in the program — the cross-reference list tells you which ones actually matter.

Step 2: Map I/O Addresses to Physical Devices

This is the core work. For every input and output address in the cross-reference list, identify the physical device:

From wiring diagrams (preferred):

From the machine (if no wiring diagrams):

Record format:

AddressDeviceLocationFunctionCable
E 0.0S1Panel 1Start buttonW101
E 0.1B1Station 3Part present sensorW102
A 4.0K1CabinetConveyor motor contactorW201

Step 3: Name Markers, Timers, and Counters

Markers (M), timers (T), and counters (Z) do not have physical connections — their function can only be determined by reading the program logic.

Common patterns:

PatternLikely FunctionSuggested Name
U E x.x / O A y.y / UN E z.z / = A y.ySelf-holding circuitMotor_Self_Hold
U E x.x / L KT ... / SI T nDelay timer for sensorSensor_Delay_Timer
U E x.x / FP M n.n / ZV Z nParts counterParts_Counter
S M n.n (with no R in same network)Status flagStep_Active or Mode_Selected

Step 4: Choose a Naming Convention

There is no universal standard, but consistency is key. IEC 61131-3 specifies that variable names must consist of letters, digits, and underscores, starting with a letter or underscore.

Recommended structure: [Location]_[Device]_[Function]

Examples:

AddressNameDescription
E 0.0St1_Start_ButtonStation 1 Start button
E 0.1St1_Safety_DoorStation 1 Safety door closed
E 0.2St1_Part_SensorStation 1 Part present sensor
A 4.0St1_Conv_MotorStation 1 Conveyor motor
A 4.1St1_Clamp_CylStation 1 Clamping cylinder
T 1St1_Start_DelayStation 1 Start delay timer
Z 1St1_Parts_CountStation 1 Parts counter
M 10.0St1_Motor_Self_HoldStation 1 Motor self-holding

Rules to follow:

Step 5: Enter the Table

In STEP 5: The symbol table (Zuordnungsliste) is edited in the ZL editor.

In STEP 7 Classic: Symbol Editor (Extras → Symbol Table). Can export/import as .ASC file.

In TIA Portal: PLC tags (in the project tree under "PLC tags → Default tag table"). Can export/import as .XML file.

Bulk entry tip: Export the tag table to Excel/CSV, fill in names and comments, then import back. This is much faster than typing each entry in the PLC software.

Step 6: Verify

After creating the table, verify it:

How PLCcheck Pro Helps

PLCcheck Pro can accelerate steps 1–4 dramatically:

Upload your PLC code →

Frequently Asked Questions

How long does it take to create a tag table for a typical machine?

For a small machine (32 I/O, 20 blocks): 4–8 hours. For a medium machine (128 I/O, 50 blocks): 1–2 days. For a large system (500+ I/O, 100+ blocks): 3–5 days. The time depends heavily on the availability of wiring diagrams.

Should I name every address or only the used ones?

Name every used address (from the cross-reference list). Unused addresses can be marked as "spare" or left unnamed. Do not name addresses that are reserved for future use unless you know their intended function.


Maintained by PLCcheck.ai. Last update: March 2026. Not affiliated with Siemens AG.

Related Articles

Analyze your PLC code with AI

PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.

Try PLCcheck Pro →
← Back to Blog

Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.