2/3/2013 11:44 AM | |
Posts: 9 Rating: (0) |
Dear Friends I need a block to convert IEEE Floating point number to real number I'm using PCS7.1 But i can't find this block in any Library thanks in advance
|
2/3/2013 2:06 PM | |
Joined: 1/28/2009 Last visit: 10/26/2024 Posts: 6852 Rating: (1365) |
Hello, I am not sure this is what you exactly want.But,This is what we discussed on similar issue in German side of the Forum: 2 WORTE (high/low) in FLOAT/REAL wandeln Best regards Hamid Hosseini |
2/3/2013 3:34 PM | |
Joined: 9/27/2006 Last visit: 11/14/2024 Posts: 12294 Rating: (2691) |
Hello XRay; Your question confuuses me a bit. The Step 7 datatype "REAL" is formatted as a IEEE floating-point 754 standard number. See the online help of your programming environment for more details. Or look at the definition of the STL instruction DTR (DINT to REAL), from the STL programming manual): SIMATIC STEP 7 V5.5 Statement List (STL) for S7-300 and S7-400 Programming 3.7 DTR Double Integer (32-Bit) to Floating-Point (32-Bit IEEE 754) Format DTR Description DTR (conversion of a 32-bit integer number to a 32-bit IEEE floating point number) interprets the content of ACCU 1 as a 32-bit double integer and converts it to a 32-bit IEEE floating point number. If necessary, the instruction rounds the result. (A 32-bit integer has a higher accuracy than a 32-bit floating point number). The result is stored in accumulator 1. Maybe you should give us an example of the operation you need to do and the problems that you face. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 2/3/2013 3:35 PM |
|
2/3/2013 8:26 PM | |
Joined: 3/21/2006 Last visit: 11/1/2024 Posts: 10229 Rating: (1181) |
How can you process 64-bit floating-point numbers in STEP 7 V5.5 with a SIMATIC S7-300/400 CPU? |
This contribution was helpful to1 thankful Users |
2/4/2013 10:01 PM | |
Posts: 9 Rating: (0) |
Hello, I am not sure this is what you exactly want.But,This is what we discussed on similar issue in German side of the Forum: 2 WORTE (high/low) in FLOAT/REAL wandeln Best regards Hamid Hosseini Hello, thanks hdhosseini ,that's exactly what i need . did you have the reverse conversion (from real to IEEE Foating)? thanks in advance
|
2/13/2013 4:02 PM | |
Posts: 836 Rating: (100)
|
Well.. just do it the same way in reverseisn't an option? |
2/13/2013 7:26 PM | |
Joined: 1/28/2009 Last visit: 10/26/2024 Posts: 6852 Rating: (1365) |
Hello , As I remember , the case discussed in German was about "forming a floating number based on Sign,Mantissa and Exponent". The mentioned solution in German side was a rough implementation and can vary based on your requirement.You should clearly state your problem and that will help us to propose a better solution.As the variables selected as DWORD ,exact value in floating point can be reproduced. there is other representation( V= {(-1)^S} *M* {2^(E-127)} which is explained here in details: http://www.dspguide.com/ch4/3.htm Hope that helps a bit Best regards Hamid Hosseini |
Follow us on