# Pulsing outputs

**URL:** <https://forum.inductiveautomation.com/t/pulsing-outputs/92044>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 18, 2024, 6:22pm UTC](https://forum.inductiveautomation.com/t/pulsing-outputs/92044 "2024-06-18T18:22:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 6:22pm UTC](https://forum.inductiveautomation.com/t/pulsing-outputs/92044/1 "2024-06-18T18:22:44Z")

</div>

Is there a way to pulse outputs in perspective? I am trying to make an icon flash and not sure the best way to go about it. The flash is controlled by a tag turning on.

Thanks!

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [June 18, 2024, 6:30pm UTC](https://forum.inductiveautomation.com/t/pulsing-outputs/92044/2 "2024-06-18T18:30:24Z")

</div>

The cleanest way would probably be to create a flashing CSS style like in this post:

> [@How to run a script continuously to update tags](https://forum.inductiveautomation.com/t/how-to-run-a-script-continuously-to-update-tags/92018/6):
>
> You'll just have to add a little map transformation that acts like a NOT gate. This can still be done without scripting. For the flashing, you can make an animated style like in the below example. Simply enable this style when either of those alarms are active. It really, really sounds like you can get rid of any startup scripts that drive this behavior and replace them with a tag binding combined with a transformation.

That would automatically loop as long as 'infinite' is checked.

Then, you put an expression binding on `props.style.classes`:

```python
if({mytag}, 'flashing', '')

```

assuming your CSS style class is called `flashing` and your tag is `mytag`. Adjust the names to fit your situation.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [June 18, 2024, 7:46pm UTC](https://forum.inductiveautomation.com/t/pulsing-outputs/92044/3 "2024-06-18T19:46:18Z")

</div>

I would recommend doing any kind of flashing animations using CSS because it doesn't have to do a round trip to the gateway to process the animation (more saleable).

I prefer to do blinking animations in the advanced style sheet. You just have to make sure you're adjusting the right properties but that's typically fairly simple.

You can use these styles in the code window below to either toggle opacity completely off (hidden) and the other one blinks opacity. Alternatively, you could animate the background color or background-image or really any CSS property you want to. The "psc-" prefix is required for styles defined in the advanced style sheet. You omit that part when you're applying the style to an object.

In this example, you could use a map transform to hide an item with the "opacity-off" style or to blink an item with the "opacity-blink" style

```python
.psc-opacity-off
{
	opacity: 0
}

.psc-opacity-blink
{
	animation: blinkOpacity 1.3s linear infinite;
}

@keyframes blinkOpacity{
	0%, 50%{
		opacity: 1
	}
	50%, 100%{
		opacity: 0
	}
}

```
