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
®
Need help?
Do you have a question about the SIMPL+ and is the answer not in the manual?