Sub-controller

The SubController interface represents a subordinate motion controller, that is a controller that is controlled by a higher-level controller via a real-time interface. A sub-controller can also control further sub-controllers. The level of sub-controller nesting is not limited by the API but will be limited in specific product implementations. A sub-controller can be integrated with subordinate controllers in one physical package or might connect to them via external real-time interfaces.

Applying a different model

A top-controller creates sub-controller instances using XML controller descriptions that contain a model which defines the features of a sub-controller. The top-controller tries to retrieve a controller description from different locations in the following order:

  1. From the sub-controller itself via a file transfer.

  2. From the top-controller’s built-in file system.

If neither location provides a compatible XML controller description (e.g. for third-party devices), a sub-controller will show up as an “Unknown Slave” without any published functionality. If the user has a compatible XML controller description available it is possible to apply the model contained therein on an existing sub-controller using any of the methods listed below.

When a new model is applied to an existing sub-controller, the top-controller tries to create a new sub-controller instance using this model. If a new instance is successfully created, the existing sub-controller instance is destroyed and replaced by the newly created sub-controller instance. Any function called on an old reference to the sub-controller or its children will throw a ObjectDisposedException (for C#) or ObjectDestroyedException (for C++). If the creation of a new sub-controller instance fails, the original sub-controller instance will remain available. In the case that a model is applied on multiple sub-controller instances, the creation and replacement are done one sub-controller at a time. This means that if the creation of a sub-controller fails after some sub-controllers have already been successfully replaced, no roll-back is performed.

See also

SubController

XML configuration example of the sub-controller interface.