OPC tag resets at 16 bit max value

I have a Keyence MP-FEN1 FD-R sensor that is connected to Ignition through the Modbus TCP driver.

I followed the sensor’s doc and created OPC tags based on the addresses given.

One address is for a totalizer value, that is supposedly 32 bit

image

However, my tag for this value always resets at the value of 65,535 (16 bit max).

I have my OPC item path as so: [meter name]HRUI7144

I used HRUI as the designator for this is what the Ignition doc recommends for a 32 bit unsigned integer:

image

With this all being the case, I am unsure why my tag value resets at the max of 16 bits. I checked throughout the sensor docs, and I could not find anything regarding setting a reset value or anything along those lines.

Any ideas? Perhaps I’m using the wrong register designator?

It looks like your off by either 1 or 2 on your address.

Possibly also need to change the swap word order setting.

In my experience, when documentation shows a register address in hexadecimal, it is zero-based.

Yeah as the others have said, you're not reading the correct bits and need to fix that.

A -- B -- C

The sensor is probably writing to B and C and reversed order while you have Ignition reading A and B and thus you're only seeing half of it. Something along those lines.

If you're reading another signed int from the device put a negative value in it and you'll also see issues.

1 Like

The sensor documentation states this:

image

based on this, I assume it fine to not do zero-based.

I will look into this, thanks.

It is not fine. Look very closely at the first image in your OP.

7144 == 0x1BE8 → 47145

Note that including the classic 4 prefix is shown one-based, making the first two columns obviously zero-based.

(My alternate driver is only zero-based, as the protocol itself is zero-based.)