5/6/2015 8:13 AM | |
Joined: 8/3/2011 Last visit: 3/21/2024 Posts: 100 Rating: (7) |
Hi,try to do it This way... #temp := 1.112233; |
5/6/2015 5:04 PM | |
Joined: 6/24/2013 Last visit: 4/22/2024 Posts: 1588 Rating: (409) |
True. Main reason of conversion from int to real in case of analog values is to have them in engineering units (so when you monitor the program value has some meaning to you). I have seen one program where all integers from analog IQs were kept as raw values (0..27648) in the whole program and scaled in SCADA. terrible - when monitoring . debugging value means nothing (they were not commented what's range / unit / etc.) One reason for long real is when you have a very high value which must be precise for example reading from energy meter which sends values as long real (i.e. PAC3000). For S7-300 / 400 I have made library of LREAL functions and function for energy meter - see attached. AttachmentIS0034_LongReal.zip (239 Downloads) |
Follow us on