Reading long in MODBUS driver

I have a power meter, and i need to read a Long value from registers 301 + 302.

The MODBUS dresses are 40302 + 40303.

When I define a LONG at 40302 I get en error message "Address on bad boundary (E2060)".

So I have to read the 2 registers as INT and then connect them.

Is there a way to read those 2 registers  as LONG.

Gideon

  • Hi ,
    This was originally done when address boundary had some issues in poll based drivers. This was then resolved within the driver framework, so it is safe to override this protection. It is done by setting the Citect.ini parameter: [General]CheckAddressBoundary=0
    You can now define a LONG at 40302 and read both registers.
  • I'm not sure when it was resolved. Olivier, do you have a bug number or KB article where we can get more information?

    I have seen this still cause corruption on occasion. Most of the time you can get away with setting CheckAddressBoundary=0, but if you see random values in your LONG or REAL variables then you will need to put 'G' before the tag addresses, like G40302

    That tells Citect to read that address from the PLC by itself, not blocked (grouped) together with other nearby tags for better performance. You would only need to do that for the even-numbered 32-bit variables (or just for odd-numbered 32-bit variables if you have less of those). Citect is giving you the error message because you have some 32-bit variables on even addresses and some on odd addresses and it doesn't want them to be mixed in the same block read request.