<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2c60bcda37/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2c60bcda37/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/2c60bcda37/</id><updated>2020-02-27T20:35:51.842000Z</updated><subtitle>Recent posts to Serial Output through a library?</subtitle><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#e70d" rel="alternate"/><published>2020-02-27T20:35:51.842000Z</published><updated>2020-02-27T20:35:51.842000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com494f66367c53108f154a694842d7ede57f464488</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;check the codesys site&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#e713" rel="alternate"/><published>2020-02-27T20:35:50.473000Z</published><updated>2020-02-27T20:35:50.473000Z</updated><author><name>mravlincek</name><uri>https://forge.codesys.com/u/mravlincek/</uri></author><id>https://forge.codesys.com73cf101d68a70c92b7d8e2e5c7a45dee6f760512</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;bump: any updates to this? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#8f5c" rel="alternate"/><published>2020-02-27T20:35:46.659000Z</published><updated>2020-02-27T20:35:46.659000Z</updated><author><name>deluxe79</name><uri>https://forge.codesys.com/u/deluxe79/</uri></author><id>https://forge.codesys.com66b68051ba97b015a1d1578f058e87fc9e473f5e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;anverheul : Is it possible to have a copy of the source?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#d59e" rel="alternate"/><published>2020-02-27T20:35:45.284000Z</published><updated>2020-02-27T20:35:45.284000Z</updated><author><name>zebra78</name><uri>https://forge.codesys.com/u/zebra78/</uri></author><id>https://forge.codesys.com91844480dd02941d830a5adc2aff17710fbd0351</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;That sounds like a good idea, similar to what I would like to set up.  &lt;/p&gt;
&lt;p&gt;I have tried using syslibcom.lib, but can't get even the SysComOpen function to work.  My plc is configured with the target system being a PCI card with an integrated PLC installed inside my computer.  This card does not have any serial ports, and I am hoping to use the host PC's RS 232 port, not a port on the target card.&lt;/p&gt;
&lt;p&gt;I have duplicated the code from this post on the German board:&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://forum.3s-software.com/viewtopic.php?t=181&amp;amp;highlight=232" rel="nofollow"&gt;http://forum.3s-software.com/viewtopic. ... hlight=232&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;but it cannot successfully open COM2.  &lt;/p&gt;
&lt;p&gt;Is this possible?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#db5b" rel="alternate"/><published>2020-02-27T20:35:43.917000Z</published><updated>2020-02-27T20:35:43.917000Z</updated><author><name>anverheul</name><uri>https://forge.codesys.com/u/anverheul/</uri></author><id>https://forge.codesys.com19d7f3efb89fdeef5874822cb6082fd842f13e66</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Jason,&lt;/p&gt;
&lt;p&gt;I've done quite some RS232 interfacing between CoDeSys controlled PLC and other equipment.&lt;/p&gt;
&lt;p&gt;Basically I've one task handling one serial port, with one 'low-level' POU (FB) handling basic RS232 actions (sending requests and receiving responses) and a 'higher-level' POU (PRG) determining which subsequent requests to send based on received responses.&lt;/p&gt;
&lt;p&gt;The higher level POU is continuously calling (polling) the low-level POU, checking it's status to determine if the low-level POU has finished transmitting the current request, or has finished reading the expected response etc.&lt;/p&gt;
&lt;p&gt;The low-level POU is a state machine with several (job)states and several (job)results, and it's only this POU that uses the functions from SysLibCom &lt;/p&gt;
&lt;p&gt;Some extra states are needed because the low-level POU is only sending a certain amount of bytes at a time, and also is reading a certain amount of bytes at a time, before handing over control to the higher-level POU (so that eventually also other tasks can get a chance to run).&lt;/p&gt;
&lt;p&gt;States:&lt;/p&gt;
&lt;p&gt;JOB_IDLE:                                              (&lt;em&gt; Do nothing &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;JOB_SEND_REQUEST:                          (&lt;em&gt; Send request &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;JOB_SEND_REQUEST_CONTINUE:         (&lt;em&gt; Send more bytes from (large)request &lt;/em&gt;);&lt;/p&gt;
&lt;p&gt;JOB_WAIT_FOR_ANSWER                         (&lt;em&gt; Wait for response &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;JOB_WAIT_FOR_ANSWER_CONTINUE        (&lt;em&gt; Wait for more bytes from (large)response &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;JOB_PROCESS_ANSWER                          (&lt;em&gt; Process response &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;JOB_RETRY                                             (&lt;em&gt; Send request again &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Results:&lt;/p&gt;
&lt;p&gt;STATE_READY&lt;/p&gt;
&lt;p&gt;STATE_BUSY&lt;/p&gt;
&lt;p&gt;STATE_TIMEOUT&lt;/p&gt;
&lt;p&gt;STATE_WRONG_ANSWER&lt;/p&gt;
&lt;p&gt;STATE_TRANSMIT_ERROR&lt;/p&gt;
&lt;p&gt;STATE_INIT&lt;/p&gt;
&lt;p&gt;STATE_NOT_USED&lt;/p&gt;
&lt;p&gt;Arie N. Verheul&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#0987" rel="alternate"/><published>2020-02-27T20:35:40.095000Z</published><updated>2020-02-27T20:35:40.095000Z</updated><author><name>zebra78</name><uri>https://forge.codesys.com/u/zebra78/</uri></author><id>https://forge.codesys.com22f8380448be3c3ce39ae92eb72d567b00163f73</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I thought that was what I should use, but I can't seem to interpret the examples that I have found online.  Can anyone post some working POU's with SysLibCom?&lt;/p&gt;
&lt;p&gt;Jason&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#204c" rel="alternate"/><published>2020-02-27T20:35:38.737000Z</published><updated>2020-02-27T20:35:38.737000Z</updated><author><name>anverheul</name><uri>https://forge.codesys.com/u/anverheul/</uri></author><id>https://forge.codesys.comf305162fedeef1e35d0eaf08058b8ad0df448c97</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What about SysLibCom?&lt;/p&gt;
&lt;p&gt;It allows to open/close serial ports, and to read/write data from/to them.&lt;/p&gt;
&lt;p&gt;Or are you looking for something different?&lt;/p&gt;
&lt;p&gt;Arie N. Verheul&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Serial Output through a library?</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/2c60bcda37/?limit=25#47fe" rel="alternate"/><published>2020-02-27T20:35:34.912000Z</published><updated>2020-02-27T20:35:34.912000Z</updated><author><name>zebra78</name><uri>https://forge.codesys.com/u/zebra78/</uri></author><id>https://forge.codesys.comfb5ae78edd04fc0963f045d691c753d6bffd8e2b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is there a library that offers the ability to send a character string out through the host computer's serial port?&lt;/p&gt;
&lt;p&gt;Jason&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>