Extending interfaces

Like function blocks, interfaces can be extended. The interface then obtains the interface methods and properties of the basic interface, in addition to its own.

Create an interface that extends another interface:

1. Select the PLC project object or a subfolder in the PLC project tree.
2. In the context menu select the command Add > Interface…
The Add Interface dialog opens.
3. Enter a name for the new interface.
4. Select the Advanced option and click the Extending interfaces 1: button.
5. The Input Assistant opens.
6. From the category Interfaces select the interface to be extended by the new interface.
The interface extends the basic interface.

 

Extending interfaces 2:

Multiple inheritance allowed

Multiple inheritance is allowed for interfaces. It is possible that one interface extends more than one other interface.

  • Possible:
    INTERFACE I_Sub EXTENDS I_Base1, I_Base2

See also: