Description: Not recommended. This will stop the client from processing any commands or functions. It suspends Scripts and Task space processing for specified seconds. Trends will not update, etc.
Tcl: SLEEP seconds
VB Script: SLEEP "seconds"
See Also: after, if, while
#example 1 - sets
text70 equal to 10
set time1 [clock
set time2 [clock
set deltat [expr "$time2 -
Don't use this command unless you thoroughly understand it. It suspends processing the current script, and all processes in current task space (i.e. window) for specified number of seconds. Trends won't update and displays will freeze if called from a local script.
It is usually better to use an IF or While loop instead of SLEEP.
For a Local Script (e.g. a graphic Display), during SLEEP, no pushbuttons or display updates happen.
For a Global Script, SLEEP will block the script and in turn delay other scripts. This is because all Global Scripts on the same SCADA node run sequentially inside bwscrp.exe.