Posted 19 Apr 2006 I am new to this stuff and I need some help please. How do I convert an INT to a REAL value?java script:emoticon('', 'smid_26') Share this post Link to post Share on other sites
Posted 20 Apr 2006 (edited) I am not 100% sure if I am correct, but typically with AB the equivelant to a REAL Data Type is the Float Data Type. This can easily be acomplished by doing a MOV (Move) instuction or COP (Copy) Instruction. Unlike G&L and some GE you can do things like multipy 2 integers and the address the result to a Floating point Data Type, so no additional conversion is needed. Hope this helps, although depending on the processor (PLC) the Float Data Type might not be available. In those cases additional math or programming is typically used to get the accuracy (decimals). I just saw the other posting you had, It is best to keep just the one going. I see you are using a L32 processor, the conversion is easy. Although after looking at your last posting you stated that the computer is showing a zero. If I literally take this statment, the problem is that the, computer won't update the numbers. The processor will, meaning that you have to download the program (or online edit), and watch the values online, if you want to see a change. Another possibility, is if you are online and are not seeing the data change, I would be willing to bet that the routine / file is not running. As an example, if you have this in a different subroutine, the main routine is not calling for that specific routine to run, and or it is not setup in the task schedule. Edited 20 Apr 2006 by Stupidav Share this post Link to post Share on other sites