• HOST_BobO (AutomationDirect)

    Your timer is configured to run for zero seconds, that's what the preset value is for. Your stage is counting to zero, then jumping out. Not super useful.

     

    You can put code ahead of the first stage in a program block. That code runs as long as the program block is running, and isn't controlled by stages. Put your timer there.

     

    Please note that simple timers are designed to reset by termination logic. Stages and program blocks run termination logic upon completion, so if you need the timer value after completing the program, you'll need to store it as you exit.

     

    Global timers and counters are not reset by termination logic, and must be explicitly reset by an instruction, but can be useful for timing things that span stages or program blocks.

    Expand Post
    Selected as Best
  • HOST_BobO (AutomationDirect)

    Probably need a bit more detail. Are you ever exiting the stage?

  • martinav (Customer)

    Not much more to show. Its the first stage. Stuff down the ladder runs fine. I run this program from MAIN. Blows by this stage like it isnt there. Should not it start counting up????

     

    Yes, it needs to count as it moves out of the stage. Its a counter for how long the program takes to run a cycle. Its value is needed in other stages.

    • 2021-05-06 13_10_08-LPRMartin
  • martinav (Customer)

    hmm.. well, so it seems these things dont run outside of their current stage. Since Main$ is also staged, that makes times of this variety pretty much worthless for this purpose. Unless there is another way of doing them.

  • HOST_BobO (AutomationDirect)

    Your timer is configured to run for zero seconds, that's what the preset value is for. Your stage is counting to zero, then jumping out. Not super useful.

     

    You can put code ahead of the first stage in a program block. That code runs as long as the program block is running, and isn't controlled by stages. Put your timer there.

     

    Please note that simple timers are designed to reset by termination logic. Stages and program blocks run termination logic upon completion, so if you need the timer value after completing the program, you'll need to store it as you exit.

     

    Global timers and counters are not reset by termination logic, and must be explicitly reset by an instruction, but can be useful for timing things that span stages or program blocks.

    Expand Post
    Selected as Best
  • martinav (Customer)

    Well, your suggestion to put it ahead of the first stage was the winner.

     

    I want the timer to run with no limit. Which is what it seems to be doing without a preset value. So, useful in this case.

     

    Thank you.

    • HOST_BobO (AutomationDirect)

      The preset value only affects the status bits. The timer continues to run as long as it is enabled.