<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[REXYGEN Community Forum / Feature requests, bug reports]]></title>
	<link rel="self" href="https://www.rexygen.com/oldforum/extern.php?action=feed&amp;fid=7&amp;type=atom"/>
	<link href="http://www.rexygen.com/oldforum/index.php"/>
	<updated>2019-03-20T13:40:31Z</updated>
	<generator>FluxBB</generator>
	<id>http://www.rexygen.com/oldforum/index.php</id>
	<entry>
		<title type="html"><![CDATA[REXYGEN Forum has been moved. This one is closed.]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=605&amp;action=new"/>
		<summary type="html"><![CDATA[<p>This REXYGEN Forum is closed for new topics and comments.<br />To start a new topic, go ahead and start one at our <a href="https://forum.rexygen.com" rel="nofollow">brand new REXYGEN Forum</a>, which can be found at <a href="https://forum.rexygen.com" rel="nofollow">forum.rexygen.com</a>.</p><p>Looking forward to moderating your discussions.</p><p>Regards, <br />Tomas @ REXYGEN Team</p>]]></summary>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2019-03-20T13:40:31Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=605&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Serial communication via com port issues]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=322&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Hi soxso2011,</p><p>it is possible to combine Serial communication with UDP communication in one REX project.<br />For UDP communication see UDP Data exchange example - <a href="https://github.com/rexcontrols/REXexamples/tree/v2.50/Integrating_external_devices/UDP/Generic_Sender_Receiver" rel="nofollow">https://github.com/rexcontrols/REXexamp … r_Receiver</a></p><p>For more details about OPC implementation in REX see documentation - <a href="https://www.rexcontrols.com/media/2.50.1/doc/PDF/ENGLISH/RexOPCServer_ENG.pdf" rel="nofollow">https://www.rexcontrols.com/media/2.50. … er_ENG.pdf</a></p><p>Our team can also help you with the customised implementation according to your needs - just contact us.</p><p>Regards, Tomas</p>]]></summary>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2017-03-13T09:30:10Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=322&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Example serial communication : parsing and sending AT-commands]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=44&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Hi, I also want to read data from COM Ports and parse it and then send it to OPC!! I am trying to read the data from receiver example but its not working.Please help me out!</p><div class="codebox"><pre class="vscroll"><code> #define COM_DEVICE_FNAME 17   // serial device is defined by the fname parameter of the REXLANG block (e.g. /dev/ttyS0 in Linux or COM1: in Windows)

#define COM_BAUDRATE 9600 //baudrate, e.g. 9600, 19200, 57600, 115200

#define COM_PARITY_NONE 0  //no parity
#define COM_PARITY_ODD  1  //odd parity
#define COM_PARITY_EVEN 2  //even parity

#define BUFFER_SIZE  50    //maximum number of bytes to send

//assigning variables to outputs, these variables are WRITE-ONLY
long output(0) signal0;    //integer number received from the sender
long output(1) signal1;    //integer number received from the sender
double output(2) signal2;  //real number received from the sender
double output(3) signal3;  //real number received from the sender
long output(14) receivedBytes; //number of received bytes
long output(15) handle;    //handle of the serial device

long output(10) dat0;      //the first byte of the received data
long output(11) dat1;      //the second byte of the received data
long output(12) dat2;      //the third byte of the received data
long output(13) dat3;      //the fourth byte of the received data

//declaration of variables
long hCom;                 //communication handle
long buffer[BUFFER_SIZE];  //buffer for incoming data
long dataCnt;              //number of bytes sent
long convData[2];          //array for data conversions

/* Function for conversion of 2 numbers of type Long representing a decimal 
number in the double format according to IEEE 754 to a decimal number. 
Little-endian format is used. */
double LongAsDouble(long val[])
{
	double lbase=((double)(val[1]&amp;0xFFFFF))/((double)0x00100000)+(val[0]&amp;0x7FFFFFFF)*pow(2.0,-52.0);
	long lexp=(val[1]&gt;&gt;20)&amp;0x7FF;
	if(val[0]&amp;0x80000000)
		lbase+=pow(2.0,-21.0);
	if(lexp==0)
		return 0.0;
	if(lexp==0x7FF)
	{	
    //deal with NaN and Inf here if necessary
		return 1.0e60; //substitute value
	}
	lbase=(lbase+1.0)*pow(2.0,(double)(lexp-1023));
	return (val[1]&amp;0x80000000)!=0? -lbase : lbase;
}

/* Initialization of the REXLANG algorithm */
// the init procedure is executed once when the REXLANG function block initializes
long init(void)
{
  hCom = -1;
  dataCnt = 0;
	return 0;
}

/* The body of REXLANG algorithm */
// the main procedure is executed once in each sampling period
long main(void)
{
  long i;
  if (hCom&lt;0)
  {
    hCom = Open(COM17,9600,0);  //opening serial device
  }
  else 
  {
    //receive the data
    dataCnt = Recv(hCom,buffer,BUFFER_SIZE); //receive data, max number of bytes = BUFFER_SIZE

    //the first signal is of type long, therefore 4 bytes
    signal0 = buffer[0] | buffer[1]&lt;&lt;8 | buffer[2]&lt;&lt;16 | buffer[3]&lt;&lt;24;
    dat0 = buffer[0]; //publishing received data (for debugging)
    dat1 = buffer[1]; //publishing received data (for debugging)
    dat2 = buffer[2]; //publishing received data (for debugging)
    dat3 = buffer[3]; //publishing received data (for debugging)
    
    //the second signal is binary, therefore 1 byte
    signal1 = buffer[4];
    
    //the third signal is of type double, therefore 8 bytes
    convData[0] = buffer[5] | buffer[6]&lt;&lt;8 | buffer[7]&lt;&lt;16 | buffer[8]&lt;&lt;24;
    convData[1] = buffer[9] | buffer[10]&lt;&lt;8 | buffer[11]&lt;&lt;16 | buffer[12]&lt;&lt;24;
    signal2 = LongAsDouble(convData);
    
    //the fourth signal is of type double, therefore 8 bytes
    convData[0] = buffer[13] | buffer[14]&lt;&lt;8 | buffer[15]&lt;&lt;16 | buffer[16]&lt;&lt;24;
    convData[1] = buffer[17] | buffer[18]&lt;&lt;8 | buffer[19]&lt;&lt;16 | buffer[20]&lt;&lt;24;
    signal3 = LongAsDouble(convData);
  }  
  
  //publishing the serial communication handle through output signal (for debugging)
  handle = hCom;
  //and also the number of received bytes
  receivedBytes = dataCnt;
  return 0;
}

/* Closing the REXLANG algorithm */
//the exit procedure is executed once when the task is correctly terminated
// (system shutdown, downloading new control algorithm, etc.)
long exit(void)
{
	if(hCom&gt;=0) Close(hCom);
  return 0;
}</code></pre></div>]]></summary>
		<author>
			<name><![CDATA[soxso2011]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=21</uri>
		</author>
		<updated>2017-01-15T07:23:49Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=44&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Reusable subsystem blocks]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=179&amp;action=new"/>
		<summary type="html"><![CDATA[<div class="quotebox"><cite>scoobsalamander wrote:</cite><blockquote><div><p>Thx, that looks exactly what I need..... I guess this feature isn&#039;t documented yet. :-)</p></div></blockquote></div><p>Unfortunatelly you are right... We&#039;ll improve that!</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2016-07-10T13:21:03Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=179&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[REXdraw chrashed during deleting unwanted ports]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=110&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Hey scoobsalamander,</p><p>thank you very much for reporting this bug! I would like to assure you that lines and connecting FBs will be completely revised in new release (not only because of this issue).</p><p>PS: <strong>Creating a SubSystem</strong>: if there are more unwanted ports then the wanted ones (almost always in my opinion <img src="http://www.rexygen.com/oldforum/img/smilies/wink.png" width="15" height="15" alt="wink" /> ) you can use this workaround of creating SubSystem:<br />- open Library and add to your project &quot;SubSystem&quot; block - this will lead to SubSystem with one inport and one outport<br />- draw the SubSystem you need</p><p><span class="postimg"><img src="https://www.rexygen.com/oldforum/img/members/39/subsystem.png" alt="subsystem.png" /></span></p><p>Have a nice day!<br />Regards, Tomas</p>]]></summary>
		<author>
			<name><![CDATA[tomáš čechura]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=39</uri>
		</author>
		<updated>2016-04-18T07:25:45Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=110&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Rexlang block freezes when there is an illegal operation]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=77&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Thanks for posting your findings. This is a feature in versions &lt;=2.10.x, not a bug. In future versions the REXLANG block will have a RESET input.</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2016-03-12T22:33:51Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=77&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Suggestions]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=8&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Yes, no problem! You just run the web browser (e.g. Chromium) in full screen (or kiosk mode) and it will display your HMI. You just have to boot to the graphical user interface of your Raspberry Pi, which is the default behavior in the latest Raspbian releases.</p><p>There is a selection of displays available for your Raspberry Pi, e.g. the <a href="https://www.raspberrypi.org/products/raspberry-pi-touch-display" rel="nofollow">official RPi display</a> or <a href="https://www.adafruit.com/categories/400" rel="nofollow">Adafruit displays</a>.</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2016-02-16T14:27:57Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=8&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Slow editing in Inkscape]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=51&amp;action=new"/>
		<summary type="html"><![CDATA[<p>In that case we&#039;ll check if there is some memory leak. Thanks for reporting this issue!</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2016-02-02T20:27:20Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=51&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Ready made HMI elements]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=32&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Glad I could help. And thanks for the compliments!</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2015-12-08T15:37:38Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=32&amp;action=new</id>
	</entry>
	<entry>
		<title type="html"><![CDATA[Example program for MCP_3422 not compiling]]></title>
		<link rel="alternate" href="http://www.rexygen.com/oldforum/viewtopic.php?id=27&amp;action=new"/>
		<summary type="html"><![CDATA[<p>Change i2c_port_handle to i2c_bus_handle on line 49.</p><p>I have fixed it in the examples repository. Thanks for reporting this problem!</p>]]></summary>
		<author>
			<name><![CDATA[jaroslav_sobota]]></name>
			<uri>http://www.rexygen.com/oldforum/profile.php?id=3</uri>
		</author>
		<updated>2015-11-28T01:58:59Z</updated>
		<id>http://www.rexygen.com/oldforum/viewtopic.php?id=27&amp;action=new</id>
	</entry>
</feed>
