Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: X10 Conditionals!...

  1. #21
    Join Date
    Nov 2003
    Location
    Hove, E Sussex, UK
    Posts
    4,005

    Default

    Are you using numbers i.e. 0 and 100 or "On" and "OFF"
    Thx, Dan

    Onwards and Upwards!
    http://www.danward.co.uk

  2. #22
    Join Date
    Nov 2003
    Location
    Hove, E Sussex, UK
    Posts
    4,005

    Default

    Just checked the level should be a number
    Thx, Dan

    Onwards and Upwards!
    http://www.danward.co.uk

  3. #23
    Join Date
    Jun 2004
    Location
    Hong Kong
    Posts
    389

    Default

    I am using the event.exe to trigger.

    Code:
    event X10BL
    Both Actions have the same event. I was hoping that the conditional might determine which one gets triggered.

    I have attached my sample GML for reference.
    Attached Files Attached Files

  4. #24
    Join Date
    Nov 2003
    Location
    Hove, E Sussex, UK
    Posts
    4,005

    Default

    Ah, looks like your event is in the wrong place, try this.
    Attached Files Attached Files
    Thx, Dan

    Onwards and Upwards!
    http://www.danward.co.uk

  5. #25
    Join Date
    Jun 2004
    Location
    Hong Kong
    Posts
    389

    Default

    Now that works fine if the Lamp is already ON.

    But if the lamp is off the the following occurs

    a) Lamp Turns On
    b) Lamp Turns Off

    It seems that it evaluates the first condition - then says yep - ok - turn the light on. Then it evaluates the next condition, and since the next condition checks if the lamp is on - then turns it off.

    I need something that utlises the conidtionals and as soon as 1 is executed - the processing for that branch stops.

    Any ideas???

  6. #26
    Join Date
    Nov 2003
    Location
    Hove, E Sussex, UK
    Posts
    4,005

    Default

    I can't see why that would be, Rob?
    Thx, Dan

    Onwards and Upwards!
    http://www.danward.co.uk

  7. #27
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    I think I can. I believe that nodes in the GML are executed in sequence.

    You'll need to use macros rather than plain actions and add a Stop processing event action (Actions\Flow control) to the end of the macros. That should fix it.
    --Rob

  8. #28
    Join Date
    Jun 2004
    Location
    Hong Kong
    Posts
    389

    Default

    OK - I will have a play and see how I go. Will post back with results

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •