Overview
SinuTrain and HMI Advanced are two halves of a SINUMERIK 840D/840D sl control. SinuTrain is a PC-based simulator that runs the NCK (numerical control kernel) and an integrated SIMATIC S7 PLC kernel; HMI Advanced is the operator interface software that would normally attach to a physical NCU. The question of "TCP/IP between two PCs" is fundamentally a category error: the two products are designed as a single control's HMI+NCK pair, not as a client/server pair exchanging commands over a network. Direct socket programming against either application is not a supported configuration.
This reference documents the actual architecture of HMI Advanced, why a plain TCP/IP link is not possible, the three supported workflows (file sharing, NetDDE, and a single-PC configuration), and the configuration steps required to make any of them work on the source's hardware: a Windows 7 machine running SinuTrain and a Windows XP SP3 machine running HMI Advanced.
Architecture and Components
Before any integration attempt, identify which component is the controller and which is the operator panel. Misclassifying them is the most common reason a test bench fails to come up.
SINUMERIK 840D and 840D sl Building Blocks
A SINUMERIK 840D/840D sl control has three functional blocks:
- NCK — the numerical control kernel. Owns the interpolator, axis regulation, part-program interpreter, tool tables, and zero offsets.
- PLC — an integrated SIMATIC S7-300 module. Handles I/O, safety, machine logic, and PLC-side HMI requests.
- HMI — the operator interface. On real hardware this is a PCU 50 / PCU 70 running HMI Advanced, or an external Thin Client. In a development environment it is either HMI Advanced on the same PC as SinuTrain, or HMI Advanced on a peer PC talking to SinuTrain.
For the official operating manual covering 840Di sl / 840D sl / 840D, see the HMI-Advanced Operating Manual (PDF, Siemens Industry Online Support).
SinuTrain as a Virtual NCU
SinuTrain replaces the NCU. It runs the same NCK and PLC kernels as a real 840D sl, but in a Windows process. From a software-architecture standpoint, the NCK/PLC side is present on the SinuTrain PC, and what is missing is the human-machine interface. SinuTrain is shipped with several options; the OP (operator panel) variant includes a built-in HMI so a separate HMI Advanced install is not strictly required for solo use.
HMI Advanced as the Operator Panel
HMI Advanced is the legacy operator panel software for 840D/840D sl. According to published research on integrating older SINUMERIK machines, HMI Advanced was written in Delphi 6–7, uses the Siemens DCTL.ocx library, and communicates with the NCK/PLC through the DDE (Dynamic Data Exchange) protocol — see Integrating and interconnecting of older SINUMERIK CNC machines (ScienceDirect).
DDE is a Windows inter-process communication mechanism that exchanges named items between a server and a client. DCTL.ocx is the Siemens ActiveX wrapper that exposes the NCK/PLC variables as DDE items to the HMI. This is what lets HMI Advanced read axis positions, alarms, and program state, and write operator commands back into the control.
Why Direct TCP/IP Communication Fails
Opening a TCP socket between the SinuTrain PC and the HMI Advanced PC and trying to send commands is not a supported configuration. The reasons are architectural, not protocol-level:
- Neither application is a TCP server. SinuTrain exposes its NCK/PLC data through internal DDE channels and (when configured) through SinCOM. HMI Advanced connects to DCTL.ocx, not to a socket.
- DCTL.ocx binds to a local DDE conversation. HMI Advanced starts the DCTL DDE server, and the NCK (or, in this scenario, the SinuTrain NCK) must register as the DDE client on the same machine or on a Network DDE share.
- HMI Advanced is not an automation server. It is a UI, not a command interpreter. It does not accept a remote command and execute it. The commands live inside the NCK.
- No documented API is exposed by HMI Advanced. The only public interfaces from HMI Advanced are DCTL (DDE) and the screen form API; there is no documented socket or REST endpoint.
The only practical ways to exchange data between two Windows PCs hosting these applications are the file system (SMB), Network DDE (NetDDE), or a third-party DCTL/OPC bridge.
HMI Advanced Communication Internals
| Layer | Component | Role |
|---|---|---|
| Application | HMI Advanced | Operator interface screens, menus, alarm views, program manager |
| Interface | DCTL.ocx | Siemens ActiveX control; wraps NCK/PLC data as DDE items |
| IPC | DDE (Dynamic Data Exchange) | Windows inter-process communication protocol used pre-NetDDE |
| Transport | Local memory or NetDDE | Same-machine shared memory; NetDDE for cross-machine (Windows feature) |
| Controller | NCK + PLC (real NCU or SinuTrain) | Receives commands, reports state, executes part programs |
DDE was introduced with Windows 2.0 and is part of the Win32 API. NetDDE is a Microsoft extension that allows DDE conversations to span machines on a LAN. Configuring NetDDE requires the Network DDE services on both PCs, a shared DDE share name, and matching trust settings. This is the only Microsoft-supported path for splitting HMI Advanced from its controller across two physical machines without third-party software.
DCTL Item Namespaces
The DCTL DDE server exposes a fixed topic and a variable item name. The standard topic is global, and items follow the Siemens naming scheme /NCK/..., /PLC/..., /HMI/..., /DRIVE/.... For example:
-
/NCK/Channel/State/Rpa[1]— current channel state of channel 1 -
/NCK/Axis/PositionActVal[X1]— actual position of axis X1 -
/PLC/Memory/Byte[0]— first byte of PLC memory
HMI Advanced polls these items at a configurable rate (default ~250 ms). The same items are available to NetDDE clients on remote machines if a NetDDE share is configured.
File-Sharing Approach
The simplest working scenario for "two PCs, one with SinuTrain, one with HMI Advanced" is to treat the HMI Advanced PC as a thin operator panel and exchange program files (.MPF, .SPF, .TOA, .INI, archive files) through a Windows file share. This is the workflow the source-thread respondents describe: "you can share folder and file. not sinumerik."
What You Can Share
- Part programs (
.MPF) and subprograms (.SPF) - Tool data (
.TOA) - Workpiece zero offsets (
.GUD/.INIfiles) - Log files and screenshots for diagnostics
- Archive files (
.ARC) for backup/restore of the control state
What You Cannot Do Over a File Share
- Issue a real-time command (e.g., start, stop, reset, override) — the file share is asynchronous and is not seen by the NCK
- Read live axis positions into HMI Advanced — DCTL is the only path for live data, and a file share does not register a DDE item
- Trigger an alarm acknowledge or mode change from the remote PC
- Synchronize a clock or heartbeat between the two applications
Single-PC Configuration (Recommended)
The most reliable configuration for a development or training PC is to run SinuTrain and HMI Advanced on the same Windows machine. This collapses the network problem entirely: DCTL.ocx, DDE, and the NCK all live in the same process space, and Windows file sharing is not required.
Prerequisites
- Windows 7 SP1 (x64 supported by current SinuTrain versions) for the development PC, or Windows 10 for the latest SinuTrain releases
- Sufficient RAM: minimum 4 GB, 8 GB recommended for part programs above 50 MB and large 3D simulations
- SinuTrain installer (current versions support 840D sl and 840D; match the kernel version to the HMI Advanced version)
- HMI Advanced installer, version matched to the SinuTrain kernel version (cross-version combinations are not supported)
Setup Order
- Install SinuTrain. Confirm the NCK/PLC simulator launches and the SINUMERIK boot screen appears.
- Install HMI Advanced. During install, select "operator panel front (OP)" or "SINUMERIK 840D sl PCU" mode.
- In the HMI Advanced configuration tool, set the connection target to "local" (not an MCP/MMC-style remote target). DCTL.ocx then binds to the local SinuTrain NCK.
- Restart the HMI. The splash screen should resolve into the standard area, channel, and axis overview pages.
- Test the round trip: from the HMI, navigate to Program Manager → Local. Create
TEST.MPFwith the contentsG91 G1 X10 F500. Select it, press NC Start. The simulated axis moves and the position display updates.
Two-PC Configuration with NetDDE
If you must run them on two PCs (Windows 7 for SinuTrain, Windows XP SP3 for HMI Advanced), the supported path is NetDDE. The configuration is non-trivial and Windows-version dependent.
Prerequisites
- SinuTrain PC: Windows 7, fixed IP, Network DDE DSDM service set to Automatic and started
- HMI Advanced PC: Windows XP SP3, fixed IP, Network DDE DSDM service started, Network DDE shares configured with a named DDE share (e.g.,
NCK$) - Both PCs in the same Windows workgroup or domain; matching user accounts or trusted anonymous access
- HMI Advanced version that supports remote connection (most 6.x and 7.x versions do; the configuration utility exposes a connection target field)
Step-by-Step
- On the HMI Advanced PC, open
ddeshare.exe. Create a share namedNCK$that points at the DCTL DDE applicationDCTLand topicglobal. - Set the share's permissions to allow the SinuTrain PC's user account to start the share.
- On the SinuTrain PC, open
regeditand add the trusted NetDDE share list underHKLM\SOFTWARE\Microsoft\NetDDE\Shares, mirroring theNCK$definition. - Start the Network DDE service on both PCs. Verify with
sc query nddeagtandsc query netdde— both must reportSTATE: 4 RUNNING. - In HMI Advanced's connection configuration, change the target from "local" to the remote machine name, share
NCK$. - Restart HMI Advanced. If DCTL cannot find the DDE conversation, the HMI remains blank and the log file under
%TEMP%\dctl.logreports "DDE conversation failed".
Using SinCOM with a Real SINUMERIK 840D
SinCOM (Sinumerik Communicator) is the Siemens COM/DCOM automation interface that exposes NCK and PLC data to external Windows applications. If a real SINUMERIK 840D sl control is later added to the test bench, SinCOM becomes the supported path for command exchange. The original question explicitly excludes the real control — "my intention is not using the control SINUMERIK 840D yet, so I don't need to install SinCOM" — but the answer changes if a real NCU is added.
When SinCOM Applies
- A physical NCU is present on the network
- You want to read/write NCK variables and PLC flags from a Windows application (C#, VB, OPC client, etc.)
- You need real-time state exchange that NetDDE cannot reliably provide
When SinCOM Does Not Apply
- Pure SinuTrain + HMI Advanced on a single PC
- Pure SinuTrain + HMI Advanced on two PCs with only a file-share workflow
- New builds — prefer OPC UA instead of SinCOM
OPC and Modern Replacement Paths
The current Siemens path for reading/writing NCK/PLC data from external applications is the OPC UA Server for SINUMERIK 840D sl. This replaces both DCTL/DDE and the older SinCOM. If the test bench is intended to grow into a production line with PLC and MES integration, OPC UA is the documented path.
For an introduction to the modern Siemens HMI connection topology (Basic Panels, Comfort Panels, WinCC Runtime Advanced, TIA Portal), the TIA Portal HMI connection documentation (Siemens docs.tia.siemens.cloud) describes the same conceptual model (HMI ↔ PLC) but on a SIMATIC S7-1500 Software Controller. The principle is the same even though the SINUMERIK-specific DCTL/DDE mechanism is not reused.
Mapping DCTL Items to OPC UA
The mapping from the legacy DCTL item syntax to the OPC UA address space is documented in the OPC UA Server for SINUMERIK 840D sl manual. As a rule of thumb:
| DCTL Item | OPC UA Node | Notes |
|---|---|---|
/NCK/Channel/State/Rpa[1] |
ns=4;s=Channel[1].State |
Live channel state |
/NCK/Axis/PositionActVal[X1] |
ns=4;s=Axis[X1].Position |
Actual position |
/PLC/Memory/Byte[0] |
ns=4;s=PLC.Memory.Byte[0] |
Direct PLC mirror |
The exact namespace index varies by OPC UA Server version; consult the server's namespace export to confirm.
Firewall, Network, and OS Considerations
Windows XP SP3 and Windows 7 require explicit configuration to allow file sharing and NetDDE between them. Defaults to be aware of:
| Item | Windows 7 Default | Windows XP SP3 Default |
|---|---|---|
| File and Printer Sharing | Enabled only on the Home/Work network profile | Enabled by default, but Windows Firewall blocks it on the default profile |
| Network DDE Agent (nddeagent) | Disabled | Disabled |
| Network DDE DSDM (NetDDE) | Disabled | Disabled |
| ICMP echo (ping) | Allowed on private profile | Allowed by default |
| TCP port 445 (SMB) | Open on private profile | Open by default |
| UDP 137/138 (NetBIOS) | Open on private profile | Open by default |
For file-share-only operation, open TCP 445, UDP 137/138, and enable the "File and Printer Sharing" inbound rule on both sides. For NetDDE, additionally start the Network DDE Agent and DSDM services on both sides and allow the named-pipe share traffic.
Step-by-Step: File-Share Configuration
This is the most reliable two-PC configuration given the source's stated goal of "sending some basic commands from SinuTrain to HMI Advanced."
Prerequisites
- SinuTrain PC (Windows 7) and HMI Advanced PC (Windows XP SP3) on the same subnet
- Static IP addresses for both (recommended: 192.168.1.10 and 192.168.1.11, mask 255.255.255.0)
- Matching workgroup name (default WORKGROUP is fine)
- A user account on the HMI Advanced PC with a non-empty password (required by Windows security policy for inbound SMB connections)
Procedure
- On the SinuTrain PC, create a folder
C:\SINUTRAIN\EXPORT. Right-click → Properties → Sharing → Share this folder. Name the shareEXP$. Set permissions:Everyone→ Change. - On the HMI Advanced PC, open Explorer. Address bar:
\\192.168.1.10\EXP$. Confirm read/write access by creating a test file. - On the HMI Advanced PC, point the HMI's NC program directory to the network share in the HMI Advanced configuration utility. This is what allows the operator to "load" a part program from the SinuTrain PC.
- On the SinuTrain PC, monitor the share with a tail on the access log. The HMI Advanced side will create lock files (
*.LCK) on the share when a program is selected. - From the HMI Advanced operator panel, navigate to Program Manager → Network →
192.168.1.10\EXP$. Select a part program. The file is read into the SinuTrain NCK and ready to execute. - From the HMI Advanced, press NC Start. SinuTrain executes the move; the actual axis position changes in the HMI position display.
Verification
For each scenario, the verification step is different.
File-Share Verification
- From the SinuTrain PC, create
C:\SINUTRAIN\EXPORT\TEST.MPFwith the contents:G91 G1 X10 F500. - From the HMI Advanced operator panel, Program Manager → Network →
\\192.168.1.10\EXP$. - The file
TEST.MPFappears in the directory listing. Open it. The textG91 G1 X10 F500is visible. - Press NC Start. SinuTrain executes the move; the actual axis position changes in the HMI position display.
- If the file does not appear, check SMB on the SinuTrain PC:
net sharefrom a command prompt. ConfirmEXP$is listed and the path is correct.
NetDDE Verification
- From either PC, run
ddeshare /s(XP) or openddeshare.exe(Win 7) and confirm the shareNCK$exists and is trusted on the remote side. - Run
sc query nddeagton both PCs. State must beRUNNING. - Start HMI Advanced. If the connection succeeds, the area/channel/mode display populates within 30 seconds. If the log shows "DDE conversation failed", the share trust is wrong or the service account cannot start the share remotely.
- From a third machine, use a NetDDE-aware tool (e.g.,
ddetest) to read\\sinutrain-pc\NCK$\DCTL|global\and confirm that the item/NCK/Channel/State/Rpa[1]returns a non-empty value.
Single-PC Verification
- Start SinuTrain. Wait for the boot sequence to complete (channel and axis overviews visible in the built-in HMI).
- Close the built-in HMI if SinuTrain's startup configuration includes it.
- Start HMI Advanced. The HMI should pick up the running NCK and show the same channel/axis state as the built-in HMI did.
- Create a part program in HMI Advanced. Execute it. Confirm the simulated axis moves.
Troubleshooting Matrix
| Symptom | Likely Cause | Fix |
|---|---|---|
| HMI Advanced stays blank, log shows "DDE conversation failed" | NetDDE share not trusted on remote side | Add the share to HKLM\SOFTWARE\Microsoft\NetDDE\Shares on the HMI Advanced PC; restart nddeagent
|
Cannot browse \\<ip>\EXP$ from HMI Advanced PC |
Windows 7 network discovery or file sharing off | Set network profile to Private on the Win 7 PC; enable "File and Printer Sharing" inbound rule |
| Share visible but "access denied" | User account on SinuTrain PC has empty password or no permission | Set a password on the account; add the account to the share ACL with Change permission |
| HMI loads program but SinuTrain shows alarm "NCK connection lost" | DCTL/NCK handshake lost after NetDDE timeout | Increase NetDDE timeouts in the registry; restart both services |
| SinuTrain boots, HMI never sees the controller | HMI connection target set to "local" but they are on different PCs | Change HMI target to remote machine name |
| Everything works, but commands from HMI have no effect | File-share is the only path; there is no command API | Accept that this is asynchronous, or move to NetDDE/SinCOM/OPC |
| NetDDE works for a few minutes, then drops | Network DDE share has no keep-alive; idle timeout on Win 7 firewall | Add a NetDDE keep-alive item; create a Windows Firewall inbound rule for the NetDDE ports with no idle timeout |
| HMI Advanced 7.x install on Win 10 fails | Legacy installer relies on DCOM and BDE; Win 10 lacks them by default | Install BDE 5.x, register the missing DCOM components, or run HMI Advanced in XP Mode / a Win XP VM |
Field-Commissioning Checklist
- Confirm SinuTrain kernel version and HMI Advanced version are matched (Siemens compatibility matrix is shipped with the install media).
- Confirm the NCK/PLC boot is clean — no alarms visible in the HMI's alarm log on first power-up.
- Confirm the file share is reachable from both directions (SinuTrain PC and HMI Advanced PC).
- Confirm the NetDDE services (if used) are set to Automatic and report
RUNNING. - Confirm a known-good part program can be selected, loaded, started, and observed via the position display.
- Capture the HMI Advanced log (
%TEMP%\dctl.logand the HMI's own diagnostic directory) for the commissioning record.
FAQ
Can SinuTrain and HMI Advanced exchange commands over plain TCP/IP?
No. Neither application exposes a TCP server interface for command exchange. SinuTrain exposes its NCK/PLC data through DCTL/DDE on the local machine, and HMI Advanced connects to that. Direct TCP/IP socket programming is not a supported configuration.
Do I need SinCOM for the two-PC setup?
No, if both PCs run only SinuTrain and HMI Advanced with file sharing. SinCOM is required only when a real SINUMERIK 840D NCU is added and external Windows applications must read/write NCK data. The source explicitly excludes the real control, so SinCOM is not needed for the stated test.
What is DCTL.ocx and why does it matter?
DCTL.ocx is the Siemens ActiveX control used by HMI Advanced. It wraps the NCK and PLC variable space as DDE items, so the HMI can read axis positions, alarms, and program state and write operator commands. It is the layer that limits the HMI to local or NetDDE communication, not TCP/IP.
Can I install SinuTrain and HMI Advanced on the same PC instead?
Yes, and this is the recommended configuration for a development/training bench. It eliminates the network problem entirely because DCTL, DDE, and the NCK all run in the same process space. A 64-bit Windows 7 SP1 or Windows 10 (current SinuTrain versions) with at least 4 GB RAM is sufficient.
What is the modern replacement for the DCTL/DDE path?
The OPC UA Server for SINUMERIK 840D sl. It replaces both the older DCTL/DDE mechanism and SinCOM for new installations, and is the documented Siemens path for MES and PLC integration. The legacy DCTL path is still supported on existing installations but is not recommended for new builds.
Why does HMI Advanced blank-screen after I change the connection target?
Almost always a NetDDE share trust or service-account issue. Confirm nddeagent is RUNNING on both PCs, the share is listed in HKLM\SOFTWARE\Microsoft\NetDDE\Shares on the remote side, and the account starting the share has permission. The %TEMP%\dctl.log file on the HMI Advanced PC will report "DDE conversation failed" if the issue is on the share side, or "Access denied" if the account is the problem.