# Expose tags via ModbusTCP?

**URL:** <https://forum.inductiveautomation.com/t/expose-tags-via-modbustcp/21546>\
**Category:** Ignition\
**Created:** [December 20, 2018, 7:27pm UTC](https://forum.inductiveautomation.com/t/expose-tags-via-modbustcp/21546 "2018-12-20T19:27:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmoon](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dmoon](https://forum.inductiveautomation.com/u/dmoon)\
**Post date:** [December 20, 2018, 7:27pm UTC](https://forum.inductiveautomation.com/t/expose-tags-via-modbustcp/21546/1 "2018-12-20T19:27:16Z")

</div>

Using v7.7 at the moment. Is it possible to expose Ignition’s tag base via ModbusTCP?

I have a ModbusTCP client A that needs information from a Rockwell Logix PLC B.

Is there a way to connect ModbusTCP client A to Ignition, Logix PLC B to Ignition, and be able to expose information between the two?

Perhaps by creating OPC tags in Igntion to PLC B and somehow mapping them to registers read by client A?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 20, 2018, 7:35pm UTC](https://forum.inductiveautomation.com/t/expose-tags-via-modbustcp/21546/2 "2018-12-20T19:35:05Z")

</div>

It’s come up as an idea once or twice, but there’s currently no driver or other functionality that would let Ignition expose data by acting as a Modbus slave/server.

---

<div class="post-metadata">

**Author:** ![Herbie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/herbie/32/65288_2.png) [@Herbie](https://forum.inductiveautomation.com/u/Herbie)\
**Post date:** [May 16, 2019, 7:20pm UTC](https://forum.inductiveautomation.com/t/expose-tags-via-modbustcp/21546/3 "2019-05-16T19:20:52Z")

</div>

I think you can make this work, but it would require using Ignition’s other capabilities to enable this. Let’s assume you have **PLC\_A\_TAG** and **PLC\_B\_TAG** representing the data you want in each PLC, and you want to get PLC A data to PLC B.

First possibility is using an Expression tag. These allow writing back data to another OPC tag. To make this work, create another tag such as **PLC\_AB\_TAG** whose expression is just the tag that you want to read from (i.e. **{[~]PLC\_A\_TAG}**). Below the expression, check the box to _Write value back to OPC item?_ and set this up to reference the other tag path (i.e. **[~]PLC\_B\_TAG**). Now each time the value updates in PLC A, the expression tag will reflect this and get written to PLC B.

Second possibility would be to setup a Value Change tag event on the tag you want to read from. In the example above, you would edit **PLC\_A\_TAG** and add a script to write **PLC\_B\_TAG** with the currentValue of **PLC\_A\_TAG**. So in the Value Changed event script you would add to the end something like:

`system.tag.write("[~]PLC_B_TAG",currentValue)`

Each time the value changes in tag **PLC\_A\_TAG** , **PLC\_B\_TAG** will get written with the updated value.

Hope this helps.
