I am trying to implement an interrupt service routine in LabView to respond to a request from an HP 8560E spectrum analyzer. Basically I just want the LabView program to wait for an End of Sweep flag after a specific number of video averages before reading the trace data. I found the following code written in HP Basic in the HP user manual which does a similar operation except I want to wait on a End of Sweep (4) and not a Command Complete (16) flag.
10 OUTPUT 718;"IP;SNGLS;CF 300MHZ;SP 20MHZ;TS;"
20 OUTPUT 718;"VAVG 10;RQS 16;"
30 ON INTR 7 GOTO Srq
40 ENABLE INTR 7;2
50 OUTPUT 718;"TS;"
60 Idle: GOTO Idle
70 Srq: Sbyte=SPOLL(718)
80 PRINT Sbyte
90 PRINT "VIDEO AVERAGING IS COMPLETE"
100 OUTPUT 718;"RQS 0;"
I have no problem writing the commands to the instrument using a LabView VISA write, however I'm not sure how to implement the part that instructs LabView to wait on the interrupt before proceeding. I have no need for parallel operations so I just want it to wait. But I can't seem to get LabVIEW to acknowledge receiving an interrupt. I looked at the SRQ Event Handling VI, however I do not believe my instrument responds to ESE and SRE queries.
What communication protocal are you using with the analyzer?