Hi dos,
TimeOut Expired Error means that your PC is expecting Information from the Instrument and it does not get the Information before the stipulated timeout.
Generally this Problem happens during a read operation. Check the following...
1. The Command before the read operation is a write Command. This Command should be valid and understood by the instrument. If not then during read operation, the instrument will not put out any data but your PC expects data and timeout error will occur.
2. The No of Bytes to read during the read operation could casue this error, especially on older instruments. Generally after the Write Command, the Read operation waits for a specified no of bytes which you specify. Now for eg if you specify 4 bytes and it recieves 4 b
ytes, No Problem. But If it recieves 2 bytes then the waiting begins for next 2 bytes and if the instrument does not sned the 2 bytes..Timeout Error.
3. In your case you have error only sometimes. I dont knw the exact case when error happens... But If I amy fish a little. During some read operation, the instrument does not put out the requisite no of Bytes. For Eg I have seen some Instrument which normally Puts Out VAC or VDC which is three bytes But If some error or Invalid Measurement happens it Puts out only V? - 2 Bytes. Now if you were looking fro 3 bytes.. Time Out Error.
One Way to Handle Such Problem is to Read One Byte at a time. Check its validty and Proceed to read the next byte, or abort etc.
See if this helps..It Might well be that the Instrument is Locking. You may need to Identify the exact cause for this.
If it is Locking, Every time before you Close your Visa Session it Might Be Helpful to use "VISA Clear" function to clear all communication channels.
Go
od Luck!!
Mache
Good Luck!
Mache