10/13/2014 5:31 PM | |
Joined: 1/28/2009 Last visit: 1/30/2025 Posts: 6859 Rating:
|
Hello, If your received data is stored in a global address storage, you first check byte to byte of all received information.To this, you need a ASCII Table with comparison instructions for S7-1200.While analyzing data, store data related to scientific notation (a*(10^b)) in form of a and b.Merge bytes related to a in left side of decimal point with BCD --> INT-->Real conversion.For data stored in right side of decimal point ,keep one, do the same procedure (BCD --> INT-->Real) and devide it to (10).Now add both number and form the " a " .
For b , do the same procedure as explained before and decide it sign with chracter "+" or "-".The final actual value can be calculated with result:= a*(EXP(b*LN(10)); Note: 10^b can also be calculated by EXPT (IN1:=10,IN2:=b) for S7-1200 in TIA Portal. I hope this helps, Hamid Hosseini |
Last edited by: hdhosseini at: 10/13/2014 5:55 PMLast edited by: hdhosseini at: 10/13/2014 5:53 PM |
|
Follow us on