Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

In VB6, why is the "GPIBNotify sub" (from the GPIBNotify AtiveX Ctrl) all the time called even if no Event happened? This callback function is started then stopped permanently as if its received SRQ from the GPIB Bus. Any ideas?

I'm programming in Visual Basic 6 to communicate between a computer and HP Measurement Devices (BER-Meter) with GPIB. I have already read information and code for this. My platform is W98. The NI488.2 commands can be sent without any problem between the equipements. However when I'm using the GPIBNotify ActiveX Control to use the callback function, there is a permanent starting and stop of the GpibNotify Sub. The SetupMask and RearmMask are set to RQS and the HP Device is well configured. Moreover an oscilloscope measuring the 10th line (SRQ
) of the bus didn't show any pulse on the line behalf the right one. Any Idea?
0 Kudos
Message 1 of 6
(4,464 Views)
Hello-

So, the SRQ is not detected by the oscilloscope? It must be a setting that is not correct with the instrument. Try contacting the manufacturer of the instrument for details about SRQ's. The GPIBNotify ocx will not be able to react to an SRQ if there isn't one.

Randy Solomonson
Application Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,464 Views)
ok thanks but how could you explain that the LocalIbsta shows an RQS - (LocalIbsta and RQS) is True - each time the GPIBNotify callback sub is started?
0 Kudos
Message 3 of 6
(4,464 Views)
From what I can tell, you are not clearing the RQS condition within the callback, so when you re-enable the GPIBNotify control, the callback gets called immediately. To clear the RQS condition, call ibrsp for the device within the GPIBNotify callback.

-Craig
0 Kudos
Message 4 of 6
(4,464 Views)
Thank you very much, Craig. You're right. I though the RQS condition was cleared by the ReamMask command. As the 'ibrsp' pages in the Refenrence Manual don't mentioned this particular function, I didn't consider this command. Thanks a lot.
0 Kudos
Message 5 of 6
(4,464 Views)
I must have a similar problem but i am using componentworks. Is there a function in CW that do the same as the ibrsp ??

Jørgen
0 Kudos
Message 6 of 6
(4,464 Views)