<?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: gpib command order in LabWindows/CVI</title>
    <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/243286#M17543</link>
    <description>&lt;P&gt;Recall, there are two controllers, each with a gpib card embedded on it.&amp;nbsp; Each of these cards is connected to the same signal generator.&lt;/P&gt;
&lt;P&gt;The main controller does the following, then calls the secondary controller to do some things then returns and does a few more things&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Main&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;gpibBoard = ibfind ("gpib0");&lt;/P&gt;
&lt;P&gt;ibrsc (gpibBoard, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ATS requests system control */&lt;BR /&gt;ibsic (gpibBoard);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send interface clear&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;ibsre (gpibBoard, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* set remote enable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;ibonl (gpibBoard, 0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* go to standby */&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;2nd Ctrl&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsic (rx_msg.test_data.gpib_data.address);&amp;nbsp; // controller 2 addr passed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device = ibdev (0, rx_msg.test_data.gpib_data.address, 0, T10s, 1, 0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibwrt (device, rx_msg.test_data.gpib_data.gpib_string,&amp;nbsp; // sig-gen primary addr passed in&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strlen(rx_msg.test_data.gpib_data.gpib_string));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device = ibdev (0, rx_msg.test_data.gpib_data.address, 0, T10s, 1, 0); // sig-gen primary addr passed in&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibonl (device, 1);&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Main&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; Take our GPIB out of standby and tell it to become the active controller.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpibBoard = ibfind ("gpib0");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibrsc (gpibBoard, 1); /* Get back GPIB System Control */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsic (gpibBoard);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsre (gpibBoard, 1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) It doesn't seem like enough is being done at the second gpib controller to prepare it for communication&lt;/P&gt;
&lt;P&gt;2) The code reports an error right away during the Send Interface Clear (attempt) by the second controller&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2005 14:48:29 GMT</pubDate>
    <dc:creator>mrbean</dc:creator>
    <dc:date>2005-07-19T14:48:29Z</dc:date>
    <item>
      <title>gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/241798#M17477</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;I inherited some code and I'm trying to figure out a GPIB Error I'm getting.&amp;nbsp; I'm using LabWindows/CVI and TestStand.&amp;nbsp; I have an Automated Test Stand (ATS) that's connected to a Unit Under Test known as the TSC.&amp;nbsp; The ATS is running the TestStand gui and is trying to test the TSC.&amp;nbsp; Both the ATS and&amp;nbsp;TSC have the same controller that has an embedded GPIB card on it.&amp;nbsp; Through GPIB cables, both the ATS and&amp;nbsp;TSC are connected to a signal generator and a spectrum analyzer.&amp;nbsp; Not having written this code, I'm trying to figure out why I'm getting an error saying that&amp;nbsp;TSC has sent a "bad GPIB Send Interface Clear command status -99".&amp;nbsp; Hopefully from the code snippets&amp;nbsp;attached you might see something wrong.&amp;nbsp; I also have a number of questions at the bottom of the attachment.&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color="#ff6666"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Jul 2005 20:56:27 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/241798#M17477</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-14T20:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242248#M17504</link>
      <description>&lt;P&gt;Hi mrbean:&lt;/P&gt;
&lt;P&gt;First, I can't tell why you are getting the error based upon the code you sent.&amp;nbsp; There may be a discrepancy in the board addressing which you can check in MAX (discussed later in this post.)&amp;nbsp; I assume the error is coming from "ibsic (gpibBoard);&amp;nbsp;&amp;nbsp; /*send interface clear */ line, but since the previous two lines work I can't see why this one does not.&amp;nbsp; I've listed answers to the questions in your document below.&amp;nbsp; Hopefully they will help you debug your application, if not, just post again and we'll go from there.&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; "gpib0" is the proper way to address the board with ibfind.&lt;BR /&gt;&lt;BR /&gt;2.&amp;nbsp; The ATS (we'll call it the controller from here on out) does not technically know it is "gpib0".&amp;nbsp; If it is the only board in the system then it is likely this will be correct however, if there are more GPIB interfaces in the computer it could be "gpib1", "gpib2", etc.&amp;nbsp; You can check what number is assigned to the board in Measurment and Automation Explorer (MAX).&amp;nbsp; Also, if&amp;nbsp;you right click on the board and select properties you can change the number associated.&lt;BR /&gt;&lt;BR /&gt;3.&amp;amp;4.&amp;nbsp; The ibfind command was used for the controller to make it the controller in charge.&amp;nbsp; It is a board level command which is why it addresses "gpib0" (the board).&amp;nbsp; ibdev is configuring the device, it is a device level command.&amp;nbsp; In this case the signal generator is the device or instrument that the GPIB0 is going to control.&amp;nbsp; The first parameter in the command is the board index, which in the case of being connected to GPIB0 will be 0 and the second command is the primary address which is specific to the device.&amp;nbsp; If you bring up the function panel for ibdev you can see the viable options for these two parameters as well as the others in the command.&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp; I'm not really sure where&amp;nbsp;this is declared but again you can bring up the function panel and right click to get information on the command.&lt;/P&gt;
&lt;P&gt;6.&amp;nbsp; If you are using Windows XP you should go to Start-&amp;gt;All Programs-&amp;gt;National Instruments-&amp;gt;NI-488.2-&amp;gt;NI-488.2 Help to learn about these functions and possibly give you some idea of what order you are looking for.&amp;nbsp; Also, check the manual for the specific instrument you are trying to communicate with.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Emilie S.&lt;BR /&gt;Applications Engineer&lt;BR /&gt;National Instruments&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2005 19:47:06 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242248#M17504</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-07-15T19:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242268#M17505</link>
      <description>&lt;P&gt;Emilie S.&lt;/P&gt;
&lt;P&gt;One thing you said, &lt;/P&gt;
&lt;P&gt;"The ibfind command was used for the controller to make it the controller in charge.&amp;nbsp; It is a board level command which is why it addresses "gpib0" (the board).&amp;nbsp; ibdev is configuring the device, it is a device level command.&amp;nbsp; In this case the signal generator is the device or instrument that the GPIB0 is going to control."&lt;/P&gt;
&lt;DIV&gt;However, if you'll notice in the code I sent, every (TCP-IP) message to the TSC ultimately goes to the TSS_GPIB() function.&amp;nbsp; And, the first statement in the routine is the call to ibdev.&amp;nbsp; In most cases, it's called with the primary address set to the Signal Generator address.&amp;nbsp; However, in a couple of other cases, the TSS_GPIB() routine is called to setup the GPIB card in the TSC, and ibdev is called in those situations also.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Should it not be called when controlling the TSC's GPIB card.&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Jul 2005 20:38:51 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242268#M17505</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-15T20:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242934#M17534</link>
      <description>&lt;P&gt;Hi mrbean:&lt;/P&gt;
&lt;P&gt;I'm not really sure I understand what you mean by TSC or how everything fits into your system.&amp;nbsp; But in general you will have one controller in charge which I believe is ATS in your case.&amp;nbsp; From here everything connected to it is a device that should be configured with ibdev.&amp;nbsp; I'm unclear as to the relationship between the signal generator and TSC or the rest of the system for that matter, but to answer your question, yes it seems necessary to call ibdev for TSC.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Emilie S.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2005 22:25:54 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/242934#M17534</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-07-18T22:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/243286#M17543</link>
      <description>&lt;P&gt;Recall, there are two controllers, each with a gpib card embedded on it.&amp;nbsp; Each of these cards is connected to the same signal generator.&lt;/P&gt;
&lt;P&gt;The main controller does the following, then calls the secondary controller to do some things then returns and does a few more things&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Main&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;gpibBoard = ibfind ("gpib0");&lt;/P&gt;
&lt;P&gt;ibrsc (gpibBoard, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ATS requests system control */&lt;BR /&gt;ibsic (gpibBoard);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send interface clear&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;ibsre (gpibBoard, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* set remote enable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;ibonl (gpibBoard, 0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* go to standby */&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;2nd Ctrl&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsic (rx_msg.test_data.gpib_data.address);&amp;nbsp; // controller 2 addr passed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device = ibdev (0, rx_msg.test_data.gpib_data.address, 0, T10s, 1, 0);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibwrt (device, rx_msg.test_data.gpib_data.gpib_string,&amp;nbsp; // sig-gen primary addr passed in&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strlen(rx_msg.test_data.gpib_data.gpib_string));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; device = ibdev (0, rx_msg.test_data.gpib_data.address, 0, T10s, 1, 0); // sig-gen primary addr passed in&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibonl (device, 1);&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Main&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; Take our GPIB out of standby and tell it to become the active controller.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gpibBoard = ibfind ("gpib0");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibrsc (gpibBoard, 1); /* Get back GPIB System Control */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsic (gpibBoard);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ibsre (gpibBoard, 1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) It doesn't seem like enough is being done at the second gpib controller to prepare it for communication&lt;/P&gt;
&lt;P&gt;2) The code reports an error right away during the Send Interface Clear (attempt) by the second controller&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2005 14:48:29 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/243286#M17543</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-19T14:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/244066#M17583</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi mrbean:&lt;/P&gt;
&lt;P&gt;ibsic is a board level command, therefore you have to pass the board descriptor and not the device descriptor.&amp;nbsp; Please have a look at the 488.2 Help manual for help with this and all other functions.&amp;nbsp; It looks as if you are actually passing the primary address of the device, which is the device descriptor which would likely cause this function to error out.&amp;nbsp; ibsic should allow the board addressed to take control, as noted in the 488.2 Help.&amp;nbsp; In the event that you need to use the device descriptor you can use ibpct which is&amp;nbsp;a device level command to&amp;nbsp;&lt;A href="http://digital.ni.com/public.nsf/websearch/873BE8238AD6B0BA86256B1B004DC203?OpenDocument" target="_blank"&gt;Pass GPIB Control&lt;/A&gt;.&amp;nbsp; From the code after ibsic it looks like you are still using gpib0, and the primary address "rx_msg.test_data.gpib_data.address" is the same for ibsic which should be the second controller and the other commands which I assume are referencing the signal generator.&amp;nbsp; I can't tell how the second controller is being addressed at all or for that matter what it is doing in the code.
&lt;/P&gt;&lt;P&gt;Have a look at the knowledgebase I linked above and possibly try the ibpct command and let me know how it goes.
&lt;/P&gt;&lt;P&gt;Regards,
&lt;/P&gt;&lt;P&gt;Emilie S.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2005 18:59:54 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/244066#M17583</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-07-20T18:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/244526#M17606</link>
      <description>&lt;P&gt;To borrow the terminology used in the knowledgebase article you sent me, I'll call my main controller the SC (System Controller). If (from the SC) I use the ibpct (int ud)&amp;nbsp;command to talk to the second controller (to make it the CIC) requires the ud (Device Descriptor) of the second controller.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This is where I'm a little confused.&amp;nbsp; At the SG, one of the first things I do is a gpibBoard = ibfind ("gpib0");&amp;nbsp; However, at the second controller, I never do a similar thing.&amp;nbsp; How does SC know what device descriptor to pass into the call to ibpct.&amp;nbsp; Currently, I've just been passing in a zero (0).&amp;nbsp; Somehow the two controllers have to have a different Device Descriptor, right?&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jul 2005 15:46:37 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/244526#M17606</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-21T15:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/245281#M17628</link>
      <description>&lt;DIV&gt;Hi mrbean:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ibdev returns the device descriptor.&amp;nbsp; Therefore, my initial thought is that you should try commenting out the ibsic command, then call ibdev followed by ibpct.&amp;nbsp; It will look something like this:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;second controller = ibdev (board index, primary address of second controller...&lt;/DIV&gt;
&lt;DIV&gt;ibpct (second controller);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Let me know if this answers your question and helps out.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Emilie S.&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Jul 2005 19:46:06 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/245281#M17628</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-07-22T19:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/246347#M17668</link>
      <description>&lt;DIV&gt;I read in the NI-488.2 reference manual, in the IBFIND section, "New applications should use ibdev instead of ibfind.&amp;nbsp; ibdev is more flexible, easier to use, and frees the application from unnecessary device name requirements."&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I'm wondering how to&amp;nbsp; determine/assign a board index for each of the controllers.&amp;nbsp; Is this value important, or is the key difference the primary address?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;first&amp;nbsp;controller&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ibdev (board index, primary address of&amp;nbsp;first controller...&lt;/DIV&gt;second controller = ibdev (board index, primary address of second controller...&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Jul 2005 14:20:21 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/246347#M17668</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-26T14:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/247312#M17707</link>
      <description>&lt;DIV&gt;You won't have two different board indices.&amp;nbsp; For the first controller you should send ibfind (board index) which you can find in MAX but it is likely 0 if it is the only board in the computer.&amp;nbsp; At this point this can be the only controller, the second controller is just an instrument with a primary address, this is where you should use ibdev.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ibfind (gpib0);&lt;/DIV&gt;
&lt;DIV&gt;ibdev (gpib0, primary address of "second controller"...&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Ultimately, the answer to your question though, is you can view and change the board index in MAX under devices and interfaces.&amp;nbsp; The board index is important and necessary to communicate with any instrument.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Emilie S.&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Jul 2005 23:19:06 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/247312#M17707</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-07-27T23:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/247756#M17735</link>
      <description>So, when I use ibdev in the 2nd controller (since it's not a controller, I should call it device A), the gpib0 you show in your previous e-mail is really the board index of the main (only) controller.&amp;nbsp; Is this right?
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Jul 2005 18:06:01 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/247756#M17735</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-28T18:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/248222#M17757</link>
      <description>Does MAX&amp;nbsp;return the board index and primary address of the known devices?&amp;nbsp; At Device A (second controller), since it's like a Signal Generator, is there a runtime method of determining the board index that should be used?
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Jul 2005 16:08:58 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/248222#M17757</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-07-29T16:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249001#M17801</link>
      <description>&lt;P&gt;I finally got on the target and ran MAX.&amp;nbsp; On the main controller, I see this&lt;/P&gt;
&lt;P&gt;Devices and Interfaces&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIB0 (PCI-GPIB)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Instrument0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Instrument1&lt;/P&gt;
&lt;DIV&gt;The properties for GPIB0 show that "System Controller" has a check mark.&amp;nbsp; It also shows its GPIB Interface Number = 0.&amp;nbsp; Instrument0 primary address=18 and Instrument1 primary address=19&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;On the second controller, however, I see this&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P&gt;Devices and Interfaces&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIB0 (PCI-GPIB)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Instrument0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Instrument1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Instrument2&lt;/P&gt;
&lt;P&gt;GPIB Interface Number=0, Intrument0 Primary Address=0, Instrument1 primary address=18, Instrument2 primary address=19&lt;/P&gt;
&lt;P&gt;When I highlight Instument0, under the Identification field, it says "Instrument did not respond to the *idn? Query"&lt;/P&gt;
&lt;P&gt;I'm a little confused in that it seems that the GPIB in the second box is not only referred to as GPIB0, but also as intrument0.&amp;nbsp; Also, does it matter that in the main controller, the devices I want to talk to are referred to as Instrument0 and Instrument1, but in the second controller, the same devices (since they're both connected to the same devices) are referred to as Instrument1 and Instrument2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Aug 2005 20:48:30 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249001#M17801</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-08-01T20:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249065#M17806</link>
      <description>&lt;P&gt;Hi mrbean:&lt;/P&gt;
&lt;P&gt;Is this "second controller" another computer?&amp;nbsp; Do you have two computers with PCI-GPIB boards in them?&amp;nbsp; Is there any program running on the second controller or only the first one?&amp;nbsp; In MAX, on the second controller try changing the board index to 1 and try scan for instruments again on the first controller.&amp;nbsp; Does that bring up the second controller as another instrument?&lt;/P&gt;
&lt;P&gt;Emilie S.&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Aug 2005 00:25:33 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249065#M17806</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-08-02T00:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249279#M17816</link>
      <description>&lt;P&gt;Yes, the second 'controller' is another computer with its own gpib card.&amp;nbsp; The computers communicate via tcp/ip and both gpib cards are connected to the same signal generator (and spectrum analyzer - but he's not involved in the tests having problems).&amp;nbsp; The second computer receives commands from the first, telling it to ibdev, ibclr, ibsic, ibwrt, etc.&amp;nbsp; The test is supposed to ensure the second computer's gpib works.&amp;nbsp; This is done by the first computer telling the second to tune the signal generator to a certain freq, then the first is supposed to read the signal generator and ensure the desired freq was indeed set.&lt;/P&gt;
&lt;DIV&gt;Are you saying that the first computer's gpib should be able to see the second computer's gpib through max, and that it should show up as another instrument?&amp;nbsp; When I see instrument0 at the second computer, is that a reference to the gpib on the first computer, or to itself?&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Aug 2005 13:01:22 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249279#M17816</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-08-02T13:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249645#M17839</link>
      <description>&lt;P&gt;Hi mrbean:&lt;/P&gt;
&lt;P&gt;Yes the first controller should see the second.&amp;nbsp; One thing in your post confused me though, it said the two computers are connected via tcp/ip, but they are communicating through GPIB right?&amp;nbsp; I believe this must be the case since you are sending GPIB commands from the first computer to the second.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To regress a little though, you should only have the system controller box checked in&amp;nbsp;the first controller.&amp;nbsp; Then for the second controller you should change its primary address to be something other than 0.&amp;nbsp; Then, when you scan for instruments in the first computer, it will find this other computer at the primary address you set.&amp;nbsp; (You can change the primary address by right clicking on the board in MAX and selecting properties.)&amp;nbsp; You will then only refer to it by its primary address, the board index doesn't matter.&amp;nbsp; So, if you give it PAD 1 then you would pass control as stated in a previous post&amp;nbsp;by doing something like this:&lt;/P&gt;
&lt;P&gt;second controller = ibdev (0, 1, 0....&lt;BR /&gt;ibpct (second controller)&lt;/P&gt;
&lt;P&gt;At this point the second computer could run whatever code it has on it, then pass control back to the first computer.&lt;/P&gt;
&lt;P&gt;Hope this helps out.&lt;/P&gt;
&lt;P&gt;Emilie&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Aug 2005 20:58:52 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249645#M17839</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-08-02T20:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249899#M17848</link>
      <description>&lt;P&gt;In one of your e-mail you said "... At this point this can be the only controller, the second controller is just an instrument with a primary address, this is where you should use ibdev.".&amp;nbsp; With what you know now, is this still the case.&lt;/P&gt;
&lt;P&gt;Also, do you have any explanation for why I see two intruments under controller one and three instruments under controller two?&lt;/P&gt;
&lt;P&gt;Finally, in MAX, when (for the second computer) I select properties and select GPIB0, GPIB1, etc, it gives me a drop down that shows DEV1 to DEV31.&amp;nbsp; I'm assuming this is the primary address of the second computer's gpib card.&amp;nbsp; Thoughts?&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Aug 2005 13:38:58 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/249899#M17848</guid>
      <dc:creator>mrbean</dc:creator>
      <dc:date>2005-08-03T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: gpib command order</title>
      <link>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/250202#M17854</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff"&gt;In one of your e-mail you said "... At this point this can be the only controller, the second controller is just an instrument with a primary address, this is where you should use ibdev.".&amp;nbsp; With what you know now, is this still the case.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Yes this is the case.&amp;nbsp; You can only have one controller at a time.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3300ff"&gt;Also, do you have any explanation for why I see two intruments under controller one and three instruments under controller two?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;It could be that you have the system controller box checked on both computers, is this true?&amp;nbsp; I would expect you to see three instruments from the system controller.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3300ff"&gt;Finally, in MAX, when (for the second computer) I select properties and select GPIB0, GPIB1, etc, it gives me a drop down that shows DEV1 to DEV31.&amp;nbsp; I'm assuming this is the primary address of the second computer's gpib card.&amp;nbsp; Thoughts?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;First, you don't need to change GPIB0 to GPIB1, I was mistaken about that.&amp;nbsp; However you do need to change the primary address of the second controller to not be 0.&amp;nbsp; When you right click on the board and select properties, there should be a pull down menu labeled primary address.&amp;nbsp; This is where you should change the PAD.&amp;nbsp; What version of NI-488.2 are you using?&lt;/P&gt;
&lt;P&gt;Emilie&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Aug 2005 21:35:21 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabWindows-CVI/gpib-command-order/m-p/250202#M17854</guid>
      <dc:creator>Emilie S.</dc:creator>
      <dc:date>2005-08-03T21:35:21Z</dc:date>
    </item>
  </channel>
</rss>

