# Writing Bits in Modbus

**URL:** <https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227>\
**Category:** Ignition\
**Created:** [September 1, 2017, 12:35pm UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227 "2017-09-01T12:35:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![conlonj25](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@conlonj25](https://forum.inductiveautomation.com/u/conlonj25)\
**Post date:** [September 1, 2017, 12:35pm UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227/1 "2017-09-01T12:35:44Z")

</div>

Hi folks

All my various motor control bits and setpoints are mapped to holding registers in a Schneider PLC. I can read/write the setpoints fine. But I can only read the bits. Attempting to write to them causes an error.

Here's a typical address

> ns=1;s=[Acid Dosing PLC]HR201.8

And the error generated  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/ca6a0765db19266d28a824ba706ac9646ef1a4d1.PNG)

Could anyone help me diagnose the error? Is it something I've messed up in Ignition or is it possible the Schneider doesn't support bit writing in holding registers.

---

<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:** [September 1, 2017, 1:30pm UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227/2 "2017-09-01T13:30:51Z")

</div>

> [@conlonj25](#):
>
> Is it something I've messed up in Ignition or is it possible the Schneider doesn't support bit writing in holding registers.

It might not support it - check the console in the gateway for error messages when you attempt to write.

---

<div class="post-metadata">

**Author:** ![conlonj25](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@conlonj25](https://forum.inductiveautomation.com/u/conlonj25)\
**Post date:** [September 1, 2017, 2:21pm UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227/3 "2017-09-01T14:21:42Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9f43265b137a67584a259e6bb6bcc62a364cf7de.PNG)

Looks like you’re right. Do I have any other options?

---

<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:** [September 1, 2017, 3:01pm UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227/4 "2017-09-01T15:01:07Z")

</div>

Derived tags or scripting functions that do the appropriate masking.

The derived tag approach is discussed here: [Troubles making a Derived Boolean Tag work as a mask for a Short Tag](http://forum.inductiveautomation.com/t/troubles-making-a-derived-boolean-tag-work-as-a-mask-for-a-short-tag/15203/2?u=kevin.herron)

---

<div class="post-metadata">

**Author:** ![conlonj25](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@conlonj25](https://forum.inductiveautomation.com/u/conlonj25)\
**Post date:** [September 4, 2017, 10:53am UTC](https://forum.inductiveautomation.com/t/writing-bits-in-modbus/15227/5 "2017-09-04T10:53:40Z")

</div>

Thanks for that Kevin. I’ll take a look.
