EasyManuals Logo

Siemens SIMATIC IOT User Manual

Siemens SIMATIC IOT
133 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #85 background imageLoading...
Page #85 background image
Maintaining and repairing the device
6.6 Configure IOT2050 SM
SIMATIC IOT2050
Operating Instructions, 03/2024, A5E39456816-AF
85
power_count -= 1;
}
mantissa_int += 1;
return pow(-1, sign) * mantissa_int * pow(2, exponent);
}
Example: converts real to float with Python
def real_to_float(u32:int) -> float:
"""
Convert IEEE754 floating point.
"""
sign = u32 >> 31
exponent = ((u32 >> 23) & 0xFF) - 127
mantissa = u32 & 0x7FFFFF
power_count = -1
mantissa_int = 0
for i in range(0, 23):
mantissa_int += ((mantissa >> (22 - i)) & 1) * pow(2,
power_count)
power_count -= 1
mantissa_int += 1
return pow(-1, sign) * mantissa_int * pow(2, exponent)

Table of Contents

Other manuals for Siemens SIMATIC IOT

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC IOT and is the answer not in the manual?

Siemens SIMATIC IOT Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC IOT
CategoryIndustrial PC
LanguageEnglish

Related product manuals