<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a89b97588/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a89b97588/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a89b97588/</id><updated>2020-02-27T20:29:33.691000Z</updated><subtitle>Recent posts to STRING functions for more than 255 charater</subtitle><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#b0cf" rel="alternate"/><published>2020-02-27T20:29:33.691000Z</published><updated>2020-02-27T20:29:33.691000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com62601c33d930e39860f63b3116aa1e78681716e3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;what version are you using and what type of PLC.&lt;br/&gt;
have a look at oscat.de for a nice library of functions, including strings.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#49b4" rel="alternate"/><published>2020-02-27T20:29:29.848000Z</published><updated>2020-02-27T20:29:29.848000Z</updated><author><name>alonohev</name><uri>https://forge.codesys.com/u/alonohev/</uri></author><id>https://forge.codesys.comddaa3fbcbd5e7ca226fb6d1e9151ccf6523e93ae</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;HI.&lt;br/&gt;
I have the same problem.&lt;br/&gt;
Are there any news regarding this issues? &lt;br/&gt;
The only result I currently see is to arrange the data into an array of chars, and write all the manipulating functions my self...    &lt;/p&gt;
&lt;p&gt;Does anyone knows why do the string functions has this ridiculous size bound?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#5b07" rel="alternate"/><published>2020-02-27T20:29:28.366000Z</published><updated>2020-02-27T20:29:28.366000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comce8e2ec8037379430217a499bf7e41387ff2d00b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, below some remarks which might be usefull:&lt;br/&gt;
- in V2.3 the functions described in the PLCopen specifications are implemented. I agree they are basic, but they cover most (simple) string handling functions. String handling has become more important with all the advanced functionality a "PLC" has to handle, therefore there have been many more string functions and functionality implemented in V3 (WSTRING, StringUtil library, etc.).&lt;br/&gt;
- You could create some code to first check the length of the string LEN(). If it is &amp;gt; 0 then you can do the conversion. In this case the value could also be 0.&lt;br/&gt;
- Offcours you cannot use all Unicode characters. In V2.3 a string is made up off bytes (maximum 255 characters). In V3 you can use WSTRING variables which are based on UTF16. In this case you can use (almost) all Unicode characters.&lt;br/&gt;
- If you define a string with length 10, then there are 11 bytes/characters reserved in memory. This means you always have a trailing NULL character at the end.&lt;/p&gt;
&lt;p&gt;Maybe this helps.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#d9bb" rel="alternate"/><published>2020-02-27T20:29:24.576000Z</published><updated>2020-02-27T20:29:24.576000Z</updated><author><name>astrand</name><uri>https://forge.codesys.com/u/astrand/</uri></author><id>https://forge.codesys.comad15634759cd508f3c727a400295658d13947f07</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I started working with the Codesys strings a few weeks ago, and I was also surprised to see how limited they are. The length limit of 255 is only one of several major shortcomings. For example, I've noticed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;With STRING_TO_integer conversions, you cannot tell if the resulting zero is because you actually had a zero, or if the conversion failed. The fact that the conversion fails on trailing non-digits (ie '123abc') is also not very practical. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The documentation states that "You may also enter blank spaces and special characters (umlauts for instance)", but what does this mean in practice? I'm sure I cannot use all Unicode characters in the world... &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There's no information on how strings are actually implemented, so one does not know how to arrange for best performance. For example, is it necessary for LEN() to search the entire string for a trailing terminator or not? &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The FIND function does not allow you to specify an offset. Thus, if you have string 'aaa,bbb,ccc' and want to retrieve the offset for the last word, you have to create a new (sub)string, which I assume needs to copy stuff. &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Because the STRING is so opaque, it's difficult to create new helper functions. &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The documentation could also be a lot better. &lt;/p&gt;
&lt;p&gt;It would be interesting to create a new string library. &lt;a class="" href="http://bstring.sourceforge.net/" rel="nofollow"&gt;http://bstring.sourceforge.net/&lt;/a&gt; could be used as inspiration. But then again, how would you solve compatibility with existing STRING variables?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#15b0" rel="alternate"/><published>2020-02-27T20:29:23.209000Z</published><updated>2020-02-27T20:29:23.209000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com8c08de5394b11c0c399bffdcef4472c15e218bd1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You could start a loop to go through all the bytes until you find the value 0.&lt;br/&gt;
0 is the terminator of the string.&lt;br/&gt;
If you find it, then your index (loopcounter) is the length of the string.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#e7ef" rel="alternate"/><published>2020-02-27T20:29:21.848000Z</published><updated>2020-02-27T20:29:21.848000Z</updated><author><name>Siddharth</name><uri>https://forge.codesys.com/u/siddharth/</uri></author><id>https://forge.codesys.com14983619ff4dededb94c26704a21862b6d628e07</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The oscat.de again calls for the builtin string functions. However am trying it with array of bytes. But the problem is it becomes necessary to insert a termination char at the end of the string to get the length of a string.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#9b86" rel="alternate"/><published>2020-02-27T20:29:18.050000Z</published><updated>2020-02-27T20:29:18.050000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comf25e80695cee695c640a2b6c96f080d516c6c631</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I would advise you to handle this in an array of bytes.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#c91b" rel="alternate"/><published>2020-02-27T20:29:16.693000Z</published><updated>2020-02-27T20:29:16.693000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com153d55ffff8ca543a6ac709be1bff02f53dfce5a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;look at oscat.de&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>STRING functions for more than 255 charater</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a89b97588/?limit=25#3913" rel="alternate"/><published>2020-02-27T20:29:12.882000Z</published><updated>2020-02-27T20:29:12.882000Z</updated><author><name>Siddharth</name><uri>https://forge.codesys.com/u/siddharth/</uri></author><id>https://forge.codesys.comc6872b842df143f70fdf45c93511b9f85849a4c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
 I need to handle a string(10000). Does string functions available to handle strings having more than 255 characters?&lt;/p&gt;
&lt;p&gt;-SID&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>