How to generate an input to vary over time?

I have a little trick that can do that with the help of the “Web Request” node. It is the only node OOTB that enables periodic runs of a graph. You also need a simple web address that changes every time you refresh it, like for example this one:

https://www.random.org/integers/?num=1&min=0&max=100&col=1&base=10&format=plain&rnd=new

Now you can refresh any custom node or function, as long as you have the result of the “Web Request” node as an arbitrary input.

I use this workaround to generate a simple text file that acts as a buffer holding the current position. Then every time the “Web Request” node updates, I update my buffer.

Tho if you use it for graphically heavy graphs, you have to input a big enough pause in the periodic run so that the graph has enough time to refresh its graphics! Because the below is a relatively simple graph, a pause of 1500ms (or 1.5 seconds) is sufficient.

 

1 Like