¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Wait function within SIMPL+


 

Perhaps something like this?



digital_input trig;

analog_input value;

digital_output waiting;



push trig

{

if(waiting=off)

{

waiting=on;

wait(3000,timer)

{

waiting=off;

//code that will run when timer expires

}

}

}

change value

{

if(waiting=on)

{

cancelwait(timer);

waiting=off;

//code that will run if timer canceled

}

}



From: Crestron@... [mailto:Crestron@...] On Behalf
Of coolaiddrinker
Sent: Tuesday, April 30, 2013 1:10 PM
To: Crestron@...
Subject: [Crestron] Wait function within SIMPL+





I am having issues with a small code. During a push event, i want to be able
to wait for 30 seconds.

If the wait functions timesout, then one block of code within push event
will be executed.

or If i receive a change in analog input, i want to cancel that wait and run
separate code of block within the same push event.

how do I achieve this?

TIA

Join [email protected] to automatically receive all group messages.