02-11-2007 11:05 AM
Attached the LangInt.dll we use and NISpy logs
02-12-2007 03:36 PM
02-19-2007 06:50 AM
This issue happens regardless if NI SPY is up or not.
The symptom is that deviceis sending SRQ but ibnotify is not triggering the calback function (this happens when GPIB timeout is configured to
30 secs and SRQ is send after 120 secs, this happens sometimes...)
At this case I can use ibrsp to read the SRQ value, so it's does sent by device.
I am using langint.dll to work with GPIB driver ver # 1.0.1532.22842
gpib-32.dll rev 2.4.0.3055
02-20-2007 03:48 PM - edited 02-20-2007 03:48 PM
Message Edited by Meghan R on 02-20-2007 03:49 PM
02-26-2007 04:39 AM
As far as I understand from docs, ibnotify will execute HandleSRQ time after time whil NotifyMask (the reply from HandleSRQ function is not 0)
It's working fine, and it's do handling 120s delays for SRQ arrival, but sometimes failed.
Below is the implementation.
Thanks.
definition of mask is:
public const int NotifyMask = 0x4800;
call to the ibnotify function is:
status = li.ibnotify(Dev, NotifyMask, _handleSRQ, o);
HandleSRQ code is:
private int HandleSRQ(int ud, int callback_ibsta, int callback_iberr, int callback_ibcntl, object RefData){
OTLogger.Instance.Debug(string.Format("GPIB.HandleSRQ() started: ud = {0}, status = 0x{1:X}, error = 0x{2:X}, cntl = 0x{3:X}, RefData = {4}",ud, callback_ibsta, callback_iberr, callback_ibcntl, RefData));
if ((callback_ibsta & c.ERR) == c.ERR){
throw new OTException(OTErrors.GPIBHandleSRQFailed, string.Format("GPIB.HandleSRQ(): failed to handle SRQ stat {0} err {1}", li.ibsta.ToString(), li.iberr.ToString()));}
if ((callback_ibsta & c.RQS) == c.RQS){
readSRQ();
}
OTLogger.Instance.Debug("GPIB.HandleSRQ() ended"); //ThreadPool.QueueUserWorkItem(_listenForDevice); return NotifyMask;}
02-27-2007 01:12 PM
03-05-2007 01:05 AM
No, I didn't
Will try to test it with autopolling disabled
Igal