From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Visa sometimes loses connection with device connected by tcpip.

Hi,

Now I develope a program that must comunicate with oscilloscope by Ethernet.
Developing program - LabView 2011 SP1, OS - Windows 7, oscilloscope - Tektronix TDS 3054B.
In options in LabView 2011 in Enviroment category "Automatically close VISA sessions" is set on.

 

While running, the VI sometimes works properly, but sometimes shows the error of VISA, and I couldn't understand what's happend.
After the error I must reboot the oscilloscope to ensure that Open VISA test panel won't show errors.

 

So I tried to test only one SubVI, I wrote. I added open and close VISA functions. And it worked strange too - for the first time when I run it,
it runs without errors and for the second time (or after 15th time) it shows errors in VISA Write or Read Functions.

Errors shown in VISA test panel and in my program are same:
-VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
-VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

 

Sometimes I don't need to reboot oscilloscope - VI shows me an error only once and further can work properly until after 10 times running it again shows error
and I must reboot the oscilloscope. Restarting of my Windows doesn't help.

Sometimes program VISA in program shows error while Test panel doesn't shows errors.

I think that I use correct combination of comand strings that sending to oscilloscope, because sometimes VI can work properly more than 10 times.

 

But may be it happened because I have been sending comands with adjusts that already was in oscilloscope (for example, 

chose CH1 for Trigger Sourse when it already was CH1)?

May be I don't know something about functioning of VISA language.
May be there are some problems in VISA because of differences between serial and tcpip protocols?

 

Attachments to letter:
- Adjust Comands (SubVI) 3.vi
- MyInit_SubVI.vi

In main VI I used MyInit_SubVI.vi - modified "tktds3K Initialize.vi" from NI drivers for oscilloscopes TDS3000 series. I change it because need
a little different Init options of oscilloscope than did the VI originally. Mostly errors arise after MyInit_SubVI, but sometimes during the run of it.

 

I'm quite new LV so may be doing some stupid error in programming...Smiley Frustrated

thanks much

Download All
0 Kudos
Message 1 of 3
(2,613 Views)

And, whant to note, VISA test panel sometimes shows no error in oscilloscope when physically it connected by Ethernet and has RS-232 mode chosen in System I/O menu... I think it's not normal Smiley Surprised

 

0 Kudos
Message 2 of 3
(2,601 Views)

Everything with VISA was okay, the problems were in tds3000 oscilloscope comands - ACQ,STOPAfter SEQ must be before ACQ,STATE ON comand...

0 Kudos
Message 3 of 3
(2,586 Views)