<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to ASCII programming within CoDeSys</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5a5b113e5f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5a5b113e5f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/5a5b113e5f/</id><updated>2020-02-27T23:20:16.673000Z</updated><subtitle>Recent posts to ASCII programming within CoDeSys</subtitle><entry><title>ASCII programming within CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5a5b113e5f/?limit=25#8a51" rel="alternate"/><published>2020-02-27T23:20:16.673000Z</published><updated>2020-02-27T23:20:16.673000Z</updated><author><name>RikeR</name><uri>https://forge.codesys.com/u/riker/</uri></author><id>https://forge.codesys.com5a2d08c1c1404ecc58e91c56c8923dba00f242c2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The standard.lib provides function(block)s for string handling. I guess the function you are looking for is FIND.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
FIND&lt;br/&gt;
Provided by standard.lib. &lt;br/&gt;
FIND searches for a partial string within a string.&lt;br/&gt;
The input variable STR1 and STR2 are type STRING, the return value of the function is type STRING.&lt;br/&gt;
FIND(STR1, STR2) means: Find the position of the first character where STR2 appears in STR1 for the first time. If STR2 is not found in STR1, then OUT:=0.&lt;br/&gt;
Example in IL:&lt;br/&gt;
LD   'abcdef'&lt;br/&gt;
FIND 'de'&lt;br/&gt;
ST   VarINT1 (&lt;em&gt; Result is '4' &lt;/em&gt;)&lt;br/&gt;
Example in FBD:&lt;br/&gt;
Example in ST:&lt;br/&gt;
arINT1 := FIND ('abcdef','de');&lt;br/&gt;
Please note: String functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting. &lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry><entry><title>ASCII programming within CoDeSys</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/5a5b113e5f/?limit=25#63f0" rel="alternate"/><published>2020-02-27T23:20:15.032000Z</published><updated>2020-02-27T23:20:15.032000Z</updated><author><name>robw</name><uri>https://forge.codesys.com/u/robw/</uri></author><id>https://forge.codesys.com95c6bd9c409153f2eb1fda54bdb43776ea9a3a56</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I was wondering if anybody has a sample programming showing the sequencing of ascii comms within a PLC over RS232 to a slave. We need to monitor for a EOT command and then send a "STX our data ETX". However we then need to monitor return data and depending on this data send a different value back to slave.&lt;/p&gt;
&lt;p&gt;We are mainly interested in the sequencing and methods of comparison and interested in any ideas that may help.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>