Crestron SIMPL+ Reference Manual page 34

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software
®
24
SIMPL+
{
Running = 1;
FOR(I = 0 TO 32000)
{
// code
}
Running = 0;
}
}
FUNCTION MAIN()
{
Running = 0;
}
In this case, a new variable, Running is declared and set to 0 on system startup in the
MAIN. When the event is triggered, if Running is 0, then it will be set to 1, and the
FOR loop will execute. Assume now the event has a task switch. If trig is hit again,
the event will start, but will immediately exit because IF statement evaluates to false.
When the task resumes, and ultimately completes, Running will be set to 0 again so
the bulk of the function may execute again.
NOTE: The event is STILL reentering. It is being forced to terminate immediately
and prevent reentry more than one level deep.
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents