<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/fce1c837f8/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/fce1c837f8/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/fce1c837f8/</id><updated>2020-02-27T21:14:07.305000Z</updated><subtitle>Recent posts to Conversion BYTE to ASCII String  + SysLibFileStream.lib</subtitle><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#745d" rel="alternate"/><published>2020-02-27T21:14:07.305000Z</published><updated>2020-02-27T21:14:07.305000Z</updated><author><name>aurelien</name><uri>https://forge.codesys.com/u/aurelien/</uri></author><id>https://forge.codesys.com61ffd1cb450dbabbc6efd72f7f8b26441950d7df</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;thank you  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#6946" rel="alternate"/><published>2020-02-27T21:14:05.872000Z</published><updated>2020-02-27T21:14:05.872000Z</updated><author><name>ndzied1</name><uri>https://forge.codesys.com/u/ndzied1/</uri></author><id>https://forge.codesys.com650b3b564fe915e08ef92ae0d38749d3581625d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Strings need a terminating character (0) so that the functions that use them know where the end of information contained within the string buffer is.&lt;/p&gt;
&lt;p&gt;By moving a zero to the location that p1 is pointing at, you are putting that terminating character where it belongs in the string.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#74e5" rel="alternate"/><published>2020-02-27T21:14:01.852000Z</published><updated>2020-02-27T21:14:01.852000Z</updated><author><name>aurelien</name><uri>https://forge.codesys.com/u/aurelien/</uri></author><id>https://forge.codesys.com141a7a06c77ddf2a352a7d090f5c8a895a3b6b45</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;thank you for your answers&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Softwerker59&lt;/strong&gt;, I don't understand this part :&lt;/p&gt;
&lt;p&gt;p1 := p1 + 1; &lt;/p&gt;
&lt;p&gt;p1^ := 0; (&lt;em&gt; terminating zero &lt;/em&gt;) &lt;/p&gt;
&lt;p&gt;(I'm not realy fond of pointers)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;hugo&lt;/strong&gt;, thank you and great job, is there english documentation ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#d88e" rel="alternate"/><published>2020-02-27T21:14:00.413000Z</published><updated>2020-02-27T21:14:00.413000Z</updated><author><name>hugo</name><uri>https://forge.codesys.com/u/hugo/</uri></author><id>https://forge.codesys.com42a9793fabffb902c1267a2c336606f5128a324b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;in the open source library from oscat you can find such routines&lt;/p&gt;
&lt;p&gt;w &lt;a class="" href="http://www.oscat.de" rel="nofollow"&gt;www.oscat.de&lt;/a&gt; w &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#5d3d" rel="alternate"/><published>2020-02-27T21:13:58.963000Z</published><updated>2020-02-27T21:13:58.963000Z</updated><author><name>Softwerker59</name><uri>https://forge.codesys.com/u/softwerker59/</uri></author><id>https://forge.codesys.comd0f80f4c289513f1d267b4f7c4fc7700c884a57e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;you are right. SysLibFileStream is not supported by Moeller PLCs.&lt;/p&gt;
&lt;p&gt;If you have only 1 byte which holds the corresponding ASCII value you can copy it directly to the string:&lt;/p&gt;
&lt;p&gt;s1 : string;&lt;/p&gt;
&lt;p&gt;b1 : byte;&lt;/p&gt;
&lt;p&gt;p1 : pointer to byte;&lt;/p&gt;
&lt;p&gt;p1 := ADR(s1);&lt;/p&gt;
&lt;p&gt;if ( b1 &amp;gt; 32 ) then&lt;/p&gt;
&lt;p&gt;p1^ := b1;&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;p1^ := 32;  (&lt;em&gt; blank &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;end_if&lt;/p&gt;
&lt;p&gt;p1 := p1 + 1;&lt;/p&gt;
&lt;p&gt;p1^ := 0;      (&lt;em&gt; terminating zero &lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;This is alternative to your string table which works too.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Klaus&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#a6b2" rel="alternate"/><published>2020-02-27T21:13:54.898000Z</published><updated>2020-02-27T21:13:54.898000Z</updated><author><name>aurelien</name><uri>https://forge.codesys.com/u/aurelien/</uri></author><id>https://forge.codesys.com04ba01cf64a5f8e7a3ddb2006952f1908e53e8fd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Regarding to my first question, I guess I may process like that&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;ascii&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;ARRAY&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="n"&gt;OF&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;):=&lt;/span&gt;&lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;' '&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="s1"&gt;'!'&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'"'&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'#'&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'$$'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'%'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'&amp;amp;'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'´'&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'('&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;')'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'*'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'+'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'-'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'.'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'/'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'0'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'1'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'2'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'3'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'4'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'5'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'6'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'7'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'8'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'9'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;':'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;';'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'='&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'&amp;gt;'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'?'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'@'&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'A'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'B'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'C'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'D'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'E'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'F'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'G'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'H'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'I'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'J'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'K'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'L'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'M'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'N'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'O'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'P'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'Q'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'R'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'S'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'T'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'U'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'V'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'W'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'X'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'Y'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'Z'&lt;/span&gt; &lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'['&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'\' ,'&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="err"&gt;`&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;l&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;' ,'&lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Conversion BYTE to ASCII String  + SysLibFileStream.lib</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/fce1c837f8/?limit=25#38a6" rel="alternate"/><published>2020-02-27T21:13:53.458000Z</published><updated>2020-02-27T21:13:53.458000Z</updated><author><name>aurelien</name><uri>https://forge.codesys.com/u/aurelien/</uri></author><id>https://forge.codesys.com15a8787a131c833d7cdf69038488a5985b4c4fe1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;EDIT2 : Hello everydoby, I want to convert a BYTE to is corresponding ASCII string :&lt;/p&gt;
&lt;p&gt;example :&lt;/p&gt;
&lt;p&gt;a : INT ;&lt;/p&gt;
&lt;p&gt;b : STRING;&lt;/p&gt;
&lt;p&gt;a := 65; (&lt;em&gt;ASCII code =&amp;gt; A&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;I would like the string 'A' in my var b ?&lt;/p&gt;
&lt;p&gt;How can i do this ?&lt;/p&gt;
&lt;p&gt;thank you&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Hello, have you got examples using the library SysLibFileStream ?&lt;/p&gt;
&lt;p&gt;Does it works with every PLC (can't find the corresponding document  SysLibs_Overview.pdf) (In my case Moeller/Micro Innovation PLC)? &lt;/p&gt;
&lt;p&gt;I've tried regarding ansi c definition but without any success  &lt;/p&gt;
&lt;p&gt;thank you  &lt;/p&gt;
&lt;p&gt;EDIT: On SysLibs_Overview.pdf from Moeller, they don't speak about SysLibFileStream, so I guess it doesn't work with ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>