Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Random Timeout Error - 1073807339 using Tektronix TDS 200 1000 2000 Series Oscilloscope drivers

Solved!
Go to solution

I am trying to take waveform measurements from a Tektronix 1052B oscilloscope using LabVIEW. My program is intended to be run for hours at a time, and it works perfectly as expected for the first few hours. However, I have noticed that after a few hours there is a seemingly random chance that a VISA read or write  function block will produce error - 1073807339. After this happens once, all read or write functions also produce this same error for a while. This happens even while using the unedited driver subVIs provided by NI (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=047216EC20B66FABE0440003BA7CCD... During this time if I pause the program, I can still bring up the oscilloscope in MAX and read and write commands to it. The error only seems to happen within a VI. I have already read this page here: http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument, but none of the solutions helped. I know this is not an actual timeout issue because I have tested increasing the timeout to 30+ seconds but the error still happens instantly as soon as the read or write function block is called.

 

I would like to know why this is happening and what can be done to fix it. The subVI in question is provided. This VI is called at various points in the program to take acquire a waveform. The inititialize and close subVIs are called outside of this subVI.

0 Kudos
Message 1 of 11
(6,210 Views)

I hope you are not calling init and close of the instrument each call, because that takes a lot of time and can have a negaitve inpact after a few hours.

For the rest I did not see stuff that was harmfull in your vi without downloading the instr driver, so let's check this first.

greetings from the Netherlands
Message 2 of 11
(6,191 Views)

Thanks for the reply Albert. No I am not calling init and close every call to this subVI that I posted. Basically, there is another subVI which calls the one I posted, and another subVI above that which calls the second subVI every few seconds (with some stuff inbetween). The last one I mentioned calls the init and close subVIs provided with the driver. I'd say those are called every 5 minutes or so.

 

I'm actually glad you brought this up because I'm not really sure how often init and close should be called. I know that doing it too much does use up alot of time because I used to call them every time I took a waveform, but I actually did not have this same problem when I had my code written that way. Initialize would time out every so often but a simple while loop took care of that. I also tried calling close and init only at the beginning and end of the program, but that also led to a similar problem that I'm having now.

0 Kudos
Message 3 of 11
(6,177 Views)

I checked the vi now including the driver and found one vi and a few refs missing but that is Ok

Is it necessary to always configure all items in the scope or only when the values are changing? Just optimising.

 

The other question I have is how long are your cables and what is the bustiming of the gpib card?

NI makes this timing rather fast and this scope is not fast so put ustiming on 2 microsecons (in MAX in GPIB properties)

 

Also something else, please uncheck parallel polling, that also can  have side effects. (in fact I don't remeber if its parallel polling or auto polling at the moment.

greetings from the Netherlands
Message 4 of 11
(6,160 Views)

@Albert.Geven wrote:

I checked the vi now including the driver and found one vi and a few refs missing but that is Ok

Is it necessary to always configure all items in the scope or only when the values are changing? Just optimising..


Possibly more than optimising here.  You could be solving some issues.  In my experience with the TDS3000 series scope, I sometimes had to add 500ms of delay between commands to make sure it actually got done.  It could be that the scope is missing some requests for data because it is processing other commands.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 11
(6,158 Views)

Yeah I realized the missing subVI and refs after I posted the subVI, but I don't know that it would be possible to include those without including the entire project, which is kind of large and wouldn't be worth going through anyways. If you think running the VI will help, you can replace the stop reference and property node with a button and take out the missing SubVI altogether and it should run. As for your questions,

 

-No I only need to reconfigure when the settings change, but the issue is the settings change every time the loop repeats (volts/div is the property in question). I guess I could move some of the other configuration subVI's to another place though, I'll have to look into that later.

 

-My cable is approximately 5ft, so not very long at all. I will try changing the GPIB bustiming.

 

-Am I right in assuming that this "parallel polling" option is in MAX? I have never heard of it and I don't really know what it is either.

 

I will also try adding a delay inbetween commands if none of this other stuff works. I'd kind of like to reduce time as much as possible and adding 500ms inbetween each command could add up to quite alot of delay after a few hours.

0 Kudos
Message 6 of 11
(6,152 Views)

Indeed polling is at the same page as bustiming, gpib interface/properties

greetings from the Netherlands
0 Kudos
Message 7 of 11
(6,144 Views)

Don't know why I didn't realize this when I read your post earlier but I should mention I'm not using GPIB. I'm using a USB A to B cable to connect to the oscilloscope, so I don't know that changing GPIB settings will do anything?

0 Kudos
Message 8 of 11
(6,143 Views)

You are completely right

usb is different.

greetings from the Netherlands
0 Kudos
Message 9 of 11
(6,134 Views)
Solution
Accepted by aleclspin

Then check your powersettings. Windows can switch off usb power unexpectedly

 

greetings from the Netherlands
Message 10 of 11
(6,133 Views)