Hello, I am building a small SCADA system for my gensets using node red.
I've used svg ui nodes to design diagrams and will like to animate some parts like circuit breakers, isolators. Everything seems perfect just that am unable to close and open circuit breakers base on input messages. When a message arrives at the input, the breaker will close and open back and the process continuous until i stop the input message. I've used the Transform-rotate option of svg animation tab I will love that when a message arrives at the input, the breaker closes and only opens when the input message no longer exist. Please any help on this, I'll be grateful.
Hi @Desmond-Zeh,
Do you really want to animate these parts, i.e. they move so slowly from position A to position B so that you will be able to see the movement with your eyes? If so then you indeed need to use an animation.
Or do you just want to switch these parts immediately from position A to position B. So you don't see them moving towards their new position, and they immediately get their new value. Then you don't need animations.
What was the result? I assume not the result you had expected...
What do you mean with this? When a message arrives you can do some things. But that is about it. The messages aren't really disappearing...
It might be useful if you share a small simplified flow here, so people can try to adjust it to help you.
Thank you for your response, Bart.
I want to see the parts move from their initial position A to another position B when the input message is greater than zero, and remain at B until the input message turns to zero.
I used the Transform-rotate option and when a message arrives the input, it ( breaker) moves from A to B and then back to A, and then back to B, the process continuous until the input message turns to zero.
Ok thanks it is a bit more clear now.
But since you have ignored my question to share a little example flow, it is still guessing what you have tried so far...
I assume you need the following two settings:
So when the input message arrives, the animation will be started (see explanation here). When the animation is ended (after the animation duration you have specified) the animation 'to' value will be freezed. Which means the switch will be kept in that state, and the animation will not repeat.
The problem is solved, thanks for your assist.
This is what I’ve done, I used two separate animation classes but with the same id.
One class moves the element from point x-y (0,30) at a fixed point (518.239,306.126) when the input message is greater than zero and freezes it after 5 seconds.
The other class moves it back to its initial position x-y (0, -30) at the same fixed point as in class 1 above when the input message is zero or undefined and freezes it after 6 seconds.
Here I can actually see the breaker closes and opens as required. But it will require I declare double classes for each id which is pretty bulky. But am a bit satisfied.