Hi, I have started on a small project to operate a HP spectrum analyser, and am trying to use vxi11 and python. So far things are going well - I can control the Analyser settings and get data back and generate a plot. I want to do this continually so I'm wondering now how to get an interrupt back from the Analyser . For example at the end of a sweep. I dont see any examples of the interrupt channel( or maybe I don't know what I'm looking for!). Any advice on how to deal with interrupts? I did see one example where it looks like they are using polling of the status byte to determine an event. Is this more or less efficient? Any help appreciated .. I'm no guru on Python or vxi11!
I looked into the vxi-11 interrupt issue a long time ago. The protocol to handle them is a bit tricky, and since I didn't need them at the time, I didn't write the handler. I usually use SRQ instead, and just poll the SRQ bit.
I also have used it with an old HP network analyzer. I use the OPC protocol to handle completion. the hp_8753e_network_analyzer.py module has sample code for this, in the opc_wait function. It might even work unmodified, since you are also using an HP instrument. The OPC protocol is fairly lightweight, and just uses a status byte bit, so you can poll pretty quickly. Does this do what you need?
Sorry Marcus, I didn't see your reply to just now. That code for the HP network analyser is probably where I got the idea for polling the status byte in the first place. Anyhow, I've successfully managed to use the mask/poll status_byte method and it seems to work quit well, so no need for the interrupt channel. I'm 50% way through getting GUI done (using wxPython) so things are looking good. Thanks for the help.