Appendix | Appendix D: EtherCAT Topology ActiveX Control Example(C#) //Read DeviceId from SystemManager axEcTopologyCtrl1.DeviceId = 1; axEcTopologyCtrl1.ShowOnlineTopology(); //Get DeviceId via IEnumEtherCATDevices interface IEnumEtherCATDevices devices; IEtherCATDevice device; axEcTopologyCtrl1.GetEnumEtherCATDevices(out devices); uint fetched = 0; devices.Next(1, out device, out fetched); if (fetched == 1) axEcTopologyCtrl1.DeviceId = device.DeviceId; axEcTopologyCtrl1.ShowOnlineTopology(); TargetNetId Description The property TargetNetId defines to which TwinCAT system the ActiveX control should connect to.
The TargetNetId is the AMS NetId, that is used in the TwinCAT system to identify a TwinCAT computer. Property type Read-write property Default value AMS NetId of the local system Syntax (C#) string TargetNetId { set; get; } Member of IEcTopologyCtrl Example(C#) axEcTopologyCtrl1.TargetNetId = ""; // Connection local TwinCAT-System //axEcTopologyCtrl1.TargetNetId = "172.16.2.122.1.1"; // Connection TwinCAT- System with AMS NetId 172.16.2.122.1.1 axEcTopologyCtrl1.DeviceId = 1; axEcTopologyCtrl1.ShowOnlineTopology(); ZoomFactor Description The property ZoomFactor defines the zoom factor of the topology display.
Property type Read-write property Default value 3 Syntax (C#) double ZoomFactor { set; get; } Member of IEcTopologyCtrl TwinCAT 2 446 Version: 1.7