Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument does not generate SRQ with the latest 488.2 software

I have been using NI 488.2 version 1.7 till now and got it upgraded to version 2.42. I have a Agilent counter/timer which generates an SRQ on Operation complete. I use ibnotify() and wait for the SRQ to be asserted. SRQ is not generated in the latest version of GPIB software. Can someone provide me with a clue as to why this is happening????


0 Kudos
Message 1 of 9
(4,838 Views)

Hello,

Are you using an instrument driver for your Agilent device? If so, is this one you downloaded from the National Instruments Device Network?  If you so, there may be un updated version of that driver available now.  Also, what do you mean by the SRQ is not generated in the GPIB software?  Is it possible that the device is asserting it and then deasserting it once the controller responds to the service request?  In other words, how do you know SRQ is not generated? 

Let me know and I will look into the issue further.  Have a great day!

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,816 Views)
You are right. I have downloaded the instrument driver (IVI) from NI driver network. I have associated a callback function with ibnotify(). In the call back,  i check the SRQ bit of the status register. With version 1.7 the bit is set and in latest version, it is not. That is why i thought that SRQ might not have been generated at all.
0 Kudos
Message 3 of 9
(4,796 Views)
Hi,
Is it possible to post an NI-Spy capture of the process?  If needed, click here for a tutorial on how to create a good NI-Spy capture.  I can take a look at it and see if I see any problems and post back with what I find.
 
Thanks!
Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(4,776 Views)
I don't have the spy file. Will try to get it in a couple of days. But I have the source code:

I call ibnotify to call the GpibCallback() whenever there is an SRQ generated

ibnotify(nDataIdx,M_UD,RQS,GpibCallback,&saveDataIdx);

extern "C" int __stdcall GpibCallback(int ud,int ibsta,int iberr,long ibctrl, void *lpRefData)
{
    char chRsp;
    int ibStatus;
    int retVal;
    int nDataIdx = *(int *)lpRefData;

    printf("SRQ Generated");

// Handle the SRQ... I check for the status register bits here 

    if (retVal < 0)
        return 0;
    else
        return RQS;
}

ibnotify() returns success in both versions 1.7 and 2.42
The printf statement gets executed only in version 1.7...

Hope this info was useful...
0 Kudos
Message 5 of 9
(4,751 Views)
Hello again,
The code you provided is not quite enough to determine what exactly is going on in the program.  Can you provide the rest of your code, or just the NI-Spy File, so I can see the rest of the GPIB communication?  If you do provide an NI-Spy file, try to isolate the problem and only capture that section of code.  Also, ibnotify will return a success to say that it is waiting for an event.  ibnotify returning a success does not mean the SRQ is generated.
 
Please post the capture or more of your code and we will try to find out what is going on.  Have a great day!
Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 9
(4,729 Views)
I am attaching the spy file. Hope it will help realize the problem...
0 Kudos
Message 7 of 9
(4,645 Views)

Hi again,

Sorry for the long delay in getting back to you.  Version 1.7 should work, but 2.4 does not.  Make sure you are setting the ibcAUTOPOLL to 1 using ibconfig.  Doing this should fix the problem.  Try this out and let me know how it works.

Have a great day!

Chris R.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 9
(4,547 Views)
I am also having a problem with version1.7 working and version 2.4 not.  I am a novice at labview.  How do I set the ibcAUTOPOLL to 1 using ibconfig so that an error with version 2.4 won't be there.
 
Please help!
0 Kudos
Message 9 of 9
(4,324 Views)