If WaitSRQ is waiting in a thread, every time an ibwrt() is made in another thread, WaitSRQ is triggered indicating that SRQ is raised (when it isn't).
In the accompanying program I monitor the SRQ in a thread and do several writes to the instrument.
The first sets up the instrument to raise SRQ when a syntax error occurs. This write triggers WaitSRQ (but when I do a serial poll of the device it responds that it did not raise SRQ).
The second command sends a purposely bad command in order to generate an SRQ. It does this and the serial poll indicates such.
The third command is a legitimate command. This triggers and SRQ when it should not. A serial poll of the instrument again shows that it did not raise SRQ.
Michael
Write to instrument: CLES;ESE32;SRE32;
WaitSRQ triggers due to SRQ - SRQ line is : 1
SRQ not generated by HP8753
Write to instrument: XXXX;
WaitSRQ triggers due to SRQ - SRQ line is : 1
SRQ generated by HP8753
Write to instrument: CLES;
WaitSRQ triggers due to SRQ - SRQ line is : 1
SRQ not generated by HP8753
Important! This happens with the Agilent 82357B device I have. It does not occur with the NI USB-HS device.
A tentative fix has been posted to the svn: https://sourceforge.net/p/linux-gpib/code/2071/
Please let me know if it works for you.
A similar problem on the NI-PCI card has also been addressed.
/d
Thanks Dave, that fixes the problem! thanks for the quick response.