<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[REXYGEN Community Forum / sleep function within rexlang]]></title>
	<link rel="self" href="https://www.rexygen.com/oldforum/extern.php?action=feed&amp;tid=288&amp;type=atom"/>
	<link href="http://www.rexygen.com/oldforum/viewtopic.php?id=288"/>
	<updated>2016-11-28T09:18:55Z</updated>
	<generator>FluxBB</generator>
	<id>http://www.rexygen.com/oldforum/viewtopic.php?id=288</id>
	<entry>
		<title type="html"><![CDATA[Re: sleep function within rexlang]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1249#p1249"/>
		<content type="html"><![CDATA[<p>Hi Fred,</p><p>the functions in REXLANG are case sensitive - try to use <strong>Sleep(seconds)</strong> instead of sleep(seconds).</p><p>Please, be aware that the Sleep function will stop whole task - so it will artificially extend the sampling period. It can be critical for some sort of applications. I would suggest to use some simple switching logic witihn REXLANG so that every odd tick you will perform write and every even tick read command.</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>2016-11-28T09:18:55Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1249#p1249</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[sleep function within rexlang]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?pid=1245#p1245"/>
		<content type="html"><![CDATA[<p>Hi,</p><p>I have been trying to use the sleep function in the rexlang block (so I can write to I2C wait and then perform a read for the ADC).</p><p>My problem is that I get the following error when compiling:<br />Error compiling file &#039;ads1115.c&#039; (line 75): function &#039;sleep&#039; is not declared <br />Error 125: The configuration validation error occured in:<br />Error 126:&#160; &#160; &#160;Validation error -220 (REXLANG compilation error) in the pin &#039;pool_task.ADS1115:srcname&#039;</p><br /><p>I am not sure to understand why as the sleep function is supposed to exists in Rexlang. I am not sure what I am doing wrong.<br />Thanks,<br />Fred</p><p>Documentation:<br />void Sleep(seconds)<br />Stop execution of the block’s algorithm (and whole task) for deﬁned time. Shortest possible time is about 0.01s, but depend on platform.</p>]]></content>
		<author>
			<name><![CDATA[farcouet@yahoo.es]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=112</uri>
		</author>
		<updated>2016-11-26T15:01:35Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?pid=1245#p1245</id>
	</entry>
</feed>
