LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Labwindows VISA timeout popup,

hi,
 
I have got a GPIB instrument to control with Visa.
This instrument does an operation that takes a variable amount of time. While the instrument is working, if I send a command "ID" for instance, the viRead Times out.
I want to know when the instrument has finished.
I wanted to create a loop after the command that sends the comand "ID" until the instrument responds. It seems to work but I have a problem in debug mode: everytime a timeout occurs,
a popup appears saying that a Non fatal Error occured: timeout.
How can I remove this popup?
or, is there a better way to determine when my instrument has finished its operation?
 
thank you.
0 Kudos
Message 1 of 6
(3,759 Views)

Hi philou92,

When you send the command "ID" do you mean "*IDN?" ? In this case the timeout error that occurs is normal, your instrument doesn't understand it and doesn't send you anything. Did you try to search for instruments in Measurement and Automation Explorer ?

Regards,

0 Kudos
Message 2 of 6
(3,745 Views)

Hi philou92,

When you send the command "ID" do you mean "*IDN?" ? In this case the timeout error that occurs is normal, your instrument doesn't understand it and doesn't send you anything. Did you try to search for instruments in Measurement and Automation Explorer ?

Regards,

 

The "ID" command works fine and is understood by the instrument, it is one of the set of command available for this instrument.

I have no problem to drive my instrument in Measurement and Automation Explorer, everything is ok

I could have used any of the command, instead of "ID",  the goal is to have the timeout, this timeout should not be considered as an error.

algo:

-------------------

- Send the command that blocks the instrument during a given random amount of time . viWrite(theTimeConsumingCommand)

- start loop:

do

{

    Send viWrite("ID") then viRead()-----> the viRead command returns the Timeout error after let says 5 seconds, and it is what I want in this algo.    

}

while (viWrite("ID") then viRead() does not timeout anymore)

----------------

The problem is that the Visa layer in Labwindows creates a popup with a non fatal error timeout in debug mode.

 I want to remove this popup, or, find another solution to know when my instrument has finished the time consumming operation.

 

0 Kudos
Message 3 of 6
(3,738 Views)

Hi again,

Did you try using the event status register commands like "*OPC?" which means "OPeration Complete?" this could be a solution instead of waiting for a timeout. It looks like you need synchronization purposes. I advise you to have a look at the following link "Using Service Requests in your GPIB application" .

Regards,

 

0 Kudos
Message 4 of 6
(3,735 Views)

You can use the function SetBreakOnLibraryErrors() to disable the error pop-up. See the CVI help for details.

JR

0 Kudos
Message 5 of 6
(3,732 Views)

My GPIB instrument does not seem to support OPC type command.

Anyway I use SetBreakOnLibraryErrors(0) in my algo and it works fine.

 

Thank you for your answers.

0 Kudos
Message 6 of 6
(3,710 Views)