From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-25-2007 10:44 AM
//This does not work
Device Gpib = new Device(0,1);
Gpib.Notify(GpibStatusFlags.DeviceServiceRequest, HandleSrqCallback, null);
// This does work
Board b = new Board(0);
b.Notify(GpibStatusFlags.ServiceRequest, HandleSrqCallback, null);
09-26-2007 06:17 PM
Hi Dave,
What are you trying to accomplish in your application. When you say Device.Notify() won't work, does it give you any sort of error message. Also, why are you using a Device.Notify(), whean your board call works fine. What are the events causing the callback and are you setting the timeout in the notify mask?
Thanks,
Arjun K
09-27-2007 09:07 AM
Hello Arjun,
Thanks for taking the time to respond. In a nutshell, I tend to use a Device class rather than the Board class since I don't need lower-level controll of the GPIB (the documentation recommends using Device class and not Board class unless lower level control is required) and I working with a single device. So, in order to use the Board.Device() method, I am forced to instantiate 2 objects, a Device and a Board object, and that is very inefficent. In any case, the example supplied with NI488.2 (C:\Documents and Settings\All Users\Documents\National Instruments\NI-488.2\Languages\DotNET2.0\Notify\cs) does not work for me. That is, if you run that particlar example, open a connection to a device (in my case the Keithley 2602 Source Meter), and execute a function that triggers a SRQ in the device, the Device.Noify() method does not call back as documented. The exact steps to reproduce this problem are:
1. Open VS2005.
2. Load the .sln file located at: C:\Documents and Settings\All Users\Documents\National Instruments\NI-488.2\Languages\DotNET2.0\Notify\cs
3. Place a breakpoint at the line:
testDevice.SerialPoll();
in method testDevice_Notify().
4. Run the project.
5. Send a command to the device (via the GUI in the program) to cause the device to assert the SRQ line.
This should cause the NI488.2 driver to raise an even (in a new thread) to testDevice_Notify(). This does no occur for the Device class but does for the Board class.
With respect to timeout, the default is 100ms, if increased that to 10s with no success. So, I am under the impression the Device.Notify() method is buggy.
The work around is to use the Board class in addition to the Device class, but seems that NI would fix the base driver or at lease document an issue if it is indeed in error. There are a few others in the message archives that seem to have this problem as well.
Thanks,
Dave
10-01-2007 09:30 AM
10-01-2007 09:51 AM
Andy,
Yes. I open a service request early last week, #1037667. I spoke with Samantha who has called back a couple of times but we keep missing one-in-other. I will be happy to supply additional information as this seems to be a problem that has existed for awhile (based on another post I found).
Thanks,
Dave
08-25-2008 05:08 AM
Andy,
I have this same situation, but what was the resolution?
Thanks
08-26-2008 04:51 PM
Hi Reversme,
The device in this case did not allow for direct communication using the device specific addressing examples. The GPIB instrument had to be addressed first to access the 3rd party device. This was accomplished by using the board addressing examples.
Regards,