GithubHelp home page GithubHelp logo

Comments (8)

Writech avatar Writech commented on September 26, 2024

Delay mode: Timer will emit one event via timer-triggered output after the specified delay expires.
Loop mode: Timer will keep emitting events indefinitely via timer-triggered output with specified interval.

Event is emitted via timer-halted output if STOP or PAUSE payload is sent to the timer.

from node-red-contrib-controltimer.

steerage250 avatar steerage250 commented on September 26, 2024

Thanks, that is what I expected, however, what I don't expect is by changing the timer from Delay to Loop, that the initial timer time-out event switched from the 1st output to the 2nd output. As a Delay timer, after 10 seconds, I get a "Timer Triggered" debug message from output 1. If I then change the timer type to Loop, after 10 seconds, I get the "Timer Halted" debug message from output 2.

image

from node-red-contrib-controltimer.

Writech avatar Writech commented on September 26, 2024

I'm not exactly sure what the issue is still. Can you produce exact steps to replicate the problem you're encountering?

What I tried so far:

  • Using the config panel configure controltimer with 5 second delay.
  • Start the timer.
  • Timer expires and an event is sent to timer-triggered output.
  • Start the timer again.
  • After ~2.5 seconds send an override config message configuring the timer to run in 5 second loop mode.
  • Timer restarts with 5 second loop mode and it didn't emit an event to timer-halted output.
  • Timer expires the first time and an event is sent to timer-triggered output. All the succeeding loop expiries also send an event to timer-triggered output.
  • Only when I manually send STOP payload an event is sent to timer-halted output.

What I also tried:

  • Using the config panel configure controltimer with 5 second delay.
  • Start the timer.
  • Timer expires and an event is sent to timer-triggered output.
  • Using the config panel configure controltimer with 5 second loop.
  • Deploy changes.
  • Start the timer.
  • Timer expires and an event is sent to timer-triggered output and all the succeeding loop expiries also send an event to timer-triggered output.
  • Only when I manually send STOP payload an event is sent to timer-halted output.

from node-red-contrib-controltimer.

steerage250 avatar steerage250 commented on September 26, 2024

I do what you do in your second example, but with different results.
This first screenshot shows a Delay timer expiring and sending an event to the top output - as expected.
controltimer delay example
I then reconfigure the timer as a Loop timer and deploy (as per this screenshot):
controltimer loop configuration

  • and I get a LOOP_TIMEOUT message sent to the lower output as per the next screenshot -and the timer does not keep looping (it Stops and reverts to idle)
    controltimer loop example

from node-red-contrib-controltimer.

Writech avatar Writech commented on September 26, 2024

You are getting LOOP_TIMEOUT message to the timer-halted output because you have set Loop timeout to 5 seconds. Using the Loop timeout setting you can limit the timer with a specified duration after which is should time out and stop. If you set Loop timeout to 0, as it is by default you will not get the the LOOP_TIMEOUT message.

from node-red-contrib-controltimer.

steerage250 avatar steerage250 commented on September 26, 2024

ah! now I understand. I did not understand what the Loop_Timeout was for. It is maybe another thing that could be put into some expanded description in the help file :-)
thanks

from node-red-contrib-controltimer.

steerage250 avatar steerage250 commented on September 26, 2024

I now have an application where I would like to use the Loop mode (I think), but I don't understand how it works. What I need is 9 outputs/messages produced from one trigger event. Is this possible?

I tried setting the timer to 5 secs, and the loop timeout to 1 sec with a max iterations of 9. However, it just times-out after 5 seconds and doesn't do any looping.

When/how does it loop ?

thanks
Ian

from node-red-contrib-controltimer.

steerage250 avatar steerage250 commented on September 26, 2024

ah - I got it to work: timer duration of 1 second, then a big loop timeout with a max iteration counter of 9
all good
thanks

from node-red-contrib-controltimer.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.