LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read visa timeout moving from point to point connection to my lab network

Solved!
Go to solution

Hello,

I'm using labview since some years but I'm not a big expert of it. To interface some instruments we have in the lab we bought a prologix gpib/ethernet adapter. Looking in the forum and checking in the manual I was able to correctly manage to communicate with the instruments adding the necessary termination characters in VISA write/read operations.

Now I have the problem that as long as I communicate point tot point with the device everything works fine and if I check with NI trace I see no retry or problems but as soon as I go in the laboratory network I start experiencing timeout errors 0xBFFF0015, "query interrupted, "query unterminated" errors, .. I tried to increase the VISA timeout,something seems to change but there are still errors. Could it be useful to add an "interframe" delay to "separate" the write/read requests? Are there others tricks?

Is there a way to do that from the VISA properties without touching all the drivers?

thanks

Michele

0 Kudos
Message 1 of 9
(2,011 Views)

The Timeout error is probably more likely due to waiting for a response and not getting one.  If I had to guess, you're not communicating properly with the devices.

 

Sharing your VIs and identifying the devices you're trying to communicate with would be a helpful start for us to help you.  Also, NI Max is your friend. Especially with GPIB.  Remember that.

 

Will also probably need your actual setup.  Who's ethernet and who's GPIB?

0 Kudos
Message 2 of 9
(1,997 Views)

The gpib/ethernet device is this one

 

http://prologix.biz/gpib-ethernet-controller.html

 

and the particular instrument is a Yokogawa WT3000 watmeter. I didn't specify them because as I wrote I suppose it's more a network problem than a driver one. As long as I connect to the prologix point to point from my computer everything works fine and no retry happens but if I go in my network I start having problems in the reading part even if I have a timeout. Here are ther .vi I modified based on the prologix examples I found.

regards

michele

 

 

 

0 Kudos
Message 3 of 9
(1,984 Views)

Without owning one myself, this is hard to assist with.  I've always wondered how something like this would show up in NI Max.  Speaking of... have you tried opening NI Max and doing a device search?  Especially with the Instrument plugged into and all setup wired up?

0 Kudos
Message 4 of 9
(1,977 Views)

Hi,

 


@DailyDose wrote:

I've always wondered how something like this would show up in NI Max.


According to its manual it translates GPIB messages into TCP messages, with some special messages (or text commands) for the GPIB specialties (like addressing upto 15 devices). It just waits on a specific TCP port, so I guess MAX will not detect (nor show) it.

 

@Michele:

Read the manual, it explains the communication scheme quite good. And learn about TCP communication with LabVIEW, there are example VIs available…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(1,970 Views)

Hello,

thank you very much for your answer. Not being a labview expert I started my design from the example available in prologix website (the last link)

 

http://prologix.biz/resources.html

 

that seems to me to use VISA in a similar way I did. Again, in point to point connection everything works fine. I start seeing problems in NI trace when I plug the device in my laboratory network.

regards

Michele

0 Kudos
Message 6 of 9
(1,944 Views)

Hi Michele,

 


@Sullacorda wrote:

Again, in point to point connection everything works fine. I start seeing problems in NI trace when I plug the device in my laboratory network.


Which problems?

How did you define that VISA Resource name in MAX?

Which IP address does the device use? Does it use the very same IP address when there is no point-to-point connection with your computer, but a lab/company network?

Is there some network security applied to (dis)allow port 1234?

 

Btw. the C++ example uses TCP sockets, which is what I would use in LabVIEW too. (Plain TCP instead of VISA…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(1,935 Views)

Hello,

thank you for your answer. Probably I explain me in the wrong way, I'm not so expert in instruments interfacing. To connect to the device I used the following

 

TCPIP::IPaddress::1234::SOCKET

 

and between point to point and network configuration I use the very same IP address and sintax. to debug the problem I used NI trace and as I wrote when I connect to the laboratory network sometimes the communication goes fine sometimes I start getting timeout errors at visa read or I get back a "Query interrupted" or "Query Uniterminated"

I will have a look at the c++ example.

thanks to point it to me

Michele

0 Kudos
Message 8 of 9
(1,930 Views)
Solution
Accepted by topic author Sullacorda

Hello,

I would like to thank you for the suggestions you gave me: I was focusing on the example in the website that was using visa but the good one was the one suggesting to use TCPIP. I implemented the sequence described here to send a command

 

http://prologix.biz/gpib-ethernet-1.2-faq.html

 

and the one in the manual to read

 

++auto 0 — Turn off read-after-write and address instrument to listen

*idn? — Query command

++read eoi — Read until EOI asserted by instrument

"HP54201A" — Response from instrument

 

and I used to this suggestion to manage the read of an unknown length response

 

https://forums.ni.com/t5/Example-Code/One-alternative-to-efficiently-handle-TCP-reads-of-unknown/ta-...

 

Now it works smoothly in my lab network.

Thanks!

Michele

 

0 Kudos
Message 9 of 9
(1,896 Views)