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

AVEVA™ InTouch HMI

IsAnyAsyncFunctionBusy() Function

  • Last UpdatedMar 01, 2021
  • 1 minute read

Returns a discrete value indicating if any asynchronous QuickFunctions are running.

Syntax

result = IsAnyAsyncFunctionBusy(timeout)

Arguments

result

The discrete value that indicates if asynchronous QuickFunctions are running with following meaning:

  • 0 = No asynchronous QuickFunctions are running.

  • 1 = Asynchronous QuickFunctions are running.

timeout

The number of seconds to wait before checking if any asynchronous QuickFunctions are running. A literal integer value, integer tagname or integer expression.

Example(s)

Assume you want to connect to several SQL databases using asynchronous QuickFunctions, and you know that it takes 2 minutes to make those connections.

First, execute the asynchronous QuickFunctions to connect to the SQL databases.

Next, use the IsAnyAsyncFunctionBusy(120) function in a QuickScript to allow enough time for SQL to make the connections before completing the QuickFunction.

If after 2 minutes the connections have not been made and the asynchronous QuickFunctions are still busy trying to make the connections, a value of 1 (true) is returned by the IsAnyAsyncFunctionBusy() function.

You can now show an error message telling the operator that the SQL connections were unsuccessful.

The following script implements the scenario:

IF IsAnyAsyncFunctionBusy(120) == 1 THEN

SHOW "SQL Connection Error Dialog";

ENDIF;

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