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

AVEVA™ Process Simulation

Example 2 — Create a new sequence

  • Last UpdatedJan 06, 2025
  • 1 minute read

This example demonstrates how to create a new sequence by copying an existing one.

Sequences are defined in the sequences folder of the AVEVA Real-Time System (RTS) installation. Each sequence has its own subfolder in the sequences folder. See Sequence folder structure for more information.

Create a new sequence

  1. Open File Explorer and browse to the sequences folder of the RTS installation.

  2. Copy the sequence_basicsample subfolder and give it another name, such as sequence_mysequence.

  3. In the sequence_mysequence folder, open the cycle_script.csx file in a text editor.

    Consider the structure of this file:

    bool Init()

    {

    Log.Information($"From Init event for sequence: {SequenceName}, HistTimestamp: {HistTimestamp}");

    return true;

    }

    bool Run()

    {

    Log.Information($"From Run event for sequence: {SequenceName}, HistTimestamp: {HistTimestamp}");

    return true;

    }

    bool Shutdown()

    {

    Log.Information($"From Shutdown event for sequence: {SequenceName}, HistTimestamp: {HistTimestamp}");

    return true;

    }

    The Init, Run, and Shutdown functions are Events that the ScriptRunner invokes, in that order. The contents of the functions support most C# syntax. See Cycle script files for details.

  4. Edit the cycle_script.csx file in the sequence_mysequence folder.

    For example, add the following line in the Run() Event:

    Log.Information($"I made this change.");

  5. Open the RTS shell.

    See Open the AVEVA Real-Time System shell to run commands for more information.

  6. Enter the following command:

    rts run mysequence

    You should see the updated text in the shell and log files.

    You don't need to restart RTS after you update sequence scripts or create new sequences.

TitleResults for “How to create a CRG?”Also Available in