Modbus Extended Services

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 (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.

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).

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!

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