Beckhoff · TwinCAT 2 Automation Interface
The items involved in the operation are incompatible (0x98510004). For LinkVariables(), this occurs when two variables cannot be linked due to incompatible data types, attempting to link two outputs, linking an output of a task to an input of a device, or linking variables of the same owner. For ImportChild(), this means the tree item contained within the import file is not a valid child item for the current parent, or its structure is incompatible.
Click steps to track your progress.
For LinkVariables(): Review the data types, I/O directions, and ownership of the variables specified by bstrV1 and bstrV2.
For LinkVariables(): Ensure you are not attempting to link two outputs or an output of a task to an input of a device.
For ImportChild(): Verify that the exported child item is compatible with the target parent item type in the TwinCAT configuration.
For ImportChild(): Check the XML structure of the exported file for any discrepancies that would make it an invalid child.