# Converting value in tag ( real - time )

**URL:** <https://forum.inductiveautomation.com/t/converting-value-in-tag-real-time/44560>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 17, 2021, 5:00am UTC](https://forum.inductiveautomation.com/t/converting-value-in-tag-real-time/44560 "2021-03-17T05:00:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hydradenlon](https://avatars.discourse-cdn.com/v4/letter/h/c37758/32.png) [@hydradenlon](https://forum.inductiveautomation.com/u/hydradenlon)\
**Post date:** [March 17, 2021, 5:00am UTC](https://forum.inductiveautomation.com/t/converting-value-in-tag-real-time/44560/1 "2021-03-17T05:00:07Z")

</div>

I put this code in Script console and it can convert value in tag to character  
But the problem is It isn’t show in tag (display)  
What should I do to convert value in tag real-time and show in display.

tagValue = system.tag.read("[default]_Modbus_/UnitId 1/1\_test1-1\_test20/1\_test2")  
character = chr(tagValue.value)  
print character

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5f753bf050a85e8ed357d5b715f6c550915d963a.jpeg)

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [March 17, 2021, 5:18am UTC](https://forum.inductiveautomation.com/t/converting-value-in-tag-real-time/44560/2 "2021-03-17T05:18:32Z")

</div>

You’ll want to convert `Mode` to `Alphanumeric` and bind to `Text` rather than `Value`.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/8/28618e9fd7e9bd514b56fef6140f8803719f5790.png)  
You could use an expression binding like this on `Text` to run the script to convert the tag value to an ASCII character:

```auto
runScript("chr(" + {[default]Modbus/UnitId 1/1_test1-1_test20/1_test2} + ")", 500)

```

It may make more sense to do this in a derived tag with this read expression:

```auto
runScript("chr(" + {source} + ")", 500)

```

Then you can bind your display’s `Text` directly to the derived tag.

---

<div class="post-metadata">

**Author:** ![hydradenlon](https://avatars.discourse-cdn.com/v4/letter/h/c37758/32.png) [@hydradenlon](https://forum.inductiveautomation.com/u/hydradenlon)\
**Post date:** [March 17, 2021, 6:55am UTC](https://forum.inductiveautomation.com/t/converting-value-in-tag-real-time/44560/4 "2021-03-17T06:55:47Z")

</div>

It works! Thank you so muchhhh
