11-10-2020 07:29 AM
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
Solved! Go to Solution.
11-10-2020 08:22 AM - edited 11-10-2020 08:23 AM
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?
11-10-2020 08:54 AM
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
11-10-2020 09:07 AM
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?
11-10-2020 09:55 AM - edited 11-10-2020 09:56 AM
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…
11-11-2020 01:01 AM
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
11-11-2020 03:29 AM - edited 11-11-2020 03:30 AM
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…)
11-11-2020 03:54 AM
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
11-19-2020 10:20 AM
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
Now it works smoothly in my lab network.
Thanks!
Michele