<?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: Serial Comm Search in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2789#M2139</link>
    <description>On 7 Jan 2000 15:36:14 -0600, "Chris Anderson" &lt;CANDERSON&gt;&lt;BR /&gt;wrote:&lt;BR /&gt;&amp;gt;I would like to produce a VI that blindly searches available serial comm ports&lt;BR /&gt;&amp;gt;until it finds the port to which our custom, hardware instrument is attached.&lt;BR /&gt;&amp;gt; Unfortunately when I write a serial command to a port with no instrument&lt;BR /&gt;&amp;gt;attached, the software does not time out (using old serial comm vi's since&lt;BR /&gt;&amp;gt;I don't really understand visa).  Any Suggestions?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You might try something like this:&lt;BR /&gt;for each of the serial ports you want to try&lt;BR /&gt;  Initialize your serial port to _not_ use handshaking.&lt;BR /&gt;  Send the command you need to get the instrument to identify itself&lt;BR /&gt;  do&lt;BR /&gt;    check number of characters in serial buffer&lt;BR /&gt;      (Bytes At Serial Port.vi)&lt;BR /&gt;    read number of characters from serial buffe&lt;BR /&gt;r&lt;BR /&gt;      (Serial Port Read.vi) and attach it to a "variable"&lt;BR /&gt;  while not timeout or no identification&lt;BR /&gt;end for&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;Rolf &lt;BR /&gt;&lt;/CANDERSON&gt;</description>
    <pubDate>Mon, 10 Jan 2000 12:59:04 GMT</pubDate>
    <dc:creator>Rolf Østvik</dc:creator>
    <dc:date>2000-01-10T12:59:04Z</dc:date>
    <item>
      <title>Serial Comm Search</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2786#M2136</link>
      <description>I would like to produce a VI that blindly searches available serial comm ports&lt;BR /&gt;until it finds the port to which our custom, hardware instrument is attached.&lt;BR /&gt; Unfortunately when I write a serial command to a port with no instrument&lt;BR /&gt;attached, the software does not time out (using old serial comm vi's since&lt;BR /&gt;I don't really understand visa).  Any Suggestions? &lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jan 2000 21:36:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2786#M2136</guid>
      <dc:creator>Eyecheck</dc:creator>
      <dc:date>2000-01-07T21:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Comm Search</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2787#M2137</link>
      <description>Chris Anderson wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I would like to produce a VI that blindly searches available serial comm ports&lt;BR /&gt;&amp;gt; until it finds the port to which our custom, hardware instrument is attached.&lt;BR /&gt;&amp;gt;  Unfortunately when I write a serial command to a port with no instrument&lt;BR /&gt;&amp;gt; attached, the software does not time out (using old serial comm vi's since&lt;BR /&gt;&amp;gt; I don't really understand visa).  Any Suggestions?&lt;BR /&gt;&lt;BR /&gt;I would really suggest that you look at VISA. There is a function that does&lt;BR /&gt;exactly what you wish ( Find VISA Resources or similar).&lt;BR /&gt;You dont need to know VISA to use it, simply drop it on a diagram&lt;BR /&gt;and wire an indicator. It will return an array of stings listing any&lt;BR /&gt;serial, GPIB, or VXI devices it can find.&lt;BR /&gt;You can limit it to look for only serial devices.&lt;BR /&gt;    Kevin Kent &lt;BR /&gt;</description>
      <pubDate>Fri, 07 Jan 2000 22:52:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2787#M2137</guid>
      <dc:creator>Kevin_work</dc:creator>
      <dc:date>2000-01-07T22:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Comm Search</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2788#M2138</link>
      <description>Chris Anderson wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I would like to produce a VI that blindly searches available serial comm ports&lt;BR /&gt;&amp;gt; until it finds the port to which our custom, hardware instrument is attached.&lt;BR /&gt;&amp;gt;  Unfortunately when I write a serial command to a port with no instrument&lt;BR /&gt;&amp;gt; attached, the software does not time out (using old serial comm vi's since&lt;BR /&gt;&amp;gt; I don't really understand visa).  Any Suggestions?&lt;BR /&gt;&lt;BR /&gt;I think you can write to the serial port anyway, regardless of what is attached to&lt;BR /&gt;it.&lt;BR /&gt;The problem should be if there is a response. You can set up a simple loop that&lt;BR /&gt;acts as a timeout:&lt;BR /&gt;&lt;BR /&gt;while(not timeout)&lt;BR /&gt; keep on calling the "Bytes at serial port vi"&lt;BR /&gt;if any pending, read them and check if the response is correct.&lt;BR /&gt;else keep on looping.&lt;BR /&gt;&lt;BR /&gt;(sorry for the ugly pseudo code)&lt;BR /&gt;&lt;BR /&gt;The timeou&lt;BR /&gt;t can be implemented with a difference block: at each loop iteration you&lt;BR /&gt;compare the initial ms timer value with the current one. if that diff exceeds a&lt;BR /&gt;given trehshold you exit the loop and consider the device not being on that port.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Wolf-Dieter Wall &lt;WDWALL&gt; &lt;WDWALL2&gt; &lt;BR /&gt;&lt;/WDWALL2&gt;&lt;/WDWALL&gt;</description>
      <pubDate>Sat, 08 Jan 2000 08:03:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2788#M2138</guid>
      <dc:creator>Wolf-Dieter Wall</dc:creator>
      <dc:date>2000-01-08T08:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Comm Search</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2789#M2139</link>
      <description>On 7 Jan 2000 15:36:14 -0600, "Chris Anderson" &lt;CANDERSON&gt;&lt;BR /&gt;wrote:&lt;BR /&gt;&amp;gt;I would like to produce a VI that blindly searches available serial comm ports&lt;BR /&gt;&amp;gt;until it finds the port to which our custom, hardware instrument is attached.&lt;BR /&gt;&amp;gt; Unfortunately when I write a serial command to a port with no instrument&lt;BR /&gt;&amp;gt;attached, the software does not time out (using old serial comm vi's since&lt;BR /&gt;&amp;gt;I don't really understand visa).  Any Suggestions?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You might try something like this:&lt;BR /&gt;for each of the serial ports you want to try&lt;BR /&gt;  Initialize your serial port to _not_ use handshaking.&lt;BR /&gt;  Send the command you need to get the instrument to identify itself&lt;BR /&gt;  do&lt;BR /&gt;    check number of characters in serial buffer&lt;BR /&gt;      (Bytes At Serial Port.vi)&lt;BR /&gt;    read number of characters from serial buffe&lt;BR /&gt;r&lt;BR /&gt;      (Serial Port Read.vi) and attach it to a "variable"&lt;BR /&gt;  while not timeout or no identification&lt;BR /&gt;end for&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;Rolf &lt;BR /&gt;&lt;/CANDERSON&gt;</description>
      <pubDate>Mon, 10 Jan 2000 12:59:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Serial-Comm-Search/m-p/2789#M2139</guid>
      <dc:creator>Rolf Østvik</dc:creator>
      <dc:date>2000-01-10T12:59:04Z</dc:date>
    </item>
  </channel>
</rss>

