reading 64-bit double 4 register tag

I am trying to read The active energy from Energy meter called Pac3200 but the tag is defined in double format and is stored in 4 registers(64-bit).

as far as I know there is no data type in citect can interpret double data type and I tried to use other data types such as real, long, Ulong but it did not work and I ended up reading every register alone as int or every two register as real or long.

is there any solutions or cicode function that could convert the two real tags into double format?

Parents
  • Hi.
    Cicode REAL variables works until 15 decimal digits without loss. If there are more digits, its starts rounding, which means the least significant digits are lost. For an energy counter, these are often the most important once. In this specific case it is no problem, because according to the Pac3200 datasheet the energy counter has his overflow at 1.0e+12.
    But e.g. the very common energymeters from Carlo Gavazzy store the counters in UINT64: 0 - (2^64)-1. This mean 20 significant decimal digits.
Reply
  • Hi.
    Cicode REAL variables works until 15 decimal digits without loss. If there are more digits, its starts rounding, which means the least significant digits are lost. For an energy counter, these are often the most important once. In this specific case it is no problem, because according to the Pac3200 datasheet the energy counter has his overflow at 1.0e+12.
    But e.g. the very common energymeters from Carlo Gavazzy store the counters in UINT64: 0 - (2^64)-1. This mean 20 significant decimal digits.
Children
No Data