# How to implement Modbus function code 6 to force write to sel 2411

**URL:** <https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132>\
**Category:** Ignition\
**Created:** [November 4, 2022, 2:21pm UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132 "2022-11-04T14:21:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elie\_Khananya](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@Elie\_Khananya](https://forum.inductiveautomation.com/u/Elie_Khananya)\
**Post date:** [November 4, 2022, 2:21pm UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132/1 "2022-11-04T14:21:38Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/f/6f64316433e05e51b0460ea3d13442d82d84ed86.jpeg)  
I’m not understanding where this function is in the drop down of the modbus device under devices. All I see is coil input register and holding registers with float’s unsigned etc.. and I don’t what sel means by “the parameter must be written before the command code” it’s in the picture. Any help is appreciated. I only see “force multiple register writes” and not a single register and would this be a holding register that works as a function 6? If enabled or 10

---

<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:** [November 4, 2022, 2:34pm UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132/2 "2022-11-04T14:34:41Z")

</div>

You don't show the addresses, but codes 06h and 10h write to holding registers, either single (function 06h) or a block of contiguous addresses (function 10h). So in Ignition, you would write to OPC item paths using prefix `HR` and Ignition will pick one of those function codes. If you supply multiple contiguous items in one write request, Ignition will use function 10h. If you write to a single register, Ignition might use function 06h instead.

---

<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:** [November 4, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132/3 "2022-11-04T14:35:44Z")

</div>

It's saying there's 3 registers defined in a later table (E.16) that you can write to and the device will initiate some command. The first 2 registers are parameters and the 3rd seems to make it happen.

If you wrote the registers one by one (fc 0x06) then it's saying make sure to write the params before writing to the 3rd register to initiate.

---

<div class="post-metadata">

**Author:** ![Elie\_Khananya](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@Elie\_Khananya](https://forum.inductiveautomation.com/u/Elie_Khananya)\
**Post date:** [November 10, 2022, 4:27am UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132/4 "2022-11-10T04:27:00Z")

</div>

I don’t know how to use that function code 6 in ignition. I made the addresses as holding registers and tried writing to the parameters first and the code but ignition will not let me write anything. I also have the “write to multiple registers function code 10” under advanced options in devices but this is 10 not 6 I don’t see 6 anywhere.

---

<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:** [November 10, 2022, 10:20am UTC](https://forum.inductiveautomation.com/t/how-to-implement-modbus-function-code-6-to-force-write-to-sel-2411/66132/5 "2022-11-10T10:20:24Z")

</div>

Ignition automatically chooses between those functions based on the other advanced options, and the number of items you are writing at once.
