Ignition8 Modbus Write Multiple registers function 16

Hi there,

I need to read data from heat energy meter
Its goes in 2 steps:

  1. Write multiple registers (F16) - its refresh data (LockState 45000)
  2. Read holding register (F03) - ist read actual data (temperature 40006)
    its work with modbus tool


But I cant understand how to use fuction 16 in Ignition

Thx in advance

Function Code 16 is used automatically when you write to contiguous registers.

Make a tag in Ignition using address HRI45000 (a 32-bit value at HR 45000) and then when you write to it FC16 should get used.

You might find you also need to toggle the 1-based addressing setting or address HRI45001 instead.

Hey folks,
I see on this ticket ignition automatically uses function 16 for Contiguous registers.
What if I only want to write 1 single register?
The device in question does not support function 6 for modbus writes, just 16.

I think you are out of luck with Ignition’s native driver. See Kevin’s comment below.

My alternate driver uses function 16 for all register writes, including singles, unless disabled by configuration.

It My driver can also perform any ad-hoc operation desired in scripting with its system.opc.rawModbus() function.

Thanks Phil, Will take a look at the scripting option.

The “It” at the beginning of the statement about rawModbus() is my alternate driver, not Ignition’s. Just to avoid misunderstandings. Your situation can just do a single write through my driver to get the behavior you need.

There is an advanced setting on the driver to force the use of Write Multiple Registers function even for single register writes.

2 Likes

This done the Trick perfectly.
Thanks for the help Kevin and Phil.