Skip to content

Controller

class Controller

A Controller is a reusable control-behaviour type - the unit that defines the commands, states, transitions, interlocks and messages for one kind of device or function. It is instantiated many times as ControllerInstances in the tree and exposes its behaviour through a public interface, a per-instance interface and a private internal interface. A project controller usually extends a library base controller and adds only its specific behaviour.

Create a controller

  • By right-clicking on a package you enter the context menu.
  • Open resource assist om3koevv
  • A new controller is created by selecting the controller element.

gbzrjghi

  • In the wizard, the controller name must be entered:

NOTE: Best practice

The controller corresponds to a type that is instantiated. Therefore, the name should be capitalized.


wfmocubk

You will automatically be taken to the newly created controller resource. The missing ControllerInterface and an incomplete state machine are marked as errors.

bljr9a61

The ControllerInterface can be selected using Ctrl + Space. Existing interfaces are listed:

lc9ii81o

If no interfaces have been defined yet, a new one can be created directly here:

9okbu9t5