Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing connectivity issues on the SR510 over GPIB

Unfortunately there isn't any reason the GPIB board would not send the first byte. You can try to install NI-488.2 version 2.3 available here. If you have a GPIB+ board in another computer you could analyze the GPIB bus and verify that the character is being sent. Or you could try communicating with another instrument if you have one.

I looked at the instrument driver though, and it would be very easy to modify it send an extra character as a quick fix.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 11 of 32
(4,891 Views)
I don't have another machine that I can connect this up to right now, and Stanford Research Systems seems not to have any idea why a byte would be thrown out, so I'm going to try modifying the driver. Thanks for all your help.
0 Kudos
Message 12 of 32
(4,885 Views)
I encountered the same problem communicating over GPIB with the SR510.  All commands (excluding the reset 'z' command) would cause both the ACT and ERR lights to flash.  As you found including any character before the command fixes this problem.  I have no clue how this bug arises but was very happy to find this thread and the quick, if somewhat strange, workaround.
0 Kudos
Message 13 of 32
(4,755 Views)

The same thing happends to me. I think its really strange that the SR510 instrument driver can be certified. One wonders how this certification procedure works. My luck is that someone else had this problem before me and that the workaround procedure is there.

By the way. My old computer and GPIB card communicates perfectly with my SR510. Strange isn't it.

0 Kudos
Message 14 of 32
(4,712 Views)
This is far from official, but I recall that the SR510 has been giving people fits for 10+ years. Something to do with the GPIB not being well-implemented. I think it anticipates the timing instead of using the proper 3-wire handshake for GPIB so bytes tend to overwrite the previous one unless you send them very slow. On old computers or slower hardware this wasn't much of a problem, but as computers got faster the bytes came faster and invalidated their assumption.

Why can the instrument driver be validated? Because it sends the correct data across the bus based on the user manual of the device. It was probably written a long time ago as well when computers were slow and the commands worked correctly.

Almost all IEEE 488.1 instruments that I have worked with implement the 3-wire handshake protocol correctly. This is one of the few that I think are not correct.

Solutions involve trying to slow down the bus. You can try a few things:
1) Increase the T1 delay from 500ns to 2us. This will slow down each by by about 1500ns. Not the most slow-down in the world, but it can slow it down some.
2) Try a longer cable. This will add more propagation delays. I have heard of 8m cables (yes, they do violate IEEE spec, but so does this instrument) helping the problem as well. Again, this is not a huge delay added, but it can help.
3) Rewrite your application (or the instrument driver) to write the data slower. For example, instead of writing "abcdefg", change this to:
a) Disable EOI
b) Write "a", write "b", write "c", write "d", write "e", "write f"
c) Enable EOI
d) Write "g"
This will add significant delays which should solve the problem if the problem is intrabyte delays. If it is intra-transfer delays, you can just simply add a delay before or after you write the entire string.
0 Kudos
Message 15 of 32
(4,707 Views)

Guru!

Thank you for your input.

After some looking around and tinkering I found a solution that works om my system.

1. Put any character before the string that is to be written to the instrument. This character is dropped on the way.

2. Set the mode to 3 for the write vi and to 0 for the read vi.

 

0 Kudos
Message 16 of 32
(4,685 Views)
I'm having the same problems with my SR510. I can't get it to communicate in MAX, though it does recognise the instrument as being plugged in. It times out whenever I send a command. Repeated pressing of write will sometimes cause it to obey but this is rare. I pretty much always get the error light flash on. If anyone can give further guidance it would be much appreciated.
0 Kudos
Message 17 of 32
(4,621 Views)
Hello,

I don't know if you have already, but I would suggest trying the suggestions mentioned in this thread to see if they help. Hopefully, you are able to get it working with the tips here. Goodluck.

Regards,

Message Edited by _Belle on 11-28-2006 05:19 PM

Ebele O.
National Instruments
0 Kudos
Message 18 of 32
(4,593 Views)

I tried doing the things peopel suggested but had no real luck. I now seem to have gotten around the issue by plugging the GPIB-USB cable into a metre long GPIB cable before going into the lock in. This seems to have cleared up the problem.

Thanks for your suggestions.

Nicky

0 Kudos
Message 19 of 32
(4,582 Views)
Hello all,

I'm another person having trouble communicating with a SR510.

I've got the lock-in connected to the computer through about 3m of GPIB cable, and I've put a 270pF capacitor across pins 10 and 17 of the GPIB, as mentioned on anther tread on here. The problem is that I can't read data from it either with MAX or Labview, but only a combination of the two.

With either program the Z command will reset the instrument OK. To measure data I then have to read data from the lockin with Labview(pesumably to clear the bus), before sending the X2 read data command using MAX, and then I see the right data returned. If I try programming the whole thing in Labview, no data seems to be transferred back to the instrument.

If I don't try to clear the databus by reading data with labview, or if I try using the Labview 488 (rather than 488.2) vi, then MAX will time out, and give the error message that no instrument was found at address 16. The same thing happens if I use the 'read' function in MAX.

I'm running Windows 2000 and Labview 7.0.

Has anyone any suggestions?

Thanks,
Rich

Message Edited by RichardG on 04-01-2007 12:10 PM

0 Kudos
Message 20 of 32
(4,398 Views)