Darra.Profinet.Slave
1.1.0
dotnet add package Darra.Profinet.Slave --version 1.1.0
NuGet\Install-Package Darra.Profinet.Slave -Version 1.1.0
<PackageReference Include="Darra.Profinet.Slave" Version="1.1.0" />
<PackageVersion Include="Darra.Profinet.Slave" Version="1.1.0" />
<PackageReference Include="Darra.Profinet.Slave" />
paket add Darra.Profinet.Slave --version 1.1.0
#r "nuget: Darra.Profinet.Slave, 1.1.0"
#:package Darra.Profinet.Slave@1.1.0
#addin nuget:?package=Darra.Profinet.Slave&version=1.1.0
#tool nuget:?package=Darra.Profinet.Slave&version=1.1.0
<p align="center"><img src="https://download.darra.xyz/profinet/static/icon.png" alt="Darra Profinet Slave" width="96" height="96"></p>
Darra Profinet Slave · C# SDK
把 Windows 主机作为 PROFINET IO 从站设备使用,受主站系统(如西门子 PLC)控制:RT Class 1 实时周期,DCP 设备发现 / 命名 / 地址分配,过程数据 IO,报警与诊断(含 I&M),GSDML 导入 TIA V15+;搭配 DarraRT 实时内核驱动,SDK 以服务模式使用(过程映像共享内存映射)。
Use a Windows host as a PROFINET IO device under a master (e.g. a Siemens PLC) — RT Class 1, DCP, process-data IO, alarms and diagnostics (I&M), GSDML for TIA V15+; with the DarraRT kernel driver. The SDK is used in service mode (process image mapped from shared memory).
能力 · Capabilities
- 从站设备 — Windows 主机作为 PROFINET IO Device,受 PLC 等主站控制
- 实时周期 — RT Class 1,搭配 DarraRT 实时内核驱动
- 发现与组态 — DCP 发现 / 命名 / 地址;GSDML 导入 TIA V15+
- 过程数据 — 写 Q、读 I;报警、诊断、I&M
- 0 拷贝 — 过程映像映射成结构体,供高性能直接读写(读可并发;写请调用方串行化)
- 同一 Core — 过程数据由 DarraRT 实时内核周期搬运,SDK 侧零拷贝映射共享映像
开始 · Get started
- 先安装官方安装包(实时内核驱动 + 配置工具 + SDK):下载页 · https://download.darra.xyz/profinet/client/Darra-Profinet-Setup.exe
- 本包是 C# SDK:
dotnet add package Darra.Profinet.Slave
最佳用法 · 0 拷贝
总线周期由内核完成。Start 后把 I / Q 映射成结构体,之后当普通变量读写即可——写 Q 发给控制器,读 I 看控制器下发(I 只读)。
using System.Runtime.InteropServices;
using Darra.PnS;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct FromPlc // I:控制器 → 设备
{
public byte Present;
public short Recipe; // 多字节字段为网络大端:要宿主数值走下面 In[i].AsInt16
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct ToPlc // Q:设备 → 控制器
{
public byte Ready;
public byte Busy;
}
var device = new DarraPnS();
device.Start();
ref readonly FromPlc inp = ref device.ProcessData.InputsMapping<FromPlc>(); // 映射一次(I 只读)
ref ToPlc outp = ref device.ProcessData.OutputsMapping<ToPlc>(); // 映射一次(Q 可写)
outp.Ready = 1; // 写下的下个周期发出
byte present = inp.Present; // 读到的永远是当前周期
只要整段字节(一次性取):byte[] i = device.ProcessData.Inputs;(一次读出,同一拍自洽)。
其它语言 · Other SDKs
| 语言 / Language | 包 / Package | 来源 / Source |
|---|---|---|
| C | darra_profinet_c-win-x64.zip |
下载页 |
| C++ | darra_profinet_cpp-win-x64.zip |
下载页 |
| C# | Darra.Profinet.Slave |
NuGet(本包 / this SDK) |
| Java | xyz.darra:darra-profinet-slave |
Maven Central |
| Python | darra-profinet-slave |
PyPI |
| Rust | darra-profinet-slave |
crates.io |
许可 · License
专有软件 · Proprietary — © Darra Technology,使用须遵守随产品提供的许可协议。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.