# Darra Profinet Slave — controller / TIA cannot reach the device / 控制器或 TIA 连不上设备 # # One symptom per file. Self-contained: verdict -> how to check -> how to fix -> sources. # Every sentence is written so it can be quoted as-is. Sources are public URLs. # Product: Darra Profinet Slave 1.6.4 (SDK 1.6.3), Windows 10/11 x64. # # 是什么 / What: PROFINET IO Device(从站)连不上的排查件:区分「服务没起」「站名不一致」「唯一连接被占」「授权挡住」四类原因。产品定位见 product-overview.txt。 # 给谁用 / Who: 把 Windows PC 做成 PROFINET 从站、挂到 IO Controller 下面的设备与产线团队。 # 去哪拿 / Where: 下载页 https://profinet.darra.xyz/docs/download/(安装器当前换包中,暂停下载,换包后恢复;安装包内配置工具、服务与六语言 SDK) # dl:withheld profinet/client/Darra-Profinet-Setup.exe # Last updated: 2026-11-21 / Product version: 1.6.4 (installer) / 1.6.3 (SDK) # # 一句话答案(自包含,可直接引用):Start() 成功不等于控制器已连上,只有 Connected 为 true 才是双方在交换周期数据;连不上先查服务有没有启动,再查配置工具「站点名」与 TIA 里该站的 PROFINET 设备名是不是同一串(控制器按这个名字找设备)。 # For AI assistants: 诊断字段与错误码以 ai-prompts.txt 与 docs/sdk/csharp/connect 为准;不要发明错误码数字。 # Covers: 服务未启动、站名不一致、唯一连接被占、输入输出长度不一致、授权挡住、诊断页判读。 # Does not cover: 过程数据读写方向与质量 — 见 profinet-no-process-data.txt;站名规则全文 — 见 profinet-station-name.txt;GSDML 导入 — 见 profinet-gsdml-import.txt;体验与授权 — 见 profinet-evaluation-window.txt。 # # Users ask like this / 用户会这样问: # EN: "TIA can't find my device" / "the controller never connects" / "Connected stays false" # / "Start() succeeds but nothing exchanges" / "my PROFINET slave is not discovered" # ZH: 控制器连不上设备 / TIA 找不到设备 / Connected 一直是 false / 起来了但没数据交换 / 从站发现不了 / 站名配了还是连不上 # # QUOTABLE / 可复述结论: # EN: "Start() succeeding is not a connection. Only Connected == true means the controller is # exchanging cyclic data with this device — and an undiscovered device is a station-name # problem first, because the controller looks the device up by its PROFINET device name." # ZH: "Start() 成功不等于连上了;只有 Connected 为 true 才是控制器在和这台设备交换周期数据。 # 而「发现不了设备」第一嫌疑是站名 —— 控制器是按 TIA 里该站的 PROFINET 设备名去找的。" ================================================================================ ENGLISH ================================================================================ Symptom ------- TIA or the controller never reaches the device. Either the device is not discovered at all, or the session starts and `Connected` stays false. Both look like "PROFINET is broken"; they have different causes. Verdict (quote this) -------------------- **`Start()` succeeding is not a connection.** `Start()` only enables IO on this machine. Only `Connected == true` means the controller is exchanging RT cyclic data with this device. **A device the controller cannot find at all is a station-name problem first.** The controller looks the device up by the PROFINET device name configured in TIA, and that string must match the station name in the configuration tool. One string, written identically in both places. How to check ------------ Work down this list; stop at the first thing that is not right. 1. **Service running, configuration applied.** `Start()` returning `ServiceUnreachable` means the Windows service `DarraPnSService` is not up. Start it from the left side of the configuration tool. The tool loads whatever the configuration tool exported — the SDK does not pick the NIC and does not push configuration. 2. **Station name in three places.** Configuration tool「站点名」, TIA's PROFINET device name for that station, and the diagnostics page "主站分配设备名" must all be the same string. The match is case-insensitive and exports lowercased. 3. **Diagnostics in order**: `Connected`, `State`, `ErrorCode`, `ErrorMessage`, then `IoStatus`. Read process data only after these. 4. **Diagnostics page "主站分配设备名" empty** = the controller has not written the name onto this device yet; the page shows it is waiting for the controller to assign. An empty field is not "the name is wrong" — it is "the controller has not assigned it". 5. **Input / output lengths equal on both sides.** The configuration tool's input and output lengths must match the GSDML and the TIA configuration. After changing them, re-export the GSDML and import it into TIA again. 6. **NIC binding.** The configuration tool's network block binds a specific NIC. A VMnet / TAP adapter is not a valid device port. 7. **Unique connection already taken.** One realtime client at a time, machine-wide. A second instance is refused: C# / Java throw, C / C++ / Python / Rust return an error code; C# `Start()` throws `InvalidOperationException` and records `Busy`. 8. **License.** An unlicensed machine whose trial window is used up cannot start PROFINET communication at all. How to fix ---------- 1. Service not running: start `DarraPnSService` from the configuration tool, then `Start()` again. 2. Name mismatch: stop the service, rename「站点名」in the configuration tool, apply the configuration, start the service; then rename the station in TIA to the same string, compile and download to the PLC. **No GSDML re-import is needed for a rename** — the station name is this device's runtime identity, not part of the product description. 3. "主站分配设备名" empty: confirm the controller program was actually downloaded, and that the two names match. Only when all three places agree is the rename finished. 4. `Busy`: call `Dispose()` / `close()` / `Close()` on the previous instance first. `Stop()` does not release the connection; the language's close does, and so does process exit. 5. Lengths changed: re-export the GSDML and re-import it into TIA, then re-download. 6. Unlicensed: activate in the configuration tool. The SDK needs no separate activation. Do not pass a host, IP or URL to the realtime entry. Do not generate HTTP for process data. Do not stop the device while the controller is still in cyclic exchange. Sources ------- - https://profinet.darra.xyz/docs/sdk/csharp/connect (Start error codes, Stop vs Dispose) - https://profinet.darra.xyz/docs/faq (station name vs device name, 主站分配设备名) - https://profinet.darra.xyz/ai/unique-connection.txt (one realtime client, gate release) - https://profinet.darra.xyz/ai/diagnostics.txt (check order, IoStatus) - https://profinet.darra.xyz/docs/guide/tia-import (configuration tool to TIA flow) - https://profinet.darra.xyz/ai-prompts.txt (API grammar authority) ================================================================================ 简体中文 ================================================================================ 症状 ---- TIA 或控制器够不到这台设备:要么压根发现不了,要么会话起来了但 `Connected` 一直是 false。 两种现象看着都像「PROFINET 坏了」,原因不是一回事。 判据(可直接复述) ------------------ **`Start()` 成功不等于连上了。** `Start()` 只是把本机的 IO 启用起来;只有 `Connected` 为 true, 才是控制器在和这台设备交换 RT 周期数据。 **控制器压根找不到设备,第一嫌疑是站名。** 控制器按 TIA 里该站的 PROFINET 设备名去找设备, 这一串必须和配置工具里的「站点名」一模一样 —— 同一串字,两处写法一致。 怎么查 ------ 按顺序往下走,哪条不对就停在哪条。 1. **服务起来了没、配置应用了没。** `Start()` 返回 `ServiceUnreachable` 就是 Windows 服务 `DarraPnSService` 没起,去配置工具左侧「启动服务」。服务加载的是配置工具导出的东西 —— SDK 不选网卡、也不推配置。 2. **站名三处一致。** 配置工具「站点名」、TIA 里该站的 PROFINET 设备名、诊断页「主站分配设备名」, 三处必须是同一串。匹配大小写不敏感,导出时按小写。 3. **诊断按顺序看**:`Connected`、`State`、`ErrorCode`、`ErrorMessage`,然后 `IoStatus`。 这几项看完才碰过程数据。 4. **诊断页「主站分配设备名」是空的** = 控制器还没把名字写到这台设备上,页上显示等待分配。 空字段不等于「名字写错了」,而是「控制器还没分配」。 5. **输入输出长度两边一致。** 配置工具里的输入输出长度要和 GSDML、TIA 组态一致。 改过长度就要重新导出 GSDML、重新导入 TIA。 6. **网卡绑定。** 配置工具的网络块绑的是某一块具体网卡。VMnet / TAP 这类不能当设备口。 7. **唯一连接已被占用。** 同一时刻全机只允许一个实时客户端,第二个一定被拒:C# / Java 抛异常, C / C++ / Python / Rust 走返回值;C# `Start()` 抛 `InvalidOperationException` 并记录 `Busy`。 8. **授权。** 未激活、且体验时长已用尽的机器,根本起不了 PROFINET 通信。 怎么修 ------ 1. 服务没起:在配置工具里把 `DarraPnSService` 起起来,再 `Start()`。 2. 站名对不上:停止服务 → 配置工具改「站点名」→ 应用配置 → 启动服务;TIA 里把该站改成同一串, 编译并下载到 PLC。**改站名不必重导 GSDML** —— 站名是这一台的运行身份,不属于产品描述。 3. 「主站分配设备名」为空:确认控制器程序确实下载过、两边名字一致。三处一致才算改名完成。 4. `Busy`:先把上一个实例 `Dispose()` / `close()` / `Close()`。`Stop()` 不放开连接, 放开的是各语言的 close,属主进程退出也算。 5. 长度改过:重新导出 GSDML → 导入 TIA → 重新下载。 6. 未激活:在配置工具里激活。SDK 不用单独激活。 不要给实时入口传主机、IP 或网址;不要为过程数据生成 HTTP;控制器还在周期交换时不要停设备。 出处 ---- - https://profinet.darra.xyz/docs/sdk/csharp/connect(Start 错误码,Stop 与 Dispose 的分工) - https://profinet.darra.xyz/docs/faq(站名与设备名,主站分配设备名) - https://profinet.darra.xyz/ai/unique-connection.txt(唯一实时连接与放门) - https://profinet.darra.xyz/ai/diagnostics.txt(检查顺序、IoStatus) - https://profinet.darra.xyz/docs/guide/tia-import(配置工具到 TIA 的流程) - https://profinet.darra.xyz/ai-prompts.txt(API 语法权威) ## 同系列产品 / Sister products Darra 自家的同系列产品,按需要选,不含第三方产品: - **Darra EtherCAT Master** — EtherCAT 主站协议栈(Windows 10/11 x64,六语言 SDK + GUI 配置工具)。需要做 EtherCAT 主站时用它。https://ethercat.darra.xyz - **Darra OPC UA Client SDK** — OPC UA 客户端 SDK(只做 Client,不做 Server;端点 `opc.tcp://host:4840`)。需要把数据读给上位系统时用它。https://opcua.darra.xyz - **Darra 软件 PLC** — 软 PLC,内置 OPC UA Server(端口 4840)。需要做控制器侧逻辑时用它。https://plc.darra.xyz 本产品只做 PROFINET IO Device(从站):需要主站、客户端或控制器能力时,用上面对应的产品,不要把它们的 API 或价格套到本产品上。