Problem Overview
The Sinumerik 840Dsl NCU (Numeric Control Unit) exposes its alarms and events through a dedicated OPC UA endpoint distinct from the standard tag namespace. A common field failure pattern is the following: the OPC UA license has been loaded onto the controller, browsing of the tag (data) address space succeeds, but alarm/event subscription either returns an empty list, hangs the client at the Create Subscription call, or causes the server-side handler to crash when the monitored items return no items. The third-party quick-start Alarm & Condition clients (UA Expert, Ignition OPC UA Client, Prosys OPC UA Browser) report Connected in the session status but never display the SINUMERIK server node under the alarm view, because the client has not navigated to the event-notification node ns=0;i=2253 (Server) or the Sinumerik-specific SinumerikEventServer object that publishes condition instances.
This article documents the root cause, the firmware/license preconditions, the correct client-side configuration of the OPC Classic A&E tool AEClient.exe, the OPC UA event subscription model used by Sinumerik, the severity/condition mapping, and the known connection-break issue observed when the event buffer is empty.
Prerequisites and Licensing
Before any alarm can be retrieved from a 840Dsl controller over OPC UA, the following hardware and software preconditions must be satisfied:
- NCU software version: Sinumerik Operate for PC/PCU base software V4.5 SP2 or higher; the OPC UA server functionality is integrated from V4.5 onward but the full alarm/event model requires the V2.2 generation of the embedded OPC UA server stack (delivered with Sinumerik Operate V4.7+ or with the Access MyMachine / OPC UA add-on V2.2).
-
License key: The option bit for OPC UA server (
6FC5800-0AP76-0YB0) and the alarm option bit (6FC5800-0AP76-0YB1). The license is keyed against the CF card serial number; verify withsc start /S ShowLicin the SINUMERIK service shell or via Commissioning > Licenses in the HMI. -
Network reachability: TCP port
4840(OPC UA TCP binary) must be reachable from the client. Confirm with:telnet <NCU_IP> 4840 -
User accounts: The SINUMERIK-side account
auduser(audit user) with read access on alarms and the standardoperatororserviceaccount for tag read. - Firewall/host firewall on PCU50 / TCU: The Windows firewall rule Siemens OPC UA Server must be enabled.
Siemens.Sinumerik.840Dsl.OpcUaServer with version 2.2.x.x or higher.Root Cause Analysis
The symptom of “tags visible but no alarms” can be traced to one of four underlying causes, in order of frequency observed in the field:
-
OPC UA server version too old. The alarm/event support was extended in OPC UA server V2.2. Older stacks (
1.0.x,1.4.x) only expose tags; subscriptions toServerforEventTypenotifications return Bad_ServiceUnsupported or no events. -
Alarm license bit not loaded. The OPC UA option without alarm subscription right returns Bad_UserAccessDenied when the client invokes
CreateSubscriptionon the event notifier. -
Client not calling the correct event notifier node. A naive
Browseof the address space reveals only the tag folder. Event notifications are not anchored to a tag node; they are emitted by the Server object (NodeIdns=0;i=2253) and by a Sinumerik-specific EventManager object. Clients that only subscribe to a tag folder receive no events. - Empty subscription buffer crash. A documented defect in the V2.2/V2.3 server stack causes the server process to terminate when an event subscription is opened against the controller, the alarm queue is momentarily empty, and the client does not pre-populate any monitored item. The workaround is to keep at least one monitored item alive in parallel to the event subscription.
OPC UA Server Stack Versions
The embedded OPC UA server on Sinumerik 840Dsl evolves through these major generations:
| Server Stack | Sinumerik Operate | Tag Read | Alarm/Event | Alarms & Conditions |
|---|---|---|---|---|
| 1.0.x | V4.5 / V4.7 base | Yes | No | No |
| 1.4.x | V4.8 | Yes | Legacy A&E only | No |
| 2.2.x | V5.20 / Access MyMachine OPC UA V2.2 | Yes | Yes (full) | Yes |
| 2.3.x | V5.20 SP1 | Yes | Yes (improved buffering) | Yes |
Identify the running version with opc.tcp://<NCU_IP>:4840 and the GetEndpoints service. The endpoint description contains Server.ApplicationUri and the ServerCertificate that includes the build timestamp. A typical V2.2 banner returned via Discovery is:
Server: Siemens.Sinumerik.840Dsl.OpcUaServer, v2.2.0.42, Build 2018-08-15
Configuring AEClient.exe for OPC Classic A&E
Siemens ships the standalone test client AEClient.exe with the Access MyMachine / OPC UA toolkit. It speaks OPC Classic Alarms & Events against the Sinumerik server and is the fastest way to verify that the controller-side event delivery is alive before introducing a UA-only client. It is located in C:\Program Files\Siemens\Automation\AccessMyMachine\AEClient\ on the development host.
Step-by-Step: Launch AEClient.exe
- Hold Shift and right-click
AEClient.exe, then choose Run as different user. - Enter the credentials in the form
.\auduser(dot + backslash + username) followed by the password. The leading dot forces the local SAM database; theauduseraccount is the audit account created during the Sinumerik installation and is the only account authorized to subscribe to alarms. - In the dialog, enter the DNS hostname or IP address of the NCU in the textbox to the right of [Connect].
- Click [Connect]. A successful connection is shown by the server name SINUMERIK appearing in the Server tab.
- If the server tab stays empty, jump to the Troubleshooting Matrix below. The most common cause at this stage is the AEClient.exe process running as the wrong user; kill the process and retry.
Interpreting the Event List
Once connected, AEClient.exe displays active alarms in the upper pane. Each row contains the fields defined by the OPC A&E 1.0 specification, mapped to Sinumerik-specific values:
| Column | OPC A&E Field | Sinumerik Meaning |
|---|---|---|
| Event Time | EVENT_TIME | UTC timestamp from the NCK clock since when the condition has been active. |
| Severity | SEVERITY | Integer 1-1000. Sinumerik uses 1-200 for info, 201-500 for warnings, 501-1000 for alarms/errors. |
| Source | SOURCE | Logical source name. Typical values: PLC, NCK, HMI, PARTPROGRAM, DRIVES. |
| Condition | CONDITION_NAME | The Sinumerik alarm number, e.g. NCK_ALARM_21612 or PLC_ALARM_700010. |
| State | EVENT_STATE | Color-coded: red icon for Enabled, Active, Not Acknowledged; green icon for Enabled, Acknowledged; grey for Enabled, Cleared. |
| Message | MESSAGE | The localized text string associated with the alarm number, fetched from the controller's text database. |
| Symptom | Likely Cause | Corrective Action |
|---|---|---|
| Client connects, no SINUMERIK server under alarm tab | Client browsing only tag folder, not Server object | Subscribe to ns=0;i=2253 explicitly |
| Connected but no events delivered | OPC UA server version < 2.2 | Update firmware / Access MyMachine OPC UA V2.2+ |
| Bad_UserAccessDenied on CreateSubscription | Wrong user, missing auduser rights | Log in as auduser, not operator |
| Session drops immediately after first event subscription | Empty alarm buffer crash (V2.2/V2.3 defect) | Pre-create at least one tag monitored item; upgrade to V2.3+ |
| Events delivered but condition text is empty | Text database not loaded on NCU | Reload alarm texts via HMI Commissioning |
| Events delivered but Severity always 0 | Wrong filter SelectClause | Add /Severity to SelectClauses |
| AEClient.exe server tab empty after connect | AEClient.exe not running as auduser | Shift-right-click, run as different user, .\auduser
|
| High event latency (> 5 s) | Publishing interval too long, server CPU saturated | Lower publishing interval to 200 ms; check NCU load |
Known Limitations and Field Notes
- The Alarms & Conditions support in Sinumerik 840Dsl does not include exclusive alarms; a single condition can be active on multiple physical axes without instance differentiation.
- The
EventIdreturned by the server is a 16-byte binary blob that includes the NCK alarm number plus a sequence counter; persist it in the historian for de-duplication. - Acknowledgement from a remote OPC UA client is supported from V2.2 onward. Prior versions expose read-only conditions and reject the
Acknowledgecall withBad_NotSupported. - When multiple OPC UA clients (e.g. Ignition prod/test/dev) connect concurrently, the server allocates a subscription per session; the default maximum is 32. Exceeding it returns
Bad_ResourceUnavailable. Increase the MaxSubscriptionsPerSession via the server configuration fileopcua_server.confon the NCU. - The localization of the alarm
Messagefield follows the active HMI language at the time of subscription. Switch the HMI language before opening the subscription if a fixed locale is required for the historian.
Commissioning Checklist
- Confirm NCU software build >= Sinumerik Operate V4.7 with OPC UA server stack V2.2.
- Load both license options: OPC UA base + alarm subscription.
- Create local Windows user
auduserwith the password configured in the NCU. - Open Windows Firewall rule for TCP 4840 inbound.
- Run
AEClient.exeas.\auduser, connect, verify SINUMERIK server tab populates. - From the OPC UA client of choice, call Discovery on
opc.tcp://<NCU_IP>:4840and read the endpoint description. - Open session, browse
ns=0;i=2253, confirmSubscribeToEventsbit is set. - Create subscription with publishing interval 500 ms.
- Create a single tag monitored item before the event monitored item.
- Trigger a test alarm (e.g. NCK 21612 by forcing an axis drive fault), confirm receipt within 2 s.
- Acknowledge the alarm from the client and confirm the state transition.
FAQ
Which OPC UA server stack version first supports Sinumerik 840Dsl alarms?
Alarms & Conditions support was added in OPC UA server stack V2.2, delivered with Sinumerik Operate V5.20 / Access MyMachine OPC UA V2.2. Earlier stacks (1.0.x, 1.4.x) expose tags only.
Why does my OPC UA client connect but show no SINUMERIK server under the alarm tab?
The client is browsing the tag folder instead of the Server object. Subscribe to NodeId ns=0;i=2253 (Server) or the Sinumerik-specific Sinumerik.EventManager node, with an Event filter that includes /EventId, /SourceName, /Severity, and /Message.
How do I run AEClient.exe with the correct credentials?
Shift-right-click AEClient.exe, choose Run as different user, and enter the credentials as .\auduser (dot, backslash, username) followed by the password. The auduser account is the only one with event subscription rights.
Why does the OPC UA server crash when I subscribe to events on an idle controller?
It is a known null-pointer defect in the V2.2/V2.3 server stack when the alarm queue is empty at subscription time. The workaround is to create at least one tag monitored item before the event subscription, or to upgrade to V2.3+ where the null check is fixed.
What are the OPC A&E severity ranges used by Sinumerik?
Sinumerik uses severity 1-200 for information messages, 201-500 for warnings, and 501-1000 for alarms/errors. The Severity column in AEClient.exe is an integer in the range 1-1000 and can be filtered via Subscription → Filter Settings.