<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Endless Telnet Read Loop in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034317#M460576</link>
    <description>&lt;P&gt;Q1: What a clever solution.&amp;nbsp; I didn't know wiring the Error message to a Case Structure was an option, thank you!&amp;nbsp; New code attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New issues, however.&amp;nbsp; My Telnet sessions timeout and prompt a user to either Continue or Stop trying to connect (error 56).&amp;nbsp; I need to automate this process so that it always attempts a connection even when no users are present for the prompt.&amp;nbsp; Can I do this?&amp;nbsp; I tried setting the Telnet Open Connection timeout to -1, but the same situation occurs, Error 56.&amp;nbsp; Is this a system timeout as suggested in the Error message, and not a programmer-defined timeout?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2: Yes it is always the same characters ^@.&amp;nbsp; Wiring the Case Structure to the Error message does eliminate this situation, but if no Telnet connection is established I continually receive Error 56 prompts as mentioned above. &lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2009 20:56:45 GMT</pubDate>
    <dc:creator>CodeMunkee</dc:creator>
    <dc:date>2009-12-03T20:56:45Z</dc:date>
    <item>
      <title>Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1033535#M460246</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to constantly archive data to a local machine thru a Telnet connection.&amp;nbsp; I receive a small amount of streaming data (25 bytes/second) thru a static IP address.&amp;nbsp; The code that is attached is my attempt to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) initiate a Telnet connection to a static IP address&lt;/P&gt;&lt;P&gt;2) read the streaming data, write to binary file on local machine&lt;/P&gt;&lt;P&gt;3) send some pertinent info to the screen for the user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since I always want to have the VI reconnect if the Telnet connection is dropped (or times out), I attempt an "endless" loop that will &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) close the Telnet connection&lt;/P&gt;&lt;P&gt;5) reopen the Telnet connection &lt;/P&gt;&lt;P&gt;6) recommence writing data to binary file on local machine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;Q1) Did I write this correctly?&amp;nbsp; Behavior is erratic.&amp;nbsp; Sometimes works perfectly, sometimes doesn't work.&amp;nbsp; I am unclear if I need to use a sequence of events within the outer loop to properly reconnect whenever a telnet connection is lost (sequence1: open Telnet, 2: write data. 3: close session, loop back to 1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2) Often, when there appears to be no successful Telnet connection (by this, I mean no data streams to the screen which indicates the data feed will not be written to a binary file on the local machine), the numbers in the "File Size (bytes)"&amp;nbsp; continue to increase.&amp;nbsp; When I open the binary file to see what is being written I find the same character repeated instead of the data I wish to collect.&amp;nbsp; I think perhaps that the Telnet Read is reading something, but I don't know what it is, or how to control it.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks! &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2009 23:15:49 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1033535#M460246</guid>
      <dc:creator>CodeMunkee</dc:creator>
      <dc:date>2009-12-02T23:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1033585#M460261</link>
      <description>&lt;P&gt;At first glance, your code looks okay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1.&amp;nbsp; You do have a sequence established by way of the data flow of the wires.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now your inner loop only stops when someone presses that stop button.&amp;nbsp; You probably should have that inner loop stop whenever an error is detected or a stop button is pressed.&amp;nbsp; That way the program will stop the loop, close the connection and iterate on the outer loop to open the connection again and restart the inner loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would wrap the inner loop in a case structure with the error wire connected to it's selector.&amp;nbsp; That way the inner loop only executes in the even that the TCP/IP open connection executed without an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2.&amp;nbsp; I don't know why you'd be repeating a character when the connection fails.&amp;nbsp; Which character is it?&amp;nbsp; Is it always the same character or is it sometimes other characters?&amp;nbsp; I think if you do the steps I said in Q1, it would help solve that problem as the TCP/IP read won't occur when the TCP/IP open fails.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2009 00:53:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1033585#M460261</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2009-12-03T00:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034317#M460576</link>
      <description>&lt;P&gt;Q1: What a clever solution.&amp;nbsp; I didn't know wiring the Error message to a Case Structure was an option, thank you!&amp;nbsp; New code attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New issues, however.&amp;nbsp; My Telnet sessions timeout and prompt a user to either Continue or Stop trying to connect (error 56).&amp;nbsp; I need to automate this process so that it always attempts a connection even when no users are present for the prompt.&amp;nbsp; Can I do this?&amp;nbsp; I tried setting the Telnet Open Connection timeout to -1, but the same situation occurs, Error 56.&amp;nbsp; Is this a system timeout as suggested in the Error message, and not a programmer-defined timeout?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2: Yes it is always the same characters ^@.&amp;nbsp; Wiring the Case Structure to the Error message does eliminate this situation, but if no Telnet connection is established I continually receive Error 56 prompts as mentioned above. &lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2009 20:56:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034317#M460576</guid>
      <dc:creator>CodeMunkee</dc:creator>
      <dc:date>2009-12-03T20:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034332#M460582</link>
      <description>&lt;P&gt;I said stop the inner loop either when the button is pressed (as you still have) OR there is an error.&amp;nbsp; So look at the status of the error wire and OR it with the stop button before wiring into the inner loops stop terminal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why you'd be getting a stop/continue dialog for error 56 because I can't see anywhere in the code that would cause the dialog to pop up.&amp;nbsp; Drop some more indicators on your error wires, or probes.&amp;nbsp; Run with highlight execution turned on.&amp;nbsp; Do any or all of these things until you can figure out where the error is occurring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know where ^@ would be getting generated from unless somehow the telnet protocol is doing it.&amp;nbsp; What you could do is put a case structue or select statement in the middle of the string so that if there is no error, the string value goes from the read to the file.&amp;nbsp; If there is an error, an empty string goes to the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:09:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034332#M460582</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2009-12-03T21:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034353#M460591</link>
      <description>&lt;SPAN class="noindex"&gt;&lt;P&gt;I said stop the inner loop either when the
button is pressed (as you still have) OR there is an error.&amp;nbsp; So look at
the status of the error wire and OR it with the stop button before
wiring into the inner loops stop terminal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;Ok. Clear now.&lt;/FONT&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure
why you'd be getting a stop/continue dialog for error 56 because I
can't see anywhere in the code that would cause the dialog to pop up.&amp;nbsp;
Drop some more indicators on your error wires, or probes.&amp;nbsp; Run with
highlight execution turned on.&amp;nbsp; Do any or all of these things until you
can figure out where the error is occurring.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;Ok.&amp;nbsp; I can do this.&amp;nbsp; More later if necessary. &amp;nbsp;&lt;/FONT&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know
where ^@ would be getting generated from unless somehow the telnet
protocol is doing it.&amp;nbsp; What you could do is put a case structue or
select statement &lt;FONT color="#ff6600"&gt;in the middle of the string&lt;/FONT&gt; so that if there is no
error, the string value goes from the read to the file.&amp;nbsp; If there is an
error, an empty string goes to the file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;What do you mean by "in the middle"?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;Q3: Is it possible that having multiple Telnet sessions open at one time would create issues like this?&amp;nbsp; The final goal is to archive the telemetered data from 6 stations at once through the telnet port of one machine.&lt;/FONT&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;Go Beavers.&lt;/FONT&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;</description>
      <pubDate>Thu, 03 Dec 2009 21:45:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034353#M460591</guid>
      <dc:creator>CodeMunkee</dc:creator>
      <dc:date>2009-12-03T21:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034374#M460598</link>
      <description>&lt;P&gt;Like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forums.ni.com/ni/attachments/ni/170/460598/1/MBB06RawTelemetry[1]_BD.png" border="0" width="579" height="140" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wouldnt' think multiple telnet seesions would cause&amp;nbsp;a problem&amp;nbsp;as long as they were different IP addresses or ports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who are the Beavers?&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Ravens Fan on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 12-03-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 05:26 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Dec 2009 22:26:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034374#M460598</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2009-12-03T22:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034390#M460603</link>
      <description>&lt;P&gt;&lt;FONT color="#ff6600"&gt;I see.&amp;nbsp; I like that.&amp;nbsp; Thanks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="noindex"&gt;Who are the Beavers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;Oregon State; my employer, and hopefully after the big rivalry game tonight, the Pac-10 champs headed to the Rose Bowl.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff6600"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2009 22:39:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034390#M460603</guid>
      <dc:creator>CodeMunkee</dc:creator>
      <dc:date>2009-12-03T22:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Endless Telnet Read Loop</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034391#M460604</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;Who are the Beavers?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Oh the Civil War Game. Who's going to the Rose Bowl?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can't wait to see you on the Blue...&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://ni.lithium.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by GovBob on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 12-03-2009&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 04:41 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Dec 2009 22:41:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Endless-Telnet-Read-Loop/m-p/1034391#M460604</guid>
      <dc:creator>GovBob</dc:creator>
      <dc:date>2009-12-03T22:41:24Z</dc:date>
    </item>
  </channel>
</rss>

