When diagnosing a machine equipped with a SYNTEC CNC system, it is not enough to understand only the NC program and alarm messages. A significant part of the machine logic is executed by the PLC: it processes machine signals, executes sequences and interlocks, controls outputs, and exchanges information with the CNC.
This logic can be viewed and analyzed using Ladder Editor, while one of the main tools for finding relationships between signals is Cross Reference.
What Is the Machine PLC?
PLC (Programmable Logic Controller) is a programmable controller that executes the machine logic program. In the analyzed SYNTEC system, this program is represented by the CNC.LAD Ladder program.
The PLC operates between the CNC logic and a significant part of the machine equipment. It receives states and commands from the CNC, processes physical inputs, executes the logic programmed by the machine manufacturer, and generates output signals.
CNC / NCK
↕
C / S / R
↕
PLC
↕
I / O
↕
electrical equipment
↕
machine mechanisms
However, this does not mean that all machine control necessarily passes through the PLC. For example, axis motion control is directly associated with CNC functions, axis control, and servo drives. The PLC primarily represents the machine logic part of the control system.
What Does the PLC Do?
The specific PLC functions are determined by the machine manufacturer's program. In the CNC.LAD file of the analyzed machine, functions already identified include M-code processing, alarm-state generation, spindle control, tool mechanisms, tool magazine control, drilling head control, and other machine devices.
A typical diagnostic chain can be represented as follows:
CNC command
↓
CNC ↔ PLC interface
↓
CNC.LAD
↓
conditions and interlocks
↓
PLC output
↓
physical equipment
↓
mechanism movement
↓
sensor / limit switch
↓
PLC input
↓
CNC.LAD
↓
execution confirmation
What Is Ladder?
Ladder is a graphical form used to represent a PLC logic program. Visually, it consists of contacts, coils, parallel and series branches, as well as functional instructions.
In the analyzed SYNTEC system, the machine program is stored in the CNC.LAD file.
A simple Ladder section can be represented as follows:
───[ condition ]────────────────( result )
Multiple conditions can be connected in series or in parallel. Therefore, during diagnostics it is important to examine not only the signal address, but also the contact type and the structure of the entire branch.
Direct and Inverted Contacts
One important aspect of reading Ladder logic is distinguishing between direct and inverted conditions. This can be clearly seen in the previously analyzed section of CNC.LAD covering rows 4–7.
┌── /I132 ────────────┐
│ │
├── R45.10 ───────────┤
│ │
├── R45.11 ───────────┼─── ( C36 )
│ │
└── /O3 ──────────────┘
Here, R45.10 and R45.11 are used as direct conditions, while I132 and O3 are used as inverted conditions: /I132 and /O3.
C36 =
NOT I132
OR R45.10
OR R45.11
OR NOT O3
Therefore, diagnostics cannot be based only on the signal number. For example, I132 and /I132 have different logical meanings.
Basic Data Types Used in CNC.LAD
Different address spaces are used throughout SYNTEC Ladder logic. The same numerical address in different spaces does not represent the same object.
| Designation | Use |
|---|---|
I | Physical PLC inputs |
O | Physical PLC outputs |
A | Internal PLC bits |
R | Registers and allocated PLC/CNC data areas |
C | PLC → CNC signals |
S | CNC → PLC signals |
TM | Timers |
CT | Counters |
For example, C36, S36, R36, I36, O36, and A36 are different objects even though they all contain the number 36.
Data Exchange Between CNC and PLC
For diagnostics, understanding the direction of the C and S interface signals is particularly important.
S = CNC → PLC
C = PLC → CNC
For example, the analyzed documentation defines:
S029 = M Code Read
C036 = Emergency Stop
C038 = M.S.T Finish
Therefore, Ladder does not only control physical outputs. It also exchanges logical states directly with the CNC.
What Is Ladder Editor?
Ladder Editor is a software tool used to view and work with the SYNTEC PLC Ladder program.
The analyzed materials use Ladder Editor v2.33.0, with the CNC.LAD file opened in the editor.
For diagnostic purposes, Ladder Editor makes it possible to analyze the program structure: Ladder rows, contacts, coils, internal bits, registers, timers, counters, and other elements used by the program.
CNC.LAD
↓
Ladder Editor
↓
program row
↓
contacts / conditions
↓
coil / result
What Is Cross Reference?
Cross Reference is a tool used to find where a selected address is used within the Ladder program.
It is particularly useful for diagnostics because the same bit or register may appear in different locations throughout CNC.LAD. Instead of reviewing the entire program sequentially, Cross Reference can be used to locate the rows where the selected object is used.
For example, when analyzing R45.11 — SYSTEM ALARM, Cross Reference shows several locations where it is used in CNC.LAD.
R45.11
↓
Cross Reference
↓
Row 6
Row 155
Row 905
Row 911
Row 1007
The corresponding rows can then be examined to determine what role the selected signal performs in each specific Ladder section.
Why the Signal Generation Point Must Be Found
The fact that an address appears in Ladder does not by itself explain why it is active. For diagnostics, the conditions that lead to the generation of that state must be traced.
The general analysis method can be represented as follows:
fault / Alarm
↓
associated signal
↓
Cross Reference
↓
locations of use
↓
signal generation point
↓
Ladder conditions
↓
I/O or interface signal
↓
next diagnostic level
For example, if an alarm is associated with R45.11, simply observing R45.11 = ON is not enough. The corresponding sections of CNC.LAD must be examined to trace the logic that produced this state.
Ladder and Physical Inputs I
I addresses connect the PLC with physical input signals from the machine. On the analyzed machine, the following assignments have already been identified, for example:
I5 = EMERGENCY STOP
I7 = AIR PRESSURE LOW
I10 = 1st TOOL UNCLAMP
I11 = 1st TOOL CLAMP
I13 = 1st SPINDLE UP
I14 = 1st SPINDLE DOWN
I28 = SAFETY CURTAIN 1
I29 = SAFETY CURTAIN 2
I41 = 1st INVERTER ALARM
I42 = 1st INVERTER ARRIVE
Therefore, when analyzing an input, diagnostics can continue beyond the PLC program and into the machine's electrical circuit using the electrical schematic.
sensor / contact
↓
wiring
↓
terminal / connector
↓
PLC I/O module
↓
Ixxx
↓
CNC.LAD
Ladder and Physical Outputs O
O addresses refer to physical PLC outputs. On the analyzed machine, examples include:
O3 = SERVO ON
O4 = VACUUM ON
O5 = 1st SPINDLE CCW
O8 = 1st SPINDLE CW
O9 = 1st SPINDLE DOWN
O10 = 1st SPINDLE UNCLAMP
O13 = 1st MAG IN
O25 = BORING DOWN
O43 = SAW ON
During diagnostics, the active state of a software output is only one stage of the investigation. The signal must then be linked to the corresponding physical channel and electrical circuit of the machine.
CNC.LAD
↓
Oxxx
↓
PLC I/O module
↓
terminal / connector
↓
wire
↓
relay / contactor / valve / other device
↓
mechanism
Example: M-Code Execution
The relationship between CNC and PLC can be clearly seen in the M-code processing mechanism. According to the analyzed SYNTEC documentation, S029 means M Code Read, the M-code value is transferred through R1, and C038 is used as M.S.T Finish.
In the Ladder program of the analyzed machine, for example, the M31 decoder has been identified as generating the internal bit A131.
M31
↓
CNC
↓
S029 = ON
R1 = 31
↓
CNC.LAD
↓
M31 recognition
↓
A131
↓
machine logic
This example shows how an M-code from the NC program can be linked, through the CNC/PLC interface, to a specific machine sequence implemented in Ladder.
How to Use Ladder Editor for Diagnostics
A practical investigation can be performed starting from a known symptom or signal and tracing it toward its source.
1. Identify the Alarm, I/O, C/S/R, or internal signal.
2. Find this address in CNC.LAD.
3. Use Cross Reference.
4. Find the section where the required state is generated.
5. Check the contacts and conditions in that section.
6. If the chain leads to I/O —
continue to the physical electrical circuit.
7. Link the software state
to the actual machine device.
Connecting Software and Physical Diagnostics
Ladder Editor can help determine the logical cause of a state, but complete machine diagnostics does not end at the PLC screen. If the diagnostic chain leads to a physical input or output, the next stage is performed using the electrical documentation and directly on the machine equipment.
CNC / Alarm
↓
C / S / R
↓
CNC.LAD
↓
Cross Reference
↓
logical conditions
↓
I / O
↓
electrical schematic
↓
I/O module
↓
terminal / connector
↓
wiring
↓
electrical device
↓
mechanism
↓
feedback sensor
↓
PLC
Main Diagnostic Principle
Ladder should not be treated as an isolated program, but as one level of the complete machine control system.
The CNC generates commands and states, the PLC executes machine logic, physical I/O connects the program to electrical equipment, and sensors return information about the actual state of machine mechanisms.
command → CNC → CNC/PLC interface → CNC.LAD → conditions and interlocks → output → electrical circuit → actuator → mechanism → sensor → PLC input → CNC.LAD → confirmation