# Generate 0.5s and 0.25s pulse tag

**URL:** <https://forum.inductiveautomation.com/t/generate-0-5s-and-0-25s-pulse-tag/20391>\
**Category:** Ignition\
**Created:** [October 26, 2018, 5:51am UTC](https://forum.inductiveautomation.com/t/generate-0-5s-and-0-25s-pulse-tag/20391 "2018-10-26T05:51:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 29, 2018, 11:45pm UTC](https://forum.inductiveautomation.com/t/generate-0-5s-and-0-25s-pulse-tag/20391/4 "2018-10-29T23:45:43Z")

</div>

Thanks for the replies.

I ended up using client tags and a client script:

```auto
# Set this to the script execution time period in ms
timeInterval = 125
# Time to count up to in ms. This affects the times pulses that may be generated
counterPeriod = 2000

tag = "[Client]System/Pulses/125ms Counter"
counter = system.tag.read(tag).value

# Increment the 125ms counter tag if the time is within the counterPeriod time, otherwise reset to 0
if counter > (counterPeriod/timeInterval - 1):
	system.tag.write(tag, 0)
else:
	system.tag.write(tag, system.tag.read(tag).value + 1)

# Write the pulse values to the client tags
system.tag.write("[Client]System/Pulses/125ms", int(counter*timeInterval / 125) % 2)
system.tag.write("[Client]System/Pulses/250ms", int(counter*timeInterval / 250) % 2)
system.tag.write("[Client]System/Pulses/500ms", int(counter*timeInterval / 500) % 2)
system.tag.write("[Client]System/Pulses/750ms", int(counter*timeInterval / 750) % 2)
system.tag.write("[Client]System/Pulses/1000ms", int(counter*timeInterval / 1000) % 2)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/generate-0-5s-and-0-25s-pulse-tag/20391)._
