Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Who knows the storage format and effective number of real data in Step 7 variable in Siemens s7300PLC?
Who knows the storage format and effective number of real data in Step 7 variable in Siemens s7300PLC?
Format of real number (floating point number) data type

The general form of digital representation in floating-point format is "number = m * b to the e power". Cardinality "b" and exponent "e" are integers; The mantissa "m" is a rational number.

The advantage of this digital representation is that it can represent very large and very small values in a limited space. Within the limited digits of mantissa and exponent, a wide range of numbers can be covered.

The disadvantage is that the calculation accuracy is limited. For example, when the sum of two numbers is formed, the exponent must be matched by moving the mantissa (moving the decimal point), because only numbers with the same exponent can be added.

Floating-point format in STEP 7

The floating-point number in STEP 7 conforms to the basic format and has a single width, which is described in ANSI/IEEE standard 754- 1985, IEEE standard for binary floating-point operation. They consist of the following components:

Symbol s

Exponent E = E+ deviation, add a constant (deviation =+127).

The fractional part of the mantissa m.

The integer part of the mantissa is not stored with other digits, because it is always equal to 1 within the range of significant digits.

These three parts together occupy a double word (32 bits):

The minimum floating point number = (1- 127) power = (-126) power of1.0 * 2.

= 1. 175 495E-38,

Maximum floating point number = 2-2 power of (-23) * 2-2 power of (254-127) = 2 power of (-23) *( 127).

= 3.402 823E+38