Technical Forum

Low-Voltage Controls

PAC3100 Floating point data

Thread Starter: srk   Started: 10/12/2011 5:32 PM   Replies: 8

« Previous thread Next thread »
Page 1 of 1 (9 items)
  10/12/2011, 5:32 PM
Joined 5/2/2007
Last visit: 10/13/2011
Posts: 8
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi

PAC3100 transmits voltage, current, active energy and reactive energy as float values.

I am facing a problem, the MODBUS Master recieves 2 registers which when combined do not match with the actual value shown on the meter.

1) I would like to know if the floating point format used in PAC3100 conforms to IEEE 754 format.

2) if the PLC recieves the two 16-bit registers and refers them as integers (16-bit each) and the two-registers are combined and type-cast as float, will there be an erroneous result?

3) is there any other method to read a 32-bit float data in one go instead of combining two 16-bit?

Thanks
Top
  10/12/2011, 5:34 PM
Joined 5/2/2007
Last visit: 10/13/2011
Posts: 8
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
I would also like to know endianness in the data transmitted by PAC3100. ie Big Endian or Small Endian between the two words in the 32-bit data.
Top
  10/13/2011, 9:34 AM
Joined 3/21/2006
Last visit: 5/21/2013
Posts: 9063
Rating:
Rated: Outstanding [3.78 out of 5 / rated 820 time(s)]. (820) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Almost the same issue Using DOuble Float in STEP7 It might helps you.

Best regards,
Hristo Mihalev
Top
  10/13/2011, 1:41 PM
Joined 5/2/2007
Last visit: 10/13/2011
Posts: 8
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Thank you UMENCHO.

Unfortunately, I use a Allen-Bradley PLC.

The voltage value (float) was arrived after combining two 16-bit registers (integers) transmitted by PAC. Voltage value at AB PLC is matching the value displayed by PAC.

Now the same operation of comining two 16-bit (integer) registers and arriving at a float - is not working for Active Energy and Reactive Energy

Word Swapping was also tried for Endianness. But no result.

Not able to understand - why?

Top
  11/11/2011, 6:51 AM
Joined 11/21/2007
Last visit: 5/17/2013
Posts: 539
Rating:
Rated: Excellent [4.04 out of 5 / rated 24 time(s)]. (24) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear srk

Both ( 32bit as well as 64bit formats ) of SIEMENS conform to IEEE 754 format.
They consist of Sign Bit, Exponent and Mantissa as described in attached document.

Generally if you convert from 64bit float to 32bit float, there can be loss of accuracy.
However this can be achieved without significant loss of accuracy in case of PAC3100 as max value of energy registers in case of PAC3100 is 10E12 only.

Hope this helps

Cheers
Navnag

Attachment: 64bit Floating Point No.PDF  (55 Downloads)

There is no such thing as the last bug in a program
There are no stubborn bugs, There are only stubborn Debuggers.

Top
  11/11/2011, 9:31 AM
Joined 10/9/2007
Last visit: 5/22/2013
Posts: 552
Rating:
Rated: Outstanding [3.62 out of 5 / rated 45 time(s)]. (45) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi Navnag

Do you know how is the conversion of 64 to 32bits float?
It is not a mater of simply reading 23 bits out of 52 for the mantissa and 8 bits out of 11 bits for the exponent, right?

Mike

Energy Automation products: Sicam, Siprotec, Digsi
Top
  11/11/2011, 1:58 PM
Joined 11/21/2007
Last visit: 5/17/2013
Posts: 539
Rating:
Rated: Excellent [4.04 out of 5 / rated 24 time(s)]. (24) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello Mike

Well it looks like that on the face of it, bit the actual process is a little more complicated.
You need to look for possible error during conversion.

This is a good site to convert and see bit pattern made by various numbers in 32 & 64bit floating point :

32bit to 64 bit : http://babbage.cs.qc.edu/IEEE-754/32bit.html

64bit to 32 bit : http://babbage.cs.qc.edu/IEEE-754/64bit.html

Thankfully enough, I did not have to struggle with the conversion. The Siemens Library suggested to me by Umencho was good enough for my requirement.

Cheers

Navnag

There is no such thing as the last bug in a program
There are no stubborn bugs, There are only stubborn Debuggers.
Top
  11/11/2011, 2:07 PM
Joined 11/21/2007
Last visit: 5/17/2013
Posts: 539
Rating:
Rated: Excellent [4.04 out of 5 / rated 24 time(s)]. (24) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Dear SRK

One more info for you..

PAC3100 transmits all values ( Except Energy ) as FLOAT ( 32 bit ). These are transmitted as Two 16bit Modbus registers and combined in the master as a 32bit value. You may have to swap the two words depending upon the data structure in your PLC.

Energy values are transmitted as DOUBLE (64 bit ). These are transmitted as Four 16 bit Modbus registers and combined in the master as a 64bit value.

You are trying to ready energy data with two registers only. This will not work.

32bit float is available from PAC only on Profibus as an option.

Hope this helps.

Navnag


There is no such thing as the last bug in a program
There are no stubborn bugs, There are only stubborn Debuggers.
Top
  1/12/2012, 1:48 PM
Joined 4/28/2011
Last visit: 5/7/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
The PAC 3100 energy counters are also available as 32-bit values via Modbus RTU. This does not require some additional options.

See this FAQ for more Details:
http://support.automation.siemens.com/WW/view/en/40345680/


This 32-bit values are also available in PAC 3200 and 4200.

PAC 3200
Firmware version 2.1.0 or newer is required:
http://support.automation.siemens.com/WW/view/en/31674577/


PAC 4200:
System Manual - Chapter A.3.7:
http://support.automation.siemens.com/WW/view/en/34261595/



=== Edited by Aquadukt @ 1/12/2012 1:52 PM [GMT ] ===


Top
Page 1 of 1 (9 items)
Actions