Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84864members
354353posts

ION Float32

Metering & Power Quality

Collaborate with multiple experts and discuss various topics about Power Meters and Power Quality. From design & implementation to troubleshooting and more, get support from experts and share your experiences by subscribing to the Schneider Electric Exchange forum today.

erik_tavares_en
Lieutenant | EcoXpert Master Lieutenant | EcoXpert Master
Lieutenant | EcoXpert Master

ION Float32

Hello,

The arithmetic block ION loses pressure to make a sum with large numbers, for example:

R3:= S1*1000000+S2

Sem título.png

The right answer would be

R3 := 177777777

is there any way to perform calculations with numbers in full form on the ION platform for no loss  precision caused by the use of float32?

4 Replies 4
DanL
Commander Commander
Commander

Re: ION Float32

The standard Float32 format is limited to seven decimal digits of precision (24 binary bits).

see Single-precision floating-point format - Wikipedia, the free encyclopedia

The ION Arithmetic module uses Float32 for calculations and outputs.

The only technique I'm aware of is to split the value and use multiple float32 outputs to represent your answer with extended precision.

For example, the number 123456789 cannot be represented exactly in Float32 format (the closest number is approximately 123456794.7). But if the numbers 123E6, and 456789 can be kept separate, they can each be provided as separate Float32 outputs and combined later is a system capable of Float64 math to preserve the extended precision.

In your case, where S1 needs to be scaled by one million and S2 does not:

Formula3: FLOOR(S1+S2/1E6) to provide the 'millions' portion of the result in R3.

Formula4: (S1-FLOOR(S1))*1E6+MOD(S2,1E6) to provide the 'ones' portion of the result in R4.

erik_tavares_en
Lieutenant | EcoXpert Master Lieutenant | EcoXpert Master
Lieutenant | EcoXpert Master
0 Likes
2
234

Re: ION Float32

Thank you Dan for your reply

My problem is to need to perform calculations with a number of up to nine digits, which can be separated into two numbers 123E6 and 456789. But would like to have this number in a Data Recoder Module as a single number.

datarec.png

The number S1=123 and S2=456789 can be represented correctly by the formula S1 + S2 * 1000/1000

datarec2.png

But the number S1=999 and S2=999111

datarec3.png

is there any way to join the numbers without losing precision?

DanL
Commander Commander
Commander
0 Likes
0
234

Re: ION Float32

The formula S1*1000 + S2/1000 may appear to work with this example, but it is just a coincidence.

You will notice that the result does not change when you subtract from the lowest digit.

123456.786, 123456.787, and 123456.788 are also represented as 123456.789 with Float32.

No, there is no way to represent more than 7 digits of precision on the output of an ION Arithmetic module becuase it uses Float32.

Hal_Etheridge
Janeway Janeway
Janeway

Re: ION Float32

The data recorders on-board the devices record in float32 format.  As far as I know the only float64 calculations done on-board the device (in the ION modules anyway) are inside the integrator module but the INT module outputs are still float32.  All the other ION modules always use float32 or int32 as the base numeric format for calculation purposes.

Another option is to combine the values in the VIP in the PME software.  As far as I know the majority (or all) of the VIP calculations are done using float64 values.  Once this is done then the value could be inserted into the database for historical measurements.

Remember that the device is only accurate to 4 or 5 digits at most (on the order of 0.1%) so the float32 format is more than capable of this since it handles 7 digits.  It is only when you combine large and small numbers together that the issue arises.  In this case the possible error in the large number can be of similar magnitude to the most significant digits of the small number so effectively this calculation would be producing high suspect values.