The trio:wait macro command is useful to hold execution flow for some time. The waiting time is specified as a mandatory argument and is set in milliseconds:

trio:wait 5000

Unlike the trio:sleep command, trio:wait does not block other commands execution.

It is recommended to use trio:wait in all cases, where a delay in script or macro execution is required. trio:sleep is now considered deprecated while kept for backward compatibility, and specific cases.

Controlling Post-Execution Waiting Times for Macro Commands

Various setups may have their own latency in terms of how much time it takes to finish execution of a certain command.

It is a common practice to use the trio:sleep command to wait until the right time, while executing a macro or a script. A typical application in the macro would look like this:

======== MyMacro1 ========
page:read 1002
trio:sleep 2000
=========================

This code can be interpreted as "read the page 1002 and wait for 2 seconds”, assuming this would be enough time for the page to be read.

Each time a user adjusted the waiting time period, the corresponding lines would have to be modified for all macros and scripts, in all shows (for example, changing the 2000 value to 3000).

Since Viz Trio 4.4, there is the possibility to control waiting times from one place, without modifying existing macros and scripts.

Trio Folder

In the Viz Trio folder (C:\\Program Files\\Vizrt\\Viz Trio), you can find the trio.config file, an XML configuration file that can be used for centralized control over command waiting times.

Edit the file's content, save it, and then restart Viz Trio to apply the new configuration.

Using the example above, this is the following configuration:

<?xml version="1.0"?>
<configuration>
<commands>
<command name="page:read" delay="2000"/>
</commands>
</configuration>

The configuration specifies that any call to the page:read command from any macro or script, is followed by a wait time of 2000 milliseconds. Therefore, if we use this configuration with the macro example mentioned previously, the overall waiting time is 4000 milliseconds (2000 milliseconds done automatically by Viz Trio, and an additional 2000 milliseconds requested by trio:sleep).

It is recommended to remove the direct waiting command, so the updated MyMacro1 resembles the following:

======== MyMacro1 ========
page:read 1002
=========================

Adjusting Post-Execution Waiting Times

Any Viz Trio command's post-execution waiting time can be adjusted in the configuration file.

Info:

  • Specify the full command name (with the namespace format namespace:command) in the configuration file.

  • Viz Trio uses a "non-intrusive" method for post-execution waiting (running the trio:wait command each time it needs to wait). Please refer to the trio:wait description for more information on its behavior.

  • By default, when a command is not mentioned in the trio.config file, the post-execution waiting time is zero. There is no benefit using negative delay values.

  • If the trio.config file content is damaged and violates XML rules, it is ignored by Viz Trio.

Overall Guidelines

  1. Identify which commands require waiting time adjustments.

  2. Modify the content of the trio.config file in a text editor, to include a separate command tag for all necessary commands:

    <command name="fullcommandname1" delay="2000"/>
    <command name="fullcommandname2" delay="500"/>
    <command name="fullcommandname3" delay="1000"/>
  3. Save the trio.config file.

  4. Modify macros and/or scripts to remove trio:sleep calls after these commands. Ensure your changes to macros and/or scripts are saved.

  5. Restart Viz Trio.

Note: If you have several scripts and don't want to modify them, you can still set the waiting time for commands in trio.config. However, you may need to be more conservative with the waiting time values set in the configuration, as they are added to times specified in existing trio:sleep calls.