# Modbus TCP question

**URL:** <https://forum.inductiveautomation.com/t/modbus-tcp-question/71295>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 20, 2023, 6:46am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-question/71295 "2023-03-20T06:46:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiyoung\_hwang1](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@jiyoung\_hwang1](https://forum.inductiveautomation.com/u/jiyoung_hwang1)\
**Post date:** [March 20, 2023, 6:46am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-question/71295/1 "2023-03-20T06:46:52Z")

</div>

1. Communication: Modbus Tcp

2. Looking at the attached picture, I took the modbus type as a holding register. Can I split it into bits and use it?

3. If it can be split into bits and used, how should tag mapping be done?

4. Can the holding register be used as a boolean?

 ![Modbus](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67362f7540efe7c0853df333aaecfe1faf7e3b7b.gif)

---

<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:** [March 20, 2023, 10:18am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-question/71295/2 "2023-03-20T10:18:25Z")

</div>

You wouldn't use a mapping. Just use [bit-level addressing](https://docs.inductiveautomation.com/display/DOC81/Modbus+Addressing#ModbusAddressing-Bit-LevelAddressing) in an OPC item path.

{ Mapping configuration is entirely optional, and is only necessary in IA's driver if you want expose items in the OPC browser for drag-and-drop. All functionality is available without mapping via the address syntax in the linked page. I never use mappings, and recommend against them. }

---

<div class="post-metadata">

**Author:** ![jiyoung\_hwang](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jiyoung\_hwang](https://forum.inductiveautomation.com/u/jiyoung_hwang)\
**Post date:** [March 21, 2023, 11:39am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-question/71295/4 "2023-03-21T11:39:17Z")

</div>

I tried it the way you told me, but I succeeded in reading it, but I couldn't write it. An error has occurred.

What should I do in this case???????

---

<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:** [March 21, 2023, 11:42am UTC](https://forum.inductiveautomation.com/t/modbus-tcp-question/71295/5 "2023-03-21T11:42:32Z")

</div>

> [@jiyoung\_hwang](#):
>
> but I couldn't write it

That means the device doesn't implement Modbus function code 0x16 "masked write", which is necessary to not disturb the other bits of the given holding register. This means the target device is especially lame, as that function has been part of the modbus protocol from before it became public (many, many years ago). This is a common problem with Schneider processors.

In this case, you can only write the complete register. If the PLC is writing any bits in the register, trying to perform an external read-modify-write cycle is very racy and buggy.
