Help with WAIT-command for DO_PUSH
Römer
Posts: 2
Hi everyone.
I'm new to NetLinx Studio and have a question regarding WAIT and DO_PUSH. I would like to add a WAIT between two DO_PUSH commands.
The code below lowers a screen and opens a curtain. This all works so far. But now I want the curtain command to be executed after about 30 seconds. Because when the curtain rises, the screen should already be down.
Code:
CASE 2: // presentation
{
IF(![vdvBEAM___1,LAMP_WARMUP_COOLDN_FB])
{
CANCEL_WAIT 'WAIT_MODE_PROJ'
nMode=2
ON[dvTP_MAIN,buMode[2]]
DO_PUSH(vdvTP_RAUM,buLW[1]) // screen down
DO_PUSH(vdvTP_RAUM,buVORHANG[2]) // curtain opens
Thanks
0
Answers
Create a timeline with a two event time array [0, 30000]
In the event switch case on the event time array index
timline_event[TL_START] {
switch(timeline.sequence) {
case 1:{
set_pulse_time(5);
pulse[dvREL,SCREEN_DOWN];
break;
}
case 2: {
set_pulse_time(5);
pulse[dvREL, CURTAIN_OPEN];
break;
}
}
... and you're better off directly controlling the device aot indirectly through a do_push() - that really should be reserved for the last resort and not the first thing out of the quiver.
Thank you HARMAN_icraigie for your Input und Example.