Problems reading modbus REAL from energymeters

Hi!

I´m trying to read values from several Schneider iEM3250 energy meters, all of them giving me the same problem.
Refer to the manual for modbus info: (https://www.se.com/ww/en/product/A9MEM3250/iem3250-energy-meter---ct---modbus/)

For example, on page 60 there's a list of registers for voltages, starting at 3020 and incrementing by 2.
The document says size:2 and type Float32. Each being 16bit value I suppose which then makes sense.

In citect I connect using the MODBUS1 protocol, and addressing them as Holding, function 4 in citect.
So the addresses are 43020, 43022, 43024 ... etc.

All the phase-phase voltages reads good, but only the first two phase-neutral reads good. The last one reports -nan in runtime. (address 43032).

When using a modbus poll program (AVreporter modbus communication tester) I find that the addresses I read from citect varies a lot in value, while the following address stays quite still.
I suppose when addressing REAL citect combines two bytes into a REAL value?

All the addresses that works has a following value of around 17500, but the non-working address has a value of 65470.
I don´t know, but starting to guess that citect expects a signed INT, but gets an unsigned INT a freaks out?

Anyone got an idea?

Regards
Anders

  • When Citect reads REAL values it uses floating point notation. The two registers are not read as INTs. They are read as a combined single value using floating point notation. The web site https://www.h-schmidt.net/FloatConverter/IEEE754.html provides some help on structure and a converter. You don't mention how the meter is physically connected, whether this is a wye-connected or delta-connected meter. The connection affects the available voltage readings. From your post I am assuming that 17500 is a correct phase-to-phase reading.
    Unless it is specifically required for this meter, I would use MODBUS and not MODBUS1 protocol. The numbered Modbus protocols have specific adjustments for specific needs. Make sure that the adaptation of the Modbus1 protocol is consistent with the meter. The Citect driver help files explain the unique features of the various Modbus numbered protocols.
    How are the other values you are reading? Is it just the phase-to-neutral voltages that are in error?
  • I can´t say whether it´s connected as Y or D, but it is for reading voltages here in sweden, and in this case standard 3-phase 400V phase-phase and 230V phase-neural.

    I do read normal phase-phase voltages, all three phases. Addresses 43020, 43022, 43024. Voltages all ~400Volts. 

    But I can only see normal values for phase L1-N and L2-N. Addresses 43028, 43030. Voltages all ~230Volts.

    Where I should read phase L3-N I only get -nan as result. Address 43032.

    So it can´t be a question on physical connection, as the values I do get are normal. But some says -nan. Not A Number.

  • I think Iv'e found it!

    I went full mental and addressed ALL addresses between like 43010 up to 43040 and just had a look. Addressed them as G4nnnn made it compileable.

    Well, it seemed like I was 2 off in addresses, so subtracting 1 from every address and changing to MODBUS (from MODBUS1) protocol solved it!
    This is not the first time Iv'e encountered this, and it feels wrong doing this. But now it works at least.

  • I would advise you to test your communication using some other registers too, preferrably variables that use only 1 modbus register. This is because the address offset difference of 2 you thought you noticed is normally not possible.
    It might well be that you are now mixing registers of 2 different variables to one REAL variable in Citect.

    Switching from MODBUS1 to MODBUS or vice versa should fully correct the address offset of single register variables. In addition you can set the citect.ini parameter [MODBUS]FloatMode to a value between 0 and 3 to correct the byte and word order of REAL (floating point) variables. For LONG (32 bit integer) variables there is a similar parameter called [MODBUS]LongDataType