Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

Coroutine node and statements

  • Last UpdatedFeb 19, 2025
  • 3 minute read

Coroutine node

Coroutine is a powerful scripting tool that extends the characteristics of Commands (loops, locals, setfields), mixes them with some of the Scheduler node (Sequential execution), and adds some more functionality.

Coroutine node

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

Full support

Full support

Full support

Full support

Elements

These elements can be used inside a Coroutine node.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Full support

Symbol legend

Full support Full support

Limited support Limited support

No support No support

Command statements

All statements defined for Command node and statements can be used inside Coroutine.

Differences between Command and Coroutine

The main differences between a Command and a Coroutine are:

  • Coroutines execution can be interrupted by a wait statement and stay waiting until the time a particular condition is verified. Upon exiting the wait statement, the coroutine restarts executing its statements.

  • The local variables keep their values for the whole execution of a Coroutine.

  • Coroutines enable jumping forwards and backwards through their statements.

  • A Coroutine can be executed one at a time. Re-executing causes the Coroutine to start from the beginning.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in