# Modbus Extended Services

**URL:** <https://forum.inductiveautomation.com/t/modbus-extended-services/14420>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [May 30, 2017, 3:39pm UTC](https://forum.inductiveautomation.com/t/modbus-extended-services/14420 "2017-05-30T15:39:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![readyplayerone](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@readyplayerone](https://forum.inductiveautomation.com/u/readyplayerone)\
**Post date:** [May 30, 2017, 3:39pm UTC](https://forum.inductiveautomation.com/t/modbus-extended-services/14420/1 "2017-05-30T15:39:47Z")

</div>

I need help accessing extended modbus services of a device. We are connected to a Smith Meter AccuLoad III. I can read from other registers, but I am confused by how to send commands through Ignition. Below is form the [Accuload III modbus manual](http://info.smithmeter.com/literature/docs/mn06131l.pdf) (page 394):

To use an extended service from Modbus, the following steps are required:

1. Enter the command and any additional data required as specified for that command (the Extended Services  
packet) into the buffer that starts at holding register 1 (functions 3, 6, and 16, register 1).
2. Enter the length of the above packet in bytes into holding register 0.
3. Enter the command to invoke the service by sending a Force Coil 4096 ON Command (function 5 or 15,  
address 4096, data “on”).
4. Retrieve the result of the service by reading the result packet in the extended service outbound buffer at  
the start of the input register area (function 4, register 1). The number of bytes in the response packet is  
located at register 0.

---

<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 30, 2017, 4:35pm UTC](https://forum.inductiveautomation.com/t/modbus-extended-services/14420/2 "2017-05-30T16:35:27Z")

</div>

The directions and documentation seem pretty straightforward.

Use `system.opc.writeValues` to populate the holding registers (HR0 through whatever) with the service command, use `system.opc.writeValue` to turn coil 4096 on (C4096), then use `system.opc.readValues` to read the response from the input registers (IR0 through whatever).

---

<div class="post-metadata">

**Author:** ![readyplayerone](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@readyplayerone](https://forum.inductiveautomation.com/u/readyplayerone)\
**Post date:** [June 1, 2017, 8:48pm UTC](https://forum.inductiveautomation.com/t/modbus-extended-services/14420/3 "2017-06-01T20:48:43Z")

</div>

I was having access denied issues writing to the addresses, but it turns out I had the OPC-UA connection in the gateway set to read-only.

After that change everything worked fine with your suggestion. Thanks!

---

<div class="post-metadata">

**Author:** ![jaimedrn](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jaimedrn](https://forum.inductiveautomation.com/u/jaimedrn)\
**Post date:** [December 19, 2020, 4:44pm UTC](https://forum.inductiveautomation.com/t/modbus-extended-services/14420/4 "2020-12-19T16:44:39Z")

</div>

I’m having problems with the Coil, please explain to me why you say coil 4096 on C4096. Thanks.
