diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT/TwinCATDriverFactoryExtensions.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT/TwinCATDriverFactoryExtensions.cs index 72430816..68dbe38b 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT/TwinCATDriverFactoryExtensions.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.TwinCAT/TwinCATDriverFactoryExtensions.cs @@ -89,8 +89,9 @@ public static class TwinCATDriverFactoryExtensions // Driver.TwinCAT-003: Structure-typed pre-declared tags are not supported. The driver's // atomic surface cannot read/write UDT blobs — MapToClrType falls through to typeof(int) // and ConvertForWrite throws NotSupportedException, producing garbage reads or late - // runtime failures. BrowseSymbolsAsync already correctly yields DataType = null for - // Structure symbols so they never appear in the discovered address space. Reject here + // runtime failures. BrowseSymbolsAsync expands a Structure/UDT/FB symbol into its atomic + // member leaves (the container itself is never surfaced as a writable Structure node), so the + // supported way to address members is discovery — not a pre-declared Structure tag. Reject here // with a clear error so operators get a configuration-time failure, not a silent wrong value. if (dataType == TwinCATDataType.Structure) throw new InvalidOperationException(