07-07-2010 08:15 AM
Hi everybody!
I have been looking all over the place to find a solution to my problem, however no success so far. Hopefully, someone can enlighten me concerning the following:
I'm using the GPIB-USB adaptor to run various instruments. So far I used the GPIB VIs to control them, but now I wanted to try to use the original drivers for the Ke2000 and they don't work properly.
I have boiled it down to the fact, that when trying to use the VISA "Wait on event" to check for a SRQ it simply does not detect it. Neither on the Ke2000 nor on a HP 3245A where I manually altered the drivers to create the same situation. The SRQ lights up in the frontpanel display and if I use a Serial Poll to read the STB Byte 6 is active. Why on earth does the "Wait on Event" not detect it?
I'm probably missing some configuration for the Bus itself, but I can't figure out, what it is. (btw, Autopolling is active in the NI MAX, if that has anything to do with it...)
I would greatly appreciate any input,
Thx Nils
07-07-2010 09:08 AM
alright, it shouldn't be the last thing to try... restarting the system.... darn it.
Seems to be working alright now. Hopefully it stays that way.
Sorry to have bothered anyone.
07-08-2010 05:50 AM
Alright, it's back again.
Basically right after I executed my program and then tried to work with the "Wait on event". Moreover, now a restart does not fix the problem anymore.
This is what the program looks like and the "Wait on event" does not seem to detect the SRQ since it times out. The command is a simple "RQS?" which invokes a reaction from the instrument.
I am under the impression that the initial SRQ from the instrument does not arrive in the event queue. It lights up in the display, but it's not sensed. Is there any global setting which would cause this? I've been playing around with some settings for the GPIB-controller (like sre, dma, sic..), don't know whether that could be the reason.
Thank's a lot for help,
Nils
07-08-2010 06:58 AM
Hi Nils
Try it with disabling the autopolling function for the GPIB device:
Why is Automatic Serial Polling Unexpectedly Enabled in NI-VISA?
Hope that helps.
Regards
Beat
07-08-2010 12:20 PM
Hi Beat
Thank you for the idea. Unfortunately it does not fix the problem.
Concerning the attached VI, I can't really see the significant difference to my approach.
I also updated LV (to be able to open the VI 😉 without noticeable effect.
For now I am using a work-around like this:
Since, as I stated before, the SRQ and MAV are issued, this basically does what the "Wait on event" should do.
Nonetheless it's not really satisfying to know that there is a (major?) problem in the program.
Please don't hesitate to post other guesses.
Regards
Nils
07-09-2010 02:21 AM
Hey Nils
I was looking for some issues but I didn´t find something.
But I think with your workaround it works fine ?
There is a problem with the GPIB and SRQ events but it should be solved with disabling the autopolling.
I found also this document with some interesting informations:
Can I Set Up an SRQ Interrupt Service Routine with the GPIB Driver?
Kind regards
Beat
07-09-2010 11:12 AM
Hi Beat,
So far the workaround is doing well, but I still haven't figured out what's at the core of the problem.
I read through your document and found it an interesting lead, however I still have to learn more about the low-level commands.
I'll be trying to fix the issue in the near future and will report on any progress. So far further ideas are always welcome.
Thanks for participating.
Regards
Nils
07-09-2010 03:22 PM
SPOLL is kind of a beast to use. The original intent of the SRQ line was as a way to prioritize service requests. It actually was implemented in such a manner that the lowest addressed device asserting SRQ is the ONLY serial poll detectable service request.
e.g. device 0 at Address GPIB:0:1 is asserting SRQ and Wait for SRQ is called looking at device x on GPIB:0:29. Wait for SRQ will return only when the TMO clock expires. Theoretically, the Wait COULD return if device 0 released SRQ and device x asserted SRQ however, the VISA API is not going to let you Clear the device 0 SRQ (by a *RST, *CLS, or STB?) since the Wait will block other calls to the bus.
Essentially - to use SPOLL you MUST honor service requests of all lower addressed devices first.
04-02-2012 12:12 PM
I am experieincing the same issue.
Did you ever find the root cause of this problem?