<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[REXYGEN Community Forum / Rounding decimals]]></title>
	<link rel="self" href="https://www.rexygen.com/oldforum/extern.php?action=feed&amp;tid=407&amp;type=atom"/>
	<link href="http://www.rexygen.com/oldforum/viewtopic.php?id=407"/>
	<updated>2017-12-03T19:05:04Z</updated>
	<generator>FluxBB</generator>
	<id>http://www.rexygen.com/oldforum/viewtopic.php?id=407</id>
	<entry>
		<title type="html"><![CDATA[Re: Rounding decimals]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1841#p1841"/>
		<content type="html"><![CDATA[<p>Hey Tomas,</p><p>Thank you for your help as always. I have used both methods (just to be different!) and created subsystems for future use. </p><p>Thanks again.</p><p>Mike</p>]]></content>
		<author>
			<name><![CDATA[mikeyh]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=60</uri>
		</author>
		<updated>2017-12-03T19:05:04Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1841#p1841</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Re: Rounding decimals]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1839#p1839"/>
		<content type="html"><![CDATA[<p>Hi Mike,</p><p>thank you for this interesting question. I must say that there is no specific function block which does the thing. However, it is definitely possible to achieve such behaviour.</p><p>One option is to convert the Real number to String and then back to Real - function blocks RTOS and STOR. Be sure to setup RTOS parameters according to desired amount of decimals and to select mode &quot;2:normal&quot;.</p><p>Other option is to multiply the real number by (desiredAmountOfDecimals)x10, then round by means of RTOI function block and finally divide by (desiredAmountOfDecimals)x10. Function block sequence is therefore MUL, RTOI and DIV.</p><p>Hope it is useful for you.</p><p>Cheers, Tomas</p>]]></content>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2017-12-01T14:21:45Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1839#p1839</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Rounding decimals]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1837#p1837"/>
		<content type="html"><![CDATA[<p>Hi All,</p><p>I&#039;ve had a good search of the function block manual. I can&#039;t seem to find a block that will round a number up to a desired amount of decimal places.</p><p>I&#039;m willing to make one up or something that works but I&#039;d prefer to use a standard block if one exists.</p><p>Cheers</p><p>Mike</p>]]></content>
		<author>
			<name><![CDATA[mikeyh]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=60</uri>
		</author>
		<updated>2017-11-29T21:51:33Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1837#p1837</id>
	</entry>
</feed>
