07-09-2008 10:16 AM
07-10-2008 04:16 AM
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,
07-10-2008 04:44 AM
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.
07-10-2008 04:52 AM
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,
07-10-2008 05:01 AM
You can use the function SetBreakOnLibraryErrors() to disable the error pop-up. See the CVI help for details.
JR
07-10-2008 11:32 AM
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.