Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Will a timer in a IF statement effect commands after the End?
#1
If you have an command after and outside of an IF statement and a timer in the IF statement, will the command that it after/outside the IF statement run only after the timer or will it be completed at the first run. In my example below will test2_state be written to a true right when the scheduale runs or will it wait for the time first.
Thanks
Code:
If System::Equals
    P1=%(LVar:dayofweekname)
    P2=Tuesday
    P3=Case

Devices::FieldWrite
    P1=VRC0P.test_State
    P2=True
    P3=True

System::WaitTimer
    P1=0
    P2=10800000

Devices::FieldWrite
    P1=VRC0P.DiningRoomSpot_State
    P2=False
    P3=True

End

Devices::FieldWrite
    P1=VRC0P.test2_State
    P2=True
    P3=True


End
Reply
#2
It would run every time. Though, if it is Tuesday, then it will only run after the first block completes.
Dean Roddey
Explorans limites defectum
Reply
#3
So is there a way to have a few different timers in the same scheduled event, and that the timers will run parallel, rather then having for one to wait before the other begins?

Thank you
Reply
#4
They do run separately. Well, they don't 'run' at all, it's just a time stamp that was set and then checked at some point.

But, anyway, once you wait for one, that's it. It will not return until the time indicated has expired (returning immediately if it has already.) Actions are single threaded so there's no way to have multiple things happening at once.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  If statement to check field value simplextech 10 3,551 01-27-2020, 01:32 PM
Last Post: Dean Roddey
  Triggered Event on Timer Question znelbok 7 3,411 12-09-2019, 02:10 PM
Last Post: znelbok
  Can't Find a Couple of Documented Action Commands kblagron 7 3,908 10-02-2018, 05:47 PM
Last Post: kblagron
  Timer Driver Question kblagron 5 2,509 09-14-2018, 02:43 AM
Last Post: znelbok
  Additional HTTP REST commands requested greymatter 3 2,881 08-25-2017, 09:17 AM
Last Post: Dean Roddey
  IF statement not working EST 2 2,729 03-29-2017, 03:35 AM
Last Post: EST
  Nested If, If/Else statement not working as expected George M 13 8,166 02-17-2017, 02:55 PM
Last Post: George M
  How To Use Backdoor Commands From Admin Interface MikeW 1 1,797 12-11-2016, 02:12 AM
Last Post: Dean Roddey
  If <NOT> statement CML zra 2 1,853 03-23-2016, 03:34 PM
Last Post: zra
  How to display a coutdown timer? pjgregory 8 3,459 08-19-2015, 08:15 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)