David Hary
2008-08-12 01:40:06 UTC
I have an application that runs well on my development system but consistently fails at the user site giving out timeout errors even though the user experiences no time outs. Indeed, VISA returns a success status. Yet, it raises timeout exceptions such as in this segment from my trace log:
DefaultSource, Verbose, 8, Setting timeout to 30000, "CONNECT", 2008-08-12 00:47:21Z, 2077539389311920DefaultSource, Information, 0, GPIB0::26::INSTR termination character set to 10, "CONNECT", 2008-08-12 00:47:21Z, 2077539630487436DefaultSource, Verbose, 8, Checking GPIB0::26::INSTR message available, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539636730532DefaultSource, Verbose, 8, Flushing read GPIB0::26::INSTR buffer, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539673800216DefaultSource, Error, 2, Flushing read GPIB0::26::INSTR buffer failed: NationalInstruments.VisaNS.VisaException: Timeout expired before operation completed. VISA error code -1073807339 (0xBFFF0015), ErrorTimeout at NationalInstruments.VisaNS.Internal.ErrorChecker.CheckStatusAndThrow(Int32 status, VisaHandle visaObject) at NationalInstruments.VisaNS.Session.CheckStatusAndThrow(Int32 status) at NationalInstruments.VisaNS.Session.BufferedReaderService.NationalInstruments.VisaNS.Internal.IBufferedReader.Scan(String scanSpecifier, Int32& count, StringBuilder receiver) at NationalInstruments.VisaNS.MessageBasedSessionReader.CommonReadString(String scanString, Int32 count) at NationalInstruments.VisaNS.MessageBasedSessionReader.ReadLine() at isr.Visa.MessageBasedReader.ReadLine() at isr.Visa.GpibSession.ReadLine() at isr.Visa.Ieee4882.Instrument.ReadString() at isr.Visa.Ieee4882.Instrument._flushRead(). VISA status=Success, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539717184364DefaultSource, Verbose, 8, Flushing GPIB0::26::INSTR write buffers, "FW, CONNECT", 2008-08-12 00:47:21Z, 2077539723797900DefaultSource, Verbose, 8, , "WRITE, FW, CONNECT", 2008-08-12 00:47:21Z, 2077539731761192DefaultSource, Error, 2, Flushing GPIB0::26::INSTR write buffers failed: NationalInstruments.VisaNS.VisaException: Timeout expired before operation completed. VISA error code -1073807339 (0xBFFF0015), ErrorTimeout at NationalInstruments.VisaNS.Internal.ErrorChecker.CheckStatusAndThrow(Int32 status, VisaHandle visaObject) at NationalInstruments.VisaNS.Session.CheckStatusAndThrow(Int32 status) at NationalInstruments.VisaNS.Session.BufferedWriterService.NationalInstruments.VisaNS.Internal.IBufferedWriter.WriteLine() at NationalInstruments.VisaNS.MessageBasedSessionWriter.WriteLine() at isr.Visa.MessageBasedWriter.WriteLine(String queryCommand) at isr.Visa.GpibSession.WriteLine(String queryCommand) at isr.Visa.Ieee4882.Instrument.WriteLine(String value) at isr.Tsp.TspVisaIO.WriteLine(String value) at isr.Visa.Ieee4882.Instrument._flushWrite(). VISA status=Success, "WRITE, FW, CONNECT", 2008-08-12 00:47:21Z, 2077539742753448
The first exception above is raised on the session Message Based Reader ReadLine() command.
Note that I check for message available before issuing read.
Note also that VISA NS returns a status code of success: VISA status=Success (this is what I log above)
The second exception is raised after I try to clear the write buffers using the Message Based Writer command: WriteLine()
Here too VISA reports success.
Note also that the above segment executes in less than one second whereas the time out is set to 30 seconds.
The user runs VISA 4.3 runtime. I am using NationaInstruments.VisaNS 8.1.20.222.
I would be most grateful for some clues as to how to fu
DefaultSource, Verbose, 8, Setting timeout to 30000, "CONNECT", 2008-08-12 00:47:21Z, 2077539389311920DefaultSource, Information, 0, GPIB0::26::INSTR termination character set to 10, "CONNECT", 2008-08-12 00:47:21Z, 2077539630487436DefaultSource, Verbose, 8, Checking GPIB0::26::INSTR message available, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539636730532DefaultSource, Verbose, 8, Flushing read GPIB0::26::INSTR buffer, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539673800216DefaultSource, Error, 2, Flushing read GPIB0::26::INSTR buffer failed: NationalInstruments.VisaNS.VisaException: Timeout expired before operation completed. VISA error code -1073807339 (0xBFFF0015), ErrorTimeout at NationalInstruments.VisaNS.Internal.ErrorChecker.CheckStatusAndThrow(Int32 status, VisaHandle visaObject) at NationalInstruments.VisaNS.Session.CheckStatusAndThrow(Int32 status) at NationalInstruments.VisaNS.Session.BufferedReaderService.NationalInstruments.VisaNS.Internal.IBufferedReader.Scan(String scanSpecifier, Int32& count, StringBuilder receiver) at NationalInstruments.VisaNS.MessageBasedSessionReader.CommonReadString(String scanString, Int32 count) at NationalInstruments.VisaNS.MessageBasedSessionReader.ReadLine() at isr.Visa.MessageBasedReader.ReadLine() at isr.Visa.GpibSession.ReadLine() at isr.Visa.Ieee4882.Instrument.ReadString() at isr.Visa.Ieee4882.Instrument._flushRead(). VISA status=Success, "FR, CONNECT", 2008-08-12 00:47:21Z, 2077539717184364DefaultSource, Verbose, 8, Flushing GPIB0::26::INSTR write buffers, "FW, CONNECT", 2008-08-12 00:47:21Z, 2077539723797900DefaultSource, Verbose, 8, , "WRITE, FW, CONNECT", 2008-08-12 00:47:21Z, 2077539731761192DefaultSource, Error, 2, Flushing GPIB0::26::INSTR write buffers failed: NationalInstruments.VisaNS.VisaException: Timeout expired before operation completed. VISA error code -1073807339 (0xBFFF0015), ErrorTimeout at NationalInstruments.VisaNS.Internal.ErrorChecker.CheckStatusAndThrow(Int32 status, VisaHandle visaObject) at NationalInstruments.VisaNS.Session.CheckStatusAndThrow(Int32 status) at NationalInstruments.VisaNS.Session.BufferedWriterService.NationalInstruments.VisaNS.Internal.IBufferedWriter.WriteLine() at NationalInstruments.VisaNS.MessageBasedSessionWriter.WriteLine() at isr.Visa.MessageBasedWriter.WriteLine(String queryCommand) at isr.Visa.GpibSession.WriteLine(String queryCommand) at isr.Visa.Ieee4882.Instrument.WriteLine(String value) at isr.Tsp.TspVisaIO.WriteLine(String value) at isr.Visa.Ieee4882.Instrument._flushWrite(). VISA status=Success, "WRITE, FW, CONNECT", 2008-08-12 00:47:21Z, 2077539742753448
The first exception above is raised on the session Message Based Reader ReadLine() command.
Note that I check for message available before issuing read.
Note also that VISA NS returns a status code of success: VISA status=Success (this is what I log above)
The second exception is raised after I try to clear the write buffers using the Message Based Writer command: WriteLine()
Here too VISA reports success.
Note also that the above segment executes in less than one second whereas the time out is set to 30 seconds.
The user runs VISA 4.3 runtime. I am using NationaInstruments.VisaNS 8.1.20.222.
I would be most grateful for some clues as to how to fu