Processing block methods

The methods on this page can be implemented by the user. The PreInit() and Init() are executed once during top-controller or EtherCAT bus state transitions, while the Output() and Update() are executed periodically when the controller is in run state.

PreInit

void PreInit()

PreInit() is called immediately after the component is created. For motion controllers this is in the transition from config to run state. For EtherCAT SubDevices this is during boot. No memory allocation is allowed. Inputs and parameters values are not available. Useful for setting values on outputs that should be available in config state (PreOperational for PMP SubDevices).

Init

void Init()

Init() is called at each transition from config to run (PreOperational to SafeOperational for PMP SubDevices). Memory is allowed to be allocated. Inputs and parameters values are available.

Output

void Output()

Output() is called in the IO-critical calculations, when the new sensor data is available. The IO-critical calculations are executed between receiving new sensor data and sending new setpoints to actuators. All calculations that depend on the newest input values and influence the output signals should be added in this function.

Update

void Update()

Update() is called in the non-IO-critical calculations. These calculations are done based on the ‘old’ input values. These calculations are done outside the critical loop and can be seen as a preparation for the IO-critical calculations.