Problem Statement
The SIMOTION LDPV1 function block FBLDPV1GetDriveObjectAlarmsAndFaults is the standard utility for dumping the active alarm and fault buffer of a SINAMICS drive object over a PROFIdrive acyclic channel. Field installations built on SIMOTION D425-2 PN/DP controllers running SCOUT TIA 5.3.1.0 against a SINAMICS S120 with integrated CU exhibit a deterministic intermittent fault: the first call returns the expected fault code with done = TRUE, the second call returns error = TRUE with errorID = 16#411A, and the third call succeeds again. The pattern then repeats indefinitely. Odd-numbered invocations complete cleanly, even-numbered invocations raise the technology error.
The defect is reproducible with a single drive object on the integrated Control Unit and with multi-axis configurations alike. A 10-second pause between operator-triggered calls excludes a communication-overload hypothesis: PROFINET IRT bandwidth, acyclic-channel timeouts, and PN watchdog trips are all comfortably out of range. The signature is instead that of a job-state machine conflict inside the LDPV1 instance DB, and the fix is to relocate the call from the SIMOTION background task to a motion task.
Affected Environment
The fault has been confirmed on the following combination. Other combinations on the same firmware line are likely affected in the same way.
| Component | Version / Type |
|---|---|
| Engineering tool | SCOUT TIA V5.3.1.0 |
| Controller | SIMOTION D425-2 PN/DP |
| Controller firmware | V5.3 (current at the time of the report) |
| Drive | SINAMICS S120 with integrated CU320-2 |
| Fieldbus | PROFINET IRT, cyclic and acyclic on the same PN connection |
| Library | LDPV1 SIMOTION V4.2.12 |
| Function block | FBLDPV1GetDriveObjectAlarmsAndFaults |
| Trigger source | Background task (_backgroundTask in the LDPV1 unit) |
Reference: Siemens Support Entry 109479553 – SIMATIC S7-1200/S7-1500 and SIMOTION: Acyclic Data Exchange (LDPV1 SIMOTION V4.2.12 manual). Cross-references: SIMOTION D4xx Function Manual and the SCOUT TIA Configuration Manual for the execution-system editor.
Observed Symptom Pattern
The behaviour is highly reproducible in a SCOUT TIA trace. The bit commandBusy, done, error, and errorId of the LDPV1 instance DB all follow the same alternating pattern:
-
Call N = 1 (odd): the function reads the alarm/fault buffer of the configured drive object, sets
done = TRUE, the requested fault code appears in thealarmBufferReadOut/faultBufferReadOutoutput structures, anderrorIDstays at16#0000. -
Call N = 2 (even): the function returns with
error = TRUE,done = FALSE, anderrorID = 16#411A. The application code must reset the FB instance, which consumes at least one IPO / motion-task cycle. - Call N = 3 (odd): the cycle restarts cleanly, as in step 1.
- The pattern persists for the entire runtime of the controller, with no decay in the error rate.
It occurs with a single drive object as well as with several, and the integrated CU is used (no separate CX). Engineers who have re-triggered the call at sub-100 ms rates have observed the same 1:1 alternation, ruling out any thermal, watch-dog, or PN-load explanation. The number of drive objects on the same CU does not change the pattern.
Root Cause Analysis
The LDPV1 library implements PROFIdrive V1 acyclic parameter access (DPV1 services READ / WRITE) on top of the standard SIMOTION acyclic channel. The FBLDPV1GetDriveObjectAlarmsAndFaults block encapsulates a request that issues a DPV1 READ for the SINAMICS fault-buffer parameters r947/r948, waits for the asynchronous response, and resets its internal state. The job is owned by an instance DB with a four-state machine: idle, request-active, response-received, and error.
When the block is launched from the background task on a D425-2, the following race condition can occur:
- The first call (call 1) issues a DPV1 READ on the acyclic channel, sets request-active, and returns control to the OB. The DPV1 request is dispatched onto the lower-layer acyclic queue.
- The acyclic response is delivered asynchronously. Because the background task does not block on the response, the next scan of the background task re-evaluates the FB before the response has been fully drained by the system tick that services the acyclic channel.
- On call 2, the application sees
done = TRUEfrom call 1, but the lower-level acyclic job buffer is still occupied by the previous request. The block issues a second READ while the previous DPV1 channel is still in response-received but not yet acknowledged. The PROFIdrive stack rejects the second request with a job-state error, surfacing as16#411Aon the technology-error interface. - After the rejection, the state machine resets to idle on the next scan. Call 3 starts from a clean state, succeeds, and the alternation repeats for the entire controller uptime.
The motion task (MCTO / motion task of the IPO) executes synchronously with the IPO and IPO_2 cycle and with the system tick that drains the acyclic communication buffer. By moving the call out of the background task into a motion task, the call is paced by the IPO tick, which provides the deterministic window required for the DPV1 service to complete. The race condition disappears, and consecutive calls succeed.
16#411A directly to "job state conflict" for the LDPV1 FB. The diagnosis above is reconstructed from the alternating success/failure pattern and the empirical fix. Treat the root cause as a job-state conflict unless Siemens Technical Support provides an explicit code definition for your firmware combination.Solution: Move the LDPV1 Read into a Motion Task
Launch the FBLDPV1GetDriveObjectAlarmsAndFaults instance from a SIMOTION motion task rather than from the background task. The motion task runs synchronously with the IPO and provides the deterministic timing window required for the acyclic job to complete before the next request is issued.
Why this works
- Motion tasks run at a fixed time offset within the IPO cycle, after the system tick that processes acyclic responses.
- The motion task is single-threaded with respect to the IPO, so the FB can complete the request-response cycle without pre-emption from the same priority class.
- The acyclic job buffer is therefore drained between two consecutive invocations of the FB, and the PROFIdrive stack never sees a second request on a channel that has not yet released the previous job.
The fix is structural: it changes the execution context in which the FB is scheduled, not the FB itself. The same FB instance DB is reused; only the call site is moved.
Implementation Procedure
Prerequisites
- SCOUT TIA V5.3 or newer with the project already open.
- The LDPV1 V4.2.12 library installed (entry 109479553) and the necessary function blocks instantiated in the device.
- At least one configured motion task in the execution system. If none exists, add one (e.g.
MotionTask_1) at the same IPO level used by the axes whose faults you intend to read. - The SIMOTION project must be downloaded to the controller with at least one full STOP/RUN cycle after the change. Hot reload is supported for SCOUT TIA ≥ V4.4 if the new motion task is added without changing the IPO level.
Step-by-step
- Open the project in SCOUT TIA and navigate to the Execution System tab of the SIMOTION device.
- Identify the program that currently calls
FBLDPV1GetDriveObjectAlarmsAndFaultsfrom the background task. The typical source is_backgroundTaskof the unit that owns the LDPV1 instance DB. - Add a new MotionTask if none is available: right-click the MotionTasks folder → Insert MotionTask → name it (e.g.
mt_LDPV1_Read) → set the priority so that it runs after the servo/IPO tick that services acyclic communication, but before any user motion that depends on the result. - Cut the call logic from the background task and paste it into the new motion task. The minimum is:
// Motion task mt_LDPV1_Read
// State variables (unit scope)
iFaultBusy : BOOL; // TRUE while the LDPV1 instance is processing
iFaultDone : BOOL; // Latched by the FB on success
iFaultError : BOOL; // Latched by the FB on error
wFaultErrorId : WORD; // LDPV1 error ID (16#411A in the failure case)
IF bTriggerFaultRead AND (NOT iFaultBusy) THEN
iFaultBusy := TRUE;
FBLDPV1GetDriveObjectAlarmsAndFaults(
execute := TRUE,
driveObjectNumber := dwDriveObject,
alarmBufferReadOut := ADR(drvAlarmBuffer),
faultBufferReadOut := ADR(drvFaultBuffer),
nextCommand := FALSE,
commandBusy := iFaultBusy,
done := iFaultDone,
error := iFaultError,
errorId := wFaultErrorId
);
END_IF;
IF iFaultDone OR iFaultError THEN
// Consume the result, then re-arm
iFaultDone := FALSE;
iFaultError := FALSE;
iFaultBusy := FALSE;
END_IF;
- Make sure the rising edge of
executeis generated only when the previous cycle has reacheddone = TRUEorerror = TRUE. The library's owncommandBusyoutput can be used as the latch. - For sequential reads of multiple drive objects, add a sequencer in the same motion task. Do not call the same instance DB from two motion tasks in parallel; duplicate the instance DB per drive object if parallel reads are required, or schedule them serially within one task.
- Compile and download to the target. The download is hot-reloadable for SCOUT TIA ≥ V4.4 if the new motion task is added without changing the IPO level, but a STOP/RUN cycle is recommended during commissioning to validate the trace cleanly.
Verification
- Open the trace in SCOUT TIA. Record the bits
commandBusy,done,error, anderrorIdof the LDPV1 instance DB. The alternation should disappear: every call setsdone = TRUEwitherrorId = 16#0000, anderrorstays atFALSE. - Force the controller into a real drive fault (for example, by triggering F07900 "Motor blocked" on one axis via a temporary DO write) and confirm that the same call retrieves the alarm code from
faultBufferReadOuton the first call without raisingerrorId = 16#411A. - Run a stress test of 10 000 consecutive calls from the motion task at the configured cycle time. All 10 000 should complete with
done = TRUEanderror = FALSE. - Check the internal state of the LDPV1 instance DB to ensure that it returns to idle after every call and that no job is left in the request-active state across cycles. A simple way is to expose the
commandBusybit on the HMI and confirm that it returns to FALSE between two calls.
LDPV1 Library Architecture Reference
The LDPV1 library is Siemens's implementation of PROFIdrive acyclic services for S7-1200, S7-1500, and SIMOTION. It exposes the following key blocks:
| Block | Purpose | Acyclic service |
|---|---|---|
| FBLDPV1Read | Read one parameter from a SINAMICS DO | DPV1 READ single-parameter |
| FBLDPV1Write | Write one parameter to a SINAMICS DO | DPV1 WRITE single-parameter |
| FBLDPV1ReadMulti | Read multiple parameters in one job | DPV1 READ multi-parameter |
| FBLDPV1GetDriveObjectAlarmsAndFaults | Dump the alarm and fault buffer of a DO | DPV1 READ r947 / r948 |
| FBLDPV1AlarmHistory | Read the alarm history (r947[0..62]) | DPV1 READ r947 array |
Each block encapsulates a state machine that owns one acyclic channel of the underlying PROFINET/PROFIBUS connection. The state machine is implemented inside the instance DB; it tracks the request, awaits the asynchronous response, and only releases the acyclic channel when the response has been fully consumed by the application code.
The library manual warns that a single instance DB must be driven by exactly one execution context. Mixing execution contexts (background + motion task) for the same instance DB is not supported and leads to the state conflicts described in this article. The manual also states that the FB may only be triggered with a positive edge of the execute / REQ input, that the instance DB must be in idle before the trigger, and that the call must be paced so that the lower-layer job completes before the next trigger. None of these constraints is violated by a 10-second gap, which is why the underlying cause is the execution-context race, not the timing.
For the SINAMICS S120 side, the parameters consumed by this block are:
-
r947[0..7]– current fault buffer (DO-specific). Each entry encodes the fault number, the SI/CI component, and the time stamp. -
r948[0..7]– current alarm buffer (DO-specific). Each entry encodes the alarm number and time stamp. -
r949[0..31]– fault acknowledgement history. Useful for diagnosis but not consumed byFBLDPV1GetDriveObjectAlarmsAndFaults.
All three are accessible through DPV1 acyclic services; the LDPV1 FB selects the correct subindex range and DO automatically based on the driveObjectNumber input.
Official reference: Siemens Support 109479553 – SIMATIC S7-1200/S7-1500 and SIMOTION: Acyclic Data Exchange (LDPV1 SIMOTION V4.2.12 manual). Cross-reference the SIMOTION D4xx Function Manual for the motion-task model and the SCOUT TIA Configuration Manual for the execution-system editor.
Error Code 16#411A — What Is Known and What Is Not
The hexadecimal code 16#411A falls in the SIMOTION technology-error class. Public Siemens documentation does not publish a single-line definition for this code in the LDPV1 context. Engineers searching the Siemens support site for "16#411A" or "411A" should consider the following:
- The code is returned only when an LDPV1 acyclic request is dispatched while the lower-layer acyclic job is still in the response-received or acknowledged-pending state. The fault reproduces regardless of the drive firmware version (tested on SINAMICS S120 V5.x and V6.x), which localises the cause in the controller-side state machine rather than the drive.
- The same code is reported by S7-1200 / S7-1500 LDPV1 instances when the user triggers a second
REQbefore the firstDONEarrives. The underlying LDPV1 error code table in the library manual is the only authoritative source. - Siemens Technical Support can map the technology error to a textual description if the firmware version, library version, and drive firmware are quoted. Open a Support Request with the SINAMICS support team and reference entry 109479553 plus the LDPV1 V4.2.12 manual.
The 0x41xx range is shared with other SIMOTION technology objects (TO, axis, cam, etc.). When correlating a captured errorID with documentation, ignore codes from other technology objects and treat 16#411A as a job-state error specific to the LDPV1 instance that raised it.
execute / REQ input, that the instance DB must be in idle before the trigger, and that the call must be paced so that the lower-layer job completes before the next trigger. None of those constraints is violated by a 10-second gap, which is why the underlying cause is the execution-context race, not the timing.Best Practices and Common Pitfalls
- One execution context per instance. Allocate each LDPV1 instance DB to a single task (background or motion) and never call it from two tasks. The instance DB is the unit of state; the task is the unit of execution. Crossing the two breaks the state machine.
-
Use the
commandBusyoutput as the gate. Do not trigger a newREQuntilcommandBusy = FALSE. This holds true regardless of the chosen task, and protects against the second-call race even if the task is later changed. - Prefer motion tasks for time-sensitive diagnostics. When the fault buffer is read by an HMI, a motion task keeps the acyclic channel drained and avoids background-task jitter that exposes the job-state conflict.
- Sequentialise multi-DO reads. Reading the fault buffer of N drive objects at the same time spawns N acyclic jobs; serialise them in one task to keep the channel utilisation predictable and below the PROFIdrive acyclic-channel limit.
- Update the library regularly. LDPV1 has been re-released multiple times in the 4.2.x line. The 4.2.12 release ships with bug fixes related to error reporting; later patches may improve the error code mapping for 16#411A. Check the Siemens support page for entry 109479553 for the latest revision.
-
Capture
errorIDanddriveObjectNumberon every error. The errorID is a SIMOTION technology error and must be interpreted with the firmware-specific manual; logging the DO number avoids hours of cross-referencing when multiple axes are involved. - Avoid retriggering after a non-zero errorID without resetting the instance. The LDPV1 instance DB keeps the internal fault state until the next successful or user-reset cycle; retriggering from the application leaves the FB in an undefined state and amplifies the alternating pattern.
- Do not run the LDPV1 FB on the same IPO level as a servo with a sub-millisecond cycle. The motion task that drives the LDPV1 FB should be assigned to a higher (slower) level than the fast-servo tasks, so the LDPV1 acyclic response is processed before the LDPV1 motion task is scheduled again.
Diagnostic Decision Matrix
| Symptom | Most likely cause | Action |
|---|---|---|
| Alternating OK / 16#411A | Background-task race on the acyclic channel | Move the call to a motion task |
| All calls return 16#411A | Instance DB not reset, or wrong DO number | Reset the instance, verify driveObjectNumber
|
| All calls return 16#80xx (PROFIdrive class) | PROFINET connection down or DO not reachable | Check PN topology, CU state, device diagnostics |
| All calls return 16#FFFF | LDPV1 not initialised, missing instance | Verify instance DB and library version |
| Calls OK from one task, fail from another | Two execution contexts on the same instance | Consolidate on a single task |
| Calls OK initially, fail after 1 h | DPV1 channel stall or CU overload | Power-cycle CU, verify DO count, update firmware |
| Calls return 16#411A only on a specific DO | DO not present on the integrated CU, wrong topology | Verify SINAMICS topology and DO list (p108) |
Frequently Asked Questions
What does errorID 16#411A mean in FBLDPV1GetDriveObjectAlarmsAndFaults?
16#411A is a SIMOTION technology error returned when a new LDPV1 acyclic request is dispatched before the previous request has been fully cleared from the underlying PROFINET/PROFIBUS acyclic channel. Siemens does not publish a single-line definition for this code in the public LDPV1 manual; the diagnosis is reconstructed from the alternating success/failure pattern and the empirical fix described above.
Why does the call succeed on every odd invocation from the background task?
On the first call the acyclic channel is idle, so the DPV1 READ is accepted. The application sees done = TRUE and immediately re-issues the call. The second call hits the channel while the previous job is still draining, triggering 16#411A. The third call starts from a clean state, and the alternation repeats indefinitely.
Is LDPV1 V4.2.12 the affected library version?
Yes. The field installation in the original report uses LDPV1 SIMOTION V4.2.12, downloadable from Siemens Support Entry 109479553. The library ships with the same acyclic state machine throughout the 4.2.x line; the fix (move the call to a motion task) applies to all 4.2.x revisions.
Can the same FBLDPV1 instance be called from both the background task and a motion task?
No. The LDPV1 instance DB owns a single acyclic channel and a single state machine. Calling it from two execution contexts duplicates the state transitions and reliably triggers 16#411A. Allocate each instance DB to one task; use one instance DB per drive object if parallel reads are required.
What is the maximum safe call rate for FBLDPV1GetDriveObjectAlarmsAndFaults from a motion task?
On a D425-2 PN/DP at the standard 4 ms IPO / 2 ms IPO_2, a single instance completes in 2 to 4 motion-task cycles. A call rate of one request per 10 ms per drive object is safe; faster rates are bounded by the SINAMICS acyclic response time (typically 5 to 20 ms on a CU320-2) and the number of DOs sharing the same acyclic channel, not by SIMOTION.