ICONIC Modbus OPC Server

A

Thread Starter

Alan Tan

Hi

I was searching for a free Modbus OPC Server and found ICONIC Modbus Server. This server works well for my needs but it is not able to accept register address starting at 0. Anyone knows how to configure it or has an alternative?

Alan
 
Modbus addressing generally starts at zero, with the register at address zero being register one, hence the 'one-offset' issue with Modbus.

But the usage of terminology is not consistent between vendors, so some vendors call addresses 'registers' or vice versa, or use only one of the terms. I might even have it backwards, the terminology is so loosey-goosey.

I suspect that Iconics register 1 will find the zero address in the slave. Last time I looked, Iconics was OPC certified.
 
I was hoping I missed something and kept searching. But no. I can read all registers including and after 1, just no 0. Pity.

Alan
 
R

Robert Stanton (ICONICS)

Within a Modbus device, Coils (0xxxx or 00001-09999, bit, read/write), Inputs (1xxxx or 10001-19999, bit, read only), Input Registers (3xxxx or 30001-39999, word, read only) and Holding Registers (4xxxx or 40001-49999, word, read/write) are assigned an address number. You would expect that the same addressing scheme defined in the Modbus communications protocol to read or write values would be assigned to the internal registers of the device. Unfortunately this is not the case. Internal registers are used with a value between 0 and 9999. If you want to read the value of the first Holding Register (internal register 40000) for example, you have to specify the value 40001 in the Modbus query message. This leads to common mistakes and are handled in the design of the ICONICS Modbus OPC Server.

In your case you should be able to use Coil address 1 to communicate to Coil internal register 0.

Rob
 
Hi,

I think it's the result of a commercial "war" between Gould Modicon (Modbus) and April (Renault, Merlin Gérin) in late 70's. The Jbus is essentially a Modbus shifted from one address.

For instance,the F1 code (read coils) is addressed 1 to 65535 for JBUS and 0 to 9999 for Modbus.

So 1 in JBUS match to 0 in Modbus !

General confusion then appeared!

Regards
/Bruno
 
C
>you have to specify the value 40001 in the Modbus query message.

Robert, I have to disagree.

I'm not a programmer, but I've connected a serial sniffer, and at times a scope, to figure out what was going on in Modbus message and the leading 4 in a 4xxxx address/register/memory location is not part of the Modbus message.

It seems to me that the designation of address/memory/register as 4xxxx is for human-use convenience, although such a designation may, at one time in the far past actually have delineated memory boundaries. The convenience comes from knowing that 40121 uses the 03 function code, or 30099 uses the 04 function code.

The function codes are associated with memory/registers/addresses by their leading numeral. Function code 03 is associated with 4xxxx. Function code 04 is associated with 3xxxx. The leading numeral is not part of the
Modbus message. The function code is.

I'm looking at function code 03 breakdown in the Modbus Application Protocol V1.1b on page 15. It omits the slave node ID at the beginning of a message and the error check CRC at the end of the message

The request consists a 1 byte function code: 03

Then the starting address is two bytes, hex 0000 to FFFF. 0000 does not have a leading 4, decimal or hex.

There is no 0100(h) [4 decimal] leading the address.

Then there's a single byte for quantity of registers, which can be decimal 1 to 125.

The response echoes the function code, 03, then a byte count (in a single byte), and then provides the register values.

Some Modbus masters require a leading 4 for a 4xxxx address when a human interacts with (configures) the master through its HMI or GUI or whatever, others do not and assume it. But the leading 4 does not go into the bit stream out the hardware port. It's not part of the message.

Why 03 was associated with 4xxxx and 04 associated with 3xxxx is beyond me, but that's what we live it. It provides a living, eh?

Carl
 
Top