Siemens S5/S7 Floating-Point Formats

Does anyone have a description of the Siemens S5 and S7 floating-point
formats? A web search finds a conversion library at
formatting link
which I could buy, but I
don't need all the other functions it contains.
Chris
Reply to
Chris Doran
Loading thread data ...
The S7 floating point format is IEEE, big endian format. I don't know what format the S5 uses.
Reply to
Peter Nachtwey
Hi, Wellcome to the number formats... it has been several years when I made this but if I remember well: S7 follows IEEE754 standard S5 is a non-normalized single precision floating point (0,xx)
The formats are: (from bit 31 to bit 0)
S7 : [S 2^7 ... 2^0 2^-1 .... 2^-23] Bits Content --------------- 31 Sing of mantisa (1 bit) 30-23 Exponent (8 bits) 22-0 Mantissa of fraction (23 bits)
S5: [SE 2^6 ... 2^0 SM 2^-1 ... 2^-23 Bits Content --------------- 31 SE: Sign of exponent (1 bit) 30-24 Exponent (7 bits) 23 SM: Sign of mantissa (1 bit) 22-0 Mantissa (23 bits)
Check also how the numbers are stored in both PLC's. They are in a different way.
I hope this is what you need, Cheers, Quique
Reply to
Quique

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.