LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Querey Interrupted / Unterminated with Keithley SMU

Solved!
Go to solution

I have a very complex LV program that I am trying to ammend to use it with Keithley 2602 dual-channel SMU. I am able, most of the time, to use the ammended program nicely, but many times I get two errors. 

 

The first, -410, Querey Interrupted, and happen after the send function shown in the picture below:

 QuereyInterrupted.png

 

The second, -420, Querey Unterminated, and happen after the recieve function shown in the picture below:

QueryUnterminated.png

 

Note that I do not use ready-made drivers, instead I simply write the necessary SCPI commands.

 

Can anyone tell me what's wrong?

0 Kudos
Message 1 of 10
(4,093 Views)
First, what version of LabVIEW are you using? The VISA drivers would make it much easier.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 10
(4,086 Views)

Hello,

 

I use LV 2014 Full Development System. While I can use the VISA drivers, I would prefer legacy GPIB drivers for sending and recieving the command for backward compatability, and also simply because I am modifying a program as opposed to writing a new one, and would prefer keeping the same style throughout. 

0 Kudos
Message 3 of 10
(4,062 Views)
As your search for that error should have shown, the instrument will report a query interrupted when it receives a command before a previous read has completed and there is still data in its buffet. Your brief and hard to read images do not show enough. Be sure to read enough bytes and don't attempt anything in parallel.
Message 4 of 10
(4,055 Views)

As for the first error, it occurs after the very first command sent ever. As soon as I send: smua.reset() followed by smua.source.output=1, I get the error, so it is kind of wierd.

 

For the second error...when using a GPIB read function, is it OK if I specifiy the number of bytes higher than what it might actually be?

0 Kudos
Message 5 of 10
(4,048 Views)
Solution
Accepted by topic author student_1
You probably need a delay after the reset. Not that weird.

You are supposed to specify a number higher than what you expect. The read will automatically terminate on EOI.
0 Kudos
Message 6 of 10
(4,030 Views)

I kind of found the problem. After reading the buffer (in some later step), the instrument is in a TALK state. The reset does not take it out of that. So, when I run the program for the first time, no error occure. However, when I run it afterwards, the instrument will generate an error since it is still in TALK state.

 

I tried sending GTL (Go To Local) but it seems the sytnax is not that simple. I am not able to find any SCPI command that corresponds to GTL to try if that will help...

0 Kudos
Message 7 of 10
(4,022 Views)

I just tried the GPIB EnableLocal vi but it did not take the instrument out of the TALK status (even though I did not wire the address list terminal, which supposedly should have put ALL the instruments into the local mode).

0 Kudos
Message 8 of 10
(4,020 Views)

So the problem was solved by specifying a large number of count bytes for the GPIB recieve funcition, this automatically ends the TALK state of the instrument.

0 Kudos
Message 9 of 10
(4,007 Views)

I still think VISA is the way to go.  What are you trying to be backwards compatible with?

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 10 of 10
(3,997 Views)