<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942</link>
    <title>MATLAB Central Newsreader - Automatically scan for instruments on bus (GPIB or TCPIP)</title>
    <description>Feed for thread: Automatically scan for instruments on bus (GPIB or TCPIP)</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 01 May 2008 22:23:03 -0400</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#429859</link>
      <author>Ankit Desai</author>
      <description>Jesse Lai &amp;lt;"jlai.[DELETETHIS]matlab"@gmail[NOSPAM].moc&amp;gt;&lt;br&gt;
wrote in message&lt;br&gt;
&amp;lt;nLqdnd10QJDNTAHanZ2dnUVZWhednZ2d@comcast.com&amp;gt;...&lt;br&gt;
&amp;gt; D. Ismay wrote:&lt;br&gt;
&amp;gt; &amp;gt; Jesse Lai wrote on 26-Jan-08 09:26 :&lt;br&gt;
&amp;gt; &amp;gt; [...]&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; Commonly on a TCPIP "bus", &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; As Mr. Robinson tried so diligently to explain to you&lt;br&gt;
earlier, TCPIP is &lt;br&gt;
&amp;gt; &amp;gt; not a 'bus', it is a communication protocol.  Also, the&lt;br&gt;
acronym GPIB &lt;br&gt;
&amp;gt; &amp;gt; means 'general purpose interface bus', so TCPIP is not&lt;br&gt;
"...similar in &lt;br&gt;
&amp;gt; &amp;gt; meaning to the GPIB bus".&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; It seems unlikely you will be able to solve your problem&lt;br&gt;
if you cannot &lt;br&gt;
&amp;gt; &amp;gt; be bothered to understand fundamental terminology.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have already found a solution to my problem, now I just&lt;br&gt;
have to &lt;br&gt;
&amp;gt; compile a DLL for the code.  I'm going to use NI's&lt;br&gt;
Measurement and &lt;br&gt;
&amp;gt; Automation Explorer as the repository for connected&lt;br&gt;
instruments just &lt;br&gt;
&amp;gt; like LabView does it.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I've found the correct .NET library calls from C# to&lt;br&gt;
obtain the list of &lt;br&gt;
&amp;gt; instruments on the various interfaces (GPIB, TCPIP,&lt;br&gt;
Serial, etc).  I'll &lt;br&gt;
&amp;gt; compile it into a DLL, then call it from MATLAB.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Perhaps there is a better way to directly call .NET&lt;br&gt;
resources from &lt;br&gt;
&amp;gt; MATLAB?  If not, I'll continue down this path.&lt;br&gt;
&lt;br&gt;
Hi Jesse,&lt;br&gt;
&lt;br&gt;
The way you get information about connected instruments is&lt;br&gt;
to use 'instrhwinfo' command that ships with the Instrument&lt;br&gt;
Control Toolbox.&lt;br&gt;
&lt;br&gt;
info = instrhwinfo('gpib');&lt;br&gt;
&lt;br&gt;
Will return structure info with all details (including&lt;br&gt;
constructor to create GPIB object). Once you have an object,&lt;br&gt;
you can pass *IDN? query and get the identification.&lt;br&gt;
&lt;br&gt;
Similar commands you can use are:&lt;br&gt;
&lt;br&gt;
infoVisa = instrhwinfo('visa','agilent');&lt;br&gt;
&lt;br&gt;
infoTCPIP = instrhwinfo('tcpip');&lt;br&gt;
&lt;br&gt;
infoUDP = instrhwinfo('udp');&lt;br&gt;
&lt;br&gt;
infoSerial = instrhwinfo('serial');&lt;br&gt;
&lt;br&gt;
help instrhwinfo should provide you with the documentation.&lt;br&gt;
&lt;br&gt;
Hope this helps,&lt;br&gt;
&lt;br&gt;
-Ankit&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 27 Jan 2008 18:47:54 -0500</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#411469</link>
      <author>Jesse Lai</author>
      <description>D. Ismay wrote:&lt;br&gt;
&amp;gt; Jesse Lai wrote on 26-Jan-08 09:26 :&lt;br&gt;
&amp;gt; [...]&lt;br&gt;
&amp;gt;&amp;gt; Commonly on a TCPIP "bus", &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; As Mr. Robinson tried so diligently to explain to you earlier, TCPIP is &lt;br&gt;
&amp;gt; not a 'bus', it is a communication protocol.  Also, the acronym GPIB &lt;br&gt;
&amp;gt; means 'general purpose interface bus', so TCPIP is not "...similar in &lt;br&gt;
&amp;gt; meaning to the GPIB bus".&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It seems unlikely you will be able to solve your problem if you cannot &lt;br&gt;
&amp;gt; be bothered to understand fundamental terminology.&lt;br&gt;
&lt;br&gt;
I have already found a solution to my problem, now I just have to &lt;br&gt;
compile a DLL for the code.  I'm going to use NI's Measurement and &lt;br&gt;
Automation Explorer as the repository for connected instruments just &lt;br&gt;
like LabView does it.&lt;br&gt;
&lt;br&gt;
I've found the correct .NET library calls from C# to obtain the list of &lt;br&gt;
instruments on the various interfaces (GPIB, TCPIP, Serial, etc).  I'll &lt;br&gt;
compile it into a DLL, then call it from MATLAB.&lt;br&gt;
&lt;br&gt;
Perhaps there is a better way to directly call .NET resources from &lt;br&gt;
MATLAB?  If not, I'll continue down this path.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 27 Jan 2008 17:02:42 -0500</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#411455</link>
      <author>D. Ismay</author>
      <description>Jesse Lai wrote on 26-Jan-08 09:26 :&lt;br&gt;
[...]&lt;br&gt;
&amp;gt; Commonly on a TCPIP "bus", &lt;br&gt;
&lt;br&gt;
As Mr. Robinson tried so diligently to explain to you earlier, TCPIP is not a 'bus', it is a communication protocol.  Also, the &lt;br&gt;
acronym GPIB means 'general purpose interface bus', so TCPIP is not "...similar in meaning to the GPIB bus".&lt;br&gt;
&lt;br&gt;
It seems unlikely you will be able to solve your problem if you cannot be bothered to understand fundamental terminology.&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 26 Jan 2008 17:26:23 -0500</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#411380</link>
      <author>Jesse Lai</author>
      <description>When I said TCPIP bus, of course its not a real bus, but it is similar &lt;br&gt;
in meaning to the GPIB bus.  Its just a way to describe instruments &lt;br&gt;
connected via LAN.&lt;br&gt;
&lt;br&gt;
If you look at TMTOOL in MATLAB, they have a scan for instruments tool &lt;br&gt;
that scans the LAN for connected instruments.  If you use some of &lt;br&gt;
Agilent's tools, there is a similar feature.  With Agilent's tools, it &lt;br&gt;
can scan the LAN in a manner of seconds, so it is quite practical and &lt;br&gt;
possible.  I was hoping someone had some examples of an efficient way to &lt;br&gt;
accomplish the task that I know is out there.&lt;br&gt;
&lt;br&gt;
Commonly on a TCPIP "bus", the last octet is used, therefore you are &lt;br&gt;
limited to really only about 254 possible addresses since the subnet &lt;br&gt;
mask limits the others.&lt;br&gt;
&lt;br&gt;
Walter Roberson wrote:&lt;br&gt;
&amp;gt; In article &amp;lt;PqGdnahZyrlBxgbanZ2dnUVZ_jWdnZ2d@comcast.com&amp;gt;,&lt;br&gt;
&amp;gt; Jesse Lai  &amp;lt;someone@somewhere.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&amp;gt; Bump&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Jesse Lai wrote:&lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; I'd like to be able to programatically scan either a GPIB or TCPIP bus &lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; to find connected instruments similar to how the TMTOOL or other similar &lt;br&gt;
&amp;gt;&amp;gt;&amp;gt; applications do (NI MAX, Agilent IO Libraries, etc).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; There is no such thing as a TCPIP bus.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The ease of finding instruments on a TCP/IP LAN (local area network)&lt;br&gt;
&amp;gt; varies with how the instruments are configured and upon whether&lt;br&gt;
&amp;gt; their operating system responds to broadcast messages. In the&lt;br&gt;
&amp;gt; general case, TCP/IP devices might have any of close to 15*2^31&lt;br&gt;
&amp;gt; different addresses that would each have to be tested individually&lt;br&gt;
&amp;gt; to detect the presense of an instrument on that address. If you are&lt;br&gt;
&amp;gt; assured that the addresses have been configured to be within a certain&lt;br&gt;
&amp;gt; range, you only have to scan that range -- quite practical if the&lt;br&gt;
&amp;gt; range is only 254 addresses, not so practical if the range is&lt;br&gt;
&amp;gt; 65534 address, impractical for anything larger.&lt;br&gt;
&amp;gt; &lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 26 Jan 2008 16:20:39 -0500</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#411376</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;PqGdnahZyrlBxgbanZ2dnUVZ_jWdnZ2d@comcast.com&amp;gt;,&lt;br&gt;
Jesse Lai  &amp;lt;someone@somewhere.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;Bump&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;Jesse Lai wrote:&lt;br&gt;
&amp;gt;&amp;gt; I'd like to be able to programatically scan either a GPIB or TCPIP bus &lt;br&gt;
&amp;gt;&amp;gt; to find connected instruments similar to how the TMTOOL or other similar &lt;br&gt;
&amp;gt;&amp;gt; applications do (NI MAX, Agilent IO Libraries, etc).&lt;br&gt;
&lt;br&gt;
There is no such thing as a TCPIP bus.&lt;br&gt;
&lt;br&gt;
The ease of finding instruments on a TCP/IP LAN (local area network)&lt;br&gt;
varies with how the instruments are configured and upon whether&lt;br&gt;
their operating system responds to broadcast messages. In the&lt;br&gt;
general case, TCP/IP devices might have any of close to 15*2^31&lt;br&gt;
different addresses that would each have to be tested individually&lt;br&gt;
to detect the presense of an instrument on that address. If you are&lt;br&gt;
assured that the addresses have been configured to be within a certain&lt;br&gt;
range, you only have to scan that range -- quite practical if the&lt;br&gt;
range is only 254 addresses, not so practical if the range is&lt;br&gt;
65534 address, impractical for anything larger.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;"History is a pile of debris"                     -- Laurie Anderson&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 26 Jan 2008 16:14:29 -0500</pubDate>
      <title>Re: Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#411374</link>
      <author>Jesse Lai</author>
      <description>Bump&lt;br&gt;
&lt;br&gt;
Jesse Lai wrote:&lt;br&gt;
&amp;gt; I'd like to be able to programatically scan either a GPIB or TCPIP bus &lt;br&gt;
&amp;gt; to find connected instruments similar to how the TMTOOL or other similar &lt;br&gt;
&amp;gt; applications do (NI MAX, Agilent IO Libraries, etc).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I do not even know where to begin this process though as the instrument &lt;br&gt;
&amp;gt; control toolbox by itself only allows connections to known instruments. &lt;br&gt;
&amp;gt;   Has someone out there done this before that could provide some &lt;br&gt;
&amp;gt; insight  into the best way to accomplish what I want to do?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'd like to be able to find the attached instruments on the bus, run the &lt;br&gt;
&amp;gt;  *IDN? query to find the identifier and then report the results.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Jesse Lai&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 12 Jan 2008 15:47:00 -0500</pubDate>
      <title>Automatically scan for instruments on bus (GPIB or TCPIP)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/161942#409140</link>
      <author>Jesse Lai</author>
      <description>I'd like to be able to programatically scan either a GPIB or TCPIP bus &lt;br&gt;
to find connected instruments similar to how the TMTOOL or other similar &lt;br&gt;
applications do (NI MAX, Agilent IO Libraries, etc).&lt;br&gt;
&lt;br&gt;
I do not even know where to begin this process though as the instrument &lt;br&gt;
control toolbox by itself only allows connections to known instruments. &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Has someone out there done this before that could provide some &lt;br&gt;
insight  into the best way to accomplish what I want to do?&lt;br&gt;
&lt;br&gt;
I'd like to be able to find the attached instruments on the bus, run the &lt;br&gt;
&amp;nbsp;&amp;nbsp;*IDN? query to find the identifier and then report the results.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Jesse Lai&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
