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

// 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);
Scanning a CX/K-bus 1:

Setting <ReloadDevice>true</ReloadDevice> simultaneously is required for CCAT devices on the CX5000 and comparable CX controllers. Without this addition, ScanBoxes will not return a result for some CCAT configurations. After the scan, the terminals that are found are automatically added to the I/O configuration.