# Vision client tag is not updating in real time

**URL:** <https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [April 4, 2022, 11:19am UTC](https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991 "2022-04-04T11:19:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahul.bhakte](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@rahul.bhakte](https://forum.inductiveautomation.com/u/rahul.bhakte)\
**Post date:** [April 4, 2022, 11:19am UTC](https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991/1 "2022-04-04T11:19:11Z")

</div>

Hi,  
I am writing into a client tag on Tag change Client Event scripts, but it seems that it doesn’t get updated whenever the value in tag changes.  
On the other hand, if I re-launch the client then it’s getting updated.  
How should I tackle this situation?  
Please help!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 4, 2022, 11:25am UTC](https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991/2 "2022-04-04T11:25:31Z")

</div>

Show your script. (After you paste, highlight all the code and click the “pre-formatted text” button so the pasted code is formatted correctly.)

---

<div class="post-metadata">

**Author:** ![rahul.bhakte](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@rahul.bhakte](https://forum.inductiveautomation.com/u/rahul.bhakte)\
**Post date:** [April 6, 2022, 11:33am UTC](https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991/3 "2022-04-06T11:33:47Z")

</div>

```auto
'''This script is on Tag Chanage of "ConditionTag" and making its value 1 every 30 sec through Timer script'''
import time
if newValue.value == 1:
	newStr = system.tag.read("[client]Tag2.Value").value #Client tag
	s2 = system.tag.read("[default]Tag3.Value").value	#This tag is changing in realtime
	Sleeptime = 0.25
	
	newStr2 = newStr[1:] + s2[0:]
		
	system.tag.write("[client]Tag2", newStr2)	#Writing into client tag
	
	time.sleep(Sleeptime)
	
	system.tag.write("[client]ConditionTag",0)

```

I have a tag binding of client tag “Tag2” to a label. But this label is not updating in realtime.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 6, 2022, 12:03pm UTC](https://forum.inductiveautomation.com/t/vision-client-tag-is-not-updating-in-real-time/57991/4 "2022-04-06T12:03:00Z")

</div>

The sleep is probably jacking you over. Consider making Condition an expression tag with the value:

```auto
floor(getSecond(now()) / 30)

```

This will toggle between 0 and 1 at the 0 and 30 of the minute. The upshot is that it will simplify your script to just the operation affecting Tag2 and Tag3.  
Also, consider using readBlocking() and writeBlocking() functions to read and write your tags.

```python
tagList = ['[client]Tag2', '[default]Tag3']
tagValues = [tag.value for tag in system.tag.readBlocking(tagList)] # Read the tags, extracting the values

stringOut = tagValues[0][1:] + tagValues[1][0:]
	
system.tag.writeBlocking("[client]Tag2", stringOut)	#Writing into client tag

```
