TSET 3, 0 // -- Initialize Timer ONCHANGE "Intialize", "@delay()" // the trigger that starts the timer and counter ONCHANGE "delay_count", "@Hopper()" ONTIMER 3, "@multidelay()" FUNCTION delay() TSET 3, 3 // -- Initialize timer with a 3 second delay Print "Timer Started" ENDFN Function multidelay() delay_count@ = delay_count@+1 //This is the counter for the delay Endfn Function Hopper() If delay_count@ = 1 Then print"First Delay" //Run logic here that starts after the x second delay LOGIO "HOPPER1_LIVEWEIGHT" SETSYS TAG, "load","HOPPER1_LIVEWEIGHT" // -- Load Tag SETSYS TAG, "LogEnabled", 1 // -- Enable historical logging SETSYS TAG, "LogDB", -9 // -- Disable deadband logging SETSYS TAG, "save" LOGIO "HOPPER1_LIVEWEIGHT" Else If delay_count@ = 2 Then print"Second Delay" //Run logic here that starts after the x second delay LOGIO "HOPPER2_LIVEWEIGHT" SETSYS TAG, "load","HOPPER2_LIVEWEIGHT" // -- Load Tag SETSYS TAG, "LogEnabled", 1 // -- Enable historical logging SETSYS TAG, "LogDB", -9 // -- Disable deadband logging SETSYS TAG, "save" LOGIO "HOPPER2_LIVEWEIGHT" Else If delay_count@ = 3 Then print"Thrid Delay" Else If delay_count@ = 4 Then print"Fourth Delay" Tset 3,0 Print "Timer now off" delay_count@ = 0 //Resets counter Else Endif Endif Endif Endif Endfn