Event Handlers

COMPONENT MODELING | COMPONENT SCRIPTING

When using Python API to write application and component scripts, you may need to call functions in response to events. These are known as event handlers: functions in a script that are called in response to an object event, for example a change in a property value.

In this tutorial you learn how to:

  • Execute event handlers when a simulation is or is not running.
  • Execute event handlers when property and signal values change.
  • Execute event handlers using object event types, for example a servo controller heartbeat/pulse.

Software Version: 4.0.2

What did you think about the lesson?

5 answers.