LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

query interrupted timing

We had this code working with an HP VOA for a long time without any trouble.  Sometime last year I updated the computer to a more recent one (faster) and at the same time to the latest VISA/NI488 drivers.  Now we get "Query Interrupted" a few times a week, so it seems we have a timing problem somewhere. We added a USB-GPIB interface to the system (has a PCI GPIB card of some sort) and moved that instrument, and only that one, to that USB-GPIB interface, but the problem still occurs.

Any pointers in what to try next?

 

0 Kudos
Message 1 of 7
(5,077 Views)

USB will be slower than PCI slot communication. You may have to re time everything to make it more tolerant of the USB. You could also change the priority of the vi execution to give it a higher priority.

Tim
GHSP
0 Kudos
Message 2 of 7
(5,050 Views)

Guess I didn't make it clear.  The code fails on the PCI bus with the new computer, moving it to a dedicated USB was an attempt to isolate this device from the others in that bus.  And we don't do any special timing, delays or whatever, when talking to this device, so my reference to timing is to something that may happen at the NI/Windows drivers level.

0 Kudos
Message 3 of 7
(5,039 Views)

Look at the manual for the instrument.  "Query Interrupted" often occurs if a second command or query is sent to the instrument before the previous command has completed.  Different instruments handle this in various ways.  You may need to slow things down.  Try to determine what command was sent to the instrument just prior to the one which produced the error.  Delay there or some monitoring of status to assure completion of the previous command may be what you need.

 

Lynn

 

0 Kudos
Message 4 of 7
(5,034 Views)

Someone else tried inserting a one second delay (probably overkill) before the read from that device but it didn't help.  Guess I have to look at what we do with this instrument, as I didn't really write this particular driver.

 

0 Kudos
Message 5 of 7
(5,019 Views)

I am have this same problem . Was it ever resolved?

0 Kudos
Message 6 of 7
(4,553 Views)

@vortex_systems wrote:

I am have this same problem . Was it ever resolved?


As mentioned above, this is often the result of sending another command before the last one was completed.  A possible scenario is that you make a sweep that lasts 5 seconds but you try to read the data before the sweep is done.  Maybe the code worked before because your computer as so slow that it took longer than 5 seconds for it to issue the read command, but with your brand new ubercomputer it now only takes 4 seconds to get around to sending the read command.

 

Oftentimes it only takes appending a ;*OPC? to your "long command" to get it to work right.  (Look up *OPC? in your programmer's guide.  If it is supported, it will show you how to implement it.)

 

[edit]

Caveat:

If you use this method, make sure your VISA timeout is greater than the maximum length the "long command" will take to execute.

[/edit]

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 7
(4,542 Views)