Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

srs245 w/GPIB & Labview

I am trying to use GPIB & Labview to control a Stanford Research Systems
245. When I attempt to communicate with the 245 I am able to write strings
to it but am unable to read any response. The address seems to be correct
because when I write to the device the "activity" light blinks and the communicator
says " string recieved".
When I attempt to read I get a time-out error. It seems as though the
245 remains in "listen mode" and is not recieving a termination character.
There is reference to a carriage return in the 245 manual , but is not explicitly
defined. We have tried the "\r" & "\n" with no success. Also, the GPIB is
set to send EOS at end of line.
What are some other possible termination characters?
0 Kudos
Message 1 of 12
(6,607 Views)
brian wrote:

> I am trying to use GPIB & Labview to control a Stanford Research Systems
> 245. When I attempt to communicate with the 245 I am able to write strings
> to it but am unable to read any response. The address seems to be correct
> because when I write to the device the "activity" light blinks and the communicator
> says " string recieved".
> When I attempt to read I get a time-out error. It seems as though the
> 245 remains in "listen mode" and is not recieving a termination character.
> There is reference to a carriage return in the 245 manual , but is not explicitly
> defined. We have tried the "\r" & "\n" with no success. Also, the GPIB is
> set to send EOS at end of line.
> What are some other possible termination characters?

Is this
a home grown driver ? There is a driver for this on NI's web site, I would
suggest that
you download this and give it a try.

Also as a reality check, (no offense intended) are you requesting information from the
device ??

If the manual says to use CR then the "\r" should be sufficient. Also generally
speaking devices
will remain in listen mode almost constantly, then briefly talk (when requested to
send data) and
drop back to listen mode.

Hope this is helpful.
Kevin Kent
0 Kudos
Message 2 of 12
(6,606 Views)
Hi,

brian wrote:

> I am trying to use GPIB & Labview to control a Stanford Research Systems
> 245. When I attempt to communicate with the 245 I am able to write strings
> to it but am unable to read any response. The address seems to be correct
> because when I write to the device the "activity" light blinks and the communicator
> says " string recieved"

I have exactly the same problem. Labview 5.1, old PCII/IIA card (from 1990), new SRS
245 (bought last week). Got all the new drivers from the NI website. At least the
PCII/IIA card seems to work, because I can talk and listen to another device (Keithley
Counter). When I write something to the SRS 245, the "activity" light blinks, too, but
it doesn't seem to understand the command. For example I can tell it t
o put a certain
voltage to an output, which doesn't work.

> When I attempt to read I get a time-out error.

The same.

In the NI Knowledge Base (Document ID 5887, Report date 1994) I found:


> Problem: I have a Stanford Research Systems instrument
> (SR510, SR530, or SR245) and I cannot get it
> to work with my National Instruments GPIB board.
>
> Solution: Our older GPIB boards work with these Stanford Research Systems
> instruments, but our newer GPIB boards will not; at least not without
> some modification in the connection between the board and the instrument.
>
> One workaround is to place a 270 pF capacitor between pin 10 (ground)
> and pin 17 (DAC) of the instrument's GPIB connector/cable
> (part number 75161).
>

Is this the solution???

Frank.

--
Frank Balzer
Fysisk Institut, Odense Universitet
Campusvej 55, DK-5230 Odense M, Danmark
0 Kudos
Message 3 of 12
(6,606 Views)
Hi,

> brian wrote:
>
> > I am trying to use GPIB & Labview to control a Stanford Research Systems
> > 245. When I attempt to communicate with the 245 I am able to write strings
> > to it but am unable to read any response. The address seems to be correct
> > because when I write to the device the "activity" light blinks and the communicator
> > says " string recieved"
>
> I have exactly the same problem.

Problem was that Labview didn't send the EOI character at the end of commands (isn't this
the default???). Found no way to do this from the communicator. Sending for example "I6\r"
sends the four characters "I", "6", "\" and "\r", but doing it within IBIC works, and
inserting a CR after each command in the demo programs works, too.

Frank.
0 Kudos
Message 4 of 12
(6,606 Views)
If you alter the control type to display "\" Codes, you will notice that the "I6\r" is altered to "I6\\r". If you replace the "\\" with a single "\" you will send just the character instead of the "\r"
0 Kudos
Message 5 of 12
(6,606 Views)
We had the same problem when trying to
communicate by using VISA functions and here
is how we solved it thanks to both SRS and NI
support. We use LabVIEW 6.0.2 and a ines PCI-
GPIB board.

* First :

For old SR245 computer interfaces, a 270 pF
capacitor must be placed " between pin 10
(ground) and pin 17 (DAC) on the GPIB bus
driver (Part Number 75161) which is adjacent
to the MC68488 controller " (from a SRS
document dated 5 June 1991 - this affects
SR510 and SR530 too).

* Then for GPIB functions :

The problem is simply solved when using GPIB
Write and Read functions since it is enough to
set the right Mode (both functions have a Mode
input connector) : for the Write function mode
3 that sends CR LF EOI at the end of the input
string, mode 0 f
or the Read function.

* With VISA functions :

For talking to the SR245 by using a VISA Write
function, set the " '\' Codes Display " option
in the menu that appears when right-clicking
on the input buffer field (in the block
diagram for constant chains, otherwise in the
front panel). From there just write your
command or request to the SR245 followed by
\r\n (e.g. MR\r\n) in the buffer field (\r
and \n meaning CR and LF respectively).

For listening to the SR245 by using a VISA
Read function, create an output buffer that
can display the '\' codes like you did for the
input buffer of the VISA Write function. A
Property Node function must be added prior to
reading in order to enable the use of a
termination character. Create the following
properties found in the Properties/Message
Based Settings menu that appears when right-
clicking on a property field : Termination
Character Enable and Termination Character.
Set the former to True and the later to 10
(ASCII
code for LF). It works even though
only the LF termination character is set.

I hope this helps.
Message 6 of 12
(6,605 Views)
I am trying to solve the same problems under the Labveiw6.1. The 270 pF capacitor was placed between pin 10(ground) and pin 17 (DAC) on the GPIB bus
driver in the old SR245 interface.
I can do talking with the SR245 using the SR245.vi downroaded from the NI website. But I fail to do listening to the SR245.
Can I solve the problems on the Labveiw6.1 with modifying the SR245.vi pannel?
I cannot find the setting of the ''Properties/Message Based Settings menu with right-clicking on a property field'' Could you please show me more details about the setting for listening to the SR245?
0 Kudos
Message 7 of 12
(6,606 Views)
Hi,

I'm having the same problem. I have an old sr245 with a new gpib card from agilent. I can see the instrument in MAX, and when I try to use VISAIC to write to the instrument its activity light flashes. I don't get an answer, however, and when I try to read from the instrument I get a timeout error and the activity light doesn't blink. I'm using Labview 6.1 with VISA 3.0.1.

I haven't added a capactitor in the sr245, as I'm reluctant to do that if I have any other choices.

Thanks very much for any assistance,

Sophy
0 Kudos
Message 8 of 12
(6,606 Views)

I was having a similar problem with a sr245 (sr 245) from the early 80's, and wound up fooling around in MAX with the GPIB communicator.  I found that the communication times out when I start communication with the following string (which should, among other things, read the voltage at input 1):

I8;MA;SM=0;?1\r

but does not time out if I start with the following string:

I8;MA;SM=0;?1;\r    (notice the only difference is the semicolon before the \r)

if I follow the latter string with the former string, there is no problem (i.e. it reads the voltage no problem) I don't understand.  Can someone enlighten me please?  Jonathan

0 Kudos
Message 9 of 12
(5,928 Views)
So, I tried fiddling with the string sent to the GPIB bus in the sr245 vi, to no avail... I can get it to work in MAX, but not in the vi, which uses the GPIB write functions (no VISA).  Suggestions?
0 Kudos
Message 10 of 12
(5,926 Views)