Webclient dropout on request

Hello everyone,

I have a question about the web client node.
I’m running an animated noise, where the animation speed is set by an incoming data from an api (of the metro network of Vienna.) The Noise visualises the time that is left until the next metro arrives in a certain
station. Instead of showing the time left as a number the animation speed determines the time left.

To my point:
Every time I refresh the request there is a short dropout of the data resulting the animation speed to change unintentionally for a short moment. Is there a way to stop this from happening or a workaround using logic ? For instance Only changing the value after a certain time or not accepting zero as an input?

Appreciate any help, thanks a lot !

DATATIME.toe (9.7 KB)

I assume the drop-out you’re referring to is the stutter from the JSON DAT entering an error state. This happens because the Web Client DAT’s output is cleared when request is pulsed, so the JSON DAT has no input for the brief time before a response is received.

I fixed this in your toe file by not using the output of the Web Client DAT and instead just updating the text1 input through the Web Client DAT’s onResponse callback, which will only ever be triggered upon response.

DATATIME.toe (9.8 KB)

You could actually take this a step further and forgo the use of the JSON DAT/DAT to CHOP altogether by extracting departureTime countdown from the JSON structure in the onResponse callback and then setting that value in a Constant CHOP.

Thank you so much Eric that was exactly what I was looking for ! :raised_hands:

1 Like