Skip to main content
Visitor II
April 6, 2020
Solved

[Solved] Reset a variable at fixed frequency

  • April 6, 2020
  • 4 replies
  • 1951 views

Hi all,

I have a data streaming firmware and to keep the stream alive I must reset a counter before it reaches a fixed value.

Is there a way to perform this operation with CubeMonitor while monitoring other values?

Thank you

Walter

    This topic has been closed for replies.
    Best answer by Thierry

    Thanks your your answer. I have modified your flow accordingly, please find attached flow.

    Here are the updates done in the flow :

    There are plenty of good document to read. The first one is the STM32CubeMonitor wiki available at

    https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:STM32CubeMonitor_overview. It is updated on regular basis with questions/answer coming from the this forum.

    If you want more explanation on node-red framework, there is the node-red website which provides plenty of information from beginner to expert : https://nodered.org/docs/

    Hope it answers your question

    4 replies

    Visitor II
    April 6, 2020

    Hi Walter,

    Yes it should be possible since your know the counter address.

    Indeed as STM32CubeMonitor is able to read but also write some values at various addresses, then you can implement a logic in your flow that reset your counter when a condition is reached.

    MyzharAuthor
    Visitor II
    April 6, 2020

    I think that I could use the "trigger" function, but I do not know how to use it

    Visitor II
    April 6, 2020

    Not sure the trigger can fit your needs. Could you please explain a bit more what you want to achieve and share your current flow such so that we can better help you ?

    MyzharAuthor
    Visitor II
    April 6, 2020

    The FW works in this way:

    1) The host sends the "Start data acquisition" command over USB and that sets a variable to 1 to indicate that the stream is started

    2) During the data acquisition the host must send a ping before 6 seconds to avoid that the stream stops, the ping resets a counter that is increased at 400Hz

    I must simulate this behavior:

    1) set the "start stream" variable to 1

    2) reset the counter to zero before it reaches the value 2400

    The shared flows does exactly what I said, but I must continuously press the "Write" button on the dashboard to keep the stream alive

    Visitor II
    April 6, 2020

    Thanks will have a look and keep you informed.