Issues with CBus Timer

Discussion in 'C-Bus Automation Controllers' started by JoshuaTofler, Jan 28, 2024.

  1. JoshuaTofler

    JoshuaTofler

    Joined:
    Feb 4, 2023
    Messages:
    3
    Likes Received:
    0
    Location:
    Tasmania
    Does anyone have any idea why this timer won't start? I'm doing my head in haha.

    upload_2024-1-28_15-47-55.png
     

    Attached Files:

    JoshuaTofler, Jan 28, 2024
    #1
  2. JoshuaTofler

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,527
    Likes Received:
    173
    Location:
    Adelaide, Australia
    This is Pascal, not Python, so indentation does not determine structure (and it doesn't in any sensible language :)).
    Only the first statement after the IF and ONCE are part of the condition. The other instructions are always executed so you start the timer and then stop it staight away. You need to enclose all the statement that are part of a condition in begin/end blocks.

    Also, the first IF MUST be a ONCE

    As an aside, there are better ways to do this. Turn the fan on with the light, then pulse it when the light goes off.
     
    Ashley, Jan 28, 2024
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.