PLC Simulator
PLC field notesdebugging

How to Use the PLC Variable Table and Cross-Reference (With Examples)

The variable table and cross-reference are the two most powerful debugging tools in a PLC IDE. Learn how to use them to find faults faster, understand program structure, and verify logic before commissioning.

PLC Simulation Software7 min read

Every serious PLC programming environment includes two tools that are often overlooked by beginners: the variable table (also called the watch table, monitor table, or force table) and the cross-reference. When you encounter a fault and the scan-cycle highlight shows you a FALSE rung, these two tools tell you why it is false.

PLC variable table and cross-reference debugging tools overview

The Variable Table

The variable table lets you monitor the current state of any variable, bit, or register in the PLC in real time — not just the ones visible in the current ladder view.

What you can monitor:

  • Any named tag or device address (X0, M100, Motor_Run, Tank_Level)
  • Timer and counter accumulators and done bits
  • Data registers (D0, DB10.DBX0.0, etc.)
  • Analog input raw counts and scaled values

In the simulator: Open the Variable Table panel from the toolbar. Click + to add a variable. Type the tag name or device address and it appears in the list with its current value, updating each scan.

A typical variable table pairs each tag name with its data type, device address, and a comment:

Sample PLC variable table listing tag name, type, address and comment

Example: Why isn't Timer T1 expiring?

You expect a motor to start 5 seconds after a start command. It never starts. You check the output coil rung — it is FALSE. The input to that rung is the T1 done bit. You need to know: is T1 running? Has it accumulated any time?

  1. Open the variable table
  2. Add T1.IN (IEC) or T1 (Mitsubishi device) to the watch list
  3. Also add T1.ACC (IEC) or the timer current value
  4. Run the program and press start

If T1.IN stays FALSE, the timer is not even started — the problem is upstream of the timer rung. If T1.IN is TRUE but T1.ACC is stuck at 0, the timer instruction may not be executing (check if the rung leading to the timer is conditional and not being satisfied). If T1.ACC is incrementing but much slower than expected, you have a timer resolution issue — revisit the preset and clock source.

Force mode in the variable table

The variable table also allows forcing — setting a variable to a specific value regardless of what the program computes. Forcing is powerful for isolating faults: you can force an input TRUE to test what the logic would do if the field device was working correctly.

Safety rule: Always check the Force List before disconnecting from a PLC. Never leave forces enabled. An unexpected forced bit can cause unexpected machine movement when the machine is restarted by someone else. The simulator flags all active forces prominently in the interface.


The Cross-Reference

The cross-reference is a tool that shows every rung in the entire program that reads or writes a specific tag or device address.

Why it matters: In a 200-rung program, a single bit might be read by 8 rungs and written by 3. If you want to understand why a bit is TRUE, you need to find every rung that sets it. If you want to understand why a change to one rung caused unexpected behavior elsewhere, you need to find every rung that reads it.

Diagram of a PLC cross-reference linking one tag to every rung that reads or writes it

The same tags show up in the rungs themselves — here a Start contact and a timer done bit driving the motor coil, all traceable through the cross-reference:

Ladder rung whose Start, timer and motor tags appear in the PLC cross-reference

In the simulator: Open the Cross-Reference panel. Type a tag or device address. The tool shows every rung that references it, with a column indicating whether each reference is a read (contact) or write (coil).

Example: M100 is TRUE, but I don't know where it gets set

You are looking at a sequencer that is stuck on step 4. The sequencer advances based on a comparison: IF Step_Counter = 4 AND M100 THEN advance. But M100 is TRUE when it should not be. Why?

  1. Open the cross-reference for M100
  2. Find every rung that writes M100 — there are three
  3. Rung 12 sets M100 when a sensor is blocked
  4. Rung 45 sets M100 when a timer expires
  5. Rung 87 resets M100 on the next cycle start

Using the cross-reference, you find that rung 45 — a timer done bit — is staying TRUE because the timer is never being reset. The timer is latched in the done state. Now you have a clear path to the fix.

That sequence — cross-reference the output, list every rung that writes it, then watch those tags — is the repeatable path for any unexpected output:

Flowchart for using the PLC cross-reference to debug an unexpected output

Cross-reference in the fault module

The cross-reference is especially powerful in fault injection exercises. When the simulator injects a fault that changes the behavior of a contact or coil, the cross-reference lets you quickly find every place that variable appears — shortcutting the need to read every rung manually.

The fault injection guide has more on using these tools in fault sessions.


Make the tools work for you: tag naming

Both tools are only as good as your tag names. A variable table full of bare addresses is far harder to debug than one full of meaningful names:

Checklist of good PLC tag-naming conventions

The fields themselves are near-universal, even though each vendor labels them slightly differently — learn the IEC names and the rest map across:

Table of variable table fields across IEC 61131-3, Allen-Bradley and Siemens


Variable Table + Cross-Reference + Scan Highlight: The Complete Workflow

When a machine misbehaves, these three tools work together:

  1. Scan-cycle highlight (live mode): Identify the failing output — which output rung is FALSE?
  2. Scan-cycle highlight (slow mode): Step through the rung input by input — which contact is blocking it?
  3. Cross-reference: For the blocking contact's variable — find every rung that writes it. Which one should be setting it TRUE, and is it?
  4. Variable table: Add the key variables from those upstream rungs to the watch list and monitor them for a few scans. Confirm which variable is not changing as expected.
  5. Force mode (if needed): Force the suspected variable to the expected state and observe if the fault clears. If it does, you have confirmed the root cause.

This is the diagnostic workflow every field service engineer uses on connected hardware — with better tools (a laptop, a full IDE). The simulator lets you practice it risk-free at your own pace.


Try these tools in the simulator. The variable table, cross-reference, and scan-cycle highlight are available in all curriculum exercises and the sandbox. Start with the free lessons.

Start the free curriculum →

ShareX / TwitterLinkedIn

From reading to running logic

Practice this yourself in the simulator

Start with guided PLC practice in your browser. No install and no credit card required.

Start practising free

Continue learning

Related field notes

All articles
sandbox
how to

How to Use the PLC Simulator Sandbox (Free-Play Mode Guide)

The PLC simulator sandbox lets you write any ladder logic program against a live machine model without completing a structured scenario. Learn how to use it for experimentation, portfolio projects, and dialect practice.

6 min read
fault diagnosis
debugging

What Is Fault Injection in PLC Training? (And Why It Makes Better Technicians)

Fault injection inserts hidden wiring faults, logic errors, or sensor failures into a running PLC simulation. Learn how it works, what types of faults it covers, and why it is more effective than reading about fault-finding.

7 min read
scan cycle
debugging

How to Use PLC Scan-Cycle Highlight to Debug Ladder Logic Faster

A practical guide to using scan-cycle highlight in PLC programming — what it shows you, how to enable slow mode, and how to use it to diagnose timer bugs, rung order problems, and latch coil issues.

8 min read

Technical reference and worked-example guide

PLC variable table and cross-reference guide: field reference

Direct answer

The reader can create a reviewable variable inventory, trace one signal from field condition to final consumer and identify conflicting ownership before an online edit.

Written for pLC programmers, reviewers and maintenance technicians who need to find every reader, writer, alias, I/O binding and HMI consumer before changing a tag.

a controls engineer cross-referencing a PLC variable table, I/O schedule, electrical drawing and repeatable test evidence at a guarded automation cell while studying PLC variable tables, tag ownership and cross-reference evidence
System map / 02

NODE 01observable

Definition

Tag name, scope, data type, engineering unit, initial value, retention, physical address, alias, producer, consumer, safety class and change authority.

NODE 02observable

Signal path

Field device and input channel through tag table, program readers and writers, sequence state, output ownership, HMI, historian, alarm and test evidence.

NODE 03observable

Worked example

One command, status and feedback chain traced through every direct reference with no ambiguous final writer.

NODE 04observable

Limits

Indirect arrays, aliases, produced data, recipe writes, first-scan initialization, HMI commands, disabled routines and online changes.

NODE 05observable

Common mistake

A duplicate writer, stale alias, type conversion, unmapped address, hidden initialization, external consumer or undocumented ownership mismatch.

NODE 06observable

Verification

The exported cross-reference compared with online state, I/O documentation, behavioral tests and the approved target-project revision.

Answer surface / 07

What belongs in a PLC variable table?

Record name, scope, type, unit, source, address or alias, retention, owner, consumers, safe state, description and verification status.

Why cross-reference a PLC tag before editing it?

A tag can be written by several routines or external systems; cross-reference evidence exposes ownership and side effects before the change.