<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to string null</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a3da668a3/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a3da668a3/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/4a3da668a3/</id><updated>2020-02-27T20:10:28.915000Z</updated><subtitle>Recent posts to string null</subtitle><entry><title>string null</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a3da668a3/?limit=25#dabb" rel="alternate"/><published>2020-02-27T20:10:28.915000Z</published><updated>2020-02-27T20:10:28.915000Z</updated><author><name>Avgur</name><uri>https://forge.codesys.com/u/avgur/</uri></author><id>https://forge.codesys.com8bb665992e3d16f09b798ffb5d2830a000e84631</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;StringExample:STRING:='$00$00$00' is equal to StringExample:='' (null string) and ```&lt;/p&gt;
&lt;p&gt;SysComWrite(dwHandleCom,ADR(StringExample),LEN(StringExample),0)&lt;/p&gt;
&lt;p&gt;``` send NOTHING to COM port.&lt;/p&gt;
&lt;p&gt;You have to use array of bytes instead of string.&lt;br/&gt;
For example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;arr1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;ARRAY&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="nx"&gt;..3&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;OF&lt;/span&gt; &lt;span class="nt"&gt;BYTE&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;3&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;writed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;DWORD&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="nt"&gt;writed&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;SysComWrite&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;dwHandleCom&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;ADR&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;arr1&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="nt"&gt;3&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;50&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>string null</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a3da668a3/?limit=25#fdf6" rel="alternate"/><published>2020-02-27T20:10:27.576000Z</published><updated>2020-02-27T20:10:27.576000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comf231e3b8682deb3424b5443f4e5364dbb7181137</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Stefano.Casarini&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;i'll try it&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>string null</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a3da668a3/?limit=25#632f" rel="alternate"/><published>2020-02-27T20:10:23.889000Z</published><updated>2020-02-27T20:10:23.889000Z</updated><author><name>ndzied1</name><uri>https://forge.codesys.com/u/ndzied1/</uri></author><id>https://forge.codesys.com783ea69c5350d4fc8b975968cb912339b06200d6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In string operations, the null character signifies the end of the string when displaying the string the first null tells the program the string is done. &lt;/p&gt;
&lt;p&gt;I'm not sure if the concat will work or not. &lt;/p&gt;
&lt;p&gt;I would try to send three BYTEs with a value of 0 (which is the same as the null character.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>string null</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/4a3da668a3/?limit=25#b09c" rel="alternate"/><published>2020-02-27T20:10:22.549000Z</published><updated>2020-02-27T20:10:22.549000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com3ae4c609ba2527129e13d052e17cceaf9f18370f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Stefano.Casarini&lt;/p&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In laser marker protocol i have to send to it with serial comunication three string null ($00) but when i concact three $00 the result is only one string null.&lt;/p&gt;
&lt;p&gt;Ex:&lt;/p&gt;
&lt;p&gt;StringExample:STRING:='$00$00$00';&lt;/p&gt;
&lt;p&gt;the result string before send is StringExample:='';&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Stefano&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>