Problem Overview
The SIMOTION D435-2PN motion controller enters the STOP operating state on every cold start when one or more TM15 terminal modules are connected through DRIVE-CLiQ to the integrated Control Unit. The diagnostic buffer reports a peripheral fault because the SIMOTION user program begins to access TM15 I/O before the module has finished its DRIVE-CLiQ startup and synchronization phase. The same symptom is reported on D435-2 DP/PN variants, D445-2, D455-2, and the older D435 (non-2) when TM15 modules are used in fast-I/O (SIMOTION) mode.
The condition is not a configuration error in the strict sense – topology detection succeeds and the module is present. The fault is a temporal race between the SIMOTION runtime startup sequence and the TM15 firmware initialization, and it is aggravated when the application reads the I/O image inside the StartupTask or in a BackgroundTask that runs before the IO_module_Synchronized alarm is raised.
Hardware Identification
SIMOTION D435-2PN
The D435-2PN combines a SIMOTION runtime (kernel) and a SINAMICS S120 Control Unit on a single hardware platform. The "-2PN" suffix indicates two PROFINET interfaces. The relevant MLFB for the device in this scenario is:
| Item | Value |
|---|---|
| SIMOTION D435-2PN order number (typical) | 6AU1435-2AD00-0AA0 |
| Integrated CU firmware (SINAMICS) | V5.x (matching SIMOTION V5.x) |
| SIMOTION runtime version | V4.4 / V4.5 / V5.1 / V5.2 (project dependent) |
| DRIVE-CLiQ ports on the CU | 6 (X100–X105) |
| Max TM15 modules on integrated CU | 8 (subject to DRIVE-CLiQ port count and project configuration) |
The integrated CU provides the DRIVE-CLiQ ports that connect to the TM15 modules. Each TM15 occupies one DRIVE-CLiQ node. The TM15 is not a PROFINET device – it is a DRIVE-CLiQ device that is mapped into the SIMOTION I/O address space by the SCOUT / TIA configuration.
TM15 Module Variants
Two physical TM15 variants exist. Selecting the wrong type in the hardware catalog produces different runtime behavior and a different I/O image. The MLFBs are:
| MLFB | Designation in HW catalog | Capability | Use with SIMOTION |
|---|---|---|---|
| 6SL3055-0AA00-3FA0 | TM15 (SIMOTION) | Fast DI/DO with OutputCam and Measuring Input | Yes – full SIMOTION fast-I/O |
| 6SL3055-0AA00-3TA0 | TM15 DI/DO | Standard DI/DO only, no OutputCam / Measuring Input | Yes – pure digital I/O |
If the hardware catalog in SCOUT shows TM15 and TM15 (SIMOTION), you have the fast-I/O variant (6SL3055-0AA00-3FA0). If the catalog shows TM15 DI/DO, you have the standard variant. The alarm handling, the PeripheralFaultTask interaction, and the IO_module_Synchronized signaling differ between the two.
IO_module_Synchronized in the same way – in that case the only signal of readiness is the absence of peripheral fault.DRIVE-CLiQ Startup Sequence
When the SIMOTION D435-2PN is powered, the integrated CU executes a fixed sequence:
- Power-on self-test of the CU hardware.
- DRIVE-CLiQ discovery on each port – neighbors are detected and identified.
- Component firmware check – the TM15 firmware version is read and compared against the configured version.
- Topology comparison – the discovered topology is compared to the project configuration. A topology fault puts the CU into
STOPimmediately, but this is not the symptom described in this article. - I/O module configuration download – the configuration is pushed to each TM15.
- TM15 internal initialization – the FPGA-based I/O logic configures, calibrates, and synchronizes to the SIMOTION cycle clock.
- SIMOTION runtime starts the configured task system.
- User program execution begins, including
StartupTask, BackgroundTask, and any other tasks.
Steps 6 and 8 are not synchronous. The user program can begin executing I/O accesses before the TM15 reports ready. The PeripheralFaultTask is the only built-in mechanism SIMOTION provides to catch the fault and either retry, substitute a safe value, or signal back to the application that the I/O is not yet valid.
Root Cause of the STOP
The diagnostic buffer entry you observe is generated by the SIMOTION runtime when the user program attempts to read or write a TM15 I/O address that is not yet marked as valid in the peripheral state model. The SIMOTION kernel raises a peripheral access fault and, by default, this transitions the controller to STOP.
Three things contribute to the race:
- DRIVE-CLiQ startup latency. TM15 firmware takes a measurable time to complete its internal sync. During this window, the I/O image is undefined.
- No automatic gating of I/O access. SIMOTION does not delay the first task cycle waiting for I/O readiness. The first cycle runs as soon as the runtime is up.
-
ProjectGenerator
gboStartupCheckOKdoes not include DRIVE-CLiQ I/O. ThegboStartupCheckOKBoolean from the project generator's startup check function block is intended for SINAMICS drive readiness and for PROFINET IO devices, not for DRIVE-CLiQ-attached TM15 modules. The flag will not gate TM15 access.
Therefore, relying on gboStartupCheckOK to prevent early TM15 access is insufficient. The correct gate is either the PeripheralFaultTask mechanism or a polling check using the runtime I/O validity functions _GetSafeValue / _SetSafeValue.
Solution Architecture
Three independent, complementary mechanisms are available. Use them together for the most robust startup behavior:
- Implement the PeripheralFaultTask and use the
IO_module_Synchronizedalarm to mark the TM15 as ready. - Use
_GetSafeValue/_SetSafeValueto safely read/write I/O with an automatic safe-value fallback during the startup window. - Set the I/O module's startup behavior to ready after synchronization in the hardware configuration so that the runtime does not start the user tasks until the TM15 is synchronized (this is the cleanest solution when supported by the module variant and firmware).
PeripheralFaultTask Configuration
The PeripheralFaultTask is a system task in SIMOTION. It is configured in SCOUT (or TIA Portal with the SIMOTION option) under Project > System Tasks > PeripheralFaultTask. The task is invoked whenever the SIMOTION kernel detects a peripheral fault (read or write to an invalid I/O address).
Step-by-step in SCOUT
- Open the SIMOTION project in SCOUT.
- Select the D435-2PN device in the project navigator.
- Open Execution system > System tasks.
- Right-click
PeripheralFaultTaskand select Properties. - Set the task priority below your other tasks (priority 9 / 10 is typical – it must be lower than BackgroundTask so it does not pre-empt normal processing).
- Assign the PeripheralFaultTask to a program – typically the same program organization unit (POU) that contains the StartupTask, or a dedicated alarm-handling POU.
- Compile and download.
Inside the PeripheralFaultTask
Use the system function _readDriveFault / _readPeripheralFault (function block or system function depending on the runtime version) to identify the affected I/O address. Then map the address to the TM15 slot and confirm synchronization. The key bit of information is the alarm identifier: on a TM15 in SIMOTION mode, the runtime raises an alarm with the identifier IO_module_Synchronized (alarm number 0x0D000001 or as decoded by the alarm mechanism) that includes the logical I/O address of the module that has just completed synchronization. The PeripheralFaultTask can latch this state and clear it once the module is fully online.
IO_module_Synchronized Alarm
The IO_module_Synchronized alarm is generated by the SIMOTION kernel when a TM15 (in SIMOTION mode) has completed its DRIVE-CLiQ startup, downloaded its configuration, and locked to the SIMOTION cycle clock. The alarm carries the logical base address of the TM15 so that the application can identify which module is now ready.
In ST (Structured Text), latch this in a module-ready data structure:
// PeripheralFaultTask POU
// Latch the IO_module_Synchronized alarm for each TM15
FUNCTION_BLOCK fbTM15ReadyLatch
VAR
aReady : ARRAY[1..8] OF BOOL; // index = TM15 number
iAlarmId : DINT;
dwLogAddress : DWORD;
END_VAR
BEGIN
// Read the current peripheral fault / alarm information
iAlarmId := _getAlarmId();
dwLogAddress := _getAlarmLogAddress();
// IO_module_Synchronized alarm identifier
IF iAlarmId = 16#0D000001 THEN
// Map logical base address to TM15 index via configuration table
CASE dwLogAddress OF
16#0100: aReady[1] := TRUE; // TM15 #1 logical base
16#0200: aReady[2] := TRUE; // TM15 #2 logical base
// ... extend for each TM15 in the project
END_CASE;
_resetAlarm();
END_IF;
END_FUNCTION_BLOCK
IO_module_Synchronized depends on the SIMOTION runtime version and the TM15 firmware. In SCOUT, open Diagnostics > Alarm history after a successful startup and capture the alarm number. Replace the literal 16#0D000001 with the actual identifier observed in your project. Do not invent alarm numbers – always verify against the live diagnostic buffer._GetSafeValue and _SetSafeValue
SIMOTION provides two system functions specifically for the case where I/O is not yet accessible:
| Function | Purpose | Return |
|---|---|---|
_GetSafeValue(IO address, value) |
Read an I/O address; if not yet accessible, return the configured safe value without raising a peripheral fault. | Returns TRUE on success, FALSE if safe value was returned. |
_SetSafeValue(IO address, value) |
Write an I/O address; if not yet accessible, the value is buffered or dropped without raising a peripheral fault. | Returns TRUE if written to hardware, FALSE if buffered/dropped. |
Using these functions is the most defensive approach. The application code does not need to know whether the TM15 is online – it simply reads/writes with a safe fallback, and the safe value is configurable per channel.
Safe-value configuration
The default safe value is 0 for digital inputs and outputs. For digital inputs that are safety-relevant, set the safe value to 1 (e.g. emergency stop) so that the application behaves as if the safety chain is open until the real input is available. Configure the safe value in SCOUT under Properties of the I/O channel > Substitute value.
ProjectGenerator Startup Check
The project generator's startup check produces a Boolean gboStartupCheckOK that is set when the configured drives and PROFINET IO devices have signalled ready. It does not include DRIVE-CLiQ-attached TM15 modules. Therefore, gating I/O access on gboStartupCheckOK alone will not prevent the TM15 access race.
The correct composite gate for an application that uses both PROFINET IO and DRIVE-CLiQ TM15 is:
// Combined startup gate: drives + PROFINET IO + DRIVE-CLiQ TM15
FUNCTION_BLOCK fbApplicationReady
VAR
bDrivesReady : BOOL; // from gboStartupCheckOK
bTM15Ready : BOOL; // from fbTM15ReadyLatch (latched on IO_module_Synchronized)
END_VAR
BEGIN
bDrivesReady := gboStartupCheckOK;
bTM15Ready := fbTM15ReadyLatch.aReady[1] AND fbTM15ReadyLatch.aReady[2];
END_FUNCTION_BLOCK
Use the output of fbApplicationReady to gate the I/O processing section of the application.
Hardware-Level Configuration: Startup Behavior
In the SCOUT hardware configuration, the TM15 has a Startup behavior property with two options:
| Option | Effect |
|---|---|
| Ready immediately after topology detection | The I/O is considered valid as soon as DRIVE-CLiQ detects the module. This is faster but unsafe – the module is not yet synchronized. |
| Ready after synchronization | The I/O is only marked valid after the TM15 reports it has locked to the SIMOTION cycle clock. This is the recommended setting for the fast-I/O TM15 (SIMOTION). |
Set the TM15 to Ready after synchronization. This still does not prevent the PeripheralFaultTask from firing during the first few cycles if the user program accesses I/O before the sync completes, but it tightens the window significantly and combined with the PeripheralFaultTask it produces a clean startup.
Diagnostic Buffer Reference
The diagnostic buffer entries you will see during this fault are of the form:
| Entry type | Typical content | Meaning |
|---|---|---|
| Peripheral fault – read | Logical address 0x0100 / 0x0200, byte offset 0–3, access type INPUT | Application read from a TM15 input that was not yet valid. |
| Peripheral fault – write | Logical address 0x0100 / 0x0200, byte offset 0–3, access type OUTPUT | Application write to a TM15 output that was not yet valid. |
| Mode transition | STOP / RUNNING / STOPPING | Kernel transitioned to STOP because of the peripheral fault. |
| IO_module_Synchronized | Alarm with TM15 logical base address | TM15 completed startup, now safe to use. |
To read the diagnostic buffer from SCOUT, select the D435-2PN device, right-click and choose Target system > Diagnostics > Diagnostic buffer. The buffer is time-stamped and shows the order of events – the IO_module_Synchronized alarm always appears after the peripheral fault entry on a troubled startup, which is the visible proof of the race condition.
Complete Implementation Example
The following is a working scaffold that combines all three mechanisms. Adapt the constants, the alarm identifier, and the logical addresses to match your specific project.
PROGRAM Main
VAR
fbTM15Ready : fbTM15ReadyLatch; // latches IO_module_Synchronized
fbAppReady : fbApplicationReady; // combined gate
bProcessIO : BOOL; // TRUE when safe to use TM15 I/O
bDiSafe : BOOL; // safe value from _GetSafeValue
bDiReal : BOOL; // real input from TM15 #1 byte 0 bit 0
wDiMask : WORD; // bit mask for inputs of interest
END_VAR
BEGIN
// 1) Latch TM15 readiness from the PeripheralFaultTask
// (fbTM15Ready.aReady[] is updated by the PeripheralFaultTask POU)
// 2) Compute the combined application-ready gate
fbAppReady();
bProcessIO := fbAppReady.bDrivesReady AND fbAppReady.bTM15Ready;
// 3) Process I/O only when the gate is TRUE
IF bProcessIO THEN
// Safe read – falls back to safe value during the window, no fault
IF _GetSafeValue(ioTM15_1_Inputs := 16#0100, bValue := bDiReal) THEN
// Real input was read; use bDiReal
ELSE
// Safe value returned; use bDiSafe
bDiReal := bDiSafe;
END_IF;
// Safe write – never faults
_SetSafeValue(ioTM15_1_Outputs := 16#0180, bValue := TRUE);
ELSE
// Not yet ready – do not access hardware I/O at all
// Force outputs to their safe values via _SetSafeValue
_SetSafeValue(ioTM15_1_Outputs := 16#0180, bValue := FALSE);
END_IF;
END_PROGRAM
Verification Procedure
After applying the changes:
- Save the project and download to the D435-2PN (SCOUT > Target system > Download).
- Cold-start the machine (full power-down, then power-up).
- Open the SCOUT online diagnostic buffer and confirm there are no peripheral fault entries for the TM15 logical address range.
- Confirm that the
IO_module_Synchronizedalarm is present in the buffer and thatfbTM15ReadyLatch.aReady[1]andaReady[2]goTRUEwithin the first second after power-up. - Confirm that the controller reaches
RUNwithin the normal startup time and that the application processes I/O only after the gate isTRUE. - Repeat the cold start 5–10 times. The behavior should be consistent – no intermittent STOP.
Edge Cases and Field Notes
-
Firmware mismatch. If the TM15 firmware version does not match the version declared in the SCOUT project, the CU raises a topology/configuration alarm and the TM15 will not come online. The
IO_module_Synchronizedalarm will not fire. Resolve by aligning the TM15 firmware with the version in the project (e.g. via SIMOTION IT web server or by the SD card / card image update procedure documented in the SIMOTION D4x5-2 manual). - DRIVE-CLiQ cable hot-plug. If a TM15 is hot-plugged while the controller is in RUN, the same race can occur transiently. The same PeripheralFaultTask handling covers this case.
- Multiple TM15 modules in a daisy chain. TM15 modules do not have DRIVE-CLiQ pass-through ports. Each module occupies a dedicated port on the CU. Do not connect two TM15 modules to a single hub without using a DMC20 (DRIVE-CLiQ Hub Module) – the DMC20 also has a startup time, and modules behind it will be later still.
-
TM15 DI/DO versus TM15 (SIMOTION). The standard TM15 DI/DO does not raise
IO_module_Synchronizedin the same form. For that variant, gate access purely on the peripheral-validity flag returned by_GetSafeValue, or use a startup delay task that holds off I/O processing for a fixed number of cycles (typically 3–5 cycles at 1 ms each is enough). -
Project generator's
gboStartupCheckOK. The flag will go TRUE on its own schedule (drives and PROFINET IO). It is not delayed by the TM15. Use it as part of the gate, but do not rely on it alone.
Troubleshooting Matrix
| Symptom | Likely cause | Action |
|---|---|---|
| STOP on every cold start, peripheral fault on TM15 logical address | User program accesses TM15 before sync | Implement PeripheralFaultTask and gate I/O on IO_module_Synchronized
|
STOP on every cold start, no IO_module_Synchronized alarm in buffer |
TM15 not completing startup | Check TM15 firmware version, DRIVE-CLiQ cabling, topology configuration |
| STOP on cold start, peripheral fault on TM15 and on a SINAMICS drive | Multiple causes; peripheral faults aggregate | Resolve the drive fault first, then re-evaluate the TM15 fault |
| Intermittent STOP, only after a hot-plug | Hot-plug race | Same PeripheralFaultTask handling covers it; consider disabling hot-plug in the project |
| STOP, topology error in buffer | Wrong TM15 variant selected in HW catalog | Verify HW catalog entry matches the physical module MLFB |
Why does my SIMOTION D435-2PN go to STOP on power-up with TM15 modules connected via DRIVE-CLiQ?
Because the SIMOTION user program begins to access TM15 I/O before the module has completed its DRIVE-CLiQ startup and synchronization. The kernel raises a peripheral access fault and transitions the controller to STOP. Implement the PeripheralFaultTask and gate I/O access on the IO_module_Synchronized alarm, or use _GetSafeValue / _SetSafeValue for safe fallback reads/writes.
What is the difference between TM15 and TM15 DI/DO?
TM15 (MLFB 6SL3055-0AA00-3FA0) is the fast-I/O variant for SIMOTION with OutputCam and Measuring Input capability. TM15 DI/DO (MLFB 6SL3055-0AA00-3TA0) is a standard digital I/O module without fast-I/O functions. They behave differently during startup – only the TM15 (SIMOTION) raises the IO_module_Synchronized alarm used for gating.
Does the project generator's gboStartupCheckOK cover TM15 modules?
No. gboStartupCheckOK covers SINAMICS drives and PROFINET IO devices, not DRIVE-CLiQ-attached TM15 modules. You must add a separate gate for TM15 readiness, either from the IO_module_Synchronized alarm via the PeripheralFaultTask, or by polling the validity flag returned by _GetSafeValue.
How can I verify the TM15 is actually ready before the user program uses it?
Two methods: (1) Latch the IO_module_Synchronized alarm inside the PeripheralFaultTask and gate I/O processing on a Boolean derived from it; (2) Wrap every I/O access in _GetSafeValue / _SetSafeValue – these functions return a status that tells you whether the real I/O was accessed or a safe value was substituted.
Is there a way to delay the SIMOTION startup until the TM15 is synchronized?
Yes – set the TM15's Startup behavior property in the SCOUT hardware configuration to Ready after synchronization. This narrows the race window but does not eliminate it entirely; combine it with the PeripheralFaultTask and _GetSafeValue / _SetSafeValue for a fully race-free startup.