# Creating tags for Modbus TCP in Designer

**URL:** <https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959>\
**Category:** Ignition\
**Created:** [May 14, 2019, 7:39am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959 "2019-05-14T07:39:20Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 14, 2019, 7:39am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/1 "2019-05-14T07:39:20Z")

</div>

I’ve followed the Modbus tutorial to created a modbus TCP device. The device is now connected.

However, I’ve problems on creating the tags where the value displayed was null. I’ve the following address with me

1. 409219
2. 408452
3. 409734
4. 409729
5. 410753
6. 410754
7. 410755
8. 40001

According to the manual, HR = 40000, so at the OPC item path, I should write it like this ?

1. [Modbus]HR9219
2. [Modbus]HR8452
3. [Modbus]HR9734
4. [Modbus]HR9729
5. [Modbus]HR10753
6. [Modbus]HR10754
7. [Modbus]HR10755
8. [Modbus]HR1

I tried writing all the addresses as mentioned above but the result I get was null. I checked on the Tag Diagnostics but Quality is either ‘Unknown’ or ‘Not Connected’. The modbus device was connected though. How do I get my tags running?

---

<div class="post-metadata">

**Author:** ![Rendi.Yohanes](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rendi.Yohanes](https://forum.inductiveautomation.com/u/Rendi.Yohanes)\
**Post date:** [May 14, 2019, 10:32am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/2 "2019-05-14T10:32:53Z")

</div>

Before going to Designer, for Modbus TCP you need to follow this steps:

1. go to ignition gateway (localhost:8088 or whatever port you are using)
2. i assume you already configured your Modbus device
3. under OPC-UA SERVER/Device find your Modbus device and click “More” then “Addresses”
4. you need to map your addresses here… play around a bit… the import/export tool is quite useful
5. once you finished mapping your addressses, then go to ignition designer
6. your modbus tags should be available by browsing the default OPC-UA server

let me know if you have issue in step 4)… i can share with you sample exported file from my running project…

good luck!

---

<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:** [May 14, 2019, 11:09am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/3 "2019-05-14T11:09:17Z")

</div>

> [@sharifah](#):
>
> - [Modbus]HR9219
> - [Modbus]HR8452
> - [Modbus]HR9734
> - [Modbus]HR9729
> - [Modbus]HR10753
> - [Modbus]HR10754
> - [Modbus]HR10755
> - [Modbus]HR1

These are correctly formatted for a device address=0. If not 0, you need something like this (for device #1):

```auto
    [Modbus]1.HR9219
    [Modbus]1.HR8452
    [Modbus]1.HR9734
    [Modbus]1.HR9729
    [Modbus]1.HR10753
    [Modbus]1.HR10754
    [Modbus]1.HR10755
    [Modbus]1.HR1

```

> [@Rendi.Yohanes](#):
>
> Before going to Designer, for Modbus TCP you need to follow

Address mapping like this is entirely optional -- a convenience for OPC browsing.

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 15, 2019, 4:00am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/5 "2019-05-15T04:00:10Z")

</div>

Rendi and pturmel,

Thank you for the suggestions.

I figured my deive id is 1. I tried pturmel method and it worked!

However, I can only add one tag at a time as adding in more tags will turned the Quality to Bad and the new added tag value is null.

Why is that?

---

<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:** [May 15, 2019, 4:40am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/6 "2019-05-15T04:40:51Z")

</div>

If the second tag you add is the only tag, does it work? Or is it still null?

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 15, 2019, 4:49am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/7 "2019-05-15T04:49:45Z")

</div>

If I delete the other tags, and only leave one tag, it’ll not become Null.

---

<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:** [May 15, 2019, 4:53am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/8 "2019-05-15T04:53:00Z")

</div>

I’m not sure if my question was clear. If you delete the other tags, will a tag you added that was null while other tags were there become good quality and start showing the correct value?

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 15, 2019, 5:09am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/9 "2019-05-15T05:09:05Z")

</div>

it only works and will not turn Null if there was only one tag regardless if I change the register address. For example, I ONLY created one tag:

PV : [Modbus]1.HR9219

and there was value shown.

But if I created another tag, say SV, so now there’ll be two tags:

PV : [Modbus]1.HR9219  
SV : [Modbus]1.HR8452

The new created SV value is Null, but both tags quality turned Bad.  
However, if I change the tag value (from 0 to a number say 15), it appeared that the value at the controller changed too. But the value shown in Designer revert to previous value (stays at 0).

Weird 🤔

---

<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:** [May 15, 2019, 5:11am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/10 "2019-05-15T05:11:22Z")

</div>

> [@sharifah](#):
>
> SV : [Modbus]1.HR8452

Does this tag work as expected if it is the only tag (rather than PV being the only tag)?

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 15, 2019, 5:23am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/11 "2019-05-15T05:23:01Z")

</div>

yes it worked

---

<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:** [May 15, 2019, 5:30am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/12 "2019-05-15T05:30:36Z")

</div>

With each individual address working but problems when you have more than one I’d experiment with different values for these advanced settings for the device on Ignition web configuration page:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d56f42b9936c268b7e1610a47b38bb3a941ac335.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/79b97f0f967885e61345955ae221095b468ff584.png)

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 15, 2019, 6:18am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/13 "2019-05-15T06:18:53Z")

</div>

You mean to disable this settings?

---

<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:** [May 15, 2019, 11:30am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/14 "2019-05-15T11:30:39Z")

</div>

Yes, try various combinations.

---

<div class="post-metadata">

**Author:** ![Rendi.Yohanes](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rendi.Yohanes](https://forum.inductiveautomation.com/u/Rendi.Yohanes)\
**Post date:** [May 15, 2019, 2:43pm UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/15 "2019-05-15T14:43:23Z")

</div>

It might have something to do with the behaviour of the Modbus Slave.

Let’s say you’re trying to read HR8452 and HR9219, Ignition might try to read all the registers in between as well (HR8453, HR8454, …, HR9218, HR9219).

This might have some issues with some Modbus Slave (Siemens PLC typically have this issue):

- if let’s say some address in the middle (e.g., HR8454) is not configured in the Modbus Slave then when you are trying to read the whole range, the Modbus Slave will give you error
- some Modbus Slave have limitation on how many registers they can response in one query

The above might explain why you might be able to read single tags, and not multiple tags.

Again, I would suggest you to try the method that I mentioned in earlier reply. With the manual addressing method, you yourself control how many register Ignition will read in a particular query.  
This method actually “mimic” what most PLC/DCS do as a Modbus master.

Hope this helps!

---

<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:** [May 15, 2019, 2:48pm UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/16 "2019-05-15T14:48:49Z")

</div>

> [@Rendi.Yohanes](#):
>
> - if let’s say some address in the middle (e.g., HR8454) is not configured in the Modbus Slave then when you are trying to read the whole range, the Modbus Slave will give you error
> - some Modbus Slave have limitation on how many registers they can response in one query

Yes, the two advanced settings posted above relate to these scenarios.

---

<div class="post-metadata">

**Author:** ![Rendi.Yohanes](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rendi.Yohanes](https://forum.inductiveautomation.com/u/Rendi.Yohanes)\
**Post date:** [May 15, 2019, 2:51pm UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/17 "2019-05-15T14:51:47Z")

</div>

Just saw your earlier post, sorry…

Yeah, seems that disabling “SPAN GAPS” should solve the problem.

Disabling “ALLOW READ MULTIPLE REGISTERS REQUEST” seems like very ineffective for actual production, but worth for trying around.

---

<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:** [May 15, 2019, 2:51pm UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/18 "2019-05-15T14:51:48Z")

</div>

Disable the “Span Gaps” setting and leave “Multiple Registers Request” enabled.

edit: @Rendi.Yohanes is on it 🙂

---

<div class="post-metadata">

**Author:** ![sharifah](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sharifah](https://forum.inductiveautomation.com/u/sharifah)\
**Post date:** [May 16, 2019, 2:06am UTC](https://forum.inductiveautomation.com/t/creating-tags-for-modbus-tcp-in-designer/24959/19 "2019-05-16T02:06:03Z")

</div>

Everyone, thank you so much for the input. It worked and I’m only left to play around with the scaler.

I’ll also try out Rendi’s suggestion on the manual addressing method so I’ll have other alternatives.

Will ask again if I’m facing problems with this method .

Thanks.
