Changing UI Keyframe Animation while playing

I’m trying to create a simple animation where a bar changes its position through keyframes. I want the speed of this change to be affected by a slider. I do this with the Play Animation node, but it doesn’t change it’s speed while I move the slider. The animation starts, when a button is pressed. How can I ‘update’ the animation to change its speed dynamically?

For a better understanding: I press a button and the animation starts with the default value given by a slider. So if the slider is at its peak, the animation plays at normal speed. If the slider is at its midpoint, the animation plays at half the speed. How can I when I press play at its peak and then, while the bar is moving, change it to its midpoint, tell the bar to slow down? Thanks in advance.