<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/44a0239b23/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/44a0239b23/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/44a0239b23/</id><updated>2020-02-27T22:33:59.727000Z</updated><subtitle>Recent posts to Use of RS232 port</subtitle><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#4504" rel="alternate"/><published>2020-02-27T22:33:59.727000Z</published><updated>2020-02-27T22:33:59.727000Z</updated><author><name>k2teknik</name><uri>https://forge.codesys.com/u/k2teknik/</uri></author><id>https://forge.codesys.comee985303fc201c65c748b282f08f5c8faf5a09cf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I try this code:&lt;/p&gt;
&lt;p&gt;WHILE sz &amp;lt; 6 DO&lt;br/&gt;
    sz:=SysComRead(com_num,ADR(rcvBUF),1024,0);&lt;br/&gt;
END_WHILE&lt;/p&gt;
&lt;p&gt;But it just make my PLC reboot, just like any other loop I try to kill some time with.&lt;/p&gt;
&lt;p&gt;If I put in a breakpoint and start the running of the PLC after 5 seconds of halt at the breakpoint, all is fine and I get my data in the rcvBUF as expected.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#00bb" rel="alternate"/><published>2020-02-27T22:33:58.150000Z</published><updated>2020-02-27T22:33:58.150000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comdb07a9c685857567955759d9c5a9451bb4513efe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;test until you see some characters in the buffer, if received enough then go to a sub program to evaluate  the received answer.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#447d" rel="alternate"/><published>2020-02-27T22:33:53.736000Z</published><updated>2020-02-27T22:33:53.736000Z</updated><author><name>k2teknik</name><uri>https://forge.codesys.com/u/k2teknik/</uri></author><id>https://forge.codesys.com1282b78b91c08f18d5345c006f4320bc9b26c2c6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the fast answer.&lt;/p&gt;
&lt;p&gt;I have these two line of code that send a command to a GSM modem, and then get the answer:```&lt;/p&gt;
&lt;p&gt;SysComWrite(com_num,ADR(snd_str),LEN(snd_str),0);&lt;br/&gt;
sz:=SysComRead(com_num,ADR(rcvBUF),1024,0);&lt;/p&gt;
&lt;p&gt;```It works well when I single step the code, but the PLC is much faster that my GSM modem so when running the code it never get the answer from the modem.&lt;br/&gt;
I had try to make a 5 seconds delay with a While-do loop, but it make my PLC reboot. Is there en more nice way to make a waiting function?&lt;/p&gt;
&lt;p&gt;In the help there is an example of "traffic light" with a wait thing, but it is in IL language and I am not ready for this yet.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#e139" rel="alternate"/><published>2020-02-27T22:33:52.167000Z</published><updated>2020-02-27T22:33:52.167000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com6118f25f236039d004ed080a8d795a3a30ddc918</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;join is concat&lt;br/&gt;
and no need to empty an array, however you can overwrite it with spaces&lt;br/&gt;
another way is use oscat library.&lt;br/&gt;
.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#1a57" rel="alternate"/><published>2020-02-27T22:33:47.783000Z</published><updated>2020-02-27T22:33:47.783000Z</updated><author><name>k2teknik</name><uri>https://forge.codesys.com/u/k2teknik/</uri></author><id>https://forge.codesys.com7bdc5f02bb5d7f54d62159ddcfb0a7cfa9c87c46</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
sorry to bad in russian, to read it.&lt;br/&gt;
Me too.&lt;br/&gt;
But anyway they claim that you can use the RS232 port, and with some question to there support, some reading on there forum I manage to use the port, but first I had to use the right cable, then add the port in the "PLC configuration", and then use the right COM port number.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But that just gives me some new challenge:&lt;br/&gt;
1.: How to reset/empty an array?, with a string I can just use &lt;span style="color: #0000FF;"&gt;MyString := ''&lt;/span&gt;, but I can't make it work for an array.&lt;/p&gt;
&lt;p&gt;2.: How to join two strings? In VB6 I would use something like &lt;span style="color: #0040FF;"&gt;"NewString = FirstString + NextString"&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#1a25" rel="alternate"/><published>2020-02-27T22:33:46.230000Z</published><updated>2020-02-27T22:33:46.230000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com0a1831c17f6ba3c2e914d4031269f6e99b8b513d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;sorry to bad in russian, to read it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#1beb" rel="alternate"/><published>2020-02-27T22:33:41.857000Z</published><updated>2020-02-27T22:33:41.857000Z</updated><author><name>k2teknik</name><uri>https://forge.codesys.com/u/k2teknik/</uri></author><id>https://forge.codesys.com5a9fc8d90cac85a0b466195f49c513490e907f40</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
what PLC is used?&lt;br/&gt;
as codesys is running on &amp;gt; 100 types.&lt;br/&gt;
OWEN PLC 150 &lt;br/&gt;
&lt;a class="" href="http://www.owen.ru/catalog/programmiruemij_logicheskij_kontroller_oven_plk_150/opisanie" rel="nofollow"&gt;http://www.owen.ru/catalog/programmirue ... 0/opisanie&lt;/a&gt; m &lt;/p&gt;
&lt;/blockquote&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#dec4" rel="alternate"/><published>2020-02-27T22:33:40.143000Z</published><updated>2020-02-27T22:33:40.143000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comd3cb3d29adea7cbf1b86edc023a70e9715174e1a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;what PLC is used?&lt;br/&gt;
as codesys is running on &amp;gt; 100 types.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#f31d" rel="alternate"/><published>2020-02-27T22:33:35.833000Z</published><updated>2020-02-27T22:33:35.833000Z</updated><author><name>k2teknik</name><uri>https://forge.codesys.com/u/k2teknik/</uri></author><id>https://forge.codesys.com46aa063c1718219a56d68c8db9720b657250f65d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;shooter hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
is it an extra card or do you want the programming interface to talk (not possible)&lt;br/&gt;
It is the port present on my PLC, and yes it is the programming interface too.&lt;br/&gt;
So there is no chance to use that programming interface to something else at run time (run time for my PLC code that is)?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;BTW I am about to make my PLC send SMS via a GSM modem.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Use of RS232 port</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/44a0239b23/?limit=25#8cb0" rel="alternate"/><published>2020-02-27T22:33:34.262000Z</published><updated>2020-02-27T22:33:34.262000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com1f46d7a4e9f6100fb76cfb04b6a259bad31a66fa</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;is it an extra card or do you want the programming interface to talk (not possible)&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>