Synchronized Animation/blinking

I have multiple parts in a window, all instances of the same template. The template has a style customizer set on one of it subparts that causes it to blink if a boolean is true. 500ms visible, 500ms not.

Each instance of the template part is tied to different element in a dataset.

The problem I’m having is they don’t blink in unison.

Is there a way to get them to do that?

Yes, you can do that pretty easily with a timer component but there isn’t a great way to get them all to blink in unison with the animation feature in the style customizer. You would have to put a single timer somewhere on your screen and have all of your objects bounce between values based on that.

Create a client tag called Flasher, then place a timer on a window that is always opened and have the timer update the Flasher tag.

If you are going to use a client tag, then you can use a Client Tag Change script to toggle it instead of a timer.

I’d use a client tag like Pat suggested, with this expression:objectScript('args[0].time % 1500 < 750', now(750))Uses Simulation Aids’ objectScript() – could use runScript() v7.8+.

1 Like

EDIT: fixed dead link.

My take is a bit different-- as most of my takes seem to be. :laughing: :

A Client folder called “Flash”. This folder contains a tag called RootValue, which is updated by a Client Timer script running at 125ms:

value=system.tag.read("[Client]Flash/RootValue").value + 1 if value > 15: value = 0 system.tag.write("[Client]Flash/RootValue", value)

Then, added four more tags, each extracting a different bit from RootValue.



Now I have four different bits with four different rates.

Here is a complete project to illustrate.
Flasher_2018-10-13_1117.proj (18.4 KB)

1 Like

I just thought I’d share my solution here (didn’t see this post originally), as inspired by others.
http://forum.inductiveautomation.com/t/generate-0-5s-and-0-25s-pulse-tag/20391/4

just wanted to add my solution here. haven’t seen anyone offer this answer. On the root container, check the ‘Combine Repaints’ option in the Behavior settings section. sync’d all my blinks on the form together.

3 Likes