Scanning a CX/K-bus
CCAT devices connected to CX controllers via K-bus or EtherCAT can be scanned using the Automation Interface. For these devices, it is necessary to combine ReloadDevice and ScanBoxes into a single ConsumeXml request. This is the only way to ensure that the connected terminals are recognized correctly.
Requirements
- A CX controller with a K-bus or CCAT interface is configured as a device.
- TwinCAT is in Config mode.
// Look up CCAT device (adjust path as needed)
ITcSmTreeItem cxDevice = sysManager.LookupTreeItem(@"TIID^Device_3");
// For CCAT devices: ReloadDevice and ScanBoxes must be sent in a single ConsumeXml call
string scanXml = @"<TreeItem>
<DeviceDef>
<ReloadDevice>true</ReloadDevice>
<ScanBoxes>1</ScanBoxes>
</DeviceDef>
</TreeItem>";
cxDevice.ConsumeXml(scanXml);![]() | Setting |
