Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error when using SR630 over GPIB-USB

I am trying to use the lab view drivers found here for the SR630 thermocouple reader.  It is connected to the computer using a Prologix GPIB-USB adapter.  Once I found in the forums I should not address the instrument as a USB device but rather using the adapter drivers, I have had slightly more success, but still get error -1073807339 0xBFFF0015 referring to a timeout error.  I am trying to change the values I have found in the block diagram but have not had any success.

 

The only alterations I currently have to the program is that I changed the initialize.vi from Old VISA Open to VISA Open to stop an error there.

 

Any tips?

 

Thanks!

0 Kudos
Message 1 of 6
(4,628 Views)

Hi nuclide,

 

What queries are you using to connect to the device? Are any queries successful? (ex. *IDn?\n)

 

This KnowledgeBase document discusses Error -1073807338: http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument

 

There are several changes you can make to try resolving this error. Verify that the Baud Rate, Data Bits, Parity, Stop Bits, and Flow Control correctly correspond to your hardware requirements. 

Please ensure that the data read by VISA is limited to the amount of data available.

You can also try adding a wait function between VISA Write and Read to avoid potential timeout error.

As well, you can increase the VISA timeout setting, if you're still seeing timeout.

 

To start, you can try connecting to your device in MAX to make sure that you can successfully communicate with the device. If communication is working, try following the steps in the document to get rid of the timeout errors.

 

I hope this helps!

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,605 Views)

After some more digging on these forums, I found that using the Prologix adapter is likely the root of my problems, as it does not show up as a GPIB interface but rather on COM3.

 

In MAX, it has sucessful *IDN?\n query and returns StanfordResearchSystems,SR630,17184,1.08\n.

When I try to Read, it gives me the same timeout hex mentioned previously.

 

When trying to run the vi, I get the following code:

 

Error -1073807339 occurred at VISA Read in SR630  Initialize.vi

Possible reason(s):

VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

Baud rate seems to be consistent, so I am trying to figure out the other items you mention - I am quite new at this so it is taking me a bit of time, but happy to learn.  As for the mount of data read, the error above does seem to be with the VISA read, so I altered the byte count there.  The default was 100, but I lowered it to 41 based on the idn query return, and then tried 8 as that is the Prologix controller setting for other programs (Labview was not explicilty listed by them).  I am not very clear on where these byte sizes are coming from - be it the instrument in which case the NI drivers should be correct, or adapter which would create problems.  No luck though, so I am trying some other things.

 

Any other specific tests I may want to try to narow down where the problem is?

 

Thanks for the help!

0 Kudos
Message 3 of 6
(4,594 Views)
Visa cannot be used with prologix. You need to edit all visa calls into prologix calls.
That is only cheaper if time is for free.
greetings from the Netherlands
0 Kudos
Message 4 of 6
(4,590 Views)

Hi nuclide,

 

This Prologix website offers more information on connecting to a Prologix GPIB-USB through LabVIEW: http://prologix.biz/gpib-usb-6.0-faq.html

Section 5, "How do I use Prologix GPIB-USB controller with LabVIEW" has more information on the commands to send, and links to the manual for more command details.

 

I hope this helps!

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(4,579 Views)

Hi,

 

Have you considered using the SR630's RS232 interface instead of GPIB?

Since the driver for your GPIB interface seems to be working as a virtual com port, you might as well do that.

I use RS232 with my SR630 and it works very well and is fast enough so you don't really need GPIB.

 

The only downside is, that the driver you mentioned is not suited for RS232, you will need to make some modifications.

I am attaching the VI snippet of the Init VI I modified for my application.

I hope it helps.

 

Best regards

Matej

/* A smart device is only as smart (stupid) as its programmer. */
0 Kudos
Message 6 of 6
(4,565 Views)