A practical guide for automation engineers, commissioning teams and maintenance staff
Every PLC engineer has faced it: a machine with twenty interlocks, ten outputs, and a ladder program so tangled that nobody dares touch it after commissioning. Rung after rung of series and parallel contacts, and the only documentation is the logic itself.
There is a cleaner way. The Cause & Effect Matrix (C&E Matrix) in Siemens TIA Portal lets you describe what must happen when something happens, in a table, instead of coding it contact by contact. In this article, we walk through the concept, the editor, and a real online-monitored example.
What Is a Cause & Effect Matrix?
A C&E matrix is a table-based method for defining relationships between causes (input conditions) and effects (outputs or actions).
- Causes are the events: a sensor trips, a pushbutton is pressed, a limit is reached.
- Effects are the reactions: a motor stops, a valve closes, an alarm sounds.
- Intersections define how a given cause drives a given effect.
The method has been used for decades in process safety, especially for emergency shutdown (ESD) and fire and gas systems. TIA Portal brings it into the PLC editor as a native programming language, so the same table you would draw on paper becomes executable logic.
Understanding the Screenshot
The image below shows a C&E matrix open in TIA Portal on the left, with the PLC tag table in online monitoring mode on the right. Let us read it piece by piece.
1. The Toolbar (top left)
Across the top of the editor you see logic-function symbols such as & (AND), >=1 (OR) and a block for further functions, plus link elements and small circular icons. These are the building blocks you drag into the matrix. Combining causes with AND or OR is how you express conditions like "Sensor A and Sensor B" or "Sensor A or Sensor C" without drawing a single rung.
2. The Effects Area (top centre)
The upper section is labelled Effects. Two effect columns are visible:
- Effect 1 writes to %M2.6, "Tag_10"
- Effect 2 writes to %M2.7, "Tag_8"
Each effect is a destination. Whatever the matrix decides, these are the memory bits that change. In a real project, these would typically be outputs, valves, motors or alarm bits.
3. The Causes Area (left centre)
The lower-left section is labelled Causes. Here you can see:
- Cause 1: combines %M2.0, "Tag_1" and %M2.1, "Tag_2" as inputs
- Cause 2: starts with %M2.2, "Tag_4"
Each cause row can hold one or more input tags. Several inputs inside one cause are evaluated together, which keeps related conditions grouped and readable.
4. The Intersection Nodes (grid)
The circles where rows meet columns are the heart of the matrix. Each node describes the type of link between a cause and an effect. In this project you can see different symbols, including a circular-arrow marker and nodes labelled 3N. Different markers represent different behaviours, for example a direct link versus a stored or latched action. An empty intersection simply means that cause has no influence on that effect.
This grid is what makes the method so powerful. At a glance, you see exactly which cause touches which effect.
5. The PLC Tag Table in Online Mode (right)
The right-hand panel shows the Monitor value column with live data. In this snapshot:
- Tag_1, Tag_2 and Tag_4 are TRUE
- Tag_10 is TRUE
- Tag_8 is FALSE
This is the real payoff of the C&E approach: with the cause tags active, you can see Effect 1 (Tag_10) has been triggered while Effect 2 (Tag_8) has not, which matches the link types defined in the grid. No hunting through rungs to find out why.
Why Use a C&E Matrix Instead of Ladder?
1. Readability for everyone. Operators, process engineers, safety auditors and managers can all understand a matrix. Few of them can trace a 40-rung interlock network.
2. The logic is the documentation. Traditional projects need a separate C&E document that slowly drifts out of sync with the code. Here, the matrix is the specification and the program.
3. Faster commissioning. During FAT and SAT, you can test row by row: trigger a cause, confirm the effects. Online monitoring shows immediately which links are active.
4. Easier modification. Adding a new sensor means adding a row. Adding a new output means adding a column. You do not need to hunt for the right rung to modify without breaking something.
5. Fewer logic errors. The grid layout makes missing or duplicated links visible. In ladder, the same mistake can hide for years.
Where It Fits Best
The C&E matrix shines when you have many conditions driving a limited number of actions:
- Emergency shutdown and process safety logic
- Machine interlocks and permissives
- Alarm and trip management
- Fire and gas detection systems
- Equipment protection (high temperature, low pressure, overload)
It is less suitable for sequential control, complex calculations or motion tasks. For those, SCL, GRAPH or ladder remain better choices. Treat the matrix as a specialist tool, not a replacement for everything.
A Simple Workflow to Get Started
- List your causes. Gather every input condition: sensors, pushbuttons, limit switches, fault signals.
- List your effects. Define every output or action that must result.
- Create the matrix in TIA Portal and assign PLC tags to each cause row and effect column.
- Set the link type at each relevant intersection (direct, stored, delayed, and so on).
- Compile and download to the PLC.
- Go online and test each cause while watching the effects and the tag table, as in the screenshot.
- Document test results, using the matrix itself as your test sheet.
Best Practices
- Use meaningful tag names. In the screenshot, names like Tag_1 and Tag_10 work for a demo, but real projects should use names such as LT_101_HighHigh or ESD_Valve_101.
- Keep each matrix focused on one area or function, rather than one giant matrix for the plant.
- Add comments to causes and effects so auditors understand the intent.
- Decide early how resets and latched effects will be handled, and keep that consistent.
- Always test every intersection, including the empty ones that should do nothing.


