<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Codesys 2.3.9.44 ; Function : STRING_COMPARE</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/35b291a974/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/35b291a974/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/35b291a974/</id><updated>2020-02-27T22:40:47.438000Z</updated><subtitle>Recent posts to Codesys 2.3.9.44 ; Function : STRING_COMPARE</subtitle><entry><title>Codesys 2.3.9.44 ; Function : STRING_COMPARE</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/35b291a974/?limit=25#4078" rel="alternate"/><published>2020-02-27T22:40:47.438000Z</published><updated>2020-02-27T22:40:47.438000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com94162cb5c7ce5d782e2bb315a6593bc39a2e3c7f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;i can not find a string_compare in standard,&lt;br/&gt;
in :&lt;br/&gt;
The Library SysLibStr.lib&lt;br/&gt;
Please regard: It depends on the target system, which system libraries can be used in the application program. Please see the document SysLibs_Overview.pdf.&lt;/p&gt;
&lt;p&gt;This library provides functions for string operations. If the target system is supporting the functionality, the following functions can be used to compare or copy strings or to retrieve the length of a string. The execution is synchronous.&lt;/p&gt;
&lt;p&gt;SysStrCmp &lt;/p&gt;
&lt;p&gt;SysStrCmpI &lt;/p&gt;
&lt;p&gt;SysStrCmpN &lt;/p&gt;
&lt;p&gt;SysStrCmpNI &lt;/p&gt;
&lt;p&gt;SysStrCpy &lt;/p&gt;
&lt;p&gt;SysStrLen &lt;/p&gt;
&lt;p&gt;So you can do it with this library&lt;br/&gt;
or you can also use oscat.lib it has loads of functions.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codesys 2.3.9.44 ; Function : STRING_COMPARE</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/35b291a974/?limit=25#f140" rel="alternate"/><published>2020-02-27T22:40:43.009000Z</published><updated>2020-02-27T22:40:43.009000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com05f90c1d5779703f2fc0947857eee752de29aa86</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; xj750rj&lt;/p&gt;
&lt;p&gt;Hello Everyone,&lt;/p&gt;
&lt;p&gt;I am having trouble making the Function "STRING_COMAPRE" from the Standard library work. Gut-Feeling says its simple but be darned if I can see what I am doing incorrectly. Looks like this:&lt;br/&gt;
VAR&lt;br/&gt;
        T_Input_Word:STRING(5):='10123';&lt;br/&gt;
        T_Req_Word:STRING(5):='10122';&lt;br/&gt;
                STRING_COMPARE1:BOOL;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;Code:&lt;br/&gt;
STRING_COMPARE1:=STRING_COMPARE (T_Input_Word, T_Req_Word) ;&lt;/p&gt;
&lt;p&gt;Code is 16bit, but is presently running under simulation only. I tried the string function "LEN" under simulation and it works fine returning the lengths of both strings when programmed.&lt;br/&gt;
Anybody see what I am doing incorrectly?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br/&gt;
Wally&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>