show the entry list
STEP 7 Micro/WIN -- Creating S7 programs -- Executing operations
How do you create a toggle flipflop in STEP 7 Micro/WIN?
What are S7-200 Programming Tips and where can I obtain them?
How can you realize additional logical operators (NEG, NAND, NOR, NXOR) with STEP 7 Micro/WIN?
How do you implement the modulo function in STEP 7 Micro/WIN?
In STEP 7 Micro/WIN, how can you evaluate unlimited rising and falling edges in main programs or subprogram?
Retriggering the cycle monitoring time of S7-200 devices
How can you read out the S7-200 CPU clock and output the values in integer format and how can you set the S7-200 clock with default integer values?
How do you implement the LOGO! Pulse Relay function in STEP 7 Micro/WIN?
Why is a difference detected in the "Compare real numbers for equality" operation although the floating-point numbers are equal in the status?
How can you determine the range of a value INT, DINT, REAL within two given limits?
Edge evaluation in the subprogram
Why is a difference detected in the "Compare real numbers for equality" operation although the floating-point numbers are equal in the status?
Part number:

Description
The number values available as real numbers from the process are too imprecise for the "Compare real numbers for equality" operation. This number format is not recommended for the comparison for "equality" because of the rounding-off error of the real numbers.
The floating-point numbers (or real numbers) are represented as single-precision 32-bit numbers and access is made to them in the double-word format. In the S7-200 the real numbers are precise up to 6 decimal places.
When calculating with real numbers that need a long series of values including large and small numbers, imprecise results might occur. When viewing the real numbers in the status there might be different binary representations of the same real number.
We therefore recommend not to use the "LDR=" function , but to run the comparison using the two functions "LDR<=" and "LDR>=". This gives you a comparison framework for the value to be compared.

The STEP 7 Micro/WIN library as archive file
Copy the "real_compare" file into a separate directory and then start the file with a double-click. The STEP 7 Micro/WIN library is then unpacked. You can then integrate the library, which can be used in version V3.2.4.27 and higher of STEP 7 Micro/WIN, into your S7-200 project.

Note

  • Information about inserting libraries in STEP 7 Micro/WIN is available in Entry ID: 16689345.

real_compare ( 64 KB )

 Entry ID:17924241   Date:2012-05-24 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour