Home Forums HTBasic Forum Why does HTBasic keep issuing iblines, ibwait & ThreadIbsta?

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9455
    Tony Goodhew
    Participant

      Hey All,

      I’m wondering if someone can explain to me why, when I have no code running, I see a repeated loop of (and I may not have captured the first one in the loop but it does repeat) in the NI I/O Trace utility:

      iblines(GPIB0, -1)
      ibwait(GPIB0, 0x0000)
      ThreadIbsta()

      It doesn’t seem to have any impact on my setup but I wanted to look at trace data for a device problem and this made it a bit more trouble than when I just use the NI VISA test Panel.

      Would love to know why and if this can be changed or configured.

      Thanks,

      TonyG

      #9456
      Tony Goodhew
      Participant

        BTW Here is the XML export from NI I/O Trace utility of one pass through the loop:

        <call type=”NI-488.2″ description=”iblines” process=”0x000017F4″ thread=”0x00006D90″>
        <status type=”success” code=”0x00000164″ name=”CMPL REM CIC LACS”>Operation completed successfully.</status>
        <input time=”13:19:37.6771″>
        <parameter name=”Board Name”>GPIB0</parameter>
        <parameter name=”ud”>31000</parameter>
        <parameter name=”&controlLines”>0x5036FBE4</parameter>
        </input>
        <output time=”13:19:37.6771″>
        <parameter name=”iberr”>0</parameter>
        <parameter name=”ibcntl”>0 (0x0)</parameter>
        <parameter name=”controlLines”>-1</parameter>
        </output>
        </call>
        <call type=”NI-488.2″ description=”ibwait” process=”0x000017F4″ thread=”0x00006D90″>
        <status type=”success” code=”0x00000164″ name=”CMPL REM CIC LACS”>Operation completed successfully.</status>
        <input time=”13:19:37.6771″>
        <parameter name=”Brd/Dev Name”>GPIB0</parameter>
        <parameter name=”ud”>31000</parameter>
        <parameter name=”mask”>0x0000</parameter>
        </input>
        <output time=”13:19:37.6781″>
        <parameter name=”iberr”>0</parameter>
        <parameter name=”ibcntl”>0 (0x0)</parameter>
        </output>
        </call>
        <call type=”NI-488.2″ description=”ThreadIbsta” process=”0x000017F4″ thread=”0x00006D90″>
        <status type=”success” code=”0x00000164″ name=”CMPL REM CIC LACS”>Operation completed successfully.</status>
        <input time=”13:19:37.6781″ />
        <output time=”13:19:37.6781″>
        <parameter name=”iberr”>0</parameter>
        <parameter name=”ibcntl”>0 (0x0)</parameter>
        <parameter name=”Thread ibsta”>0x0164</parameter>
        </output>
        </call>

        #9457
        PatB
        Moderator

          Hi Tony,

          I assume you are using the GPIBNI driver? The way that driver works, once it is loaded it starts an interrupt thread that regularly checks in every 100 milliseconds. When it check’s in, it calls iblines, ibwait, and Threadibsta. Unloading the driver will stop the interrupt thread, but then will also stop communication from HTBasic, so is probably not the work around you are looking for.

          If this is causing problems by filling up your logs, you could try using the new VISA driver that is included in our latest release of HTBasic. The new VISA driver does things more natively and shouldn’t have the same problems.

          Thanks,

          Pat

          #9458
          Tony Goodhew
          Participant

            Thanks, Pat – I was using the GPIBNI driver – Switching to the VISA driver does make it work as the VISA Test Panel does – Thank you again.

            Is there any documentation on best practice seeing that I need to load a VISA driver for each GPIB address? Or am I missing something?

            What I mean is that if I have devices say 7 & 8 on GPIB0 (ISC 7) then I need to have 2 VISA drivers with ISC 11 (GPIB0 7) & 12 (GPIB0 8) – So instead of using OUTPUT 707 or OUTPUT 708, I now use OUTPUT 1100 or OUTPUT 1200.

            Any insight?

            Thanks, TonyG

            #9459
            PatB
            Moderator

              Glad the Visa driver worked better for you. Yes, the implementation of the Visa driver is geared more towards loading each device separately as you mentioned. Depending on what you use for the Visa address, I believe you could get away with just loading the interface and then continuing to use the secondary address. I would like to try this myself though to ensure that it is supported. I will give it a try when I get a chance and let you know.

              #9462
              Tony Goodhew
              Participant

                Hey Pat – Just checking back in, I’ve never used the secondary address for a GPIB device so I’m hoping you might also be able to share an example that shows how to do it.

                Look forward to hearing from you and thanks for looking into this.

                TonyG

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.
              Scroll to Top
              HTB icon

              Please Sign In